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

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 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.



2649
2650
2651
# File 'generated/google/apis/games_v1/classes.rb', line 2649

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

Instance Attribute Details

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

Output only. Hash-like weak identifier of the uploaded blob, consistent per player per application per hash version. Within the context of a single player/ application, it's guaranteed that two identical blobs 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 blobs are identical. More than one content hash can be returned if more than one hash versions are supported. Corresponds to the JSON property contentHash



2624
2625
2626
# File 'generated/google/apis/games_v1/classes.rb', line 2624

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)


2631
2632
2633
# File 'generated/google/apis/games_v1/classes.rb', line 2631

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)


2642
2643
2644
# File 'generated/google/apis/games_v1/classes.rb', line 2642

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)


2647
2648
2649
# File 'generated/google/apis/games_v1/classes.rb', line 2647

def size
  @size
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2654
2655
2656
2657
2658
2659
# File 'generated/google/apis/games_v1/classes.rb', line 2654

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