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

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/games_v1/classes.rb,
lib/google/apis/games_v1/representations.rb,
lib/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.



2564
2565
2566
# File 'lib/google/apis/games_v1/classes.rb', line 2564

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

Instance Attribute Details

#content_hashString

Output only. Hash-like weak identifier of the uploaded image bytes, consistent per player per application. The content hash for a given resource will not change if the binary data hasn't changed. Except in very rare circumstances, the content_hash for matching binary data will be the same within a given player and application. Corresponds to the JSON property contentHash

Returns:

  • (String)


2529
2530
2531
# File 'lib/google/apis/games_v1/classes.rb', line 2529

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)


2536
2537
2538
# File 'lib/google/apis/games_v1/classes.rb', line 2536

def download_url
  @download_url
end

#heightFixnum

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

Returns:

  • (Fixnum)


2541
2542
2543
# File 'lib/google/apis/games_v1/classes.rb', line 2541

def height
  @height
end

#mime_typeString

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

Returns:

  • (String)


2546
2547
2548
# File 'lib/google/apis/games_v1/classes.rb', line 2546

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)


2557
2558
2559
# File 'lib/google/apis/games_v1/classes.rb', line 2557

def resource_id
  @resource_id
end

#widthFixnum

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

Returns:

  • (Fixnum)


2562
2563
2564
# File 'lib/google/apis/games_v1/classes.rb', line 2562

def width
  @width
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2569
2570
2571
2572
2573
2574
2575
2576
# File 'lib/google/apis/games_v1/classes.rb', line 2569

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