Class: Google::Apis::DriveV2::File::Thumbnail

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

Overview

Thumbnail for the file. Only accepted on upload and for files that are not already thumbnailed by Google.

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) ⇒ Thumbnail

Returns a new instance of Thumbnail.



1861
1862
1863
# File 'generated/google/apis/drive_v2/classes.rb', line 1861

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

Instance Attribute Details

#imageString

The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5. Corresponds to the JSON property image

Returns:

  • (String)


1854
1855
1856
# File 'generated/google/apis/drive_v2/classes.rb', line 1854

def image
  @image
end

#mime_typeString

The MIME type of the thumbnail. Corresponds to the JSON property mimeType

Returns:

  • (String)


1859
1860
1861
# File 'generated/google/apis/drive_v2/classes.rb', line 1859

def mime_type
  @mime_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1866
1867
1868
1869
# File 'generated/google/apis/drive_v2/classes.rb', line 1866

def update!(**args)
  @image = args[:image] if args.key?(:image)
  @mime_type = args[:mime_type] if args.key?(:mime_type)
end