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

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

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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ SnapshotExtended

Returns a new instance of SnapshotExtended.



2668
2669
2670
# File 'lib/google/apis/games_v1/classes.rb', line 2668

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



2648
2649
2650
# File 'lib/google/apis/games_v1/classes.rb', line 2648

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)


2654
2655
2656
# File 'lib/google/apis/games_v1/classes.rb', line 2654

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



2660
2661
2662
# File 'lib/google/apis/games_v1/classes.rb', line 2660

def head_revision
  @head_revision
end

#snapshot_nameString

An identifier of the snapshot, developer-specified. It must match the pattern [ 0-9a-zA-Z-._~]1,100. Corresponds to the JSON property snapshotName

Returns:

  • (String)


2666
2667
2668
# File 'lib/google/apis/games_v1/classes.rb', line 2666

def snapshot_name
  @snapshot_name
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2673
2674
2675
2676
2677
2678
# File 'lib/google/apis/games_v1/classes.rb', line 2673

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