Class PredictResponse.Builder

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

public static final class PredictResponse.Builder extends com.google.protobuf.GeneratedMessage.Builder<PredictResponse.Builder> implements PredictResponseOrBuilder
 Response message for predict method.
 
Protobuf type google.cloud.recommendationengine.v1beta1.PredictResponse
  • 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.Builder>
    • internalGetMutableMapFieldReflection

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

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

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

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

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

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

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

      public PredictResponse.Builder mergeFrom(PredictResponse other)
    • isInitialized

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

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

      public List<PredictResponse.PredictionResult> getResultsList()
       A list of recommended items. The order represents the ranking (from the
       most relevant item to the least).
       
      repeated .google.cloud.recommendationengine.v1beta1.PredictResponse.PredictionResult results = 1;
      Specified by:
      getResultsList in interface PredictResponseOrBuilder
    • getResultsCount

      public int getResultsCount()
       A list of recommended items. The order represents the ranking (from the
       most relevant item to the least).
       
      repeated .google.cloud.recommendationengine.v1beta1.PredictResponse.PredictionResult results = 1;
      Specified by:
      getResultsCount in interface PredictResponseOrBuilder
    • getResults

      public PredictResponse.PredictionResult getResults(int index)
       A list of recommended items. The order represents the ranking (from the
       most relevant item to the least).
       
      repeated .google.cloud.recommendationengine.v1beta1.PredictResponse.PredictionResult results = 1;
      Specified by:
      getResults in interface PredictResponseOrBuilder
    • setResults

      public PredictResponse.Builder setResults(int index, PredictResponse.PredictionResult value)
       A list of recommended items. The order represents the ranking (from the
       most relevant item to the least).
       
      repeated .google.cloud.recommendationengine.v1beta1.PredictResponse.PredictionResult results = 1;
    • setResults

      public PredictResponse.Builder setResults(int index, PredictResponse.PredictionResult.Builder builderForValue)
       A list of recommended items. The order represents the ranking (from the
       most relevant item to the least).
       
      repeated .google.cloud.recommendationengine.v1beta1.PredictResponse.PredictionResult results = 1;
    • addResults

       A list of recommended items. The order represents the ranking (from the
       most relevant item to the least).
       
      repeated .google.cloud.recommendationengine.v1beta1.PredictResponse.PredictionResult results = 1;
    • addResults

      public PredictResponse.Builder addResults(int index, PredictResponse.PredictionResult value)
       A list of recommended items. The order represents the ranking (from the
       most relevant item to the least).
       
      repeated .google.cloud.recommendationengine.v1beta1.PredictResponse.PredictionResult results = 1;
    • addResults

       A list of recommended items. The order represents the ranking (from the
       most relevant item to the least).
       
      repeated .google.cloud.recommendationengine.v1beta1.PredictResponse.PredictionResult results = 1;
    • addResults

      public PredictResponse.Builder addResults(int index, PredictResponse.PredictionResult.Builder builderForValue)
       A list of recommended items. The order represents the ranking (from the
       most relevant item to the least).
       
      repeated .google.cloud.recommendationengine.v1beta1.PredictResponse.PredictionResult results = 1;
    • addAllResults

      public PredictResponse.Builder addAllResults(Iterable<? extends PredictResponse.PredictionResult> values)
       A list of recommended items. The order represents the ranking (from the
       most relevant item to the least).
       
      repeated .google.cloud.recommendationengine.v1beta1.PredictResponse.PredictionResult results = 1;
    • clearResults

      public PredictResponse.Builder clearResults()
       A list of recommended items. The order represents the ranking (from the
       most relevant item to the least).
       
      repeated .google.cloud.recommendationengine.v1beta1.PredictResponse.PredictionResult results = 1;
    • removeResults

      public PredictResponse.Builder removeResults(int index)
       A list of recommended items. The order represents the ranking (from the
       most relevant item to the least).
       
      repeated .google.cloud.recommendationengine.v1beta1.PredictResponse.PredictionResult results = 1;
    • getResultsBuilder

      public PredictResponse.PredictionResult.Builder getResultsBuilder(int index)
       A list of recommended items. The order represents the ranking (from the
       most relevant item to the least).
       
      repeated .google.cloud.recommendationengine.v1beta1.PredictResponse.PredictionResult results = 1;
    • getResultsOrBuilder

      public PredictResponse.PredictionResultOrBuilder getResultsOrBuilder(int index)
       A list of recommended items. The order represents the ranking (from the
       most relevant item to the least).
       
      repeated .google.cloud.recommendationengine.v1beta1.PredictResponse.PredictionResult results = 1;
      Specified by:
      getResultsOrBuilder in interface PredictResponseOrBuilder
    • getResultsOrBuilderList

      public List<? extends PredictResponse.PredictionResultOrBuilder> getResultsOrBuilderList()
       A list of recommended items. The order represents the ranking (from the
       most relevant item to the least).
       
      repeated .google.cloud.recommendationengine.v1beta1.PredictResponse.PredictionResult results = 1;
      Specified by:
      getResultsOrBuilderList in interface PredictResponseOrBuilder
    • addResultsBuilder

      public PredictResponse.PredictionResult.Builder addResultsBuilder()
       A list of recommended items. The order represents the ranking (from the
       most relevant item to the least).
       
      repeated .google.cloud.recommendationengine.v1beta1.PredictResponse.PredictionResult results = 1;
    • addResultsBuilder

      public PredictResponse.PredictionResult.Builder addResultsBuilder(int index)
       A list of recommended items. The order represents the ranking (from the
       most relevant item to the least).
       
      repeated .google.cloud.recommendationengine.v1beta1.PredictResponse.PredictionResult results = 1;
    • getResultsBuilderList

      public List<PredictResponse.PredictionResult.Builder> getResultsBuilderList()
       A list of recommended items. The order represents the ranking (from the
       most relevant item to the least).
       
      repeated .google.cloud.recommendationengine.v1beta1.PredictResponse.PredictionResult results = 1;
    • getRecommendationToken

      public String getRecommendationToken()
       A unique recommendation token. This should be included in the user event
       logs resulting from this recommendation, which enables accurate attribution
       of recommendation model performance.
       
      string recommendation_token = 2;
      Specified by:
      getRecommendationToken in interface PredictResponseOrBuilder
      Returns:
      The recommendationToken.
    • getRecommendationTokenBytes

      public com.google.protobuf.ByteString getRecommendationTokenBytes()
       A unique recommendation token. This should be included in the user event
       logs resulting from this recommendation, which enables accurate attribution
       of recommendation model performance.
       
      string recommendation_token = 2;
      Specified by:
      getRecommendationTokenBytes in interface PredictResponseOrBuilder
      Returns:
      The bytes for recommendationToken.
    • setRecommendationToken

      public PredictResponse.Builder setRecommendationToken(String value)
       A unique recommendation token. This should be included in the user event
       logs resulting from this recommendation, which enables accurate attribution
       of recommendation model performance.
       
      string recommendation_token = 2;
      Parameters:
      value - The recommendationToken to set.
      Returns:
      This builder for chaining.
    • clearRecommendationToken

      public PredictResponse.Builder clearRecommendationToken()
       A unique recommendation token. This should be included in the user event
       logs resulting from this recommendation, which enables accurate attribution
       of recommendation model performance.
       
      string recommendation_token = 2;
      Returns:
      This builder for chaining.
    • setRecommendationTokenBytes

      public PredictResponse.Builder setRecommendationTokenBytes(com.google.protobuf.ByteString value)
       A unique recommendation token. This should be included in the user event
       logs resulting from this recommendation, which enables accurate attribution
       of recommendation model performance.
       
      string recommendation_token = 2;
      Parameters:
      value - The bytes for recommendationToken to set.
      Returns:
      This builder for chaining.
    • getItemsMissingInCatalogList

      public com.google.protobuf.ProtocolStringList getItemsMissingInCatalogList()
       IDs of items in the request that were missing from the catalog.
       
      repeated string items_missing_in_catalog = 3;
      Specified by:
      getItemsMissingInCatalogList in interface PredictResponseOrBuilder
      Returns:
      A list containing the itemsMissingInCatalog.
    • getItemsMissingInCatalogCount

      public int getItemsMissingInCatalogCount()
       IDs of items in the request that were missing from the catalog.
       
      repeated string items_missing_in_catalog = 3;
      Specified by:
      getItemsMissingInCatalogCount in interface PredictResponseOrBuilder
      Returns:
      The count of itemsMissingInCatalog.
    • getItemsMissingInCatalog

      public String getItemsMissingInCatalog(int index)
       IDs of items in the request that were missing from the catalog.
       
      repeated string items_missing_in_catalog = 3;
      Specified by:
      getItemsMissingInCatalog in interface PredictResponseOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The itemsMissingInCatalog at the given index.
    • getItemsMissingInCatalogBytes

      public com.google.protobuf.ByteString getItemsMissingInCatalogBytes(int index)
       IDs of items in the request that were missing from the catalog.
       
      repeated string items_missing_in_catalog = 3;
      Specified by:
      getItemsMissingInCatalogBytes in interface PredictResponseOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the itemsMissingInCatalog at the given index.
    • setItemsMissingInCatalog

      public PredictResponse.Builder setItemsMissingInCatalog(int index, String value)
       IDs of items in the request that were missing from the catalog.
       
      repeated string items_missing_in_catalog = 3;
      Parameters:
      index - The index to set the value at.
      value - The itemsMissingInCatalog to set.
      Returns:
      This builder for chaining.
    • addItemsMissingInCatalog

      public PredictResponse.Builder addItemsMissingInCatalog(String value)
       IDs of items in the request that were missing from the catalog.
       
      repeated string items_missing_in_catalog = 3;
      Parameters:
      value - The itemsMissingInCatalog to add.
      Returns:
      This builder for chaining.
    • addAllItemsMissingInCatalog

      public PredictResponse.Builder addAllItemsMissingInCatalog(Iterable<String> values)
       IDs of items in the request that were missing from the catalog.
       
      repeated string items_missing_in_catalog = 3;
      Parameters:
      values - The itemsMissingInCatalog to add.
      Returns:
      This builder for chaining.
    • clearItemsMissingInCatalog

      public PredictResponse.Builder clearItemsMissingInCatalog()
       IDs of items in the request that were missing from the catalog.
       
      repeated string items_missing_in_catalog = 3;
      Returns:
      This builder for chaining.
    • addItemsMissingInCatalogBytes

      public PredictResponse.Builder addItemsMissingInCatalogBytes(com.google.protobuf.ByteString value)
       IDs of items in the request that were missing from the catalog.
       
      repeated string items_missing_in_catalog = 3;
      Parameters:
      value - The bytes of the itemsMissingInCatalog to add.
      Returns:
      This builder for chaining.
    • getDryRun

      public boolean getDryRun()
       True if the dryRun property was set in the request.
       
      bool dry_run = 4;
      Specified by:
      getDryRun in interface PredictResponseOrBuilder
      Returns:
      The dryRun.
    • setDryRun

      public PredictResponse.Builder setDryRun(boolean value)
       True if the dryRun property was set in the request.
       
      bool dry_run = 4;
      Parameters:
      value - The dryRun to set.
      Returns:
      This builder for chaining.
    • clearDryRun

      public PredictResponse.Builder clearDryRun()
       True if the dryRun property was set in the request.
       
      bool dry_run = 4;
      Returns:
      This builder for chaining.
    • getMetadataCount

      public int getMetadataCount()
      Description copied from interface: PredictResponseOrBuilder
       Additional domain specific prediction response metadata.
       
      map<string, .google.protobuf.Value> metadata = 5;
      Specified by:
      getMetadataCount in interface PredictResponseOrBuilder
    • containsMetadata

      public boolean containsMetadata(String key)
       Additional domain specific prediction response metadata.
       
      map<string, .google.protobuf.Value> metadata = 5;
      Specified by:
      containsMetadata in interface PredictResponseOrBuilder
    • getMetadata

      @Deprecated public Map<String,com.google.protobuf.Value> getMetadata()
      Deprecated.
      Use getMetadataMap() instead.
      Specified by:
      getMetadata in interface PredictResponseOrBuilder
    • getMetadataMap

      public Map<String,com.google.protobuf.Value> getMetadataMap()
       Additional domain specific prediction response metadata.
       
      map<string, .google.protobuf.Value> metadata = 5;
      Specified by:
      getMetadataMap in interface PredictResponseOrBuilder
    • getMetadataOrDefault

      public com.google.protobuf.Value getMetadataOrDefault(String key, com.google.protobuf.Value defaultValue)
       Additional domain specific prediction response metadata.
       
      map<string, .google.protobuf.Value> metadata = 5;
      Specified by:
      getMetadataOrDefault in interface PredictResponseOrBuilder
    • getMetadataOrThrow

      public com.google.protobuf.Value getMetadataOrThrow(String key)
       Additional domain specific prediction response metadata.
       
      map<string, .google.protobuf.Value> metadata = 5;
      Specified by:
      getMetadataOrThrow in interface PredictResponseOrBuilder
    • clearMetadata

      public PredictResponse.Builder clearMetadata()
    • removeMetadata

      public PredictResponse.Builder removeMetadata(String key)
       Additional domain specific prediction response metadata.
       
      map<string, .google.protobuf.Value> metadata = 5;
    • getMutableMetadata

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

      public PredictResponse.Builder putMetadata(String key, com.google.protobuf.Value value)
       Additional domain specific prediction response metadata.
       
      map<string, .google.protobuf.Value> metadata = 5;
    • putAllMetadata

      public PredictResponse.Builder putAllMetadata(Map<String,com.google.protobuf.Value> values)
       Additional domain specific prediction response metadata.
       
      map<string, .google.protobuf.Value> metadata = 5;
    • putMetadataBuilderIfAbsent

      public com.google.protobuf.Value.Builder putMetadataBuilderIfAbsent(String key)
       Additional domain specific prediction response metadata.
       
      map<string, .google.protobuf.Value> metadata = 5;
    • getNextPageToken

      public String getNextPageToken()
       If empty, the list is complete. If nonempty, the token to pass to the next
       request's PredictRequest.page_token.
       
      string next_page_token = 6;
      Specified by:
      getNextPageToken in interface PredictResponseOrBuilder
      Returns:
      The nextPageToken.
    • getNextPageTokenBytes

      public com.google.protobuf.ByteString getNextPageTokenBytes()
       If empty, the list is complete. If nonempty, the token to pass to the next
       request's PredictRequest.page_token.
       
      string next_page_token = 6;
      Specified by:
      getNextPageTokenBytes in interface PredictResponseOrBuilder
      Returns:
      The bytes for nextPageToken.
    • setNextPageToken

      public PredictResponse.Builder setNextPageToken(String value)
       If empty, the list is complete. If nonempty, the token to pass to the next
       request's PredictRequest.page_token.
       
      string next_page_token = 6;
      Parameters:
      value - The nextPageToken to set.
      Returns:
      This builder for chaining.
    • clearNextPageToken

      public PredictResponse.Builder clearNextPageToken()
       If empty, the list is complete. If nonempty, the token to pass to the next
       request's PredictRequest.page_token.
       
      string next_page_token = 6;
      Returns:
      This builder for chaining.
    • setNextPageTokenBytes

      public PredictResponse.Builder setNextPageTokenBytes(com.google.protobuf.ByteString value)
       If empty, the list is complete. If nonempty, the token to pass to the next
       request's PredictRequest.page_token.
       
      string next_page_token = 6;
      Parameters:
      value - The bytes for nextPageToken to set.
      Returns:
      This builder for chaining.