/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace GameLift { namespace Model { /** *

Represents a player in matchmaking. When starting a matchmaking request, a * player has a player ID, attributes, and may have latency data. Team information * is added after a match has been successfully completed.

See Also:

* AWS * API Reference

*/ class AWS_GAMELIFT_API Player { public: Player(); Player(Aws::Utils::Json::JsonView jsonValue); Player& operator=(Aws::Utils::Json::JsonView jsonValue); Aws::Utils::Json::JsonValue Jsonize() const; /** *

A unique identifier for a player

*/ inline const Aws::String& GetPlayerId() const{ return m_playerId; } /** *

A unique identifier for a player

*/ inline bool PlayerIdHasBeenSet() const { return m_playerIdHasBeenSet; } /** *

A unique identifier for a player

*/ inline void SetPlayerId(const Aws::String& value) { m_playerIdHasBeenSet = true; m_playerId = value; } /** *

A unique identifier for a player

*/ inline void SetPlayerId(Aws::String&& value) { m_playerIdHasBeenSet = true; m_playerId = std::move(value); } /** *

A unique identifier for a player

*/ inline void SetPlayerId(const char* value) { m_playerIdHasBeenSet = true; m_playerId.assign(value); } /** *

A unique identifier for a player

*/ inline Player& WithPlayerId(const Aws::String& value) { SetPlayerId(value); return *this;} /** *

A unique identifier for a player

*/ inline Player& WithPlayerId(Aws::String&& value) { SetPlayerId(std::move(value)); return *this;} /** *

A unique identifier for a player

*/ inline Player& WithPlayerId(const char* value) { SetPlayerId(value); return *this;} /** *

A collection of key:value pairs containing player information for use in * matchmaking. Player attribute keys must match the playerAttributes used * in a matchmaking rule set. Example: "PlayerAttributes": {"skill": {"N": * "23"}, "gameMode": {"S": "deathmatch"}}.

*/ inline const Aws::Map& GetPlayerAttributes() const{ return m_playerAttributes; } /** *

A collection of key:value pairs containing player information for use in * matchmaking. Player attribute keys must match the playerAttributes used * in a matchmaking rule set. Example: "PlayerAttributes": {"skill": {"N": * "23"}, "gameMode": {"S": "deathmatch"}}.

*/ inline bool PlayerAttributesHasBeenSet() const { return m_playerAttributesHasBeenSet; } /** *

A collection of key:value pairs containing player information for use in * matchmaking. Player attribute keys must match the playerAttributes used * in a matchmaking rule set. Example: "PlayerAttributes": {"skill": {"N": * "23"}, "gameMode": {"S": "deathmatch"}}.

*/ inline void SetPlayerAttributes(const Aws::Map& value) { m_playerAttributesHasBeenSet = true; m_playerAttributes = value; } /** *

A collection of key:value pairs containing player information for use in * matchmaking. Player attribute keys must match the playerAttributes used * in a matchmaking rule set. Example: "PlayerAttributes": {"skill": {"N": * "23"}, "gameMode": {"S": "deathmatch"}}.

*/ inline void SetPlayerAttributes(Aws::Map&& value) { m_playerAttributesHasBeenSet = true; m_playerAttributes = std::move(value); } /** *

A collection of key:value pairs containing player information for use in * matchmaking. Player attribute keys must match the playerAttributes used * in a matchmaking rule set. Example: "PlayerAttributes": {"skill": {"N": * "23"}, "gameMode": {"S": "deathmatch"}}.

*/ inline Player& WithPlayerAttributes(const Aws::Map& value) { SetPlayerAttributes(value); return *this;} /** *

A collection of key:value pairs containing player information for use in * matchmaking. Player attribute keys must match the playerAttributes used * in a matchmaking rule set. Example: "PlayerAttributes": {"skill": {"N": * "23"}, "gameMode": {"S": "deathmatch"}}.

*/ inline Player& WithPlayerAttributes(Aws::Map&& value) { SetPlayerAttributes(std::move(value)); return *this;} /** *

A collection of key:value pairs containing player information for use in * matchmaking. Player attribute keys must match the playerAttributes used * in a matchmaking rule set. Example: "PlayerAttributes": {"skill": {"N": * "23"}, "gameMode": {"S": "deathmatch"}}.

*/ inline Player& AddPlayerAttributes(const Aws::String& key, const AttributeValue& value) { m_playerAttributesHasBeenSet = true; m_playerAttributes.emplace(key, value); return *this; } /** *

A collection of key:value pairs containing player information for use in * matchmaking. Player attribute keys must match the playerAttributes used * in a matchmaking rule set. Example: "PlayerAttributes": {"skill": {"N": * "23"}, "gameMode": {"S": "deathmatch"}}.

*/ inline Player& AddPlayerAttributes(Aws::String&& key, const AttributeValue& value) { m_playerAttributesHasBeenSet = true; m_playerAttributes.emplace(std::move(key), value); return *this; } /** *

A collection of key:value pairs containing player information for use in * matchmaking. Player attribute keys must match the playerAttributes used * in a matchmaking rule set. Example: "PlayerAttributes": {"skill": {"N": * "23"}, "gameMode": {"S": "deathmatch"}}.

*/ inline Player& AddPlayerAttributes(const Aws::String& key, AttributeValue&& value) { m_playerAttributesHasBeenSet = true; m_playerAttributes.emplace(key, std::move(value)); return *this; } /** *

A collection of key:value pairs containing player information for use in * matchmaking. Player attribute keys must match the playerAttributes used * in a matchmaking rule set. Example: "PlayerAttributes": {"skill": {"N": * "23"}, "gameMode": {"S": "deathmatch"}}.

*/ inline Player& AddPlayerAttributes(Aws::String&& key, AttributeValue&& value) { m_playerAttributesHasBeenSet = true; m_playerAttributes.emplace(std::move(key), std::move(value)); return *this; } /** *

A collection of key:value pairs containing player information for use in * matchmaking. Player attribute keys must match the playerAttributes used * in a matchmaking rule set. Example: "PlayerAttributes": {"skill": {"N": * "23"}, "gameMode": {"S": "deathmatch"}}.

*/ inline Player& AddPlayerAttributes(const char* key, AttributeValue&& value) { m_playerAttributesHasBeenSet = true; m_playerAttributes.emplace(key, std::move(value)); return *this; } /** *

A collection of key:value pairs containing player information for use in * matchmaking. Player attribute keys must match the playerAttributes used * in a matchmaking rule set. Example: "PlayerAttributes": {"skill": {"N": * "23"}, "gameMode": {"S": "deathmatch"}}.

*/ inline Player& AddPlayerAttributes(const char* key, const AttributeValue& value) { m_playerAttributesHasBeenSet = true; m_playerAttributes.emplace(key, value); return *this; } /** *

Name of the team that the player is assigned to in a match. Team names are * defined in a matchmaking rule set.

*/ inline const Aws::String& GetTeam() const{ return m_team; } /** *

Name of the team that the player is assigned to in a match. Team names are * defined in a matchmaking rule set.

*/ inline bool TeamHasBeenSet() const { return m_teamHasBeenSet; } /** *

Name of the team that the player is assigned to in a match. Team names are * defined in a matchmaking rule set.

*/ inline void SetTeam(const Aws::String& value) { m_teamHasBeenSet = true; m_team = value; } /** *

Name of the team that the player is assigned to in a match. Team names are * defined in a matchmaking rule set.

*/ inline void SetTeam(Aws::String&& value) { m_teamHasBeenSet = true; m_team = std::move(value); } /** *

Name of the team that the player is assigned to in a match. Team names are * defined in a matchmaking rule set.

*/ inline void SetTeam(const char* value) { m_teamHasBeenSet = true; m_team.assign(value); } /** *

Name of the team that the player is assigned to in a match. Team names are * defined in a matchmaking rule set.

*/ inline Player& WithTeam(const Aws::String& value) { SetTeam(value); return *this;} /** *

Name of the team that the player is assigned to in a match. Team names are * defined in a matchmaking rule set.

*/ inline Player& WithTeam(Aws::String&& value) { SetTeam(std::move(value)); return *this;} /** *

Name of the team that the player is assigned to in a match. Team names are * defined in a matchmaking rule set.

*/ inline Player& WithTeam(const char* value) { SetTeam(value); return *this;} /** *

Set of values, expressed in milliseconds, indicating the amount of latency * that a player experiences when connected to AWS Regions. If this property is * present, FlexMatch considers placing the match only in Regions for which latency * is reported.

If a matchmaker has a rule that evaluates player latency, * players must report latency in order to be matched. If no latency is reported in * this scenario, FlexMatch assumes that no Regions are available to the player and * the ticket is not matchable.

*/ inline const Aws::Map& GetLatencyInMs() const{ return m_latencyInMs; } /** *

Set of values, expressed in milliseconds, indicating the amount of latency * that a player experiences when connected to AWS Regions. If this property is * present, FlexMatch considers placing the match only in Regions for which latency * is reported.

If a matchmaker has a rule that evaluates player latency, * players must report latency in order to be matched. If no latency is reported in * this scenario, FlexMatch assumes that no Regions are available to the player and * the ticket is not matchable.

*/ inline bool LatencyInMsHasBeenSet() const { return m_latencyInMsHasBeenSet; } /** *

Set of values, expressed in milliseconds, indicating the amount of latency * that a player experiences when connected to AWS Regions. If this property is * present, FlexMatch considers placing the match only in Regions for which latency * is reported.

If a matchmaker has a rule that evaluates player latency, * players must report latency in order to be matched. If no latency is reported in * this scenario, FlexMatch assumes that no Regions are available to the player and * the ticket is not matchable.

*/ inline void SetLatencyInMs(const Aws::Map& value) { m_latencyInMsHasBeenSet = true; m_latencyInMs = value; } /** *

Set of values, expressed in milliseconds, indicating the amount of latency * that a player experiences when connected to AWS Regions. If this property is * present, FlexMatch considers placing the match only in Regions for which latency * is reported.

If a matchmaker has a rule that evaluates player latency, * players must report latency in order to be matched. If no latency is reported in * this scenario, FlexMatch assumes that no Regions are available to the player and * the ticket is not matchable.

*/ inline void SetLatencyInMs(Aws::Map&& value) { m_latencyInMsHasBeenSet = true; m_latencyInMs = std::move(value); } /** *

Set of values, expressed in milliseconds, indicating the amount of latency * that a player experiences when connected to AWS Regions. If this property is * present, FlexMatch considers placing the match only in Regions for which latency * is reported.

If a matchmaker has a rule that evaluates player latency, * players must report latency in order to be matched. If no latency is reported in * this scenario, FlexMatch assumes that no Regions are available to the player and * the ticket is not matchable.

*/ inline Player& WithLatencyInMs(const Aws::Map& value) { SetLatencyInMs(value); return *this;} /** *

Set of values, expressed in milliseconds, indicating the amount of latency * that a player experiences when connected to AWS Regions. If this property is * present, FlexMatch considers placing the match only in Regions for which latency * is reported.

If a matchmaker has a rule that evaluates player latency, * players must report latency in order to be matched. If no latency is reported in * this scenario, FlexMatch assumes that no Regions are available to the player and * the ticket is not matchable.

*/ inline Player& WithLatencyInMs(Aws::Map&& value) { SetLatencyInMs(std::move(value)); return *this;} /** *

Set of values, expressed in milliseconds, indicating the amount of latency * that a player experiences when connected to AWS Regions. If this property is * present, FlexMatch considers placing the match only in Regions for which latency * is reported.

If a matchmaker has a rule that evaluates player latency, * players must report latency in order to be matched. If no latency is reported in * this scenario, FlexMatch assumes that no Regions are available to the player and * the ticket is not matchable.

*/ inline Player& AddLatencyInMs(const Aws::String& key, int value) { m_latencyInMsHasBeenSet = true; m_latencyInMs.emplace(key, value); return *this; } /** *

Set of values, expressed in milliseconds, indicating the amount of latency * that a player experiences when connected to AWS Regions. If this property is * present, FlexMatch considers placing the match only in Regions for which latency * is reported.

If a matchmaker has a rule that evaluates player latency, * players must report latency in order to be matched. If no latency is reported in * this scenario, FlexMatch assumes that no Regions are available to the player and * the ticket is not matchable.

*/ inline Player& AddLatencyInMs(Aws::String&& key, int value) { m_latencyInMsHasBeenSet = true; m_latencyInMs.emplace(std::move(key), value); return *this; } /** *

Set of values, expressed in milliseconds, indicating the amount of latency * that a player experiences when connected to AWS Regions. If this property is * present, FlexMatch considers placing the match only in Regions for which latency * is reported.

If a matchmaker has a rule that evaluates player latency, * players must report latency in order to be matched. If no latency is reported in * this scenario, FlexMatch assumes that no Regions are available to the player and * the ticket is not matchable.

*/ inline Player& AddLatencyInMs(const char* key, int value) { m_latencyInMsHasBeenSet = true; m_latencyInMs.emplace(key, value); return *this; } private: Aws::String m_playerId; bool m_playerIdHasBeenSet; Aws::Map m_playerAttributes; bool m_playerAttributesHasBeenSet; Aws::String m_team; bool m_teamHasBeenSet; Aws::Map m_latencyInMs; bool m_latencyInMsHasBeenSet; }; } // namespace Model } // namespace GameLift } // namespace Aws