@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getVideo() == null) ? 0 : getVideo().hashCode()); hashCode = prime * hashCode + ((getClientRequestToken() == null) ? 0 : getClientRequestToken().hashCode()); hashCode = prime * hashCode + ((getMinConfidence() == null) ? 0 : getMinConfidence().hashCode()); hashCode = prime * hashCode + ((getNotificationChannel() == null) ? 0 : getNotificationChannel().hashCode()); hashCode = prime * hashCode + ((getJobTag() == null) ? 0 : getJobTag().hashCode()); return hashCode; }
/** * <p> * Idempotent token used to identify the start request. If you use the same token with multiple * <code>StartLabelDetection</code> requests, the same <code>JobId</code> is returned. Use * <code>ClientRequestToken</code> to prevent the same job from being accidently started more than once. * </p> * * @param clientRequestToken * Idempotent token used to identify the start request. If you use the same token with multiple * <code>StartLabelDetection</code> requests, the same <code>JobId</code> is returned. Use * <code>ClientRequestToken</code> to prevent the same job from being accidently started more than once. * @return Returns a reference to this object so that method calls can be chained together. */ public StartLabelDetectionRequest withClientRequestToken(String clientRequestToken) { setClientRequestToken(clientRequestToken); return this; }
/** * <p> * Unique identifier you specify to identify the job in the completion status published to the Amazon Simple * Notification Service topic. * </p> * * @param jobTag * Unique identifier you specify to identify the job in the completion status published to the Amazon Simple * Notification Service topic. * @return Returns a reference to this object so that method calls can be chained together. */ public StartLabelDetectionRequest withJobTag(String jobTag) { setJobTag(jobTag); return this; }
/** * <p> * The video in which you want to detect labels. The video must be stored in an Amazon S3 bucket. * </p> * * @param video * The video in which you want to detect labels. The video must be stored in an Amazon S3 bucket. * @return Returns a reference to this object so that method calls can be chained together. */ public StartLabelDetectionRequest withVideo(Video video) { setVideo(video); return this; }
/** * <p> * The Amazon SNS topic ARN you want Amazon Rekognition Video to publish the completion status of the label * detection operation to. * </p> * * @param notificationChannel * The Amazon SNS topic ARN you want Amazon Rekognition Video to publish the completion status of the label * detection operation to. * @return Returns a reference to this object so that method calls can be chained together. */ public StartLabelDetectionRequest withNotificationChannel(NotificationChannel notificationChannel) { setNotificationChannel(notificationChannel); return this; }
/** * <p> * Specifies the minimum confidence that Amazon Rekognition Video must have in order to return a detected label. * Confidence represents how certain Amazon Rekognition is that a label is correctly identified.0 is the lowest * confidence. 100 is the highest confidence. Amazon Rekognition Video doesn't return any labels with a confidence * level lower than this specified value. * </p> * <p> * If you don't specify <code>MinConfidence</code>, the operation returns labels with confidence values greater than * or equal to 50 percent. * </p> * * @param minConfidence * Specifies the minimum confidence that Amazon Rekognition Video must have in order to return a detected * label. Confidence represents how certain Amazon Rekognition is that a label is correctly identified.0 is * the lowest confidence. 100 is the highest confidence. Amazon Rekognition Video doesn't return any labels * with a confidence level lower than this specified value.</p> * <p> * If you don't specify <code>MinConfidence</code>, the operation returns labels with confidence values * greater than or equal to 50 percent. * @return Returns a reference to this object so that method calls can be chained together. */ public StartLabelDetectionRequest withMinConfidence(Float minConfidence) { setMinConfidence(minConfidence); return this; }
return false; StartLabelDetectionRequest other = (StartLabelDetectionRequest) obj; if (other.getVideo() == null ^ this.getVideo() == null) return false; if (other.getVideo() != null && other.getVideo().equals(this.getVideo()) == false) return false; if (other.getClientRequestToken() == null ^ this.getClientRequestToken() == null) return false; if (other.getClientRequestToken() != null && other.getClientRequestToken().equals(this.getClientRequestToken()) == false) return false; if (other.getMinConfidence() == null ^ this.getMinConfidence() == null) return false; if (other.getMinConfidence() != null && other.getMinConfidence().equals(this.getMinConfidence()) == false) return false; if (other.getNotificationChannel() == null ^ this.getNotificationChannel() == null) return false; if (other.getNotificationChannel() != null && other.getNotificationChannel().equals(this.getNotificationChannel()) == false) return false; if (other.getJobTag() == null ^ this.getJobTag() == null) return false; if (other.getJobTag() != null && other.getJobTag().equals(this.getJobTag()) == false) return false; return true;
/** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getVideo() != null) sb.append("Video: ").append(getVideo()).append(","); if (getClientRequestToken() != null) sb.append("ClientRequestToken: ").append(getClientRequestToken()).append(","); if (getMinConfidence() != null) sb.append("MinConfidence: ").append(getMinConfidence()).append(","); if (getNotificationChannel() != null) sb.append("NotificationChannel: ").append(getNotificationChannel()).append(","); if (getJobTag() != null) sb.append("JobTag: ").append(getJobTag()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(StartLabelDetectionRequest startLabelDetectionRequest, ProtocolMarshaller protocolMarshaller) { if (startLabelDetectionRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(startLabelDetectionRequest.getVideo(), VIDEO_BINDING); protocolMarshaller.marshall(startLabelDetectionRequest.getClientRequestToken(), CLIENTREQUESTTOKEN_BINDING); protocolMarshaller.marshall(startLabelDetectionRequest.getMinConfidence(), MINCONFIDENCE_BINDING); protocolMarshaller.marshall(startLabelDetectionRequest.getNotificationChannel(), NOTIFICATIONCHANNEL_BINDING); protocolMarshaller.marshall(startLabelDetectionRequest.getJobTag(), JOBTAG_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getVideo() == null) ? 0 : getVideo().hashCode()); hashCode = prime * hashCode + ((getClientRequestToken() == null) ? 0 : getClientRequestToken().hashCode()); hashCode = prime * hashCode + ((getMinConfidence() == null) ? 0 : getMinConfidence().hashCode()); hashCode = prime * hashCode + ((getNotificationChannel() == null) ? 0 : getNotificationChannel().hashCode()); hashCode = prime * hashCode + ((getJobTag() == null) ? 0 : getJobTag().hashCode()); return hashCode; }
StartLabelDetectionRequest other = (StartLabelDetectionRequest) obj; if (other.getVideo() == null ^ this.getVideo() == null) return false; if (other.getVideo() != null && other.getVideo().equals(this.getVideo()) == false) return false; if (other.getClientRequestToken() == null ^ this.getClientRequestToken() == null) return false; if (other.getClientRequestToken() != null && other.getClientRequestToken().equals(this.getClientRequestToken()) == false) return false; if (other.getMinConfidence() == null ^ this.getMinConfidence() == null) return false; if (other.getMinConfidence() != null && other.getMinConfidence().equals(this.getMinConfidence()) == false) return false; if (other.getNotificationChannel() == null ^ this.getNotificationChannel() == null) return false; if (other.getNotificationChannel() != null && other.getNotificationChannel().equals(this.getNotificationChannel()) == false) return false; if (other.getJobTag() == null ^ this.getJobTag() == null) return false; if (other.getJobTag() != null && other.getJobTag().equals(this.getJobTag()) == false) return false; return true;
/** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getVideo() != null) sb.append("Video: " + getVideo() + ","); if (getClientRequestToken() != null) sb.append("ClientRequestToken: " + getClientRequestToken() + ","); if (getMinConfidence() != null) sb.append("MinConfidence: " + getMinConfidence() + ","); if (getNotificationChannel() != null) sb.append("NotificationChannel: " + getNotificationChannel() + ","); if (getJobTag() != null) sb.append("JobTag: " + getJobTag()); sb.append("}"); return sb.toString(); }
jsonWriter.beginObject(); if (startLabelDetectionRequest.getVideo() != null) { Video video = startLabelDetectionRequest.getVideo(); jsonWriter.name("Video"); VideoJsonMarshaller.getInstance().marshall(video, jsonWriter); if (startLabelDetectionRequest.getClientRequestToken() != null) { String clientRequestToken = startLabelDetectionRequest.getClientRequestToken(); jsonWriter.name("ClientRequestToken"); jsonWriter.value(clientRequestToken); if (startLabelDetectionRequest.getMinConfidence() != null) { Float minConfidence = startLabelDetectionRequest.getMinConfidence(); jsonWriter.name("MinConfidence"); jsonWriter.value(minConfidence); if (startLabelDetectionRequest.getNotificationChannel() != null) { NotificationChannel notificationChannel = startLabelDetectionRequest .getNotificationChannel(); jsonWriter.name("NotificationChannel"); NotificationChannelJsonMarshaller.getInstance().marshall(notificationChannel, jsonWriter); if (startLabelDetectionRequest.getJobTag() != null) { String jobTag = startLabelDetectionRequest.getJobTag(); jsonWriter.name("JobTag"); jsonWriter.value(jobTag);