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



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

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



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

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)


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

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)


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

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)


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

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



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

def results
  @results
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



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

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