Class: Google::Apis::DriveV2::App::Icon

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

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

Returns a new instance of Icon



606
607
608
# File 'generated/google/apis/drive_v2/classes.rb', line 606

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

Instance Attribute Details

#categoryString

Category of the icon. Allowed values are:

  • application - icon for the application
  • document - icon for a file associated with the app
  • documentShared - icon for a shared file associated with the app Corresponds to the JSON property category

Returns:

  • (String)


594
595
596
# File 'generated/google/apis/drive_v2/classes.rb', line 594

def category
  @category
end

#icon_urlString

URL for the icon. Corresponds to the JSON property iconUrl

Returns:

  • (String)


599
600
601
# File 'generated/google/apis/drive_v2/classes.rb', line 599

def icon_url
  @icon_url
end

#sizeFixnum

Size of the icon. Represented as the maximum of the width and height. Corresponds to the JSON property size

Returns:

  • (Fixnum)


604
605
606
# File 'generated/google/apis/drive_v2/classes.rb', line 604

def size
  @size
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



611
612
613
614
615
# File 'generated/google/apis/drive_v2/classes.rb', line 611

def update!(**args)
  @category = args[:category] if args.key?(:category)
  @icon_url = args[:icon_url] if args.key?(:icon_url)
  @size = args[:size] if args.key?(:size)
end