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

The routing configuration for a fleet alias.

Related actions *

All * APIs by task

See Also:

AWS * API Reference

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

The type of routing strategy for the alias.

Possible routing types * include the following:

  • SIMPLE - The alias resolves to * one specific fleet. Use this type when routing to active fleets.

  • *

    TERMINAL - The alias does not resolve to a fleet but instead can be * used to display a message to the user. A terminal alias throws a * TerminalRoutingStrategyException with the message embedded.

*/ inline const RoutingStrategyType& GetType() const{ return m_type; } /** *

The type of routing strategy for the alias.

Possible routing types * include the following:

  • SIMPLE - The alias resolves to * one specific fleet. Use this type when routing to active fleets.

  • *

    TERMINAL - The alias does not resolve to a fleet but instead can be * used to display a message to the user. A terminal alias throws a * TerminalRoutingStrategyException with the message embedded.

*/ inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; } /** *

The type of routing strategy for the alias.

Possible routing types * include the following:

  • SIMPLE - The alias resolves to * one specific fleet. Use this type when routing to active fleets.

  • *

    TERMINAL - The alias does not resolve to a fleet but instead can be * used to display a message to the user. A terminal alias throws a * TerminalRoutingStrategyException with the message embedded.

*/ inline void SetType(const RoutingStrategyType& value) { m_typeHasBeenSet = true; m_type = value; } /** *

The type of routing strategy for the alias.

Possible routing types * include the following:

  • SIMPLE - The alias resolves to * one specific fleet. Use this type when routing to active fleets.

  • *

    TERMINAL - The alias does not resolve to a fleet but instead can be * used to display a message to the user. A terminal alias throws a * TerminalRoutingStrategyException with the message embedded.

*/ inline void SetType(RoutingStrategyType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); } /** *

The type of routing strategy for the alias.

Possible routing types * include the following:

  • SIMPLE - The alias resolves to * one specific fleet. Use this type when routing to active fleets.

  • *

    TERMINAL - The alias does not resolve to a fleet but instead can be * used to display a message to the user. A terminal alias throws a * TerminalRoutingStrategyException with the message embedded.

*/ inline RoutingStrategy& WithType(const RoutingStrategyType& value) { SetType(value); return *this;} /** *

The type of routing strategy for the alias.

Possible routing types * include the following:

  • SIMPLE - The alias resolves to * one specific fleet. Use this type when routing to active fleets.

  • *

    TERMINAL - The alias does not resolve to a fleet but instead can be * used to display a message to the user. A terminal alias throws a * TerminalRoutingStrategyException with the message embedded.

*/ inline RoutingStrategy& WithType(RoutingStrategyType&& value) { SetType(std::move(value)); return *this;} /** *

A unique identifier for the fleet that the alias points to. This value is the * fleet ID, not the fleet ARN.

*/ inline const Aws::String& GetFleetId() const{ return m_fleetId; } /** *

A unique identifier for the fleet that the alias points to. This value is the * fleet ID, not the fleet ARN.

*/ inline bool FleetIdHasBeenSet() const { return m_fleetIdHasBeenSet; } /** *

A unique identifier for the fleet that the alias points to. This value is the * fleet ID, not the fleet ARN.

*/ inline void SetFleetId(const Aws::String& value) { m_fleetIdHasBeenSet = true; m_fleetId = value; } /** *

A unique identifier for the fleet that the alias points to. This value is the * fleet ID, not the fleet ARN.

*/ inline void SetFleetId(Aws::String&& value) { m_fleetIdHasBeenSet = true; m_fleetId = std::move(value); } /** *

A unique identifier for the fleet that the alias points to. This value is the * fleet ID, not the fleet ARN.

*/ inline void SetFleetId(const char* value) { m_fleetIdHasBeenSet = true; m_fleetId.assign(value); } /** *

A unique identifier for the fleet that the alias points to. This value is the * fleet ID, not the fleet ARN.

*/ inline RoutingStrategy& WithFleetId(const Aws::String& value) { SetFleetId(value); return *this;} /** *

A unique identifier for the fleet that the alias points to. This value is the * fleet ID, not the fleet ARN.

*/ inline RoutingStrategy& WithFleetId(Aws::String&& value) { SetFleetId(std::move(value)); return *this;} /** *

A unique identifier for the fleet that the alias points to. This value is the * fleet ID, not the fleet ARN.

*/ inline RoutingStrategy& WithFleetId(const char* value) { SetFleetId(value); return *this;} /** *

The message text to be used with a terminal routing strategy.

*/ inline const Aws::String& GetMessage() const{ return m_message; } /** *

The message text to be used with a terminal routing strategy.

*/ inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; } /** *

The message text to be used with a terminal routing strategy.

*/ inline void SetMessage(const Aws::String& value) { m_messageHasBeenSet = true; m_message = value; } /** *

The message text to be used with a terminal routing strategy.

*/ inline void SetMessage(Aws::String&& value) { m_messageHasBeenSet = true; m_message = std::move(value); } /** *

The message text to be used with a terminal routing strategy.

*/ inline void SetMessage(const char* value) { m_messageHasBeenSet = true; m_message.assign(value); } /** *

The message text to be used with a terminal routing strategy.

*/ inline RoutingStrategy& WithMessage(const Aws::String& value) { SetMessage(value); return *this;} /** *

The message text to be used with a terminal routing strategy.

*/ inline RoutingStrategy& WithMessage(Aws::String&& value) { SetMessage(std::move(value)); return *this;} /** *

The message text to be used with a terminal routing strategy.

*/ inline RoutingStrategy& WithMessage(const char* value) { SetMessage(value); return *this;} private: RoutingStrategyType m_type; bool m_typeHasBeenSet = false; Aws::String m_fleetId; bool m_fleetIdHasBeenSet = false; Aws::String m_message; bool m_messageHasBeenSet = false; }; } // namespace Model } // namespace GameLift } // namespace Aws