Class 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.GeneratedMessageV3.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.v2beta.Condition
    • 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<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.GeneratedMessageV3.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.GeneratedMessageV3.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
      • clone

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

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

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

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

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

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

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.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.v2beta.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.v2beta.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.v2beta.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.v2beta.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.v2beta.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.v2beta.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.v2beta.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.v2beta.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.v2beta.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.v2beta.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.v2beta.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.v2beta.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.v2beta.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.v2beta.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.v2beta.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.v2beta.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.v2beta.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.v2beta.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.v2beta.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.v2beta.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.v2beta.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.v2beta.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.v2beta.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.v2beta.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.v2beta.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.v2beta.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.v2beta.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.v2beta.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.v2beta.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.v2beta.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.v2beta.Condition.TimeRange active_time_range = 3;
      • 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.v2beta.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.v2beta.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.v2beta.Condition.TimeRange active_time_range = 3;
      • setUnknownFields

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

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