Class CropHint.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<CropHint.Builder>
com.google.cloud.vision.v1.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.GeneratedMessage.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.v1.CropHint
  • 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<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.GeneratedMessage.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.GeneratedMessage.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
    • 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>
    • mergeFrom

      public CropHint.Builder mergeFrom(CropHint other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.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.
       
      .google.cloud.vision.v1.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.
       
      .google.cloud.vision.v1.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.
       
      .google.cloud.vision.v1.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.
       
      .google.cloud.vision.v1.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.
       
      .google.cloud.vision.v1.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.
       
      .google.cloud.vision.v1.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.
       
      .google.cloud.vision.v1.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.
       
      .google.cloud.vision.v1.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.