Class: Google::Apis::GamesV1::SnapshotExtended

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

A snapshot represents a saved game state referred to using the developer- provided snapshot_id (think of it as a file's path). The set of attributes and binary data for a specific state is called a revision. Each revision is itself immutable, and referred to by a snapshot_revision_id. At any time, a snapshot has a "head" revision, and updates are made against that revision. If a snapshot update is received that isn't against the current head revision, then instead of changing the head revision it will result in a conflicting revision that must be specifically resolved.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ SnapshotExtended

Returns a new instance of SnapshotExtended.



2701
2702
2703
# File 'generated/google/apis/games_v1/classes.rb', line 2701

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

Instance Attribute Details

#conflicting_revisionsArray<Google::Apis::GamesV1::SnapshotRevision>

A list of conflicting revisions. Only set if explicitly requested (e.g. using a field mask or a request flag), or if the RPC guarantees that this field is set. The conflicting revisions are sorted chronologically by their server creation time (oldest first). If there are too many conflicting revisions to return all of them in a single request this will only contain the first batch. In such case, the presented conflicting revisions must be resolved first in order to fetch the next batch. Corresponds to the JSON property conflictingRevisions



2682
2683
2684
# File 'generated/google/apis/games_v1/classes.rb', line 2682

def conflicting_revisions
  @conflicting_revisions
end

#has_conflicting_revisionsBoolean Also known as: has_conflicting_revisions?

An indicator whether the snapshot has any conflicting revisions or not. Always set. Corresponds to the JSON property hasConflictingRevisions

Returns:

  • (Boolean)


2688
2689
2690
# File 'generated/google/apis/games_v1/classes.rb', line 2688

def has_conflicting_revisions
  @has_conflicting_revisions
end

#head_revisionGoogle::Apis::GamesV1::SnapshotRevision

A Snapshot revision resource. Snapshot revisions are immutable. Corresponds to the JSON property headRevision



2694
2695
2696
# File 'generated/google/apis/games_v1/classes.rb', line 2694

def head_revision
  @head_revision
end

#nameString

An identifier of the snapshot,developer-specified. Corresponds to the JSON property name

Returns:

  • (String)


2699
2700
2701
# File 'generated/google/apis/games_v1/classes.rb', line 2699

def name
  @name
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2706
2707
2708
2709
2710
2711
# File 'generated/google/apis/games_v1/classes.rb', line 2706

def update!(**args)
  @conflicting_revisions = args[:conflicting_revisions] if args.key?(:conflicting_revisions)
  @has_conflicting_revisions = args[:has_conflicting_revisions] if args.key?(:has_conflicting_revisions)
  @head_revision = args[:head_revision] if args.key?(:head_revision)
  @name = args[:name] if args.key?(:name)
end