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.



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

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



4341
4342
4343
# File 'generated/google/apis/games_v1/classes.rb', line 4341

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)


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

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)


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

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)


4362
4363
4364
# File 'generated/google/apis/games_v1/classes.rb', line 4362

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



4367
4368
4369
# File 'generated/google/apis/games_v1/classes.rb', line 4367

def results
  @results
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



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

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