{-# 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.CertificateManager.RemoveTagsFromCertificate
(
RemoveTagsFromCertificate (..),
newRemoveTagsFromCertificate,
removeTagsFromCertificate_certificateArn,
removeTagsFromCertificate_tags,
RemoveTagsFromCertificateResponse (..),
newRemoveTagsFromCertificateResponse,
)
where
import Amazonka.CertificateManager.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 RemoveTagsFromCertificate = RemoveTagsFromCertificate'
{
RemoveTagsFromCertificate -> Text
certificateArn :: Prelude.Text,
RemoveTagsFromCertificate -> NonEmpty Tag
tags :: Prelude.NonEmpty Tag
}
deriving (RemoveTagsFromCertificate -> RemoveTagsFromCertificate -> Bool
(RemoveTagsFromCertificate -> RemoveTagsFromCertificate -> Bool)
-> (RemoveTagsFromCertificate -> RemoveTagsFromCertificate -> Bool)
-> Eq RemoveTagsFromCertificate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RemoveTagsFromCertificate -> RemoveTagsFromCertificate -> Bool
$c/= :: RemoveTagsFromCertificate -> RemoveTagsFromCertificate -> Bool
== :: RemoveTagsFromCertificate -> RemoveTagsFromCertificate -> Bool
$c== :: RemoveTagsFromCertificate -> RemoveTagsFromCertificate -> Bool
Prelude.Eq, ReadPrec [RemoveTagsFromCertificate]
ReadPrec RemoveTagsFromCertificate
Int -> ReadS RemoveTagsFromCertificate
ReadS [RemoveTagsFromCertificate]
(Int -> ReadS RemoveTagsFromCertificate)
-> ReadS [RemoveTagsFromCertificate]
-> ReadPrec RemoveTagsFromCertificate
-> ReadPrec [RemoveTagsFromCertificate]
-> Read RemoveTagsFromCertificate
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RemoveTagsFromCertificate]
$creadListPrec :: ReadPrec [RemoveTagsFromCertificate]
readPrec :: ReadPrec RemoveTagsFromCertificate
$creadPrec :: ReadPrec RemoveTagsFromCertificate
readList :: ReadS [RemoveTagsFromCertificate]
$creadList :: ReadS [RemoveTagsFromCertificate]
readsPrec :: Int -> ReadS RemoveTagsFromCertificate
$creadsPrec :: Int -> ReadS RemoveTagsFromCertificate
Prelude.Read, Int -> RemoveTagsFromCertificate -> ShowS
[RemoveTagsFromCertificate] -> ShowS
RemoveTagsFromCertificate -> String
(Int -> RemoveTagsFromCertificate -> ShowS)
-> (RemoveTagsFromCertificate -> String)
-> ([RemoveTagsFromCertificate] -> ShowS)
-> Show RemoveTagsFromCertificate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RemoveTagsFromCertificate] -> ShowS
$cshowList :: [RemoveTagsFromCertificate] -> ShowS
show :: RemoveTagsFromCertificate -> String
$cshow :: RemoveTagsFromCertificate -> String
showsPrec :: Int -> RemoveTagsFromCertificate -> ShowS
$cshowsPrec :: Int -> RemoveTagsFromCertificate -> ShowS
Prelude.Show, (forall x.
RemoveTagsFromCertificate -> Rep RemoveTagsFromCertificate x)
-> (forall x.
Rep RemoveTagsFromCertificate x -> RemoveTagsFromCertificate)
-> Generic RemoveTagsFromCertificate
forall x.
Rep RemoveTagsFromCertificate x -> RemoveTagsFromCertificate
forall x.
RemoveTagsFromCertificate -> Rep RemoveTagsFromCertificate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RemoveTagsFromCertificate x -> RemoveTagsFromCertificate
$cfrom :: forall x.
RemoveTagsFromCertificate -> Rep RemoveTagsFromCertificate x
Prelude.Generic)
newRemoveTagsFromCertificate ::
Prelude.Text ->
Prelude.NonEmpty Tag ->
RemoveTagsFromCertificate
newRemoveTagsFromCertificate :: Text -> NonEmpty Tag -> RemoveTagsFromCertificate
newRemoveTagsFromCertificate Text
pCertificateArn_ NonEmpty Tag
pTags_ =
RemoveTagsFromCertificate' :: Text -> NonEmpty Tag -> RemoveTagsFromCertificate
RemoveTagsFromCertificate'
{ $sel:certificateArn:RemoveTagsFromCertificate' :: Text
certificateArn =
Text
pCertificateArn_,
$sel:tags:RemoveTagsFromCertificate' :: 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_
}
removeTagsFromCertificate_certificateArn :: Lens.Lens' RemoveTagsFromCertificate Prelude.Text
removeTagsFromCertificate_certificateArn :: (Text -> f Text)
-> RemoveTagsFromCertificate -> f RemoveTagsFromCertificate
removeTagsFromCertificate_certificateArn = (RemoveTagsFromCertificate -> Text)
-> (RemoveTagsFromCertificate -> Text -> RemoveTagsFromCertificate)
-> Lens
RemoveTagsFromCertificate RemoveTagsFromCertificate Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemoveTagsFromCertificate' {Text
certificateArn :: Text
$sel:certificateArn:RemoveTagsFromCertificate' :: RemoveTagsFromCertificate -> Text
certificateArn} -> Text
certificateArn) (\s :: RemoveTagsFromCertificate
s@RemoveTagsFromCertificate' {} Text
a -> RemoveTagsFromCertificate
s {$sel:certificateArn:RemoveTagsFromCertificate' :: Text
certificateArn = Text
a} :: RemoveTagsFromCertificate)
removeTagsFromCertificate_tags :: Lens.Lens' RemoveTagsFromCertificate (Prelude.NonEmpty Tag)
removeTagsFromCertificate_tags :: (NonEmpty Tag -> f (NonEmpty Tag))
-> RemoveTagsFromCertificate -> f RemoveTagsFromCertificate
removeTagsFromCertificate_tags = (RemoveTagsFromCertificate -> NonEmpty Tag)
-> (RemoveTagsFromCertificate
-> NonEmpty Tag -> RemoveTagsFromCertificate)
-> Lens
RemoveTagsFromCertificate
RemoveTagsFromCertificate
(NonEmpty Tag)
(NonEmpty Tag)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemoveTagsFromCertificate' {NonEmpty Tag
tags :: NonEmpty Tag
$sel:tags:RemoveTagsFromCertificate' :: RemoveTagsFromCertificate -> NonEmpty Tag
tags} -> NonEmpty Tag
tags) (\s :: RemoveTagsFromCertificate
s@RemoveTagsFromCertificate' {} NonEmpty Tag
a -> RemoveTagsFromCertificate
s {$sel:tags:RemoveTagsFromCertificate' :: NonEmpty Tag
tags = NonEmpty Tag
a} :: RemoveTagsFromCertificate) ((NonEmpty Tag -> f (NonEmpty Tag))
-> RemoveTagsFromCertificate -> f RemoveTagsFromCertificate)
-> ((NonEmpty Tag -> f (NonEmpty Tag))
-> NonEmpty Tag -> f (NonEmpty Tag))
-> (NonEmpty Tag -> f (NonEmpty Tag))
-> RemoveTagsFromCertificate
-> f RemoveTagsFromCertificate
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 RemoveTagsFromCertificate where
type
AWSResponse RemoveTagsFromCertificate =
RemoveTagsFromCertificateResponse
request :: RemoveTagsFromCertificate -> Request RemoveTagsFromCertificate
request = Service
-> RemoveTagsFromCertificate -> Request RemoveTagsFromCertificate
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy RemoveTagsFromCertificate
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse RemoveTagsFromCertificate)))
response =
AWSResponse RemoveTagsFromCertificate
-> Logger
-> Service
-> Proxy RemoveTagsFromCertificate
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse RemoveTagsFromCertificate)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
AWSResponse RemoveTagsFromCertificate
RemoveTagsFromCertificateResponse
RemoveTagsFromCertificateResponse'
instance Prelude.Hashable RemoveTagsFromCertificate
instance Prelude.NFData RemoveTagsFromCertificate
instance Core.ToHeaders RemoveTagsFromCertificate where
toHeaders :: RemoveTagsFromCertificate -> [Header]
toHeaders =
[Header] -> RemoveTagsFromCertificate -> [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
"CertificateManager.RemoveTagsFromCertificate" ::
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 RemoveTagsFromCertificate where
toJSON :: RemoveTagsFromCertificate -> Value
toJSON RemoveTagsFromCertificate' {NonEmpty Tag
Text
tags :: NonEmpty Tag
certificateArn :: Text
$sel:tags:RemoveTagsFromCertificate' :: RemoveTagsFromCertificate -> NonEmpty Tag
$sel:certificateArn:RemoveTagsFromCertificate' :: RemoveTagsFromCertificate -> 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
"CertificateArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
certificateArn),
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 RemoveTagsFromCertificate where
toPath :: RemoveTagsFromCertificate -> ByteString
toPath = ByteString -> RemoveTagsFromCertificate -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery RemoveTagsFromCertificate where
toQuery :: RemoveTagsFromCertificate -> QueryString
toQuery = QueryString -> RemoveTagsFromCertificate -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data RemoveTagsFromCertificateResponse = RemoveTagsFromCertificateResponse'
{
}
deriving (RemoveTagsFromCertificateResponse
-> RemoveTagsFromCertificateResponse -> Bool
(RemoveTagsFromCertificateResponse
-> RemoveTagsFromCertificateResponse -> Bool)
-> (RemoveTagsFromCertificateResponse
-> RemoveTagsFromCertificateResponse -> Bool)
-> Eq RemoveTagsFromCertificateResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RemoveTagsFromCertificateResponse
-> RemoveTagsFromCertificateResponse -> Bool
$c/= :: RemoveTagsFromCertificateResponse
-> RemoveTagsFromCertificateResponse -> Bool
== :: RemoveTagsFromCertificateResponse
-> RemoveTagsFromCertificateResponse -> Bool
$c== :: RemoveTagsFromCertificateResponse
-> RemoveTagsFromCertificateResponse -> Bool
Prelude.Eq, ReadPrec [RemoveTagsFromCertificateResponse]
ReadPrec RemoveTagsFromCertificateResponse
Int -> ReadS RemoveTagsFromCertificateResponse
ReadS [RemoveTagsFromCertificateResponse]
(Int -> ReadS RemoveTagsFromCertificateResponse)
-> ReadS [RemoveTagsFromCertificateResponse]
-> ReadPrec RemoveTagsFromCertificateResponse
-> ReadPrec [RemoveTagsFromCertificateResponse]
-> Read RemoveTagsFromCertificateResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RemoveTagsFromCertificateResponse]
$creadListPrec :: ReadPrec [RemoveTagsFromCertificateResponse]
readPrec :: ReadPrec RemoveTagsFromCertificateResponse
$creadPrec :: ReadPrec RemoveTagsFromCertificateResponse
readList :: ReadS [RemoveTagsFromCertificateResponse]
$creadList :: ReadS [RemoveTagsFromCertificateResponse]
readsPrec :: Int -> ReadS RemoveTagsFromCertificateResponse
$creadsPrec :: Int -> ReadS RemoveTagsFromCertificateResponse
Prelude.Read, Int -> RemoveTagsFromCertificateResponse -> ShowS
[RemoveTagsFromCertificateResponse] -> ShowS
RemoveTagsFromCertificateResponse -> String
(Int -> RemoveTagsFromCertificateResponse -> ShowS)
-> (RemoveTagsFromCertificateResponse -> String)
-> ([RemoveTagsFromCertificateResponse] -> ShowS)
-> Show RemoveTagsFromCertificateResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RemoveTagsFromCertificateResponse] -> ShowS
$cshowList :: [RemoveTagsFromCertificateResponse] -> ShowS
show :: RemoveTagsFromCertificateResponse -> String
$cshow :: RemoveTagsFromCertificateResponse -> String
showsPrec :: Int -> RemoveTagsFromCertificateResponse -> ShowS
$cshowsPrec :: Int -> RemoveTagsFromCertificateResponse -> ShowS
Prelude.Show, (forall x.
RemoveTagsFromCertificateResponse
-> Rep RemoveTagsFromCertificateResponse x)
-> (forall x.
Rep RemoveTagsFromCertificateResponse x
-> RemoveTagsFromCertificateResponse)
-> Generic RemoveTagsFromCertificateResponse
forall x.
Rep RemoveTagsFromCertificateResponse x
-> RemoveTagsFromCertificateResponse
forall x.
RemoveTagsFromCertificateResponse
-> Rep RemoveTagsFromCertificateResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RemoveTagsFromCertificateResponse x
-> RemoveTagsFromCertificateResponse
$cfrom :: forall x.
RemoveTagsFromCertificateResponse
-> Rep RemoveTagsFromCertificateResponse x
Prelude.Generic)
newRemoveTagsFromCertificateResponse ::
RemoveTagsFromCertificateResponse
newRemoveTagsFromCertificateResponse :: RemoveTagsFromCertificateResponse
newRemoveTagsFromCertificateResponse =
RemoveTagsFromCertificateResponse
RemoveTagsFromCertificateResponse'
instance
Prelude.NFData
RemoveTagsFromCertificateResponse