Class Rule.DoNotAssociateAction.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Rule.DoNotAssociateAction.Builder>
com.google.cloud.retail.v2alpha.Rule.DoNotAssociateAction.Builder
All Implemented Interfaces:
Rule.DoNotAssociateActionOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
Rule.DoNotAssociateAction

public static final class Rule.DoNotAssociateAction.Builder extends com.google.protobuf.GeneratedMessage.Builder<Rule.DoNotAssociateAction.Builder> implements Rule.DoNotAssociateActionOrBuilder
 Prevents `query_term` from being associated with specified terms during
 search.
 Example: Don't associate "gShoe" and "cheap".
 
Protobuf type google.cloud.retail.v2alpha.Rule.DoNotAssociateAction
  • 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<Rule.DoNotAssociateAction.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<Rule.DoNotAssociateAction.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<Rule.DoNotAssociateAction.Builder>
    • getDefaultInstanceForType

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

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

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

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

      public Rule.DoNotAssociateAction.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<Rule.DoNotAssociateAction.Builder>
      Throws:
      IOException
    • getQueryTermsList

      public com.google.protobuf.ProtocolStringList getQueryTermsList()
       Terms from the search query.
       Will not consider do_not_associate_terms for search if in search query.
       Can specify up to 100 terms.
       
      repeated string query_terms = 2;
      Specified by:
      getQueryTermsList in interface Rule.DoNotAssociateActionOrBuilder
      Returns:
      A list containing the queryTerms.
    • getQueryTermsCount

      public int getQueryTermsCount()
       Terms from the search query.
       Will not consider do_not_associate_terms for search if in search query.
       Can specify up to 100 terms.
       
      repeated string query_terms = 2;
      Specified by:
      getQueryTermsCount in interface Rule.DoNotAssociateActionOrBuilder
      Returns:
      The count of queryTerms.
    • getQueryTerms

      public String getQueryTerms(int index)
       Terms from the search query.
       Will not consider do_not_associate_terms for search if in search query.
       Can specify up to 100 terms.
       
      repeated string query_terms = 2;
      Specified by:
      getQueryTerms in interface Rule.DoNotAssociateActionOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The queryTerms at the given index.
    • getQueryTermsBytes

      public com.google.protobuf.ByteString getQueryTermsBytes(int index)
       Terms from the search query.
       Will not consider do_not_associate_terms for search if in search query.
       Can specify up to 100 terms.
       
      repeated string query_terms = 2;
      Specified by:
      getQueryTermsBytes in interface Rule.DoNotAssociateActionOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the queryTerms at the given index.
    • setQueryTerms

      public Rule.DoNotAssociateAction.Builder setQueryTerms(int index, String value)
       Terms from the search query.
       Will not consider do_not_associate_terms for search if in search query.
       Can specify up to 100 terms.
       
      repeated string query_terms = 2;
      Parameters:
      index - The index to set the value at.
      value - The queryTerms to set.
      Returns:
      This builder for chaining.
    • addQueryTerms

      public Rule.DoNotAssociateAction.Builder addQueryTerms(String value)
       Terms from the search query.
       Will not consider do_not_associate_terms for search if in search query.
       Can specify up to 100 terms.
       
      repeated string query_terms = 2;
      Parameters:
      value - The queryTerms to add.
      Returns:
      This builder for chaining.
    • addAllQueryTerms

      public Rule.DoNotAssociateAction.Builder addAllQueryTerms(Iterable<String> values)
       Terms from the search query.
       Will not consider do_not_associate_terms for search if in search query.
       Can specify up to 100 terms.
       
      repeated string query_terms = 2;
      Parameters:
      values - The queryTerms to add.
      Returns:
      This builder for chaining.
    • clearQueryTerms

      public Rule.DoNotAssociateAction.Builder clearQueryTerms()
       Terms from the search query.
       Will not consider do_not_associate_terms for search if in search query.
       Can specify up to 100 terms.
       
      repeated string query_terms = 2;
      Returns:
      This builder for chaining.
    • addQueryTermsBytes

      public Rule.DoNotAssociateAction.Builder addQueryTermsBytes(com.google.protobuf.ByteString value)
       Terms from the search query.
       Will not consider do_not_associate_terms for search if in search query.
       Can specify up to 100 terms.
       
      repeated string query_terms = 2;
      Parameters:
      value - The bytes of the queryTerms to add.
      Returns:
      This builder for chaining.
    • getDoNotAssociateTermsList

      public com.google.protobuf.ProtocolStringList getDoNotAssociateTermsList()
       Cannot contain duplicates or the query term.
       Can specify up to 100 terms.
       
      repeated string do_not_associate_terms = 3;
      Specified by:
      getDoNotAssociateTermsList in interface Rule.DoNotAssociateActionOrBuilder
      Returns:
      A list containing the doNotAssociateTerms.
    • getDoNotAssociateTermsCount

      public int getDoNotAssociateTermsCount()
       Cannot contain duplicates or the query term.
       Can specify up to 100 terms.
       
      repeated string do_not_associate_terms = 3;
      Specified by:
      getDoNotAssociateTermsCount in interface Rule.DoNotAssociateActionOrBuilder
      Returns:
      The count of doNotAssociateTerms.
    • getDoNotAssociateTerms

      public String getDoNotAssociateTerms(int index)
       Cannot contain duplicates or the query term.
       Can specify up to 100 terms.
       
      repeated string do_not_associate_terms = 3;
      Specified by:
      getDoNotAssociateTerms in interface Rule.DoNotAssociateActionOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The doNotAssociateTerms at the given index.
    • getDoNotAssociateTermsBytes

      public com.google.protobuf.ByteString getDoNotAssociateTermsBytes(int index)
       Cannot contain duplicates or the query term.
       Can specify up to 100 terms.
       
      repeated string do_not_associate_terms = 3;
      Specified by:
      getDoNotAssociateTermsBytes in interface Rule.DoNotAssociateActionOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the doNotAssociateTerms at the given index.
    • setDoNotAssociateTerms

      public Rule.DoNotAssociateAction.Builder setDoNotAssociateTerms(int index, String value)
       Cannot contain duplicates or the query term.
       Can specify up to 100 terms.
       
      repeated string do_not_associate_terms = 3;
      Parameters:
      index - The index to set the value at.
      value - The doNotAssociateTerms to set.
      Returns:
      This builder for chaining.
    • addDoNotAssociateTerms

      public Rule.DoNotAssociateAction.Builder addDoNotAssociateTerms(String value)
       Cannot contain duplicates or the query term.
       Can specify up to 100 terms.
       
      repeated string do_not_associate_terms = 3;
      Parameters:
      value - The doNotAssociateTerms to add.
      Returns:
      This builder for chaining.
    • addAllDoNotAssociateTerms

      public Rule.DoNotAssociateAction.Builder addAllDoNotAssociateTerms(Iterable<String> values)
       Cannot contain duplicates or the query term.
       Can specify up to 100 terms.
       
      repeated string do_not_associate_terms = 3;
      Parameters:
      values - The doNotAssociateTerms to add.
      Returns:
      This builder for chaining.
    • clearDoNotAssociateTerms

      public Rule.DoNotAssociateAction.Builder clearDoNotAssociateTerms()
       Cannot contain duplicates or the query term.
       Can specify up to 100 terms.
       
      repeated string do_not_associate_terms = 3;
      Returns:
      This builder for chaining.
    • addDoNotAssociateTermsBytes

      public Rule.DoNotAssociateAction.Builder addDoNotAssociateTermsBytes(com.google.protobuf.ByteString value)
       Cannot contain duplicates or the query term.
       Can specify up to 100 terms.
       
      repeated string do_not_associate_terms = 3;
      Parameters:
      value - The bytes of the doNotAssociateTerms to add.
      Returns:
      This builder for chaining.
    • getTermsList

      public com.google.protobuf.ProtocolStringList getTermsList()
       Will be [deprecated = true] post migration;
       
      repeated string terms = 1;
      Specified by:
      getTermsList in interface Rule.DoNotAssociateActionOrBuilder
      Returns:
      A list containing the terms.
    • getTermsCount

      public int getTermsCount()
       Will be [deprecated = true] post migration;
       
      repeated string terms = 1;
      Specified by:
      getTermsCount in interface Rule.DoNotAssociateActionOrBuilder
      Returns:
      The count of terms.
    • getTerms

      public String getTerms(int index)
       Will be [deprecated = true] post migration;
       
      repeated string terms = 1;
      Specified by:
      getTerms in interface Rule.DoNotAssociateActionOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The terms at the given index.
    • getTermsBytes

      public com.google.protobuf.ByteString getTermsBytes(int index)
       Will be [deprecated = true] post migration;
       
      repeated string terms = 1;
      Specified by:
      getTermsBytes in interface Rule.DoNotAssociateActionOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the terms at the given index.
    • setTerms

      public Rule.DoNotAssociateAction.Builder setTerms(int index, String value)
       Will be [deprecated = true] post migration;
       
      repeated string terms = 1;
      Parameters:
      index - The index to set the value at.
      value - The terms to set.
      Returns:
      This builder for chaining.
    • addTerms

      public Rule.DoNotAssociateAction.Builder addTerms(String value)
       Will be [deprecated = true] post migration;
       
      repeated string terms = 1;
      Parameters:
      value - The terms to add.
      Returns:
      This builder for chaining.
    • addAllTerms

      public Rule.DoNotAssociateAction.Builder addAllTerms(Iterable<String> values)
       Will be [deprecated = true] post migration;
       
      repeated string terms = 1;
      Parameters:
      values - The terms to add.
      Returns:
      This builder for chaining.
    • clearTerms

      public Rule.DoNotAssociateAction.Builder clearTerms()
       Will be [deprecated = true] post migration;
       
      repeated string terms = 1;
      Returns:
      This builder for chaining.
    • addTermsBytes

      public Rule.DoNotAssociateAction.Builder addTermsBytes(com.google.protobuf.ByteString value)
       Will be [deprecated = true] post migration;
       
      repeated string terms = 1;
      Parameters:
      value - The bytes of the terms to add.
      Returns:
      This builder for chaining.