Class: Google::Apis::GamesV1::SnapshotDataResource

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 data resource. The data is provided by the game.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ SnapshotDataResource

Returns a new instance of SnapshotDataResource.



2615
2616
2617
# File 'lib/google/apis/games_v1/classes.rb', line 2615

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

Instance Attribute Details

#content_hashString

Output only. Hash-like weak identifier of the uploaded blob 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)


2590
2591
2592
# File 'lib/google/apis/games_v1/classes.rb', line 2590

def content_hash
  @content_hash
end

#download_urlString

Output only. A URL that the client can use to download the blob. 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)


2597
2598
2599
# File 'lib/google/apis/games_v1/classes.rb', line 2597

def download_url
  @download_url
end

#resource_idString

The ID of the blob 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 resource 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)


2608
2609
2610
# File 'lib/google/apis/games_v1/classes.rb', line 2608

def resource_id
  @resource_id
end

#sizeFixnum

Output only. Size of the saved game blob in bytes. Corresponds to the JSON property size

Returns:

  • (Fixnum)


2613
2614
2615
# File 'lib/google/apis/games_v1/classes.rb', line 2613

def size
  @size
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2620
2621
2622
2623
2624
2625
# File 'lib/google/apis/games_v1/classes.rb', line 2620

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