Class: Google::Apis::NetworkservicesV1beta1::HttpRouteHeaderModifier

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

Overview

The specification for modifying HTTP header in HTTP request and HTTP response.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ HttpRouteHeaderModifier

Returns a new instance of HttpRouteHeaderModifier.



1506
1507
1508
# File 'lib/google/apis/networkservices_v1beta1/classes.rb', line 1506

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

Instance Attribute Details

#addHash<String,String>

Add the headers with given map where key is the name of the header, value is the value of the header. Corresponds to the JSON property add

Returns:

  • (Hash<String,String>)


1493
1494
1495
# File 'lib/google/apis/networkservices_v1beta1/classes.rb', line 1493

def add
  @add
end

#removeArray<String>

Remove headers (matching by header names) specified in the list. Corresponds to the JSON property remove

Returns:

  • (Array<String>)


1498
1499
1500
# File 'lib/google/apis/networkservices_v1beta1/classes.rb', line 1498

def remove
  @remove
end

#setHash<String,String>

Completely overwrite/replace the headers with given map where key is the name of the header, value is the value of the header. Corresponds to the JSON property set

Returns:

  • (Hash<String,String>)


1504
1505
1506
# File 'lib/google/apis/networkservices_v1beta1/classes.rb', line 1504

def set
  @set
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1511
1512
1513
1514
1515
# File 'lib/google/apis/networkservices_v1beta1/classes.rb', line 1511

def update!(**args)
  @add = args[:add] if args.key?(:add)
  @remove = args[:remove] if args.key?(:remove)
  @set = args[:set] if args.key?(:set)
end