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

A policy that puts limits on the number of game sessions that a player can * create within a specified span of time. With this policy, you can control * players' ability to consume available resources.

The policy is evaluated * when a player tries to create a new game session. On receiving a * CreateGameSession request, Amazon GameLift checks that the player * (identified by CreatorId) has created fewer than game session limit * in the specified time period.

See Also:

AWS * API Reference

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

A policy that puts limits on the number of game sessions that a player can * create within a specified span of time. With this policy, you can control * players' ability to consume available resources.

The policy is evaluated * when a player tries to create a new game session. On receiving a * CreateGameSession request, Amazon GameLift checks that the player * (identified by CreatorId) has created fewer than game session limit * in the specified time period.

*/ inline int GetNewGameSessionsPerCreator() const{ return m_newGameSessionsPerCreator; } /** *

A policy that puts limits on the number of game sessions that a player can * create within a specified span of time. With this policy, you can control * players' ability to consume available resources.

The policy is evaluated * when a player tries to create a new game session. On receiving a * CreateGameSession request, Amazon GameLift checks that the player * (identified by CreatorId) has created fewer than game session limit * in the specified time period.

*/ inline bool NewGameSessionsPerCreatorHasBeenSet() const { return m_newGameSessionsPerCreatorHasBeenSet; } /** *

A policy that puts limits on the number of game sessions that a player can * create within a specified span of time. With this policy, you can control * players' ability to consume available resources.

The policy is evaluated * when a player tries to create a new game session. On receiving a * CreateGameSession request, Amazon GameLift checks that the player * (identified by CreatorId) has created fewer than game session limit * in the specified time period.

*/ inline void SetNewGameSessionsPerCreator(int value) { m_newGameSessionsPerCreatorHasBeenSet = true; m_newGameSessionsPerCreator = value; } /** *

A policy that puts limits on the number of game sessions that a player can * create within a specified span of time. With this policy, you can control * players' ability to consume available resources.

The policy is evaluated * when a player tries to create a new game session. On receiving a * CreateGameSession request, Amazon GameLift checks that the player * (identified by CreatorId) has created fewer than game session limit * in the specified time period.

*/ inline ResourceCreationLimitPolicy& WithNewGameSessionsPerCreator(int value) { SetNewGameSessionsPerCreator(value); return *this;} /** *

The time span used in evaluating the resource creation limit policy.

*/ inline int GetPolicyPeriodInMinutes() const{ return m_policyPeriodInMinutes; } /** *

The time span used in evaluating the resource creation limit policy.

*/ inline bool PolicyPeriodInMinutesHasBeenSet() const { return m_policyPeriodInMinutesHasBeenSet; } /** *

The time span used in evaluating the resource creation limit policy.

*/ inline void SetPolicyPeriodInMinutes(int value) { m_policyPeriodInMinutesHasBeenSet = true; m_policyPeriodInMinutes = value; } /** *

The time span used in evaluating the resource creation limit policy.

*/ inline ResourceCreationLimitPolicy& WithPolicyPeriodInMinutes(int value) { SetPolicyPeriodInMinutes(value); return *this;} private: int m_newGameSessionsPerCreator; bool m_newGameSessionsPerCreatorHasBeenSet = false; int m_policyPeriodInMinutes; bool m_policyPeriodInMinutesHasBeenSet = false; }; } // namespace Model } // namespace GameLift } // namespace Aws