Class: Google::Apis::NetworkservicesV1::HttpRouteHeaderMatch
- Inherits:
-
Object
- Object
- Google::Apis::NetworkservicesV1::HttpRouteHeaderMatch
- 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
-
#exact_match ⇒ String
The value of the header should match exactly the content of exact_match.
-
#header ⇒ String
The name of the HTTP header to match against.
-
#invert_match ⇒ Boolean
(also: #invert_match?)
If specified, the match result will be inverted before checking.
-
#prefix_match ⇒ String
The value of the header must start with the contents of prefix_match.
-
#present_match ⇒ Boolean
(also: #present_match?)
A header with header_name must exist.
-
#range_match ⇒ Google::Apis::NetworkservicesV1::HttpRouteHeaderMatchIntegerRange
Represents an integer value range.
-
#regex_match ⇒ String
The value of the header must match the regular expression specified in regex_match.
-
#suffix_match ⇒ String
The value of the header must end with the contents of suffix_match.
Instance Method Summary collapse
-
#initialize(**args) ⇒ HttpRouteHeaderMatch
constructor
A new instance of HttpRouteHeaderMatch.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ HttpRouteHeaderMatch
Returns a new instance of HttpRouteHeaderMatch.
2135 2136 2137 |
# File 'lib/google/apis/networkservices_v1/classes.rb', line 2135 def initialize(**args) update!(**args) end |
Instance Attribute Details
#exact_match ⇒ String
The value of the header should match exactly the content of exact_match.
Corresponds to the JSON property exactMatch
2092 2093 2094 |
# File 'lib/google/apis/networkservices_v1/classes.rb', line 2092 def exact_match @exact_match end |
#header ⇒ String
The name of the HTTP header to match against.
Corresponds to the JSON property header
2097 2098 2099 |
# File 'lib/google/apis/networkservices_v1/classes.rb', line 2097 def header @header end |
#invert_match ⇒ Boolean 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
2103 2104 2105 |
# File 'lib/google/apis/networkservices_v1/classes.rb', line 2103 def invert_match @invert_match end |
#prefix_match ⇒ String
The value of the header must start with the contents of prefix_match.
Corresponds to the JSON property prefixMatch
2109 2110 2111 |
# File 'lib/google/apis/networkservices_v1/classes.rb', line 2109 def prefix_match @prefix_match end |
#present_match ⇒ Boolean 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
2115 2116 2117 |
# File 'lib/google/apis/networkservices_v1/classes.rb', line 2115 def present_match @present_match end |
#range_match ⇒ Google::Apis::NetworkservicesV1::HttpRouteHeaderMatchIntegerRange
Represents an integer value range.
Corresponds to the JSON property rangeMatch
2121 2122 2123 |
# File 'lib/google/apis/networkservices_v1/classes.rb', line 2121 def range_match @range_match end |
#regex_match ⇒ String
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
2128 2129 2130 |
# File 'lib/google/apis/networkservices_v1/classes.rb', line 2128 def regex_match @regex_match end |
#suffix_match ⇒ String
The value of the header must end with the contents of suffix_match.
Corresponds to the JSON property suffixMatch
2133 2134 2135 |
# File 'lib/google/apis/networkservices_v1/classes.rb', line 2133 def suffix_match @suffix_match end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 |
# File 'lib/google/apis/networkservices_v1/classes.rb', line 2140 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 |