Class Symbol.Builder

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

    public static final class Symbol.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Symbol.Builder>
    implements SymbolOrBuilder
     A single symbol representation.
     
    Protobuf type google.cloud.vision.v1.Symbol
    • 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<Symbol.Builder>
      • clear

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

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

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

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

        public Symbol.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<Symbol.Builder>
      • setField

        public Symbol.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<Symbol.Builder>
      • clearField

        public Symbol.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<Symbol.Builder>
      • clearOneof

        public Symbol.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<Symbol.Builder>
      • setRepeatedField

        public Symbol.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<Symbol.Builder>
      • addRepeatedField

        public Symbol.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<Symbol.Builder>
      • mergeFrom

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

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

        public Symbol.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<Symbol.Builder>
        Throws:
        IOException
      • hasProperty

        public boolean hasProperty()
         Additional information detected for the symbol.
         
        .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1;
        Specified by:
        hasProperty in interface SymbolOrBuilder
        Returns:
        Whether the property field is set.
      • mergeProperty

        public Symbol.Builder mergeProperty​(TextAnnotation.TextProperty value)
         Additional information detected for the symbol.
         
        .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1;
      • clearProperty

        public Symbol.Builder clearProperty()
         Additional information detected for the symbol.
         
        .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1;
      • getPropertyBuilder

        public TextAnnotation.TextProperty.Builder getPropertyBuilder()
         Additional information detected for the symbol.
         
        .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1;
      • hasBoundingBox

        public boolean hasBoundingBox()
         The bounding box for the symbol.
         The vertices are in the order of top-left, top-right, bottom-right,
         bottom-left. When a rotation of the bounding box is detected the rotation
         is represented as around the top-left corner as defined when the text is
         read in the 'natural' orientation.
         For example:
           * when the text is horizontal it might look like:
              0----1
              |    |
              3----2
           * when it's rotated 180 degrees around the top-left corner it becomes:
              2----3
              |    |
              1----0
           and the vertex order will still be (0, 1, 2, 3).
         
        .google.cloud.vision.v1.BoundingPoly bounding_box = 2;
        Specified by:
        hasBoundingBox in interface SymbolOrBuilder
        Returns:
        Whether the boundingBox field is set.
      • getBoundingBox

        public BoundingPoly getBoundingBox()
         The bounding box for the symbol.
         The vertices are in the order of top-left, top-right, bottom-right,
         bottom-left. When a rotation of the bounding box is detected the rotation
         is represented as around the top-left corner as defined when the text is
         read in the 'natural' orientation.
         For example:
           * when the text is horizontal it might look like:
              0----1
              |    |
              3----2
           * when it's rotated 180 degrees around the top-left corner it becomes:
              2----3
              |    |
              1----0
           and the vertex order will still be (0, 1, 2, 3).
         
        .google.cloud.vision.v1.BoundingPoly bounding_box = 2;
        Specified by:
        getBoundingBox in interface SymbolOrBuilder
        Returns:
        The boundingBox.
      • setBoundingBox

        public Symbol.Builder setBoundingBox​(BoundingPoly value)
         The bounding box for the symbol.
         The vertices are in the order of top-left, top-right, bottom-right,
         bottom-left. When a rotation of the bounding box is detected the rotation
         is represented as around the top-left corner as defined when the text is
         read in the 'natural' orientation.
         For example:
           * when the text is horizontal it might look like:
              0----1
              |    |
              3----2
           * when it's rotated 180 degrees around the top-left corner it becomes:
              2----3
              |    |
              1----0
           and the vertex order will still be (0, 1, 2, 3).
         
        .google.cloud.vision.v1.BoundingPoly bounding_box = 2;
      • setBoundingBox

        public Symbol.Builder setBoundingBox​(BoundingPoly.Builder builderForValue)
         The bounding box for the symbol.
         The vertices are in the order of top-left, top-right, bottom-right,
         bottom-left. When a rotation of the bounding box is detected the rotation
         is represented as around the top-left corner as defined when the text is
         read in the 'natural' orientation.
         For example:
           * when the text is horizontal it might look like:
              0----1
              |    |
              3----2
           * when it's rotated 180 degrees around the top-left corner it becomes:
              2----3
              |    |
              1----0
           and the vertex order will still be (0, 1, 2, 3).
         
        .google.cloud.vision.v1.BoundingPoly bounding_box = 2;
      • mergeBoundingBox

        public Symbol.Builder mergeBoundingBox​(BoundingPoly value)
         The bounding box for the symbol.
         The vertices are in the order of top-left, top-right, bottom-right,
         bottom-left. When a rotation of the bounding box is detected the rotation
         is represented as around the top-left corner as defined when the text is
         read in the 'natural' orientation.
         For example:
           * when the text is horizontal it might look like:
              0----1
              |    |
              3----2
           * when it's rotated 180 degrees around the top-left corner it becomes:
              2----3
              |    |
              1----0
           and the vertex order will still be (0, 1, 2, 3).
         
        .google.cloud.vision.v1.BoundingPoly bounding_box = 2;
      • clearBoundingBox

        public Symbol.Builder clearBoundingBox()
         The bounding box for the symbol.
         The vertices are in the order of top-left, top-right, bottom-right,
         bottom-left. When a rotation of the bounding box is detected the rotation
         is represented as around the top-left corner as defined when the text is
         read in the 'natural' orientation.
         For example:
           * when the text is horizontal it might look like:
              0----1
              |    |
              3----2
           * when it's rotated 180 degrees around the top-left corner it becomes:
              2----3
              |    |
              1----0
           and the vertex order will still be (0, 1, 2, 3).
         
        .google.cloud.vision.v1.BoundingPoly bounding_box = 2;
      • getBoundingBoxBuilder

        public BoundingPoly.Builder getBoundingBoxBuilder()
         The bounding box for the symbol.
         The vertices are in the order of top-left, top-right, bottom-right,
         bottom-left. When a rotation of the bounding box is detected the rotation
         is represented as around the top-left corner as defined when the text is
         read in the 'natural' orientation.
         For example:
           * when the text is horizontal it might look like:
              0----1
              |    |
              3----2
           * when it's rotated 180 degrees around the top-left corner it becomes:
              2----3
              |    |
              1----0
           and the vertex order will still be (0, 1, 2, 3).
         
        .google.cloud.vision.v1.BoundingPoly bounding_box = 2;
      • getBoundingBoxOrBuilder

        public BoundingPolyOrBuilder getBoundingBoxOrBuilder()
         The bounding box for the symbol.
         The vertices are in the order of top-left, top-right, bottom-right,
         bottom-left. When a rotation of the bounding box is detected the rotation
         is represented as around the top-left corner as defined when the text is
         read in the 'natural' orientation.
         For example:
           * when the text is horizontal it might look like:
              0----1
              |    |
              3----2
           * when it's rotated 180 degrees around the top-left corner it becomes:
              2----3
              |    |
              1----0
           and the vertex order will still be (0, 1, 2, 3).
         
        .google.cloud.vision.v1.BoundingPoly bounding_box = 2;
        Specified by:
        getBoundingBoxOrBuilder in interface SymbolOrBuilder
      • getText

        public String getText()
         The actual UTF-8 representation of the symbol.
         
        string text = 3;
        Specified by:
        getText in interface SymbolOrBuilder
        Returns:
        The text.
      • getTextBytes

        public com.google.protobuf.ByteString getTextBytes()
         The actual UTF-8 representation of the symbol.
         
        string text = 3;
        Specified by:
        getTextBytes in interface SymbolOrBuilder
        Returns:
        The bytes for text.
      • setText

        public Symbol.Builder setText​(String value)
         The actual UTF-8 representation of the symbol.
         
        string text = 3;
        Parameters:
        value - The text to set.
        Returns:
        This builder for chaining.
      • clearText

        public Symbol.Builder clearText()
         The actual UTF-8 representation of the symbol.
         
        string text = 3;
        Returns:
        This builder for chaining.
      • setTextBytes

        public Symbol.Builder setTextBytes​(com.google.protobuf.ByteString value)
         The actual UTF-8 representation of the symbol.
         
        string text = 3;
        Parameters:
        value - The bytes for text to set.
        Returns:
        This builder for chaining.
      • getConfidence

        public float getConfidence()
         Confidence of the OCR results for the symbol. Range [0, 1].
         
        float confidence = 4;
        Specified by:
        getConfidence in interface SymbolOrBuilder
        Returns:
        The confidence.
      • setConfidence

        public Symbol.Builder setConfidence​(float value)
         Confidence of the OCR results for the symbol. Range [0, 1].
         
        float confidence = 4;
        Parameters:
        value - The confidence to set.
        Returns:
        This builder for chaining.
      • clearConfidence

        public Symbol.Builder clearConfidence()
         Confidence of the OCR results for the symbol. Range [0, 1].
         
        float confidence = 4;
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final Symbol.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<Symbol.Builder>
      • mergeUnknownFields

        public final Symbol.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<Symbol.Builder>