Class: Google::Apis::PhotoslibraryV1::MediaMetadata

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

Metadata for a media item.

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

Returns a new instance of MediaMetadata



782
783
784
# File 'generated/google/apis/photoslibrary_v1/classes.rb', line 782

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

Instance Attribute Details

#creation_timeString

Time when the media item was first created (not when it was uploaded to Google Photos). Corresponds to the JSON property creationTime

Returns:

  • (String)


758
759
760
# File 'generated/google/apis/photoslibrary_v1/classes.rb', line 758

def creation_time
  @creation_time
end

#heightFixnum

Original height (in pixels) of the media item. Corresponds to the JSON property height

Returns:

  • (Fixnum)


763
764
765
# File 'generated/google/apis/photoslibrary_v1/classes.rb', line 763

def height
  @height
end

#photoGoogle::Apis::PhotoslibraryV1::Photo

Metadata that is specific to a photo, for example, ISO, focal length and exposure time. Some of these fields may be null or not included. Corresponds to the JSON property photo



769
770
771
# File 'generated/google/apis/photoslibrary_v1/classes.rb', line 769

def photo
  @photo
end

#videoGoogle::Apis::PhotoslibraryV1::Video

Metadata that is specific to a video, for example, fps and processing status. Some of these fields may be null or not included. Corresponds to the JSON property video



775
776
777
# File 'generated/google/apis/photoslibrary_v1/classes.rb', line 775

def video
  @video
end

#widthFixnum

Original width (in pixels) of the media item. Corresponds to the JSON property width

Returns:

  • (Fixnum)


780
781
782
# File 'generated/google/apis/photoslibrary_v1/classes.rb', line 780

def width
  @width
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



787
788
789
790
791
792
793
# File 'generated/google/apis/photoslibrary_v1/classes.rb', line 787

def update!(**args)
  @creation_time = args[:creation_time] if args.key?(:creation_time)
  @height = args[:height] if args.key?(:height)
  @photo = args[:photo] if args.key?(:photo)
  @video = args[:video] if args.key?(:video)
  @width = args[:width] if args.key?(:width)
end