{-# 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 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
data DeleteGameSessionQueue = DeleteGameSessionQueue'
{
DeleteGameSessionQueue -> Text
name :: Prelude.Text
}
deriving (DeleteGameSessionQueue -> DeleteGameSessionQueue -> Bool
(DeleteGameSessionQueue -> DeleteGameSessionQueue -> Bool)
-> (DeleteGameSessionQueue -> DeleteGameSessionQueue -> Bool)
-> Eq DeleteGameSessionQueue
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]
(Int -> ReadS DeleteGameSessionQueue)
-> ReadS [DeleteGameSessionQueue]
-> ReadPrec DeleteGameSessionQueue
-> ReadPrec [DeleteGameSessionQueue]
-> Read 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
(Int -> DeleteGameSessionQueue -> ShowS)
-> (DeleteGameSessionQueue -> String)
-> ([DeleteGameSessionQueue] -> ShowS)
-> Show DeleteGameSessionQueue
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. DeleteGameSessionQueue -> Rep DeleteGameSessionQueue x)
-> (forall x.
Rep DeleteGameSessionQueue x -> DeleteGameSessionQueue)
-> Generic DeleteGameSessionQueue
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' :: Text -> DeleteGameSessionQueue
DeleteGameSessionQueue' {$sel:name:DeleteGameSessionQueue' :: Text
name = Text
pName_}
deleteGameSessionQueue_name :: Lens.Lens' DeleteGameSessionQueue Prelude.Text
deleteGameSessionQueue_name :: (Text -> f Text)
-> DeleteGameSessionQueue -> f DeleteGameSessionQueue
deleteGameSessionQueue_name = (DeleteGameSessionQueue -> Text)
-> (DeleteGameSessionQueue -> Text -> DeleteGameSessionQueue)
-> Lens DeleteGameSessionQueue DeleteGameSessionQueue Text Text
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 :: DeleteGameSessionQueue -> Request DeleteGameSessionQueue
request = Service -> DeleteGameSessionQueue -> Request DeleteGameSessionQueue
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteGameSessionQueue
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteGameSessionQueue)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse DeleteGameSessionQueue))
-> Logger
-> Service
-> Proxy DeleteGameSessionQueue
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteGameSessionQueue)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> DeleteGameSessionQueueResponse
DeleteGameSessionQueueResponse'
(Int -> DeleteGameSessionQueueResponse)
-> Either String Int
-> Either String DeleteGameSessionQueueResponse
forall (f :: * -> *) a b. Functor 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 DeleteGameSessionQueue
instance Prelude.NFData DeleteGameSessionQueue
instance Core.ToHeaders DeleteGameSessionQueue where
toHeaders :: DeleteGameSessionQueue -> ResponseHeaders
toHeaders =
ResponseHeaders -> DeleteGameSessionQueue -> 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.DeleteGameSessionQueue" ::
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 DeleteGameSessionQueue where
toJSON :: DeleteGameSessionQueue -> Value
toJSON DeleteGameSessionQueue' {Text
name :: Text
$sel:name:DeleteGameSessionQueue' :: DeleteGameSessionQueue -> 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
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name)]
)
instance Core.ToPath DeleteGameSessionQueue where
toPath :: DeleteGameSessionQueue -> ByteString
toPath = ByteString -> DeleteGameSessionQueue -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeleteGameSessionQueue where
toQuery :: DeleteGameSessionQueue -> QueryString
toQuery = QueryString -> DeleteGameSessionQueue -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteGameSessionQueueResponse = DeleteGameSessionQueueResponse'
{
DeleteGameSessionQueueResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteGameSessionQueueResponse
-> DeleteGameSessionQueueResponse -> Bool
(DeleteGameSessionQueueResponse
-> DeleteGameSessionQueueResponse -> Bool)
-> (DeleteGameSessionQueueResponse
-> DeleteGameSessionQueueResponse -> Bool)
-> Eq DeleteGameSessionQueueResponse
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]
(Int -> ReadS DeleteGameSessionQueueResponse)
-> ReadS [DeleteGameSessionQueueResponse]
-> ReadPrec DeleteGameSessionQueueResponse
-> ReadPrec [DeleteGameSessionQueueResponse]
-> Read 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
(Int -> DeleteGameSessionQueueResponse -> ShowS)
-> (DeleteGameSessionQueueResponse -> String)
-> ([DeleteGameSessionQueueResponse] -> ShowS)
-> Show DeleteGameSessionQueueResponse
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.
DeleteGameSessionQueueResponse
-> Rep DeleteGameSessionQueueResponse x)
-> (forall x.
Rep DeleteGameSessionQueueResponse x
-> DeleteGameSessionQueueResponse)
-> Generic DeleteGameSessionQueueResponse
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' :: Int -> DeleteGameSessionQueueResponse
DeleteGameSessionQueueResponse'
{ $sel:httpStatus:DeleteGameSessionQueueResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteGameSessionQueueResponse_httpStatus :: Lens.Lens' DeleteGameSessionQueueResponse Prelude.Int
deleteGameSessionQueueResponse_httpStatus :: (Int -> f Int)
-> DeleteGameSessionQueueResponse
-> f DeleteGameSessionQueueResponse
deleteGameSessionQueueResponse_httpStatus = (DeleteGameSessionQueueResponse -> Int)
-> (DeleteGameSessionQueueResponse
-> Int -> DeleteGameSessionQueueResponse)
-> Lens
DeleteGameSessionQueueResponse
DeleteGameSessionQueueResponse
Int
Int
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