Class: Google::Apis::StorageV1beta1::Object::Media
- Inherits:
-
Object
- Object
- Google::Apis::StorageV1beta1::Object::Media
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/storage_v1beta1/classes.rb,
generated/google/apis/storage_v1beta1/representations.rb,
generated/google/apis/storage_v1beta1/representations.rb
Overview
Object media data. Provided on your behalf when uploading raw media or multipart/related with an auxiliary media part.
Instance Attribute Summary collapse
-
#algorithm ⇒ String
Hash algorithm used.
-
#content_type ⇒ String
Content-Type of the object data.
-
#data ⇒ String
URL-safe Base64-encoded data.
-
#hash_prop ⇒ String
Hash of the data.
-
#length ⇒ Fixnum
Content-Length of the data in bytes.
-
#link ⇒ String
Media download link.
-
#time_created ⇒ DateTime
Creation time of the data in RFC 3339 format.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Media
constructor
A new instance of Media.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ Media
Returns a new instance of Media
423 424 425 |
# File 'generated/google/apis/storage_v1beta1/classes.rb', line 423 def initialize(**args) update!(**args) end |
Instance Attribute Details
#algorithm ⇒ String
Hash algorithm used. Currently only MD5 is supported. Required if a hash is
provided.
Corresponds to the JSON property algorithm
387 388 389 |
# File 'generated/google/apis/storage_v1beta1/classes.rb', line 387 def algorithm @algorithm end |
#content_type ⇒ String
Content-Type of the object data.
Corresponds to the JSON property contentType
392 393 394 |
# File 'generated/google/apis/storage_v1beta1/classes.rb', line 392 def content_type @content_type end |
#data ⇒ String
URL-safe Base64-encoded data. This property can be used to insert objects
under 64KB in size, and will only be returned in response to the get method
for objects so created. When this resource is returned in response to the list
method, this property is omitted.
Corresponds to the JSON property data
NOTE: Values are automatically base64 encoded/decoded in the client library.
401 402 403 |
# File 'generated/google/apis/storage_v1beta1/classes.rb', line 401 def data @data end |
#hash_prop ⇒ String
Hash of the data. Required if a hash algorithm is provided.
Corresponds to the JSON property hash
406 407 408 |
# File 'generated/google/apis/storage_v1beta1/classes.rb', line 406 def hash_prop @hash_prop end |
#length ⇒ Fixnum
Content-Length of the data in bytes.
Corresponds to the JSON property length
411 412 413 |
# File 'generated/google/apis/storage_v1beta1/classes.rb', line 411 def length @length end |
#link ⇒ String
Media download link.
Corresponds to the JSON property link
416 417 418 |
# File 'generated/google/apis/storage_v1beta1/classes.rb', line 416 def link @link end |
#time_created ⇒ DateTime
Creation time of the data in RFC 3339 format.
Corresponds to the JSON property timeCreated
421 422 423 |
# File 'generated/google/apis/storage_v1beta1/classes.rb', line 421 def time_created @time_created end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
428 429 430 431 432 433 434 435 436 |
# File 'generated/google/apis/storage_v1beta1/classes.rb', line 428 def update!(**args) @algorithm = args[:algorithm] if args.key?(:algorithm) @content_type = args[:content_type] if args.key?(:content_type) @data = args[:data] if args.key?(:data) @hash_prop = args[:hash_prop] if args.key?(:hash_prop) @length = args[:length] if args.key?(:length) @link = args[:link] if args.key?(:link) @time_created = args[:time_created] if args.key?(:time_created) end |