Class: Google::Apis::FirebasehostingV1beta1::Redirect

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

Overview

A redirect represents the configuration for returning an HTTP redirect response given a matching request URL path.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Redirect

Returns a new instance of Redirect



454
455
456
# File 'generated/google/apis/firebasehosting_v1beta1/classes.rb', line 454

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

Instance Attribute Details

#globString

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

Returns:

  • (String)


434
435
436
# File 'generated/google/apis/firebasehosting_v1beta1/classes.rb', line 434

def glob
  @glob
end

#locationString

Required. The value to put in the HTTP location header of the response.
The location can contain capture group values from the pattern using a : prefix to identify the segment and an optional * to capture the rest of the URL. For example: "glob": "/:capture*",
"statusCode": 301,
"location": "https://example.com/foo/:capture"
Corresponds to the JSON property location

Returns:

  • (String)


446
447
448
# File 'generated/google/apis/firebasehosting_v1beta1/classes.rb', line 446

def location
  @location
end

#status_codeFixnum

Required. The status HTTP code to return in the response. It must be a valid 3xx status code. Corresponds to the JSON property statusCode

Returns:

  • (Fixnum)


452
453
454
# File 'generated/google/apis/firebasehosting_v1beta1/classes.rb', line 452

def status_code
  @status_code
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



459
460
461
462
463
# File 'generated/google/apis/firebasehosting_v1beta1/classes.rb', line 459

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