{-# 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.CertificateManagerPCA.UntagCertificateAuthority
(
UntagCertificateAuthority (..),
newUntagCertificateAuthority,
untagCertificateAuthority_certificateAuthorityArn,
untagCertificateAuthority_tags,
UntagCertificateAuthorityResponse (..),
newUntagCertificateAuthorityResponse,
)
where
import Amazonka.CertificateManagerPCA.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data UntagCertificateAuthority = UntagCertificateAuthority'
{
UntagCertificateAuthority -> Text
certificateAuthorityArn :: Prelude.Text,
UntagCertificateAuthority -> NonEmpty Tag
tags :: Prelude.NonEmpty Tag
}
deriving (UntagCertificateAuthority -> UntagCertificateAuthority -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UntagCertificateAuthority -> UntagCertificateAuthority -> Bool
$c/= :: UntagCertificateAuthority -> UntagCertificateAuthority -> Bool
== :: UntagCertificateAuthority -> UntagCertificateAuthority -> Bool
$c== :: UntagCertificateAuthority -> UntagCertificateAuthority -> Bool
Prelude.Eq, ReadPrec [UntagCertificateAuthority]
ReadPrec UntagCertificateAuthority
Int -> ReadS UntagCertificateAuthority
ReadS [UntagCertificateAuthority]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UntagCertificateAuthority]
$creadListPrec :: ReadPrec [UntagCertificateAuthority]
readPrec :: ReadPrec UntagCertificateAuthority
$creadPrec :: ReadPrec UntagCertificateAuthority
readList :: ReadS [UntagCertificateAuthority]
$creadList :: ReadS [UntagCertificateAuthority]
readsPrec :: Int -> ReadS UntagCertificateAuthority
$creadsPrec :: Int -> ReadS UntagCertificateAuthority
Prelude.Read, Int -> UntagCertificateAuthority -> ShowS
[UntagCertificateAuthority] -> ShowS
UntagCertificateAuthority -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UntagCertificateAuthority] -> ShowS
$cshowList :: [UntagCertificateAuthority] -> ShowS
show :: UntagCertificateAuthority -> String
$cshow :: UntagCertificateAuthority -> String
showsPrec :: Int -> UntagCertificateAuthority -> ShowS
$cshowsPrec :: Int -> UntagCertificateAuthority -> ShowS
Prelude.Show, forall x.
Rep UntagCertificateAuthority x -> UntagCertificateAuthority
forall x.
UntagCertificateAuthority -> Rep UntagCertificateAuthority x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UntagCertificateAuthority x -> UntagCertificateAuthority
$cfrom :: forall x.
UntagCertificateAuthority -> Rep UntagCertificateAuthority x
Prelude.Generic)
newUntagCertificateAuthority ::
Prelude.Text ->
Prelude.NonEmpty Tag ->
UntagCertificateAuthority
newUntagCertificateAuthority :: Text -> NonEmpty Tag -> UntagCertificateAuthority
newUntagCertificateAuthority
Text
pCertificateAuthorityArn_
NonEmpty Tag
pTags_ =
UntagCertificateAuthority'
{ $sel:certificateAuthorityArn:UntagCertificateAuthority' :: Text
certificateAuthorityArn =
Text
pCertificateAuthorityArn_,
$sel:tags:UntagCertificateAuthority' :: NonEmpty Tag
tags = forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced forall t b. AReview t b -> b -> t
Lens.# NonEmpty Tag
pTags_
}
untagCertificateAuthority_certificateAuthorityArn :: Lens.Lens' UntagCertificateAuthority Prelude.Text
untagCertificateAuthority_certificateAuthorityArn :: Lens' UntagCertificateAuthority Text
untagCertificateAuthority_certificateAuthorityArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UntagCertificateAuthority' {Text
certificateAuthorityArn :: Text
$sel:certificateAuthorityArn:UntagCertificateAuthority' :: UntagCertificateAuthority -> Text
certificateAuthorityArn} -> Text
certificateAuthorityArn) (\s :: UntagCertificateAuthority
s@UntagCertificateAuthority' {} Text
a -> UntagCertificateAuthority
s {$sel:certificateAuthorityArn:UntagCertificateAuthority' :: Text
certificateAuthorityArn = Text
a} :: UntagCertificateAuthority)
untagCertificateAuthority_tags :: Lens.Lens' UntagCertificateAuthority (Prelude.NonEmpty Tag)
untagCertificateAuthority_tags :: Lens' UntagCertificateAuthority (NonEmpty Tag)
untagCertificateAuthority_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UntagCertificateAuthority' {NonEmpty Tag
tags :: NonEmpty Tag
$sel:tags:UntagCertificateAuthority' :: UntagCertificateAuthority -> NonEmpty Tag
tags} -> NonEmpty Tag
tags) (\s :: UntagCertificateAuthority
s@UntagCertificateAuthority' {} NonEmpty Tag
a -> UntagCertificateAuthority
s {$sel:tags:UntagCertificateAuthority' :: NonEmpty Tag
tags = NonEmpty Tag
a} :: UntagCertificateAuthority) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.AWSRequest UntagCertificateAuthority where
type
AWSResponse UntagCertificateAuthority =
UntagCertificateAuthorityResponse
request :: (Service -> Service)
-> UntagCertificateAuthority -> Request UntagCertificateAuthority
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy UntagCertificateAuthority
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UntagCertificateAuthority)))
response =
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
UntagCertificateAuthorityResponse
UntagCertificateAuthorityResponse'
instance Prelude.Hashable UntagCertificateAuthority where
hashWithSalt :: Int -> UntagCertificateAuthority -> Int
hashWithSalt Int
_salt UntagCertificateAuthority' {NonEmpty Tag
Text
tags :: NonEmpty Tag
certificateAuthorityArn :: Text
$sel:tags:UntagCertificateAuthority' :: UntagCertificateAuthority -> NonEmpty Tag
$sel:certificateAuthorityArn:UntagCertificateAuthority' :: UntagCertificateAuthority -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
certificateAuthorityArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` NonEmpty Tag
tags
instance Prelude.NFData UntagCertificateAuthority where
rnf :: UntagCertificateAuthority -> ()
rnf UntagCertificateAuthority' {NonEmpty Tag
Text
tags :: NonEmpty Tag
certificateAuthorityArn :: Text
$sel:tags:UntagCertificateAuthority' :: UntagCertificateAuthority -> NonEmpty Tag
$sel:certificateAuthorityArn:UntagCertificateAuthority' :: UntagCertificateAuthority -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
certificateAuthorityArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf NonEmpty Tag
tags
instance Data.ToHeaders UntagCertificateAuthority where
toHeaders :: UntagCertificateAuthority -> [Header]
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
forall a. ToHeader a => HeaderName -> a -> [Header]
Data.=# ( ByteString
"ACMPrivateCA.UntagCertificateAuthority" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> [Header]
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON UntagCertificateAuthority where
toJSON :: UntagCertificateAuthority -> Value
toJSON UntagCertificateAuthority' {NonEmpty Tag
Text
tags :: NonEmpty Tag
certificateAuthorityArn :: Text
$sel:tags:UntagCertificateAuthority' :: UntagCertificateAuthority -> NonEmpty Tag
$sel:certificateAuthorityArn:UntagCertificateAuthority' :: UntagCertificateAuthority -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just
( Key
"CertificateAuthorityArn"
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
certificateAuthorityArn
),
forall a. a -> Maybe a
Prelude.Just (Key
"Tags" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= NonEmpty Tag
tags)
]
)
instance Data.ToPath UntagCertificateAuthority where
toPath :: UntagCertificateAuthority -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery UntagCertificateAuthority where
toQuery :: UntagCertificateAuthority -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data UntagCertificateAuthorityResponse = UntagCertificateAuthorityResponse'
{
}
deriving (UntagCertificateAuthorityResponse
-> UntagCertificateAuthorityResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UntagCertificateAuthorityResponse
-> UntagCertificateAuthorityResponse -> Bool
$c/= :: UntagCertificateAuthorityResponse
-> UntagCertificateAuthorityResponse -> Bool
== :: UntagCertificateAuthorityResponse
-> UntagCertificateAuthorityResponse -> Bool
$c== :: UntagCertificateAuthorityResponse
-> UntagCertificateAuthorityResponse -> Bool
Prelude.Eq, ReadPrec [UntagCertificateAuthorityResponse]
ReadPrec UntagCertificateAuthorityResponse
Int -> ReadS UntagCertificateAuthorityResponse
ReadS [UntagCertificateAuthorityResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UntagCertificateAuthorityResponse]
$creadListPrec :: ReadPrec [UntagCertificateAuthorityResponse]
readPrec :: ReadPrec UntagCertificateAuthorityResponse
$creadPrec :: ReadPrec UntagCertificateAuthorityResponse
readList :: ReadS [UntagCertificateAuthorityResponse]
$creadList :: ReadS [UntagCertificateAuthorityResponse]
readsPrec :: Int -> ReadS UntagCertificateAuthorityResponse
$creadsPrec :: Int -> ReadS UntagCertificateAuthorityResponse
Prelude.Read, Int -> UntagCertificateAuthorityResponse -> ShowS
[UntagCertificateAuthorityResponse] -> ShowS
UntagCertificateAuthorityResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UntagCertificateAuthorityResponse] -> ShowS
$cshowList :: [UntagCertificateAuthorityResponse] -> ShowS
show :: UntagCertificateAuthorityResponse -> String
$cshow :: UntagCertificateAuthorityResponse -> String
showsPrec :: Int -> UntagCertificateAuthorityResponse -> ShowS
$cshowsPrec :: Int -> UntagCertificateAuthorityResponse -> ShowS
Prelude.Show, forall x.
Rep UntagCertificateAuthorityResponse x
-> UntagCertificateAuthorityResponse
forall x.
UntagCertificateAuthorityResponse
-> Rep UntagCertificateAuthorityResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UntagCertificateAuthorityResponse x
-> UntagCertificateAuthorityResponse
$cfrom :: forall x.
UntagCertificateAuthorityResponse
-> Rep UntagCertificateAuthorityResponse x
Prelude.Generic)
newUntagCertificateAuthorityResponse ::
UntagCertificateAuthorityResponse
newUntagCertificateAuthorityResponse :: UntagCertificateAuthorityResponse
newUntagCertificateAuthorityResponse =
UntagCertificateAuthorityResponse
UntagCertificateAuthorityResponse'
instance
Prelude.NFData
UntagCertificateAuthorityResponse
where
rnf :: UntagCertificateAuthorityResponse -> ()
rnf UntagCertificateAuthorityResponse
_ = ()