class Google::Apis::FirebasehostingV1beta1::Rewrite

A [`Rewrite`](firebase.google.com/docs/hosting/full-config#rewrites) specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond as if the service were given the specified destination URL.

Attributes

function[RW]

The function to proxy requests to. Must match the exported function name exactly. Corresponds to the JSON property `function` @return [String]

glob[RW]

The user-supplied [glob](firebase.google.com/docs/hosting/full-config# glob_pattern_matching) to match against the request URL path. Corresponds to the JSON property `glob` @return [String]

path[RW]

The URL path to rewrite the request to. Corresponds to the JSON property `path` @return [String]

regex[RW]

The user-supplied RE2 regular expression to match against the request URL path. Corresponds to the JSON property `regex` @return [String]

run[RW]

A configured rewrite that directs requests to a Cloud Run service. If the Cloud Run service does not exist when setting or updating your Firebase Hosting configuration, then the request fails. Any errors from the Cloud Run service are passed to the end user (for example, if you delete a service, any requests directed to that service receive a `404` error). Corresponds to the JSON property `run` @return [Google::Apis::FirebasehostingV1beta1::CloudRunRewrite]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/firebasehosting_v1beta1/classes.rb, line 907
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/firebasehosting_v1beta1/classes.rb, line 912
def update!(**args)
  @dynamic_links = args[:dynamic_links] if args.key?(:dynamic_links)
  @function = args[:function] if args.key?(:function)
  @glob = args[:glob] if args.key?(:glob)
  @path = args[:path] if args.key?(:path)
  @regex = args[:regex] if args.key?(:regex)
  @run = args[:run] if args.key?(:run)
end