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.
1554 1555 1556 |
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1554 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
1518 1519 1520 |
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1518 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
1524 1525 1526 |
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1524 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
1532 1533 1534 |
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1532 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
1540 1541 1542 |
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1540 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
1545 1546 1547 |
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1545 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
1552 1553 1554 |
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1552 def suffix @suffix end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1559 1560 1561 1562 1563 1564 1565 1566 |
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1559 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 |