{-# 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 #-}
module Amazonka.GameLift.DeleteGameSessionQueue
(
DeleteGameSessionQueue (..),
newDeleteGameSessionQueue,
deleteGameSessionQueue_name,
DeleteGameSessionQueueResponse (..),
newDeleteGameSessionQueueResponse,
deleteGameSessionQueueResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.GameLift.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DeleteGameSessionQueue = DeleteGameSessionQueue'
{
DeleteGameSessionQueue -> Text
name :: Prelude.Text
}
deriving (DeleteGameSessionQueue -> DeleteGameSessionQueue -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteGameSessionQueue -> DeleteGameSessionQueue -> Bool
$c/= :: DeleteGameSessionQueue -> DeleteGameSessionQueue -> Bool
== :: DeleteGameSessionQueue -> DeleteGameSessionQueue -> Bool
$c== :: DeleteGameSessionQueue -> DeleteGameSessionQueue -> Bool
Prelude.Eq, ReadPrec [DeleteGameSessionQueue]
ReadPrec DeleteGameSessionQueue
Int -> ReadS DeleteGameSessionQueue
ReadS [DeleteGameSessionQueue]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteGameSessionQueue]
$creadListPrec :: ReadPrec [DeleteGameSessionQueue]
readPrec :: ReadPrec DeleteGameSessionQueue
$creadPrec :: ReadPrec DeleteGameSessionQueue
readList :: ReadS [DeleteGameSessionQueue]
$creadList :: ReadS [DeleteGameSessionQueue]
readsPrec :: Int -> ReadS DeleteGameSessionQueue
$creadsPrec :: Int -> ReadS DeleteGameSessionQueue
Prelude.Read, Int -> DeleteGameSessionQueue -> ShowS
[DeleteGameSessionQueue] -> ShowS
DeleteGameSessionQueue -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteGameSessionQueue] -> ShowS
$cshowList :: [DeleteGameSessionQueue] -> ShowS
show :: DeleteGameSessionQueue -> String
$cshow :: DeleteGameSessionQueue -> String
showsPrec :: Int -> DeleteGameSessionQueue -> ShowS
$cshowsPrec :: Int -> DeleteGameSessionQueue -> ShowS
Prelude.Show, forall x. Rep DeleteGameSessionQueue x -> DeleteGameSessionQueue
forall x. DeleteGameSessionQueue -> Rep DeleteGameSessionQueue x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteGameSessionQueue x -> DeleteGameSessionQueue
$cfrom :: forall x. DeleteGameSessionQueue -> Rep DeleteGameSessionQueue x
Prelude.Generic)
newDeleteGameSessionQueue ::
Prelude.Text ->
DeleteGameSessionQueue
newDeleteGameSessionQueue :: Text -> DeleteGameSessionQueue
newDeleteGameSessionQueue Text
pName_ =
DeleteGameSessionQueue' {$sel:name:DeleteGameSessionQueue' :: Text
name = Text
pName_}
deleteGameSessionQueue_name :: Lens.Lens' DeleteGameSessionQueue Prelude.Text
deleteGameSessionQueue_name :: Lens' DeleteGameSessionQueue Text
deleteGameSessionQueue_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteGameSessionQueue' {Text
name :: Text
$sel:name:DeleteGameSessionQueue' :: DeleteGameSessionQueue -> Text
name} -> Text
name) (\s :: DeleteGameSessionQueue
s@DeleteGameSessionQueue' {} Text
a -> DeleteGameSessionQueue
s {$sel:name:DeleteGameSessionQueue' :: Text
name = Text
a} :: DeleteGameSessionQueue)
instance Core.AWSRequest DeleteGameSessionQueue where
type
AWSResponse DeleteGameSessionQueue =
DeleteGameSessionQueueResponse
request :: (Service -> Service)
-> DeleteGameSessionQueue -> Request DeleteGameSessionQueue
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DeleteGameSessionQueue
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteGameSessionQueue)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> DeleteGameSessionQueueResponse
DeleteGameSessionQueueResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable DeleteGameSessionQueue where
hashWithSalt :: Int -> DeleteGameSessionQueue -> Int
hashWithSalt Int
_salt DeleteGameSessionQueue' {Text
name :: Text
$sel:name:DeleteGameSessionQueue' :: DeleteGameSessionQueue -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
instance Prelude.NFData DeleteGameSessionQueue where
rnf :: DeleteGameSessionQueue -> ()
rnf DeleteGameSessionQueue' {Text
name :: Text
$sel:name:DeleteGameSessionQueue' :: DeleteGameSessionQueue -> Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Text
name
instance Data.ToHeaders DeleteGameSessionQueue where
toHeaders :: DeleteGameSessionQueue -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"GameLift.DeleteGameSessionQueue" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON DeleteGameSessionQueue where
toJSON :: DeleteGameSessionQueue -> Value
toJSON DeleteGameSessionQueue' {Text
name :: Text
$sel:name:DeleteGameSessionQueue' :: DeleteGameSessionQueue -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[forall a. a -> Maybe a
Prelude.Just (Key
"Name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
name)]
)
instance Data.ToPath DeleteGameSessionQueue where
toPath :: DeleteGameSessionQueue -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery DeleteGameSessionQueue where
toQuery :: DeleteGameSessionQueue -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DeleteGameSessionQueueResponse = DeleteGameSessionQueueResponse'
{
DeleteGameSessionQueueResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteGameSessionQueueResponse
-> DeleteGameSessionQueueResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteGameSessionQueueResponse
-> DeleteGameSessionQueueResponse -> Bool
$c/= :: DeleteGameSessionQueueResponse
-> DeleteGameSessionQueueResponse -> Bool
== :: DeleteGameSessionQueueResponse
-> DeleteGameSessionQueueResponse -> Bool
$c== :: DeleteGameSessionQueueResponse
-> DeleteGameSessionQueueResponse -> Bool
Prelude.Eq, ReadPrec [DeleteGameSessionQueueResponse]
ReadPrec DeleteGameSessionQueueResponse
Int -> ReadS DeleteGameSessionQueueResponse
ReadS [DeleteGameSessionQueueResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteGameSessionQueueResponse]
$creadListPrec :: ReadPrec [DeleteGameSessionQueueResponse]
readPrec :: ReadPrec DeleteGameSessionQueueResponse
$creadPrec :: ReadPrec DeleteGameSessionQueueResponse
readList :: ReadS [DeleteGameSessionQueueResponse]
$creadList :: ReadS [DeleteGameSessionQueueResponse]
readsPrec :: Int -> ReadS DeleteGameSessionQueueResponse
$creadsPrec :: Int -> ReadS DeleteGameSessionQueueResponse
Prelude.Read, Int -> DeleteGameSessionQueueResponse -> ShowS
[DeleteGameSessionQueueResponse] -> ShowS
DeleteGameSessionQueueResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteGameSessionQueueResponse] -> ShowS
$cshowList :: [DeleteGameSessionQueueResponse] -> ShowS
show :: DeleteGameSessionQueueResponse -> String
$cshow :: DeleteGameSessionQueueResponse -> String
showsPrec :: Int -> DeleteGameSessionQueueResponse -> ShowS
$cshowsPrec :: Int -> DeleteGameSessionQueueResponse -> ShowS
Prelude.Show, forall x.
Rep DeleteGameSessionQueueResponse x
-> DeleteGameSessionQueueResponse
forall x.
DeleteGameSessionQueueResponse
-> Rep DeleteGameSessionQueueResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteGameSessionQueueResponse x
-> DeleteGameSessionQueueResponse
$cfrom :: forall x.
DeleteGameSessionQueueResponse
-> Rep DeleteGameSessionQueueResponse x
Prelude.Generic)
newDeleteGameSessionQueueResponse ::
Prelude.Int ->
DeleteGameSessionQueueResponse
newDeleteGameSessionQueueResponse :: Int -> DeleteGameSessionQueueResponse
newDeleteGameSessionQueueResponse Int
pHttpStatus_ =
DeleteGameSessionQueueResponse'
{ $sel:httpStatus:DeleteGameSessionQueueResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteGameSessionQueueResponse_httpStatus :: Lens.Lens' DeleteGameSessionQueueResponse Prelude.Int
deleteGameSessionQueueResponse_httpStatus :: Lens' DeleteGameSessionQueueResponse Int
deleteGameSessionQueueResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteGameSessionQueueResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteGameSessionQueueResponse' :: DeleteGameSessionQueueResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteGameSessionQueueResponse
s@DeleteGameSessionQueueResponse' {} Int
a -> DeleteGameSessionQueueResponse
s {$sel:httpStatus:DeleteGameSessionQueueResponse' :: Int
httpStatus = Int
a} :: DeleteGameSessionQueueResponse)
instance
Prelude.NFData
DeleteGameSessionQueueResponse
where
rnf :: DeleteGameSessionQueueResponse -> ()
rnf DeleteGameSessionQueueResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteGameSessionQueueResponse' :: DeleteGameSessionQueueResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus