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.



2574
2575
2576
# File 'lib/google/apis/games_v1/classes.rb', line 2574

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)


2539
2540
2541
# File 'lib/google/apis/games_v1/classes.rb', line 2539

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)


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

def download_url
  @download_url
end

#heightFixnum

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

Returns:

  • (Fixnum)


2551
2552
2553
# File 'lib/google/apis/games_v1/classes.rb', line 2551

def height
  @height
end

#mime_typeString

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

Returns:

  • (String)


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

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)


2567
2568
2569
# File 'lib/google/apis/games_v1/classes.rb', line 2567

def resource_id
  @resource_id
end

#widthFixnum

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

Returns:

  • (Fixnum)


2572
2573
2574
# File 'lib/google/apis/games_v1/classes.rb', line 2572

def width
  @width
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2579
2580
2581
2582
2583
2584
2585
2586
# File 'lib/google/apis/games_v1/classes.rb', line 2579

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