Class: Google::Apis::ComputeV1::HttpHeaderMatch

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
generated/google/apis/compute_v1/classes.rb,
generated/google/apis/compute_v1/representations.rb,
generated/google/apis/compute_v1/representations.rb

Overview

matchRule criteria for request header matches.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ HttpHeaderMatch

Returns a new instance of HttpHeaderMatch



7974
7975
7976
# File 'generated/google/apis/compute_v1/classes.rb', line 7974

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

Instance Attribute Details

#exact_matchString

The value should exactly match contents of exactMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. Corresponds to the JSON property exactMatch

Returns:

  • (String)


7914
7915
7916
# File 'generated/google/apis/compute_v1/classes.rb', line 7914

def exact_match
  @exact_match
end

#header_nameString

The name of the HTTP header to match. For matching against the HTTP request's authority, use a headerMatch with the header name ":authority". For matching a request's method, use the headerName ":method". Corresponds to the JSON property headerName

Returns:

  • (String)


7922
7923
7924
# File 'generated/google/apis/compute_v1/classes.rb', line 7922

def header_name
  @header_name
end

#invert_matchBoolean Also known as: invert_match?

If set to false, the headerMatch is considered a match if the match criteria above are met. If set to true, the headerMatch is considered a match if the match criteria above are NOT met. The default setting is false. Corresponds to the JSON property invertMatch

Returns:

  • (Boolean)


7930
7931
7932
# File 'generated/google/apis/compute_v1/classes.rb', line 7930

def invert_match
  @invert_match
end

#prefix_matchString

The value of the header must start with the contents of prefixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. Corresponds to the JSON property prefixMatch

Returns:

  • (String)


7938
7939
7940
# File 'generated/google/apis/compute_v1/classes.rb', line 7938

def prefix_match
  @prefix_match
end

#present_matchBoolean Also known as: present_match?

A header with the contents of headerName must exist. The match takes place whether or not the request's header has a value or not. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. Corresponds to the JSON property presentMatch

Returns:

  • (Boolean)


7946
7947
7948
# File 'generated/google/apis/compute_v1/classes.rb', line 7946

def present_match
  @present_match
end

#range_matchGoogle::Apis::ComputeV1::Int64RangeMatch

HttpRouteRuleMatch criteria for field values that must stay within the specified integer range. Corresponds to the JSON property rangeMatch



7953
7954
7955
# File 'generated/google/apis/compute_v1/classes.rb', line 7953

def range_match
  @range_match
end

#regex_matchString

The value of the header must match the regualar expression specified in regexMatch. For regular expression grammar, please see: en.cppreference.com/w/ cpp/regex/ecmascript For matching against a port specified in the HTTP request, use a headerMatch with headerName set to PORT and a regular expression that satisfies the RFC2616 Host header's port specifier. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. Corresponds to the JSON property regexMatch

Returns:

  • (String)


7965
7966
7967
# File 'generated/google/apis/compute_v1/classes.rb', line 7965

def regex_match
  @regex_match
end

#suffix_matchString

The value of the header must end with the contents of suffixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. Corresponds to the JSON property suffixMatch

Returns:

  • (String)


7972
7973
7974
# File 'generated/google/apis/compute_v1/classes.rb', line 7972

def suffix_match
  @suffix_match
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
# File 'generated/google/apis/compute_v1/classes.rb', line 7979

def update!(**args)
  @exact_match = args[:exact_match] if args.key?(:exact_match)
  @header_name = args[:header_name] if args.key?(:header_name)
  @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