Class: Google::Apis::GamesV1::TurnBasedMatchTurn

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

This is a JSON template for the object representing a turn.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ TurnBasedMatchTurn

Returns a new instance of TurnBasedMatchTurn.



4376
4377
4378
# File 'generated/google/apis/games_v1/classes.rb', line 4376

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

Instance Attribute Details

#dataGoogle::Apis::GamesV1::TurnBasedMatchDataRequest

This is a JSON template for sending a turn-based match data object. Corresponds to the JSON property data



4348
4349
4350
# File 'generated/google/apis/games_v1/classes.rb', line 4348

def data
  @data
end

#kindString

Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchTurn. Corresponds to the JSON property kind

Returns:

  • (String)


4354
4355
4356
# File 'generated/google/apis/games_v1/classes.rb', line 4354

def kind
  @kind
end

#match_versionFixnum

The version of this match: an increasing counter, used to avoid out-of-date updates to the match. Corresponds to the JSON property matchVersion

Returns:

  • (Fixnum)


4360
4361
4362
# File 'generated/google/apis/games_v1/classes.rb', line 4360

def match_version
  @match_version
end

#pending_participant_idString

The ID of the participant who should take their turn next. May be set to the current player's participant ID to update match state without changing the turn. If not set, the match will wait for other player(s) to join via automatching; this is only valid if automatch criteria is set on the match with remaining slots for automatched players. Corresponds to the JSON property pendingParticipantId

Returns:

  • (String)


4369
4370
4371
# File 'generated/google/apis/games_v1/classes.rb', line 4369

def pending_participant_id
  @pending_participant_id
end

#resultsArray<Google::Apis::GamesV1::ParticipantResult>

The match results for the participants in the match. Corresponds to the JSON property results



4374
4375
4376
# File 'generated/google/apis/games_v1/classes.rb', line 4374

def results
  @results
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4381
4382
4383
4384
4385
4386
4387
# File 'generated/google/apis/games_v1/classes.rb', line 4381

def update!(**args)
  @data = args[:data] if args.key?(:data)
  @kind = args[:kind] if args.key?(:kind)
  @match_version = args[:match_version] if args.key?(:match_version)
  @pending_participant_id = args[:pending_participant_id] if args.key?(:pending_participant_id)
  @results = args[:results] if args.key?(:results)
end