Class: Google::Apis::TrafficdirectorV3::StringMatcher
- Inherits:
-
Object
- Object
- Google::Apis::TrafficdirectorV3::StringMatcher
- 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 string. [#next-free-field: 8]
Instance Attribute Summary collapse
-
#contains ⇒ String
The input string must have the substring specified here.
-
#exact ⇒ String
The input string must match exactly the string specified here.
-
#ignore_case ⇒ Boolean
(also: #ignore_case?)
If true, indicates the exact/prefix/suffix/contains matching should be case insensitive.
-
#prefix ⇒ String
The input string must have the prefix specified here.
-
#safe_regex ⇒ Google::Apis::TrafficdirectorV3::RegexMatcher
A regex matcher designed for safety when used with untrusted input.
-
#suffix ⇒ String
The input string must have the suffix specified here.
Instance Method Summary collapse
-
#initialize(**args) ⇒ StringMatcher
constructor
A new instance of StringMatcher.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ StringMatcher
Returns a new instance of StringMatcher.
1581 1582 1583 |
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1581 def initialize(**args) update!(**args) end |
Instance Attribute Details
#contains ⇒ String
The input string must have the substring specified here. Note: empty contains
match is not allowed, please use regex instead. Examples: * abc matches
the value xyz.abc.def
Corresponds to the JSON property contains
1545 1546 1547 |
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1545 def contains @contains end |
#exact ⇒ String
The input string must match exactly the string specified here. Examples: *
abc only matches the value abc.
Corresponds to the JSON property exact
1551 1552 1553 |
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1551 def exact @exact end |
#ignore_case ⇒ Boolean Also known as: ignore_case?
If true, indicates the exact/prefix/suffix/contains matching should be case
insensitive. This has no effect for the safe_regex match. For example, the
matcher data will match both input string Data and data if set to
true.
Corresponds to the JSON property ignoreCase
1559 1560 1561 |
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1559 def ignore_case @ignore_case end |
#prefix ⇒ String
The input string must have the prefix specified here. Note: empty prefix is
not allowed, please use regex instead. Examples: * abc matches the value
abc.xyz
Corresponds to the JSON property prefix
1567 1568 1569 |
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1567 def prefix @prefix end |
#safe_regex ⇒ Google::Apis::TrafficdirectorV3::RegexMatcher
A regex matcher designed for safety when used with untrusted input.
Corresponds to the JSON property safeRegex
1572 1573 1574 |
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1572 def safe_regex @safe_regex end |
#suffix ⇒ String
The input string must have the suffix specified here. Note: empty prefix is
not allowed, please use regex instead. Examples: * abc matches the value
xyz.abc
Corresponds to the JSON property suffix
1579 1580 1581 |
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1579 def suffix @suffix end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1586 1587 1588 1589 1590 1591 1592 1593 |
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1586 def update!(**args) @contains = args[:contains] if args.key?(:contains) @exact = args[:exact] if args.key?(:exact) @ignore_case = args[:ignore_case] if args.key?(:ignore_case) @prefix = args[:prefix] if args.key?(:prefix) @safe_regex = args[:safe_regex] if args.key?(:safe_regex) @suffix = args[:suffix] if args.key?(:suffix) end |