Class: Google::Apis::GamesV1::SnapshotCoverImageResource

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

Overview

Identifies a snapshot cover image resource. The image is provided by the game.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ SnapshotCoverImageResource

Returns a new instance of SnapshotCoverImageResource.



2596
2597
2598
# File 'generated/google/apis/games_v1/classes.rb', line 2596

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

Instance Attribute Details

#content_hashArray<Google::Apis::GamesV1::ContentHash>

Output only. Hash-like weak identifier of the uploaded image bytes, consistent per player per application per hash version. Within the context of a single player/application, it's guaranteed that two identical images coming from two different uploads will have the same content hash for the same hash algorithm version. It's extremely likely, though not guaranteed, that if two content hashes are equal, the images are identical. More than one content hash can be returned if more than one hash versions are supported. Corresponds to the JSON property contentHash



2561
2562
2563
# File 'generated/google/apis/games_v1/classes.rb', line 2561

def content_hash
  @content_hash
end

#download_urlString

Output only. A URL the client can use to download the image. May vary across requests, and only guaranteed to be valid for a short time after it is returned. Corresponds to the JSON property downloadUrl

Returns:

  • (String)


2568
2569
2570
# File 'generated/google/apis/games_v1/classes.rb', line 2568

def download_url
  @download_url
end

#heightFixnum

The height of the image in pixels. Corresponds to the JSON property height

Returns:

  • (Fixnum)


2573
2574
2575
# File 'generated/google/apis/games_v1/classes.rb', line 2573

def height
  @height
end

#mime_typeString

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

Returns:

  • (String)


2578
2579
2580
# File 'generated/google/apis/games_v1/classes.rb', line 2578

def mime_type
  @mime_type
end

#resource_idString

The ID of the image resource. It's guaranteed that if two IDs are equal then the contents are equal as well. It's not guaranteed that two identical blobs coming from separate uploads have the same ID. The resource ID can only be used within the application, user and resource type it was originally returned for. For example, it's not possible to use SnapshotDataResource's resource ID as the resource_id of a SnapshotCoverImageResource, even if the blob is a valid image file. Corresponds to the JSON property resourceId

Returns:

  • (String)


2589
2590
2591
# File 'generated/google/apis/games_v1/classes.rb', line 2589

def resource_id
  @resource_id
end

#widthFixnum

The width of the image in pixels. Corresponds to the JSON property width

Returns:

  • (Fixnum)


2594
2595
2596
# File 'generated/google/apis/games_v1/classes.rb', line 2594

def width
  @width
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2601
2602
2603
2604
2605
2606
2607
2608
# File 'generated/google/apis/games_v1/classes.rb', line 2601

def update!(**args)
  @content_hash = args[:content_hash] if args.key?(:content_hash)
  @download_url = args[:download_url] if args.key?(:download_url)
  @height = args[:height] if args.key?(:height)
  @mime_type = args[:mime_type] if args.key?(:mime_type)
  @resource_id = args[:resource_id] if args.key?(:resource_id)
  @width = args[:width] if args.key?(:width)
end