Class: Google::Apis::FirebasehostingV1beta1::Redirect
- Inherits:
-
Object
- Object
- Google::Apis::FirebasehostingV1beta1::Redirect
- 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
-
#glob ⇒ String
The user-supplied glob pattern to match against the request URL path.
-
#location ⇒ String
Required.
-
#regex ⇒ String
The user-supplied RE2 regular expression to match against the request URL path.
-
#status_code ⇒ Fixnum
Required.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Redirect
constructor
A new instance of Redirect.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ Redirect
Returns a new instance of Redirect.
673 674 675 |
# File 'generated/google/apis/firebasehosting_v1beta1/classes.rb', line 673 def initialize(**args) update!(**args) end |
Instance Attribute Details
#glob ⇒ String
The user-supplied glob
pattern to match
against the request URL path.
Corresponds to the JSON property glob
647 648 649 |
# File 'generated/google/apis/firebasehosting_v1beta1/classes.rb', line 647 def glob @glob end |
#location ⇒ String
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*",
Corresponds to the JSON property
"statusCode": 301,
"location": "https://example.com/foo/:capture"location
659 660 661 |
# File 'generated/google/apis/firebasehosting_v1beta1/classes.rb', line 659 def location @location end |
#regex ⇒ String
The user-supplied RE2 regular expression to match against the request
URL path.
Corresponds to the JSON property regex
665 666 667 |
# File 'generated/google/apis/firebasehosting_v1beta1/classes.rb', line 665 def regex @regex end |
#status_code ⇒ Fixnum
Required. The status HTTP code to return in the response. It must be a
valid 3xx status code.
Corresponds to the JSON property statusCode
671 672 673 |
# File 'generated/google/apis/firebasehosting_v1beta1/classes.rb', line 671 def status_code @status_code end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
678 679 680 681 682 683 |
# File 'generated/google/apis/firebasehosting_v1beta1/classes.rb', line 678 def update!(**args) @glob = args[:glob] if args.key?(:glob) @location = args[:location] if args.key?(:location) @regex = args[:regex] if args.key?(:regex) @status_code = args[:status_code] if args.key?(:status_code) end |