/* * Copyright 2010-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ package com.amazonaws.services.rekognition.model; import java.io.Serializable; public class GetContentModerationResult implements Serializable { /** *
* The current status of the content moderation analysis job. *
*
* Constraints:
* Allowed Values: IN_PROGRESS, SUCCEEDED, FAILED
*/
private String jobStatus;
/**
*
* If the job fails, StatusMessage
provides a descriptive error
* message.
*
* Information about a video that Amazon Rekognition analyzed.
* Videometadata
is returned in every page of paginated
* responses from GetContentModeration
.
*
* The detected inappropriate, unwanted, or offensive content moderation * labels and the time(s) they were detected. *
*/ private java.util.List* If the response is truncated, Amazon Rekognition Video returns this token * that you can use in the subsequent request to retrieve the next set of * content moderation labels. *
*
* Constraints:
* Length: - 255
*/
private String nextToken;
/**
*
* Version number of the moderation detection model that was used to detect * inappropriate, unwanted, or offensive content. *
*/ private String moderationModelVersion; /** ** Job identifier for the content moderation operation for which you want to * obtain results. The job identifer is returned by an initial call to * StartContentModeration. *
*
* Constraints:
* Length: 1 - 64
* Pattern: ^[a-zA-Z0-9-_]+$
*/
private String jobId;
/**
*
* Video file stored in an Amazon S3 bucket. Amazon Rekognition video start
* operations such as StartLabelDetection use Video
to
* specify a video for analysis. The supported file formats are .mp4, .mov
* and .avi.
*
* A job identifier specified in the call to StartContentModeration and * returned in the job completion notification sent to your Amazon Simple * Notification Service topic. *
*
* Constraints:
* Length: 1 - 1024
* Pattern: [a-zA-Z0-9_.\-:+=\/]+
*/
private String jobTag;
/**
*
* Information about the paramters used when getting a response. Includes * information on aggregation and sorting methods. *
*/ private GetContentModerationRequestMetadata getRequestMetadata; /** ** The current status of the content moderation analysis job. *
*
* Constraints:
* Allowed Values: IN_PROGRESS, SUCCEEDED, FAILED
*
* @return
* The current status of the content moderation analysis job. *
* @see VideoJobStatus */ public String getJobStatus() { return jobStatus; } /** ** The current status of the content moderation analysis job. *
*
* Constraints:
* Allowed Values: IN_PROGRESS, SUCCEEDED, FAILED
*
* @param jobStatus
* The current status of the content moderation analysis job. *
* @see VideoJobStatus */ public void setJobStatus(String jobStatus) { this.jobStatus = jobStatus; } /** ** The current status of the content moderation analysis job. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: IN_PROGRESS, SUCCEEDED, FAILED
*
* @param jobStatus
* The current status of the content moderation analysis job. *
* @return A reference to this updated object so that method calls can be * chained together. * @see VideoJobStatus */ public GetContentModerationResult withJobStatus(String jobStatus) { this.jobStatus = jobStatus; return this; } /** ** The current status of the content moderation analysis job. *
*
* Constraints:
* Allowed Values: IN_PROGRESS, SUCCEEDED, FAILED
*
* @param jobStatus
* The current status of the content moderation analysis job. *
* @see VideoJobStatus */ public void setJobStatus(VideoJobStatus jobStatus) { this.jobStatus = jobStatus.toString(); } /** ** The current status of the content moderation analysis job. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: IN_PROGRESS, SUCCEEDED, FAILED
*
* @param jobStatus
* The current status of the content moderation analysis job. *
* @return A reference to this updated object so that method calls can be * chained together. * @see VideoJobStatus */ public GetContentModerationResult withJobStatus(VideoJobStatus jobStatus) { this.jobStatus = jobStatus.toString(); return this; } /** *
* If the job fails, StatusMessage
provides a descriptive error
* message.
*
* If the job fails, StatusMessage
provides a
* descriptive error message.
*
* If the job fails, StatusMessage
provides a descriptive error
* message.
*
* If the job fails, StatusMessage
provides a
* descriptive error message.
*
* If the job fails, StatusMessage
provides a descriptive error
* message.
*
* Returns a reference to this object so that method calls can be chained * together. * * @param statusMessage
* If the job fails, StatusMessage
provides a
* descriptive error message.
*
* Information about a video that Amazon Rekognition analyzed.
* Videometadata
is returned in every page of paginated
* responses from GetContentModeration
.
*
* Information about a video that Amazon Rekognition analyzed.
* Videometadata
is returned in every page of paginated
* responses from GetContentModeration
.
*
* Information about a video that Amazon Rekognition analyzed.
* Videometadata
is returned in every page of paginated
* responses from GetContentModeration
.
*
* Information about a video that Amazon Rekognition analyzed.
* Videometadata
is returned in every page of
* paginated responses from GetContentModeration
.
*
* Information about a video that Amazon Rekognition analyzed.
* Videometadata
is returned in every page of paginated
* responses from GetContentModeration
.
*
* Returns a reference to this object so that method calls can be chained * together. * * @param videoMetadata
* Information about a video that Amazon Rekognition analyzed.
* Videometadata
is returned in every page of
* paginated responses from GetContentModeration
.
*
* The detected inappropriate, unwanted, or offensive content moderation * labels and the time(s) they were detected. *
* * @return* The detected inappropriate, unwanted, or offensive content * moderation labels and the time(s) they were detected. *
*/ public java.util.List* The detected inappropriate, unwanted, or offensive content moderation * labels and the time(s) they were detected. *
* * @param moderationLabels* The detected inappropriate, unwanted, or offensive content * moderation labels and the time(s) they were detected. *
*/ public void setModerationLabels( java.util.Collection* The detected inappropriate, unwanted, or offensive content moderation * labels and the time(s) they were detected. *
** Returns a reference to this object so that method calls can be chained * together. * * @param moderationLabels
* The detected inappropriate, unwanted, or offensive content * moderation labels and the time(s) they were detected. *
* @return A reference to this updated object so that method calls can be * chained together. */ public GetContentModerationResult withModerationLabels( ContentModerationDetection... moderationLabels) { if (getModerationLabels() == null) { this.moderationLabels = new java.util.ArrayList* The detected inappropriate, unwanted, or offensive content moderation * labels and the time(s) they were detected. *
** Returns a reference to this object so that method calls can be chained * together. * * @param moderationLabels
* The detected inappropriate, unwanted, or offensive content * moderation labels and the time(s) they were detected. *
* @return A reference to this updated object so that method calls can be * chained together. */ public GetContentModerationResult withModerationLabels( java.util.Collection* If the response is truncated, Amazon Rekognition Video returns this token * that you can use in the subsequent request to retrieve the next set of * content moderation labels. *
*
* Constraints:
* Length: - 255
*
* @return
* If the response is truncated, Amazon Rekognition Video returns * this token that you can use in the subsequent request to retrieve * the next set of content moderation labels. *
*/ public String getNextToken() { return nextToken; } /** ** If the response is truncated, Amazon Rekognition Video returns this token * that you can use in the subsequent request to retrieve the next set of * content moderation labels. *
*
* Constraints:
* Length: - 255
*
* @param nextToken
* If the response is truncated, Amazon Rekognition Video returns * this token that you can use in the subsequent request to * retrieve the next set of content moderation labels. *
*/ public void setNextToken(String nextToken) { this.nextToken = nextToken; } /** ** If the response is truncated, Amazon Rekognition Video returns this token * that you can use in the subsequent request to retrieve the next set of * content moderation labels. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: - 255
*
* @param nextToken
* If the response is truncated, Amazon Rekognition Video returns * this token that you can use in the subsequent request to * retrieve the next set of content moderation labels. *
* @return A reference to this updated object so that method calls can be * chained together. */ public GetContentModerationResult withNextToken(String nextToken) { this.nextToken = nextToken; return this; } /** ** Version number of the moderation detection model that was used to detect * inappropriate, unwanted, or offensive content. *
* * @return* Version number of the moderation detection model that was used to * detect inappropriate, unwanted, or offensive content. *
*/ public String getModerationModelVersion() { return moderationModelVersion; } /** ** Version number of the moderation detection model that was used to detect * inappropriate, unwanted, or offensive content. *
* * @param moderationModelVersion* Version number of the moderation detection model that was used * to detect inappropriate, unwanted, or offensive content. *
*/ public void setModerationModelVersion(String moderationModelVersion) { this.moderationModelVersion = moderationModelVersion; } /** ** Version number of the moderation detection model that was used to detect * inappropriate, unwanted, or offensive content. *
** Returns a reference to this object so that method calls can be chained * together. * * @param moderationModelVersion
* Version number of the moderation detection model that was used * to detect inappropriate, unwanted, or offensive content. *
* @return A reference to this updated object so that method calls can be * chained together. */ public GetContentModerationResult withModerationModelVersion(String moderationModelVersion) { this.moderationModelVersion = moderationModelVersion; return this; } /** ** Job identifier for the content moderation operation for which you want to * obtain results. The job identifer is returned by an initial call to * StartContentModeration. *
*
* Constraints:
* Length: 1 - 64
* Pattern: ^[a-zA-Z0-9-_]+$
*
* @return
* Job identifier for the content moderation operation for which you * want to obtain results. The job identifer is returned by an * initial call to StartContentModeration. *
*/ public String getJobId() { return jobId; } /** ** Job identifier for the content moderation operation for which you want to * obtain results. The job identifer is returned by an initial call to * StartContentModeration. *
*
* Constraints:
* Length: 1 - 64
* Pattern: ^[a-zA-Z0-9-_]+$
*
* @param jobId
* Job identifier for the content moderation operation for which * you want to obtain results. The job identifer is returned by * an initial call to StartContentModeration. *
*/ public void setJobId(String jobId) { this.jobId = jobId; } /** ** Job identifier for the content moderation operation for which you want to * obtain results. The job identifer is returned by an initial call to * StartContentModeration. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: 1 - 64
* Pattern: ^[a-zA-Z0-9-_]+$
*
* @param jobId
* Job identifier for the content moderation operation for which * you want to obtain results. The job identifer is returned by * an initial call to StartContentModeration. *
* @return A reference to this updated object so that method calls can be * chained together. */ public GetContentModerationResult withJobId(String jobId) { this.jobId = jobId; return this; } /** *
* Video file stored in an Amazon S3 bucket. Amazon Rekognition video start
* operations such as StartLabelDetection use Video
to
* specify a video for analysis. The supported file formats are .mp4, .mov
* and .avi.
*
* Video file stored in an Amazon S3 bucket. Amazon Rekognition
* video start operations such as StartLabelDetection use
* Video
to specify a video for analysis. The supported
* file formats are .mp4, .mov and .avi.
*
* Video file stored in an Amazon S3 bucket. Amazon Rekognition video start
* operations such as StartLabelDetection use Video
to
* specify a video for analysis. The supported file formats are .mp4, .mov
* and .avi.
*
* Video file stored in an Amazon S3 bucket. Amazon Rekognition
* video start operations such as StartLabelDetection use
* Video
to specify a video for analysis. The
* supported file formats are .mp4, .mov and .avi.
*
* Video file stored in an Amazon S3 bucket. Amazon Rekognition video start
* operations such as StartLabelDetection use Video
to
* specify a video for analysis. The supported file formats are .mp4, .mov
* and .avi.
*
* Returns a reference to this object so that method calls can be chained * together. * * @param video
* Video file stored in an Amazon S3 bucket. Amazon Rekognition
* video start operations such as StartLabelDetection use
* Video
to specify a video for analysis. The
* supported file formats are .mp4, .mov and .avi.
*
* A job identifier specified in the call to StartContentModeration and * returned in the job completion notification sent to your Amazon Simple * Notification Service topic. *
*
* Constraints:
* Length: 1 - 1024
* Pattern: [a-zA-Z0-9_.\-:+=\/]+
*
* @return
* A job identifier specified in the call to StartContentModeration * and returned in the job completion notification sent to your * Amazon Simple Notification Service topic. *
*/ public String getJobTag() { return jobTag; } /** ** A job identifier specified in the call to StartContentModeration and * returned in the job completion notification sent to your Amazon Simple * Notification Service topic. *
*
* Constraints:
* Length: 1 - 1024
* Pattern: [a-zA-Z0-9_.\-:+=\/]+
*
* @param jobTag
* A job identifier specified in the call to * StartContentModeration and returned in the job completion * notification sent to your Amazon Simple Notification Service * topic. *
*/ public void setJobTag(String jobTag) { this.jobTag = jobTag; } /** ** A job identifier specified in the call to StartContentModeration and * returned in the job completion notification sent to your Amazon Simple * Notification Service topic. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: 1 - 1024
* Pattern: [a-zA-Z0-9_.\-:+=\/]+
*
* @param jobTag
* A job identifier specified in the call to * StartContentModeration and returned in the job completion * notification sent to your Amazon Simple Notification Service * topic. *
* @return A reference to this updated object so that method calls can be * chained together. */ public GetContentModerationResult withJobTag(String jobTag) { this.jobTag = jobTag; return this; } /** ** Information about the paramters used when getting a response. Includes * information on aggregation and sorting methods. *
* * @return* Information about the paramters used when getting a response. * Includes information on aggregation and sorting methods. *
*/ public GetContentModerationRequestMetadata getGetRequestMetadata() { return getRequestMetadata; } /** ** Information about the paramters used when getting a response. Includes * information on aggregation and sorting methods. *
* * @param getRequestMetadata* Information about the paramters used when getting a response. * Includes information on aggregation and sorting methods. *
*/ public void setGetRequestMetadata(GetContentModerationRequestMetadata getRequestMetadata) { this.getRequestMetadata = getRequestMetadata; } /** ** Information about the paramters used when getting a response. Includes * information on aggregation and sorting methods. *
** Returns a reference to this object so that method calls can be chained * together. * * @param getRequestMetadata
* Information about the paramters used when getting a response. * Includes information on aggregation and sorting methods. *
* @return A reference to this updated object so that method calls can be * chained together. */ public GetContentModerationResult withGetRequestMetadata( GetContentModerationRequestMetadata getRequestMetadata) { this.getRequestMetadata = getRequestMetadata; return this; } /** * 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 (getJobStatus() != null) sb.append("JobStatus: " + getJobStatus() + ","); if (getStatusMessage() != null) sb.append("StatusMessage: " + getStatusMessage() + ","); if (getVideoMetadata() != null) sb.append("VideoMetadata: " + getVideoMetadata() + ","); if (getModerationLabels() != null) sb.append("ModerationLabels: " + getModerationLabels() + ","); if (getNextToken() != null) sb.append("NextToken: " + getNextToken() + ","); if (getModerationModelVersion() != null) sb.append("ModerationModelVersion: " + getModerationModelVersion() + ","); if (getJobId() != null) sb.append("JobId: " + getJobId() + ","); if (getVideo() != null) sb.append("Video: " + getVideo() + ","); if (getJobTag() != null) sb.append("JobTag: " + getJobTag() + ","); if (getGetRequestMetadata() != null) sb.append("GetRequestMetadata: " + getGetRequestMetadata()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getJobStatus() == null) ? 0 : getJobStatus().hashCode()); hashCode = prime * hashCode + ((getStatusMessage() == null) ? 0 : getStatusMessage().hashCode()); hashCode = prime * hashCode + ((getVideoMetadata() == null) ? 0 : getVideoMetadata().hashCode()); hashCode = prime * hashCode + ((getModerationLabels() == null) ? 0 : getModerationLabels().hashCode()); hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode()); hashCode = prime * hashCode + ((getModerationModelVersion() == null) ? 0 : getModerationModelVersion() .hashCode()); hashCode = prime * hashCode + ((getJobId() == null) ? 0 : getJobId().hashCode()); hashCode = prime * hashCode + ((getVideo() == null) ? 0 : getVideo().hashCode()); hashCode = prime * hashCode + ((getJobTag() == null) ? 0 : getJobTag().hashCode()); hashCode = prime * hashCode + ((getGetRequestMetadata() == null) ? 0 : getGetRequestMetadata().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetContentModerationResult == false) return false; GetContentModerationResult other = (GetContentModerationResult) obj; if (other.getJobStatus() == null ^ this.getJobStatus() == null) return false; if (other.getJobStatus() != null && other.getJobStatus().equals(this.getJobStatus()) == false) return false; if (other.getStatusMessage() == null ^ this.getStatusMessage() == null) return false; if (other.getStatusMessage() != null && other.getStatusMessage().equals(this.getStatusMessage()) == false) return false; if (other.getVideoMetadata() == null ^ this.getVideoMetadata() == null) return false; if (other.getVideoMetadata() != null && other.getVideoMetadata().equals(this.getVideoMetadata()) == false) return false; if (other.getModerationLabels() == null ^ this.getModerationLabels() == null) return false; if (other.getModerationLabels() != null && other.getModerationLabels().equals(this.getModerationLabels()) == false) return false; if (other.getNextToken() == null ^ this.getNextToken() == null) return false; if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == false) return false; if (other.getModerationModelVersion() == null ^ this.getModerationModelVersion() == null) return false; if (other.getModerationModelVersion() != null && other.getModerationModelVersion().equals(this.getModerationModelVersion()) == false) return false; if (other.getJobId() == null ^ this.getJobId() == null) return false; if (other.getJobId() != null && other.getJobId().equals(this.getJobId()) == false) return false; if (other.getVideo() == null ^ this.getVideo() == null) return false; if (other.getVideo() != null && other.getVideo().equals(this.getVideo()) == false) return false; if (other.getJobTag() == null ^ this.getJobTag() == null) return false; if (other.getJobTag() != null && other.getJobTag().equals(this.getJobTag()) == false) return false; if (other.getGetRequestMetadata() == null ^ this.getGetRequestMetadata() == null) return false; if (other.getGetRequestMetadata() != null && other.getGetRequestMetadata().equals(this.getGetRequestMetadata()) == false) return false; return true; } }