{-# 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.Nimble.DeleteLaunchProfile
(
DeleteLaunchProfile (..),
newDeleteLaunchProfile,
deleteLaunchProfile_clientToken,
deleteLaunchProfile_launchProfileId,
deleteLaunchProfile_studioId,
DeleteLaunchProfileResponse (..),
newDeleteLaunchProfileResponse,
deleteLaunchProfileResponse_launchProfile,
deleteLaunchProfileResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Nimble.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DeleteLaunchProfile = DeleteLaunchProfile'
{
DeleteLaunchProfile -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
DeleteLaunchProfile -> Text
launchProfileId :: Prelude.Text,
DeleteLaunchProfile -> Text
studioId :: Prelude.Text
}
deriving (DeleteLaunchProfile -> DeleteLaunchProfile -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteLaunchProfile -> DeleteLaunchProfile -> Bool
$c/= :: DeleteLaunchProfile -> DeleteLaunchProfile -> Bool
== :: DeleteLaunchProfile -> DeleteLaunchProfile -> Bool
$c== :: DeleteLaunchProfile -> DeleteLaunchProfile -> Bool
Prelude.Eq, ReadPrec [DeleteLaunchProfile]
ReadPrec DeleteLaunchProfile
Int -> ReadS DeleteLaunchProfile
ReadS [DeleteLaunchProfile]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteLaunchProfile]
$creadListPrec :: ReadPrec [DeleteLaunchProfile]
readPrec :: ReadPrec DeleteLaunchProfile
$creadPrec :: ReadPrec DeleteLaunchProfile
readList :: ReadS [DeleteLaunchProfile]
$creadList :: ReadS [DeleteLaunchProfile]
readsPrec :: Int -> ReadS DeleteLaunchProfile
$creadsPrec :: Int -> ReadS DeleteLaunchProfile
Prelude.Read, Int -> DeleteLaunchProfile -> ShowS
[DeleteLaunchProfile] -> ShowS
DeleteLaunchProfile -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteLaunchProfile] -> ShowS
$cshowList :: [DeleteLaunchProfile] -> ShowS
show :: DeleteLaunchProfile -> String
$cshow :: DeleteLaunchProfile -> String
showsPrec :: Int -> DeleteLaunchProfile -> ShowS
$cshowsPrec :: Int -> DeleteLaunchProfile -> ShowS
Prelude.Show, forall x. Rep DeleteLaunchProfile x -> DeleteLaunchProfile
forall x. DeleteLaunchProfile -> Rep DeleteLaunchProfile x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteLaunchProfile x -> DeleteLaunchProfile
$cfrom :: forall x. DeleteLaunchProfile -> Rep DeleteLaunchProfile x
Prelude.Generic)
newDeleteLaunchProfile ::
Prelude.Text ->
Prelude.Text ->
DeleteLaunchProfile
newDeleteLaunchProfile :: Text -> Text -> DeleteLaunchProfile
newDeleteLaunchProfile Text
pLaunchProfileId_ Text
pStudioId_ =
DeleteLaunchProfile'
{ $sel:clientToken:DeleteLaunchProfile' :: Maybe Text
clientToken = forall a. Maybe a
Prelude.Nothing,
$sel:launchProfileId:DeleteLaunchProfile' :: Text
launchProfileId = Text
pLaunchProfileId_,
$sel:studioId:DeleteLaunchProfile' :: Text
studioId = Text
pStudioId_
}
deleteLaunchProfile_clientToken :: Lens.Lens' DeleteLaunchProfile (Prelude.Maybe Prelude.Text)
deleteLaunchProfile_clientToken :: Lens' DeleteLaunchProfile (Maybe Text)
deleteLaunchProfile_clientToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteLaunchProfile' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:DeleteLaunchProfile' :: DeleteLaunchProfile -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: DeleteLaunchProfile
s@DeleteLaunchProfile' {} Maybe Text
a -> DeleteLaunchProfile
s {$sel:clientToken:DeleteLaunchProfile' :: Maybe Text
clientToken = Maybe Text
a} :: DeleteLaunchProfile)
deleteLaunchProfile_launchProfileId :: Lens.Lens' DeleteLaunchProfile Prelude.Text
deleteLaunchProfile_launchProfileId :: Lens' DeleteLaunchProfile Text
deleteLaunchProfile_launchProfileId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteLaunchProfile' {Text
launchProfileId :: Text
$sel:launchProfileId:DeleteLaunchProfile' :: DeleteLaunchProfile -> Text
launchProfileId} -> Text
launchProfileId) (\s :: DeleteLaunchProfile
s@DeleteLaunchProfile' {} Text
a -> DeleteLaunchProfile
s {$sel:launchProfileId:DeleteLaunchProfile' :: Text
launchProfileId = Text
a} :: DeleteLaunchProfile)
deleteLaunchProfile_studioId :: Lens.Lens' DeleteLaunchProfile Prelude.Text
deleteLaunchProfile_studioId :: Lens' DeleteLaunchProfile Text
deleteLaunchProfile_studioId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteLaunchProfile' {Text
studioId :: Text
$sel:studioId:DeleteLaunchProfile' :: DeleteLaunchProfile -> Text
studioId} -> Text
studioId) (\s :: DeleteLaunchProfile
s@DeleteLaunchProfile' {} Text
a -> DeleteLaunchProfile
s {$sel:studioId:DeleteLaunchProfile' :: Text
studioId = Text
a} :: DeleteLaunchProfile)
instance Core.AWSRequest DeleteLaunchProfile where
type
AWSResponse DeleteLaunchProfile =
DeleteLaunchProfileResponse
request :: (Service -> Service)
-> DeleteLaunchProfile -> Request DeleteLaunchProfile
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.delete (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DeleteLaunchProfile
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteLaunchProfile)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe LaunchProfile -> Int -> DeleteLaunchProfileResponse
DeleteLaunchProfileResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"launchProfile")
forall (f :: * -> *) a b. Applicative f => 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 DeleteLaunchProfile where
hashWithSalt :: Int -> DeleteLaunchProfile -> Int
hashWithSalt Int
_salt DeleteLaunchProfile' {Maybe Text
Text
studioId :: Text
launchProfileId :: Text
clientToken :: Maybe Text
$sel:studioId:DeleteLaunchProfile' :: DeleteLaunchProfile -> Text
$sel:launchProfileId:DeleteLaunchProfile' :: DeleteLaunchProfile -> Text
$sel:clientToken:DeleteLaunchProfile' :: DeleteLaunchProfile -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clientToken
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
launchProfileId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
studioId
instance Prelude.NFData DeleteLaunchProfile where
rnf :: DeleteLaunchProfile -> ()
rnf DeleteLaunchProfile' {Maybe Text
Text
studioId :: Text
launchProfileId :: Text
clientToken :: Maybe Text
$sel:studioId:DeleteLaunchProfile' :: DeleteLaunchProfile -> Text
$sel:launchProfileId:DeleteLaunchProfile' :: DeleteLaunchProfile -> Text
$sel:clientToken:DeleteLaunchProfile' :: DeleteLaunchProfile -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clientToken
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
launchProfileId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
studioId
instance Data.ToHeaders DeleteLaunchProfile where
toHeaders :: DeleteLaunchProfile -> ResponseHeaders
toHeaders DeleteLaunchProfile' {Maybe Text
Text
studioId :: Text
launchProfileId :: Text
clientToken :: Maybe Text
$sel:studioId:DeleteLaunchProfile' :: DeleteLaunchProfile -> Text
$sel:launchProfileId:DeleteLaunchProfile' :: DeleteLaunchProfile -> Text
$sel:clientToken:DeleteLaunchProfile' :: DeleteLaunchProfile -> Maybe Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Client-Token" forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe Text
clientToken,
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# (ByteString
"application/x-amz-json-1.1" :: Prelude.ByteString)
]
instance Data.ToPath DeleteLaunchProfile where
toPath :: DeleteLaunchProfile -> ByteString
toPath DeleteLaunchProfile' {Maybe Text
Text
studioId :: Text
launchProfileId :: Text
clientToken :: Maybe Text
$sel:studioId:DeleteLaunchProfile' :: DeleteLaunchProfile -> Text
$sel:launchProfileId:DeleteLaunchProfile' :: DeleteLaunchProfile -> Text
$sel:clientToken:DeleteLaunchProfile' :: DeleteLaunchProfile -> Maybe Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/2020-08-01/studios/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
studioId,
ByteString
"/launch-profiles/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
launchProfileId
]
instance Data.ToQuery DeleteLaunchProfile where
toQuery :: DeleteLaunchProfile -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DeleteLaunchProfileResponse = DeleteLaunchProfileResponse'
{
DeleteLaunchProfileResponse -> Maybe LaunchProfile
launchProfile :: Prelude.Maybe LaunchProfile,
DeleteLaunchProfileResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteLaunchProfileResponse -> DeleteLaunchProfileResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteLaunchProfileResponse -> DeleteLaunchProfileResponse -> Bool
$c/= :: DeleteLaunchProfileResponse -> DeleteLaunchProfileResponse -> Bool
== :: DeleteLaunchProfileResponse -> DeleteLaunchProfileResponse -> Bool
$c== :: DeleteLaunchProfileResponse -> DeleteLaunchProfileResponse -> Bool
Prelude.Eq, Int -> DeleteLaunchProfileResponse -> ShowS
[DeleteLaunchProfileResponse] -> ShowS
DeleteLaunchProfileResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteLaunchProfileResponse] -> ShowS
$cshowList :: [DeleteLaunchProfileResponse] -> ShowS
show :: DeleteLaunchProfileResponse -> String
$cshow :: DeleteLaunchProfileResponse -> String
showsPrec :: Int -> DeleteLaunchProfileResponse -> ShowS
$cshowsPrec :: Int -> DeleteLaunchProfileResponse -> ShowS
Prelude.Show, forall x.
Rep DeleteLaunchProfileResponse x -> DeleteLaunchProfileResponse
forall x.
DeleteLaunchProfileResponse -> Rep DeleteLaunchProfileResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteLaunchProfileResponse x -> DeleteLaunchProfileResponse
$cfrom :: forall x.
DeleteLaunchProfileResponse -> Rep DeleteLaunchProfileResponse x
Prelude.Generic)
newDeleteLaunchProfileResponse ::
Prelude.Int ->
DeleteLaunchProfileResponse
newDeleteLaunchProfileResponse :: Int -> DeleteLaunchProfileResponse
newDeleteLaunchProfileResponse Int
pHttpStatus_ =
DeleteLaunchProfileResponse'
{ $sel:launchProfile:DeleteLaunchProfileResponse' :: Maybe LaunchProfile
launchProfile =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DeleteLaunchProfileResponse' :: Int
httpStatus = Int
pHttpStatus_
}
deleteLaunchProfileResponse_launchProfile :: Lens.Lens' DeleteLaunchProfileResponse (Prelude.Maybe LaunchProfile)
deleteLaunchProfileResponse_launchProfile :: Lens' DeleteLaunchProfileResponse (Maybe LaunchProfile)
deleteLaunchProfileResponse_launchProfile = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteLaunchProfileResponse' {Maybe LaunchProfile
launchProfile :: Maybe LaunchProfile
$sel:launchProfile:DeleteLaunchProfileResponse' :: DeleteLaunchProfileResponse -> Maybe LaunchProfile
launchProfile} -> Maybe LaunchProfile
launchProfile) (\s :: DeleteLaunchProfileResponse
s@DeleteLaunchProfileResponse' {} Maybe LaunchProfile
a -> DeleteLaunchProfileResponse
s {$sel:launchProfile:DeleteLaunchProfileResponse' :: Maybe LaunchProfile
launchProfile = Maybe LaunchProfile
a} :: DeleteLaunchProfileResponse)
deleteLaunchProfileResponse_httpStatus :: Lens.Lens' DeleteLaunchProfileResponse Prelude.Int
deleteLaunchProfileResponse_httpStatus :: Lens' DeleteLaunchProfileResponse Int
deleteLaunchProfileResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteLaunchProfileResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteLaunchProfileResponse' :: DeleteLaunchProfileResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteLaunchProfileResponse
s@DeleteLaunchProfileResponse' {} Int
a -> DeleteLaunchProfileResponse
s {$sel:httpStatus:DeleteLaunchProfileResponse' :: Int
httpStatus = Int
a} :: DeleteLaunchProfileResponse)
instance Prelude.NFData DeleteLaunchProfileResponse where
rnf :: DeleteLaunchProfileResponse -> ()
rnf DeleteLaunchProfileResponse' {Int
Maybe LaunchProfile
httpStatus :: Int
launchProfile :: Maybe LaunchProfile
$sel:httpStatus:DeleteLaunchProfileResponse' :: DeleteLaunchProfileResponse -> Int
$sel:launchProfile:DeleteLaunchProfileResponse' :: DeleteLaunchProfileResponse -> Maybe LaunchProfile
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe LaunchProfile
launchProfile
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus