Class: Google::Apis::GamesV1::RoomParticipant
- Inherits:
-
Object
- Object
- Google::Apis::GamesV1::RoomParticipant
- 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 room.
Instance Attribute Summary collapse
-
#auto_matched ⇒ Boolean
(also: #auto_matched?)
True if this participant was auto-matched with the requesting player.
-
#auto_matched_player ⇒ Google::Apis::GamesV1::AnonymousPlayer
This is a JSON template for an anonymous player Corresponds to the JSON property
autoMatchedPlayer
. -
#capabilities ⇒ Array<String>
The capabilities which can be used when communicating with this participant.
-
#client_address ⇒ Google::Apis::GamesV1::RoomClientAddress
This is a JSON template for the client address when setting up a room.
-
#connected ⇒ Boolean
(also: #connected?)
True if this participant is in the fully connected set of peers in the room.
-
#id ⇒ String
An identifier for the participant in the scope of the room.
-
#kind ⇒ String
Uniquely identifies the type of this resource.
-
#leave_reason ⇒ String
The reason the participant left the room; populated if the participant status is PARTICIPANT_LEFT.
-
#player ⇒ Google::Apis::GamesV1::Player
This is a JSON template for a Player resource.
-
#status ⇒ String
The status of the participant with respect to the room.
Instance Method Summary collapse
-
#initialize(**args) ⇒ RoomParticipant
constructor
A new instance of RoomParticipant.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ RoomParticipant
Returns a new instance of RoomParticipant.
3492 3493 3494 |
# File 'generated/google/apis/games_v1/classes.rb', line 3492 def initialize(**args) update!(**args) end |
Instance Attribute Details
#auto_matched ⇒ Boolean Also known as: auto_matched?
True if this participant was auto-matched with the requesting player.
Corresponds to the JSON property autoMatched
3420 3421 3422 |
# File 'generated/google/apis/games_v1/classes.rb', line 3420 def auto_matched @auto_matched end |
#auto_matched_player ⇒ Google::Apis::GamesV1::AnonymousPlayer
This is a JSON template for an anonymous player
Corresponds to the JSON property autoMatchedPlayer
3426 3427 3428 |
# File 'generated/google/apis/games_v1/classes.rb', line 3426 def auto_matched_player @auto_matched_player end |
#capabilities ⇒ Array<String>
The capabilities which can be used when communicating with this participant.
Corresponds to the JSON property capabilities
3431 3432 3433 |
# File 'generated/google/apis/games_v1/classes.rb', line 3431 def capabilities @capabilities end |
#client_address ⇒ Google::Apis::GamesV1::RoomClientAddress
This is a JSON template for the client address when setting up a room.
Corresponds to the JSON property clientAddress
3436 3437 3438 |
# File 'generated/google/apis/games_v1/classes.rb', line 3436 def client_address @client_address end |
#connected ⇒ Boolean Also known as: connected?
True if this participant is in the fully connected set of peers in the room.
Corresponds to the JSON property connected
3441 3442 3443 |
# File 'generated/google/apis/games_v1/classes.rb', line 3441 def connected @connected end |
#id ⇒ String
An identifier for the participant in the scope of the room. Cannot be used to
identify a player across rooms or in other contexts.
Corresponds to the JSON property id
3448 3449 3450 |
# File 'generated/google/apis/games_v1/classes.rb', line 3448 def id @id end |
#kind ⇒ String
Uniquely identifies the type of this resource. Value is always the fixed
string games#roomParticipant.
Corresponds to the JSON property kind
3454 3455 3456 |
# File 'generated/google/apis/games_v1/classes.rb', line 3454 def kind @kind end |
#leave_reason ⇒ String
The reason the participant left the room; populated if the participant status is PARTICIPANT_LEFT. Possible values are:
- "PLAYER_LEFT" - The player explicitly chose to leave the room.
- "GAME_LEFT" - The game chose to remove the player from the room.
- "ABANDONED" - The player switched to another application and abandoned the room.
- "PEER_CONNECTION_FAILURE" - The client was unable to establish or maintain a connection to other peer(s) in the room.
- "SERVER_ERROR" - The client received an error response when it tried to communicate with the server.
- "TIMEOUT" - The client timed out while waiting for players to join and connect.
- "PRESENCE_FAILURE" - The client's XMPP connection ended abruptly.
Corresponds to the JSON property
leaveReason
3472 3473 3474 |
# File 'generated/google/apis/games_v1/classes.rb', line 3472 def leave_reason @leave_reason end |
#player ⇒ Google::Apis::GamesV1::Player
This is a JSON template for a Player resource.
Corresponds to the JSON property player
3477 3478 3479 |
# File 'generated/google/apis/games_v1/classes.rb', line 3477 def player @player end |
#status ⇒ String
The status of the participant with respect to the room. Possible values are:
- "PARTICIPANT_INVITED" - The participant has been invited to join the room, but has not yet responded.
- "PARTICIPANT_JOINED" - The participant has joined the room (either after creating it or accepting an invitation.)
- "PARTICIPANT_DECLINED" - The participant declined an invitation to join the room.
- "PARTICIPANT_LEFT" - The participant joined the room and then left it.
Corresponds to the JSON property
status
3490 3491 3492 |
# File 'generated/google/apis/games_v1/classes.rb', line 3490 def status @status end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 |
# File 'generated/google/apis/games_v1/classes.rb', line 3497 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) @capabilities = args[:capabilities] if args.key?(:capabilities) @client_address = args[:client_address] if args.key?(:client_address) @connected = args[:connected] if args.key?(:connected) @id = args[:id] if args.key?(:id) @kind = args[:kind] if args.key?(:kind) @leave_reason = args[:leave_reason] if args.key?(:leave_reason) @player = args[:player] if args.key?(:player) @status = args[:status] if args.key?(:status) end |