{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.GameLift.Types.GameServerGroup
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.GameLift.Types.GameServerGroup where

import qualified Amazonka.Core as Core
import Amazonka.GameLift.Types.BalancingStrategy
import Amazonka.GameLift.Types.GameServerGroupAction
import Amazonka.GameLift.Types.GameServerGroupStatus
import Amazonka.GameLift.Types.GameServerProtectionPolicy
import Amazonka.GameLift.Types.InstanceDefinition
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | __This data type is used with the GameLift FleetIQ and game server
-- groups.__
--
-- Properties that describe a game server group resource. A game server
-- group manages certain properties related to a corresponding EC2 Auto
-- Scaling group.
--
-- A game server group is created by a successful call to
-- @CreateGameServerGroup@ and deleted by calling @DeleteGameServerGroup@.
-- Game server group activity can be temporarily suspended and resumed by
-- calling @SuspendGameServerGroup@ and @ResumeGameServerGroup@,
-- respectively.
--
-- __Related actions__
--
-- CreateGameServerGroup | ListGameServerGroups | DescribeGameServerGroup |
-- UpdateGameServerGroup | DeleteGameServerGroup | ResumeGameServerGroup |
-- SuspendGameServerGroup | DescribeGameServerInstances |
-- <https://docs.aws.amazon.com/gamelift/latest/fleetiqguide/reference-awssdk-fleetiq.html All APIs by task>
--
-- /See:/ 'newGameServerGroup' smart constructor.
data GameServerGroup = GameServerGroup'
  { -- | A time stamp indicating when this data object was created. Format is a
    -- number expressed in Unix time as milliseconds (for example
    -- @\"1469498468.057\"@).
    GameServerGroup -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
    -- | The current status of the game server group. Possible statuses include:
    --
    -- -   @NEW@ - GameLift FleetIQ has validated the @CreateGameServerGroup()@
    --     request.
    --
    -- -   @ACTIVATING@ - GameLift FleetIQ is setting up a game server group,
    --     which includes creating an Auto Scaling group in your AWS account.
    --
    -- -   @ACTIVE@ - The game server group has been successfully created.
    --
    -- -   @DELETE_SCHEDULED@ - A request to delete the game server group has
    --     been received.
    --
    -- -   @DELETING@ - GameLift FleetIQ has received a valid
    --     @DeleteGameServerGroup()@ request and is processing it. GameLift
    --     FleetIQ must first complete and release hosts before it deletes the
    --     Auto Scaling group and the game server group.
    --
    -- -   @DELETED@ - The game server group has been successfully deleted.
    --
    -- -   @ERROR@ - The asynchronous processes of activating or deleting a
    --     game server group has failed, resulting in an error state.
    GameServerGroup -> Maybe GameServerGroupStatus
status :: Prelude.Maybe GameServerGroupStatus,
    -- | The set of EC2 instance types that GameLift FleetIQ can use when
    -- balancing and automatically scaling instances in the corresponding Auto
    -- Scaling group.
    GameServerGroup -> Maybe (NonEmpty InstanceDefinition)
instanceDefinitions :: Prelude.Maybe (Prelude.NonEmpty InstanceDefinition),
    -- | A timestamp that indicates when this game server group was last updated.
    GameServerGroup -> Maybe POSIX
lastUpdatedTime :: Prelude.Maybe Core.POSIX,
    -- | Indicates how GameLift FleetIQ balances the use of Spot Instances and
    -- On-Demand Instances in the game server group. Method options include the
    -- following:
    --
    -- -   @SPOT_ONLY@ - Only Spot Instances are used in the game server group.
    --     If Spot Instances are unavailable or not viable for game hosting,
    --     the game server group provides no hosting capacity until Spot
    --     Instances can again be used. Until then, no new instances are
    --     started, and the existing nonviable Spot Instances are terminated
    --     (after current gameplay ends) and are not replaced.
    --
    -- -   @SPOT_PREFERRED@ - (default value) Spot Instances are used whenever
    --     available in the game server group. If Spot Instances are
    --     unavailable, the game server group continues to provide hosting
    --     capacity by falling back to On-Demand Instances. Existing nonviable
    --     Spot Instances are terminated (after current gameplay ends) and are
    --     replaced with new On-Demand Instances.
    --
    -- -   @ON_DEMAND_ONLY@ - Only On-Demand Instances are used in the game
    --     server group. No Spot Instances are used, even when available, while
    --     this balancing strategy is in force.
    GameServerGroup -> Maybe BalancingStrategy
balancingStrategy :: Prelude.Maybe BalancingStrategy,
    -- | A developer-defined identifier for the game server group. The name is
    -- unique for each Region in each AWS account.
    GameServerGroup -> Maybe Text
gameServerGroupName :: Prelude.Maybe Prelude.Text,
    -- | A list of activities that are currently suspended for this game server
    -- group. If this property is empty, all activities are occurring.
    GameServerGroup -> Maybe (NonEmpty GameServerGroupAction)
suspendedActions :: Prelude.Maybe (Prelude.NonEmpty GameServerGroupAction),
    -- | A generated unique ID for the EC2 Auto Scaling group that is associated
    -- with this game server group.
    GameServerGroup -> Maybe Text
autoScalingGroupArn :: Prelude.Maybe Prelude.Text,
    -- | Additional information about the current game server group status. This
    -- information might provide additional insight on groups that are in
    -- @ERROR@ status.
    GameServerGroup -> Maybe Text
statusReason :: Prelude.Maybe Prelude.Text,
    -- | A flag that indicates whether instances in the game server group are
    -- protected from early termination. Unprotected instances that have active
    -- game servers running might be terminated during a scale-down event,
    -- causing players to be dropped from the game. Protected instances cannot
    -- be terminated while there are active game servers running except in the
    -- event of a forced game server group deletion (see ). An exception to
    -- this is with Spot Instances, which can be terminated by AWS regardless
    -- of protection status.
    GameServerGroup -> Maybe GameServerProtectionPolicy
gameServerProtectionPolicy :: Prelude.Maybe GameServerProtectionPolicy,
    -- | A generated unique ID for the game server group.
    GameServerGroup -> Maybe Text
gameServerGroupArn :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name
    -- (<https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html ARN>)
    -- for an IAM role that allows Amazon GameLift to access your EC2 Auto
    -- Scaling groups.
    GameServerGroup -> Maybe Text
roleArn :: Prelude.Maybe Prelude.Text
  }
  deriving (GameServerGroup -> GameServerGroup -> Bool
(GameServerGroup -> GameServerGroup -> Bool)
-> (GameServerGroup -> GameServerGroup -> Bool)
-> Eq GameServerGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GameServerGroup -> GameServerGroup -> Bool
$c/= :: GameServerGroup -> GameServerGroup -> Bool
== :: GameServerGroup -> GameServerGroup -> Bool
$c== :: GameServerGroup -> GameServerGroup -> Bool
Prelude.Eq, ReadPrec [GameServerGroup]
ReadPrec GameServerGroup
Int -> ReadS GameServerGroup
ReadS [GameServerGroup]
(Int -> ReadS GameServerGroup)
-> ReadS [GameServerGroup]
-> ReadPrec GameServerGroup
-> ReadPrec [GameServerGroup]
-> Read GameServerGroup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GameServerGroup]
$creadListPrec :: ReadPrec [GameServerGroup]
readPrec :: ReadPrec GameServerGroup
$creadPrec :: ReadPrec GameServerGroup
readList :: ReadS [GameServerGroup]
$creadList :: ReadS [GameServerGroup]
readsPrec :: Int -> ReadS GameServerGroup
$creadsPrec :: Int -> ReadS GameServerGroup
Prelude.Read, Int -> GameServerGroup -> ShowS
[GameServerGroup] -> ShowS
GameServerGroup -> String
(Int -> GameServerGroup -> ShowS)
-> (GameServerGroup -> String)
-> ([GameServerGroup] -> ShowS)
-> Show GameServerGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GameServerGroup] -> ShowS
$cshowList :: [GameServerGroup] -> ShowS
show :: GameServerGroup -> String
$cshow :: GameServerGroup -> String
showsPrec :: Int -> GameServerGroup -> ShowS
$cshowsPrec :: Int -> GameServerGroup -> ShowS
Prelude.Show, (forall x. GameServerGroup -> Rep GameServerGroup x)
-> (forall x. Rep GameServerGroup x -> GameServerGroup)
-> Generic GameServerGroup
forall x. Rep GameServerGroup x -> GameServerGroup
forall x. GameServerGroup -> Rep GameServerGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GameServerGroup x -> GameServerGroup
$cfrom :: forall x. GameServerGroup -> Rep GameServerGroup x
Prelude.Generic)

-- |
-- Create a value of 'GameServerGroup' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'creationTime', 'gameServerGroup_creationTime' - A time stamp indicating when this data object was created. Format is a
-- number expressed in Unix time as milliseconds (for example
-- @\"1469498468.057\"@).
--
-- 'status', 'gameServerGroup_status' - The current status of the game server group. Possible statuses include:
--
-- -   @NEW@ - GameLift FleetIQ has validated the @CreateGameServerGroup()@
--     request.
--
-- -   @ACTIVATING@ - GameLift FleetIQ is setting up a game server group,
--     which includes creating an Auto Scaling group in your AWS account.
--
-- -   @ACTIVE@ - The game server group has been successfully created.
--
-- -   @DELETE_SCHEDULED@ - A request to delete the game server group has
--     been received.
--
-- -   @DELETING@ - GameLift FleetIQ has received a valid
--     @DeleteGameServerGroup()@ request and is processing it. GameLift
--     FleetIQ must first complete and release hosts before it deletes the
--     Auto Scaling group and the game server group.
--
-- -   @DELETED@ - The game server group has been successfully deleted.
--
-- -   @ERROR@ - The asynchronous processes of activating or deleting a
--     game server group has failed, resulting in an error state.
--
-- 'instanceDefinitions', 'gameServerGroup_instanceDefinitions' - The set of EC2 instance types that GameLift FleetIQ can use when
-- balancing and automatically scaling instances in the corresponding Auto
-- Scaling group.
--
-- 'lastUpdatedTime', 'gameServerGroup_lastUpdatedTime' - A timestamp that indicates when this game server group was last updated.
--
-- 'balancingStrategy', 'gameServerGroup_balancingStrategy' - Indicates how GameLift FleetIQ balances the use of Spot Instances and
-- On-Demand Instances in the game server group. Method options include the
-- following:
--
-- -   @SPOT_ONLY@ - Only Spot Instances are used in the game server group.
--     If Spot Instances are unavailable or not viable for game hosting,
--     the game server group provides no hosting capacity until Spot
--     Instances can again be used. Until then, no new instances are
--     started, and the existing nonviable Spot Instances are terminated
--     (after current gameplay ends) and are not replaced.
--
-- -   @SPOT_PREFERRED@ - (default value) Spot Instances are used whenever
--     available in the game server group. If Spot Instances are
--     unavailable, the game server group continues to provide hosting
--     capacity by falling back to On-Demand Instances. Existing nonviable
--     Spot Instances are terminated (after current gameplay ends) and are
--     replaced with new On-Demand Instances.
--
-- -   @ON_DEMAND_ONLY@ - Only On-Demand Instances are used in the game
--     server group. No Spot Instances are used, even when available, while
--     this balancing strategy is in force.
--
-- 'gameServerGroupName', 'gameServerGroup_gameServerGroupName' - A developer-defined identifier for the game server group. The name is
-- unique for each Region in each AWS account.
--
-- 'suspendedActions', 'gameServerGroup_suspendedActions' - A list of activities that are currently suspended for this game server
-- group. If this property is empty, all activities are occurring.
--
-- 'autoScalingGroupArn', 'gameServerGroup_autoScalingGroupArn' - A generated unique ID for the EC2 Auto Scaling group that is associated
-- with this game server group.
--
-- 'statusReason', 'gameServerGroup_statusReason' - Additional information about the current game server group status. This
-- information might provide additional insight on groups that are in
-- @ERROR@ status.
--
-- 'gameServerProtectionPolicy', 'gameServerGroup_gameServerProtectionPolicy' - A flag that indicates whether instances in the game server group are
-- protected from early termination. Unprotected instances that have active
-- game servers running might be terminated during a scale-down event,
-- causing players to be dropped from the game. Protected instances cannot
-- be terminated while there are active game servers running except in the
-- event of a forced game server group deletion (see ). An exception to
-- this is with Spot Instances, which can be terminated by AWS regardless
-- of protection status.
--
-- 'gameServerGroupArn', 'gameServerGroup_gameServerGroupArn' - A generated unique ID for the game server group.
--
-- 'roleArn', 'gameServerGroup_roleArn' - The Amazon Resource Name
-- (<https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html ARN>)
-- for an IAM role that allows Amazon GameLift to access your EC2 Auto
-- Scaling groups.
newGameServerGroup ::
  GameServerGroup
newGameServerGroup :: GameServerGroup
newGameServerGroup =
  GameServerGroup' :: Maybe POSIX
-> Maybe GameServerGroupStatus
-> Maybe (NonEmpty InstanceDefinition)
-> Maybe POSIX
-> Maybe BalancingStrategy
-> Maybe Text
-> Maybe (NonEmpty GameServerGroupAction)
-> Maybe Text
-> Maybe Text
-> Maybe GameServerProtectionPolicy
-> Maybe Text
-> Maybe Text
-> GameServerGroup
GameServerGroup'
    { $sel:creationTime:GameServerGroup' :: Maybe POSIX
creationTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:status:GameServerGroup' :: Maybe GameServerGroupStatus
status = Maybe GameServerGroupStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:instanceDefinitions:GameServerGroup' :: Maybe (NonEmpty InstanceDefinition)
instanceDefinitions = Maybe (NonEmpty InstanceDefinition)
forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedTime:GameServerGroup' :: Maybe POSIX
lastUpdatedTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:balancingStrategy:GameServerGroup' :: Maybe BalancingStrategy
balancingStrategy = Maybe BalancingStrategy
forall a. Maybe a
Prelude.Nothing,
      $sel:gameServerGroupName:GameServerGroup' :: Maybe Text
gameServerGroupName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:suspendedActions:GameServerGroup' :: Maybe (NonEmpty GameServerGroupAction)
suspendedActions = Maybe (NonEmpty GameServerGroupAction)
forall a. Maybe a
Prelude.Nothing,
      $sel:autoScalingGroupArn:GameServerGroup' :: Maybe Text
autoScalingGroupArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:statusReason:GameServerGroup' :: Maybe Text
statusReason = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:gameServerProtectionPolicy:GameServerGroup' :: Maybe GameServerProtectionPolicy
gameServerProtectionPolicy = Maybe GameServerProtectionPolicy
forall a. Maybe a
Prelude.Nothing,
      $sel:gameServerGroupArn:GameServerGroup' :: Maybe Text
gameServerGroupArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:roleArn:GameServerGroup' :: Maybe Text
roleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | A time stamp indicating when this data object was created. Format is a
-- number expressed in Unix time as milliseconds (for example
-- @\"1469498468.057\"@).
gameServerGroup_creationTime :: Lens.Lens' GameServerGroup (Prelude.Maybe Prelude.UTCTime)
gameServerGroup_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GameServerGroup -> f GameServerGroup
gameServerGroup_creationTime = (GameServerGroup -> Maybe POSIX)
-> (GameServerGroup -> Maybe POSIX -> GameServerGroup)
-> Lens GameServerGroup GameServerGroup (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GameServerGroup' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:GameServerGroup' :: GameServerGroup -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: GameServerGroup
s@GameServerGroup' {} Maybe POSIX
a -> GameServerGroup
s {$sel:creationTime:GameServerGroup' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: GameServerGroup) ((Maybe POSIX -> f (Maybe POSIX))
 -> GameServerGroup -> f GameServerGroup)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GameServerGroup
-> f GameServerGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The current status of the game server group. Possible statuses include:
--
-- -   @NEW@ - GameLift FleetIQ has validated the @CreateGameServerGroup()@
--     request.
--
-- -   @ACTIVATING@ - GameLift FleetIQ is setting up a game server group,
--     which includes creating an Auto Scaling group in your AWS account.
--
-- -   @ACTIVE@ - The game server group has been successfully created.
--
-- -   @DELETE_SCHEDULED@ - A request to delete the game server group has
--     been received.
--
-- -   @DELETING@ - GameLift FleetIQ has received a valid
--     @DeleteGameServerGroup()@ request and is processing it. GameLift
--     FleetIQ must first complete and release hosts before it deletes the
--     Auto Scaling group and the game server group.
--
-- -   @DELETED@ - The game server group has been successfully deleted.
--
-- -   @ERROR@ - The asynchronous processes of activating or deleting a
--     game server group has failed, resulting in an error state.
gameServerGroup_status :: Lens.Lens' GameServerGroup (Prelude.Maybe GameServerGroupStatus)
gameServerGroup_status :: (Maybe GameServerGroupStatus -> f (Maybe GameServerGroupStatus))
-> GameServerGroup -> f GameServerGroup
gameServerGroup_status = (GameServerGroup -> Maybe GameServerGroupStatus)
-> (GameServerGroup
    -> Maybe GameServerGroupStatus -> GameServerGroup)
-> Lens
     GameServerGroup
     GameServerGroup
     (Maybe GameServerGroupStatus)
     (Maybe GameServerGroupStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GameServerGroup' {Maybe GameServerGroupStatus
status :: Maybe GameServerGroupStatus
$sel:status:GameServerGroup' :: GameServerGroup -> Maybe GameServerGroupStatus
status} -> Maybe GameServerGroupStatus
status) (\s :: GameServerGroup
s@GameServerGroup' {} Maybe GameServerGroupStatus
a -> GameServerGroup
s {$sel:status:GameServerGroup' :: Maybe GameServerGroupStatus
status = Maybe GameServerGroupStatus
a} :: GameServerGroup)

-- | The set of EC2 instance types that GameLift FleetIQ can use when
-- balancing and automatically scaling instances in the corresponding Auto
-- Scaling group.
gameServerGroup_instanceDefinitions :: Lens.Lens' GameServerGroup (Prelude.Maybe (Prelude.NonEmpty InstanceDefinition))
gameServerGroup_instanceDefinitions :: (Maybe (NonEmpty InstanceDefinition)
 -> f (Maybe (NonEmpty InstanceDefinition)))
-> GameServerGroup -> f GameServerGroup
gameServerGroup_instanceDefinitions = (GameServerGroup -> Maybe (NonEmpty InstanceDefinition))
-> (GameServerGroup
    -> Maybe (NonEmpty InstanceDefinition) -> GameServerGroup)
-> Lens
     GameServerGroup
     GameServerGroup
     (Maybe (NonEmpty InstanceDefinition))
     (Maybe (NonEmpty InstanceDefinition))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GameServerGroup' {Maybe (NonEmpty InstanceDefinition)
instanceDefinitions :: Maybe (NonEmpty InstanceDefinition)
$sel:instanceDefinitions:GameServerGroup' :: GameServerGroup -> Maybe (NonEmpty InstanceDefinition)
instanceDefinitions} -> Maybe (NonEmpty InstanceDefinition)
instanceDefinitions) (\s :: GameServerGroup
s@GameServerGroup' {} Maybe (NonEmpty InstanceDefinition)
a -> GameServerGroup
s {$sel:instanceDefinitions:GameServerGroup' :: Maybe (NonEmpty InstanceDefinition)
instanceDefinitions = Maybe (NonEmpty InstanceDefinition)
a} :: GameServerGroup) ((Maybe (NonEmpty InstanceDefinition)
  -> f (Maybe (NonEmpty InstanceDefinition)))
 -> GameServerGroup -> f GameServerGroup)
-> ((Maybe (NonEmpty InstanceDefinition)
     -> f (Maybe (NonEmpty InstanceDefinition)))
    -> Maybe (NonEmpty InstanceDefinition)
    -> f (Maybe (NonEmpty InstanceDefinition)))
-> (Maybe (NonEmpty InstanceDefinition)
    -> f (Maybe (NonEmpty InstanceDefinition)))
-> GameServerGroup
-> f GameServerGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty InstanceDefinition)
  (NonEmpty InstanceDefinition)
  (NonEmpty InstanceDefinition)
  (NonEmpty InstanceDefinition)
-> Iso
     (Maybe (NonEmpty InstanceDefinition))
     (Maybe (NonEmpty InstanceDefinition))
     (Maybe (NonEmpty InstanceDefinition))
     (Maybe (NonEmpty InstanceDefinition))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (NonEmpty InstanceDefinition)
  (NonEmpty InstanceDefinition)
  (NonEmpty InstanceDefinition)
  (NonEmpty InstanceDefinition)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A timestamp that indicates when this game server group was last updated.
gameServerGroup_lastUpdatedTime :: Lens.Lens' GameServerGroup (Prelude.Maybe Prelude.UTCTime)
gameServerGroup_lastUpdatedTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GameServerGroup -> f GameServerGroup
gameServerGroup_lastUpdatedTime = (GameServerGroup -> Maybe POSIX)
-> (GameServerGroup -> Maybe POSIX -> GameServerGroup)
-> Lens GameServerGroup GameServerGroup (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GameServerGroup' {Maybe POSIX
lastUpdatedTime :: Maybe POSIX
$sel:lastUpdatedTime:GameServerGroup' :: GameServerGroup -> Maybe POSIX
lastUpdatedTime} -> Maybe POSIX
lastUpdatedTime) (\s :: GameServerGroup
s@GameServerGroup' {} Maybe POSIX
a -> GameServerGroup
s {$sel:lastUpdatedTime:GameServerGroup' :: Maybe POSIX
lastUpdatedTime = Maybe POSIX
a} :: GameServerGroup) ((Maybe POSIX -> f (Maybe POSIX))
 -> GameServerGroup -> f GameServerGroup)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GameServerGroup
-> f GameServerGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | Indicates how GameLift FleetIQ balances the use of Spot Instances and
-- On-Demand Instances in the game server group. Method options include the
-- following:
--
-- -   @SPOT_ONLY@ - Only Spot Instances are used in the game server group.
--     If Spot Instances are unavailable or not viable for game hosting,
--     the game server group provides no hosting capacity until Spot
--     Instances can again be used. Until then, no new instances are
--     started, and the existing nonviable Spot Instances are terminated
--     (after current gameplay ends) and are not replaced.
--
-- -   @SPOT_PREFERRED@ - (default value) Spot Instances are used whenever
--     available in the game server group. If Spot Instances are
--     unavailable, the game server group continues to provide hosting
--     capacity by falling back to On-Demand Instances. Existing nonviable
--     Spot Instances are terminated (after current gameplay ends) and are
--     replaced with new On-Demand Instances.
--
-- -   @ON_DEMAND_ONLY@ - Only On-Demand Instances are used in the game
--     server group. No Spot Instances are used, even when available, while
--     this balancing strategy is in force.
gameServerGroup_balancingStrategy :: Lens.Lens' GameServerGroup (Prelude.Maybe BalancingStrategy)
gameServerGroup_balancingStrategy :: (Maybe BalancingStrategy -> f (Maybe BalancingStrategy))
-> GameServerGroup -> f GameServerGroup
gameServerGroup_balancingStrategy = (GameServerGroup -> Maybe BalancingStrategy)
-> (GameServerGroup -> Maybe BalancingStrategy -> GameServerGroup)
-> Lens
     GameServerGroup
     GameServerGroup
     (Maybe BalancingStrategy)
     (Maybe BalancingStrategy)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GameServerGroup' {Maybe BalancingStrategy
balancingStrategy :: Maybe BalancingStrategy
$sel:balancingStrategy:GameServerGroup' :: GameServerGroup -> Maybe BalancingStrategy
balancingStrategy} -> Maybe BalancingStrategy
balancingStrategy) (\s :: GameServerGroup
s@GameServerGroup' {} Maybe BalancingStrategy
a -> GameServerGroup
s {$sel:balancingStrategy:GameServerGroup' :: Maybe BalancingStrategy
balancingStrategy = Maybe BalancingStrategy
a} :: GameServerGroup)

-- | A developer-defined identifier for the game server group. The name is
-- unique for each Region in each AWS account.
gameServerGroup_gameServerGroupName :: Lens.Lens' GameServerGroup (Prelude.Maybe Prelude.Text)
gameServerGroup_gameServerGroupName :: (Maybe Text -> f (Maybe Text))
-> GameServerGroup -> f GameServerGroup
gameServerGroup_gameServerGroupName = (GameServerGroup -> Maybe Text)
-> (GameServerGroup -> Maybe Text -> GameServerGroup)
-> Lens GameServerGroup GameServerGroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GameServerGroup' {Maybe Text
gameServerGroupName :: Maybe Text
$sel:gameServerGroupName:GameServerGroup' :: GameServerGroup -> Maybe Text
gameServerGroupName} -> Maybe Text
gameServerGroupName) (\s :: GameServerGroup
s@GameServerGroup' {} Maybe Text
a -> GameServerGroup
s {$sel:gameServerGroupName:GameServerGroup' :: Maybe Text
gameServerGroupName = Maybe Text
a} :: GameServerGroup)

-- | A list of activities that are currently suspended for this game server
-- group. If this property is empty, all activities are occurring.
gameServerGroup_suspendedActions :: Lens.Lens' GameServerGroup (Prelude.Maybe (Prelude.NonEmpty GameServerGroupAction))
gameServerGroup_suspendedActions :: (Maybe (NonEmpty GameServerGroupAction)
 -> f (Maybe (NonEmpty GameServerGroupAction)))
-> GameServerGroup -> f GameServerGroup
gameServerGroup_suspendedActions = (GameServerGroup -> Maybe (NonEmpty GameServerGroupAction))
-> (GameServerGroup
    -> Maybe (NonEmpty GameServerGroupAction) -> GameServerGroup)
-> Lens
     GameServerGroup
     GameServerGroup
     (Maybe (NonEmpty GameServerGroupAction))
     (Maybe (NonEmpty GameServerGroupAction))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GameServerGroup' {Maybe (NonEmpty GameServerGroupAction)
suspendedActions :: Maybe (NonEmpty GameServerGroupAction)
$sel:suspendedActions:GameServerGroup' :: GameServerGroup -> Maybe (NonEmpty GameServerGroupAction)
suspendedActions} -> Maybe (NonEmpty GameServerGroupAction)
suspendedActions) (\s :: GameServerGroup
s@GameServerGroup' {} Maybe (NonEmpty GameServerGroupAction)
a -> GameServerGroup
s {$sel:suspendedActions:GameServerGroup' :: Maybe (NonEmpty GameServerGroupAction)
suspendedActions = Maybe (NonEmpty GameServerGroupAction)
a} :: GameServerGroup) ((Maybe (NonEmpty GameServerGroupAction)
  -> f (Maybe (NonEmpty GameServerGroupAction)))
 -> GameServerGroup -> f GameServerGroup)
-> ((Maybe (NonEmpty GameServerGroupAction)
     -> f (Maybe (NonEmpty GameServerGroupAction)))
    -> Maybe (NonEmpty GameServerGroupAction)
    -> f (Maybe (NonEmpty GameServerGroupAction)))
-> (Maybe (NonEmpty GameServerGroupAction)
    -> f (Maybe (NonEmpty GameServerGroupAction)))
-> GameServerGroup
-> f GameServerGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty GameServerGroupAction)
  (NonEmpty GameServerGroupAction)
  (NonEmpty GameServerGroupAction)
  (NonEmpty GameServerGroupAction)
-> Iso
     (Maybe (NonEmpty GameServerGroupAction))
     (Maybe (NonEmpty GameServerGroupAction))
     (Maybe (NonEmpty GameServerGroupAction))
     (Maybe (NonEmpty GameServerGroupAction))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (NonEmpty GameServerGroupAction)
  (NonEmpty GameServerGroupAction)
  (NonEmpty GameServerGroupAction)
  (NonEmpty GameServerGroupAction)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A generated unique ID for the EC2 Auto Scaling group that is associated
-- with this game server group.
gameServerGroup_autoScalingGroupArn :: Lens.Lens' GameServerGroup (Prelude.Maybe Prelude.Text)
gameServerGroup_autoScalingGroupArn :: (Maybe Text -> f (Maybe Text))
-> GameServerGroup -> f GameServerGroup
gameServerGroup_autoScalingGroupArn = (GameServerGroup -> Maybe Text)
-> (GameServerGroup -> Maybe Text -> GameServerGroup)
-> Lens GameServerGroup GameServerGroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GameServerGroup' {Maybe Text
autoScalingGroupArn :: Maybe Text
$sel:autoScalingGroupArn:GameServerGroup' :: GameServerGroup -> Maybe Text
autoScalingGroupArn} -> Maybe Text
autoScalingGroupArn) (\s :: GameServerGroup
s@GameServerGroup' {} Maybe Text
a -> GameServerGroup
s {$sel:autoScalingGroupArn:GameServerGroup' :: Maybe Text
autoScalingGroupArn = Maybe Text
a} :: GameServerGroup)

-- | Additional information about the current game server group status. This
-- information might provide additional insight on groups that are in
-- @ERROR@ status.
gameServerGroup_statusReason :: Lens.Lens' GameServerGroup (Prelude.Maybe Prelude.Text)
gameServerGroup_statusReason :: (Maybe Text -> f (Maybe Text))
-> GameServerGroup -> f GameServerGroup
gameServerGroup_statusReason = (GameServerGroup -> Maybe Text)
-> (GameServerGroup -> Maybe Text -> GameServerGroup)
-> Lens GameServerGroup GameServerGroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GameServerGroup' {Maybe Text
statusReason :: Maybe Text
$sel:statusReason:GameServerGroup' :: GameServerGroup -> Maybe Text
statusReason} -> Maybe Text
statusReason) (\s :: GameServerGroup
s@GameServerGroup' {} Maybe Text
a -> GameServerGroup
s {$sel:statusReason:GameServerGroup' :: Maybe Text
statusReason = Maybe Text
a} :: GameServerGroup)

-- | A flag that indicates whether instances in the game server group are
-- protected from early termination. Unprotected instances that have active
-- game servers running might be terminated during a scale-down event,
-- causing players to be dropped from the game. Protected instances cannot
-- be terminated while there are active game servers running except in the
-- event of a forced game server group deletion (see ). An exception to
-- this is with Spot Instances, which can be terminated by AWS regardless
-- of protection status.
gameServerGroup_gameServerProtectionPolicy :: Lens.Lens' GameServerGroup (Prelude.Maybe GameServerProtectionPolicy)
gameServerGroup_gameServerProtectionPolicy :: (Maybe GameServerProtectionPolicy
 -> f (Maybe GameServerProtectionPolicy))
-> GameServerGroup -> f GameServerGroup
gameServerGroup_gameServerProtectionPolicy = (GameServerGroup -> Maybe GameServerProtectionPolicy)
-> (GameServerGroup
    -> Maybe GameServerProtectionPolicy -> GameServerGroup)
-> Lens
     GameServerGroup
     GameServerGroup
     (Maybe GameServerProtectionPolicy)
     (Maybe GameServerProtectionPolicy)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GameServerGroup' {Maybe GameServerProtectionPolicy
gameServerProtectionPolicy :: Maybe GameServerProtectionPolicy
$sel:gameServerProtectionPolicy:GameServerGroup' :: GameServerGroup -> Maybe GameServerProtectionPolicy
gameServerProtectionPolicy} -> Maybe GameServerProtectionPolicy
gameServerProtectionPolicy) (\s :: GameServerGroup
s@GameServerGroup' {} Maybe GameServerProtectionPolicy
a -> GameServerGroup
s {$sel:gameServerProtectionPolicy:GameServerGroup' :: Maybe GameServerProtectionPolicy
gameServerProtectionPolicy = Maybe GameServerProtectionPolicy
a} :: GameServerGroup)

-- | A generated unique ID for the game server group.
gameServerGroup_gameServerGroupArn :: Lens.Lens' GameServerGroup (Prelude.Maybe Prelude.Text)
gameServerGroup_gameServerGroupArn :: (Maybe Text -> f (Maybe Text))
-> GameServerGroup -> f GameServerGroup
gameServerGroup_gameServerGroupArn = (GameServerGroup -> Maybe Text)
-> (GameServerGroup -> Maybe Text -> GameServerGroup)
-> Lens GameServerGroup GameServerGroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GameServerGroup' {Maybe Text
gameServerGroupArn :: Maybe Text
$sel:gameServerGroupArn:GameServerGroup' :: GameServerGroup -> Maybe Text
gameServerGroupArn} -> Maybe Text
gameServerGroupArn) (\s :: GameServerGroup
s@GameServerGroup' {} Maybe Text
a -> GameServerGroup
s {$sel:gameServerGroupArn:GameServerGroup' :: Maybe Text
gameServerGroupArn = Maybe Text
a} :: GameServerGroup)

-- | The Amazon Resource Name
-- (<https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html ARN>)
-- for an IAM role that allows Amazon GameLift to access your EC2 Auto
-- Scaling groups.
gameServerGroup_roleArn :: Lens.Lens' GameServerGroup (Prelude.Maybe Prelude.Text)
gameServerGroup_roleArn :: (Maybe Text -> f (Maybe Text))
-> GameServerGroup -> f GameServerGroup
gameServerGroup_roleArn = (GameServerGroup -> Maybe Text)
-> (GameServerGroup -> Maybe Text -> GameServerGroup)
-> Lens GameServerGroup GameServerGroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GameServerGroup' {Maybe Text
roleArn :: Maybe Text
$sel:roleArn:GameServerGroup' :: GameServerGroup -> Maybe Text
roleArn} -> Maybe Text
roleArn) (\s :: GameServerGroup
s@GameServerGroup' {} Maybe Text
a -> GameServerGroup
s {$sel:roleArn:GameServerGroup' :: Maybe Text
roleArn = Maybe Text
a} :: GameServerGroup)

instance Core.FromJSON GameServerGroup where
  parseJSON :: Value -> Parser GameServerGroup
parseJSON =
    String
-> (Object -> Parser GameServerGroup)
-> Value
-> Parser GameServerGroup
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"GameServerGroup"
      ( \Object
x ->
          Maybe POSIX
-> Maybe GameServerGroupStatus
-> Maybe (NonEmpty InstanceDefinition)
-> Maybe POSIX
-> Maybe BalancingStrategy
-> Maybe Text
-> Maybe (NonEmpty GameServerGroupAction)
-> Maybe Text
-> Maybe Text
-> Maybe GameServerProtectionPolicy
-> Maybe Text
-> Maybe Text
-> GameServerGroup
GameServerGroup'
            (Maybe POSIX
 -> Maybe GameServerGroupStatus
 -> Maybe (NonEmpty InstanceDefinition)
 -> Maybe POSIX
 -> Maybe BalancingStrategy
 -> Maybe Text
 -> Maybe (NonEmpty GameServerGroupAction)
 -> Maybe Text
 -> Maybe Text
 -> Maybe GameServerProtectionPolicy
 -> Maybe Text
 -> Maybe Text
 -> GameServerGroup)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe GameServerGroupStatus
      -> Maybe (NonEmpty InstanceDefinition)
      -> Maybe POSIX
      -> Maybe BalancingStrategy
      -> Maybe Text
      -> Maybe (NonEmpty GameServerGroupAction)
      -> Maybe Text
      -> Maybe Text
      -> Maybe GameServerProtectionPolicy
      -> Maybe Text
      -> Maybe Text
      -> GameServerGroup)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreationTime")
            Parser
  (Maybe GameServerGroupStatus
   -> Maybe (NonEmpty InstanceDefinition)
   -> Maybe POSIX
   -> Maybe BalancingStrategy
   -> Maybe Text
   -> Maybe (NonEmpty GameServerGroupAction)
   -> Maybe Text
   -> Maybe Text
   -> Maybe GameServerProtectionPolicy
   -> Maybe Text
   -> Maybe Text
   -> GameServerGroup)
-> Parser (Maybe GameServerGroupStatus)
-> Parser
     (Maybe (NonEmpty InstanceDefinition)
      -> Maybe POSIX
      -> Maybe BalancingStrategy
      -> Maybe Text
      -> Maybe (NonEmpty GameServerGroupAction)
      -> Maybe Text
      -> Maybe Text
      -> Maybe GameServerProtectionPolicy
      -> Maybe Text
      -> Maybe Text
      -> GameServerGroup)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe GameServerGroupStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
            Parser
  (Maybe (NonEmpty InstanceDefinition)
   -> Maybe POSIX
   -> Maybe BalancingStrategy
   -> Maybe Text
   -> Maybe (NonEmpty GameServerGroupAction)
   -> Maybe Text
   -> Maybe Text
   -> Maybe GameServerProtectionPolicy
   -> Maybe Text
   -> Maybe Text
   -> GameServerGroup)
-> Parser (Maybe (NonEmpty InstanceDefinition))
-> Parser
     (Maybe POSIX
      -> Maybe BalancingStrategy
      -> Maybe Text
      -> Maybe (NonEmpty GameServerGroupAction)
      -> Maybe Text
      -> Maybe Text
      -> Maybe GameServerProtectionPolicy
      -> Maybe Text
      -> Maybe Text
      -> GameServerGroup)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty InstanceDefinition))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"InstanceDefinitions")
            Parser
  (Maybe POSIX
   -> Maybe BalancingStrategy
   -> Maybe Text
   -> Maybe (NonEmpty GameServerGroupAction)
   -> Maybe Text
   -> Maybe Text
   -> Maybe GameServerProtectionPolicy
   -> Maybe Text
   -> Maybe Text
   -> GameServerGroup)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe BalancingStrategy
      -> Maybe Text
      -> Maybe (NonEmpty GameServerGroupAction)
      -> Maybe Text
      -> Maybe Text
      -> Maybe GameServerProtectionPolicy
      -> Maybe Text
      -> Maybe Text
      -> GameServerGroup)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LastUpdatedTime")
            Parser
  (Maybe BalancingStrategy
   -> Maybe Text
   -> Maybe (NonEmpty GameServerGroupAction)
   -> Maybe Text
   -> Maybe Text
   -> Maybe GameServerProtectionPolicy
   -> Maybe Text
   -> Maybe Text
   -> GameServerGroup)
-> Parser (Maybe BalancingStrategy)
-> Parser
     (Maybe Text
      -> Maybe (NonEmpty GameServerGroupAction)
      -> Maybe Text
      -> Maybe Text
      -> Maybe GameServerProtectionPolicy
      -> Maybe Text
      -> Maybe Text
      -> GameServerGroup)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe BalancingStrategy)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"BalancingStrategy")
            Parser
  (Maybe Text
   -> Maybe (NonEmpty GameServerGroupAction)
   -> Maybe Text
   -> Maybe Text
   -> Maybe GameServerProtectionPolicy
   -> Maybe Text
   -> Maybe Text
   -> GameServerGroup)
-> Parser (Maybe Text)
-> Parser
     (Maybe (NonEmpty GameServerGroupAction)
      -> Maybe Text
      -> Maybe Text
      -> Maybe GameServerProtectionPolicy
      -> Maybe Text
      -> Maybe Text
      -> GameServerGroup)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"GameServerGroupName")
            Parser
  (Maybe (NonEmpty GameServerGroupAction)
   -> Maybe Text
   -> Maybe Text
   -> Maybe GameServerProtectionPolicy
   -> Maybe Text
   -> Maybe Text
   -> GameServerGroup)
-> Parser (Maybe (NonEmpty GameServerGroupAction))
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe GameServerProtectionPolicy
      -> Maybe Text
      -> Maybe Text
      -> GameServerGroup)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty GameServerGroupAction))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SuspendedActions")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe GameServerProtectionPolicy
   -> Maybe Text
   -> Maybe Text
   -> GameServerGroup)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe GameServerProtectionPolicy
      -> Maybe Text
      -> Maybe Text
      -> GameServerGroup)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AutoScalingGroupArn")
            Parser
  (Maybe Text
   -> Maybe GameServerProtectionPolicy
   -> Maybe Text
   -> Maybe Text
   -> GameServerGroup)
-> Parser (Maybe Text)
-> Parser
     (Maybe GameServerProtectionPolicy
      -> Maybe Text -> Maybe Text -> GameServerGroup)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StatusReason")
            Parser
  (Maybe GameServerProtectionPolicy
   -> Maybe Text -> Maybe Text -> GameServerGroup)
-> Parser (Maybe GameServerProtectionPolicy)
-> Parser (Maybe Text -> Maybe Text -> GameServerGroup)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe GameServerProtectionPolicy)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"GameServerProtectionPolicy")
            Parser (Maybe Text -> Maybe Text -> GameServerGroup)
-> Parser (Maybe Text) -> Parser (Maybe Text -> GameServerGroup)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"GameServerGroupArn")
            Parser (Maybe Text -> GameServerGroup)
-> Parser (Maybe Text) -> Parser GameServerGroup
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RoleArn")
      )

instance Prelude.Hashable GameServerGroup

instance Prelude.NFData GameServerGroup