Class: Google::Apis::FirebasehostingV1beta1::ServingConfig

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

The configuration for how incoming requests to a site should be routed and processed before serving content. The URL request paths are matched against the specified URL patterns in the configuration, then Hosting applies the applicable configuration according to a specific priority order.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ServingConfig

Returns a new instance of ServingConfig.



960
961
962
# File 'generated/google/apis/firebasehosting_v1beta1/classes.rb', line 960

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

Instance Attribute Details

#app_associationString

How to handle well known App Association files. Corresponds to the JSON property appAssociation

Returns:

  • (String)


921
922
923
# File 'generated/google/apis/firebasehosting_v1beta1/classes.rb', line 921

def app_association
  @app_association
end

#clean_urlsBoolean Also known as: clean_urls?

Defines whether to drop the file extension from uploaded files. Corresponds to the JSON property cleanUrls

Returns:

  • (Boolean)


926
927
928
# File 'generated/google/apis/firebasehosting_v1beta1/classes.rb', line 926

def clean_urls
  @clean_urls
end

#headersArray<Google::Apis::FirebasehostingV1beta1::Header>

An array of objects, where each object specifies a URL pattern that, if matched to the request URL path, triggers Hosting to apply the specified custom response headers. Corresponds to the JSON property headers



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

def headers
  @headers
end

#i18nGoogle::Apis::FirebasehostingV1beta1::I18nConfig

If provided, i18n rewrites are enabled. Corresponds to the JSON property i18n



939
940
941
# File 'generated/google/apis/firebasehosting_v1beta1/classes.rb', line 939

def i18n
  @i18n
end

#redirectsArray<Google::Apis::FirebasehostingV1beta1::Redirect>

An array of objects (called redirect rules), where each rule specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond with a redirect to the specified destination path. Corresponds to the JSON property redirects



946
947
948
# File 'generated/google/apis/firebasehosting_v1beta1/classes.rb', line 946

def redirects
  @redirects
end

#rewritesArray<Google::Apis::FirebasehostingV1beta1::Rewrite>

An array of objects (called rewrite rules), where each rule 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. Corresponds to the JSON property rewrites



953
954
955
# File 'generated/google/apis/firebasehosting_v1beta1/classes.rb', line 953

def rewrites
  @rewrites
end

#trailing_slash_behaviorString

Defines how to handle a trailing slash in the URL path. Corresponds to the JSON property trailingSlashBehavior

Returns:

  • (String)


958
959
960
# File 'generated/google/apis/firebasehosting_v1beta1/classes.rb', line 958

def trailing_slash_behavior
  @trailing_slash_behavior
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



965
966
967
968
969
970
971
972
973
# File 'generated/google/apis/firebasehosting_v1beta1/classes.rb', line 965

def update!(**args)
  @app_association = args[:app_association] if args.key?(:app_association)
  @clean_urls = args[:clean_urls] if args.key?(:clean_urls)
  @headers = args[:headers] if args.key?(:headers)
  @i18n = args[:i18n] if args.key?(:i18n)
  @redirects = args[:redirects] if args.key?(:redirects)
  @rewrites = args[:rewrites] if args.key?(:rewrites)
  @trailing_slash_behavior = args[:trailing_slash_behavior] if args.key?(:trailing_slash_behavior)
end