Class 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.GeneratedMessageV3.Builder<RecommendResponse.Builder>
    implements RecommendResponseOrBuilder
     Response message for Recommend method.
     
    Protobuf type google.cloud.discoveryengine.v1beta.RecommendResponse
    • Method Detail

      • getDescriptor

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

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

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

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

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

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

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

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

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.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
      • 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
      • setResults

        public RecommendResponse.Builder setResults​(int index,
                                                    RecommendResponse.RecommendationResult value)
         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​(RecommendResponse.RecommendationResult value)
         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 value)
         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;
      • addResultsBuilder

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

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

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