# Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # NOTE: This class is auto generated by the swagger code generator program. # https://github.com/swagger-api/swagger-codegen.git # Do not edit the class manually. defmodule GoogleApi.Games.V1.Model.RoomParticipant do @moduledoc """ This is a JSON template for a participant in a room. ## Attributes - autoMatched (boolean()): True if this participant was auto-matched with the requesting player. Defaults to: `null`. - autoMatchedPlayer (AnonymousPlayer): Information about a player that has been anonymously auto-matched against the requesting player. (Either player or autoMatchedPlayer will be set.) Defaults to: `null`. - capabilities ([String.t]): The capabilities which can be used when communicating with this participant. Defaults to: `null`. - clientAddress (RoomClientAddress): Client address for the participant. Defaults to: `null`. - connected (boolean()): True if this participant is in the fully connected set of peers in the room. Defaults to: `null`. - id (String.t): An identifier for the participant in the scope of the room. Cannot be used to identify a player across rooms or in other contexts. Defaults to: `null`. - kind (String.t): Uniquely identifies the type of this resource. Value is always the fixed string games#roomParticipant. Defaults to: `null`. - leaveReason (String.t): 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. Defaults to: `null`. - player (Player): Information about the player. Not populated if this player was anonymously auto-matched against the requesting player. (Either player or autoMatchedPlayer will be set.) Defaults to: `null`. - status (String.t): 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. Defaults to: `null`. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ :autoMatched => any(), :autoMatchedPlayer => GoogleApi.Games.V1.Model.AnonymousPlayer.t(), :capabilities => list(any()), :clientAddress => GoogleApi.Games.V1.Model.RoomClientAddress.t(), :connected => any(), :id => any(), :kind => any(), :leaveReason => any(), :player => GoogleApi.Games.V1.Model.Player.t(), :status => any() } field(:autoMatched) field(:autoMatchedPlayer, as: GoogleApi.Games.V1.Model.AnonymousPlayer) field(:capabilities, type: :list) field(:clientAddress, as: GoogleApi.Games.V1.Model.RoomClientAddress) field(:connected) field(:id) field(:kind) field(:leaveReason) field(:player, as: GoogleApi.Games.V1.Model.Player) field(:status) end defimpl Poison.Decoder, for: GoogleApi.Games.V1.Model.RoomParticipant do def decode(value, options) do GoogleApi.Games.V1.Model.RoomParticipant.decode(value, options) end end defimpl Poison.Encoder, for: GoogleApi.Games.V1.Model.RoomParticipant do def encode(value, options) do GoogleApi.Gax.ModelBase.encode(value, options) end end