Class: Google::Apis::TrafficdirectorV3::ValueMatcher

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/trafficdirector_v3/classes.rb,
lib/google/apis/trafficdirector_v3/representations.rb,
lib/google/apis/trafficdirector_v3/representations.rb

Overview

Specifies the way to match a Protobuf::Value. Primitive values and ListValue are supported. StructValue is not supported and is always not matched. [#next- free-field: 8]

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ValueMatcher

Returns a new instance of ValueMatcher.



1766
1767
1768
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1766

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#bool_matchBoolean Also known as: bool_match?

If specified, a match occurs if and only if the target value is a bool value and is equal to this field. Corresponds to the JSON property boolMatch

Returns:

  • (Boolean)


1730
1731
1732
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1730

def bool_match
  @bool_match
end

#double_matchGoogle::Apis::TrafficdirectorV3::DoubleMatcher

Specifies the way to match a double value. Corresponds to the JSON property doubleMatch



1736
1737
1738
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1736

def double_match
  @double_match
end

#list_matchGoogle::Apis::TrafficdirectorV3::ListMatcher

Specifies the way to match a list value. Corresponds to the JSON property listMatch



1741
1742
1743
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1741

def list_match
  @list_match
end

#null_matchGoogle::Apis::TrafficdirectorV3::NullMatch

NullMatch is an empty message to specify a null value. Corresponds to the JSON property nullMatch



1746
1747
1748
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1746

def null_match
  @null_match
end

#or_matchGoogle::Apis::TrafficdirectorV3::OrMatcher

Specifies a list of alternatives for the match. Corresponds to the JSON property orMatch



1751
1752
1753
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1751

def or_match
  @or_match
end

#present_matchBoolean Also known as: present_match?

If specified, value match will be performed based on whether the path is referring to a valid primitive value in the metadata. If the path is referring to a non-primitive value, the result is always not matched. Corresponds to the JSON property presentMatch

Returns:

  • (Boolean)


1758
1759
1760
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1758

def present_match
  @present_match
end

#string_matchGoogle::Apis::TrafficdirectorV3::StringMatcher

Specifies the way to match a string. [#next-free-field: 9] Corresponds to the JSON property stringMatch



1764
1765
1766
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1764

def string_match
  @string_match
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1771
1772
1773
1774
1775
1776
1777
1778
1779
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1771

def update!(**args)
  @bool_match = args[:bool_match] if args.key?(:bool_match)
  @double_match = args[:double_match] if args.key?(:double_match)
  @list_match = args[:list_match] if args.key?(:list_match)
  @null_match = args[:null_match] if args.key?(:null_match)
  @or_match = args[:or_match] if args.key?(:or_match)
  @present_match = args[:present_match] if args.key?(:present_match)
  @string_match = args[:string_match] if args.key?(:string_match)
end