{-# 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.IAM.UploadServerCertificate
(
UploadServerCertificate (..),
newUploadServerCertificate,
uploadServerCertificate_path,
uploadServerCertificate_certificateChain,
uploadServerCertificate_tags,
uploadServerCertificate_serverCertificateName,
uploadServerCertificate_certificateBody,
uploadServerCertificate_privateKey,
UploadServerCertificateResponse (..),
newUploadServerCertificateResponse,
uploadServerCertificateResponse_serverCertificateMetadata,
uploadServerCertificateResponse_tags,
uploadServerCertificateResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.IAM.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 UploadServerCertificate = UploadServerCertificate'
{
UploadServerCertificate -> Maybe Text
path :: Prelude.Maybe Prelude.Text,
UploadServerCertificate -> Maybe Text
certificateChain :: Prelude.Maybe Prelude.Text,
UploadServerCertificate -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
UploadServerCertificate -> Text
serverCertificateName :: Prelude.Text,
UploadServerCertificate -> Text
certificateBody :: Prelude.Text,
UploadServerCertificate -> Sensitive Text
privateKey :: Core.Sensitive Prelude.Text
}
deriving (UploadServerCertificate -> UploadServerCertificate -> Bool
(UploadServerCertificate -> UploadServerCertificate -> Bool)
-> (UploadServerCertificate -> UploadServerCertificate -> Bool)
-> Eq UploadServerCertificate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UploadServerCertificate -> UploadServerCertificate -> Bool
$c/= :: UploadServerCertificate -> UploadServerCertificate -> Bool
== :: UploadServerCertificate -> UploadServerCertificate -> Bool
$c== :: UploadServerCertificate -> UploadServerCertificate -> Bool
Prelude.Eq, Int -> UploadServerCertificate -> ShowS
[UploadServerCertificate] -> ShowS
UploadServerCertificate -> String
(Int -> UploadServerCertificate -> ShowS)
-> (UploadServerCertificate -> String)
-> ([UploadServerCertificate] -> ShowS)
-> Show UploadServerCertificate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UploadServerCertificate] -> ShowS
$cshowList :: [UploadServerCertificate] -> ShowS
show :: UploadServerCertificate -> String
$cshow :: UploadServerCertificate -> String
showsPrec :: Int -> UploadServerCertificate -> ShowS
$cshowsPrec :: Int -> UploadServerCertificate -> ShowS
Prelude.Show, (forall x.
UploadServerCertificate -> Rep UploadServerCertificate x)
-> (forall x.
Rep UploadServerCertificate x -> UploadServerCertificate)
-> Generic UploadServerCertificate
forall x. Rep UploadServerCertificate x -> UploadServerCertificate
forall x. UploadServerCertificate -> Rep UploadServerCertificate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UploadServerCertificate x -> UploadServerCertificate
$cfrom :: forall x. UploadServerCertificate -> Rep UploadServerCertificate x
Prelude.Generic)
newUploadServerCertificate ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
UploadServerCertificate
newUploadServerCertificate :: Text -> Text -> Text -> UploadServerCertificate
newUploadServerCertificate
Text
pServerCertificateName_
Text
pCertificateBody_
Text
pPrivateKey_ =
UploadServerCertificate' :: Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> Text
-> Text
-> Sensitive Text
-> UploadServerCertificate
UploadServerCertificate'
{ $sel:path:UploadServerCertificate' :: Maybe Text
path = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:certificateChain:UploadServerCertificate' :: Maybe Text
certificateChain = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:UploadServerCertificate' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
$sel:serverCertificateName:UploadServerCertificate' :: Text
serverCertificateName = Text
pServerCertificateName_,
$sel:certificateBody:UploadServerCertificate' :: Text
certificateBody = Text
pCertificateBody_,
$sel:privateKey:UploadServerCertificate' :: Sensitive Text
privateKey = Tagged Text (Identity Text)
-> Tagged (Sensitive Text) (Identity (Sensitive Text))
forall a. Iso' (Sensitive a) a
Core._Sensitive (Tagged Text (Identity Text)
-> Tagged (Sensitive Text) (Identity (Sensitive Text)))
-> Text -> Sensitive Text
forall t b. AReview t b -> b -> t
Lens.# Text
pPrivateKey_
}
uploadServerCertificate_path :: Lens.Lens' UploadServerCertificate (Prelude.Maybe Prelude.Text)
uploadServerCertificate_path :: (Maybe Text -> f (Maybe Text))
-> UploadServerCertificate -> f UploadServerCertificate
uploadServerCertificate_path = (UploadServerCertificate -> Maybe Text)
-> (UploadServerCertificate
-> Maybe Text -> UploadServerCertificate)
-> Lens
UploadServerCertificate
UploadServerCertificate
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UploadServerCertificate' {Maybe Text
path :: Maybe Text
$sel:path:UploadServerCertificate' :: UploadServerCertificate -> Maybe Text
path} -> Maybe Text
path) (\s :: UploadServerCertificate
s@UploadServerCertificate' {} Maybe Text
a -> UploadServerCertificate
s {$sel:path:UploadServerCertificate' :: Maybe Text
path = Maybe Text
a} :: UploadServerCertificate)
uploadServerCertificate_certificateChain :: Lens.Lens' UploadServerCertificate (Prelude.Maybe Prelude.Text)
uploadServerCertificate_certificateChain :: (Maybe Text -> f (Maybe Text))
-> UploadServerCertificate -> f UploadServerCertificate
uploadServerCertificate_certificateChain = (UploadServerCertificate -> Maybe Text)
-> (UploadServerCertificate
-> Maybe Text -> UploadServerCertificate)
-> Lens
UploadServerCertificate
UploadServerCertificate
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UploadServerCertificate' {Maybe Text
certificateChain :: Maybe Text
$sel:certificateChain:UploadServerCertificate' :: UploadServerCertificate -> Maybe Text
certificateChain} -> Maybe Text
certificateChain) (\s :: UploadServerCertificate
s@UploadServerCertificate' {} Maybe Text
a -> UploadServerCertificate
s {$sel:certificateChain:UploadServerCertificate' :: Maybe Text
certificateChain = Maybe Text
a} :: UploadServerCertificate)
uploadServerCertificate_tags :: Lens.Lens' UploadServerCertificate (Prelude.Maybe [Tag])
uploadServerCertificate_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> UploadServerCertificate -> f UploadServerCertificate
uploadServerCertificate_tags = (UploadServerCertificate -> Maybe [Tag])
-> (UploadServerCertificate
-> Maybe [Tag] -> UploadServerCertificate)
-> Lens
UploadServerCertificate
UploadServerCertificate
(Maybe [Tag])
(Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UploadServerCertificate' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:UploadServerCertificate' :: UploadServerCertificate -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: UploadServerCertificate
s@UploadServerCertificate' {} Maybe [Tag]
a -> UploadServerCertificate
s {$sel:tags:UploadServerCertificate' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: UploadServerCertificate) ((Maybe [Tag] -> f (Maybe [Tag]))
-> UploadServerCertificate -> f UploadServerCertificate)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> UploadServerCertificate
-> f UploadServerCertificate
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
uploadServerCertificate_serverCertificateName :: Lens.Lens' UploadServerCertificate Prelude.Text
uploadServerCertificate_serverCertificateName :: (Text -> f Text)
-> UploadServerCertificate -> f UploadServerCertificate
uploadServerCertificate_serverCertificateName = (UploadServerCertificate -> Text)
-> (UploadServerCertificate -> Text -> UploadServerCertificate)
-> Lens UploadServerCertificate UploadServerCertificate Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UploadServerCertificate' {Text
serverCertificateName :: Text
$sel:serverCertificateName:UploadServerCertificate' :: UploadServerCertificate -> Text
serverCertificateName} -> Text
serverCertificateName) (\s :: UploadServerCertificate
s@UploadServerCertificate' {} Text
a -> UploadServerCertificate
s {$sel:serverCertificateName:UploadServerCertificate' :: Text
serverCertificateName = Text
a} :: UploadServerCertificate)
uploadServerCertificate_certificateBody :: Lens.Lens' UploadServerCertificate Prelude.Text
uploadServerCertificate_certificateBody :: (Text -> f Text)
-> UploadServerCertificate -> f UploadServerCertificate
uploadServerCertificate_certificateBody = (UploadServerCertificate -> Text)
-> (UploadServerCertificate -> Text -> UploadServerCertificate)
-> Lens UploadServerCertificate UploadServerCertificate Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UploadServerCertificate' {Text
certificateBody :: Text
$sel:certificateBody:UploadServerCertificate' :: UploadServerCertificate -> Text
certificateBody} -> Text
certificateBody) (\s :: UploadServerCertificate
s@UploadServerCertificate' {} Text
a -> UploadServerCertificate
s {$sel:certificateBody:UploadServerCertificate' :: Text
certificateBody = Text
a} :: UploadServerCertificate)
uploadServerCertificate_privateKey :: Lens.Lens' UploadServerCertificate Prelude.Text
uploadServerCertificate_privateKey :: (Text -> f Text)
-> UploadServerCertificate -> f UploadServerCertificate
uploadServerCertificate_privateKey = (UploadServerCertificate -> Sensitive Text)
-> (UploadServerCertificate
-> Sensitive Text -> UploadServerCertificate)
-> Lens
UploadServerCertificate
UploadServerCertificate
(Sensitive Text)
(Sensitive Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UploadServerCertificate' {Sensitive Text
privateKey :: Sensitive Text
$sel:privateKey:UploadServerCertificate' :: UploadServerCertificate -> Sensitive Text
privateKey} -> Sensitive Text
privateKey) (\s :: UploadServerCertificate
s@UploadServerCertificate' {} Sensitive Text
a -> UploadServerCertificate
s {$sel:privateKey:UploadServerCertificate' :: Sensitive Text
privateKey = Sensitive Text
a} :: UploadServerCertificate) ((Sensitive Text -> f (Sensitive Text))
-> UploadServerCertificate -> f UploadServerCertificate)
-> ((Text -> f Text) -> Sensitive Text -> f (Sensitive Text))
-> (Text -> f Text)
-> UploadServerCertificate
-> f UploadServerCertificate
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> f Text) -> Sensitive Text -> f (Sensitive Text)
forall a. Iso' (Sensitive a) a
Core._Sensitive
instance Core.AWSRequest UploadServerCertificate where
type
AWSResponse UploadServerCertificate =
UploadServerCertificateResponse
request :: UploadServerCertificate -> Request UploadServerCertificate
request = Service
-> UploadServerCertificate -> Request UploadServerCertificate
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy UploadServerCertificate
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UploadServerCertificate)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse UploadServerCertificate))
-> Logger
-> Service
-> Proxy UploadServerCertificate
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UploadServerCertificate)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
-> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
Text
"UploadServerCertificateResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe ServerCertificateMetadata
-> Maybe [Tag] -> Int -> UploadServerCertificateResponse
UploadServerCertificateResponse'
(Maybe ServerCertificateMetadata
-> Maybe [Tag] -> Int -> UploadServerCertificateResponse)
-> Either String (Maybe ServerCertificateMetadata)
-> Either
String (Maybe [Tag] -> Int -> UploadServerCertificateResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe ServerCertificateMetadata)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ServerCertificateMetadata")
Either
String (Maybe [Tag] -> Int -> UploadServerCertificateResponse)
-> Either String (Maybe [Tag])
-> Either String (Int -> UploadServerCertificateResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Tags" Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
Either String [Node]
-> ([Node] -> Either String (Maybe [Tag]))
-> Either String (Maybe [Tag])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [Tag])
-> [Node] -> Either String (Maybe [Tag])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [Tag]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
)
Either String (Int -> UploadServerCertificateResponse)
-> Either String Int
-> Either String UploadServerCertificateResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable UploadServerCertificate
instance Prelude.NFData UploadServerCertificate
instance Core.ToHeaders UploadServerCertificate where
toHeaders :: UploadServerCertificate -> ResponseHeaders
toHeaders = ResponseHeaders -> UploadServerCertificate -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath UploadServerCertificate where
toPath :: UploadServerCertificate -> ByteString
toPath = ByteString -> UploadServerCertificate -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery UploadServerCertificate where
toQuery :: UploadServerCertificate -> QueryString
toQuery UploadServerCertificate' {Maybe [Tag]
Maybe Text
Text
Sensitive Text
privateKey :: Sensitive Text
certificateBody :: Text
serverCertificateName :: Text
tags :: Maybe [Tag]
certificateChain :: Maybe Text
path :: Maybe Text
$sel:privateKey:UploadServerCertificate' :: UploadServerCertificate -> Sensitive Text
$sel:certificateBody:UploadServerCertificate' :: UploadServerCertificate -> Text
$sel:serverCertificateName:UploadServerCertificate' :: UploadServerCertificate -> Text
$sel:tags:UploadServerCertificate' :: UploadServerCertificate -> Maybe [Tag]
$sel:certificateChain:UploadServerCertificate' :: UploadServerCertificate -> Maybe Text
$sel:path:UploadServerCertificate' :: UploadServerCertificate -> Maybe Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"UploadServerCertificate" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-05-08" :: Prelude.ByteString),
ByteString
"Path" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
path,
ByteString
"CertificateChain" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
certificateChain,
ByteString
"Tags"
ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
(ByteString -> [Tag] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member" ([Tag] -> QueryString) -> Maybe [Tag] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags),
ByteString
"ServerCertificateName"
ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
serverCertificateName,
ByteString
"CertificateBody" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
certificateBody,
ByteString
"PrivateKey" ByteString -> Sensitive Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Sensitive Text
privateKey
]
data UploadServerCertificateResponse = UploadServerCertificateResponse'
{
UploadServerCertificateResponse -> Maybe ServerCertificateMetadata
serverCertificateMetadata :: Prelude.Maybe ServerCertificateMetadata,
UploadServerCertificateResponse -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
UploadServerCertificateResponse -> Int
httpStatus :: Prelude.Int
}
deriving (UploadServerCertificateResponse
-> UploadServerCertificateResponse -> Bool
(UploadServerCertificateResponse
-> UploadServerCertificateResponse -> Bool)
-> (UploadServerCertificateResponse
-> UploadServerCertificateResponse -> Bool)
-> Eq UploadServerCertificateResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UploadServerCertificateResponse
-> UploadServerCertificateResponse -> Bool
$c/= :: UploadServerCertificateResponse
-> UploadServerCertificateResponse -> Bool
== :: UploadServerCertificateResponse
-> UploadServerCertificateResponse -> Bool
$c== :: UploadServerCertificateResponse
-> UploadServerCertificateResponse -> Bool
Prelude.Eq, ReadPrec [UploadServerCertificateResponse]
ReadPrec UploadServerCertificateResponse
Int -> ReadS UploadServerCertificateResponse
ReadS [UploadServerCertificateResponse]
(Int -> ReadS UploadServerCertificateResponse)
-> ReadS [UploadServerCertificateResponse]
-> ReadPrec UploadServerCertificateResponse
-> ReadPrec [UploadServerCertificateResponse]
-> Read UploadServerCertificateResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UploadServerCertificateResponse]
$creadListPrec :: ReadPrec [UploadServerCertificateResponse]
readPrec :: ReadPrec UploadServerCertificateResponse
$creadPrec :: ReadPrec UploadServerCertificateResponse
readList :: ReadS [UploadServerCertificateResponse]
$creadList :: ReadS [UploadServerCertificateResponse]
readsPrec :: Int -> ReadS UploadServerCertificateResponse
$creadsPrec :: Int -> ReadS UploadServerCertificateResponse
Prelude.Read, Int -> UploadServerCertificateResponse -> ShowS
[UploadServerCertificateResponse] -> ShowS
UploadServerCertificateResponse -> String
(Int -> UploadServerCertificateResponse -> ShowS)
-> (UploadServerCertificateResponse -> String)
-> ([UploadServerCertificateResponse] -> ShowS)
-> Show UploadServerCertificateResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UploadServerCertificateResponse] -> ShowS
$cshowList :: [UploadServerCertificateResponse] -> ShowS
show :: UploadServerCertificateResponse -> String
$cshow :: UploadServerCertificateResponse -> String
showsPrec :: Int -> UploadServerCertificateResponse -> ShowS
$cshowsPrec :: Int -> UploadServerCertificateResponse -> ShowS
Prelude.Show, (forall x.
UploadServerCertificateResponse
-> Rep UploadServerCertificateResponse x)
-> (forall x.
Rep UploadServerCertificateResponse x
-> UploadServerCertificateResponse)
-> Generic UploadServerCertificateResponse
forall x.
Rep UploadServerCertificateResponse x
-> UploadServerCertificateResponse
forall x.
UploadServerCertificateResponse
-> Rep UploadServerCertificateResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UploadServerCertificateResponse x
-> UploadServerCertificateResponse
$cfrom :: forall x.
UploadServerCertificateResponse
-> Rep UploadServerCertificateResponse x
Prelude.Generic)
newUploadServerCertificateResponse ::
Prelude.Int ->
UploadServerCertificateResponse
newUploadServerCertificateResponse :: Int -> UploadServerCertificateResponse
newUploadServerCertificateResponse Int
pHttpStatus_ =
UploadServerCertificateResponse' :: Maybe ServerCertificateMetadata
-> Maybe [Tag] -> Int -> UploadServerCertificateResponse
UploadServerCertificateResponse'
{ $sel:serverCertificateMetadata:UploadServerCertificateResponse' :: Maybe ServerCertificateMetadata
serverCertificateMetadata =
Maybe ServerCertificateMetadata
forall a. Maybe a
Prelude.Nothing,
$sel:tags:UploadServerCertificateResponse' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:UploadServerCertificateResponse' :: Int
httpStatus = Int
pHttpStatus_
}
uploadServerCertificateResponse_serverCertificateMetadata :: Lens.Lens' UploadServerCertificateResponse (Prelude.Maybe ServerCertificateMetadata)
uploadServerCertificateResponse_serverCertificateMetadata :: (Maybe ServerCertificateMetadata
-> f (Maybe ServerCertificateMetadata))
-> UploadServerCertificateResponse
-> f UploadServerCertificateResponse
uploadServerCertificateResponse_serverCertificateMetadata = (UploadServerCertificateResponse
-> Maybe ServerCertificateMetadata)
-> (UploadServerCertificateResponse
-> Maybe ServerCertificateMetadata
-> UploadServerCertificateResponse)
-> Lens
UploadServerCertificateResponse
UploadServerCertificateResponse
(Maybe ServerCertificateMetadata)
(Maybe ServerCertificateMetadata)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UploadServerCertificateResponse' {Maybe ServerCertificateMetadata
serverCertificateMetadata :: Maybe ServerCertificateMetadata
$sel:serverCertificateMetadata:UploadServerCertificateResponse' :: UploadServerCertificateResponse -> Maybe ServerCertificateMetadata
serverCertificateMetadata} -> Maybe ServerCertificateMetadata
serverCertificateMetadata) (\s :: UploadServerCertificateResponse
s@UploadServerCertificateResponse' {} Maybe ServerCertificateMetadata
a -> UploadServerCertificateResponse
s {$sel:serverCertificateMetadata:UploadServerCertificateResponse' :: Maybe ServerCertificateMetadata
serverCertificateMetadata = Maybe ServerCertificateMetadata
a} :: UploadServerCertificateResponse)
uploadServerCertificateResponse_tags :: Lens.Lens' UploadServerCertificateResponse (Prelude.Maybe [Tag])
uploadServerCertificateResponse_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> UploadServerCertificateResponse
-> f UploadServerCertificateResponse
uploadServerCertificateResponse_tags = (UploadServerCertificateResponse -> Maybe [Tag])
-> (UploadServerCertificateResponse
-> Maybe [Tag] -> UploadServerCertificateResponse)
-> Lens
UploadServerCertificateResponse
UploadServerCertificateResponse
(Maybe [Tag])
(Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UploadServerCertificateResponse' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:UploadServerCertificateResponse' :: UploadServerCertificateResponse -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: UploadServerCertificateResponse
s@UploadServerCertificateResponse' {} Maybe [Tag]
a -> UploadServerCertificateResponse
s {$sel:tags:UploadServerCertificateResponse' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: UploadServerCertificateResponse) ((Maybe [Tag] -> f (Maybe [Tag]))
-> UploadServerCertificateResponse
-> f UploadServerCertificateResponse)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> UploadServerCertificateResponse
-> f UploadServerCertificateResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
uploadServerCertificateResponse_httpStatus :: Lens.Lens' UploadServerCertificateResponse Prelude.Int
uploadServerCertificateResponse_httpStatus :: (Int -> f Int)
-> UploadServerCertificateResponse
-> f UploadServerCertificateResponse
uploadServerCertificateResponse_httpStatus = (UploadServerCertificateResponse -> Int)
-> (UploadServerCertificateResponse
-> Int -> UploadServerCertificateResponse)
-> Lens
UploadServerCertificateResponse
UploadServerCertificateResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UploadServerCertificateResponse' {Int
httpStatus :: Int
$sel:httpStatus:UploadServerCertificateResponse' :: UploadServerCertificateResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UploadServerCertificateResponse
s@UploadServerCertificateResponse' {} Int
a -> UploadServerCertificateResponse
s {$sel:httpStatus:UploadServerCertificateResponse' :: Int
httpStatus = Int
a} :: UploadServerCertificateResponse)
instance
Prelude.NFData
UploadServerCertificateResponse