Class: Google::Apis::TrafficdirectorV2::StringMatcher
- Inherits:
-
Object
- Object
- Google::Apis::TrafficdirectorV2::StringMatcher
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/trafficdirector_v2/classes.rb,
generated/google/apis/trafficdirector_v2/representations.rb,
generated/google/apis/trafficdirector_v2/representations.rb
Overview
Specifies the way to match a string. [#next-free-field: 7]
Instance Attribute Summary collapse
-
#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 matching should be case insensitive.
-
#prefix ⇒ String
The input string must have the prefix specified here.
-
#regex ⇒ String
The input string must match the regular expression specified here.
-
#safe_regex ⇒ Google::Apis::TrafficdirectorV2::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.
1205 1206 1207 |
# File 'generated/google/apis/trafficdirector_v2/classes.rb', line 1205 def initialize(**args) update!(**args) end |
Instance Attribute Details
#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
1166 1167 1168 |
# File 'generated/google/apis/trafficdirector_v2/classes.rb', line 1166 def exact @exact end |
#ignore_case ⇒ Boolean Also known as: ignore_case?
If true, indicates the exact/prefix/suffix 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
1173 1174 1175 |
# File 'generated/google/apis/trafficdirector_v2/classes.rb', line 1173 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
1181 1182 1183 |
# File 'generated/google/apis/trafficdirector_v2/classes.rb', line 1181 def prefix @prefix end |
#regex ⇒ String
The input string must match the regular expression specified here. The regex
grammar is defined here
_. Examples: * The regex \d`3
matches the value
*123* * The regex
\d
3`does not match the value *1234* * The regex
\d3
`does not match the value *123.456* .. attention:: This field has been
deprecated in favor of
safe_regexas it is not safe for use with untrusted
input in all cases.
Corresponds to the JSON property
regex`
1191 1192 1193 |
# File 'generated/google/apis/trafficdirector_v2/classes.rb', line 1191 def regex @regex end |
#safe_regex ⇒ Google::Apis::TrafficdirectorV2::RegexMatcher
A regex matcher designed for safety when used with untrusted input.
Corresponds to the JSON property safeRegex
1196 1197 1198 |
# File 'generated/google/apis/trafficdirector_v2/classes.rb', line 1196 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
1203 1204 1205 |
# File 'generated/google/apis/trafficdirector_v2/classes.rb', line 1203 def suffix @suffix end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1210 1211 1212 1213 1214 1215 1216 1217 |
# File 'generated/google/apis/trafficdirector_v2/classes.rb', line 1210 def update!(**args) @exact = args[:exact] if args.key?(:exact) @ignore_case = args[:ignore_case] if args.key?(:ignore_case) @prefix = args[:prefix] if args.key?(:prefix) @regex = args[:regex] if args.key?(:regex) @safe_regex = args[:safe_regex] if args.key?(:safe_regex) @suffix = args[:suffix] if args.key?(:suffix) end |