AWS SDK for C++

AWS SDK for C++ Version 1.11.743

Loading...
Searching...
No Matches
Player.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSMap.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/gamelift/GameLift_EXPORTS.h>
10#include <aws/gamelift/model/AttributeValue.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Json {
17class JsonValue;
18class JsonView;
19} // namespace Json
20} // namespace Utils
21namespace GameLift {
22namespace Model {
23
31class Player {
32 public:
33 AWS_GAMELIFT_API Player() = default;
34 AWS_GAMELIFT_API Player(Aws::Utils::Json::JsonView jsonValue);
35 AWS_GAMELIFT_API Player& operator=(Aws::Utils::Json::JsonView jsonValue);
36 AWS_GAMELIFT_API Aws::Utils::Json::JsonValue Jsonize() const;
37
39
42 inline const Aws::String& GetPlayerId() const { return m_playerId; }
43 inline bool PlayerIdHasBeenSet() const { return m_playerIdHasBeenSet; }
44 template <typename PlayerIdT = Aws::String>
45 void SetPlayerId(PlayerIdT&& value) {
46 m_playerIdHasBeenSet = true;
47 m_playerId = std::forward<PlayerIdT>(value);
48 }
49 template <typename PlayerIdT = Aws::String>
50 Player& WithPlayerId(PlayerIdT&& value) {
51 SetPlayerId(std::forward<PlayerIdT>(value));
52 return *this;
53 }
55
57
64 inline const Aws::Map<Aws::String, AttributeValue>& GetPlayerAttributes() const { return m_playerAttributes; }
65 inline bool PlayerAttributesHasBeenSet() const { return m_playerAttributesHasBeenSet; }
66 template <typename PlayerAttributesT = Aws::Map<Aws::String, AttributeValue>>
67 void SetPlayerAttributes(PlayerAttributesT&& value) {
68 m_playerAttributesHasBeenSet = true;
69 m_playerAttributes = std::forward<PlayerAttributesT>(value);
70 }
71 template <typename PlayerAttributesT = Aws::Map<Aws::String, AttributeValue>>
72 Player& WithPlayerAttributes(PlayerAttributesT&& value) {
73 SetPlayerAttributes(std::forward<PlayerAttributesT>(value));
74 return *this;
75 }
76 template <typename PlayerAttributesKeyT = Aws::String, typename PlayerAttributesValueT = AttributeValue>
77 Player& AddPlayerAttributes(PlayerAttributesKeyT&& key, PlayerAttributesValueT&& value) {
78 m_playerAttributesHasBeenSet = true;
79 m_playerAttributes.emplace(std::forward<PlayerAttributesKeyT>(key), std::forward<PlayerAttributesValueT>(value));
80 return *this;
81 }
83
85
89 inline const Aws::String& GetTeam() const { return m_team; }
90 inline bool TeamHasBeenSet() const { return m_teamHasBeenSet; }
91 template <typename TeamT = Aws::String>
92 void SetTeam(TeamT&& value) {
93 m_teamHasBeenSet = true;
94 m_team = std::forward<TeamT>(value);
95 }
96 template <typename TeamT = Aws::String>
97 Player& WithTeam(TeamT&& value) {
98 SetTeam(std::forward<TeamT>(value));
99 return *this;
100 }
102
104
113 inline const Aws::Map<Aws::String, int>& GetLatencyInMs() const { return m_latencyInMs; }
114 inline bool LatencyInMsHasBeenSet() const { return m_latencyInMsHasBeenSet; }
115 template <typename LatencyInMsT = Aws::Map<Aws::String, int>>
116 void SetLatencyInMs(LatencyInMsT&& value) {
117 m_latencyInMsHasBeenSet = true;
118 m_latencyInMs = std::forward<LatencyInMsT>(value);
119 }
120 template <typename LatencyInMsT = Aws::Map<Aws::String, int>>
121 Player& WithLatencyInMs(LatencyInMsT&& value) {
122 SetLatencyInMs(std::forward<LatencyInMsT>(value));
123 return *this;
124 }
125 inline Player& AddLatencyInMs(Aws::String key, int value) {
126 m_latencyInMsHasBeenSet = true;
127 m_latencyInMs.emplace(key, value);
128 return *this;
129 }
131 private:
132 Aws::String m_playerId;
133
134 Aws::Map<Aws::String, AttributeValue> m_playerAttributes;
135
136 Aws::String m_team;
137
138 Aws::Map<Aws::String, int> m_latencyInMs;
139 bool m_playerIdHasBeenSet = false;
140 bool m_playerAttributesHasBeenSet = false;
141 bool m_teamHasBeenSet = false;
142 bool m_latencyInMsHasBeenSet = false;
143};
144
145} // namespace Model
146} // namespace GameLift
147} // namespace Aws
AWS_GAMELIFT_API Player()=default
AWS_GAMELIFT_API Player & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetLatencyInMs(LatencyInMsT &&value)
Definition Player.h:116
const Aws::String & GetTeam() const
Definition Player.h:89
void SetPlayerId(PlayerIdT &&value)
Definition Player.h:45
bool LatencyInMsHasBeenSet() const
Definition Player.h:114
void SetPlayerAttributes(PlayerAttributesT &&value)
Definition Player.h:67
Player & WithPlayerId(PlayerIdT &&value)
Definition Player.h:50
const Aws::String & GetPlayerId() const
Definition Player.h:42
bool TeamHasBeenSet() const
Definition Player.h:90
bool PlayerIdHasBeenSet() const
Definition Player.h:43
Player & WithPlayerAttributes(PlayerAttributesT &&value)
Definition Player.h:72
void SetTeam(TeamT &&value)
Definition Player.h:92
Player & WithTeam(TeamT &&value)
Definition Player.h:97
AWS_GAMELIFT_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::Map< Aws::String, AttributeValue > & GetPlayerAttributes() const
Definition Player.h:64
AWS_GAMELIFT_API Player(Aws::Utils::Json::JsonView jsonValue)
const Aws::Map< Aws::String, int > & GetLatencyInMs() const
Definition Player.h:113
bool PlayerAttributesHasBeenSet() const
Definition Player.h:65
Player & WithLatencyInMs(LatencyInMsT &&value)
Definition Player.h:121
Player & AddLatencyInMs(Aws::String key, int value)
Definition Player.h:125
Player & AddPlayerAttributes(PlayerAttributesKeyT &&key, PlayerAttributesValueT &&value)
Definition Player.h:77
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue