Class: Google::Apis::ComputeAlpha::HttpHeaderOption

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

Overview

Specification determining how headers are added to requests or responses.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ HttpHeaderOption

Returns a new instance of HttpHeaderOption.



12466
12467
12468
# File 'lib/google/apis/compute_alpha/classes.rb', line 12466

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

Instance Attribute Details

#header_nameString

The name of the header. Corresponds to the JSON property headerName

Returns:

  • (String)


12450
12451
12452
# File 'lib/google/apis/compute_alpha/classes.rb', line 12450

def header_name
  @header_name
end

#header_valueString

The value of the header to add. Corresponds to the JSON property headerValue

Returns:

  • (String)


12455
12456
12457
# File 'lib/google/apis/compute_alpha/classes.rb', line 12455

def header_value
  @header_value
end

#replaceBoolean Also known as: replace?

If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. The default value is false. Corresponds to the JSON property replace

Returns:

  • (Boolean)


12463
12464
12465
# File 'lib/google/apis/compute_alpha/classes.rb', line 12463

def replace
  @replace
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



12471
12472
12473
12474
12475
# File 'lib/google/apis/compute_alpha/classes.rb', line 12471

def update!(**args)
  @header_name = args[:header_name] if args.key?(:header_name)
  @header_value = args[:header_value] if args.key?(:header_value)
  @replace = args[:replace] if args.key?(:replace)
end