Class PredictRequest.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<PredictRequest.Builder>
com.google.cloud.automl.v1beta1.PredictRequest.Builder
All Implemented Interfaces:
PredictRequestOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
PredictRequest

public static final class PredictRequest.Builder extends com.google.protobuf.GeneratedMessage.Builder<PredictRequest.Builder> implements PredictRequestOrBuilder
 Request message for [PredictionService.Predict][google.cloud.automl.v1beta1.PredictionService.Predict].
 
Protobuf type google.cloud.automl.v1beta1.PredictRequest
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<PredictRequest.Builder>
    • internalGetMutableMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
      Overrides:
      internalGetMutableMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<PredictRequest.Builder>
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<PredictRequest.Builder>
    • clear

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

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

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

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

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

      public PredictRequest.Builder mergeFrom(PredictRequest other)
    • isInitialized

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

      public PredictRequest.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<PredictRequest.Builder>
      Throws:
      IOException
    • getName

      public String getName()
       Required. Name of the model requested to serve the prediction.
       
      string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Specified by:
      getName in interface PredictRequestOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Required. Name of the model requested to serve the prediction.
       
      string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Specified by:
      getNameBytes in interface PredictRequestOrBuilder
      Returns:
      The bytes for name.
    • setName

      public PredictRequest.Builder setName(String value)
       Required. Name of the model requested to serve the prediction.
       
      string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public PredictRequest.Builder clearName()
       Required. Name of the model requested to serve the prediction.
       
      string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Returns:
      This builder for chaining.
    • setNameBytes

      public PredictRequest.Builder setNameBytes(com.google.protobuf.ByteString value)
       Required. Name of the model requested to serve the prediction.
       
      string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • hasPayload

      public boolean hasPayload()
       Required. Payload to perform a prediction on. The payload must match the
       problem type that the model was trained to solve.
       
      .google.cloud.automl.v1beta1.ExamplePayload payload = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      hasPayload in interface PredictRequestOrBuilder
      Returns:
      Whether the payload field is set.
    • getPayload

      public ExamplePayload getPayload()
       Required. Payload to perform a prediction on. The payload must match the
       problem type that the model was trained to solve.
       
      .google.cloud.automl.v1beta1.ExamplePayload payload = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getPayload in interface PredictRequestOrBuilder
      Returns:
      The payload.
    • setPayload

      public PredictRequest.Builder setPayload(ExamplePayload value)
       Required. Payload to perform a prediction on. The payload must match the
       problem type that the model was trained to solve.
       
      .google.cloud.automl.v1beta1.ExamplePayload payload = 2 [(.google.api.field_behavior) = REQUIRED];
    • setPayload

      public PredictRequest.Builder setPayload(ExamplePayload.Builder builderForValue)
       Required. Payload to perform a prediction on. The payload must match the
       problem type that the model was trained to solve.
       
      .google.cloud.automl.v1beta1.ExamplePayload payload = 2 [(.google.api.field_behavior) = REQUIRED];
    • mergePayload

      public PredictRequest.Builder mergePayload(ExamplePayload value)
       Required. Payload to perform a prediction on. The payload must match the
       problem type that the model was trained to solve.
       
      .google.cloud.automl.v1beta1.ExamplePayload payload = 2 [(.google.api.field_behavior) = REQUIRED];
    • clearPayload

      public PredictRequest.Builder clearPayload()
       Required. Payload to perform a prediction on. The payload must match the
       problem type that the model was trained to solve.
       
      .google.cloud.automl.v1beta1.ExamplePayload payload = 2 [(.google.api.field_behavior) = REQUIRED];
    • getPayloadBuilder

      public ExamplePayload.Builder getPayloadBuilder()
       Required. Payload to perform a prediction on. The payload must match the
       problem type that the model was trained to solve.
       
      .google.cloud.automl.v1beta1.ExamplePayload payload = 2 [(.google.api.field_behavior) = REQUIRED];
    • getPayloadOrBuilder

      public ExamplePayloadOrBuilder getPayloadOrBuilder()
       Required. Payload to perform a prediction on. The payload must match the
       problem type that the model was trained to solve.
       
      .google.cloud.automl.v1beta1.ExamplePayload payload = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getPayloadOrBuilder in interface PredictRequestOrBuilder
    • getParamsCount

      public int getParamsCount()
      Description copied from interface: PredictRequestOrBuilder
       Additional domain-specific parameters, any string must be up to 25000
       characters long.
      
       *  For Image Classification:
      
       `score_threshold` - (float) A value from 0.0 to 1.0. When the model
       makes predictions for an image, it will only produce results that have
       at least this confidence score. The default is 0.5.
      
       *  For Image Object Detection:
       `score_threshold` - (float) When Model detects objects on the image,
       it will only produce bounding boxes which have at least this
       confidence score. Value in 0 to 1 range, default is 0.5.
       `max_bounding_box_count` - (int64) No more than this number of bounding
       boxes will be returned in the response. Default is 100, the
       requested value may be limited by server.
       *  For Tables:
       feature_imp<span>ortan</span>ce - (boolean) Whether feature importance
       should be populated in the returned TablesAnnotation.
       The default is false.
       
      map<string, string> params = 3;
      Specified by:
      getParamsCount in interface PredictRequestOrBuilder
    • containsParams

      public boolean containsParams(String key)
       Additional domain-specific parameters, any string must be up to 25000
       characters long.
      
       *  For Image Classification:
      
       `score_threshold` - (float) A value from 0.0 to 1.0. When the model
       makes predictions for an image, it will only produce results that have
       at least this confidence score. The default is 0.5.
      
       *  For Image Object Detection:
       `score_threshold` - (float) When Model detects objects on the image,
       it will only produce bounding boxes which have at least this
       confidence score. Value in 0 to 1 range, default is 0.5.
       `max_bounding_box_count` - (int64) No more than this number of bounding
       boxes will be returned in the response. Default is 100, the
       requested value may be limited by server.
       *  For Tables:
       feature_imp<span>ortan</span>ce - (boolean) Whether feature importance
       should be populated in the returned TablesAnnotation.
       The default is false.
       
      map<string, string> params = 3;
      Specified by:
      containsParams in interface PredictRequestOrBuilder
    • getParams

      @Deprecated public Map<String,String> getParams()
      Deprecated.
      Use getParamsMap() instead.
      Specified by:
      getParams in interface PredictRequestOrBuilder
    • getParamsMap

      public Map<String,String> getParamsMap()
       Additional domain-specific parameters, any string must be up to 25000
       characters long.
      
       *  For Image Classification:
      
       `score_threshold` - (float) A value from 0.0 to 1.0. When the model
       makes predictions for an image, it will only produce results that have
       at least this confidence score. The default is 0.5.
      
       *  For Image Object Detection:
       `score_threshold` - (float) When Model detects objects on the image,
       it will only produce bounding boxes which have at least this
       confidence score. Value in 0 to 1 range, default is 0.5.
       `max_bounding_box_count` - (int64) No more than this number of bounding
       boxes will be returned in the response. Default is 100, the
       requested value may be limited by server.
       *  For Tables:
       feature_imp<span>ortan</span>ce - (boolean) Whether feature importance
       should be populated in the returned TablesAnnotation.
       The default is false.
       
      map<string, string> params = 3;
      Specified by:
      getParamsMap in interface PredictRequestOrBuilder
    • getParamsOrDefault

      public String getParamsOrDefault(String key, String defaultValue)
       Additional domain-specific parameters, any string must be up to 25000
       characters long.
      
       *  For Image Classification:
      
       `score_threshold` - (float) A value from 0.0 to 1.0. When the model
       makes predictions for an image, it will only produce results that have
       at least this confidence score. The default is 0.5.
      
       *  For Image Object Detection:
       `score_threshold` - (float) When Model detects objects on the image,
       it will only produce bounding boxes which have at least this
       confidence score. Value in 0 to 1 range, default is 0.5.
       `max_bounding_box_count` - (int64) No more than this number of bounding
       boxes will be returned in the response. Default is 100, the
       requested value may be limited by server.
       *  For Tables:
       feature_imp<span>ortan</span>ce - (boolean) Whether feature importance
       should be populated in the returned TablesAnnotation.
       The default is false.
       
      map<string, string> params = 3;
      Specified by:
      getParamsOrDefault in interface PredictRequestOrBuilder
    • getParamsOrThrow

      public String getParamsOrThrow(String key)
       Additional domain-specific parameters, any string must be up to 25000
       characters long.
      
       *  For Image Classification:
      
       `score_threshold` - (float) A value from 0.0 to 1.0. When the model
       makes predictions for an image, it will only produce results that have
       at least this confidence score. The default is 0.5.
      
       *  For Image Object Detection:
       `score_threshold` - (float) When Model detects objects on the image,
       it will only produce bounding boxes which have at least this
       confidence score. Value in 0 to 1 range, default is 0.5.
       `max_bounding_box_count` - (int64) No more than this number of bounding
       boxes will be returned in the response. Default is 100, the
       requested value may be limited by server.
       *  For Tables:
       feature_imp<span>ortan</span>ce - (boolean) Whether feature importance
       should be populated in the returned TablesAnnotation.
       The default is false.
       
      map<string, string> params = 3;
      Specified by:
      getParamsOrThrow in interface PredictRequestOrBuilder
    • clearParams

      public PredictRequest.Builder clearParams()
    • removeParams

      public PredictRequest.Builder removeParams(String key)
       Additional domain-specific parameters, any string must be up to 25000
       characters long.
      
       *  For Image Classification:
      
       `score_threshold` - (float) A value from 0.0 to 1.0. When the model
       makes predictions for an image, it will only produce results that have
       at least this confidence score. The default is 0.5.
      
       *  For Image Object Detection:
       `score_threshold` - (float) When Model detects objects on the image,
       it will only produce bounding boxes which have at least this
       confidence score. Value in 0 to 1 range, default is 0.5.
       `max_bounding_box_count` - (int64) No more than this number of bounding
       boxes will be returned in the response. Default is 100, the
       requested value may be limited by server.
       *  For Tables:
       feature_imp<span>ortan</span>ce - (boolean) Whether feature importance
       should be populated in the returned TablesAnnotation.
       The default is false.
       
      map<string, string> params = 3;
    • getMutableParams

      @Deprecated public Map<String,String> getMutableParams()
      Deprecated.
      Use alternate mutation accessors instead.
    • putParams

      public PredictRequest.Builder putParams(String key, String value)
       Additional domain-specific parameters, any string must be up to 25000
       characters long.
      
       *  For Image Classification:
      
       `score_threshold` - (float) A value from 0.0 to 1.0. When the model
       makes predictions for an image, it will only produce results that have
       at least this confidence score. The default is 0.5.
      
       *  For Image Object Detection:
       `score_threshold` - (float) When Model detects objects on the image,
       it will only produce bounding boxes which have at least this
       confidence score. Value in 0 to 1 range, default is 0.5.
       `max_bounding_box_count` - (int64) No more than this number of bounding
       boxes will be returned in the response. Default is 100, the
       requested value may be limited by server.
       *  For Tables:
       feature_imp<span>ortan</span>ce - (boolean) Whether feature importance
       should be populated in the returned TablesAnnotation.
       The default is false.
       
      map<string, string> params = 3;
    • putAllParams

      public PredictRequest.Builder putAllParams(Map<String,String> values)
       Additional domain-specific parameters, any string must be up to 25000
       characters long.
      
       *  For Image Classification:
      
       `score_threshold` - (float) A value from 0.0 to 1.0. When the model
       makes predictions for an image, it will only produce results that have
       at least this confidence score. The default is 0.5.
      
       *  For Image Object Detection:
       `score_threshold` - (float) When Model detects objects on the image,
       it will only produce bounding boxes which have at least this
       confidence score. Value in 0 to 1 range, default is 0.5.
       `max_bounding_box_count` - (int64) No more than this number of bounding
       boxes will be returned in the response. Default is 100, the
       requested value may be limited by server.
       *  For Tables:
       feature_imp<span>ortan</span>ce - (boolean) Whether feature importance
       should be populated in the returned TablesAnnotation.
       The default is false.
       
      map<string, string> params = 3;