Class CropHint.Builder

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

    public static final class CropHint.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<CropHint.Builder>
    implements CropHintOrBuilder
     Single crop hint that is used to generate a new crop when serving an image.
     
    Protobuf type google.cloud.vision.v1p1beta1.CropHint
    • 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<CropHint.Builder>
      • clear

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

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

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

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

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

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

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

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

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

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

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

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

        public CropHint.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<CropHint.Builder>
        Throws:
        IOException
      • hasBoundingPoly

        public boolean hasBoundingPoly()
         The bounding polygon for the crop region. The coordinates of the bounding
         box are in the original image's scale, as returned in `ImageParams`.
         
        .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1;
        Specified by:
        hasBoundingPoly in interface CropHintOrBuilder
        Returns:
        Whether the boundingPoly field is set.
      • getBoundingPoly

        public BoundingPoly getBoundingPoly()
         The bounding polygon for the crop region. The coordinates of the bounding
         box are in the original image's scale, as returned in `ImageParams`.
         
        .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1;
        Specified by:
        getBoundingPoly in interface CropHintOrBuilder
        Returns:
        The boundingPoly.
      • setBoundingPoly

        public CropHint.Builder setBoundingPoly​(BoundingPoly value)
         The bounding polygon for the crop region. The coordinates of the bounding
         box are in the original image's scale, as returned in `ImageParams`.
         
        .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1;
      • setBoundingPoly

        public CropHint.Builder setBoundingPoly​(BoundingPoly.Builder builderForValue)
         The bounding polygon for the crop region. The coordinates of the bounding
         box are in the original image's scale, as returned in `ImageParams`.
         
        .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1;
      • mergeBoundingPoly

        public CropHint.Builder mergeBoundingPoly​(BoundingPoly value)
         The bounding polygon for the crop region. The coordinates of the bounding
         box are in the original image's scale, as returned in `ImageParams`.
         
        .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1;
      • clearBoundingPoly

        public CropHint.Builder clearBoundingPoly()
         The bounding polygon for the crop region. The coordinates of the bounding
         box are in the original image's scale, as returned in `ImageParams`.
         
        .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1;
      • getBoundingPolyBuilder

        public BoundingPoly.Builder getBoundingPolyBuilder()
         The bounding polygon for the crop region. The coordinates of the bounding
         box are in the original image's scale, as returned in `ImageParams`.
         
        .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1;
      • getBoundingPolyOrBuilder

        public BoundingPolyOrBuilder getBoundingPolyOrBuilder()
         The bounding polygon for the crop region. The coordinates of the bounding
         box are in the original image's scale, as returned in `ImageParams`.
         
        .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1;
        Specified by:
        getBoundingPolyOrBuilder in interface CropHintOrBuilder
      • getConfidence

        public float getConfidence()
         Confidence of this being a salient region.  Range [0, 1].
         
        float confidence = 2;
        Specified by:
        getConfidence in interface CropHintOrBuilder
        Returns:
        The confidence.
      • setConfidence

        public CropHint.Builder setConfidence​(float value)
         Confidence of this being a salient region.  Range [0, 1].
         
        float confidence = 2;
        Parameters:
        value - The confidence to set.
        Returns:
        This builder for chaining.
      • clearConfidence

        public CropHint.Builder clearConfidence()
         Confidence of this being a salient region.  Range [0, 1].
         
        float confidence = 2;
        Returns:
        This builder for chaining.
      • getImportanceFraction

        public float getImportanceFraction()
         Fraction of importance of this salient region with respect to the original
         image.
         
        float importance_fraction = 3;
        Specified by:
        getImportanceFraction in interface CropHintOrBuilder
        Returns:
        The importanceFraction.
      • setImportanceFraction

        public CropHint.Builder setImportanceFraction​(float value)
         Fraction of importance of this salient region with respect to the original
         image.
         
        float importance_fraction = 3;
        Parameters:
        value - The importanceFraction to set.
        Returns:
        This builder for chaining.
      • clearImportanceFraction

        public CropHint.Builder clearImportanceFraction()
         Fraction of importance of this salient region with respect to the original
         image.
         
        float importance_fraction = 3;
        Returns:
        This builder for chaining.
      • setUnknownFields

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

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