Class: Google::Apis::GamesV1::SnapshotExtended
- Inherits:
-
Object
- Object
- Google::Apis::GamesV1::SnapshotExtended
- 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
A snapshot represents a saved game state referred to using the developer- provided snapshot_name. 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
-
#conflicting_revisions ⇒ Array<Google::Apis::GamesV1::SnapshotRevision>
A list of conflicting revisions.
-
#has_conflicting_revisions ⇒ Boolean
(also: #has_conflicting_revisions?)
An indicator whether the snapshot has any conflicting revisions or not.
-
#head_revision ⇒ Google::Apis::GamesV1::SnapshotRevision
A Snapshot revision resource.
-
#snapshot_name ⇒ String
An identifier of the snapshot, developer-specified.
Instance Method Summary collapse
-
#initialize(**args) ⇒ SnapshotExtended
constructor
A new instance of SnapshotExtended.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ SnapshotExtended
Returns a new instance of SnapshotExtended.
2678 2679 2680 |
# File 'lib/google/apis/games_v1/classes.rb', line 2678 def initialize(**args) update!(**args) end |
Instance Attribute Details
#conflicting_revisions ⇒ Array<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
2658 2659 2660 |
# File 'lib/google/apis/games_v1/classes.rb', line 2658 def conflicting_revisions @conflicting_revisions end |
#has_conflicting_revisions ⇒ Boolean 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
2664 2665 2666 |
# File 'lib/google/apis/games_v1/classes.rb', line 2664 def has_conflicting_revisions @has_conflicting_revisions end |
#head_revision ⇒ Google::Apis::GamesV1::SnapshotRevision
A Snapshot revision resource. Snapshot revisions are immutable.
Corresponds to the JSON property headRevision
2670 2671 2672 |
# File 'lib/google/apis/games_v1/classes.rb', line 2670 def head_revision @head_revision end |
#snapshot_name ⇒ String
An identifier of the snapshot, developer-specified. It must match the pattern [
0-9a-zA-Z-._~]1,100.
Corresponds to the JSON property snapshotName
2676 2677 2678 |
# File 'lib/google/apis/games_v1/classes.rb', line 2676 def snapshot_name @snapshot_name end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2683 2684 2685 2686 2687 2688 |
# File 'lib/google/apis/games_v1/classes.rb', line 2683 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) @snapshot_name = args[:snapshot_name] if args.key?(:snapshot_name) end |