{-# 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.CloudHSM.CreateHsm
(
CreateHsm (..),
newCreateHsm,
createHsm_clientToken,
createHsm_syslogIp,
createHsm_externalId,
createHsm_eniIp,
createHsm_subnetId,
createHsm_sshKey,
createHsm_iamRoleArn,
createHsm_subscriptionType,
CreateHsmResponse (..),
newCreateHsmResponse,
createHsmResponse_hsmArn,
createHsmResponse_httpStatus,
)
where
import Amazonka.CloudHSM.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 CreateHsm = CreateHsm'
{
CreateHsm -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
CreateHsm -> Maybe Text
syslogIp :: Prelude.Maybe Prelude.Text,
CreateHsm -> Maybe Text
externalId :: Prelude.Maybe Prelude.Text,
CreateHsm -> Maybe Text
eniIp :: Prelude.Maybe Prelude.Text,
CreateHsm -> Text
subnetId :: Prelude.Text,
CreateHsm -> Text
sshKey :: Prelude.Text,
CreateHsm -> Text
iamRoleArn :: Prelude.Text,
CreateHsm -> SubscriptionType
subscriptionType :: SubscriptionType
}
deriving (CreateHsm -> CreateHsm -> Bool
(CreateHsm -> CreateHsm -> Bool)
-> (CreateHsm -> CreateHsm -> Bool) -> Eq CreateHsm
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateHsm -> CreateHsm -> Bool
$c/= :: CreateHsm -> CreateHsm -> Bool
== :: CreateHsm -> CreateHsm -> Bool
$c== :: CreateHsm -> CreateHsm -> Bool
Prelude.Eq, ReadPrec [CreateHsm]
ReadPrec CreateHsm
Int -> ReadS CreateHsm
ReadS [CreateHsm]
(Int -> ReadS CreateHsm)
-> ReadS [CreateHsm]
-> ReadPrec CreateHsm
-> ReadPrec [CreateHsm]
-> Read CreateHsm
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateHsm]
$creadListPrec :: ReadPrec [CreateHsm]
readPrec :: ReadPrec CreateHsm
$creadPrec :: ReadPrec CreateHsm
readList :: ReadS [CreateHsm]
$creadList :: ReadS [CreateHsm]
readsPrec :: Int -> ReadS CreateHsm
$creadsPrec :: Int -> ReadS CreateHsm
Prelude.Read, Int -> CreateHsm -> ShowS
[CreateHsm] -> ShowS
CreateHsm -> String
(Int -> CreateHsm -> ShowS)
-> (CreateHsm -> String)
-> ([CreateHsm] -> ShowS)
-> Show CreateHsm
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateHsm] -> ShowS
$cshowList :: [CreateHsm] -> ShowS
show :: CreateHsm -> String
$cshow :: CreateHsm -> String
showsPrec :: Int -> CreateHsm -> ShowS
$cshowsPrec :: Int -> CreateHsm -> ShowS
Prelude.Show, (forall x. CreateHsm -> Rep CreateHsm x)
-> (forall x. Rep CreateHsm x -> CreateHsm) -> Generic CreateHsm
forall x. Rep CreateHsm x -> CreateHsm
forall x. CreateHsm -> Rep CreateHsm x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateHsm x -> CreateHsm
$cfrom :: forall x. CreateHsm -> Rep CreateHsm x
Prelude.Generic)
newCreateHsm ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
SubscriptionType ->
CreateHsm
newCreateHsm :: Text -> Text -> Text -> SubscriptionType -> CreateHsm
newCreateHsm
Text
pSubnetId_
Text
pSshKey_
Text
pIamRoleArn_
SubscriptionType
pSubscriptionType_ =
CreateHsm' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> Text
-> SubscriptionType
-> CreateHsm
CreateHsm'
{ $sel:clientToken:CreateHsm' :: Maybe Text
clientToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:syslogIp:CreateHsm' :: Maybe Text
syslogIp = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:externalId:CreateHsm' :: Maybe Text
externalId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:eniIp:CreateHsm' :: Maybe Text
eniIp = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:subnetId:CreateHsm' :: Text
subnetId = Text
pSubnetId_,
$sel:sshKey:CreateHsm' :: Text
sshKey = Text
pSshKey_,
$sel:iamRoleArn:CreateHsm' :: Text
iamRoleArn = Text
pIamRoleArn_,
$sel:subscriptionType:CreateHsm' :: SubscriptionType
subscriptionType = SubscriptionType
pSubscriptionType_
}
createHsm_clientToken :: Lens.Lens' CreateHsm (Prelude.Maybe Prelude.Text)
createHsm_clientToken :: (Maybe Text -> f (Maybe Text)) -> CreateHsm -> f CreateHsm
createHsm_clientToken = (CreateHsm -> Maybe Text)
-> (CreateHsm -> Maybe Text -> CreateHsm)
-> Lens CreateHsm CreateHsm (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateHsm' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:CreateHsm' :: CreateHsm -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: CreateHsm
s@CreateHsm' {} Maybe Text
a -> CreateHsm
s {$sel:clientToken:CreateHsm' :: Maybe Text
clientToken = Maybe Text
a} :: CreateHsm)
createHsm_syslogIp :: Lens.Lens' CreateHsm (Prelude.Maybe Prelude.Text)
createHsm_syslogIp :: (Maybe Text -> f (Maybe Text)) -> CreateHsm -> f CreateHsm
createHsm_syslogIp = (CreateHsm -> Maybe Text)
-> (CreateHsm -> Maybe Text -> CreateHsm)
-> Lens CreateHsm CreateHsm (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateHsm' {Maybe Text
syslogIp :: Maybe Text
$sel:syslogIp:CreateHsm' :: CreateHsm -> Maybe Text
syslogIp} -> Maybe Text
syslogIp) (\s :: CreateHsm
s@CreateHsm' {} Maybe Text
a -> CreateHsm
s {$sel:syslogIp:CreateHsm' :: Maybe Text
syslogIp = Maybe Text
a} :: CreateHsm)
createHsm_externalId :: Lens.Lens' CreateHsm (Prelude.Maybe Prelude.Text)
createHsm_externalId :: (Maybe Text -> f (Maybe Text)) -> CreateHsm -> f CreateHsm
createHsm_externalId = (CreateHsm -> Maybe Text)
-> (CreateHsm -> Maybe Text -> CreateHsm)
-> Lens CreateHsm CreateHsm (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateHsm' {Maybe Text
externalId :: Maybe Text
$sel:externalId:CreateHsm' :: CreateHsm -> Maybe Text
externalId} -> Maybe Text
externalId) (\s :: CreateHsm
s@CreateHsm' {} Maybe Text
a -> CreateHsm
s {$sel:externalId:CreateHsm' :: Maybe Text
externalId = Maybe Text
a} :: CreateHsm)
createHsm_eniIp :: Lens.Lens' CreateHsm (Prelude.Maybe Prelude.Text)
createHsm_eniIp :: (Maybe Text -> f (Maybe Text)) -> CreateHsm -> f CreateHsm
createHsm_eniIp = (CreateHsm -> Maybe Text)
-> (CreateHsm -> Maybe Text -> CreateHsm)
-> Lens CreateHsm CreateHsm (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateHsm' {Maybe Text
eniIp :: Maybe Text
$sel:eniIp:CreateHsm' :: CreateHsm -> Maybe Text
eniIp} -> Maybe Text
eniIp) (\s :: CreateHsm
s@CreateHsm' {} Maybe Text
a -> CreateHsm
s {$sel:eniIp:CreateHsm' :: Maybe Text
eniIp = Maybe Text
a} :: CreateHsm)
createHsm_subnetId :: Lens.Lens' CreateHsm Prelude.Text
createHsm_subnetId :: (Text -> f Text) -> CreateHsm -> f CreateHsm
createHsm_subnetId = (CreateHsm -> Text)
-> (CreateHsm -> Text -> CreateHsm)
-> Lens CreateHsm CreateHsm Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateHsm' {Text
subnetId :: Text
$sel:subnetId:CreateHsm' :: CreateHsm -> Text
subnetId} -> Text
subnetId) (\s :: CreateHsm
s@CreateHsm' {} Text
a -> CreateHsm
s {$sel:subnetId:CreateHsm' :: Text
subnetId = Text
a} :: CreateHsm)
createHsm_sshKey :: Lens.Lens' CreateHsm Prelude.Text
createHsm_sshKey :: (Text -> f Text) -> CreateHsm -> f CreateHsm
createHsm_sshKey = (CreateHsm -> Text)
-> (CreateHsm -> Text -> CreateHsm)
-> Lens CreateHsm CreateHsm Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateHsm' {Text
sshKey :: Text
$sel:sshKey:CreateHsm' :: CreateHsm -> Text
sshKey} -> Text
sshKey) (\s :: CreateHsm
s@CreateHsm' {} Text
a -> CreateHsm
s {$sel:sshKey:CreateHsm' :: Text
sshKey = Text
a} :: CreateHsm)
createHsm_iamRoleArn :: Lens.Lens' CreateHsm Prelude.Text
createHsm_iamRoleArn :: (Text -> f Text) -> CreateHsm -> f CreateHsm
createHsm_iamRoleArn = (CreateHsm -> Text)
-> (CreateHsm -> Text -> CreateHsm)
-> Lens CreateHsm CreateHsm Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateHsm' {Text
iamRoleArn :: Text
$sel:iamRoleArn:CreateHsm' :: CreateHsm -> Text
iamRoleArn} -> Text
iamRoleArn) (\s :: CreateHsm
s@CreateHsm' {} Text
a -> CreateHsm
s {$sel:iamRoleArn:CreateHsm' :: Text
iamRoleArn = Text
a} :: CreateHsm)
createHsm_subscriptionType :: Lens.Lens' CreateHsm SubscriptionType
createHsm_subscriptionType :: (SubscriptionType -> f SubscriptionType)
-> CreateHsm -> f CreateHsm
createHsm_subscriptionType = (CreateHsm -> SubscriptionType)
-> (CreateHsm -> SubscriptionType -> CreateHsm)
-> Lens CreateHsm CreateHsm SubscriptionType SubscriptionType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateHsm' {SubscriptionType
subscriptionType :: SubscriptionType
$sel:subscriptionType:CreateHsm' :: CreateHsm -> SubscriptionType
subscriptionType} -> SubscriptionType
subscriptionType) (\s :: CreateHsm
s@CreateHsm' {} SubscriptionType
a -> CreateHsm
s {$sel:subscriptionType:CreateHsm' :: SubscriptionType
subscriptionType = SubscriptionType
a} :: CreateHsm)
instance Core.AWSRequest CreateHsm where
type AWSResponse CreateHsm = CreateHsmResponse
request :: CreateHsm -> Request CreateHsm
request = Service -> CreateHsm -> Request CreateHsm
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateHsm
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateHsm)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateHsm))
-> Logger
-> Service
-> Proxy CreateHsm
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateHsm)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text -> Int -> CreateHsmResponse
CreateHsmResponse'
(Maybe Text -> Int -> CreateHsmResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateHsmResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"HsmArn")
Either String (Int -> CreateHsmResponse)
-> Either String Int -> Either String CreateHsmResponse
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 CreateHsm
instance Prelude.NFData CreateHsm
instance Core.ToHeaders CreateHsm where
toHeaders :: CreateHsm -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateHsm -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"CloudHsmFrontendService.CreateHsm" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON CreateHsm where
toJSON :: CreateHsm -> Value
toJSON CreateHsm' {Maybe Text
Text
SubscriptionType
subscriptionType :: SubscriptionType
iamRoleArn :: Text
sshKey :: Text
subnetId :: Text
eniIp :: Maybe Text
externalId :: Maybe Text
syslogIp :: Maybe Text
clientToken :: Maybe Text
$sel:subscriptionType:CreateHsm' :: CreateHsm -> SubscriptionType
$sel:iamRoleArn:CreateHsm' :: CreateHsm -> Text
$sel:sshKey:CreateHsm' :: CreateHsm -> Text
$sel:subnetId:CreateHsm' :: CreateHsm -> Text
$sel:eniIp:CreateHsm' :: CreateHsm -> Maybe Text
$sel:externalId:CreateHsm' :: CreateHsm -> Maybe Text
$sel:syslogIp:CreateHsm' :: CreateHsm -> Maybe Text
$sel:clientToken:CreateHsm' :: CreateHsm -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"ClientToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
clientToken,
(Text
"SyslogIp" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
syslogIp,
(Text
"ExternalId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
externalId,
(Text
"EniIp" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
eniIp,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"SubnetId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
subnetId),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"SshKey" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
sshKey),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"IamRoleArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
iamRoleArn),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"SubscriptionType" Text -> SubscriptionType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= SubscriptionType
subscriptionType)
]
)
instance Core.ToPath CreateHsm where
toPath :: CreateHsm -> ByteString
toPath = ByteString -> CreateHsm -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery CreateHsm where
toQuery :: CreateHsm -> QueryString
toQuery = QueryString -> CreateHsm -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateHsmResponse = CreateHsmResponse'
{
CreateHsmResponse -> Maybe Text
hsmArn :: Prelude.Maybe Prelude.Text,
CreateHsmResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateHsmResponse -> CreateHsmResponse -> Bool
(CreateHsmResponse -> CreateHsmResponse -> Bool)
-> (CreateHsmResponse -> CreateHsmResponse -> Bool)
-> Eq CreateHsmResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateHsmResponse -> CreateHsmResponse -> Bool
$c/= :: CreateHsmResponse -> CreateHsmResponse -> Bool
== :: CreateHsmResponse -> CreateHsmResponse -> Bool
$c== :: CreateHsmResponse -> CreateHsmResponse -> Bool
Prelude.Eq, ReadPrec [CreateHsmResponse]
ReadPrec CreateHsmResponse
Int -> ReadS CreateHsmResponse
ReadS [CreateHsmResponse]
(Int -> ReadS CreateHsmResponse)
-> ReadS [CreateHsmResponse]
-> ReadPrec CreateHsmResponse
-> ReadPrec [CreateHsmResponse]
-> Read CreateHsmResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateHsmResponse]
$creadListPrec :: ReadPrec [CreateHsmResponse]
readPrec :: ReadPrec CreateHsmResponse
$creadPrec :: ReadPrec CreateHsmResponse
readList :: ReadS [CreateHsmResponse]
$creadList :: ReadS [CreateHsmResponse]
readsPrec :: Int -> ReadS CreateHsmResponse
$creadsPrec :: Int -> ReadS CreateHsmResponse
Prelude.Read, Int -> CreateHsmResponse -> ShowS
[CreateHsmResponse] -> ShowS
CreateHsmResponse -> String
(Int -> CreateHsmResponse -> ShowS)
-> (CreateHsmResponse -> String)
-> ([CreateHsmResponse] -> ShowS)
-> Show CreateHsmResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateHsmResponse] -> ShowS
$cshowList :: [CreateHsmResponse] -> ShowS
show :: CreateHsmResponse -> String
$cshow :: CreateHsmResponse -> String
showsPrec :: Int -> CreateHsmResponse -> ShowS
$cshowsPrec :: Int -> CreateHsmResponse -> ShowS
Prelude.Show, (forall x. CreateHsmResponse -> Rep CreateHsmResponse x)
-> (forall x. Rep CreateHsmResponse x -> CreateHsmResponse)
-> Generic CreateHsmResponse
forall x. Rep CreateHsmResponse x -> CreateHsmResponse
forall x. CreateHsmResponse -> Rep CreateHsmResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateHsmResponse x -> CreateHsmResponse
$cfrom :: forall x. CreateHsmResponse -> Rep CreateHsmResponse x
Prelude.Generic)
newCreateHsmResponse ::
Prelude.Int ->
CreateHsmResponse
newCreateHsmResponse :: Int -> CreateHsmResponse
newCreateHsmResponse Int
pHttpStatus_ =
CreateHsmResponse' :: Maybe Text -> Int -> CreateHsmResponse
CreateHsmResponse'
{ $sel:hsmArn:CreateHsmResponse' :: Maybe Text
hsmArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateHsmResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createHsmResponse_hsmArn :: Lens.Lens' CreateHsmResponse (Prelude.Maybe Prelude.Text)
createHsmResponse_hsmArn :: (Maybe Text -> f (Maybe Text))
-> CreateHsmResponse -> f CreateHsmResponse
createHsmResponse_hsmArn = (CreateHsmResponse -> Maybe Text)
-> (CreateHsmResponse -> Maybe Text -> CreateHsmResponse)
-> Lens
CreateHsmResponse CreateHsmResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateHsmResponse' {Maybe Text
hsmArn :: Maybe Text
$sel:hsmArn:CreateHsmResponse' :: CreateHsmResponse -> Maybe Text
hsmArn} -> Maybe Text
hsmArn) (\s :: CreateHsmResponse
s@CreateHsmResponse' {} Maybe Text
a -> CreateHsmResponse
s {$sel:hsmArn:CreateHsmResponse' :: Maybe Text
hsmArn = Maybe Text
a} :: CreateHsmResponse)
createHsmResponse_httpStatus :: Lens.Lens' CreateHsmResponse Prelude.Int
createHsmResponse_httpStatus :: (Int -> f Int) -> CreateHsmResponse -> f CreateHsmResponse
createHsmResponse_httpStatus = (CreateHsmResponse -> Int)
-> (CreateHsmResponse -> Int -> CreateHsmResponse)
-> Lens CreateHsmResponse CreateHsmResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateHsmResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateHsmResponse' :: CreateHsmResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateHsmResponse
s@CreateHsmResponse' {} Int
a -> CreateHsmResponse
s {$sel:httpStatus:CreateHsmResponse' :: Int
httpStatus = Int
a} :: CreateHsmResponse)
instance Prelude.NFData CreateHsmResponse