{-# 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.GroundStation.DeleteMissionProfile
(
DeleteMissionProfile (..),
newDeleteMissionProfile,
deleteMissionProfile_missionProfileId,
MissionProfileIdResponse (..),
newMissionProfileIdResponse,
missionProfileIdResponse_missionProfileId,
)
where
import qualified Amazonka.Core as Core
import Amazonka.GroundStation.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 DeleteMissionProfile = DeleteMissionProfile'
{
DeleteMissionProfile -> Text
missionProfileId :: Prelude.Text
}
deriving (DeleteMissionProfile -> DeleteMissionProfile -> Bool
(DeleteMissionProfile -> DeleteMissionProfile -> Bool)
-> (DeleteMissionProfile -> DeleteMissionProfile -> Bool)
-> Eq DeleteMissionProfile
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteMissionProfile -> DeleteMissionProfile -> Bool
$c/= :: DeleteMissionProfile -> DeleteMissionProfile -> Bool
== :: DeleteMissionProfile -> DeleteMissionProfile -> Bool
$c== :: DeleteMissionProfile -> DeleteMissionProfile -> Bool
Prelude.Eq, ReadPrec [DeleteMissionProfile]
ReadPrec DeleteMissionProfile
Int -> ReadS DeleteMissionProfile
ReadS [DeleteMissionProfile]
(Int -> ReadS DeleteMissionProfile)
-> ReadS [DeleteMissionProfile]
-> ReadPrec DeleteMissionProfile
-> ReadPrec [DeleteMissionProfile]
-> Read DeleteMissionProfile
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteMissionProfile]
$creadListPrec :: ReadPrec [DeleteMissionProfile]
readPrec :: ReadPrec DeleteMissionProfile
$creadPrec :: ReadPrec DeleteMissionProfile
readList :: ReadS [DeleteMissionProfile]
$creadList :: ReadS [DeleteMissionProfile]
readsPrec :: Int -> ReadS DeleteMissionProfile
$creadsPrec :: Int -> ReadS DeleteMissionProfile
Prelude.Read, Int -> DeleteMissionProfile -> ShowS
[DeleteMissionProfile] -> ShowS
DeleteMissionProfile -> String
(Int -> DeleteMissionProfile -> ShowS)
-> (DeleteMissionProfile -> String)
-> ([DeleteMissionProfile] -> ShowS)
-> Show DeleteMissionProfile
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteMissionProfile] -> ShowS
$cshowList :: [DeleteMissionProfile] -> ShowS
show :: DeleteMissionProfile -> String
$cshow :: DeleteMissionProfile -> String
showsPrec :: Int -> DeleteMissionProfile -> ShowS
$cshowsPrec :: Int -> DeleteMissionProfile -> ShowS
Prelude.Show, (forall x. DeleteMissionProfile -> Rep DeleteMissionProfile x)
-> (forall x. Rep DeleteMissionProfile x -> DeleteMissionProfile)
-> Generic DeleteMissionProfile
forall x. Rep DeleteMissionProfile x -> DeleteMissionProfile
forall x. DeleteMissionProfile -> Rep DeleteMissionProfile x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteMissionProfile x -> DeleteMissionProfile
$cfrom :: forall x. DeleteMissionProfile -> Rep DeleteMissionProfile x
Prelude.Generic)
newDeleteMissionProfile ::
Prelude.Text ->
DeleteMissionProfile
newDeleteMissionProfile :: Text -> DeleteMissionProfile
newDeleteMissionProfile Text
pMissionProfileId_ =
DeleteMissionProfile' :: Text -> DeleteMissionProfile
DeleteMissionProfile'
{ $sel:missionProfileId:DeleteMissionProfile' :: Text
missionProfileId =
Text
pMissionProfileId_
}
deleteMissionProfile_missionProfileId :: Lens.Lens' DeleteMissionProfile Prelude.Text
deleteMissionProfile_missionProfileId :: (Text -> f Text) -> DeleteMissionProfile -> f DeleteMissionProfile
deleteMissionProfile_missionProfileId = (DeleteMissionProfile -> Text)
-> (DeleteMissionProfile -> Text -> DeleteMissionProfile)
-> Lens DeleteMissionProfile DeleteMissionProfile Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteMissionProfile' {Text
missionProfileId :: Text
$sel:missionProfileId:DeleteMissionProfile' :: DeleteMissionProfile -> Text
missionProfileId} -> Text
missionProfileId) (\s :: DeleteMissionProfile
s@DeleteMissionProfile' {} Text
a -> DeleteMissionProfile
s {$sel:missionProfileId:DeleteMissionProfile' :: Text
missionProfileId = Text
a} :: DeleteMissionProfile)
instance Core.AWSRequest DeleteMissionProfile where
type
AWSResponse DeleteMissionProfile =
MissionProfileIdResponse
request :: DeleteMissionProfile -> Request DeleteMissionProfile
request = Service -> DeleteMissionProfile -> Request DeleteMissionProfile
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteMissionProfile
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteMissionProfile)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DeleteMissionProfile))
-> Logger
-> Service
-> Proxy DeleteMissionProfile
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteMissionProfile)))
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 -> Object -> Either String MissionProfileIdResponse
forall a. FromJSON a => Object -> Either String a
Core.eitherParseJSON Object
x)
instance Prelude.Hashable DeleteMissionProfile
instance Prelude.NFData DeleteMissionProfile
instance Core.ToHeaders DeleteMissionProfile where
toHeaders :: DeleteMissionProfile -> ResponseHeaders
toHeaders =
ResponseHeaders -> DeleteMissionProfile -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ 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 DeleteMissionProfile where
toPath :: DeleteMissionProfile -> ByteString
toPath DeleteMissionProfile' {Text
missionProfileId :: Text
$sel:missionProfileId:DeleteMissionProfile' :: DeleteMissionProfile -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/missionprofile/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
missionProfileId]
instance Core.ToQuery DeleteMissionProfile where
toQuery :: DeleteMissionProfile -> QueryString
toQuery = QueryString -> DeleteMissionProfile -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty