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: 9]
Instance Attribute Summary collapse
-
#contains ⇒ String
The input string must have the substring specified here.
-
#custom ⇒ Google::Apis::TrafficdirectorV3::TypedExtensionConfig
Message type for extension configuration.
-
#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.
1597 1598 1599 |
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1597 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 safe_regex instead. Examples: *
abcmatches the valuexyz.abc.def`
Corresponds to the JSON propertycontains`
1556 1557 1558 |
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1556 def contains @contains end |
#custom ⇒ Google::Apis::TrafficdirectorV3::TypedExtensionConfig
Message type for extension configuration.
Corresponds to the JSON property custom
1561 1562 1563 |
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1561 def custom @custom 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
1567 1568 1569 |
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1567 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
this option is set to true.
Corresponds to the JSON property ignoreCase
1575 1576 1577 |
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1575 def ignore_case @ignore_case end |
#prefix ⇒ String
The input string must have the prefix specified here. .. note:: Empty prefix
match is not allowed, please use safe_regex instead. Examples: * abc
matches the value abc.xyz
Corresponds to the JSON property prefix
1583 1584 1585 |
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1583 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
1588 1589 1590 |
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1588 def safe_regex @safe_regex end |
#suffix ⇒ String
The input string must have the suffix specified here. .. note:: Empty suffix
match is not allowed, please use safe_regex instead. Examples: * abc
matches the value xyz.abc
Corresponds to the JSON property suffix
1595 1596 1597 |
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1595 def suffix @suffix end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1602 1603 1604 1605 1606 1607 1608 1609 1610 |
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1602 def update!(**args) @contains = args[:contains] if args.key?(:contains) @custom = args[:custom] if args.key?(:custom) @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 |