Class: Google::Apis::StorageV1beta2::Bucket::Cor
- Inherits:
-
Object
- Object
- Google::Apis::StorageV1beta2::Bucket::Cor
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/storage_v1beta2/classes.rb,
generated/google/apis/storage_v1beta2/representations.rb,
generated/google/apis/storage_v1beta2/representations.rb
Instance Attribute Summary collapse
-
#max_age_seconds ⇒ Fixnum
The value, in seconds, to return in the Access-Control-Max-Age header used in preflight responses.
-
#method_prop ⇒ Array<String>
The list of HTTP methods on which to include CORS response headers: GET, OPTIONS, POST, etc.
-
#origin ⇒ Array<String>
The list of Origins eligible to receive CORS response headers.
-
#response_header ⇒ Array<String>
The list of HTTP headers other than the simple response headers to give permission for the user-agent to share across domains.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Cor
constructor
A new instance of Cor.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ Cor
Returns a new instance of Cor
175 176 177 |
# File 'generated/google/apis/storage_v1beta2/classes.rb', line 175 def initialize(**args) update!(**args) end |
Instance Attribute Details
#max_age_seconds ⇒ Fixnum
The value, in seconds, to return in the Access-Control-Max-Age header used in
preflight responses.
Corresponds to the JSON property maxAgeSeconds
154 155 156 |
# File 'generated/google/apis/storage_v1beta2/classes.rb', line 154 def max_age_seconds @max_age_seconds end |
#method_prop ⇒ Array<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
161 162 163 |
# File 'generated/google/apis/storage_v1beta2/classes.rb', line 161 def method_prop @method_prop end |
#origin ⇒ Array<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
167 168 169 |
# File 'generated/google/apis/storage_v1beta2/classes.rb', line 167 def origin @origin end |
#response_header ⇒ Array<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
173 174 175 |
# File 'generated/google/apis/storage_v1beta2/classes.rb', line 173 def response_header @response_header end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
180 181 182 183 184 185 |
# File 'generated/google/apis/storage_v1beta2/classes.rb', line 180 def update!(**args) @max_age_seconds = args[:max_age_seconds] if args.key?(:max_age_seconds) @method_prop = args[:method_prop] if args.key?(:method_prop) @origin = args[:origin] if args.key?(:origin) @response_header = args[:response_header] if args.key?(:response_header) end |