Class VideoObjectTrackingAnnotation.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<VideoObjectTrackingAnnotation.Builder>
com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.Builder
All Implemented Interfaces:
VideoObjectTrackingAnnotationOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
VideoObjectTrackingAnnotation

public static final class VideoObjectTrackingAnnotation.Builder extends com.google.protobuf.GeneratedMessage.Builder<VideoObjectTrackingAnnotation.Builder> implements VideoObjectTrackingAnnotationOrBuilder
 Annotation details for video object tracking.
 
Protobuf type google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<VideoObjectTrackingAnnotation.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<VideoObjectTrackingAnnotation.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<VideoObjectTrackingAnnotation.Builder>
    • getDefaultInstanceForType

      public VideoObjectTrackingAnnotation getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public VideoObjectTrackingAnnotation buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public VideoObjectTrackingAnnotation.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<VideoObjectTrackingAnnotation.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<VideoObjectTrackingAnnotation.Builder>
    • mergeFrom

      public VideoObjectTrackingAnnotation.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<VideoObjectTrackingAnnotation.Builder>
      Throws:
      IOException
    • getInstanceId

      public String getInstanceId()
       Optional. The instance of the object, expressed as a positive integer. Used to tell
       apart objects of the same type (i.e. AnnotationSpec) when multiple are
       present on a single example.
       NOTE: Instance ID prediction quality is not a part of model evaluation and
       is done as best effort. Especially in cases when an entity goes
       off-screen for a longer time (minutes), when it comes back it may be given
       a new instance ID.
       
      string instance_id = 1;
      Specified by:
      getInstanceId in interface VideoObjectTrackingAnnotationOrBuilder
      Returns:
      The instanceId.
    • getInstanceIdBytes

      public com.google.protobuf.ByteString getInstanceIdBytes()
       Optional. The instance of the object, expressed as a positive integer. Used to tell
       apart objects of the same type (i.e. AnnotationSpec) when multiple are
       present on a single example.
       NOTE: Instance ID prediction quality is not a part of model evaluation and
       is done as best effort. Especially in cases when an entity goes
       off-screen for a longer time (minutes), when it comes back it may be given
       a new instance ID.
       
      string instance_id = 1;
      Specified by:
      getInstanceIdBytes in interface VideoObjectTrackingAnnotationOrBuilder
      Returns:
      The bytes for instanceId.
    • setInstanceId

      public VideoObjectTrackingAnnotation.Builder setInstanceId(String value)
       Optional. The instance of the object, expressed as a positive integer. Used to tell
       apart objects of the same type (i.e. AnnotationSpec) when multiple are
       present on a single example.
       NOTE: Instance ID prediction quality is not a part of model evaluation and
       is done as best effort. Especially in cases when an entity goes
       off-screen for a longer time (minutes), when it comes back it may be given
       a new instance ID.
       
      string instance_id = 1;
      Parameters:
      value - The instanceId to set.
      Returns:
      This builder for chaining.
    • clearInstanceId

      public VideoObjectTrackingAnnotation.Builder clearInstanceId()
       Optional. The instance of the object, expressed as a positive integer. Used to tell
       apart objects of the same type (i.e. AnnotationSpec) when multiple are
       present on a single example.
       NOTE: Instance ID prediction quality is not a part of model evaluation and
       is done as best effort. Especially in cases when an entity goes
       off-screen for a longer time (minutes), when it comes back it may be given
       a new instance ID.
       
      string instance_id = 1;
      Returns:
      This builder for chaining.
    • setInstanceIdBytes

      public VideoObjectTrackingAnnotation.Builder setInstanceIdBytes(com.google.protobuf.ByteString value)
       Optional. The instance of the object, expressed as a positive integer. Used to tell
       apart objects of the same type (i.e. AnnotationSpec) when multiple are
       present on a single example.
       NOTE: Instance ID prediction quality is not a part of model evaluation and
       is done as best effort. Especially in cases when an entity goes
       off-screen for a longer time (minutes), when it comes back it may be given
       a new instance ID.
       
      string instance_id = 1;
      Parameters:
      value - The bytes for instanceId to set.
      Returns:
      This builder for chaining.
    • hasTimeOffset

      public boolean hasTimeOffset()
       Required. A time (frame) of a video to which this annotation pertains.
       Represented as the duration since the video's start.
       
      .google.protobuf.Duration time_offset = 2;
      Specified by:
      hasTimeOffset in interface VideoObjectTrackingAnnotationOrBuilder
      Returns:
      Whether the timeOffset field is set.
    • getTimeOffset

      public com.google.protobuf.Duration getTimeOffset()
       Required. A time (frame) of a video to which this annotation pertains.
       Represented as the duration since the video's start.
       
      .google.protobuf.Duration time_offset = 2;
      Specified by:
      getTimeOffset in interface VideoObjectTrackingAnnotationOrBuilder
      Returns:
      The timeOffset.
    • setTimeOffset

      public VideoObjectTrackingAnnotation.Builder setTimeOffset(com.google.protobuf.Duration value)
       Required. A time (frame) of a video to which this annotation pertains.
       Represented as the duration since the video's start.
       
      .google.protobuf.Duration time_offset = 2;
    • setTimeOffset

      public VideoObjectTrackingAnnotation.Builder setTimeOffset(com.google.protobuf.Duration.Builder builderForValue)
       Required. A time (frame) of a video to which this annotation pertains.
       Represented as the duration since the video's start.
       
      .google.protobuf.Duration time_offset = 2;
    • mergeTimeOffset

      public VideoObjectTrackingAnnotation.Builder mergeTimeOffset(com.google.protobuf.Duration value)
       Required. A time (frame) of a video to which this annotation pertains.
       Represented as the duration since the video's start.
       
      .google.protobuf.Duration time_offset = 2;
    • clearTimeOffset

      public VideoObjectTrackingAnnotation.Builder clearTimeOffset()
       Required. A time (frame) of a video to which this annotation pertains.
       Represented as the duration since the video's start.
       
      .google.protobuf.Duration time_offset = 2;
    • getTimeOffsetBuilder

      public com.google.protobuf.Duration.Builder getTimeOffsetBuilder()
       Required. A time (frame) of a video to which this annotation pertains.
       Represented as the duration since the video's start.
       
      .google.protobuf.Duration time_offset = 2;
    • getTimeOffsetOrBuilder

      public com.google.protobuf.DurationOrBuilder getTimeOffsetOrBuilder()
       Required. A time (frame) of a video to which this annotation pertains.
       Represented as the duration since the video's start.
       
      .google.protobuf.Duration time_offset = 2;
      Specified by:
      getTimeOffsetOrBuilder in interface VideoObjectTrackingAnnotationOrBuilder
    • hasBoundingBox

      public boolean hasBoundingBox()
       Required. The rectangle representing the object location on the frame (i.e.
       at the time_offset of the video).
       
      .google.cloud.automl.v1beta1.BoundingPoly bounding_box = 3;
      Specified by:
      hasBoundingBox in interface VideoObjectTrackingAnnotationOrBuilder
      Returns:
      Whether the boundingBox field is set.
    • getBoundingBox

      public BoundingPoly getBoundingBox()
       Required. The rectangle representing the object location on the frame (i.e.
       at the time_offset of the video).
       
      .google.cloud.automl.v1beta1.BoundingPoly bounding_box = 3;
      Specified by:
      getBoundingBox in interface VideoObjectTrackingAnnotationOrBuilder
      Returns:
      The boundingBox.
    • setBoundingBox

      public VideoObjectTrackingAnnotation.Builder setBoundingBox(BoundingPoly value)
       Required. The rectangle representing the object location on the frame (i.e.
       at the time_offset of the video).
       
      .google.cloud.automl.v1beta1.BoundingPoly bounding_box = 3;
    • setBoundingBox

      public VideoObjectTrackingAnnotation.Builder setBoundingBox(BoundingPoly.Builder builderForValue)
       Required. The rectangle representing the object location on the frame (i.e.
       at the time_offset of the video).
       
      .google.cloud.automl.v1beta1.BoundingPoly bounding_box = 3;
    • mergeBoundingBox

      public VideoObjectTrackingAnnotation.Builder mergeBoundingBox(BoundingPoly value)
       Required. The rectangle representing the object location on the frame (i.e.
       at the time_offset of the video).
       
      .google.cloud.automl.v1beta1.BoundingPoly bounding_box = 3;
    • clearBoundingBox

      public VideoObjectTrackingAnnotation.Builder clearBoundingBox()
       Required. The rectangle representing the object location on the frame (i.e.
       at the time_offset of the video).
       
      .google.cloud.automl.v1beta1.BoundingPoly bounding_box = 3;
    • getBoundingBoxBuilder

      public BoundingPoly.Builder getBoundingBoxBuilder()
       Required. The rectangle representing the object location on the frame (i.e.
       at the time_offset of the video).
       
      .google.cloud.automl.v1beta1.BoundingPoly bounding_box = 3;
    • getBoundingBoxOrBuilder

      public BoundingPolyOrBuilder getBoundingBoxOrBuilder()
       Required. The rectangle representing the object location on the frame (i.e.
       at the time_offset of the video).
       
      .google.cloud.automl.v1beta1.BoundingPoly bounding_box = 3;
      Specified by:
      getBoundingBoxOrBuilder in interface VideoObjectTrackingAnnotationOrBuilder
    • getScore

      public float getScore()
       Output only. The confidence that this annotation is positive for the video at
       the time_offset, value in [0, 1], higher means higher positivity
       confidence. For annotations created by the user the score is 1. When
       user approves an annotation, the original float score is kept (and not
       changed to 1).
       
      float score = 4;
      Specified by:
      getScore in interface VideoObjectTrackingAnnotationOrBuilder
      Returns:
      The score.
    • setScore

      public VideoObjectTrackingAnnotation.Builder setScore(float value)
       Output only. The confidence that this annotation is positive for the video at
       the time_offset, value in [0, 1], higher means higher positivity
       confidence. For annotations created by the user the score is 1. When
       user approves an annotation, the original float score is kept (and not
       changed to 1).
       
      float score = 4;
      Parameters:
      value - The score to set.
      Returns:
      This builder for chaining.
    • clearScore

       Output only. The confidence that this annotation is positive for the video at
       the time_offset, value in [0, 1], higher means higher positivity
       confidence. For annotations created by the user the score is 1. When
       user approves an annotation, the original float score is kept (and not
       changed to 1).
       
      float score = 4;
      Returns:
      This builder for chaining.