{-# 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.Lens as Lens
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
(UntagCertificateAuthority -> UntagCertificateAuthority -> Bool)
-> (UntagCertificateAuthority -> UntagCertificateAuthority -> Bool)
-> Eq UntagCertificateAuthority
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]
(Int -> ReadS UntagCertificateAuthority)
-> ReadS [UntagCertificateAuthority]
-> ReadPrec UntagCertificateAuthority
-> ReadPrec [UntagCertificateAuthority]
-> Read 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
(Int -> UntagCertificateAuthority -> ShowS)
-> (UntagCertificateAuthority -> String)
-> ([UntagCertificateAuthority] -> ShowS)
-> Show UntagCertificateAuthority
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.
UntagCertificateAuthority -> Rep UntagCertificateAuthority x)
-> (forall x.
Rep UntagCertificateAuthority x -> UntagCertificateAuthority)
-> Generic UntagCertificateAuthority
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' :: Text -> NonEmpty Tag -> UntagCertificateAuthority
UntagCertificateAuthority'
{ $sel:certificateAuthorityArn:UntagCertificateAuthority' :: Text
certificateAuthorityArn =
Text
pCertificateAuthorityArn_,
$sel:tags:UntagCertificateAuthority' :: NonEmpty Tag
tags = Tagged (NonEmpty Tag) (Identity (NonEmpty Tag))
-> Tagged (NonEmpty Tag) (Identity (NonEmpty Tag))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced (Tagged (NonEmpty Tag) (Identity (NonEmpty Tag))
-> Tagged (NonEmpty Tag) (Identity (NonEmpty Tag)))
-> NonEmpty Tag -> NonEmpty Tag
forall t b. AReview t b -> b -> t
Lens.# NonEmpty Tag
pTags_
}
untagCertificateAuthority_certificateAuthorityArn :: Lens.Lens' UntagCertificateAuthority Prelude.Text
untagCertificateAuthority_certificateAuthorityArn :: (Text -> f Text)
-> UntagCertificateAuthority -> f UntagCertificateAuthority
untagCertificateAuthority_certificateAuthorityArn = (UntagCertificateAuthority -> Text)
-> (UntagCertificateAuthority -> Text -> UntagCertificateAuthority)
-> Lens
UntagCertificateAuthority UntagCertificateAuthority Text Text
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 :: (NonEmpty Tag -> f (NonEmpty Tag))
-> UntagCertificateAuthority -> f UntagCertificateAuthority
untagCertificateAuthority_tags = (UntagCertificateAuthority -> NonEmpty Tag)
-> (UntagCertificateAuthority
-> NonEmpty Tag -> UntagCertificateAuthority)
-> Lens
UntagCertificateAuthority
UntagCertificateAuthority
(NonEmpty Tag)
(NonEmpty Tag)
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) ((NonEmpty Tag -> f (NonEmpty Tag))
-> UntagCertificateAuthority -> f UntagCertificateAuthority)
-> ((NonEmpty Tag -> f (NonEmpty Tag))
-> NonEmpty Tag -> f (NonEmpty Tag))
-> (NonEmpty Tag -> f (NonEmpty Tag))
-> UntagCertificateAuthority
-> f UntagCertificateAuthority
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (NonEmpty Tag -> f (NonEmpty Tag))
-> NonEmpty Tag -> f (NonEmpty Tag)
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 :: UntagCertificateAuthority -> Request UntagCertificateAuthority
request = Service
-> UntagCertificateAuthority -> Request UntagCertificateAuthority
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy UntagCertificateAuthority
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UntagCertificateAuthority)))
response =
AWSResponse UntagCertificateAuthority
-> Logger
-> Service
-> Proxy UntagCertificateAuthority
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UntagCertificateAuthority)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
AWSResponse UntagCertificateAuthority
UntagCertificateAuthorityResponse
UntagCertificateAuthorityResponse'
instance Prelude.Hashable UntagCertificateAuthority
instance Prelude.NFData UntagCertificateAuthority
instance Core.ToHeaders UntagCertificateAuthority where
toHeaders :: UntagCertificateAuthority -> [Header]
toHeaders =
[Header] -> UntagCertificateAuthority -> [Header]
forall a b. a -> b -> a
Prelude.const
( [[Header]] -> [Header]
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# ( ByteString
"ACMPrivateCA.UntagCertificateAuthority" ::
Prelude.ByteString
),
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.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
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"CertificateAuthorityArn"
Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
certificateAuthorityArn
),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Tags" Text -> NonEmpty Tag -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= NonEmpty Tag
tags)
]
)
instance Core.ToPath UntagCertificateAuthority where
toPath :: UntagCertificateAuthority -> ByteString
toPath = ByteString -> UntagCertificateAuthority -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery UntagCertificateAuthority where
toQuery :: UntagCertificateAuthority -> QueryString
toQuery = QueryString -> UntagCertificateAuthority -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data UntagCertificateAuthorityResponse = UntagCertificateAuthorityResponse'
{
}
deriving (UntagCertificateAuthorityResponse
-> UntagCertificateAuthorityResponse -> Bool
(UntagCertificateAuthorityResponse
-> UntagCertificateAuthorityResponse -> Bool)
-> (UntagCertificateAuthorityResponse
-> UntagCertificateAuthorityResponse -> Bool)
-> Eq UntagCertificateAuthorityResponse
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]
(Int -> ReadS UntagCertificateAuthorityResponse)
-> ReadS [UntagCertificateAuthorityResponse]
-> ReadPrec UntagCertificateAuthorityResponse
-> ReadPrec [UntagCertificateAuthorityResponse]
-> Read 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
(Int -> UntagCertificateAuthorityResponse -> ShowS)
-> (UntagCertificateAuthorityResponse -> String)
-> ([UntagCertificateAuthorityResponse] -> ShowS)
-> Show UntagCertificateAuthorityResponse
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.
UntagCertificateAuthorityResponse
-> Rep UntagCertificateAuthorityResponse x)
-> (forall x.
Rep UntagCertificateAuthorityResponse x
-> UntagCertificateAuthorityResponse)
-> Generic UntagCertificateAuthorityResponse
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