/** * 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 { /** *

Queue setting that determines the highest latency allowed for individual * players when placing a game session. When a latency policy is in force, a game * session cannot be placed with any fleet in a Region where a player reports * latency higher than the cap. Latency policies are only enforced when the * placement request contains player latency information.

See Also:

AWS * API Reference

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

The maximum latency value that is allowed for any player, in milliseconds. * All policies must have a value set for this property.

*/ inline int GetMaximumIndividualPlayerLatencyMilliseconds() const{ return m_maximumIndividualPlayerLatencyMilliseconds; } /** *

The maximum latency value that is allowed for any player, in milliseconds. * All policies must have a value set for this property.

*/ inline bool MaximumIndividualPlayerLatencyMillisecondsHasBeenSet() const { return m_maximumIndividualPlayerLatencyMillisecondsHasBeenSet; } /** *

The maximum latency value that is allowed for any player, in milliseconds. * All policies must have a value set for this property.

*/ inline void SetMaximumIndividualPlayerLatencyMilliseconds(int value) { m_maximumIndividualPlayerLatencyMillisecondsHasBeenSet = true; m_maximumIndividualPlayerLatencyMilliseconds = value; } /** *

The maximum latency value that is allowed for any player, in milliseconds. * All policies must have a value set for this property.

*/ inline PlayerLatencyPolicy& WithMaximumIndividualPlayerLatencyMilliseconds(int value) { SetMaximumIndividualPlayerLatencyMilliseconds(value); return *this;} /** *

The length of time, in seconds, that the policy is enforced while placing a * new game session. A null value for this property means that the policy is * enforced until the queue times out.

*/ inline int GetPolicyDurationSeconds() const{ return m_policyDurationSeconds; } /** *

The length of time, in seconds, that the policy is enforced while placing a * new game session. A null value for this property means that the policy is * enforced until the queue times out.

*/ inline bool PolicyDurationSecondsHasBeenSet() const { return m_policyDurationSecondsHasBeenSet; } /** *

The length of time, in seconds, that the policy is enforced while placing a * new game session. A null value for this property means that the policy is * enforced until the queue times out.

*/ inline void SetPolicyDurationSeconds(int value) { m_policyDurationSecondsHasBeenSet = true; m_policyDurationSeconds = value; } /** *

The length of time, in seconds, that the policy is enforced while placing a * new game session. A null value for this property means that the policy is * enforced until the queue times out.

*/ inline PlayerLatencyPolicy& WithPolicyDurationSeconds(int value) { SetPolicyDurationSeconds(value); return *this;} private: int m_maximumIndividualPlayerLatencyMilliseconds; bool m_maximumIndividualPlayerLatencyMillisecondsHasBeenSet; int m_policyDurationSeconds; bool m_policyDurationSecondsHasBeenSet; }; } // namespace Model } // namespace GameLift } // namespace Aws