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.



4492
4493
4494
# File 'generated/google/apis/games_v1/classes.rb', line 4492

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)


4448
4449
4450
# File 'generated/google/apis/games_v1/classes.rb', line 4448

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



4454
4455
4456
# File 'generated/google/apis/games_v1/classes.rb', line 4454

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)


4460
4461
4462
# File 'generated/google/apis/games_v1/classes.rb', line 4460

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)


4466
4467
4468
# File 'generated/google/apis/games_v1/classes.rb', line 4466

def kind
  @kind
end

#playerGoogle::Apis::GamesV1::Player

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



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

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)


4490
4491
4492
# File 'generated/google/apis/games_v1/classes.rb', line 4490

def status
  @status
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4497
4498
4499
4500
4501
4502
4503
4504
# File 'generated/google/apis/games_v1/classes.rb', line 4497

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