Class: Google::Apis::FirebasehostingV1beta1::Rewrite

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 Rewrite 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.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Rewrite

Returns a new instance of Rewrite.



934
935
936
# File 'lib/google/apis/firebasehosting_v1beta1/classes.rb', line 934

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

Instance Attribute Details

The request will be forwarded to Firebase Dynamic Links. Corresponds to the JSON property dynamicLinks

Returns:

  • (Boolean)


900
901
902
# File 'lib/google/apis/firebasehosting_v1beta1/classes.rb', line 900

def dynamic_links
  @dynamic_links
end

#functionString

The function to proxy requests to. Must match the exported function name exactly. Corresponds to the JSON property function

Returns:

  • (String)


907
908
909
# File 'lib/google/apis/firebasehosting_v1beta1/classes.rb', line 907

def function
  @function
end

#globString

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

Returns:

  • (String)


913
914
915
# File 'lib/google/apis/firebasehosting_v1beta1/classes.rb', line 913

def glob
  @glob
end

#pathString

The URL path to rewrite the request to. Corresponds to the JSON property path

Returns:

  • (String)


918
919
920
# File 'lib/google/apis/firebasehosting_v1beta1/classes.rb', line 918

def path
  @path
end

#regexString

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

Returns:

  • (String)


923
924
925
# File 'lib/google/apis/firebasehosting_v1beta1/classes.rb', line 923

def regex
  @regex
end

#runGoogle::Apis::FirebasehostingV1beta1::CloudRunRewrite

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



932
933
934
# File 'lib/google/apis/firebasehosting_v1beta1/classes.rb', line 932

def run
  @run
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



939
940
941
942
943
944
945
946
# File 'lib/google/apis/firebasehosting_v1beta1/classes.rb', line 939

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