Class SegmentDetection

java.lang.Object
software.amazon.awssdk.services.rekognition.model.SegmentDetection
All Implemented Interfaces:
Serializable, SdkPojo, ToCopyableBuilder<SegmentDetection.Builder,SegmentDetection>

@Generated("software.amazon.awssdk:codegen") public final class SegmentDetection extends Object implements SdkPojo, Serializable, ToCopyableBuilder<SegmentDetection.Builder,SegmentDetection>

A technical cue or shot detection segment detected in a video. An array of SegmentDetection objects containing all segments detected in a stored video is returned by GetSegmentDetection.

See Also:
  • Method Details

    • type

      public final SegmentType type()

      The type of the segment. Valid values are TECHNICAL_CUE and SHOT.

      If the service returns an enum value that is not available in the current SDK version, type will return SegmentType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from typeAsString().

      Returns:
      The type of the segment. Valid values are TECHNICAL_CUE and SHOT.
      See Also:
    • typeAsString

      public final String typeAsString()

      The type of the segment. Valid values are TECHNICAL_CUE and SHOT.

      If the service returns an enum value that is not available in the current SDK version, type will return SegmentType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from typeAsString().

      Returns:
      The type of the segment. Valid values are TECHNICAL_CUE and SHOT.
      See Also:
    • startTimestampMillis

      public final Long startTimestampMillis()

      The start time of the detected segment in milliseconds from the start of the video. This value is rounded down. For example, if the actual timestamp is 100.6667 milliseconds, Amazon Rekognition Video returns a value of 100 millis.

      Returns:
      The start time of the detected segment in milliseconds from the start of the video. This value is rounded down. For example, if the actual timestamp is 100.6667 milliseconds, Amazon Rekognition Video returns a value of 100 millis.
    • endTimestampMillis

      public final Long endTimestampMillis()

      The end time of the detected segment, in milliseconds, from the start of the video. This value is rounded down.

      Returns:
      The end time of the detected segment, in milliseconds, from the start of the video. This value is rounded down.
    • durationMillis

      public final Long durationMillis()

      The duration of the detected segment in milliseconds.

      Returns:
      The duration of the detected segment in milliseconds.
    • startTimecodeSMPTE

      public final String startTimecodeSMPTE()

      The frame-accurate SMPTE timecode, from the start of a video, for the start of a detected segment. StartTimecode is in HH:MM:SS:fr format (and ;fr for drop frame-rates).

      Returns:
      The frame-accurate SMPTE timecode, from the start of a video, for the start of a detected segment. StartTimecode is in HH:MM:SS:fr format (and ;fr for drop frame-rates).
    • endTimecodeSMPTE

      public final String endTimecodeSMPTE()

      The frame-accurate SMPTE timecode, from the start of a video, for the end of a detected segment. EndTimecode is in HH:MM:SS:fr format (and ;fr for drop frame-rates).

      Returns:
      The frame-accurate SMPTE timecode, from the start of a video, for the end of a detected segment. EndTimecode is in HH:MM:SS:fr format (and ;fr for drop frame-rates).
    • durationSMPTE

      public final String durationSMPTE()

      The duration of the timecode for the detected segment in SMPTE format.

      Returns:
      The duration of the timecode for the detected segment in SMPTE format.
    • technicalCueSegment

      public final TechnicalCueSegment technicalCueSegment()

      If the segment is a technical cue, contains information about the technical cue.

      Returns:
      If the segment is a technical cue, contains information about the technical cue.
    • shotSegment

      public final ShotSegment shotSegment()

      If the segment is a shot detection, contains information about the shot detection.

      Returns:
      If the segment is a shot detection, contains information about the shot detection.
    • startFrameNumber

      public final Long startFrameNumber()

      The frame number of the start of a video segment, using a frame index that starts with 0.

      Returns:
      The frame number of the start of a video segment, using a frame index that starts with 0.
    • endFrameNumber

      public final Long endFrameNumber()

      The frame number at the end of a video segment, using a frame index that starts with 0.

      Returns:
      The frame number at the end of a video segment, using a frame index that starts with 0.
    • durationFrames

      public final Long durationFrames()

      The duration of a video segment, expressed in frames.

      Returns:
      The duration of a video segment, expressed in frames.
    • toBuilder

      public SegmentDetection.Builder toBuilder()
      Description copied from interface: ToCopyableBuilder
      Take this object and create a builder that contains all of the current property values of this object.
      Specified by:
      toBuilder in interface ToCopyableBuilder<SegmentDetection.Builder,SegmentDetection>
      Returns:
      a builder for type T
    • builder

      public static SegmentDetection.Builder builder()
    • serializableBuilderClass

      public static Class<? extends SegmentDetection.Builder> serializableBuilderClass()
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equalsBySdkFields

      public final boolean equalsBySdkFields(Object obj)
      Description copied from interface: SdkPojo
      Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in an SdkPojo class, and is generated based on a service model.

      If an SdkPojo class does not have any inherited fields, equalsBySdkFields and equals are essentially the same.

      Specified by:
      equalsBySdkFields in interface SdkPojo
      Parameters:
      obj - the object to be compared with
      Returns:
      true if the other object equals to this object by sdk fields, false otherwise.
    • toString

      public final String toString()
      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.
      Overrides:
      toString in class Object
    • getValueForField

      public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
    • sdkFields

      public final List<SdkField<?>> sdkFields()
      Specified by:
      sdkFields in interface SdkPojo
      Returns:
      List of SdkField in this POJO. May be empty list but should never be null.