/* * 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 GetSegmentDetectionResult implements Serializable { /** *
* Current status of the segment detection job. *
*
* Constraints:
* Allowed Values: IN_PROGRESS, SUCCEEDED, FAILED
*/
private String jobStatus;
/**
*
* If the job fails, StatusMessage
provides a descriptive error
* message.
*
* Currently, Amazon Rekognition Video returns a single object in the
* VideoMetadata
array. The object contains information about
* the video stream in the input file that Amazon Rekognition Video chose to
* analyze. The VideoMetadata
object includes the video codec,
* video format and other information. Video metadata is returned in each
* page of information returned by GetSegmentDetection
.
*
* An array of objects. There can be multiple audio streams. Each
* AudioMetadata
object contains metadata for a single audio
* stream. Audio information in an AudioMetadata
objects
* includes the audio codec, the number of audio channels, the duration of
* the audio stream, and the sample rate. Audio metadata is returned in each
* page of information returned by GetSegmentDetection
.
*
* If the previous response was incomplete (because there are more labels to * retrieve), Amazon Rekognition Video returns a pagination token in the * response. You can use this pagination token to retrieve the next set of * text. *
*
* Constraints:
* Length: - 255
*/
private String nextToken;
/**
*
* An array of segments detected in a video. The array is sorted by the
* segment types (TECHNICAL_CUE or SHOT) specified in the
* SegmentTypes
input parameter of
* StartSegmentDetection
. Within each segment type the array is
* sorted by timestamp values.
*
* An array containing the segment types requested in the call to
* StartSegmentDetection
.
*
* Job identifier for the segment detection operation for which you want to * obtain results. The job identifer is returned by an initial call to * StartSegmentDetection. *
*
* 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 StartSegmentDetection 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;
/**
*
* Current status of the segment detection job. *
*
* Constraints:
* Allowed Values: IN_PROGRESS, SUCCEEDED, FAILED
*
* @return
* Current status of the segment detection job. *
* @see VideoJobStatus */ public String getJobStatus() { return jobStatus; } /** ** Current status of the segment detection job. *
*
* Constraints:
* Allowed Values: IN_PROGRESS, SUCCEEDED, FAILED
*
* @param jobStatus
* Current status of the segment detection job. *
* @see VideoJobStatus */ public void setJobStatus(String jobStatus) { this.jobStatus = jobStatus; } /** ** Current status of the segment detection job. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: IN_PROGRESS, SUCCEEDED, FAILED
*
* @param jobStatus
* Current status of the segment detection job. *
* @return A reference to this updated object so that method calls can be * chained together. * @see VideoJobStatus */ public GetSegmentDetectionResult withJobStatus(String jobStatus) { this.jobStatus = jobStatus; return this; } /** ** Current status of the segment detection job. *
*
* Constraints:
* Allowed Values: IN_PROGRESS, SUCCEEDED, FAILED
*
* @param jobStatus
* Current status of the segment detection job. *
* @see VideoJobStatus */ public void setJobStatus(VideoJobStatus jobStatus) { this.jobStatus = jobStatus.toString(); } /** ** Current status of the segment detection job. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: IN_PROGRESS, SUCCEEDED, FAILED
*
* @param jobStatus
* Current status of the segment detection job. *
* @return A reference to this updated object so that method calls can be * chained together. * @see VideoJobStatus */ public GetSegmentDetectionResult 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.
*
* Currently, Amazon Rekognition Video returns a single object in the
* VideoMetadata
array. The object contains information about
* the video stream in the input file that Amazon Rekognition Video chose to
* analyze. The VideoMetadata
object includes the video codec,
* video format and other information. Video metadata is returned in each
* page of information returned by GetSegmentDetection
.
*
* Currently, Amazon Rekognition Video returns a single object in
* the VideoMetadata
array. The object contains
* information about the video stream in the input file that Amazon
* Rekognition Video chose to analyze. The
* VideoMetadata
object includes the video codec, video
* format and other information. Video metadata is returned in each
* page of information returned by GetSegmentDetection
.
*
* Currently, Amazon Rekognition Video returns a single object in the
* VideoMetadata
array. The object contains information about
* the video stream in the input file that Amazon Rekognition Video chose to
* analyze. The VideoMetadata
object includes the video codec,
* video format and other information. Video metadata is returned in each
* page of information returned by GetSegmentDetection
.
*
* Currently, Amazon Rekognition Video returns a single object in
* the VideoMetadata
array. The object contains
* information about the video stream in the input file that
* Amazon Rekognition Video chose to analyze. The
* VideoMetadata
object includes the video codec,
* video format and other information. Video metadata is returned
* in each page of information returned by
* GetSegmentDetection
.
*
* Currently, Amazon Rekognition Video returns a single object in the
* VideoMetadata
array. The object contains information about
* the video stream in the input file that Amazon Rekognition Video chose to
* analyze. The VideoMetadata
object includes the video codec,
* video format and other information. Video metadata is returned in each
* page of information returned by GetSegmentDetection
.
*
* Returns a reference to this object so that method calls can be chained * together. * * @param videoMetadata
* Currently, Amazon Rekognition Video returns a single object in
* the VideoMetadata
array. The object contains
* information about the video stream in the input file that
* Amazon Rekognition Video chose to analyze. The
* VideoMetadata
object includes the video codec,
* video format and other information. Video metadata is returned
* in each page of information returned by
* GetSegmentDetection
.
*
* Currently, Amazon Rekognition Video returns a single object in the
* VideoMetadata
array. The object contains information about
* the video stream in the input file that Amazon Rekognition Video chose to
* analyze. The VideoMetadata
object includes the video codec,
* video format and other information. Video metadata is returned in each
* page of information returned by GetSegmentDetection
.
*
* Returns a reference to this object so that method calls can be chained * together. * * @param videoMetadata
* Currently, Amazon Rekognition Video returns a single object in
* the VideoMetadata
array. The object contains
* information about the video stream in the input file that
* Amazon Rekognition Video chose to analyze. The
* VideoMetadata
object includes the video codec,
* video format and other information. Video metadata is returned
* in each page of information returned by
* GetSegmentDetection
.
*
* An array of objects. There can be multiple audio streams. Each
* AudioMetadata
object contains metadata for a single audio
* stream. Audio information in an AudioMetadata
objects
* includes the audio codec, the number of audio channels, the duration of
* the audio stream, and the sample rate. Audio metadata is returned in each
* page of information returned by GetSegmentDetection
.
*
* An array of objects. There can be multiple audio streams. Each
* AudioMetadata
object contains metadata for a single
* audio stream. Audio information in an AudioMetadata
* objects includes the audio codec, the number of audio channels,
* the duration of the audio stream, and the sample rate. Audio
* metadata is returned in each page of information returned by
* GetSegmentDetection
.
*
* An array of objects. There can be multiple audio streams. Each
* AudioMetadata
object contains metadata for a single audio
* stream. Audio information in an AudioMetadata
objects
* includes the audio codec, the number of audio channels, the duration of
* the audio stream, and the sample rate. Audio metadata is returned in each
* page of information returned by GetSegmentDetection
.
*
* An array of objects. There can be multiple audio streams. Each
* AudioMetadata
object contains metadata for a
* single audio stream. Audio information in an
* AudioMetadata
objects includes the audio codec,
* the number of audio channels, the duration of the audio
* stream, and the sample rate. Audio metadata is returned in
* each page of information returned by
* GetSegmentDetection
.
*
* An array of objects. There can be multiple audio streams. Each
* AudioMetadata
object contains metadata for a single audio
* stream. Audio information in an AudioMetadata
objects
* includes the audio codec, the number of audio channels, the duration of
* the audio stream, and the sample rate. Audio metadata is returned in each
* page of information returned by GetSegmentDetection
.
*
* Returns a reference to this object so that method calls can be chained * together. * * @param audioMetadata
* An array of objects. There can be multiple audio streams. Each
* AudioMetadata
object contains metadata for a
* single audio stream. Audio information in an
* AudioMetadata
objects includes the audio codec,
* the number of audio channels, the duration of the audio
* stream, and the sample rate. Audio metadata is returned in
* each page of information returned by
* GetSegmentDetection
.
*
* An array of objects. There can be multiple audio streams. Each
* AudioMetadata
object contains metadata for a single audio
* stream. Audio information in an AudioMetadata
objects
* includes the audio codec, the number of audio channels, the duration of
* the audio stream, and the sample rate. Audio metadata is returned in each
* page of information returned by GetSegmentDetection
.
*
* Returns a reference to this object so that method calls can be chained * together. * * @param audioMetadata
* An array of objects. There can be multiple audio streams. Each
* AudioMetadata
object contains metadata for a
* single audio stream. Audio information in an
* AudioMetadata
objects includes the audio codec,
* the number of audio channels, the duration of the audio
* stream, and the sample rate. Audio metadata is returned in
* each page of information returned by
* GetSegmentDetection
.
*
* If the previous response was incomplete (because there are more labels to * retrieve), Amazon Rekognition Video returns a pagination token in the * response. You can use this pagination token to retrieve the next set of * text. *
*
* Constraints:
* Length: - 255
*
* @return
* If the previous response was incomplete (because there are more * labels to retrieve), Amazon Rekognition Video returns a * pagination token in the response. You can use this pagination * token to retrieve the next set of text. *
*/ public String getNextToken() { return nextToken; } /** ** If the previous response was incomplete (because there are more labels to * retrieve), Amazon Rekognition Video returns a pagination token in the * response. You can use this pagination token to retrieve the next set of * text. *
*
* Constraints:
* Length: - 255
*
* @param nextToken
* If the previous response was incomplete (because there are * more labels to retrieve), Amazon Rekognition Video returns a * pagination token in the response. You can use this pagination * token to retrieve the next set of text. *
*/ public void setNextToken(String nextToken) { this.nextToken = nextToken; } /** ** If the previous response was incomplete (because there are more labels to * retrieve), Amazon Rekognition Video returns a pagination token in the * response. You can use this pagination token to retrieve the next set of * text. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: - 255
*
* @param nextToken
* If the previous response was incomplete (because there are * more labels to retrieve), Amazon Rekognition Video returns a * pagination token in the response. You can use this pagination * token to retrieve the next set of text. *
* @return A reference to this updated object so that method calls can be * chained together. */ public GetSegmentDetectionResult withNextToken(String nextToken) { this.nextToken = nextToken; return this; } /** *
* An array of segments detected in a video. The array is sorted by the
* segment types (TECHNICAL_CUE or SHOT) specified in the
* SegmentTypes
input parameter of
* StartSegmentDetection
. Within each segment type the array is
* sorted by timestamp values.
*
* An array of segments detected in a video. The array is sorted by
* the segment types (TECHNICAL_CUE or SHOT) specified in the
* SegmentTypes
input parameter of
* StartSegmentDetection
. Within each segment type the
* array is sorted by timestamp values.
*
* An array of segments detected in a video. The array is sorted by the
* segment types (TECHNICAL_CUE or SHOT) specified in the
* SegmentTypes
input parameter of
* StartSegmentDetection
. Within each segment type the array is
* sorted by timestamp values.
*
* An array of segments detected in a video. The array is sorted
* by the segment types (TECHNICAL_CUE or SHOT) specified in the
* SegmentTypes
input parameter of
* StartSegmentDetection
. Within each segment type
* the array is sorted by timestamp values.
*
* An array of segments detected in a video. The array is sorted by the
* segment types (TECHNICAL_CUE or SHOT) specified in the
* SegmentTypes
input parameter of
* StartSegmentDetection
. Within each segment type the array is
* sorted by timestamp values.
*
* Returns a reference to this object so that method calls can be chained * together. * * @param segments
* An array of segments detected in a video. The array is sorted
* by the segment types (TECHNICAL_CUE or SHOT) specified in the
* SegmentTypes
input parameter of
* StartSegmentDetection
. Within each segment type
* the array is sorted by timestamp values.
*
* An array of segments detected in a video. The array is sorted by the
* segment types (TECHNICAL_CUE or SHOT) specified in the
* SegmentTypes
input parameter of
* StartSegmentDetection
. Within each segment type the array is
* sorted by timestamp values.
*
* Returns a reference to this object so that method calls can be chained * together. * * @param segments
* An array of segments detected in a video. The array is sorted
* by the segment types (TECHNICAL_CUE or SHOT) specified in the
* SegmentTypes
input parameter of
* StartSegmentDetection
. Within each segment type
* the array is sorted by timestamp values.
*
* An array containing the segment types requested in the call to
* StartSegmentDetection
.
*
* An array containing the segment types requested in the call to
* StartSegmentDetection
.
*
* An array containing the segment types requested in the call to
* StartSegmentDetection
.
*
* An array containing the segment types requested in the call to
* StartSegmentDetection
.
*
* An array containing the segment types requested in the call to
* StartSegmentDetection
.
*
* Returns a reference to this object so that method calls can be chained * together. * * @param selectedSegmentTypes
* An array containing the segment types requested in the call to
* StartSegmentDetection
.
*
* An array containing the segment types requested in the call to
* StartSegmentDetection
.
*
* Returns a reference to this object so that method calls can be chained * together. * * @param selectedSegmentTypes
* An array containing the segment types requested in the call to
* StartSegmentDetection
.
*
* Job identifier for the segment detection operation for which you want to * obtain results. The job identifer is returned by an initial call to * StartSegmentDetection. *
*
* Constraints:
* Length: 1 - 64
* Pattern: ^[a-zA-Z0-9-_]+$
*
* @return
* Job identifier for the segment detection operation for which you * want to obtain results. The job identifer is returned by an * initial call to StartSegmentDetection. *
*/ public String getJobId() { return jobId; } /** ** Job identifier for the segment detection operation for which you want to * obtain results. The job identifer is returned by an initial call to * StartSegmentDetection. *
*
* Constraints:
* Length: 1 - 64
* Pattern: ^[a-zA-Z0-9-_]+$
*
* @param jobId
* Job identifier for the segment detection operation for which * you want to obtain results. The job identifer is returned by * an initial call to StartSegmentDetection. *
*/ public void setJobId(String jobId) { this.jobId = jobId; } /** ** Job identifier for the segment detection operation for which you want to * obtain results. The job identifer is returned by an initial call to * StartSegmentDetection. *
** 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 segment detection operation for which * you want to obtain results. The job identifer is returned by * an initial call to StartSegmentDetection. *
* @return A reference to this updated object so that method calls can be * chained together. */ public GetSegmentDetectionResult 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 StartSegmentDetection 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 StartSegmentDetection * 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 StartSegmentDetection 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 * StartSegmentDetection 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 StartSegmentDetection 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 * StartSegmentDetection 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 GetSegmentDetectionResult withJobTag(String jobTag) { this.jobTag = jobTag; 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 (getAudioMetadata() != null) sb.append("AudioMetadata: " + getAudioMetadata() + ","); if (getNextToken() != null) sb.append("NextToken: " + getNextToken() + ","); if (getSegments() != null) sb.append("Segments: " + getSegments() + ","); if (getSelectedSegmentTypes() != null) sb.append("SelectedSegmentTypes: " + getSelectedSegmentTypes() + ","); if (getJobId() != null) sb.append("JobId: " + getJobId() + ","); if (getVideo() != null) sb.append("Video: " + getVideo() + ","); if (getJobTag() != null) sb.append("JobTag: " + getJobTag()); 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 + ((getAudioMetadata() == null) ? 0 : getAudioMetadata().hashCode()); hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode()); hashCode = prime * hashCode + ((getSegments() == null) ? 0 : getSegments().hashCode()); hashCode = prime * hashCode + ((getSelectedSegmentTypes() == null) ? 0 : getSelectedSegmentTypes().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()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetSegmentDetectionResult == false) return false; GetSegmentDetectionResult other = (GetSegmentDetectionResult) 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.getAudioMetadata() == null ^ this.getAudioMetadata() == null) return false; if (other.getAudioMetadata() != null && other.getAudioMetadata().equals(this.getAudioMetadata()) == 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.getSegments() == null ^ this.getSegments() == null) return false; if (other.getSegments() != null && other.getSegments().equals(this.getSegments()) == false) return false; if (other.getSelectedSegmentTypes() == null ^ this.getSelectedSegmentTypes() == null) return false; if (other.getSelectedSegmentTypes() != null && other.getSelectedSegmentTypes().equals(this.getSelectedSegmentTypes()) == 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; return true; } }