{-# 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.DeleteGameServerGroup
-- 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.__
--
-- Terminates a game server group and permanently deletes the game server
-- group record. You have several options for how these resources are
-- impacted when deleting the game server group. Depending on the type of
-- delete operation selected, this operation might affect these resources:
--
-- -   The game server group
--
-- -   The corresponding Auto Scaling group
--
-- -   All game servers that are currently running in the group
--
-- To delete a game server group, identify the game server group to delete
-- and specify the type of delete operation to initiate. Game server groups
-- can only be deleted if they are in @ACTIVE@ or @ERROR@ status.
--
-- If the delete request is successful, a series of operations are kicked
-- off. The game server group status is changed to @DELETE_SCHEDULED@,
-- which prevents new game servers from being registered and stops
-- automatic scaling activity. Once all game servers in the game server
-- group are deregistered, GameLift FleetIQ can begin deleting resources.
-- If any of the delete operations fail, the game server group is placed in
-- @ERROR@ status.
--
-- GameLift FleetIQ emits delete events to Amazon CloudWatch.
--
-- __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.DeleteGameServerGroup
  ( -- * Creating a Request
    DeleteGameServerGroup (..),
    newDeleteGameServerGroup,

    -- * Request Lenses
    deleteGameServerGroup_deleteOption,
    deleteGameServerGroup_gameServerGroupName,

    -- * Destructuring the Response
    DeleteGameServerGroupResponse (..),
    newDeleteGameServerGroupResponse,

    -- * Response Lenses
    deleteGameServerGroupResponse_gameServerGroup,
    deleteGameServerGroupResponse_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:/ 'newDeleteGameServerGroup' smart constructor.
data DeleteGameServerGroup = DeleteGameServerGroup'
  { -- | The type of delete to perform. Options include the following:
    --
    -- -   @SAFE_DELETE@ – (default) Terminates the game server group and EC2
    --     Auto Scaling group only when it has no game servers that are in
    --     @UTILIZED@ status.
    --
    -- -   @FORCE_DELETE@ – Terminates the game server group, including all
    --     active game servers regardless of their utilization status, and the
    --     EC2 Auto Scaling group.
    --
    -- -   @RETAIN@ – Does a safe delete of the game server group but retains
    --     the EC2 Auto Scaling group as is.
    DeleteGameServerGroup -> Maybe GameServerGroupDeleteOption
deleteOption :: Prelude.Maybe GameServerGroupDeleteOption,
    -- | A unique identifier for the game server group. Use either the
    -- GameServerGroup name or ARN value.
    DeleteGameServerGroup -> Text
gameServerGroupName :: Prelude.Text
  }
  deriving (DeleteGameServerGroup -> DeleteGameServerGroup -> Bool
(DeleteGameServerGroup -> DeleteGameServerGroup -> Bool)
-> (DeleteGameServerGroup -> DeleteGameServerGroup -> Bool)
-> Eq DeleteGameServerGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteGameServerGroup -> DeleteGameServerGroup -> Bool
$c/= :: DeleteGameServerGroup -> DeleteGameServerGroup -> Bool
== :: DeleteGameServerGroup -> DeleteGameServerGroup -> Bool
$c== :: DeleteGameServerGroup -> DeleteGameServerGroup -> Bool
Prelude.Eq, ReadPrec [DeleteGameServerGroup]
ReadPrec DeleteGameServerGroup
Int -> ReadS DeleteGameServerGroup
ReadS [DeleteGameServerGroup]
(Int -> ReadS DeleteGameServerGroup)
-> ReadS [DeleteGameServerGroup]
-> ReadPrec DeleteGameServerGroup
-> ReadPrec [DeleteGameServerGroup]
-> Read DeleteGameServerGroup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteGameServerGroup]
$creadListPrec :: ReadPrec [DeleteGameServerGroup]
readPrec :: ReadPrec DeleteGameServerGroup
$creadPrec :: ReadPrec DeleteGameServerGroup
readList :: ReadS [DeleteGameServerGroup]
$creadList :: ReadS [DeleteGameServerGroup]
readsPrec :: Int -> ReadS DeleteGameServerGroup
$creadsPrec :: Int -> ReadS DeleteGameServerGroup
Prelude.Read, Int -> DeleteGameServerGroup -> ShowS
[DeleteGameServerGroup] -> ShowS
DeleteGameServerGroup -> String
(Int -> DeleteGameServerGroup -> ShowS)
-> (DeleteGameServerGroup -> String)
-> ([DeleteGameServerGroup] -> ShowS)
-> Show DeleteGameServerGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteGameServerGroup] -> ShowS
$cshowList :: [DeleteGameServerGroup] -> ShowS
show :: DeleteGameServerGroup -> String
$cshow :: DeleteGameServerGroup -> String
showsPrec :: Int -> DeleteGameServerGroup -> ShowS
$cshowsPrec :: Int -> DeleteGameServerGroup -> ShowS
Prelude.Show, (forall x. DeleteGameServerGroup -> Rep DeleteGameServerGroup x)
-> (forall x. Rep DeleteGameServerGroup x -> DeleteGameServerGroup)
-> Generic DeleteGameServerGroup
forall x. Rep DeleteGameServerGroup x -> DeleteGameServerGroup
forall x. DeleteGameServerGroup -> Rep DeleteGameServerGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteGameServerGroup x -> DeleteGameServerGroup
$cfrom :: forall x. DeleteGameServerGroup -> Rep DeleteGameServerGroup x
Prelude.Generic)

-- |
-- Create a value of 'DeleteGameServerGroup' 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:
--
-- 'deleteOption', 'deleteGameServerGroup_deleteOption' - The type of delete to perform. Options include the following:
--
-- -   @SAFE_DELETE@ – (default) Terminates the game server group and EC2
--     Auto Scaling group only when it has no game servers that are in
--     @UTILIZED@ status.
--
-- -   @FORCE_DELETE@ – Terminates the game server group, including all
--     active game servers regardless of their utilization status, and the
--     EC2 Auto Scaling group.
--
-- -   @RETAIN@ – Does a safe delete of the game server group but retains
--     the EC2 Auto Scaling group as is.
--
-- 'gameServerGroupName', 'deleteGameServerGroup_gameServerGroupName' - A unique identifier for the game server group. Use either the
-- GameServerGroup name or ARN value.
newDeleteGameServerGroup ::
  -- | 'gameServerGroupName'
  Prelude.Text ->
  DeleteGameServerGroup
newDeleteGameServerGroup :: Text -> DeleteGameServerGroup
newDeleteGameServerGroup Text
pGameServerGroupName_ =
  DeleteGameServerGroup' :: Maybe GameServerGroupDeleteOption -> Text -> DeleteGameServerGroup
DeleteGameServerGroup'
    { $sel:deleteOption:DeleteGameServerGroup' :: Maybe GameServerGroupDeleteOption
deleteOption =
        Maybe GameServerGroupDeleteOption
forall a. Maybe a
Prelude.Nothing,
      $sel:gameServerGroupName:DeleteGameServerGroup' :: Text
gameServerGroupName = Text
pGameServerGroupName_
    }

-- | The type of delete to perform. Options include the following:
--
-- -   @SAFE_DELETE@ – (default) Terminates the game server group and EC2
--     Auto Scaling group only when it has no game servers that are in
--     @UTILIZED@ status.
--
-- -   @FORCE_DELETE@ – Terminates the game server group, including all
--     active game servers regardless of their utilization status, and the
--     EC2 Auto Scaling group.
--
-- -   @RETAIN@ – Does a safe delete of the game server group but retains
--     the EC2 Auto Scaling group as is.
deleteGameServerGroup_deleteOption :: Lens.Lens' DeleteGameServerGroup (Prelude.Maybe GameServerGroupDeleteOption)
deleteGameServerGroup_deleteOption :: (Maybe GameServerGroupDeleteOption
 -> f (Maybe GameServerGroupDeleteOption))
-> DeleteGameServerGroup -> f DeleteGameServerGroup
deleteGameServerGroup_deleteOption = (DeleteGameServerGroup -> Maybe GameServerGroupDeleteOption)
-> (DeleteGameServerGroup
    -> Maybe GameServerGroupDeleteOption -> DeleteGameServerGroup)
-> Lens
     DeleteGameServerGroup
     DeleteGameServerGroup
     (Maybe GameServerGroupDeleteOption)
     (Maybe GameServerGroupDeleteOption)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteGameServerGroup' {Maybe GameServerGroupDeleteOption
deleteOption :: Maybe GameServerGroupDeleteOption
$sel:deleteOption:DeleteGameServerGroup' :: DeleteGameServerGroup -> Maybe GameServerGroupDeleteOption
deleteOption} -> Maybe GameServerGroupDeleteOption
deleteOption) (\s :: DeleteGameServerGroup
s@DeleteGameServerGroup' {} Maybe GameServerGroupDeleteOption
a -> DeleteGameServerGroup
s {$sel:deleteOption:DeleteGameServerGroup' :: Maybe GameServerGroupDeleteOption
deleteOption = Maybe GameServerGroupDeleteOption
a} :: DeleteGameServerGroup)

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

instance Core.AWSRequest DeleteGameServerGroup where
  type
    AWSResponse DeleteGameServerGroup =
      DeleteGameServerGroupResponse
  request :: DeleteGameServerGroup -> Request DeleteGameServerGroup
request = Service -> DeleteGameServerGroup -> Request DeleteGameServerGroup
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DeleteGameServerGroup
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DeleteGameServerGroup)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DeleteGameServerGroup))
-> Logger
-> Service
-> Proxy DeleteGameServerGroup
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DeleteGameServerGroup)))
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 -> DeleteGameServerGroupResponse
DeleteGameServerGroupResponse'
            (Maybe GameServerGroup -> Int -> DeleteGameServerGroupResponse)
-> Either String (Maybe GameServerGroup)
-> Either String (Int -> DeleteGameServerGroupResponse)
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 -> DeleteGameServerGroupResponse)
-> Either String Int -> Either String DeleteGameServerGroupResponse
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 DeleteGameServerGroup

instance Prelude.NFData DeleteGameServerGroup

instance Core.ToHeaders DeleteGameServerGroup where
  toHeaders :: DeleteGameServerGroup -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DeleteGameServerGroup -> 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.DeleteGameServerGroup" ::
                          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 DeleteGameServerGroup where
  toJSON :: DeleteGameServerGroup -> Value
toJSON DeleteGameServerGroup' {Maybe GameServerGroupDeleteOption
Text
gameServerGroupName :: Text
deleteOption :: Maybe GameServerGroupDeleteOption
$sel:gameServerGroupName:DeleteGameServerGroup' :: DeleteGameServerGroup -> Text
$sel:deleteOption:DeleteGameServerGroup' :: DeleteGameServerGroup -> Maybe GameServerGroupDeleteOption
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"DeleteOption" Text -> GameServerGroupDeleteOption -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (GameServerGroupDeleteOption -> Pair)
-> Maybe GameServerGroupDeleteOption -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe GameServerGroupDeleteOption
deleteOption,
            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)
          ]
      )

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

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

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

-- |
-- Create a value of 'DeleteGameServerGroupResponse' 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', 'deleteGameServerGroupResponse_gameServerGroup' - An object that describes the deleted game server group resource, with
-- status updated to @DELETE_SCHEDULED@.
--
-- 'httpStatus', 'deleteGameServerGroupResponse_httpStatus' - The response's http status code.
newDeleteGameServerGroupResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DeleteGameServerGroupResponse
newDeleteGameServerGroupResponse :: Int -> DeleteGameServerGroupResponse
newDeleteGameServerGroupResponse Int
pHttpStatus_ =
  DeleteGameServerGroupResponse' :: Maybe GameServerGroup -> Int -> DeleteGameServerGroupResponse
DeleteGameServerGroupResponse'
    { $sel:gameServerGroup:DeleteGameServerGroupResponse' :: Maybe GameServerGroup
gameServerGroup =
        Maybe GameServerGroup
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DeleteGameServerGroupResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An object that describes the deleted game server group resource, with
-- status updated to @DELETE_SCHEDULED@.
deleteGameServerGroupResponse_gameServerGroup :: Lens.Lens' DeleteGameServerGroupResponse (Prelude.Maybe GameServerGroup)
deleteGameServerGroupResponse_gameServerGroup :: (Maybe GameServerGroup -> f (Maybe GameServerGroup))
-> DeleteGameServerGroupResponse -> f DeleteGameServerGroupResponse
deleteGameServerGroupResponse_gameServerGroup = (DeleteGameServerGroupResponse -> Maybe GameServerGroup)
-> (DeleteGameServerGroupResponse
    -> Maybe GameServerGroup -> DeleteGameServerGroupResponse)
-> Lens
     DeleteGameServerGroupResponse
     DeleteGameServerGroupResponse
     (Maybe GameServerGroup)
     (Maybe GameServerGroup)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteGameServerGroupResponse' {Maybe GameServerGroup
gameServerGroup :: Maybe GameServerGroup
$sel:gameServerGroup:DeleteGameServerGroupResponse' :: DeleteGameServerGroupResponse -> Maybe GameServerGroup
gameServerGroup} -> Maybe GameServerGroup
gameServerGroup) (\s :: DeleteGameServerGroupResponse
s@DeleteGameServerGroupResponse' {} Maybe GameServerGroup
a -> DeleteGameServerGroupResponse
s {$sel:gameServerGroup:DeleteGameServerGroupResponse' :: Maybe GameServerGroup
gameServerGroup = Maybe GameServerGroup
a} :: DeleteGameServerGroupResponse)

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

instance Prelude.NFData DeleteGameServerGroupResponse