{-# 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.DeleteFleet
(
DeleteFleet (..),
newDeleteFleet,
deleteFleet_fleetId,
DeleteFleetResponse (..),
newDeleteFleetResponse,
)
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 DeleteFleet = DeleteFleet'
{
DeleteFleet -> Text
fleetId :: Prelude.Text
}
deriving (DeleteFleet -> DeleteFleet -> Bool
(DeleteFleet -> DeleteFleet -> Bool)
-> (DeleteFleet -> DeleteFleet -> Bool) -> Eq DeleteFleet
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteFleet -> DeleteFleet -> Bool
$c/= :: DeleteFleet -> DeleteFleet -> Bool
== :: DeleteFleet -> DeleteFleet -> Bool
$c== :: DeleteFleet -> DeleteFleet -> Bool
Prelude.Eq, ReadPrec [DeleteFleet]
ReadPrec DeleteFleet
Int -> ReadS DeleteFleet
ReadS [DeleteFleet]
(Int -> ReadS DeleteFleet)
-> ReadS [DeleteFleet]
-> ReadPrec DeleteFleet
-> ReadPrec [DeleteFleet]
-> Read DeleteFleet
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteFleet]
$creadListPrec :: ReadPrec [DeleteFleet]
readPrec :: ReadPrec DeleteFleet
$creadPrec :: ReadPrec DeleteFleet
readList :: ReadS [DeleteFleet]
$creadList :: ReadS [DeleteFleet]
readsPrec :: Int -> ReadS DeleteFleet
$creadsPrec :: Int -> ReadS DeleteFleet
Prelude.Read, Int -> DeleteFleet -> ShowS
[DeleteFleet] -> ShowS
DeleteFleet -> String
(Int -> DeleteFleet -> ShowS)
-> (DeleteFleet -> String)
-> ([DeleteFleet] -> ShowS)
-> Show DeleteFleet
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteFleet] -> ShowS
$cshowList :: [DeleteFleet] -> ShowS
show :: DeleteFleet -> String
$cshow :: DeleteFleet -> String
showsPrec :: Int -> DeleteFleet -> ShowS
$cshowsPrec :: Int -> DeleteFleet -> ShowS
Prelude.Show, (forall x. DeleteFleet -> Rep DeleteFleet x)
-> (forall x. Rep DeleteFleet x -> DeleteFleet)
-> Generic DeleteFleet
forall x. Rep DeleteFleet x -> DeleteFleet
forall x. DeleteFleet -> Rep DeleteFleet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteFleet x -> DeleteFleet
$cfrom :: forall x. DeleteFleet -> Rep DeleteFleet x
Prelude.Generic)
newDeleteFleet ::
Prelude.Text ->
DeleteFleet
newDeleteFleet :: Text -> DeleteFleet
newDeleteFleet Text
pFleetId_ =
DeleteFleet' :: Text -> DeleteFleet
DeleteFleet' {$sel:fleetId:DeleteFleet' :: Text
fleetId = Text
pFleetId_}
deleteFleet_fleetId :: Lens.Lens' DeleteFleet Prelude.Text
deleteFleet_fleetId :: (Text -> f Text) -> DeleteFleet -> f DeleteFleet
deleteFleet_fleetId = (DeleteFleet -> Text)
-> (DeleteFleet -> Text -> DeleteFleet)
-> Lens DeleteFleet DeleteFleet Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteFleet' {Text
fleetId :: Text
$sel:fleetId:DeleteFleet' :: DeleteFleet -> Text
fleetId} -> Text
fleetId) (\s :: DeleteFleet
s@DeleteFleet' {} Text
a -> DeleteFleet
s {$sel:fleetId:DeleteFleet' :: Text
fleetId = Text
a} :: DeleteFleet)
instance Core.AWSRequest DeleteFleet where
type AWSResponse DeleteFleet = DeleteFleetResponse
request :: DeleteFleet -> Request DeleteFleet
request = Service -> DeleteFleet -> Request DeleteFleet
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteFleet
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteFleet)))
response = AWSResponse DeleteFleet
-> Logger
-> Service
-> Proxy DeleteFleet
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteFleet)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse DeleteFleet
DeleteFleetResponse
DeleteFleetResponse'
instance Prelude.Hashable DeleteFleet
instance Prelude.NFData DeleteFleet
instance Core.ToHeaders DeleteFleet where
toHeaders :: DeleteFleet -> [Header]
toHeaders =
[Header] -> DeleteFleet -> [Header]
forall a b. a -> b -> a
Prelude.const
( [[Header]] -> [Header]
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# (ByteString
"GameLift.DeleteFleet" :: Prelude.ByteString),
HeaderName
"Content-Type"
HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON DeleteFleet where
toJSON :: DeleteFleet -> Value
toJSON DeleteFleet' {Text
fleetId :: Text
$sel:fleetId:DeleteFleet' :: DeleteFleet -> 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
"FleetId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
fleetId)]
)
instance Core.ToPath DeleteFleet where
toPath :: DeleteFleet -> ByteString
toPath = ByteString -> DeleteFleet -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeleteFleet where
toQuery :: DeleteFleet -> QueryString
toQuery = QueryString -> DeleteFleet -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteFleetResponse = DeleteFleetResponse'
{
}
deriving (DeleteFleetResponse -> DeleteFleetResponse -> Bool
(DeleteFleetResponse -> DeleteFleetResponse -> Bool)
-> (DeleteFleetResponse -> DeleteFleetResponse -> Bool)
-> Eq DeleteFleetResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteFleetResponse -> DeleteFleetResponse -> Bool
$c/= :: DeleteFleetResponse -> DeleteFleetResponse -> Bool
== :: DeleteFleetResponse -> DeleteFleetResponse -> Bool
$c== :: DeleteFleetResponse -> DeleteFleetResponse -> Bool
Prelude.Eq, ReadPrec [DeleteFleetResponse]
ReadPrec DeleteFleetResponse
Int -> ReadS DeleteFleetResponse
ReadS [DeleteFleetResponse]
(Int -> ReadS DeleteFleetResponse)
-> ReadS [DeleteFleetResponse]
-> ReadPrec DeleteFleetResponse
-> ReadPrec [DeleteFleetResponse]
-> Read DeleteFleetResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteFleetResponse]
$creadListPrec :: ReadPrec [DeleteFleetResponse]
readPrec :: ReadPrec DeleteFleetResponse
$creadPrec :: ReadPrec DeleteFleetResponse
readList :: ReadS [DeleteFleetResponse]
$creadList :: ReadS [DeleteFleetResponse]
readsPrec :: Int -> ReadS DeleteFleetResponse
$creadsPrec :: Int -> ReadS DeleteFleetResponse
Prelude.Read, Int -> DeleteFleetResponse -> ShowS
[DeleteFleetResponse] -> ShowS
DeleteFleetResponse -> String
(Int -> DeleteFleetResponse -> ShowS)
-> (DeleteFleetResponse -> String)
-> ([DeleteFleetResponse] -> ShowS)
-> Show DeleteFleetResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteFleetResponse] -> ShowS
$cshowList :: [DeleteFleetResponse] -> ShowS
show :: DeleteFleetResponse -> String
$cshow :: DeleteFleetResponse -> String
showsPrec :: Int -> DeleteFleetResponse -> ShowS
$cshowsPrec :: Int -> DeleteFleetResponse -> ShowS
Prelude.Show, (forall x. DeleteFleetResponse -> Rep DeleteFleetResponse x)
-> (forall x. Rep DeleteFleetResponse x -> DeleteFleetResponse)
-> Generic DeleteFleetResponse
forall x. Rep DeleteFleetResponse x -> DeleteFleetResponse
forall x. DeleteFleetResponse -> Rep DeleteFleetResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteFleetResponse x -> DeleteFleetResponse
$cfrom :: forall x. DeleteFleetResponse -> Rep DeleteFleetResponse x
Prelude.Generic)
newDeleteFleetResponse ::
DeleteFleetResponse
newDeleteFleetResponse :: DeleteFleetResponse
newDeleteFleetResponse = DeleteFleetResponse
DeleteFleetResponse'
instance Prelude.NFData DeleteFleetResponse