{-# 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.DeleteMatchmakingRuleSet
(
DeleteMatchmakingRuleSet (..),
newDeleteMatchmakingRuleSet,
deleteMatchmakingRuleSet_name,
DeleteMatchmakingRuleSetResponse (..),
newDeleteMatchmakingRuleSetResponse,
deleteMatchmakingRuleSetResponse_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 DeleteMatchmakingRuleSet = DeleteMatchmakingRuleSet'
{
DeleteMatchmakingRuleSet -> Text
name :: Prelude.Text
}
deriving (DeleteMatchmakingRuleSet -> DeleteMatchmakingRuleSet -> Bool
(DeleteMatchmakingRuleSet -> DeleteMatchmakingRuleSet -> Bool)
-> (DeleteMatchmakingRuleSet -> DeleteMatchmakingRuleSet -> Bool)
-> Eq DeleteMatchmakingRuleSet
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteMatchmakingRuleSet -> DeleteMatchmakingRuleSet -> Bool
$c/= :: DeleteMatchmakingRuleSet -> DeleteMatchmakingRuleSet -> Bool
== :: DeleteMatchmakingRuleSet -> DeleteMatchmakingRuleSet -> Bool
$c== :: DeleteMatchmakingRuleSet -> DeleteMatchmakingRuleSet -> Bool
Prelude.Eq, ReadPrec [DeleteMatchmakingRuleSet]
ReadPrec DeleteMatchmakingRuleSet
Int -> ReadS DeleteMatchmakingRuleSet
ReadS [DeleteMatchmakingRuleSet]
(Int -> ReadS DeleteMatchmakingRuleSet)
-> ReadS [DeleteMatchmakingRuleSet]
-> ReadPrec DeleteMatchmakingRuleSet
-> ReadPrec [DeleteMatchmakingRuleSet]
-> Read DeleteMatchmakingRuleSet
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteMatchmakingRuleSet]
$creadListPrec :: ReadPrec [DeleteMatchmakingRuleSet]
readPrec :: ReadPrec DeleteMatchmakingRuleSet
$creadPrec :: ReadPrec DeleteMatchmakingRuleSet
readList :: ReadS [DeleteMatchmakingRuleSet]
$creadList :: ReadS [DeleteMatchmakingRuleSet]
readsPrec :: Int -> ReadS DeleteMatchmakingRuleSet
$creadsPrec :: Int -> ReadS DeleteMatchmakingRuleSet
Prelude.Read, Int -> DeleteMatchmakingRuleSet -> ShowS
[DeleteMatchmakingRuleSet] -> ShowS
DeleteMatchmakingRuleSet -> String
(Int -> DeleteMatchmakingRuleSet -> ShowS)
-> (DeleteMatchmakingRuleSet -> String)
-> ([DeleteMatchmakingRuleSet] -> ShowS)
-> Show DeleteMatchmakingRuleSet
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteMatchmakingRuleSet] -> ShowS
$cshowList :: [DeleteMatchmakingRuleSet] -> ShowS
show :: DeleteMatchmakingRuleSet -> String
$cshow :: DeleteMatchmakingRuleSet -> String
showsPrec :: Int -> DeleteMatchmakingRuleSet -> ShowS
$cshowsPrec :: Int -> DeleteMatchmakingRuleSet -> ShowS
Prelude.Show, (forall x.
DeleteMatchmakingRuleSet -> Rep DeleteMatchmakingRuleSet x)
-> (forall x.
Rep DeleteMatchmakingRuleSet x -> DeleteMatchmakingRuleSet)
-> Generic DeleteMatchmakingRuleSet
forall x.
Rep DeleteMatchmakingRuleSet x -> DeleteMatchmakingRuleSet
forall x.
DeleteMatchmakingRuleSet -> Rep DeleteMatchmakingRuleSet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteMatchmakingRuleSet x -> DeleteMatchmakingRuleSet
$cfrom :: forall x.
DeleteMatchmakingRuleSet -> Rep DeleteMatchmakingRuleSet x
Prelude.Generic)
newDeleteMatchmakingRuleSet ::
Prelude.Text ->
DeleteMatchmakingRuleSet
newDeleteMatchmakingRuleSet :: Text -> DeleteMatchmakingRuleSet
newDeleteMatchmakingRuleSet Text
pName_ =
DeleteMatchmakingRuleSet' :: Text -> DeleteMatchmakingRuleSet
DeleteMatchmakingRuleSet' {$sel:name:DeleteMatchmakingRuleSet' :: Text
name = Text
pName_}
deleteMatchmakingRuleSet_name :: Lens.Lens' DeleteMatchmakingRuleSet Prelude.Text
deleteMatchmakingRuleSet_name :: (Text -> f Text)
-> DeleteMatchmakingRuleSet -> f DeleteMatchmakingRuleSet
deleteMatchmakingRuleSet_name = (DeleteMatchmakingRuleSet -> Text)
-> (DeleteMatchmakingRuleSet -> Text -> DeleteMatchmakingRuleSet)
-> Lens DeleteMatchmakingRuleSet DeleteMatchmakingRuleSet Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteMatchmakingRuleSet' {Text
name :: Text
$sel:name:DeleteMatchmakingRuleSet' :: DeleteMatchmakingRuleSet -> Text
name} -> Text
name) (\s :: DeleteMatchmakingRuleSet
s@DeleteMatchmakingRuleSet' {} Text
a -> DeleteMatchmakingRuleSet
s {$sel:name:DeleteMatchmakingRuleSet' :: Text
name = Text
a} :: DeleteMatchmakingRuleSet)
instance Core.AWSRequest DeleteMatchmakingRuleSet where
type
AWSResponse DeleteMatchmakingRuleSet =
DeleteMatchmakingRuleSetResponse
request :: DeleteMatchmakingRuleSet -> Request DeleteMatchmakingRuleSet
request = Service
-> DeleteMatchmakingRuleSet -> Request DeleteMatchmakingRuleSet
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteMatchmakingRuleSet
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteMatchmakingRuleSet)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse DeleteMatchmakingRuleSet))
-> Logger
-> Service
-> Proxy DeleteMatchmakingRuleSet
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteMatchmakingRuleSet)))
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 -> DeleteMatchmakingRuleSetResponse
DeleteMatchmakingRuleSetResponse'
(Int -> DeleteMatchmakingRuleSetResponse)
-> Either String Int
-> Either String DeleteMatchmakingRuleSetResponse
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 DeleteMatchmakingRuleSet
instance Prelude.NFData DeleteMatchmakingRuleSet
instance Core.ToHeaders DeleteMatchmakingRuleSet where
toHeaders :: DeleteMatchmakingRuleSet -> ResponseHeaders
toHeaders =
ResponseHeaders -> DeleteMatchmakingRuleSet -> 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.DeleteMatchmakingRuleSet" ::
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 DeleteMatchmakingRuleSet where
toJSON :: DeleteMatchmakingRuleSet -> Value
toJSON DeleteMatchmakingRuleSet' {Text
name :: Text
$sel:name:DeleteMatchmakingRuleSet' :: DeleteMatchmakingRuleSet -> 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 DeleteMatchmakingRuleSet where
toPath :: DeleteMatchmakingRuleSet -> ByteString
toPath = ByteString -> DeleteMatchmakingRuleSet -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeleteMatchmakingRuleSet where
toQuery :: DeleteMatchmakingRuleSet -> QueryString
toQuery = QueryString -> DeleteMatchmakingRuleSet -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteMatchmakingRuleSetResponse = DeleteMatchmakingRuleSetResponse'
{
DeleteMatchmakingRuleSetResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteMatchmakingRuleSetResponse
-> DeleteMatchmakingRuleSetResponse -> Bool
(DeleteMatchmakingRuleSetResponse
-> DeleteMatchmakingRuleSetResponse -> Bool)
-> (DeleteMatchmakingRuleSetResponse
-> DeleteMatchmakingRuleSetResponse -> Bool)
-> Eq DeleteMatchmakingRuleSetResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteMatchmakingRuleSetResponse
-> DeleteMatchmakingRuleSetResponse -> Bool
$c/= :: DeleteMatchmakingRuleSetResponse
-> DeleteMatchmakingRuleSetResponse -> Bool
== :: DeleteMatchmakingRuleSetResponse
-> DeleteMatchmakingRuleSetResponse -> Bool
$c== :: DeleteMatchmakingRuleSetResponse
-> DeleteMatchmakingRuleSetResponse -> Bool
Prelude.Eq, ReadPrec [DeleteMatchmakingRuleSetResponse]
ReadPrec DeleteMatchmakingRuleSetResponse
Int -> ReadS DeleteMatchmakingRuleSetResponse
ReadS [DeleteMatchmakingRuleSetResponse]
(Int -> ReadS DeleteMatchmakingRuleSetResponse)
-> ReadS [DeleteMatchmakingRuleSetResponse]
-> ReadPrec DeleteMatchmakingRuleSetResponse
-> ReadPrec [DeleteMatchmakingRuleSetResponse]
-> Read DeleteMatchmakingRuleSetResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteMatchmakingRuleSetResponse]
$creadListPrec :: ReadPrec [DeleteMatchmakingRuleSetResponse]
readPrec :: ReadPrec DeleteMatchmakingRuleSetResponse
$creadPrec :: ReadPrec DeleteMatchmakingRuleSetResponse
readList :: ReadS [DeleteMatchmakingRuleSetResponse]
$creadList :: ReadS [DeleteMatchmakingRuleSetResponse]
readsPrec :: Int -> ReadS DeleteMatchmakingRuleSetResponse
$creadsPrec :: Int -> ReadS DeleteMatchmakingRuleSetResponse
Prelude.Read, Int -> DeleteMatchmakingRuleSetResponse -> ShowS
[DeleteMatchmakingRuleSetResponse] -> ShowS
DeleteMatchmakingRuleSetResponse -> String
(Int -> DeleteMatchmakingRuleSetResponse -> ShowS)
-> (DeleteMatchmakingRuleSetResponse -> String)
-> ([DeleteMatchmakingRuleSetResponse] -> ShowS)
-> Show DeleteMatchmakingRuleSetResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteMatchmakingRuleSetResponse] -> ShowS
$cshowList :: [DeleteMatchmakingRuleSetResponse] -> ShowS
show :: DeleteMatchmakingRuleSetResponse -> String
$cshow :: DeleteMatchmakingRuleSetResponse -> String
showsPrec :: Int -> DeleteMatchmakingRuleSetResponse -> ShowS
$cshowsPrec :: Int -> DeleteMatchmakingRuleSetResponse -> ShowS
Prelude.Show, (forall x.
DeleteMatchmakingRuleSetResponse
-> Rep DeleteMatchmakingRuleSetResponse x)
-> (forall x.
Rep DeleteMatchmakingRuleSetResponse x
-> DeleteMatchmakingRuleSetResponse)
-> Generic DeleteMatchmakingRuleSetResponse
forall x.
Rep DeleteMatchmakingRuleSetResponse x
-> DeleteMatchmakingRuleSetResponse
forall x.
DeleteMatchmakingRuleSetResponse
-> Rep DeleteMatchmakingRuleSetResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteMatchmakingRuleSetResponse x
-> DeleteMatchmakingRuleSetResponse
$cfrom :: forall x.
DeleteMatchmakingRuleSetResponse
-> Rep DeleteMatchmakingRuleSetResponse x
Prelude.Generic)
newDeleteMatchmakingRuleSetResponse ::
Prelude.Int ->
DeleteMatchmakingRuleSetResponse
newDeleteMatchmakingRuleSetResponse :: Int -> DeleteMatchmakingRuleSetResponse
newDeleteMatchmakingRuleSetResponse Int
pHttpStatus_ =
DeleteMatchmakingRuleSetResponse' :: Int -> DeleteMatchmakingRuleSetResponse
DeleteMatchmakingRuleSetResponse'
{ $sel:httpStatus:DeleteMatchmakingRuleSetResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteMatchmakingRuleSetResponse_httpStatus :: Lens.Lens' DeleteMatchmakingRuleSetResponse Prelude.Int
deleteMatchmakingRuleSetResponse_httpStatus :: (Int -> f Int)
-> DeleteMatchmakingRuleSetResponse
-> f DeleteMatchmakingRuleSetResponse
deleteMatchmakingRuleSetResponse_httpStatus = (DeleteMatchmakingRuleSetResponse -> Int)
-> (DeleteMatchmakingRuleSetResponse
-> Int -> DeleteMatchmakingRuleSetResponse)
-> Lens
DeleteMatchmakingRuleSetResponse
DeleteMatchmakingRuleSetResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteMatchmakingRuleSetResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteMatchmakingRuleSetResponse' :: DeleteMatchmakingRuleSetResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteMatchmakingRuleSetResponse
s@DeleteMatchmakingRuleSetResponse' {} Int
a -> DeleteMatchmakingRuleSetResponse
s {$sel:httpStatus:DeleteMatchmakingRuleSetResponse' :: Int
httpStatus = Int
a} :: DeleteMatchmakingRuleSetResponse)
instance
Prelude.NFData
DeleteMatchmakingRuleSetResponse