Class: Google::Apis::TrafficdirectorV3::StringMatcher

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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ StringMatcher

Returns a new instance of StringMatcher.



1586
1587
1588
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1586

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#containsString

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

Returns:

  • (String)


1545
1546
1547
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1545

def contains
  @contains
end

#customGoogle::Apis::TrafficdirectorV3::TypedExtensionConfig

Message type for extension configuration. Corresponds to the JSON property custom



1550
1551
1552
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1550

def custom
  @custom
end

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


1556
1557
1558
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1556

def exact
  @exact
end

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

Returns:

  • (Boolean)


1564
1565
1566
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1564

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)


1572
1573
1574
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1572

def prefix
  @prefix
end

#safe_regexGoogle::Apis::TrafficdirectorV3::RegexMatcher

A regex matcher designed for safety when used with untrusted input. Corresponds to the JSON property safeRegex



1577
1578
1579
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1577

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)


1584
1585
1586
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1584

def suffix
  @suffix
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1591
1592
1593
1594
1595
1596
1597
1598
1599
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 1591

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