{-# 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.DeleteBuild
(
DeleteBuild (..),
newDeleteBuild,
deleteBuild_buildId,
DeleteBuildResponse (..),
newDeleteBuildResponse,
)
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 DeleteBuild = DeleteBuild'
{
DeleteBuild -> Text
buildId :: Prelude.Text
}
deriving (DeleteBuild -> DeleteBuild -> Bool
(DeleteBuild -> DeleteBuild -> Bool)
-> (DeleteBuild -> DeleteBuild -> Bool) -> Eq DeleteBuild
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteBuild -> DeleteBuild -> Bool
$c/= :: DeleteBuild -> DeleteBuild -> Bool
== :: DeleteBuild -> DeleteBuild -> Bool
$c== :: DeleteBuild -> DeleteBuild -> Bool
Prelude.Eq, ReadPrec [DeleteBuild]
ReadPrec DeleteBuild
Int -> ReadS DeleteBuild
ReadS [DeleteBuild]
(Int -> ReadS DeleteBuild)
-> ReadS [DeleteBuild]
-> ReadPrec DeleteBuild
-> ReadPrec [DeleteBuild]
-> Read DeleteBuild
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteBuild]
$creadListPrec :: ReadPrec [DeleteBuild]
readPrec :: ReadPrec DeleteBuild
$creadPrec :: ReadPrec DeleteBuild
readList :: ReadS [DeleteBuild]
$creadList :: ReadS [DeleteBuild]
readsPrec :: Int -> ReadS DeleteBuild
$creadsPrec :: Int -> ReadS DeleteBuild
Prelude.Read, Int -> DeleteBuild -> ShowS
[DeleteBuild] -> ShowS
DeleteBuild -> String
(Int -> DeleteBuild -> ShowS)
-> (DeleteBuild -> String)
-> ([DeleteBuild] -> ShowS)
-> Show DeleteBuild
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteBuild] -> ShowS
$cshowList :: [DeleteBuild] -> ShowS
show :: DeleteBuild -> String
$cshow :: DeleteBuild -> String
showsPrec :: Int -> DeleteBuild -> ShowS
$cshowsPrec :: Int -> DeleteBuild -> ShowS
Prelude.Show, (forall x. DeleteBuild -> Rep DeleteBuild x)
-> (forall x. Rep DeleteBuild x -> DeleteBuild)
-> Generic DeleteBuild
forall x. Rep DeleteBuild x -> DeleteBuild
forall x. DeleteBuild -> Rep DeleteBuild x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteBuild x -> DeleteBuild
$cfrom :: forall x. DeleteBuild -> Rep DeleteBuild x
Prelude.Generic)
newDeleteBuild ::
Prelude.Text ->
DeleteBuild
newDeleteBuild :: Text -> DeleteBuild
newDeleteBuild Text
pBuildId_ =
DeleteBuild' :: Text -> DeleteBuild
DeleteBuild' {$sel:buildId:DeleteBuild' :: Text
buildId = Text
pBuildId_}
deleteBuild_buildId :: Lens.Lens' DeleteBuild Prelude.Text
deleteBuild_buildId :: (Text -> f Text) -> DeleteBuild -> f DeleteBuild
deleteBuild_buildId = (DeleteBuild -> Text)
-> (DeleteBuild -> Text -> DeleteBuild)
-> Lens DeleteBuild DeleteBuild Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteBuild' {Text
buildId :: Text
$sel:buildId:DeleteBuild' :: DeleteBuild -> Text
buildId} -> Text
buildId) (\s :: DeleteBuild
s@DeleteBuild' {} Text
a -> DeleteBuild
s {$sel:buildId:DeleteBuild' :: Text
buildId = Text
a} :: DeleteBuild)
instance Core.AWSRequest DeleteBuild where
type AWSResponse DeleteBuild = DeleteBuildResponse
request :: DeleteBuild -> Request DeleteBuild
request = Service -> DeleteBuild -> Request DeleteBuild
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteBuild
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteBuild)))
response = AWSResponse DeleteBuild
-> Logger
-> Service
-> Proxy DeleteBuild
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteBuild)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse DeleteBuild
DeleteBuildResponse
DeleteBuildResponse'
instance Prelude.Hashable DeleteBuild
instance Prelude.NFData DeleteBuild
instance Core.ToHeaders DeleteBuild where
toHeaders :: DeleteBuild -> [Header]
toHeaders =
[Header] -> DeleteBuild -> [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.DeleteBuild" :: 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 DeleteBuild where
toJSON :: DeleteBuild -> Value
toJSON DeleteBuild' {Text
buildId :: Text
$sel:buildId:DeleteBuild' :: DeleteBuild -> 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
"BuildId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
buildId)]
)
instance Core.ToPath DeleteBuild where
toPath :: DeleteBuild -> ByteString
toPath = ByteString -> DeleteBuild -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeleteBuild where
toQuery :: DeleteBuild -> QueryString
toQuery = QueryString -> DeleteBuild -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteBuildResponse = DeleteBuildResponse'
{
}
deriving (DeleteBuildResponse -> DeleteBuildResponse -> Bool
(DeleteBuildResponse -> DeleteBuildResponse -> Bool)
-> (DeleteBuildResponse -> DeleteBuildResponse -> Bool)
-> Eq DeleteBuildResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteBuildResponse -> DeleteBuildResponse -> Bool
$c/= :: DeleteBuildResponse -> DeleteBuildResponse -> Bool
== :: DeleteBuildResponse -> DeleteBuildResponse -> Bool
$c== :: DeleteBuildResponse -> DeleteBuildResponse -> Bool
Prelude.Eq, ReadPrec [DeleteBuildResponse]
ReadPrec DeleteBuildResponse
Int -> ReadS DeleteBuildResponse
ReadS [DeleteBuildResponse]
(Int -> ReadS DeleteBuildResponse)
-> ReadS [DeleteBuildResponse]
-> ReadPrec DeleteBuildResponse
-> ReadPrec [DeleteBuildResponse]
-> Read DeleteBuildResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteBuildResponse]
$creadListPrec :: ReadPrec [DeleteBuildResponse]
readPrec :: ReadPrec DeleteBuildResponse
$creadPrec :: ReadPrec DeleteBuildResponse
readList :: ReadS [DeleteBuildResponse]
$creadList :: ReadS [DeleteBuildResponse]
readsPrec :: Int -> ReadS DeleteBuildResponse
$creadsPrec :: Int -> ReadS DeleteBuildResponse
Prelude.Read, Int -> DeleteBuildResponse -> ShowS
[DeleteBuildResponse] -> ShowS
DeleteBuildResponse -> String
(Int -> DeleteBuildResponse -> ShowS)
-> (DeleteBuildResponse -> String)
-> ([DeleteBuildResponse] -> ShowS)
-> Show DeleteBuildResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteBuildResponse] -> ShowS
$cshowList :: [DeleteBuildResponse] -> ShowS
show :: DeleteBuildResponse -> String
$cshow :: DeleteBuildResponse -> String
showsPrec :: Int -> DeleteBuildResponse -> ShowS
$cshowsPrec :: Int -> DeleteBuildResponse -> ShowS
Prelude.Show, (forall x. DeleteBuildResponse -> Rep DeleteBuildResponse x)
-> (forall x. Rep DeleteBuildResponse x -> DeleteBuildResponse)
-> Generic DeleteBuildResponse
forall x. Rep DeleteBuildResponse x -> DeleteBuildResponse
forall x. DeleteBuildResponse -> Rep DeleteBuildResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteBuildResponse x -> DeleteBuildResponse
$cfrom :: forall x. DeleteBuildResponse -> Rep DeleteBuildResponse x
Prelude.Generic)
newDeleteBuildResponse ::
DeleteBuildResponse
newDeleteBuildResponse :: DeleteBuildResponse
newDeleteBuildResponse = DeleteBuildResponse
DeleteBuildResponse'
instance Prelude.NFData DeleteBuildResponse