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.
1573 1574 1575 |
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1573 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
1537 1538 1539 |
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1537 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
1543 1544 1545 |
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1543 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
1551 1552 1553 |
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1551 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
1559 1560 1561 |
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1559 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
1564 1565 1566 |
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1564 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
1571 1572 1573 |
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1571 def suffix @suffix end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1578 1579 1580 1581 1582 1583 1584 1585 |
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1578 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 |