Class: Google::Apis::NetworkservicesV1::HttpRouteHeaderMatch

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/networkservices_v1/classes.rb,
lib/google/apis/networkservices_v1/representations.rb,
lib/google/apis/networkservices_v1/representations.rb

Overview

Specifies how to select a route rule based on HTTP request headers.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ HttpRouteHeaderMatch

Returns a new instance of HttpRouteHeaderMatch.



1575
1576
1577
# File 'lib/google/apis/networkservices_v1/classes.rb', line 1575

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

Instance Attribute Details

#exact_matchString

The value of the header should match exactly the content of exact_match. Corresponds to the JSON property exactMatch

Returns:

  • (String)


1532
1533
1534
# File 'lib/google/apis/networkservices_v1/classes.rb', line 1532

def exact_match
  @exact_match
end

#headerString

The name of the HTTP header to match against. Corresponds to the JSON property header

Returns:

  • (String)


1537
1538
1539
# File 'lib/google/apis/networkservices_v1/classes.rb', line 1537

def header
  @header
end

#invert_matchBoolean Also known as: invert_match?

If specified, the match result will be inverted before checking. Default value is set to false. Corresponds to the JSON property invertMatch

Returns:

  • (Boolean)


1543
1544
1545
# File 'lib/google/apis/networkservices_v1/classes.rb', line 1543

def invert_match
  @invert_match
end

#prefix_matchString

The value of the header must start with the contents of prefix_match. Corresponds to the JSON property prefixMatch

Returns:

  • (String)


1549
1550
1551
# File 'lib/google/apis/networkservices_v1/classes.rb', line 1549

def prefix_match
  @prefix_match
end

#present_matchBoolean Also known as: present_match?

A header with header_name must exist. The match takes place whether or not the header has a value. Corresponds to the JSON property presentMatch

Returns:

  • (Boolean)


1555
1556
1557
# File 'lib/google/apis/networkservices_v1/classes.rb', line 1555

def present_match
  @present_match
end

#range_matchGoogle::Apis::NetworkservicesV1::HttpRouteHeaderMatchIntegerRange

Represents an integer value range. Corresponds to the JSON property rangeMatch



1561
1562
1563
# File 'lib/google/apis/networkservices_v1/classes.rb', line 1561

def range_match
  @range_match
end

#regex_matchString

The value of the header must match the regular expression specified in regex_match. For regular expression grammar, please see: https://github.com/ google/re2/wiki/Syntax Corresponds to the JSON property regexMatch

Returns:

  • (String)


1568
1569
1570
# File 'lib/google/apis/networkservices_v1/classes.rb', line 1568

def regex_match
  @regex_match
end

#suffix_matchString

The value of the header must end with the contents of suffix_match. Corresponds to the JSON property suffixMatch

Returns:

  • (String)


1573
1574
1575
# File 'lib/google/apis/networkservices_v1/classes.rb', line 1573

def suffix_match
  @suffix_match
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
# File 'lib/google/apis/networkservices_v1/classes.rb', line 1580

def update!(**args)
  @exact_match = args[:exact_match] if args.key?(:exact_match)
  @header = args[:header] if args.key?(:header)
  @invert_match = args[:invert_match] if args.key?(:invert_match)
  @prefix_match = args[:prefix_match] if args.key?(:prefix_match)
  @present_match = args[:present_match] if args.key?(:present_match)
  @range_match = args[:range_match] if args.key?(:range_match)
  @regex_match = args[:regex_match] if args.key?(:regex_match)
  @suffix_match = args[:suffix_match] if args.key?(:suffix_match)
end