class Google::Apis::TrafficdirectorV2::StringMatcher

Specifies the way to match a string. [#next-free-field: 7]

Attributes

exact[RW]

The input string must match exactly the string specified here. Examples: * * abc* only matches the value abc. Corresponds to the JSON property `exact` @return [String]

ignore_case[RW]

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` @return [Boolean]

ignore_case?[RW]

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` @return [Boolean]

prefix[RW]

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` @return [String]

regex[RW]

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 “d`3`

“ does not match the value 123.456 .. attention

This field has been

deprecated in favor of `safe_regex` as it is not safe for use with untrusted input in all cases. Corresponds to the JSON property `regex` @return [String]

safe_regex[RW]

A regex matcher designed for safety when used with untrusted input. Corresponds to the JSON property `safeRegex` @return [Google::Apis::TrafficdirectorV2::RegexMatcher]

suffix[RW]

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` @return [String]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/trafficdirector_v2/classes.rb, line 1205
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/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