Class TextSegment.Builder

  • All Implemented Interfaces:
    TextSegmentOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    TextSegment

    public static final class TextSegment.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<TextSegment.Builder>
    implements TextSegmentOrBuilder
     Video segment level annotation results for text detection.
     
    Protobuf type google.cloud.videointelligence.v1p3beta1.TextSegment
    • Method Detail

      • getDescriptor

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

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

        public TextSegment.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.GeneratedMessageV3.Builder<TextSegment.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.GeneratedMessageV3.Builder<TextSegment.Builder>
      • getDefaultInstanceForType

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

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

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

        public TextSegment.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<TextSegment.Builder>
      • setField

        public TextSegment.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                            Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<TextSegment.Builder>
      • clearField

        public TextSegment.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<TextSegment.Builder>
      • clearOneof

        public TextSegment.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<TextSegment.Builder>
      • setRepeatedField

        public TextSegment.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                    int index,
                                                    Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<TextSegment.Builder>
      • addRepeatedField

        public TextSegment.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                    Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<TextSegment.Builder>
      • mergeFrom

        public TextSegment.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<TextSegment.Builder>
      • isInitialized

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

        public TextSegment.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<TextSegment.Builder>
        Throws:
        IOException
      • hasSegment

        public boolean hasSegment()
         Video segment where a text snippet was detected.
         
        .google.cloud.videointelligence.v1p3beta1.VideoSegment segment = 1;
        Specified by:
        hasSegment in interface TextSegmentOrBuilder
        Returns:
        Whether the segment field is set.
      • getSegment

        public VideoSegment getSegment()
         Video segment where a text snippet was detected.
         
        .google.cloud.videointelligence.v1p3beta1.VideoSegment segment = 1;
        Specified by:
        getSegment in interface TextSegmentOrBuilder
        Returns:
        The segment.
      • setSegment

        public TextSegment.Builder setSegment​(VideoSegment value)
         Video segment where a text snippet was detected.
         
        .google.cloud.videointelligence.v1p3beta1.VideoSegment segment = 1;
      • setSegment

        public TextSegment.Builder setSegment​(VideoSegment.Builder builderForValue)
         Video segment where a text snippet was detected.
         
        .google.cloud.videointelligence.v1p3beta1.VideoSegment segment = 1;
      • mergeSegment

        public TextSegment.Builder mergeSegment​(VideoSegment value)
         Video segment where a text snippet was detected.
         
        .google.cloud.videointelligence.v1p3beta1.VideoSegment segment = 1;
      • clearSegment

        public TextSegment.Builder clearSegment()
         Video segment where a text snippet was detected.
         
        .google.cloud.videointelligence.v1p3beta1.VideoSegment segment = 1;
      • getSegmentBuilder

        public VideoSegment.Builder getSegmentBuilder()
         Video segment where a text snippet was detected.
         
        .google.cloud.videointelligence.v1p3beta1.VideoSegment segment = 1;
      • getConfidence

        public float getConfidence()
         Confidence for the track of detected text. It is calculated as the highest
         over all frames where OCR detected text appears.
         
        float confidence = 2;
        Specified by:
        getConfidence in interface TextSegmentOrBuilder
        Returns:
        The confidence.
      • setConfidence

        public TextSegment.Builder setConfidence​(float value)
         Confidence for the track of detected text. It is calculated as the highest
         over all frames where OCR detected text appears.
         
        float confidence = 2;
        Parameters:
        value - The confidence to set.
        Returns:
        This builder for chaining.
      • clearConfidence

        public TextSegment.Builder clearConfidence()
         Confidence for the track of detected text. It is calculated as the highest
         over all frames where OCR detected text appears.
         
        float confidence = 2;
        Returns:
        This builder for chaining.
      • getFramesList

        public List<TextFrame> getFramesList()
         Information related to the frames where OCR detected text appears.
         
        repeated .google.cloud.videointelligence.v1p3beta1.TextFrame frames = 3;
        Specified by:
        getFramesList in interface TextSegmentOrBuilder
      • getFramesCount

        public int getFramesCount()
         Information related to the frames where OCR detected text appears.
         
        repeated .google.cloud.videointelligence.v1p3beta1.TextFrame frames = 3;
        Specified by:
        getFramesCount in interface TextSegmentOrBuilder
      • getFrames

        public TextFrame getFrames​(int index)
         Information related to the frames where OCR detected text appears.
         
        repeated .google.cloud.videointelligence.v1p3beta1.TextFrame frames = 3;
        Specified by:
        getFrames in interface TextSegmentOrBuilder
      • setFrames

        public TextSegment.Builder setFrames​(int index,
                                             TextFrame value)
         Information related to the frames where OCR detected text appears.
         
        repeated .google.cloud.videointelligence.v1p3beta1.TextFrame frames = 3;
      • setFrames

        public TextSegment.Builder setFrames​(int index,
                                             TextFrame.Builder builderForValue)
         Information related to the frames where OCR detected text appears.
         
        repeated .google.cloud.videointelligence.v1p3beta1.TextFrame frames = 3;
      • addFrames

        public TextSegment.Builder addFrames​(TextFrame value)
         Information related to the frames where OCR detected text appears.
         
        repeated .google.cloud.videointelligence.v1p3beta1.TextFrame frames = 3;
      • addFrames

        public TextSegment.Builder addFrames​(int index,
                                             TextFrame value)
         Information related to the frames where OCR detected text appears.
         
        repeated .google.cloud.videointelligence.v1p3beta1.TextFrame frames = 3;
      • addFrames

        public TextSegment.Builder addFrames​(TextFrame.Builder builderForValue)
         Information related to the frames where OCR detected text appears.
         
        repeated .google.cloud.videointelligence.v1p3beta1.TextFrame frames = 3;
      • addFrames

        public TextSegment.Builder addFrames​(int index,
                                             TextFrame.Builder builderForValue)
         Information related to the frames where OCR detected text appears.
         
        repeated .google.cloud.videointelligence.v1p3beta1.TextFrame frames = 3;
      • addAllFrames

        public TextSegment.Builder addAllFrames​(Iterable<? extends TextFrame> values)
         Information related to the frames where OCR detected text appears.
         
        repeated .google.cloud.videointelligence.v1p3beta1.TextFrame frames = 3;
      • clearFrames

        public TextSegment.Builder clearFrames()
         Information related to the frames where OCR detected text appears.
         
        repeated .google.cloud.videointelligence.v1p3beta1.TextFrame frames = 3;
      • removeFrames

        public TextSegment.Builder removeFrames​(int index)
         Information related to the frames where OCR detected text appears.
         
        repeated .google.cloud.videointelligence.v1p3beta1.TextFrame frames = 3;
      • getFramesBuilder

        public TextFrame.Builder getFramesBuilder​(int index)
         Information related to the frames where OCR detected text appears.
         
        repeated .google.cloud.videointelligence.v1p3beta1.TextFrame frames = 3;
      • getFramesOrBuilder

        public TextFrameOrBuilder getFramesOrBuilder​(int index)
         Information related to the frames where OCR detected text appears.
         
        repeated .google.cloud.videointelligence.v1p3beta1.TextFrame frames = 3;
        Specified by:
        getFramesOrBuilder in interface TextSegmentOrBuilder
      • addFramesBuilder

        public TextFrame.Builder addFramesBuilder()
         Information related to the frames where OCR detected text appears.
         
        repeated .google.cloud.videointelligence.v1p3beta1.TextFrame frames = 3;
      • addFramesBuilder

        public TextFrame.Builder addFramesBuilder​(int index)
         Information related to the frames where OCR detected text appears.
         
        repeated .google.cloud.videointelligence.v1p3beta1.TextFrame frames = 3;
      • getFramesBuilderList

        public List<TextFrame.Builder> getFramesBuilderList()
         Information related to the frames where OCR detected text appears.
         
        repeated .google.cloud.videointelligence.v1p3beta1.TextFrame frames = 3;
      • setUnknownFields

        public final TextSegment.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<TextSegment.Builder>
      • mergeUnknownFields

        public final TextSegment.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<TextSegment.Builder>