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



4656
4657
4658
# File 'generated/google/apis/games_v1/classes.rb', line 4656

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



4628
4629
4630
# File 'generated/google/apis/games_v1/classes.rb', line 4628

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)


4634
4635
4636
# File 'generated/google/apis/games_v1/classes.rb', line 4634

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)


4640
4641
4642
# File 'generated/google/apis/games_v1/classes.rb', line 4640

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)


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

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



4654
4655
4656
# File 'generated/google/apis/games_v1/classes.rb', line 4654

def results
  @results
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4661
4662
4663
4664
4665
4666
4667
# File 'generated/google/apis/games_v1/classes.rb', line 4661

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