Class: Google::Apis::GamesV1::TurnBasedMatchParticipant

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 a participant in a turn-based match.

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) ⇒ TurnBasedMatchParticipant

Returns a new instance of TurnBasedMatchParticipant



4496
4497
4498
# File 'generated/google/apis/games_v1/classes.rb', line 4496

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

Instance Attribute Details

#auto_matchedBoolean Also known as: auto_matched?

True if this participant was auto-matched with the requesting player. Corresponds to the JSON property autoMatched

Returns:

  • (Boolean)


4452
4453
4454
# File 'generated/google/apis/games_v1/classes.rb', line 4452

def auto_matched
  @auto_matched
end

#auto_matched_playerGoogle::Apis::GamesV1::AnonymousPlayer

This is a JSON template for an anonymous player Corresponds to the JSON property autoMatchedPlayer



4458
4459
4460
# File 'generated/google/apis/games_v1/classes.rb', line 4458

def auto_matched_player
  @auto_matched_player
end

#idString

An identifier for the participant in the scope of the match. Cannot be used to identify a player across matches or in other contexts. Corresponds to the JSON property id

Returns:

  • (String)


4464
4465
4466
# File 'generated/google/apis/games_v1/classes.rb', line 4464

def id
  @id
end

#kindString

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

Returns:

  • (String)


4470
4471
4472
# File 'generated/google/apis/games_v1/classes.rb', line 4470

def kind
  @kind
end

#playerGoogle::Apis::GamesV1::Player

This is a JSON template for a Player resource. Corresponds to the JSON property player



4475
4476
4477
# File 'generated/google/apis/games_v1/classes.rb', line 4475

def player
  @player
end

#statusString

The status of the participant with respect to the match. Possible values are:

  • "PARTICIPANT_NOT_INVITED_YET" - The participant is slated to be invited to the match, but the invitation has not been sent; the invite will be sent when it becomes their turn.
  • "PARTICIPANT_INVITED" - The participant has been invited to join the match, but has not yet responded.
  • "PARTICIPANT_JOINED" - The participant has joined the match (either after creating it or accepting an invitation.)
  • "PARTICIPANT_DECLINED" - The participant declined an invitation to join the match.
  • "PARTICIPANT_LEFT" - The participant joined the match and then left it.
  • "PARTICIPANT_FINISHED" - The participant finished playing in the match.
  • "PARTICIPANT_UNRESPONSIVE" - The participant did not take their turn in the allotted time. Corresponds to the JSON property status

Returns:

  • (String)


4494
4495
4496
# File 'generated/google/apis/games_v1/classes.rb', line 4494

def status
  @status
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4501
4502
4503
4504
4505
4506
4507
4508
# File 'generated/google/apis/games_v1/classes.rb', line 4501

def update!(**args)
  @auto_matched = args[:auto_matched] if args.key?(:auto_matched)
  @auto_matched_player = args[:auto_matched_player] if args.key?(:auto_matched_player)
  @id = args[:id] if args.key?(:id)
  @kind = args[:kind] if args.key?(:kind)
  @player = args[:player] if args.key?(:player)
  @status = args[:status] if args.key?(:status)
end