Class: Google::Apis::TrafficdirectorV2::StringMatcher

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#exactString

The input string must match exactly the string specified here. Examples: * * abc* only matches the value abc. Corresponds to the JSON property exact

Returns:

  • (String)


1166
1167
1168
# File 'generated/google/apis/trafficdirector_v2/classes.rb', line 1166

def exact
  @exact
end

#ignore_caseBoolean 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

Returns:

  • (Boolean)


1173
1174
1175
# File 'generated/google/apis/trafficdirector_v2/classes.rb', line 1173

def ignore_case
  @ignore_case
end

#prefixString

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

Returns:

  • (String)


1181
1182
1183
# File 'generated/google/apis/trafficdirector_v2/classes.rb', line 1181

def prefix
  @prefix
end

#regexString

The input string must match the regular expression specified here. The regex grammar is defined here_. Examples: * The regex \d`3matches the value *123* * The regex\d3`does not match the value *1234* * The regex\d3 `does not match the value *123.456* .. attention:: This field has been deprecated in favor ofsafe_regexas it is not safe for use with untrusted input in all cases. Corresponds to the JSON propertyregex`

Returns:

  • (String)


1191
1192
1193
# File 'generated/google/apis/trafficdirector_v2/classes.rb', line 1191

def regex
  @regex
end

#safe_regexGoogle::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

#suffixString

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

Returns:

  • (String)


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