Class PredictResponse.PredictionResult.Builder

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

public static final class PredictResponse.PredictionResult.Builder extends com.google.protobuf.GeneratedMessage.Builder<PredictResponse.PredictionResult.Builder> implements PredictResponse.PredictionResultOrBuilder
 PredictionResult represents the recommendation prediction results.
 
Protobuf type google.cloud.recommendationengine.v1beta1.PredictResponse.PredictionResult
  • 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<PredictResponse.PredictionResult.Builder>
    • internalGetMutableMapFieldReflection

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

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<PredictResponse.PredictionResult.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<PredictResponse.PredictionResult.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<PredictResponse.PredictionResult.Builder>
    • getDefaultInstanceForType

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

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

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

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

    • isInitialized

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

      public PredictResponse.PredictionResult.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<PredictResponse.PredictionResult.Builder>
      Throws:
      IOException
    • getId

      public String getId()
       ID of the recommended catalog item
       
      string id = 1;
      Specified by:
      getId in interface PredictResponse.PredictionResultOrBuilder
      Returns:
      The id.
    • getIdBytes

      public com.google.protobuf.ByteString getIdBytes()
       ID of the recommended catalog item
       
      string id = 1;
      Specified by:
      getIdBytes in interface PredictResponse.PredictionResultOrBuilder
      Returns:
      The bytes for id.
    • setId

       ID of the recommended catalog item
       
      string id = 1;
      Parameters:
      value - The id to set.
      Returns:
      This builder for chaining.
    • clearId

       ID of the recommended catalog item
       
      string id = 1;
      Returns:
      This builder for chaining.
    • setIdBytes

      public PredictResponse.PredictionResult.Builder setIdBytes(com.google.protobuf.ByteString value)
       ID of the recommended catalog item
       
      string id = 1;
      Parameters:
      value - The bytes for id to set.
      Returns:
      This builder for chaining.
    • getItemMetadataCount

      public int getItemMetadataCount()
      Description copied from interface: PredictResponse.PredictionResultOrBuilder
       Additional item metadata / annotations.
      
       Possible values:
      
       * `catalogItem`: JSON representation of the catalogItem. Will be set if
       `returnCatalogItem` is set to true in `PredictRequest.params`.
       * `score`: Prediction score in double value. Will be set if
       `returnItemScore` is set to true in `PredictRequest.params`.
       
      map<string, .google.protobuf.Value> item_metadata = 2;
      Specified by:
      getItemMetadataCount in interface PredictResponse.PredictionResultOrBuilder
    • containsItemMetadata

      public boolean containsItemMetadata(String key)
       Additional item metadata / annotations.
      
       Possible values:
      
       * `catalogItem`: JSON representation of the catalogItem. Will be set if
       `returnCatalogItem` is set to true in `PredictRequest.params`.
       * `score`: Prediction score in double value. Will be set if
       `returnItemScore` is set to true in `PredictRequest.params`.
       
      map<string, .google.protobuf.Value> item_metadata = 2;
      Specified by:
      containsItemMetadata in interface PredictResponse.PredictionResultOrBuilder
    • getItemMetadata

      @Deprecated public Map<String,com.google.protobuf.Value> getItemMetadata()
      Deprecated.
      Specified by:
      getItemMetadata in interface PredictResponse.PredictionResultOrBuilder
    • getItemMetadataMap

      public Map<String,com.google.protobuf.Value> getItemMetadataMap()
       Additional item metadata / annotations.
      
       Possible values:
      
       * `catalogItem`: JSON representation of the catalogItem. Will be set if
       `returnCatalogItem` is set to true in `PredictRequest.params`.
       * `score`: Prediction score in double value. Will be set if
       `returnItemScore` is set to true in `PredictRequest.params`.
       
      map<string, .google.protobuf.Value> item_metadata = 2;
      Specified by:
      getItemMetadataMap in interface PredictResponse.PredictionResultOrBuilder
    • getItemMetadataOrDefault

      public com.google.protobuf.Value getItemMetadataOrDefault(String key, com.google.protobuf.Value defaultValue)
       Additional item metadata / annotations.
      
       Possible values:
      
       * `catalogItem`: JSON representation of the catalogItem. Will be set if
       `returnCatalogItem` is set to true in `PredictRequest.params`.
       * `score`: Prediction score in double value. Will be set if
       `returnItemScore` is set to true in `PredictRequest.params`.
       
      map<string, .google.protobuf.Value> item_metadata = 2;
      Specified by:
      getItemMetadataOrDefault in interface PredictResponse.PredictionResultOrBuilder
    • getItemMetadataOrThrow

      public com.google.protobuf.Value getItemMetadataOrThrow(String key)
       Additional item metadata / annotations.
      
       Possible values:
      
       * `catalogItem`: JSON representation of the catalogItem. Will be set if
       `returnCatalogItem` is set to true in `PredictRequest.params`.
       * `score`: Prediction score in double value. Will be set if
       `returnItemScore` is set to true in `PredictRequest.params`.
       
      map<string, .google.protobuf.Value> item_metadata = 2;
      Specified by:
      getItemMetadataOrThrow in interface PredictResponse.PredictionResultOrBuilder
    • clearItemMetadata

      public PredictResponse.PredictionResult.Builder clearItemMetadata()
    • removeItemMetadata

      public PredictResponse.PredictionResult.Builder removeItemMetadata(String key)
       Additional item metadata / annotations.
      
       Possible values:
      
       * `catalogItem`: JSON representation of the catalogItem. Will be set if
       `returnCatalogItem` is set to true in `PredictRequest.params`.
       * `score`: Prediction score in double value. Will be set if
       `returnItemScore` is set to true in `PredictRequest.params`.
       
      map<string, .google.protobuf.Value> item_metadata = 2;
    • getMutableItemMetadata

      @Deprecated public Map<String,com.google.protobuf.Value> getMutableItemMetadata()
      Deprecated.
      Use alternate mutation accessors instead.
    • putItemMetadata

      public PredictResponse.PredictionResult.Builder putItemMetadata(String key, com.google.protobuf.Value value)
       Additional item metadata / annotations.
      
       Possible values:
      
       * `catalogItem`: JSON representation of the catalogItem. Will be set if
       `returnCatalogItem` is set to true in `PredictRequest.params`.
       * `score`: Prediction score in double value. Will be set if
       `returnItemScore` is set to true in `PredictRequest.params`.
       
      map<string, .google.protobuf.Value> item_metadata = 2;
    • putAllItemMetadata

      public PredictResponse.PredictionResult.Builder putAllItemMetadata(Map<String,com.google.protobuf.Value> values)
       Additional item metadata / annotations.
      
       Possible values:
      
       * `catalogItem`: JSON representation of the catalogItem. Will be set if
       `returnCatalogItem` is set to true in `PredictRequest.params`.
       * `score`: Prediction score in double value. Will be set if
       `returnItemScore` is set to true in `PredictRequest.params`.
       
      map<string, .google.protobuf.Value> item_metadata = 2;
    • putItemMetadataBuilderIfAbsent

      public com.google.protobuf.Value.Builder putItemMetadataBuilderIfAbsent(String key)
       Additional item metadata / annotations.
      
       Possible values:
      
       * `catalogItem`: JSON representation of the catalogItem. Will be set if
       `returnCatalogItem` is set to true in `PredictRequest.params`.
       * `score`: Prediction score in double value. Will be set if
       `returnItemScore` is set to true in `PredictRequest.params`.
       
      map<string, .google.protobuf.Value> item_metadata = 2;