Class Condition.Builder

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

public static final class Condition.Builder extends com.google.protobuf.GeneratedMessage.Builder<Condition.Builder> implements ConditionOrBuilder
 Metadata that is used to define a condition that triggers an action.
 A valid condition must specify at least one of 'query_terms' or
 'products_filter'. If multiple fields are specified, the condition is met if
 all the fields are satisfied e.g. if a set of query terms and product_filter
 are set, then only items matching the product_filter for requests with a
 query matching the query terms wil get boosted.
 
Protobuf type google.cloud.retail.v2alpha.Condition
  • 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<Condition.Builder>
    • clear

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

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

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

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

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

      public Condition.Builder mergeFrom(Condition other)
    • isInitialized

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

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

      public List<Condition.QueryTerm> getQueryTermsList()
       A list (up to 10 entries) of terms to match the query on. If not
       specified, match all queries.
       If many query terms are specified, the condition
       is matched if any of the terms is a match (i.e. using the OR operator).
       
      repeated .google.cloud.retail.v2alpha.Condition.QueryTerm query_terms = 1;
      Specified by:
      getQueryTermsList in interface ConditionOrBuilder
    • getQueryTermsCount

      public int getQueryTermsCount()
       A list (up to 10 entries) of terms to match the query on. If not
       specified, match all queries.
       If many query terms are specified, the condition
       is matched if any of the terms is a match (i.e. using the OR operator).
       
      repeated .google.cloud.retail.v2alpha.Condition.QueryTerm query_terms = 1;
      Specified by:
      getQueryTermsCount in interface ConditionOrBuilder
    • getQueryTerms

      public Condition.QueryTerm getQueryTerms(int index)
       A list (up to 10 entries) of terms to match the query on. If not
       specified, match all queries.
       If many query terms are specified, the condition
       is matched if any of the terms is a match (i.e. using the OR operator).
       
      repeated .google.cloud.retail.v2alpha.Condition.QueryTerm query_terms = 1;
      Specified by:
      getQueryTerms in interface ConditionOrBuilder
    • setQueryTerms

      public Condition.Builder setQueryTerms(int index, Condition.QueryTerm value)
       A list (up to 10 entries) of terms to match the query on. If not
       specified, match all queries.
       If many query terms are specified, the condition
       is matched if any of the terms is a match (i.e. using the OR operator).
       
      repeated .google.cloud.retail.v2alpha.Condition.QueryTerm query_terms = 1;
    • setQueryTerms

      public Condition.Builder setQueryTerms(int index, Condition.QueryTerm.Builder builderForValue)
       A list (up to 10 entries) of terms to match the query on. If not
       specified, match all queries.
       If many query terms are specified, the condition
       is matched if any of the terms is a match (i.e. using the OR operator).
       
      repeated .google.cloud.retail.v2alpha.Condition.QueryTerm query_terms = 1;
    • addQueryTerms

      public Condition.Builder addQueryTerms(Condition.QueryTerm value)
       A list (up to 10 entries) of terms to match the query on. If not
       specified, match all queries.
       If many query terms are specified, the condition
       is matched if any of the terms is a match (i.e. using the OR operator).
       
      repeated .google.cloud.retail.v2alpha.Condition.QueryTerm query_terms = 1;
    • addQueryTerms

      public Condition.Builder addQueryTerms(int index, Condition.QueryTerm value)
       A list (up to 10 entries) of terms to match the query on. If not
       specified, match all queries.
       If many query terms are specified, the condition
       is matched if any of the terms is a match (i.e. using the OR operator).
       
      repeated .google.cloud.retail.v2alpha.Condition.QueryTerm query_terms = 1;
    • addQueryTerms

      public Condition.Builder addQueryTerms(Condition.QueryTerm.Builder builderForValue)
       A list (up to 10 entries) of terms to match the query on. If not
       specified, match all queries.
       If many query terms are specified, the condition
       is matched if any of the terms is a match (i.e. using the OR operator).
       
      repeated .google.cloud.retail.v2alpha.Condition.QueryTerm query_terms = 1;
    • addQueryTerms

      public Condition.Builder addQueryTerms(int index, Condition.QueryTerm.Builder builderForValue)
       A list (up to 10 entries) of terms to match the query on. If not
       specified, match all queries.
       If many query terms are specified, the condition
       is matched if any of the terms is a match (i.e. using the OR operator).
       
      repeated .google.cloud.retail.v2alpha.Condition.QueryTerm query_terms = 1;
    • addAllQueryTerms

      public Condition.Builder addAllQueryTerms(Iterable<? extends Condition.QueryTerm> values)
       A list (up to 10 entries) of terms to match the query on. If not
       specified, match all queries.
       If many query terms are specified, the condition
       is matched if any of the terms is a match (i.e. using the OR operator).
       
      repeated .google.cloud.retail.v2alpha.Condition.QueryTerm query_terms = 1;
    • clearQueryTerms

      public Condition.Builder clearQueryTerms()
       A list (up to 10 entries) of terms to match the query on. If not
       specified, match all queries.
       If many query terms are specified, the condition
       is matched if any of the terms is a match (i.e. using the OR operator).
       
      repeated .google.cloud.retail.v2alpha.Condition.QueryTerm query_terms = 1;
    • removeQueryTerms

      public Condition.Builder removeQueryTerms(int index)
       A list (up to 10 entries) of terms to match the query on. If not
       specified, match all queries.
       If many query terms are specified, the condition
       is matched if any of the terms is a match (i.e. using the OR operator).
       
      repeated .google.cloud.retail.v2alpha.Condition.QueryTerm query_terms = 1;
    • getQueryTermsBuilder

      public Condition.QueryTerm.Builder getQueryTermsBuilder(int index)
       A list (up to 10 entries) of terms to match the query on. If not
       specified, match all queries.
       If many query terms are specified, the condition
       is matched if any of the terms is a match (i.e. using the OR operator).
       
      repeated .google.cloud.retail.v2alpha.Condition.QueryTerm query_terms = 1;
    • getQueryTermsOrBuilder

      public Condition.QueryTermOrBuilder getQueryTermsOrBuilder(int index)
       A list (up to 10 entries) of terms to match the query on. If not
       specified, match all queries.
       If many query terms are specified, the condition
       is matched if any of the terms is a match (i.e. using the OR operator).
       
      repeated .google.cloud.retail.v2alpha.Condition.QueryTerm query_terms = 1;
      Specified by:
      getQueryTermsOrBuilder in interface ConditionOrBuilder
    • getQueryTermsOrBuilderList

      public List<? extends Condition.QueryTermOrBuilder> getQueryTermsOrBuilderList()
       A list (up to 10 entries) of terms to match the query on. If not
       specified, match all queries.
       If many query terms are specified, the condition
       is matched if any of the terms is a match (i.e. using the OR operator).
       
      repeated .google.cloud.retail.v2alpha.Condition.QueryTerm query_terms = 1;
      Specified by:
      getQueryTermsOrBuilderList in interface ConditionOrBuilder
    • addQueryTermsBuilder

      public Condition.QueryTerm.Builder addQueryTermsBuilder()
       A list (up to 10 entries) of terms to match the query on. If not
       specified, match all queries.
       If many query terms are specified, the condition
       is matched if any of the terms is a match (i.e. using the OR operator).
       
      repeated .google.cloud.retail.v2alpha.Condition.QueryTerm query_terms = 1;
    • addQueryTermsBuilder

      public Condition.QueryTerm.Builder addQueryTermsBuilder(int index)
       A list (up to 10 entries) of terms to match the query on. If not
       specified, match all queries.
       If many query terms are specified, the condition
       is matched if any of the terms is a match (i.e. using the OR operator).
       
      repeated .google.cloud.retail.v2alpha.Condition.QueryTerm query_terms = 1;
    • getQueryTermsBuilderList

      public List<Condition.QueryTerm.Builder> getQueryTermsBuilderList()
       A list (up to 10 entries) of terms to match the query on. If not
       specified, match all queries.
       If many query terms are specified, the condition
       is matched if any of the terms is a match (i.e. using the OR operator).
       
      repeated .google.cloud.retail.v2alpha.Condition.QueryTerm query_terms = 1;
    • getActiveTimeRangeList

      public List<Condition.TimeRange> getActiveTimeRangeList()
       Range of time(s) specifying when Condition is active.
       Condition true if any time range matches.
       
      repeated .google.cloud.retail.v2alpha.Condition.TimeRange active_time_range = 3;
      Specified by:
      getActiveTimeRangeList in interface ConditionOrBuilder
    • getActiveTimeRangeCount

      public int getActiveTimeRangeCount()
       Range of time(s) specifying when Condition is active.
       Condition true if any time range matches.
       
      repeated .google.cloud.retail.v2alpha.Condition.TimeRange active_time_range = 3;
      Specified by:
      getActiveTimeRangeCount in interface ConditionOrBuilder
    • getActiveTimeRange

      public Condition.TimeRange getActiveTimeRange(int index)
       Range of time(s) specifying when Condition is active.
       Condition true if any time range matches.
       
      repeated .google.cloud.retail.v2alpha.Condition.TimeRange active_time_range = 3;
      Specified by:
      getActiveTimeRange in interface ConditionOrBuilder
    • setActiveTimeRange

      public Condition.Builder setActiveTimeRange(int index, Condition.TimeRange value)
       Range of time(s) specifying when Condition is active.
       Condition true if any time range matches.
       
      repeated .google.cloud.retail.v2alpha.Condition.TimeRange active_time_range = 3;
    • setActiveTimeRange

      public Condition.Builder setActiveTimeRange(int index, Condition.TimeRange.Builder builderForValue)
       Range of time(s) specifying when Condition is active.
       Condition true if any time range matches.
       
      repeated .google.cloud.retail.v2alpha.Condition.TimeRange active_time_range = 3;
    • addActiveTimeRange

      public Condition.Builder addActiveTimeRange(Condition.TimeRange value)
       Range of time(s) specifying when Condition is active.
       Condition true if any time range matches.
       
      repeated .google.cloud.retail.v2alpha.Condition.TimeRange active_time_range = 3;
    • addActiveTimeRange

      public Condition.Builder addActiveTimeRange(int index, Condition.TimeRange value)
       Range of time(s) specifying when Condition is active.
       Condition true if any time range matches.
       
      repeated .google.cloud.retail.v2alpha.Condition.TimeRange active_time_range = 3;
    • addActiveTimeRange

      public Condition.Builder addActiveTimeRange(Condition.TimeRange.Builder builderForValue)
       Range of time(s) specifying when Condition is active.
       Condition true if any time range matches.
       
      repeated .google.cloud.retail.v2alpha.Condition.TimeRange active_time_range = 3;
    • addActiveTimeRange

      public Condition.Builder addActiveTimeRange(int index, Condition.TimeRange.Builder builderForValue)
       Range of time(s) specifying when Condition is active.
       Condition true if any time range matches.
       
      repeated .google.cloud.retail.v2alpha.Condition.TimeRange active_time_range = 3;
    • addAllActiveTimeRange

      public Condition.Builder addAllActiveTimeRange(Iterable<? extends Condition.TimeRange> values)
       Range of time(s) specifying when Condition is active.
       Condition true if any time range matches.
       
      repeated .google.cloud.retail.v2alpha.Condition.TimeRange active_time_range = 3;
    • clearActiveTimeRange

      public Condition.Builder clearActiveTimeRange()
       Range of time(s) specifying when Condition is active.
       Condition true if any time range matches.
       
      repeated .google.cloud.retail.v2alpha.Condition.TimeRange active_time_range = 3;
    • removeActiveTimeRange

      public Condition.Builder removeActiveTimeRange(int index)
       Range of time(s) specifying when Condition is active.
       Condition true if any time range matches.
       
      repeated .google.cloud.retail.v2alpha.Condition.TimeRange active_time_range = 3;
    • getActiveTimeRangeBuilder

      public Condition.TimeRange.Builder getActiveTimeRangeBuilder(int index)
       Range of time(s) specifying when Condition is active.
       Condition true if any time range matches.
       
      repeated .google.cloud.retail.v2alpha.Condition.TimeRange active_time_range = 3;
    • getActiveTimeRangeOrBuilder

      public Condition.TimeRangeOrBuilder getActiveTimeRangeOrBuilder(int index)
       Range of time(s) specifying when Condition is active.
       Condition true if any time range matches.
       
      repeated .google.cloud.retail.v2alpha.Condition.TimeRange active_time_range = 3;
      Specified by:
      getActiveTimeRangeOrBuilder in interface ConditionOrBuilder
    • getActiveTimeRangeOrBuilderList

      public List<? extends Condition.TimeRangeOrBuilder> getActiveTimeRangeOrBuilderList()
       Range of time(s) specifying when Condition is active.
       Condition true if any time range matches.
       
      repeated .google.cloud.retail.v2alpha.Condition.TimeRange active_time_range = 3;
      Specified by:
      getActiveTimeRangeOrBuilderList in interface ConditionOrBuilder
    • addActiveTimeRangeBuilder

      public Condition.TimeRange.Builder addActiveTimeRangeBuilder()
       Range of time(s) specifying when Condition is active.
       Condition true if any time range matches.
       
      repeated .google.cloud.retail.v2alpha.Condition.TimeRange active_time_range = 3;
    • addActiveTimeRangeBuilder

      public Condition.TimeRange.Builder addActiveTimeRangeBuilder(int index)
       Range of time(s) specifying when Condition is active.
       Condition true if any time range matches.
       
      repeated .google.cloud.retail.v2alpha.Condition.TimeRange active_time_range = 3;
    • getActiveTimeRangeBuilderList

      public List<Condition.TimeRange.Builder> getActiveTimeRangeBuilderList()
       Range of time(s) specifying when Condition is active.
       Condition true if any time range matches.
       
      repeated .google.cloud.retail.v2alpha.Condition.TimeRange active_time_range = 3;
    • getPageCategoriesList

      public com.google.protobuf.ProtocolStringList getPageCategoriesList()
       Used to support browse uses cases.
       A list (up to 10 entries) of categories or departments.
       The format should be the same as
       [UserEvent.page_categories][google.cloud.retail.v2alpha.UserEvent.page_categories];
       
      repeated string page_categories = 4;
      Specified by:
      getPageCategoriesList in interface ConditionOrBuilder
      Returns:
      A list containing the pageCategories.
    • getPageCategoriesCount

      public int getPageCategoriesCount()
       Used to support browse uses cases.
       A list (up to 10 entries) of categories or departments.
       The format should be the same as
       [UserEvent.page_categories][google.cloud.retail.v2alpha.UserEvent.page_categories];
       
      repeated string page_categories = 4;
      Specified by:
      getPageCategoriesCount in interface ConditionOrBuilder
      Returns:
      The count of pageCategories.
    • getPageCategories

      public String getPageCategories(int index)
       Used to support browse uses cases.
       A list (up to 10 entries) of categories or departments.
       The format should be the same as
       [UserEvent.page_categories][google.cloud.retail.v2alpha.UserEvent.page_categories];
       
      repeated string page_categories = 4;
      Specified by:
      getPageCategories in interface ConditionOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The pageCategories at the given index.
    • getPageCategoriesBytes

      public com.google.protobuf.ByteString getPageCategoriesBytes(int index)
       Used to support browse uses cases.
       A list (up to 10 entries) of categories or departments.
       The format should be the same as
       [UserEvent.page_categories][google.cloud.retail.v2alpha.UserEvent.page_categories];
       
      repeated string page_categories = 4;
      Specified by:
      getPageCategoriesBytes in interface ConditionOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the pageCategories at the given index.
    • setPageCategories

      public Condition.Builder setPageCategories(int index, String value)
       Used to support browse uses cases.
       A list (up to 10 entries) of categories or departments.
       The format should be the same as
       [UserEvent.page_categories][google.cloud.retail.v2alpha.UserEvent.page_categories];
       
      repeated string page_categories = 4;
      Parameters:
      index - The index to set the value at.
      value - The pageCategories to set.
      Returns:
      This builder for chaining.
    • addPageCategories

      public Condition.Builder addPageCategories(String value)
       Used to support browse uses cases.
       A list (up to 10 entries) of categories or departments.
       The format should be the same as
       [UserEvent.page_categories][google.cloud.retail.v2alpha.UserEvent.page_categories];
       
      repeated string page_categories = 4;
      Parameters:
      value - The pageCategories to add.
      Returns:
      This builder for chaining.
    • addAllPageCategories

      public Condition.Builder addAllPageCategories(Iterable<String> values)
       Used to support browse uses cases.
       A list (up to 10 entries) of categories or departments.
       The format should be the same as
       [UserEvent.page_categories][google.cloud.retail.v2alpha.UserEvent.page_categories];
       
      repeated string page_categories = 4;
      Parameters:
      values - The pageCategories to add.
      Returns:
      This builder for chaining.
    • clearPageCategories

      public Condition.Builder clearPageCategories()
       Used to support browse uses cases.
       A list (up to 10 entries) of categories or departments.
       The format should be the same as
       [UserEvent.page_categories][google.cloud.retail.v2alpha.UserEvent.page_categories];
       
      repeated string page_categories = 4;
      Returns:
      This builder for chaining.
    • addPageCategoriesBytes

      public Condition.Builder addPageCategoriesBytes(com.google.protobuf.ByteString value)
       Used to support browse uses cases.
       A list (up to 10 entries) of categories or departments.
       The format should be the same as
       [UserEvent.page_categories][google.cloud.retail.v2alpha.UserEvent.page_categories];
       
      repeated string page_categories = 4;
      Parameters:
      value - The bytes of the pageCategories to add.
      Returns:
      This builder for chaining.