Class Feature.Builder

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

public static final class Feature.Builder extends com.google.protobuf.GeneratedMessage.Builder<Feature.Builder> implements FeatureOrBuilder
 The type of Google Cloud Vision API detection to perform, and the maximum
 number of results to return for that type. Multiple `Feature` objects can
 be specified in the `features` list.
 
Protobuf type google.cloud.vision.v1.Feature
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
     
    Maximum number of results of this type.
    Model to use for the feature.
    The feature type.
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
    int
    Maximum number of results of this type.
    Model to use for the feature.
    com.google.protobuf.ByteString
    Model to use for the feature.
    The feature type.
    int
    The feature type.
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
     
    mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    mergeFrom(com.google.protobuf.Message other)
     
    setMaxResults(int value)
    Maximum number of results of this type.
    Model to use for the feature.
    setModelBytes(com.google.protobuf.ByteString value)
    Model to use for the feature.
    The feature type.
    setTypeValue(int value)
    The feature type.

    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<Feature.Builder>
    • clear

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

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

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

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

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

      public Feature.Builder mergeFrom(Feature other)
    • isInitialized

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

      public Feature.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<Feature.Builder>
      Throws:
      IOException
    • getTypeValue

      public int getTypeValue()
       The feature type.
       
      .google.cloud.vision.v1.Feature.Type type = 1;
      Specified by:
      getTypeValue in interface FeatureOrBuilder
      Returns:
      The enum numeric value on the wire for type.
    • setTypeValue

      public Feature.Builder setTypeValue(int value)
       The feature type.
       
      .google.cloud.vision.v1.Feature.Type type = 1;
      Parameters:
      value - The enum numeric value on the wire for type to set.
      Returns:
      This builder for chaining.
    • getType

      public Feature.Type getType()
       The feature type.
       
      .google.cloud.vision.v1.Feature.Type type = 1;
      Specified by:
      getType in interface FeatureOrBuilder
      Returns:
      The type.
    • setType

      public Feature.Builder setType(Feature.Type value)
       The feature type.
       
      .google.cloud.vision.v1.Feature.Type type = 1;
      Parameters:
      value - The type to set.
      Returns:
      This builder for chaining.
    • clearType

      public Feature.Builder clearType()
       The feature type.
       
      .google.cloud.vision.v1.Feature.Type type = 1;
      Returns:
      This builder for chaining.
    • getMaxResults

      public int getMaxResults()
       Maximum number of results of this type. Does not apply to
       `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
       
      int32 max_results = 2;
      Specified by:
      getMaxResults in interface FeatureOrBuilder
      Returns:
      The maxResults.
    • setMaxResults

      public Feature.Builder setMaxResults(int value)
       Maximum number of results of this type. Does not apply to
       `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
       
      int32 max_results = 2;
      Parameters:
      value - The maxResults to set.
      Returns:
      This builder for chaining.
    • clearMaxResults

      public Feature.Builder clearMaxResults()
       Maximum number of results of this type. Does not apply to
       `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
       
      int32 max_results = 2;
      Returns:
      This builder for chaining.
    • getModel

      public String getModel()
       Model to use for the feature.
       Supported values: "builtin/stable" (the default if unset) and
       "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
       support "builtin/weekly" for the bleeding edge release updated weekly.
       
      string model = 3;
      Specified by:
      getModel in interface FeatureOrBuilder
      Returns:
      The model.
    • getModelBytes

      public com.google.protobuf.ByteString getModelBytes()
       Model to use for the feature.
       Supported values: "builtin/stable" (the default if unset) and
       "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
       support "builtin/weekly" for the bleeding edge release updated weekly.
       
      string model = 3;
      Specified by:
      getModelBytes in interface FeatureOrBuilder
      Returns:
      The bytes for model.
    • setModel

      public Feature.Builder setModel(String value)
       Model to use for the feature.
       Supported values: "builtin/stable" (the default if unset) and
       "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
       support "builtin/weekly" for the bleeding edge release updated weekly.
       
      string model = 3;
      Parameters:
      value - The model to set.
      Returns:
      This builder for chaining.
    • clearModel

      public Feature.Builder clearModel()
       Model to use for the feature.
       Supported values: "builtin/stable" (the default if unset) and
       "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
       support "builtin/weekly" for the bleeding edge release updated weekly.
       
      string model = 3;
      Returns:
      This builder for chaining.
    • setModelBytes

      public Feature.Builder setModelBytes(com.google.protobuf.ByteString value)
       Model to use for the feature.
       Supported values: "builtin/stable" (the default if unset) and
       "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
       support "builtin/weekly" for the bleeding edge release updated weekly.
       
      string model = 3;
      Parameters:
      value - The bytes for model to set.
      Returns:
      This builder for chaining.