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