{-# 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.AppConfig.DeleteHostedConfigurationVersion
(
DeleteHostedConfigurationVersion (..),
newDeleteHostedConfigurationVersion,
deleteHostedConfigurationVersion_applicationId,
deleteHostedConfigurationVersion_configurationProfileId,
deleteHostedConfigurationVersion_versionNumber,
DeleteHostedConfigurationVersionResponse (..),
newDeleteHostedConfigurationVersionResponse,
)
where
import Amazonka.AppConfig.Types
import qualified Amazonka.Core as Core
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 DeleteHostedConfigurationVersion = DeleteHostedConfigurationVersion'
{
DeleteHostedConfigurationVersion -> Text
applicationId :: Prelude.Text,
DeleteHostedConfigurationVersion -> Text
configurationProfileId :: Prelude.Text,
DeleteHostedConfigurationVersion -> Int
versionNumber :: Prelude.Int
}
deriving (DeleteHostedConfigurationVersion
-> DeleteHostedConfigurationVersion -> Bool
(DeleteHostedConfigurationVersion
-> DeleteHostedConfigurationVersion -> Bool)
-> (DeleteHostedConfigurationVersion
-> DeleteHostedConfigurationVersion -> Bool)
-> Eq DeleteHostedConfigurationVersion
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteHostedConfigurationVersion
-> DeleteHostedConfigurationVersion -> Bool
$c/= :: DeleteHostedConfigurationVersion
-> DeleteHostedConfigurationVersion -> Bool
== :: DeleteHostedConfigurationVersion
-> DeleteHostedConfigurationVersion -> Bool
$c== :: DeleteHostedConfigurationVersion
-> DeleteHostedConfigurationVersion -> Bool
Prelude.Eq, ReadPrec [DeleteHostedConfigurationVersion]
ReadPrec DeleteHostedConfigurationVersion
Int -> ReadS DeleteHostedConfigurationVersion
ReadS [DeleteHostedConfigurationVersion]
(Int -> ReadS DeleteHostedConfigurationVersion)
-> ReadS [DeleteHostedConfigurationVersion]
-> ReadPrec DeleteHostedConfigurationVersion
-> ReadPrec [DeleteHostedConfigurationVersion]
-> Read DeleteHostedConfigurationVersion
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteHostedConfigurationVersion]
$creadListPrec :: ReadPrec [DeleteHostedConfigurationVersion]
readPrec :: ReadPrec DeleteHostedConfigurationVersion
$creadPrec :: ReadPrec DeleteHostedConfigurationVersion
readList :: ReadS [DeleteHostedConfigurationVersion]
$creadList :: ReadS [DeleteHostedConfigurationVersion]
readsPrec :: Int -> ReadS DeleteHostedConfigurationVersion
$creadsPrec :: Int -> ReadS DeleteHostedConfigurationVersion
Prelude.Read, Int -> DeleteHostedConfigurationVersion -> ShowS
[DeleteHostedConfigurationVersion] -> ShowS
DeleteHostedConfigurationVersion -> String
(Int -> DeleteHostedConfigurationVersion -> ShowS)
-> (DeleteHostedConfigurationVersion -> String)
-> ([DeleteHostedConfigurationVersion] -> ShowS)
-> Show DeleteHostedConfigurationVersion
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteHostedConfigurationVersion] -> ShowS
$cshowList :: [DeleteHostedConfigurationVersion] -> ShowS
show :: DeleteHostedConfigurationVersion -> String
$cshow :: DeleteHostedConfigurationVersion -> String
showsPrec :: Int -> DeleteHostedConfigurationVersion -> ShowS
$cshowsPrec :: Int -> DeleteHostedConfigurationVersion -> ShowS
Prelude.Show, (forall x.
DeleteHostedConfigurationVersion
-> Rep DeleteHostedConfigurationVersion x)
-> (forall x.
Rep DeleteHostedConfigurationVersion x
-> DeleteHostedConfigurationVersion)
-> Generic DeleteHostedConfigurationVersion
forall x.
Rep DeleteHostedConfigurationVersion x
-> DeleteHostedConfigurationVersion
forall x.
DeleteHostedConfigurationVersion
-> Rep DeleteHostedConfigurationVersion x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteHostedConfigurationVersion x
-> DeleteHostedConfigurationVersion
$cfrom :: forall x.
DeleteHostedConfigurationVersion
-> Rep DeleteHostedConfigurationVersion x
Prelude.Generic)
newDeleteHostedConfigurationVersion ::
Prelude.Text ->
Prelude.Text ->
Prelude.Int ->
DeleteHostedConfigurationVersion
newDeleteHostedConfigurationVersion :: Text -> Text -> Int -> DeleteHostedConfigurationVersion
newDeleteHostedConfigurationVersion
Text
pApplicationId_
Text
pConfigurationProfileId_
Int
pVersionNumber_ =
DeleteHostedConfigurationVersion' :: Text -> Text -> Int -> DeleteHostedConfigurationVersion
DeleteHostedConfigurationVersion'
{ $sel:applicationId:DeleteHostedConfigurationVersion' :: Text
applicationId =
Text
pApplicationId_,
$sel:configurationProfileId:DeleteHostedConfigurationVersion' :: Text
configurationProfileId =
Text
pConfigurationProfileId_,
$sel:versionNumber:DeleteHostedConfigurationVersion' :: Int
versionNumber = Int
pVersionNumber_
}
deleteHostedConfigurationVersion_applicationId :: Lens.Lens' DeleteHostedConfigurationVersion Prelude.Text
deleteHostedConfigurationVersion_applicationId :: (Text -> f Text)
-> DeleteHostedConfigurationVersion
-> f DeleteHostedConfigurationVersion
deleteHostedConfigurationVersion_applicationId = (DeleteHostedConfigurationVersion -> Text)
-> (DeleteHostedConfigurationVersion
-> Text -> DeleteHostedConfigurationVersion)
-> Lens
DeleteHostedConfigurationVersion
DeleteHostedConfigurationVersion
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteHostedConfigurationVersion' {Text
applicationId :: Text
$sel:applicationId:DeleteHostedConfigurationVersion' :: DeleteHostedConfigurationVersion -> Text
applicationId} -> Text
applicationId) (\s :: DeleteHostedConfigurationVersion
s@DeleteHostedConfigurationVersion' {} Text
a -> DeleteHostedConfigurationVersion
s {$sel:applicationId:DeleteHostedConfigurationVersion' :: Text
applicationId = Text
a} :: DeleteHostedConfigurationVersion)
deleteHostedConfigurationVersion_configurationProfileId :: Lens.Lens' DeleteHostedConfigurationVersion Prelude.Text
deleteHostedConfigurationVersion_configurationProfileId :: (Text -> f Text)
-> DeleteHostedConfigurationVersion
-> f DeleteHostedConfigurationVersion
deleteHostedConfigurationVersion_configurationProfileId = (DeleteHostedConfigurationVersion -> Text)
-> (DeleteHostedConfigurationVersion
-> Text -> DeleteHostedConfigurationVersion)
-> Lens
DeleteHostedConfigurationVersion
DeleteHostedConfigurationVersion
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteHostedConfigurationVersion' {Text
configurationProfileId :: Text
$sel:configurationProfileId:DeleteHostedConfigurationVersion' :: DeleteHostedConfigurationVersion -> Text
configurationProfileId} -> Text
configurationProfileId) (\s :: DeleteHostedConfigurationVersion
s@DeleteHostedConfigurationVersion' {} Text
a -> DeleteHostedConfigurationVersion
s {$sel:configurationProfileId:DeleteHostedConfigurationVersion' :: Text
configurationProfileId = Text
a} :: DeleteHostedConfigurationVersion)
deleteHostedConfigurationVersion_versionNumber :: Lens.Lens' DeleteHostedConfigurationVersion Prelude.Int
deleteHostedConfigurationVersion_versionNumber :: (Int -> f Int)
-> DeleteHostedConfigurationVersion
-> f DeleteHostedConfigurationVersion
deleteHostedConfigurationVersion_versionNumber = (DeleteHostedConfigurationVersion -> Int)
-> (DeleteHostedConfigurationVersion
-> Int -> DeleteHostedConfigurationVersion)
-> Lens
DeleteHostedConfigurationVersion
DeleteHostedConfigurationVersion
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteHostedConfigurationVersion' {Int
versionNumber :: Int
$sel:versionNumber:DeleteHostedConfigurationVersion' :: DeleteHostedConfigurationVersion -> Int
versionNumber} -> Int
versionNumber) (\s :: DeleteHostedConfigurationVersion
s@DeleteHostedConfigurationVersion' {} Int
a -> DeleteHostedConfigurationVersion
s {$sel:versionNumber:DeleteHostedConfigurationVersion' :: Int
versionNumber = Int
a} :: DeleteHostedConfigurationVersion)
instance
Core.AWSRequest
DeleteHostedConfigurationVersion
where
type
AWSResponse DeleteHostedConfigurationVersion =
DeleteHostedConfigurationVersionResponse
request :: DeleteHostedConfigurationVersion
-> Request DeleteHostedConfigurationVersion
request = Service
-> DeleteHostedConfigurationVersion
-> Request DeleteHostedConfigurationVersion
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteHostedConfigurationVersion
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse DeleteHostedConfigurationVersion)))
response =
AWSResponse DeleteHostedConfigurationVersion
-> Logger
-> Service
-> Proxy DeleteHostedConfigurationVersion
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse DeleteHostedConfigurationVersion)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
AWSResponse DeleteHostedConfigurationVersion
DeleteHostedConfigurationVersionResponse
DeleteHostedConfigurationVersionResponse'
instance
Prelude.Hashable
DeleteHostedConfigurationVersion
instance
Prelude.NFData
DeleteHostedConfigurationVersion
instance
Core.ToHeaders
DeleteHostedConfigurationVersion
where
toHeaders :: DeleteHostedConfigurationVersion -> [Header]
toHeaders =
[Header] -> DeleteHostedConfigurationVersion -> [Header]
forall a b. a -> b -> a
Prelude.const
( [[Header]] -> [Header]
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ 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.ToPath DeleteHostedConfigurationVersion where
toPath :: DeleteHostedConfigurationVersion -> ByteString
toPath DeleteHostedConfigurationVersion' {Int
Text
versionNumber :: Int
configurationProfileId :: Text
applicationId :: Text
$sel:versionNumber:DeleteHostedConfigurationVersion' :: DeleteHostedConfigurationVersion -> Int
$sel:configurationProfileId:DeleteHostedConfigurationVersion' :: DeleteHostedConfigurationVersion -> Text
$sel:applicationId:DeleteHostedConfigurationVersion' :: DeleteHostedConfigurationVersion -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/applications/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
applicationId,
ByteString
"/configurationprofiles/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
configurationProfileId,
ByteString
"/hostedconfigurationversions/",
Int -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Int
versionNumber
]
instance
Core.ToQuery
DeleteHostedConfigurationVersion
where
toQuery :: DeleteHostedConfigurationVersion -> QueryString
toQuery = QueryString -> DeleteHostedConfigurationVersion -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteHostedConfigurationVersionResponse = DeleteHostedConfigurationVersionResponse'
{
}
deriving (DeleteHostedConfigurationVersionResponse
-> DeleteHostedConfigurationVersionResponse -> Bool
(DeleteHostedConfigurationVersionResponse
-> DeleteHostedConfigurationVersionResponse -> Bool)
-> (DeleteHostedConfigurationVersionResponse
-> DeleteHostedConfigurationVersionResponse -> Bool)
-> Eq DeleteHostedConfigurationVersionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteHostedConfigurationVersionResponse
-> DeleteHostedConfigurationVersionResponse -> Bool
$c/= :: DeleteHostedConfigurationVersionResponse
-> DeleteHostedConfigurationVersionResponse -> Bool
== :: DeleteHostedConfigurationVersionResponse
-> DeleteHostedConfigurationVersionResponse -> Bool
$c== :: DeleteHostedConfigurationVersionResponse
-> DeleteHostedConfigurationVersionResponse -> Bool
Prelude.Eq, ReadPrec [DeleteHostedConfigurationVersionResponse]
ReadPrec DeleteHostedConfigurationVersionResponse
Int -> ReadS DeleteHostedConfigurationVersionResponse
ReadS [DeleteHostedConfigurationVersionResponse]
(Int -> ReadS DeleteHostedConfigurationVersionResponse)
-> ReadS [DeleteHostedConfigurationVersionResponse]
-> ReadPrec DeleteHostedConfigurationVersionResponse
-> ReadPrec [DeleteHostedConfigurationVersionResponse]
-> Read DeleteHostedConfigurationVersionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteHostedConfigurationVersionResponse]
$creadListPrec :: ReadPrec [DeleteHostedConfigurationVersionResponse]
readPrec :: ReadPrec DeleteHostedConfigurationVersionResponse
$creadPrec :: ReadPrec DeleteHostedConfigurationVersionResponse
readList :: ReadS [DeleteHostedConfigurationVersionResponse]
$creadList :: ReadS [DeleteHostedConfigurationVersionResponse]
readsPrec :: Int -> ReadS DeleteHostedConfigurationVersionResponse
$creadsPrec :: Int -> ReadS DeleteHostedConfigurationVersionResponse
Prelude.Read, Int -> DeleteHostedConfigurationVersionResponse -> ShowS
[DeleteHostedConfigurationVersionResponse] -> ShowS
DeleteHostedConfigurationVersionResponse -> String
(Int -> DeleteHostedConfigurationVersionResponse -> ShowS)
-> (DeleteHostedConfigurationVersionResponse -> String)
-> ([DeleteHostedConfigurationVersionResponse] -> ShowS)
-> Show DeleteHostedConfigurationVersionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteHostedConfigurationVersionResponse] -> ShowS
$cshowList :: [DeleteHostedConfigurationVersionResponse] -> ShowS
show :: DeleteHostedConfigurationVersionResponse -> String
$cshow :: DeleteHostedConfigurationVersionResponse -> String
showsPrec :: Int -> DeleteHostedConfigurationVersionResponse -> ShowS
$cshowsPrec :: Int -> DeleteHostedConfigurationVersionResponse -> ShowS
Prelude.Show, (forall x.
DeleteHostedConfigurationVersionResponse
-> Rep DeleteHostedConfigurationVersionResponse x)
-> (forall x.
Rep DeleteHostedConfigurationVersionResponse x
-> DeleteHostedConfigurationVersionResponse)
-> Generic DeleteHostedConfigurationVersionResponse
forall x.
Rep DeleteHostedConfigurationVersionResponse x
-> DeleteHostedConfigurationVersionResponse
forall x.
DeleteHostedConfigurationVersionResponse
-> Rep DeleteHostedConfigurationVersionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteHostedConfigurationVersionResponse x
-> DeleteHostedConfigurationVersionResponse
$cfrom :: forall x.
DeleteHostedConfigurationVersionResponse
-> Rep DeleteHostedConfigurationVersionResponse x
Prelude.Generic)
newDeleteHostedConfigurationVersionResponse ::
DeleteHostedConfigurationVersionResponse
newDeleteHostedConfigurationVersionResponse :: DeleteHostedConfigurationVersionResponse
newDeleteHostedConfigurationVersionResponse =
DeleteHostedConfigurationVersionResponse
DeleteHostedConfigurationVersionResponse'
instance
Prelude.NFData
DeleteHostedConfigurationVersionResponse