{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# 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.SuspendGameServerGroup
-- 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)
--
-- __This operation is used with the GameLift FleetIQ solution and game
-- server groups.__
--
-- Temporarily stops activity on a game server group without terminating
-- instances or the game server group. You can restart activity by calling
-- ResumeGameServerGroup. You can suspend the following activity:
--
-- -   __Instance type replacement__ - This activity evaluates the current
--     game hosting viability of all Spot instance types that are defined
--     for the game server group. It updates the Auto Scaling group to
--     remove nonviable Spot Instance types, which have a higher chance of
--     game server interruptions. It then balances capacity across the
--     remaining viable Spot Instance types. When this activity is
--     suspended, the Auto Scaling group continues with its current
--     balance, regardless of viability. Instance protection, utilization
--     metrics, and capacity scaling activities continue to be active.
--
-- To suspend activity, specify a game server group ARN and the type of
-- activity to be suspended. If successful, a GameServerGroup object is
-- returned showing that the activity is listed in @SuspendedActions@.
--
-- __Learn more__
--
-- <https://docs.aws.amazon.com/gamelift/latest/fleetiqguide/gsg-intro.html GameLift FleetIQ Guide>
--
-- __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>
module Amazonka.GameLift.SuspendGameServerGroup
  ( -- * Creating a Request
    SuspendGameServerGroup (..),
    newSuspendGameServerGroup,

    -- * Request Lenses
    suspendGameServerGroup_gameServerGroupName,
    suspendGameServerGroup_suspendActions,

    -- * Destructuring the Response
    SuspendGameServerGroupResponse (..),
    newSuspendGameServerGroupResponse,

    -- * Response Lenses
    suspendGameServerGroupResponse_gameServerGroup,
    suspendGameServerGroupResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.GameLift.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newSuspendGameServerGroup' smart constructor.
data SuspendGameServerGroup = SuspendGameServerGroup'
  { -- | A unique identifier for the game server group. Use either the
    -- GameServerGroup name or ARN value.
    SuspendGameServerGroup -> Text
gameServerGroupName :: Prelude.Text,
    -- | The activity to suspend for this game server group.
    SuspendGameServerGroup -> NonEmpty GameServerGroupAction
suspendActions :: Prelude.NonEmpty GameServerGroupAction
  }
  deriving (SuspendGameServerGroup -> SuspendGameServerGroup -> Bool
(SuspendGameServerGroup -> SuspendGameServerGroup -> Bool)
-> (SuspendGameServerGroup -> SuspendGameServerGroup -> Bool)
-> Eq SuspendGameServerGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SuspendGameServerGroup -> SuspendGameServerGroup -> Bool
$c/= :: SuspendGameServerGroup -> SuspendGameServerGroup -> Bool
== :: SuspendGameServerGroup -> SuspendGameServerGroup -> Bool
$c== :: SuspendGameServerGroup -> SuspendGameServerGroup -> Bool
Prelude.Eq, ReadPrec [SuspendGameServerGroup]
ReadPrec SuspendGameServerGroup
Int -> ReadS SuspendGameServerGroup
ReadS [SuspendGameServerGroup]
(Int -> ReadS SuspendGameServerGroup)
-> ReadS [SuspendGameServerGroup]
-> ReadPrec SuspendGameServerGroup
-> ReadPrec [SuspendGameServerGroup]
-> Read SuspendGameServerGroup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SuspendGameServerGroup]
$creadListPrec :: ReadPrec [SuspendGameServerGroup]
readPrec :: ReadPrec SuspendGameServerGroup
$creadPrec :: ReadPrec SuspendGameServerGroup
readList :: ReadS [SuspendGameServerGroup]
$creadList :: ReadS [SuspendGameServerGroup]
readsPrec :: Int -> ReadS SuspendGameServerGroup
$creadsPrec :: Int -> ReadS SuspendGameServerGroup
Prelude.Read, Int -> SuspendGameServerGroup -> ShowS
[SuspendGameServerGroup] -> ShowS
SuspendGameServerGroup -> String
(Int -> SuspendGameServerGroup -> ShowS)
-> (SuspendGameServerGroup -> String)
-> ([SuspendGameServerGroup] -> ShowS)
-> Show SuspendGameServerGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SuspendGameServerGroup] -> ShowS
$cshowList :: [SuspendGameServerGroup] -> ShowS
show :: SuspendGameServerGroup -> String
$cshow :: SuspendGameServerGroup -> String
showsPrec :: Int -> SuspendGameServerGroup -> ShowS
$cshowsPrec :: Int -> SuspendGameServerGroup -> ShowS
Prelude.Show, (forall x. SuspendGameServerGroup -> Rep SuspendGameServerGroup x)
-> (forall x.
    Rep SuspendGameServerGroup x -> SuspendGameServerGroup)
-> Generic SuspendGameServerGroup
forall x. Rep SuspendGameServerGroup x -> SuspendGameServerGroup
forall x. SuspendGameServerGroup -> Rep SuspendGameServerGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SuspendGameServerGroup x -> SuspendGameServerGroup
$cfrom :: forall x. SuspendGameServerGroup -> Rep SuspendGameServerGroup x
Prelude.Generic)

-- |
-- Create a value of 'SuspendGameServerGroup' 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:
--
-- 'gameServerGroupName', 'suspendGameServerGroup_gameServerGroupName' - A unique identifier for the game server group. Use either the
-- GameServerGroup name or ARN value.
--
-- 'suspendActions', 'suspendGameServerGroup_suspendActions' - The activity to suspend for this game server group.
newSuspendGameServerGroup ::
  -- | 'gameServerGroupName'
  Prelude.Text ->
  -- | 'suspendActions'
  Prelude.NonEmpty GameServerGroupAction ->
  SuspendGameServerGroup
newSuspendGameServerGroup :: Text -> NonEmpty GameServerGroupAction -> SuspendGameServerGroup
newSuspendGameServerGroup
  Text
pGameServerGroupName_
  NonEmpty GameServerGroupAction
pSuspendActions_ =
    SuspendGameServerGroup' :: Text -> NonEmpty GameServerGroupAction -> SuspendGameServerGroup
SuspendGameServerGroup'
      { $sel:gameServerGroupName:SuspendGameServerGroup' :: Text
gameServerGroupName =
          Text
pGameServerGroupName_,
        $sel:suspendActions:SuspendGameServerGroup' :: NonEmpty GameServerGroupAction
suspendActions =
          Tagged
  (NonEmpty GameServerGroupAction)
  (Identity (NonEmpty GameServerGroupAction))
-> Tagged
     (NonEmpty GameServerGroupAction)
     (Identity (NonEmpty GameServerGroupAction))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced (Tagged
   (NonEmpty GameServerGroupAction)
   (Identity (NonEmpty GameServerGroupAction))
 -> Tagged
      (NonEmpty GameServerGroupAction)
      (Identity (NonEmpty GameServerGroupAction)))
-> NonEmpty GameServerGroupAction -> NonEmpty GameServerGroupAction
forall t b. AReview t b -> b -> t
Lens.# NonEmpty GameServerGroupAction
pSuspendActions_
      }

-- | A unique identifier for the game server group. Use either the
-- GameServerGroup name or ARN value.
suspendGameServerGroup_gameServerGroupName :: Lens.Lens' SuspendGameServerGroup Prelude.Text
suspendGameServerGroup_gameServerGroupName :: (Text -> f Text)
-> SuspendGameServerGroup -> f SuspendGameServerGroup
suspendGameServerGroup_gameServerGroupName = (SuspendGameServerGroup -> Text)
-> (SuspendGameServerGroup -> Text -> SuspendGameServerGroup)
-> Lens SuspendGameServerGroup SuspendGameServerGroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SuspendGameServerGroup' {Text
gameServerGroupName :: Text
$sel:gameServerGroupName:SuspendGameServerGroup' :: SuspendGameServerGroup -> Text
gameServerGroupName} -> Text
gameServerGroupName) (\s :: SuspendGameServerGroup
s@SuspendGameServerGroup' {} Text
a -> SuspendGameServerGroup
s {$sel:gameServerGroupName:SuspendGameServerGroup' :: Text
gameServerGroupName = Text
a} :: SuspendGameServerGroup)

-- | The activity to suspend for this game server group.
suspendGameServerGroup_suspendActions :: Lens.Lens' SuspendGameServerGroup (Prelude.NonEmpty GameServerGroupAction)
suspendGameServerGroup_suspendActions :: (NonEmpty GameServerGroupAction
 -> f (NonEmpty GameServerGroupAction))
-> SuspendGameServerGroup -> f SuspendGameServerGroup
suspendGameServerGroup_suspendActions = (SuspendGameServerGroup -> NonEmpty GameServerGroupAction)
-> (SuspendGameServerGroup
    -> NonEmpty GameServerGroupAction -> SuspendGameServerGroup)
-> Lens
     SuspendGameServerGroup
     SuspendGameServerGroup
     (NonEmpty GameServerGroupAction)
     (NonEmpty GameServerGroupAction)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SuspendGameServerGroup' {NonEmpty GameServerGroupAction
suspendActions :: NonEmpty GameServerGroupAction
$sel:suspendActions:SuspendGameServerGroup' :: SuspendGameServerGroup -> NonEmpty GameServerGroupAction
suspendActions} -> NonEmpty GameServerGroupAction
suspendActions) (\s :: SuspendGameServerGroup
s@SuspendGameServerGroup' {} NonEmpty GameServerGroupAction
a -> SuspendGameServerGroup
s {$sel:suspendActions:SuspendGameServerGroup' :: NonEmpty GameServerGroupAction
suspendActions = NonEmpty GameServerGroupAction
a} :: SuspendGameServerGroup) ((NonEmpty GameServerGroupAction
  -> f (NonEmpty GameServerGroupAction))
 -> SuspendGameServerGroup -> f SuspendGameServerGroup)
-> ((NonEmpty GameServerGroupAction
     -> f (NonEmpty GameServerGroupAction))
    -> NonEmpty GameServerGroupAction
    -> f (NonEmpty GameServerGroupAction))
-> (NonEmpty GameServerGroupAction
    -> f (NonEmpty GameServerGroupAction))
-> SuspendGameServerGroup
-> f SuspendGameServerGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (NonEmpty GameServerGroupAction
 -> f (NonEmpty GameServerGroupAction))
-> NonEmpty GameServerGroupAction
-> f (NonEmpty GameServerGroupAction)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.AWSRequest SuspendGameServerGroup where
  type
    AWSResponse SuspendGameServerGroup =
      SuspendGameServerGroupResponse
  request :: SuspendGameServerGroup -> Request SuspendGameServerGroup
request = Service -> SuspendGameServerGroup -> Request SuspendGameServerGroup
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy SuspendGameServerGroup
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse SuspendGameServerGroup)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse SuspendGameServerGroup))
-> Logger
-> Service
-> Proxy SuspendGameServerGroup
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse SuspendGameServerGroup)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe GameServerGroup -> Int -> SuspendGameServerGroupResponse
SuspendGameServerGroupResponse'
            (Maybe GameServerGroup -> Int -> SuspendGameServerGroupResponse)
-> Either String (Maybe GameServerGroup)
-> Either String (Int -> SuspendGameServerGroupResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe GameServerGroup)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"GameServerGroup")
            Either String (Int -> SuspendGameServerGroupResponse)
-> Either String Int
-> Either String SuspendGameServerGroupResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable SuspendGameServerGroup

instance Prelude.NFData SuspendGameServerGroup

instance Core.ToHeaders SuspendGameServerGroup where
  toHeaders :: SuspendGameServerGroup -> ResponseHeaders
toHeaders =
    ResponseHeaders -> SuspendGameServerGroup -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"GameLift.SuspendGameServerGroup" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON SuspendGameServerGroup where
  toJSON :: SuspendGameServerGroup -> Value
toJSON SuspendGameServerGroup' {NonEmpty GameServerGroupAction
Text
suspendActions :: NonEmpty GameServerGroupAction
gameServerGroupName :: Text
$sel:suspendActions:SuspendGameServerGroup' :: SuspendGameServerGroup -> NonEmpty GameServerGroupAction
$sel:gameServerGroupName:SuspendGameServerGroup' :: SuspendGameServerGroup -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"GameServerGroupName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
gameServerGroupName),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"SuspendActions" Text -> NonEmpty GameServerGroupAction -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= NonEmpty GameServerGroupAction
suspendActions)
          ]
      )

instance Core.ToPath SuspendGameServerGroup where
  toPath :: SuspendGameServerGroup -> ByteString
toPath = ByteString -> SuspendGameServerGroup -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery SuspendGameServerGroup where
  toQuery :: SuspendGameServerGroup -> QueryString
toQuery = QueryString -> SuspendGameServerGroup -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newSuspendGameServerGroupResponse' smart constructor.
data SuspendGameServerGroupResponse = SuspendGameServerGroupResponse'
  { -- | An object that describes the game server group resource, with the
    -- @SuspendedActions@ property updated to reflect the suspended activity.
    SuspendGameServerGroupResponse -> Maybe GameServerGroup
gameServerGroup :: Prelude.Maybe GameServerGroup,
    -- | The response's http status code.
    SuspendGameServerGroupResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (SuspendGameServerGroupResponse
-> SuspendGameServerGroupResponse -> Bool
(SuspendGameServerGroupResponse
 -> SuspendGameServerGroupResponse -> Bool)
-> (SuspendGameServerGroupResponse
    -> SuspendGameServerGroupResponse -> Bool)
-> Eq SuspendGameServerGroupResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SuspendGameServerGroupResponse
-> SuspendGameServerGroupResponse -> Bool
$c/= :: SuspendGameServerGroupResponse
-> SuspendGameServerGroupResponse -> Bool
== :: SuspendGameServerGroupResponse
-> SuspendGameServerGroupResponse -> Bool
$c== :: SuspendGameServerGroupResponse
-> SuspendGameServerGroupResponse -> Bool
Prelude.Eq, ReadPrec [SuspendGameServerGroupResponse]
ReadPrec SuspendGameServerGroupResponse
Int -> ReadS SuspendGameServerGroupResponse
ReadS [SuspendGameServerGroupResponse]
(Int -> ReadS SuspendGameServerGroupResponse)
-> ReadS [SuspendGameServerGroupResponse]
-> ReadPrec SuspendGameServerGroupResponse
-> ReadPrec [SuspendGameServerGroupResponse]
-> Read SuspendGameServerGroupResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SuspendGameServerGroupResponse]
$creadListPrec :: ReadPrec [SuspendGameServerGroupResponse]
readPrec :: ReadPrec SuspendGameServerGroupResponse
$creadPrec :: ReadPrec SuspendGameServerGroupResponse
readList :: ReadS [SuspendGameServerGroupResponse]
$creadList :: ReadS [SuspendGameServerGroupResponse]
readsPrec :: Int -> ReadS SuspendGameServerGroupResponse
$creadsPrec :: Int -> ReadS SuspendGameServerGroupResponse
Prelude.Read, Int -> SuspendGameServerGroupResponse -> ShowS
[SuspendGameServerGroupResponse] -> ShowS
SuspendGameServerGroupResponse -> String
(Int -> SuspendGameServerGroupResponse -> ShowS)
-> (SuspendGameServerGroupResponse -> String)
-> ([SuspendGameServerGroupResponse] -> ShowS)
-> Show SuspendGameServerGroupResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SuspendGameServerGroupResponse] -> ShowS
$cshowList :: [SuspendGameServerGroupResponse] -> ShowS
show :: SuspendGameServerGroupResponse -> String
$cshow :: SuspendGameServerGroupResponse -> String
showsPrec :: Int -> SuspendGameServerGroupResponse -> ShowS
$cshowsPrec :: Int -> SuspendGameServerGroupResponse -> ShowS
Prelude.Show, (forall x.
 SuspendGameServerGroupResponse
 -> Rep SuspendGameServerGroupResponse x)
-> (forall x.
    Rep SuspendGameServerGroupResponse x
    -> SuspendGameServerGroupResponse)
-> Generic SuspendGameServerGroupResponse
forall x.
Rep SuspendGameServerGroupResponse x
-> SuspendGameServerGroupResponse
forall x.
SuspendGameServerGroupResponse
-> Rep SuspendGameServerGroupResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SuspendGameServerGroupResponse x
-> SuspendGameServerGroupResponse
$cfrom :: forall x.
SuspendGameServerGroupResponse
-> Rep SuspendGameServerGroupResponse x
Prelude.Generic)

-- |
-- Create a value of 'SuspendGameServerGroupResponse' 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:
--
-- 'gameServerGroup', 'suspendGameServerGroupResponse_gameServerGroup' - An object that describes the game server group resource, with the
-- @SuspendedActions@ property updated to reflect the suspended activity.
--
-- 'httpStatus', 'suspendGameServerGroupResponse_httpStatus' - The response's http status code.
newSuspendGameServerGroupResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  SuspendGameServerGroupResponse
newSuspendGameServerGroupResponse :: Int -> SuspendGameServerGroupResponse
newSuspendGameServerGroupResponse Int
pHttpStatus_ =
  SuspendGameServerGroupResponse' :: Maybe GameServerGroup -> Int -> SuspendGameServerGroupResponse
SuspendGameServerGroupResponse'
    { $sel:gameServerGroup:SuspendGameServerGroupResponse' :: Maybe GameServerGroup
gameServerGroup =
        Maybe GameServerGroup
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:SuspendGameServerGroupResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An object that describes the game server group resource, with the
-- @SuspendedActions@ property updated to reflect the suspended activity.
suspendGameServerGroupResponse_gameServerGroup :: Lens.Lens' SuspendGameServerGroupResponse (Prelude.Maybe GameServerGroup)
suspendGameServerGroupResponse_gameServerGroup :: (Maybe GameServerGroup -> f (Maybe GameServerGroup))
-> SuspendGameServerGroupResponse
-> f SuspendGameServerGroupResponse
suspendGameServerGroupResponse_gameServerGroup = (SuspendGameServerGroupResponse -> Maybe GameServerGroup)
-> (SuspendGameServerGroupResponse
    -> Maybe GameServerGroup -> SuspendGameServerGroupResponse)
-> Lens
     SuspendGameServerGroupResponse
     SuspendGameServerGroupResponse
     (Maybe GameServerGroup)
     (Maybe GameServerGroup)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SuspendGameServerGroupResponse' {Maybe GameServerGroup
gameServerGroup :: Maybe GameServerGroup
$sel:gameServerGroup:SuspendGameServerGroupResponse' :: SuspendGameServerGroupResponse -> Maybe GameServerGroup
gameServerGroup} -> Maybe GameServerGroup
gameServerGroup) (\s :: SuspendGameServerGroupResponse
s@SuspendGameServerGroupResponse' {} Maybe GameServerGroup
a -> SuspendGameServerGroupResponse
s {$sel:gameServerGroup:SuspendGameServerGroupResponse' :: Maybe GameServerGroup
gameServerGroup = Maybe GameServerGroup
a} :: SuspendGameServerGroupResponse)

-- | The response's http status code.
suspendGameServerGroupResponse_httpStatus :: Lens.Lens' SuspendGameServerGroupResponse Prelude.Int
suspendGameServerGroupResponse_httpStatus :: (Int -> f Int)
-> SuspendGameServerGroupResponse
-> f SuspendGameServerGroupResponse
suspendGameServerGroupResponse_httpStatus = (SuspendGameServerGroupResponse -> Int)
-> (SuspendGameServerGroupResponse
    -> Int -> SuspendGameServerGroupResponse)
-> Lens
     SuspendGameServerGroupResponse
     SuspendGameServerGroupResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SuspendGameServerGroupResponse' {Int
httpStatus :: Int
$sel:httpStatus:SuspendGameServerGroupResponse' :: SuspendGameServerGroupResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: SuspendGameServerGroupResponse
s@SuspendGameServerGroupResponse' {} Int
a -> SuspendGameServerGroupResponse
s {$sel:httpStatus:SuspendGameServerGroupResponse' :: Int
httpStatus = Int
a} :: SuspendGameServerGroupResponse)

instance
  Prelude.NFData
    SuspendGameServerGroupResponse