Class ColorInfo.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<ColorInfo.Builder>
com.google.cloud.vision.v1.ColorInfo.Builder
All Implemented Interfaces:
ColorInfoOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
ColorInfo

public static final class ColorInfo.Builder extends com.google.protobuf.GeneratedMessage.Builder<ColorInfo.Builder> implements ColorInfoOrBuilder
 Color information consists of RGB channels, score, and the fraction of
 the image that the color occupies in the image.
 
Protobuf type google.cloud.vision.v1.ColorInfo
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
     
    RGB components of the color.
    The fraction of pixels the color occupies in the image.
    Image-specific score for this color.
    RGB components of the color.
    RGB components of the color.
    RGB components of the color.
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
    float
    The fraction of pixels the color occupies in the image.
    float
    Image-specific score for this color.
    boolean
    RGB components of the color.
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
    RGB components of the color.
     
    mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    mergeFrom(com.google.protobuf.Message other)
     
    setColor(Color value)
    RGB components of the color.
    setColor(Color.Builder builderForValue)
    RGB components of the color.
    setPixelFraction(float value)
    The fraction of pixels the color occupies in the image.
    setScore(float value)
    Image-specific score for this color.

    Methods inherited from class com.google.protobuf.GeneratedMessage.Builder

    addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3

    Methods inherited from class com.google.protobuf.AbstractMessage.Builder

    findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

    addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.Message.Builder

    mergeDelimitedFrom, mergeDelimitedFrom

    Methods inherited from interface com.google.protobuf.MessageLite.Builder

    mergeFrom

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • 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<ColorInfo.Builder>
    • clear

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

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

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

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

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

      public ColorInfo.Builder mergeFrom(ColorInfo other)
    • isInitialized

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

      public ColorInfo.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<ColorInfo.Builder>
      Throws:
      IOException
    • hasColor

      public boolean hasColor()
       RGB components of the color.
       
      .google.type.Color color = 1;
      Specified by:
      hasColor in interface ColorInfoOrBuilder
      Returns:
      Whether the color field is set.
    • getColor

      public Color getColor()
       RGB components of the color.
       
      .google.type.Color color = 1;
      Specified by:
      getColor in interface ColorInfoOrBuilder
      Returns:
      The color.
    • setColor

      public ColorInfo.Builder setColor(Color value)
       RGB components of the color.
       
      .google.type.Color color = 1;
    • setColor

      public ColorInfo.Builder setColor(Color.Builder builderForValue)
       RGB components of the color.
       
      .google.type.Color color = 1;
    • mergeColor

      public ColorInfo.Builder mergeColor(Color value)
       RGB components of the color.
       
      .google.type.Color color = 1;
    • clearColor

      public ColorInfo.Builder clearColor()
       RGB components of the color.
       
      .google.type.Color color = 1;
    • getColorBuilder

      public Color.Builder getColorBuilder()
       RGB components of the color.
       
      .google.type.Color color = 1;
    • getColorOrBuilder

      public ColorOrBuilder getColorOrBuilder()
       RGB components of the color.
       
      .google.type.Color color = 1;
      Specified by:
      getColorOrBuilder in interface ColorInfoOrBuilder
    • getScore

      public float getScore()
       Image-specific score for this color. Value in range [0, 1].
       
      float score = 2;
      Specified by:
      getScore in interface ColorInfoOrBuilder
      Returns:
      The score.
    • setScore

      public ColorInfo.Builder setScore(float value)
       Image-specific score for this color. Value in range [0, 1].
       
      float score = 2;
      Parameters:
      value - The score to set.
      Returns:
      This builder for chaining.
    • clearScore

      public ColorInfo.Builder clearScore()
       Image-specific score for this color. Value in range [0, 1].
       
      float score = 2;
      Returns:
      This builder for chaining.
    • getPixelFraction

      public float getPixelFraction()
       The fraction of pixels the color occupies in the image.
       Value in range [0, 1].
       
      float pixel_fraction = 3;
      Specified by:
      getPixelFraction in interface ColorInfoOrBuilder
      Returns:
      The pixelFraction.
    • setPixelFraction

      public ColorInfo.Builder setPixelFraction(float value)
       The fraction of pixels the color occupies in the image.
       Value in range [0, 1].
       
      float pixel_fraction = 3;
      Parameters:
      value - The pixelFraction to set.
      Returns:
      This builder for chaining.
    • clearPixelFraction

      public ColorInfo.Builder clearPixelFraction()
       The fraction of pixels the color occupies in the image.
       Value in range [0, 1].
       
      float pixel_fraction = 3;
      Returns:
      This builder for chaining.