{-# 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_studioId,
deleteLaunchProfile_launchProfileId,
DeleteLaunchProfileResponse (..),
newDeleteLaunchProfileResponse,
deleteLaunchProfileResponse_launchProfile,
deleteLaunchProfileResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
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
studioId :: Prelude.Text,
DeleteLaunchProfile -> Text
launchProfileId :: Prelude.Text
}
deriving (DeleteLaunchProfile -> DeleteLaunchProfile -> Bool
(DeleteLaunchProfile -> DeleteLaunchProfile -> Bool)
-> (DeleteLaunchProfile -> DeleteLaunchProfile -> Bool)
-> Eq DeleteLaunchProfile
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]
(Int -> ReadS DeleteLaunchProfile)
-> ReadS [DeleteLaunchProfile]
-> ReadPrec DeleteLaunchProfile
-> ReadPrec [DeleteLaunchProfile]
-> Read 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
(Int -> DeleteLaunchProfile -> ShowS)
-> (DeleteLaunchProfile -> String)
-> ([DeleteLaunchProfile] -> ShowS)
-> Show DeleteLaunchProfile
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. DeleteLaunchProfile -> Rep DeleteLaunchProfile x)
-> (forall x. Rep DeleteLaunchProfile x -> DeleteLaunchProfile)
-> Generic DeleteLaunchProfile
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
pStudioId_ Text
pLaunchProfileId_ =
DeleteLaunchProfile' :: Maybe Text -> Text -> Text -> DeleteLaunchProfile
DeleteLaunchProfile'
{ $sel:clientToken:DeleteLaunchProfile' :: Maybe Text
clientToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:studioId:DeleteLaunchProfile' :: Text
studioId = Text
pStudioId_,
$sel:launchProfileId:DeleteLaunchProfile' :: Text
launchProfileId = Text
pLaunchProfileId_
}
deleteLaunchProfile_clientToken :: Lens.Lens' DeleteLaunchProfile (Prelude.Maybe Prelude.Text)
deleteLaunchProfile_clientToken :: (Maybe Text -> f (Maybe Text))
-> DeleteLaunchProfile -> f DeleteLaunchProfile
deleteLaunchProfile_clientToken = (DeleteLaunchProfile -> Maybe Text)
-> (DeleteLaunchProfile -> Maybe Text -> DeleteLaunchProfile)
-> Lens
DeleteLaunchProfile DeleteLaunchProfile (Maybe Text) (Maybe Text)
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_studioId :: Lens.Lens' DeleteLaunchProfile Prelude.Text
deleteLaunchProfile_studioId :: (Text -> f Text) -> DeleteLaunchProfile -> f DeleteLaunchProfile
deleteLaunchProfile_studioId = (DeleteLaunchProfile -> Text)
-> (DeleteLaunchProfile -> Text -> DeleteLaunchProfile)
-> Lens DeleteLaunchProfile DeleteLaunchProfile Text Text
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)
deleteLaunchProfile_launchProfileId :: Lens.Lens' DeleteLaunchProfile Prelude.Text
deleteLaunchProfile_launchProfileId :: (Text -> f Text) -> DeleteLaunchProfile -> f DeleteLaunchProfile
deleteLaunchProfile_launchProfileId = (DeleteLaunchProfile -> Text)
-> (DeleteLaunchProfile -> Text -> DeleteLaunchProfile)
-> Lens DeleteLaunchProfile DeleteLaunchProfile Text Text
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)
instance Core.AWSRequest DeleteLaunchProfile where
type
AWSResponse DeleteLaunchProfile =
DeleteLaunchProfileResponse
request :: DeleteLaunchProfile -> Request DeleteLaunchProfile
request = Service -> DeleteLaunchProfile -> Request DeleteLaunchProfile
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteLaunchProfile
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteLaunchProfile)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DeleteLaunchProfile))
-> Logger
-> Service
-> Proxy DeleteLaunchProfile
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteLaunchProfile)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe LaunchProfile -> Int -> DeleteLaunchProfileResponse
DeleteLaunchProfileResponse'
(Maybe LaunchProfile -> Int -> DeleteLaunchProfileResponse)
-> Either String (Maybe LaunchProfile)
-> Either String (Int -> DeleteLaunchProfileResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe LaunchProfile)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"launchProfile")
Either String (Int -> DeleteLaunchProfileResponse)
-> Either String Int -> Either String DeleteLaunchProfileResponse
forall (f :: * -> *) a b. Applicative f => 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 DeleteLaunchProfile
instance Prelude.NFData DeleteLaunchProfile
instance Core.ToHeaders DeleteLaunchProfile where
toHeaders :: DeleteLaunchProfile -> ResponseHeaders
toHeaders DeleteLaunchProfile' {Maybe Text
Text
launchProfileId :: Text
studioId :: Text
clientToken :: Maybe Text
$sel:launchProfileId:DeleteLaunchProfile' :: DeleteLaunchProfile -> Text
$sel:studioId:DeleteLaunchProfile' :: DeleteLaunchProfile -> Text
$sel:clientToken:DeleteLaunchProfile' :: DeleteLaunchProfile -> Maybe Text
..} =
[ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Client-Token" HeaderName -> Maybe Text -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe Text
clientToken,
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.ToPath DeleteLaunchProfile where
toPath :: DeleteLaunchProfile -> ByteString
toPath DeleteLaunchProfile' {Maybe Text
Text
launchProfileId :: Text
studioId :: Text
clientToken :: Maybe Text
$sel:launchProfileId:DeleteLaunchProfile' :: DeleteLaunchProfile -> Text
$sel:studioId:DeleteLaunchProfile' :: DeleteLaunchProfile -> Text
$sel:clientToken:DeleteLaunchProfile' :: DeleteLaunchProfile -> Maybe Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/2020-08-01/studios/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
studioId,
ByteString
"/launch-profiles/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
launchProfileId
]
instance Core.ToQuery DeleteLaunchProfile where
toQuery :: DeleteLaunchProfile -> QueryString
toQuery = QueryString -> DeleteLaunchProfile -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
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
(DeleteLaunchProfileResponse
-> DeleteLaunchProfileResponse -> Bool)
-> (DeleteLaunchProfileResponse
-> DeleteLaunchProfileResponse -> Bool)
-> Eq DeleteLaunchProfileResponse
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, ReadPrec [DeleteLaunchProfileResponse]
ReadPrec DeleteLaunchProfileResponse
Int -> ReadS DeleteLaunchProfileResponse
ReadS [DeleteLaunchProfileResponse]
(Int -> ReadS DeleteLaunchProfileResponse)
-> ReadS [DeleteLaunchProfileResponse]
-> ReadPrec DeleteLaunchProfileResponse
-> ReadPrec [DeleteLaunchProfileResponse]
-> Read DeleteLaunchProfileResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteLaunchProfileResponse]
$creadListPrec :: ReadPrec [DeleteLaunchProfileResponse]
readPrec :: ReadPrec DeleteLaunchProfileResponse
$creadPrec :: ReadPrec DeleteLaunchProfileResponse
readList :: ReadS [DeleteLaunchProfileResponse]
$creadList :: ReadS [DeleteLaunchProfileResponse]
readsPrec :: Int -> ReadS DeleteLaunchProfileResponse
$creadsPrec :: Int -> ReadS DeleteLaunchProfileResponse
Prelude.Read, Int -> DeleteLaunchProfileResponse -> ShowS
[DeleteLaunchProfileResponse] -> ShowS
DeleteLaunchProfileResponse -> String
(Int -> DeleteLaunchProfileResponse -> ShowS)
-> (DeleteLaunchProfileResponse -> String)
-> ([DeleteLaunchProfileResponse] -> ShowS)
-> Show DeleteLaunchProfileResponse
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.
DeleteLaunchProfileResponse -> Rep DeleteLaunchProfileResponse x)
-> (forall x.
Rep DeleteLaunchProfileResponse x -> DeleteLaunchProfileResponse)
-> Generic DeleteLaunchProfileResponse
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' :: Maybe LaunchProfile -> Int -> DeleteLaunchProfileResponse
DeleteLaunchProfileResponse'
{ $sel:launchProfile:DeleteLaunchProfileResponse' :: Maybe LaunchProfile
launchProfile =
Maybe LaunchProfile
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DeleteLaunchProfileResponse' :: Int
httpStatus = Int
pHttpStatus_
}
deleteLaunchProfileResponse_launchProfile :: Lens.Lens' DeleteLaunchProfileResponse (Prelude.Maybe LaunchProfile)
deleteLaunchProfileResponse_launchProfile :: (Maybe LaunchProfile -> f (Maybe LaunchProfile))
-> DeleteLaunchProfileResponse -> f DeleteLaunchProfileResponse
deleteLaunchProfileResponse_launchProfile = (DeleteLaunchProfileResponse -> Maybe LaunchProfile)
-> (DeleteLaunchProfileResponse
-> Maybe LaunchProfile -> DeleteLaunchProfileResponse)
-> Lens
DeleteLaunchProfileResponse
DeleteLaunchProfileResponse
(Maybe LaunchProfile)
(Maybe 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 :: (Int -> f Int)
-> DeleteLaunchProfileResponse -> f DeleteLaunchProfileResponse
deleteLaunchProfileResponse_httpStatus = (DeleteLaunchProfileResponse -> Int)
-> (DeleteLaunchProfileResponse
-> Int -> DeleteLaunchProfileResponse)
-> Lens
DeleteLaunchProfileResponse DeleteLaunchProfileResponse Int Int
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