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

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 Redirect specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond with a redirect to the specified destination path.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Redirect

Returns a new instance of Redirect.



1368
1369
1370
# File 'lib/google/apis/firebasehosting_v1beta1/classes.rb', line 1368

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)


1346
1347
1348
# File 'lib/google/apis/firebasehosting_v1beta1/classes.rb', line 1346

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)


1355
1356
1357
# File 'lib/google/apis/firebasehosting_v1beta1/classes.rb', line 1355

def location
  @location
end

#regexString

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

Returns:

  • (String)


1360
1361
1362
# File 'lib/google/apis/firebasehosting_v1beta1/classes.rb', line 1360

def regex
  @regex
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)


1366
1367
1368
# File 'lib/google/apis/firebasehosting_v1beta1/classes.rb', line 1366

def status_code
  @status_code
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1373
1374
1375
1376
1377
1378
# File 'lib/google/apis/firebasehosting_v1beta1/classes.rb', line 1373

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