Class: Google::Apis::StorageV1::Bucket::CorsConfiguration

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/storage_v1/classes.rb,
generated/google/apis/storage_v1/representations.rb,
generated/google/apis/storage_v1/representations.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ CorsConfiguration

Returns a new instance of CorsConfiguration



223
224
225
# File 'generated/google/apis/storage_v1/classes.rb', line 223

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

Instance Attribute Details

#http_methodArray<String>

The list of HTTP methods on which to include CORS response headers, (GET, OPTIONS, POST, etc) Note: "*" is permitted in the list of methods, and means " any method". Corresponds to the JSON property method

Returns:

  • (Array<String>)


209
210
211
# File 'generated/google/apis/storage_v1/classes.rb', line 209

def http_method
  @http_method
end

#max_age_secondsFixnum

The value, in seconds, to return in the Access-Control-Max-Age header used in preflight responses. Corresponds to the JSON property maxAgeSeconds

Returns:

  • (Fixnum)


202
203
204
# File 'generated/google/apis/storage_v1/classes.rb', line 202

def max_age_seconds
  @max_age_seconds
end

#originArray<String>

The list of Origins eligible to receive CORS response headers. Note: "*" is permitted in the list of origins, and means "any Origin". Corresponds to the JSON property origin

Returns:

  • (Array<String>)


215
216
217
# File 'generated/google/apis/storage_v1/classes.rb', line 215

def origin
  @origin
end

#response_headerArray<String>

The list of HTTP headers other than the simple response headers to give permission for the user-agent to share across domains. Corresponds to the JSON property responseHeader

Returns:

  • (Array<String>)


221
222
223
# File 'generated/google/apis/storage_v1/classes.rb', line 221

def response_header
  @response_header
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



228
229
230
231
232
233
# File 'generated/google/apis/storage_v1/classes.rb', line 228

def update!(**args)
  @max_age_seconds = args[:max_age_seconds] if args.key?(:max_age_seconds)
  @http_method = args[:http_method] if args.key?(:http_method)
  @origin = args[:origin] if args.key?(:origin)
  @response_header = args[:response_header] if args.key?(:response_header)
end