{-# 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.RequestCertificate
(
RequestCertificate (..),
newRequestCertificate,
requestCertificate_certificateAuthorityArn,
requestCertificate_domainValidationOptions,
requestCertificate_idempotencyToken,
requestCertificate_keyAlgorithm,
requestCertificate_options,
requestCertificate_subjectAlternativeNames,
requestCertificate_tags,
requestCertificate_validationMethod,
requestCertificate_domainName,
RequestCertificateResponse (..),
newRequestCertificateResponse,
requestCertificateResponse_certificateArn,
requestCertificateResponse_httpStatus,
)
where
import Amazonka.CertificateManager.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 RequestCertificate = RequestCertificate'
{
RequestCertificate -> Maybe Text
certificateAuthorityArn :: Prelude.Maybe Prelude.Text,
RequestCertificate -> Maybe (NonEmpty DomainValidationOption)
domainValidationOptions :: Prelude.Maybe (Prelude.NonEmpty DomainValidationOption),
RequestCertificate -> Maybe Text
idempotencyToken :: Prelude.Maybe Prelude.Text,
RequestCertificate -> Maybe KeyAlgorithm
keyAlgorithm :: Prelude.Maybe KeyAlgorithm,
RequestCertificate -> Maybe CertificateOptions
options :: Prelude.Maybe CertificateOptions,
RequestCertificate -> Maybe (NonEmpty Text)
subjectAlternativeNames :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
RequestCertificate -> Maybe (NonEmpty Tag)
tags :: Prelude.Maybe (Prelude.NonEmpty Tag),
RequestCertificate -> Maybe ValidationMethod
validationMethod :: Prelude.Maybe ValidationMethod,
RequestCertificate -> Text
domainName :: Prelude.Text
}
deriving (RequestCertificate -> RequestCertificate -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RequestCertificate -> RequestCertificate -> Bool
$c/= :: RequestCertificate -> RequestCertificate -> Bool
== :: RequestCertificate -> RequestCertificate -> Bool
$c== :: RequestCertificate -> RequestCertificate -> Bool
Prelude.Eq, ReadPrec [RequestCertificate]
ReadPrec RequestCertificate
Int -> ReadS RequestCertificate
ReadS [RequestCertificate]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RequestCertificate]
$creadListPrec :: ReadPrec [RequestCertificate]
readPrec :: ReadPrec RequestCertificate
$creadPrec :: ReadPrec RequestCertificate
readList :: ReadS [RequestCertificate]
$creadList :: ReadS [RequestCertificate]
readsPrec :: Int -> ReadS RequestCertificate
$creadsPrec :: Int -> ReadS RequestCertificate
Prelude.Read, Int -> RequestCertificate -> ShowS
[RequestCertificate] -> ShowS
RequestCertificate -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RequestCertificate] -> ShowS
$cshowList :: [RequestCertificate] -> ShowS
show :: RequestCertificate -> String
$cshow :: RequestCertificate -> String
showsPrec :: Int -> RequestCertificate -> ShowS
$cshowsPrec :: Int -> RequestCertificate -> ShowS
Prelude.Show, forall x. Rep RequestCertificate x -> RequestCertificate
forall x. RequestCertificate -> Rep RequestCertificate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RequestCertificate x -> RequestCertificate
$cfrom :: forall x. RequestCertificate -> Rep RequestCertificate x
Prelude.Generic)
newRequestCertificate ::
Prelude.Text ->
RequestCertificate
newRequestCertificate :: Text -> RequestCertificate
newRequestCertificate Text
pDomainName_ =
RequestCertificate'
{ $sel:certificateAuthorityArn:RequestCertificate' :: Maybe Text
certificateAuthorityArn =
forall a. Maybe a
Prelude.Nothing,
$sel:domainValidationOptions:RequestCertificate' :: Maybe (NonEmpty DomainValidationOption)
domainValidationOptions = forall a. Maybe a
Prelude.Nothing,
$sel:idempotencyToken:RequestCertificate' :: Maybe Text
idempotencyToken = forall a. Maybe a
Prelude.Nothing,
$sel:keyAlgorithm:RequestCertificate' :: Maybe KeyAlgorithm
keyAlgorithm = forall a. Maybe a
Prelude.Nothing,
$sel:options:RequestCertificate' :: Maybe CertificateOptions
options = forall a. Maybe a
Prelude.Nothing,
$sel:subjectAlternativeNames:RequestCertificate' :: Maybe (NonEmpty Text)
subjectAlternativeNames = forall a. Maybe a
Prelude.Nothing,
$sel:tags:RequestCertificate' :: Maybe (NonEmpty Tag)
tags = forall a. Maybe a
Prelude.Nothing,
$sel:validationMethod:RequestCertificate' :: Maybe ValidationMethod
validationMethod = forall a. Maybe a
Prelude.Nothing,
$sel:domainName:RequestCertificate' :: Text
domainName = Text
pDomainName_
}
requestCertificate_certificateAuthorityArn :: Lens.Lens' RequestCertificate (Prelude.Maybe Prelude.Text)
requestCertificate_certificateAuthorityArn :: Lens' RequestCertificate (Maybe Text)
requestCertificate_certificateAuthorityArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RequestCertificate' {Maybe Text
certificateAuthorityArn :: Maybe Text
$sel:certificateAuthorityArn:RequestCertificate' :: RequestCertificate -> Maybe Text
certificateAuthorityArn} -> Maybe Text
certificateAuthorityArn) (\s :: RequestCertificate
s@RequestCertificate' {} Maybe Text
a -> RequestCertificate
s {$sel:certificateAuthorityArn:RequestCertificate' :: Maybe Text
certificateAuthorityArn = Maybe Text
a} :: RequestCertificate)
requestCertificate_domainValidationOptions :: Lens.Lens' RequestCertificate (Prelude.Maybe (Prelude.NonEmpty DomainValidationOption))
requestCertificate_domainValidationOptions :: Lens' RequestCertificate (Maybe (NonEmpty DomainValidationOption))
requestCertificate_domainValidationOptions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RequestCertificate' {Maybe (NonEmpty DomainValidationOption)
domainValidationOptions :: Maybe (NonEmpty DomainValidationOption)
$sel:domainValidationOptions:RequestCertificate' :: RequestCertificate -> Maybe (NonEmpty DomainValidationOption)
domainValidationOptions} -> Maybe (NonEmpty DomainValidationOption)
domainValidationOptions) (\s :: RequestCertificate
s@RequestCertificate' {} Maybe (NonEmpty DomainValidationOption)
a -> RequestCertificate
s {$sel:domainValidationOptions:RequestCertificate' :: Maybe (NonEmpty DomainValidationOption)
domainValidationOptions = Maybe (NonEmpty DomainValidationOption)
a} :: RequestCertificate) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
requestCertificate_idempotencyToken :: Lens.Lens' RequestCertificate (Prelude.Maybe Prelude.Text)
requestCertificate_idempotencyToken :: Lens' RequestCertificate (Maybe Text)
requestCertificate_idempotencyToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RequestCertificate' {Maybe Text
idempotencyToken :: Maybe Text
$sel:idempotencyToken:RequestCertificate' :: RequestCertificate -> Maybe Text
idempotencyToken} -> Maybe Text
idempotencyToken) (\s :: RequestCertificate
s@RequestCertificate' {} Maybe Text
a -> RequestCertificate
s {$sel:idempotencyToken:RequestCertificate' :: Maybe Text
idempotencyToken = Maybe Text
a} :: RequestCertificate)
requestCertificate_keyAlgorithm :: Lens.Lens' RequestCertificate (Prelude.Maybe KeyAlgorithm)
requestCertificate_keyAlgorithm :: Lens' RequestCertificate (Maybe KeyAlgorithm)
requestCertificate_keyAlgorithm = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RequestCertificate' {Maybe KeyAlgorithm
keyAlgorithm :: Maybe KeyAlgorithm
$sel:keyAlgorithm:RequestCertificate' :: RequestCertificate -> Maybe KeyAlgorithm
keyAlgorithm} -> Maybe KeyAlgorithm
keyAlgorithm) (\s :: RequestCertificate
s@RequestCertificate' {} Maybe KeyAlgorithm
a -> RequestCertificate
s {$sel:keyAlgorithm:RequestCertificate' :: Maybe KeyAlgorithm
keyAlgorithm = Maybe KeyAlgorithm
a} :: RequestCertificate)
requestCertificate_options :: Lens.Lens' RequestCertificate (Prelude.Maybe CertificateOptions)
requestCertificate_options :: Lens' RequestCertificate (Maybe CertificateOptions)
requestCertificate_options = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RequestCertificate' {Maybe CertificateOptions
options :: Maybe CertificateOptions
$sel:options:RequestCertificate' :: RequestCertificate -> Maybe CertificateOptions
options} -> Maybe CertificateOptions
options) (\s :: RequestCertificate
s@RequestCertificate' {} Maybe CertificateOptions
a -> RequestCertificate
s {$sel:options:RequestCertificate' :: Maybe CertificateOptions
options = Maybe CertificateOptions
a} :: RequestCertificate)
requestCertificate_subjectAlternativeNames :: Lens.Lens' RequestCertificate (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
requestCertificate_subjectAlternativeNames :: Lens' RequestCertificate (Maybe (NonEmpty Text))
requestCertificate_subjectAlternativeNames = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RequestCertificate' {Maybe (NonEmpty Text)
subjectAlternativeNames :: Maybe (NonEmpty Text)
$sel:subjectAlternativeNames:RequestCertificate' :: RequestCertificate -> Maybe (NonEmpty Text)
subjectAlternativeNames} -> Maybe (NonEmpty Text)
subjectAlternativeNames) (\s :: RequestCertificate
s@RequestCertificate' {} Maybe (NonEmpty Text)
a -> RequestCertificate
s {$sel:subjectAlternativeNames:RequestCertificate' :: Maybe (NonEmpty Text)
subjectAlternativeNames = Maybe (NonEmpty Text)
a} :: RequestCertificate) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
requestCertificate_tags :: Lens.Lens' RequestCertificate (Prelude.Maybe (Prelude.NonEmpty Tag))
requestCertificate_tags :: Lens' RequestCertificate (Maybe (NonEmpty Tag))
requestCertificate_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RequestCertificate' {Maybe (NonEmpty Tag)
tags :: Maybe (NonEmpty Tag)
$sel:tags:RequestCertificate' :: RequestCertificate -> Maybe (NonEmpty Tag)
tags} -> Maybe (NonEmpty Tag)
tags) (\s :: RequestCertificate
s@RequestCertificate' {} Maybe (NonEmpty Tag)
a -> RequestCertificate
s {$sel:tags:RequestCertificate' :: Maybe (NonEmpty Tag)
tags = Maybe (NonEmpty Tag)
a} :: RequestCertificate) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
requestCertificate_validationMethod :: Lens.Lens' RequestCertificate (Prelude.Maybe ValidationMethod)
requestCertificate_validationMethod :: Lens' RequestCertificate (Maybe ValidationMethod)
requestCertificate_validationMethod = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RequestCertificate' {Maybe ValidationMethod
validationMethod :: Maybe ValidationMethod
$sel:validationMethod:RequestCertificate' :: RequestCertificate -> Maybe ValidationMethod
validationMethod} -> Maybe ValidationMethod
validationMethod) (\s :: RequestCertificate
s@RequestCertificate' {} Maybe ValidationMethod
a -> RequestCertificate
s {$sel:validationMethod:RequestCertificate' :: Maybe ValidationMethod
validationMethod = Maybe ValidationMethod
a} :: RequestCertificate)
requestCertificate_domainName :: Lens.Lens' RequestCertificate Prelude.Text
requestCertificate_domainName :: Lens' RequestCertificate Text
requestCertificate_domainName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RequestCertificate' {Text
domainName :: Text
$sel:domainName:RequestCertificate' :: RequestCertificate -> Text
domainName} -> Text
domainName) (\s :: RequestCertificate
s@RequestCertificate' {} Text
a -> RequestCertificate
s {$sel:domainName:RequestCertificate' :: Text
domainName = Text
a} :: RequestCertificate)
instance Core.AWSRequest RequestCertificate where
type
AWSResponse RequestCertificate =
RequestCertificateResponse
request :: (Service -> Service)
-> RequestCertificate -> Request RequestCertificate
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 RequestCertificate
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse RequestCertificate)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text -> Int -> RequestCertificateResponse
RequestCertificateResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"CertificateArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable RequestCertificate where
hashWithSalt :: Int -> RequestCertificate -> Int
hashWithSalt Int
_salt RequestCertificate' {Maybe (NonEmpty Text)
Maybe (NonEmpty DomainValidationOption)
Maybe (NonEmpty Tag)
Maybe Text
Maybe CertificateOptions
Maybe KeyAlgorithm
Maybe ValidationMethod
Text
domainName :: Text
validationMethod :: Maybe ValidationMethod
tags :: Maybe (NonEmpty Tag)
subjectAlternativeNames :: Maybe (NonEmpty Text)
options :: Maybe CertificateOptions
keyAlgorithm :: Maybe KeyAlgorithm
idempotencyToken :: Maybe Text
domainValidationOptions :: Maybe (NonEmpty DomainValidationOption)
certificateAuthorityArn :: Maybe Text
$sel:domainName:RequestCertificate' :: RequestCertificate -> Text
$sel:validationMethod:RequestCertificate' :: RequestCertificate -> Maybe ValidationMethod
$sel:tags:RequestCertificate' :: RequestCertificate -> Maybe (NonEmpty Tag)
$sel:subjectAlternativeNames:RequestCertificate' :: RequestCertificate -> Maybe (NonEmpty Text)
$sel:options:RequestCertificate' :: RequestCertificate -> Maybe CertificateOptions
$sel:keyAlgorithm:RequestCertificate' :: RequestCertificate -> Maybe KeyAlgorithm
$sel:idempotencyToken:RequestCertificate' :: RequestCertificate -> Maybe Text
$sel:domainValidationOptions:RequestCertificate' :: RequestCertificate -> Maybe (NonEmpty DomainValidationOption)
$sel:certificateAuthorityArn:RequestCertificate' :: RequestCertificate -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
certificateAuthorityArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty DomainValidationOption)
domainValidationOptions
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
idempotencyToken
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe KeyAlgorithm
keyAlgorithm
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CertificateOptions
options
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty Text)
subjectAlternativeNames
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty Tag)
tags
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ValidationMethod
validationMethod
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
domainName
instance Prelude.NFData RequestCertificate where
rnf :: RequestCertificate -> ()
rnf RequestCertificate' {Maybe (NonEmpty Text)
Maybe (NonEmpty DomainValidationOption)
Maybe (NonEmpty Tag)
Maybe Text
Maybe CertificateOptions
Maybe KeyAlgorithm
Maybe ValidationMethod
Text
domainName :: Text
validationMethod :: Maybe ValidationMethod
tags :: Maybe (NonEmpty Tag)
subjectAlternativeNames :: Maybe (NonEmpty Text)
options :: Maybe CertificateOptions
keyAlgorithm :: Maybe KeyAlgorithm
idempotencyToken :: Maybe Text
domainValidationOptions :: Maybe (NonEmpty DomainValidationOption)
certificateAuthorityArn :: Maybe Text
$sel:domainName:RequestCertificate' :: RequestCertificate -> Text
$sel:validationMethod:RequestCertificate' :: RequestCertificate -> Maybe ValidationMethod
$sel:tags:RequestCertificate' :: RequestCertificate -> Maybe (NonEmpty Tag)
$sel:subjectAlternativeNames:RequestCertificate' :: RequestCertificate -> Maybe (NonEmpty Text)
$sel:options:RequestCertificate' :: RequestCertificate -> Maybe CertificateOptions
$sel:keyAlgorithm:RequestCertificate' :: RequestCertificate -> Maybe KeyAlgorithm
$sel:idempotencyToken:RequestCertificate' :: RequestCertificate -> Maybe Text
$sel:domainValidationOptions:RequestCertificate' :: RequestCertificate -> Maybe (NonEmpty DomainValidationOption)
$sel:certificateAuthorityArn:RequestCertificate' :: RequestCertificate -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
certificateAuthorityArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty DomainValidationOption)
domainValidationOptions
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
idempotencyToken
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe KeyAlgorithm
keyAlgorithm
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe CertificateOptions
options
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty Text)
subjectAlternativeNames
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty Tag)
tags
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ValidationMethod
validationMethod
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
domainName
instance Data.ToHeaders RequestCertificate where
toHeaders :: RequestCertificate -> ResponseHeaders
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 -> ResponseHeaders
Data.=# ( ByteString
"CertificateManager.RequestCertificate" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON RequestCertificate where
toJSON :: RequestCertificate -> Value
toJSON RequestCertificate' {Maybe (NonEmpty Text)
Maybe (NonEmpty DomainValidationOption)
Maybe (NonEmpty Tag)
Maybe Text
Maybe CertificateOptions
Maybe KeyAlgorithm
Maybe ValidationMethod
Text
domainName :: Text
validationMethod :: Maybe ValidationMethod
tags :: Maybe (NonEmpty Tag)
subjectAlternativeNames :: Maybe (NonEmpty Text)
options :: Maybe CertificateOptions
keyAlgorithm :: Maybe KeyAlgorithm
idempotencyToken :: Maybe Text
domainValidationOptions :: Maybe (NonEmpty DomainValidationOption)
certificateAuthorityArn :: Maybe Text
$sel:domainName:RequestCertificate' :: RequestCertificate -> Text
$sel:validationMethod:RequestCertificate' :: RequestCertificate -> Maybe ValidationMethod
$sel:tags:RequestCertificate' :: RequestCertificate -> Maybe (NonEmpty Tag)
$sel:subjectAlternativeNames:RequestCertificate' :: RequestCertificate -> Maybe (NonEmpty Text)
$sel:options:RequestCertificate' :: RequestCertificate -> Maybe CertificateOptions
$sel:keyAlgorithm:RequestCertificate' :: RequestCertificate -> Maybe KeyAlgorithm
$sel:idempotencyToken:RequestCertificate' :: RequestCertificate -> Maybe Text
$sel:domainValidationOptions:RequestCertificate' :: RequestCertificate -> Maybe (NonEmpty DomainValidationOption)
$sel:certificateAuthorityArn:RequestCertificate' :: RequestCertificate -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"CertificateAuthorityArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
certificateAuthorityArn,
(Key
"DomainValidationOptions" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty DomainValidationOption)
domainValidationOptions,
(Key
"IdempotencyToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
idempotencyToken,
(Key
"KeyAlgorithm" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe KeyAlgorithm
keyAlgorithm,
(Key
"Options" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CertificateOptions
options,
(Key
"SubjectAlternativeNames" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Text)
subjectAlternativeNames,
(Key
"Tags" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Tag)
tags,
(Key
"ValidationMethod" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ValidationMethod
validationMethod,
forall a. a -> Maybe a
Prelude.Just (Key
"DomainName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
domainName)
]
)
instance Data.ToPath RequestCertificate where
toPath :: RequestCertificate -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery RequestCertificate where
toQuery :: RequestCertificate -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data RequestCertificateResponse = RequestCertificateResponse'
{
RequestCertificateResponse -> Maybe Text
certificateArn :: Prelude.Maybe Prelude.Text,
RequestCertificateResponse -> Int
httpStatus :: Prelude.Int
}
deriving (RequestCertificateResponse -> RequestCertificateResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RequestCertificateResponse -> RequestCertificateResponse -> Bool
$c/= :: RequestCertificateResponse -> RequestCertificateResponse -> Bool
== :: RequestCertificateResponse -> RequestCertificateResponse -> Bool
$c== :: RequestCertificateResponse -> RequestCertificateResponse -> Bool
Prelude.Eq, ReadPrec [RequestCertificateResponse]
ReadPrec RequestCertificateResponse
Int -> ReadS RequestCertificateResponse
ReadS [RequestCertificateResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RequestCertificateResponse]
$creadListPrec :: ReadPrec [RequestCertificateResponse]
readPrec :: ReadPrec RequestCertificateResponse
$creadPrec :: ReadPrec RequestCertificateResponse
readList :: ReadS [RequestCertificateResponse]
$creadList :: ReadS [RequestCertificateResponse]
readsPrec :: Int -> ReadS RequestCertificateResponse
$creadsPrec :: Int -> ReadS RequestCertificateResponse
Prelude.Read, Int -> RequestCertificateResponse -> ShowS
[RequestCertificateResponse] -> ShowS
RequestCertificateResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RequestCertificateResponse] -> ShowS
$cshowList :: [RequestCertificateResponse] -> ShowS
show :: RequestCertificateResponse -> String
$cshow :: RequestCertificateResponse -> String
showsPrec :: Int -> RequestCertificateResponse -> ShowS
$cshowsPrec :: Int -> RequestCertificateResponse -> ShowS
Prelude.Show, forall x.
Rep RequestCertificateResponse x -> RequestCertificateResponse
forall x.
RequestCertificateResponse -> Rep RequestCertificateResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RequestCertificateResponse x -> RequestCertificateResponse
$cfrom :: forall x.
RequestCertificateResponse -> Rep RequestCertificateResponse x
Prelude.Generic)
newRequestCertificateResponse ::
Prelude.Int ->
RequestCertificateResponse
newRequestCertificateResponse :: Int -> RequestCertificateResponse
newRequestCertificateResponse Int
pHttpStatus_ =
RequestCertificateResponse'
{ $sel:certificateArn:RequestCertificateResponse' :: Maybe Text
certificateArn =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:RequestCertificateResponse' :: Int
httpStatus = Int
pHttpStatus_
}
requestCertificateResponse_certificateArn :: Lens.Lens' RequestCertificateResponse (Prelude.Maybe Prelude.Text)
requestCertificateResponse_certificateArn :: Lens' RequestCertificateResponse (Maybe Text)
requestCertificateResponse_certificateArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RequestCertificateResponse' {Maybe Text
certificateArn :: Maybe Text
$sel:certificateArn:RequestCertificateResponse' :: RequestCertificateResponse -> Maybe Text
certificateArn} -> Maybe Text
certificateArn) (\s :: RequestCertificateResponse
s@RequestCertificateResponse' {} Maybe Text
a -> RequestCertificateResponse
s {$sel:certificateArn:RequestCertificateResponse' :: Maybe Text
certificateArn = Maybe Text
a} :: RequestCertificateResponse)
requestCertificateResponse_httpStatus :: Lens.Lens' RequestCertificateResponse Prelude.Int
requestCertificateResponse_httpStatus :: Lens' RequestCertificateResponse Int
requestCertificateResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RequestCertificateResponse' {Int
httpStatus :: Int
$sel:httpStatus:RequestCertificateResponse' :: RequestCertificateResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: RequestCertificateResponse
s@RequestCertificateResponse' {} Int
a -> RequestCertificateResponse
s {$sel:httpStatus:RequestCertificateResponse' :: Int
httpStatus = Int
a} :: RequestCertificateResponse)
instance Prelude.NFData RequestCertificateResponse where
rnf :: RequestCertificateResponse -> ()
rnf RequestCertificateResponse' {Int
Maybe Text
httpStatus :: Int
certificateArn :: Maybe Text
$sel:httpStatus:RequestCertificateResponse' :: RequestCertificateResponse -> Int
$sel:certificateArn:RequestCertificateResponse' :: RequestCertificateResponse -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
certificateArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus