{-# 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.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 UpdateCertificateOptions = UpdateCertificateOptions'
{
UpdateCertificateOptions -> Text
certificateArn :: Prelude.Text,
UpdateCertificateOptions -> CertificateOptions
options :: CertificateOptions
}
deriving (UpdateCertificateOptions -> UpdateCertificateOptions -> Bool
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]
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
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.
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'
{ $sel:certificateArn:UpdateCertificateOptions' :: Text
certificateArn =
Text
pCertificateArn_,
$sel:options:UpdateCertificateOptions' :: CertificateOptions
options = CertificateOptions
pOptions_
}
updateCertificateOptions_certificateArn :: Lens.Lens' UpdateCertificateOptions Prelude.Text
updateCertificateOptions_certificateArn :: Lens' UpdateCertificateOptions Text
updateCertificateOptions_certificateArn = 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 :: Lens' UpdateCertificateOptions CertificateOptions
updateCertificateOptions_options = 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 :: (Service -> Service)
-> UpdateCertificateOptions -> Request UpdateCertificateOptions
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 UpdateCertificateOptions
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateCertificateOptions)))
response =
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
UpdateCertificateOptionsResponse
UpdateCertificateOptionsResponse'
instance Prelude.Hashable UpdateCertificateOptions where
hashWithSalt :: Int -> UpdateCertificateOptions -> Int
hashWithSalt Int
_salt UpdateCertificateOptions' {Text
CertificateOptions
options :: CertificateOptions
certificateArn :: Text
$sel:options:UpdateCertificateOptions' :: UpdateCertificateOptions -> CertificateOptions
$sel:certificateArn:UpdateCertificateOptions' :: UpdateCertificateOptions -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
certificateArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` CertificateOptions
options
instance Prelude.NFData UpdateCertificateOptions where
rnf :: UpdateCertificateOptions -> ()
rnf UpdateCertificateOptions' {Text
CertificateOptions
options :: CertificateOptions
certificateArn :: Text
$sel:options:UpdateCertificateOptions' :: UpdateCertificateOptions -> CertificateOptions
$sel:certificateArn:UpdateCertificateOptions' :: UpdateCertificateOptions -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
certificateArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf CertificateOptions
options
instance Data.ToHeaders UpdateCertificateOptions where
toHeaders :: UpdateCertificateOptions -> [Header]
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 -> [Header]
Data.=# ( ByteString
"CertificateManager.UpdateCertificateOptions" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> [Header]
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.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
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just
(Key
"CertificateArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
certificateArn),
forall a. a -> Maybe a
Prelude.Just (Key
"Options" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= CertificateOptions
options)
]
)
instance Data.ToPath UpdateCertificateOptions where
toPath :: UpdateCertificateOptions -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery UpdateCertificateOptions where
toQuery :: UpdateCertificateOptions -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data UpdateCertificateOptionsResponse = UpdateCertificateOptionsResponse'
{
}
deriving (UpdateCertificateOptionsResponse
-> UpdateCertificateOptionsResponse -> Bool
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]
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
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.
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
where
rnf :: UpdateCertificateOptionsResponse -> ()
rnf UpdateCertificateOptionsResponse
_ = ()