Class: Google::Apis::FirebasehostingV1beta1::Header

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

Overview

A Header specifies a URL pattern that, if matched to the request URL path, triggers Hosting to apply the specified custom response headers.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Header

Returns a new instance of Header.



443
444
445
# File 'lib/google/apis/firebasehosting_v1beta1/classes.rb', line 443

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

Instance Attribute Details

#globString

The user-supplied glob to match against the request URL path. Corresponds to the JSON property glob

Returns:

  • (String)


431
432
433
# File 'lib/google/apis/firebasehosting_v1beta1/classes.rb', line 431

def glob
  @glob
end

#headersHash<String,String>

Required. The additional headers to add to the response. Corresponds to the JSON property headers

Returns:

  • (Hash<String,String>)


436
437
438
# File 'lib/google/apis/firebasehosting_v1beta1/classes.rb', line 436

def headers
  @headers
end

#regexString

The user-supplied RE2 regular expression to match against the request URL path. Corresponds to the JSON property regex

Returns:

  • (String)


441
442
443
# File 'lib/google/apis/firebasehosting_v1beta1/classes.rb', line 441

def regex
  @regex
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



448
449
450
451
452
# File 'lib/google/apis/firebasehosting_v1beta1/classes.rb', line 448

def update!(**args)
  @glob = args[:glob] if args.key?(:glob)
  @headers = args[:headers] if args.key?(:headers)
  @regex = args[:regex] if args.key?(:regex)
end