Class: Google::Cloud::Retail::V2::Condition

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/retail/v2/common.rb

Overview

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.

Defined Under Namespace

Classes: QueryTerm, TimeRange

Instance Attribute Summary collapse

Instance Attribute Details

#active_time_range::Array<::Google::Cloud::Retail::V2::Condition::TimeRange>

Returns Range of time(s) specifying when Condition is active. Condition true if any time range matches.

Returns:



46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# File 'proto_docs/google/cloud/retail/v2/common.rb', line 46

class Condition
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Query terms that we want to match on.
  # @!attribute [rw] value
  #   @return [::String]
  #     The value of the term to match on.
  #     Value cannot be empty.
  #     Value can have at most 3 terms if specified as a partial match. Each
  #     space separated string is considered as one term.
  #     For example, "a b c" is 3 terms and allowed, but " a b c d" is 4 terms
  #     and not allowed for a partial match.
  # @!attribute [rw] full_match
  #   @return [::Boolean]
  #     Whether this is supposed to be a full or partial match.
  class QueryTerm
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Used for time-dependent conditions.
  # Example: Want to have rule applied for week long sale.
  # @!attribute [rw] start_time
  #   @return [::Google::Protobuf::Timestamp]
  #     Start of time range. Range is inclusive.
  # @!attribute [rw] end_time
  #   @return [::Google::Protobuf::Timestamp]
  #     End of time range. Range is inclusive.
  class TimeRange
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#page_categories::Array<::String>

Returns 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;.

Returns:

  • (::Array<::String>)

    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;



46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# File 'proto_docs/google/cloud/retail/v2/common.rb', line 46

class Condition
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Query terms that we want to match on.
  # @!attribute [rw] value
  #   @return [::String]
  #     The value of the term to match on.
  #     Value cannot be empty.
  #     Value can have at most 3 terms if specified as a partial match. Each
  #     space separated string is considered as one term.
  #     For example, "a b c" is 3 terms and allowed, but " a b c d" is 4 terms
  #     and not allowed for a partial match.
  # @!attribute [rw] full_match
  #   @return [::Boolean]
  #     Whether this is supposed to be a full or partial match.
  class QueryTerm
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Used for time-dependent conditions.
  # Example: Want to have rule applied for week long sale.
  # @!attribute [rw] start_time
  #   @return [::Google::Protobuf::Timestamp]
  #     Start of time range. Range is inclusive.
  # @!attribute [rw] end_time
  #   @return [::Google::Protobuf::Timestamp]
  #     End of time range. Range is inclusive.
  class TimeRange
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#query_terms::Array<::Google::Cloud::Retail::V2::Condition::QueryTerm>

Returns 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).

Returns:

  • (::Array<::Google::Cloud::Retail::V2::Condition::QueryTerm>)

    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).



46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# File 'proto_docs/google/cloud/retail/v2/common.rb', line 46

class Condition
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Query terms that we want to match on.
  # @!attribute [rw] value
  #   @return [::String]
  #     The value of the term to match on.
  #     Value cannot be empty.
  #     Value can have at most 3 terms if specified as a partial match. Each
  #     space separated string is considered as one term.
  #     For example, "a b c" is 3 terms and allowed, but " a b c d" is 4 terms
  #     and not allowed for a partial match.
  # @!attribute [rw] full_match
  #   @return [::Boolean]
  #     Whether this is supposed to be a full or partial match.
  class QueryTerm
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Used for time-dependent conditions.
  # Example: Want to have rule applied for week long sale.
  # @!attribute [rw] start_time
  #   @return [::Google::Protobuf::Timestamp]
  #     Start of time range. Range is inclusive.
  # @!attribute [rw] end_time
  #   @return [::Google::Protobuf::Timestamp]
  #     End of time range. Range is inclusive.
  class TimeRange
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end