Class: Google::Apis::PhotoslibraryV1::NewMediaItem

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

Overview

New media item that will be created in a user's Google Photos account.

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

Returns a new instance of NewMediaItem



867
868
869
# File 'generated/google/apis/photoslibrary_v1/classes.rb', line 867

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

Instance Attribute Details

#descriptionString

Description of the media item. This will be shown to the user in the item's info section in the Google Photos app. This string should not be more than 1000 characters. Corresponds to the JSON property description

Returns:

  • (String)


860
861
862
# File 'generated/google/apis/photoslibrary_v1/classes.rb', line 860

def description
  @description
end

#simple_media_itemGoogle::Apis::PhotoslibraryV1::SimpleMediaItem

A simple media item to be created in Google Photos via an upload token. Corresponds to the JSON property simpleMediaItem



865
866
867
# File 'generated/google/apis/photoslibrary_v1/classes.rb', line 865

def simple_media_item
  @simple_media_item
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



872
873
874
875
# File 'generated/google/apis/photoslibrary_v1/classes.rb', line 872

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