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.



4652
4653
4654
# File 'generated/google/apis/games_v1/classes.rb', line 4652

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



4624
4625
4626
# File 'generated/google/apis/games_v1/classes.rb', line 4624

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)


4630
4631
4632
# File 'generated/google/apis/games_v1/classes.rb', line 4630

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)


4636
4637
4638
# File 'generated/google/apis/games_v1/classes.rb', line 4636

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)


4645
4646
4647
# File 'generated/google/apis/games_v1/classes.rb', line 4645

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



4650
4651
4652
# File 'generated/google/apis/games_v1/classes.rb', line 4650

def results
  @results
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4657
4658
4659
4660
4661
4662
4663
# File 'generated/google/apis/games_v1/classes.rb', line 4657

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