Class 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.GeneratedMessageV3.Builder<PredictRequest.Builder>
    implements PredictRequestOrBuilder
     Request message for [PredictionService.Predict][google.cloud.automl.v1.PredictionService.Predict].
     
    Protobuf type google.cloud.automl.v1.PredictRequest
    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3.Builder<PredictRequest.Builder>
      • internalGetMutableMapField

        protected com.google.protobuf.MapField internalGetMutableMapField​(int number)
        Overrides:
        internalGetMutableMapField in class com.google.protobuf.GeneratedMessageV3.Builder<PredictRequest.Builder>
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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
      • clone

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

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

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

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

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

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

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.
        
         AutoML Vision 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.
        
         AutoML Vision 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) The maximum number of bounding
           boxes returned. The default is 100. The
           number of returned bounding boxes might be limited by the server.
        
         AutoML Tables
        
         `feature_importance`
         : (boolean) Whether
         [feature_importance][google.cloud.automl.v1.TablesModelColumnInfo.feature_importance]
           is populated in the returned list of
           [TablesAnnotation][google.cloud.automl.v1.TablesAnnotation]
           objects. 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.
        
         AutoML Vision 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.
        
         AutoML Vision 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) The maximum number of bounding
           boxes returned. The default is 100. The
           number of returned bounding boxes might be limited by the server.
        
         AutoML Tables
        
         `feature_importance`
         : (boolean) Whether
         [feature_importance][google.cloud.automl.v1.TablesModelColumnInfo.feature_importance]
           is populated in the returned list of
           [TablesAnnotation][google.cloud.automl.v1.TablesAnnotation]
           objects. The default is false.
         
        map<string, string> params = 3;
        Specified by:
        containsParams in interface PredictRequestOrBuilder
      • getParamsMap

        public Map<String,​String> getParamsMap()
         Additional domain-specific parameters, any string must be up to 25000
         characters long.
        
         AutoML Vision 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.
        
         AutoML Vision 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) The maximum number of bounding
           boxes returned. The default is 100. The
           number of returned bounding boxes might be limited by the server.
        
         AutoML Tables
        
         `feature_importance`
         : (boolean) Whether
         [feature_importance][google.cloud.automl.v1.TablesModelColumnInfo.feature_importance]
           is populated in the returned list of
           [TablesAnnotation][google.cloud.automl.v1.TablesAnnotation]
           objects. 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.
        
         AutoML Vision 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.
        
         AutoML Vision 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) The maximum number of bounding
           boxes returned. The default is 100. The
           number of returned bounding boxes might be limited by the server.
        
         AutoML Tables
        
         `feature_importance`
         : (boolean) Whether
         [feature_importance][google.cloud.automl.v1.TablesModelColumnInfo.feature_importance]
           is populated in the returned list of
           [TablesAnnotation][google.cloud.automl.v1.TablesAnnotation]
           objects. 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.
        
         AutoML Vision 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.
        
         AutoML Vision 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) The maximum number of bounding
           boxes returned. The default is 100. The
           number of returned bounding boxes might be limited by the server.
        
         AutoML Tables
        
         `feature_importance`
         : (boolean) Whether
         [feature_importance][google.cloud.automl.v1.TablesModelColumnInfo.feature_importance]
           is populated in the returned list of
           [TablesAnnotation][google.cloud.automl.v1.TablesAnnotation]
           objects. The default is false.
         
        map<string, string> params = 3;
        Specified by:
        getParamsOrThrow in interface PredictRequestOrBuilder
      • removeParams

        public PredictRequest.Builder removeParams​(String key)
         Additional domain-specific parameters, any string must be up to 25000
         characters long.
        
         AutoML Vision 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.
        
         AutoML Vision 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) The maximum number of bounding
           boxes returned. The default is 100. The
           number of returned bounding boxes might be limited by the server.
        
         AutoML Tables
        
         `feature_importance`
         : (boolean) Whether
         [feature_importance][google.cloud.automl.v1.TablesModelColumnInfo.feature_importance]
           is populated in the returned list of
           [TablesAnnotation][google.cloud.automl.v1.TablesAnnotation]
           objects. 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.
        
         AutoML Vision 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.
        
         AutoML Vision 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) The maximum number of bounding
           boxes returned. The default is 100. The
           number of returned bounding boxes might be limited by the server.
        
         AutoML Tables
        
         `feature_importance`
         : (boolean) Whether
         [feature_importance][google.cloud.automl.v1.TablesModelColumnInfo.feature_importance]
           is populated in the returned list of
           [TablesAnnotation][google.cloud.automl.v1.TablesAnnotation]
           objects. 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.
        
         AutoML Vision 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.
        
         AutoML Vision 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) The maximum number of bounding
           boxes returned. The default is 100. The
           number of returned bounding boxes might be limited by the server.
        
         AutoML Tables
        
         `feature_importance`
         : (boolean) Whether
         [feature_importance][google.cloud.automl.v1.TablesModelColumnInfo.feature_importance]
           is populated in the returned list of
           [TablesAnnotation][google.cloud.automl.v1.TablesAnnotation]
           objects. The default is false.
         
        map<string, string> params = 3;
      • setUnknownFields

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

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