Class RecommendResponse.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<RecommendResponse.Builder>
com.google.cloud.discoveryengine.v1beta.RecommendResponse.Builder
All Implemented Interfaces:
RecommendResponseOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
RecommendResponse

public static final class RecommendResponse.Builder extends com.google.protobuf.GeneratedMessage.Builder<RecommendResponse.Builder> implements RecommendResponseOrBuilder
 Response message for Recommend method.
 
Protobuf type google.cloud.discoveryengine.v1beta.RecommendResponse
  • 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<RecommendResponse.Builder>
    • clear

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

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

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

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

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

      public RecommendResponse.Builder mergeFrom(RecommendResponse other)
    • isInitialized

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

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

      public List<RecommendResponse.RecommendationResult> getResultsList()
       A list of recommended Documents. The order represents the ranking (from the
       most relevant Document to the least).
       
      repeated .google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult results = 1;
      Specified by:
      getResultsList in interface RecommendResponseOrBuilder
    • getResultsCount

      public int getResultsCount()
       A list of recommended Documents. The order represents the ranking (from the
       most relevant Document to the least).
       
      repeated .google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult results = 1;
      Specified by:
      getResultsCount in interface RecommendResponseOrBuilder
    • getResults

      public RecommendResponse.RecommendationResult getResults(int index)
       A list of recommended Documents. The order represents the ranking (from the
       most relevant Document to the least).
       
      repeated .google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult results = 1;
      Specified by:
      getResults in interface RecommendResponseOrBuilder
    • setResults

       A list of recommended Documents. The order represents the ranking (from the
       most relevant Document to the least).
       
      repeated .google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult results = 1;
    • setResults

      public RecommendResponse.Builder setResults(int index, RecommendResponse.RecommendationResult.Builder builderForValue)
       A list of recommended Documents. The order represents the ranking (from the
       most relevant Document to the least).
       
      repeated .google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult results = 1;
    • addResults

       A list of recommended Documents. The order represents the ranking (from the
       most relevant Document to the least).
       
      repeated .google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult results = 1;
    • addResults

       A list of recommended Documents. The order represents the ranking (from the
       most relevant Document to the least).
       
      repeated .google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult results = 1;
    • addResults

       A list of recommended Documents. The order represents the ranking (from the
       most relevant Document to the least).
       
      repeated .google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult results = 1;
    • addResults

      public RecommendResponse.Builder addResults(int index, RecommendResponse.RecommendationResult.Builder builderForValue)
       A list of recommended Documents. The order represents the ranking (from the
       most relevant Document to the least).
       
      repeated .google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult results = 1;
    • addAllResults

       A list of recommended Documents. The order represents the ranking (from the
       most relevant Document to the least).
       
      repeated .google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult results = 1;
    • clearResults

      public RecommendResponse.Builder clearResults()
       A list of recommended Documents. The order represents the ranking (from the
       most relevant Document to the least).
       
      repeated .google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult results = 1;
    • removeResults

      public RecommendResponse.Builder removeResults(int index)
       A list of recommended Documents. The order represents the ranking (from the
       most relevant Document to the least).
       
      repeated .google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult results = 1;
    • getResultsBuilder

      public RecommendResponse.RecommendationResult.Builder getResultsBuilder(int index)
       A list of recommended Documents. The order represents the ranking (from the
       most relevant Document to the least).
       
      repeated .google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult results = 1;
    • getResultsOrBuilder

      public RecommendResponse.RecommendationResultOrBuilder getResultsOrBuilder(int index)
       A list of recommended Documents. The order represents the ranking (from the
       most relevant Document to the least).
       
      repeated .google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult results = 1;
      Specified by:
      getResultsOrBuilder in interface RecommendResponseOrBuilder
    • getResultsOrBuilderList

      public List<? extends RecommendResponse.RecommendationResultOrBuilder> getResultsOrBuilderList()
       A list of recommended Documents. The order represents the ranking (from the
       most relevant Document to the least).
       
      repeated .google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult results = 1;
      Specified by:
      getResultsOrBuilderList in interface RecommendResponseOrBuilder
    • addResultsBuilder

       A list of recommended Documents. The order represents the ranking (from the
       most relevant Document to the least).
       
      repeated .google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult results = 1;
    • addResultsBuilder

      public RecommendResponse.RecommendationResult.Builder addResultsBuilder(int index)
       A list of recommended Documents. The order represents the ranking (from the
       most relevant Document to the least).
       
      repeated .google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult results = 1;
    • getResultsBuilderList

      public List<RecommendResponse.RecommendationResult.Builder> getResultsBuilderList()
       A list of recommended Documents. The order represents the ranking (from the
       most relevant Document to the least).
       
      repeated .google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult results = 1;
    • getAttributionToken

      public String getAttributionToken()
       A unique attribution token. This should be included in the
       [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] logs resulting
       from this recommendation, which enables accurate attribution of
       recommendation model performance.
       
      string attribution_token = 2;
      Specified by:
      getAttributionToken in interface RecommendResponseOrBuilder
      Returns:
      The attributionToken.
    • getAttributionTokenBytes

      public com.google.protobuf.ByteString getAttributionTokenBytes()
       A unique attribution token. This should be included in the
       [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] logs resulting
       from this recommendation, which enables accurate attribution of
       recommendation model performance.
       
      string attribution_token = 2;
      Specified by:
      getAttributionTokenBytes in interface RecommendResponseOrBuilder
      Returns:
      The bytes for attributionToken.
    • setAttributionToken

      public RecommendResponse.Builder setAttributionToken(String value)
       A unique attribution token. This should be included in the
       [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] logs resulting
       from this recommendation, which enables accurate attribution of
       recommendation model performance.
       
      string attribution_token = 2;
      Parameters:
      value - The attributionToken to set.
      Returns:
      This builder for chaining.
    • clearAttributionToken

      public RecommendResponse.Builder clearAttributionToken()
       A unique attribution token. This should be included in the
       [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] logs resulting
       from this recommendation, which enables accurate attribution of
       recommendation model performance.
       
      string attribution_token = 2;
      Returns:
      This builder for chaining.
    • setAttributionTokenBytes

      public RecommendResponse.Builder setAttributionTokenBytes(com.google.protobuf.ByteString value)
       A unique attribution token. This should be included in the
       [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] logs resulting
       from this recommendation, which enables accurate attribution of
       recommendation model performance.
       
      string attribution_token = 2;
      Parameters:
      value - The bytes for attributionToken to set.
      Returns:
      This builder for chaining.
    • getMissingIdsList

      public com.google.protobuf.ProtocolStringList getMissingIdsList()
       IDs of documents in the request that were missing from the default Branch
       associated with the requested ServingConfig.
       
      repeated string missing_ids = 3;
      Specified by:
      getMissingIdsList in interface RecommendResponseOrBuilder
      Returns:
      A list containing the missingIds.
    • getMissingIdsCount

      public int getMissingIdsCount()
       IDs of documents in the request that were missing from the default Branch
       associated with the requested ServingConfig.
       
      repeated string missing_ids = 3;
      Specified by:
      getMissingIdsCount in interface RecommendResponseOrBuilder
      Returns:
      The count of missingIds.
    • getMissingIds

      public String getMissingIds(int index)
       IDs of documents in the request that were missing from the default Branch
       associated with the requested ServingConfig.
       
      repeated string missing_ids = 3;
      Specified by:
      getMissingIds in interface RecommendResponseOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The missingIds at the given index.
    • getMissingIdsBytes

      public com.google.protobuf.ByteString getMissingIdsBytes(int index)
       IDs of documents in the request that were missing from the default Branch
       associated with the requested ServingConfig.
       
      repeated string missing_ids = 3;
      Specified by:
      getMissingIdsBytes in interface RecommendResponseOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the missingIds at the given index.
    • setMissingIds

      public RecommendResponse.Builder setMissingIds(int index, String value)
       IDs of documents in the request that were missing from the default Branch
       associated with the requested ServingConfig.
       
      repeated string missing_ids = 3;
      Parameters:
      index - The index to set the value at.
      value - The missingIds to set.
      Returns:
      This builder for chaining.
    • addMissingIds

      public RecommendResponse.Builder addMissingIds(String value)
       IDs of documents in the request that were missing from the default Branch
       associated with the requested ServingConfig.
       
      repeated string missing_ids = 3;
      Parameters:
      value - The missingIds to add.
      Returns:
      This builder for chaining.
    • addAllMissingIds

      public RecommendResponse.Builder addAllMissingIds(Iterable<String> values)
       IDs of documents in the request that were missing from the default Branch
       associated with the requested ServingConfig.
       
      repeated string missing_ids = 3;
      Parameters:
      values - The missingIds to add.
      Returns:
      This builder for chaining.
    • clearMissingIds

      public RecommendResponse.Builder clearMissingIds()
       IDs of documents in the request that were missing from the default Branch
       associated with the requested ServingConfig.
       
      repeated string missing_ids = 3;
      Returns:
      This builder for chaining.
    • addMissingIdsBytes

      public RecommendResponse.Builder addMissingIdsBytes(com.google.protobuf.ByteString value)
       IDs of documents in the request that were missing from the default Branch
       associated with the requested ServingConfig.
       
      repeated string missing_ids = 3;
      Parameters:
      value - The bytes of the missingIds to add.
      Returns:
      This builder for chaining.
    • getValidateOnly

      public boolean getValidateOnly()
       True if
       [RecommendRequest.validate_only][google.cloud.discoveryengine.v1beta.RecommendRequest.validate_only]
       was set.
       
      bool validate_only = 4;
      Specified by:
      getValidateOnly in interface RecommendResponseOrBuilder
      Returns:
      The validateOnly.
    • setValidateOnly

      public RecommendResponse.Builder setValidateOnly(boolean value)
       True if
       [RecommendRequest.validate_only][google.cloud.discoveryengine.v1beta.RecommendRequest.validate_only]
       was set.
       
      bool validate_only = 4;
      Parameters:
      value - The validateOnly to set.
      Returns:
      This builder for chaining.
    • clearValidateOnly

      public RecommendResponse.Builder clearValidateOnly()
       True if
       [RecommendRequest.validate_only][google.cloud.discoveryengine.v1beta.RecommendRequest.validate_only]
       was set.
       
      bool validate_only = 4;
      Returns:
      This builder for chaining.