{-# 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.DescribeHsm
(
DescribeHsm (..),
newDescribeHsm,
describeHsm_hsmSerialNumber,
describeHsm_hsmArn,
DescribeHsmResponse (..),
newDescribeHsmResponse,
describeHsmResponse_status,
describeHsmResponse_iamRoleArn,
describeHsmResponse_eniId,
describeHsmResponse_vpcId,
describeHsmResponse_sshKeyLastUpdated,
describeHsmResponse_subscriptionEndDate,
describeHsmResponse_serverCertUri,
describeHsmResponse_subscriptionType,
describeHsmResponse_sshPublicKey,
describeHsmResponse_subnetId,
describeHsmResponse_statusDetails,
describeHsmResponse_partitions,
describeHsmResponse_subscriptionStartDate,
describeHsmResponse_availabilityZone,
describeHsmResponse_serverCertLastUpdated,
describeHsmResponse_softwareVersion,
describeHsmResponse_vendorName,
describeHsmResponse_serialNumber,
describeHsmResponse_hsmArn,
describeHsmResponse_eniIp,
describeHsmResponse_hsmType,
describeHsmResponse_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 DescribeHsm = DescribeHsm'
{
DescribeHsm -> Maybe Text
hsmSerialNumber :: Prelude.Maybe Prelude.Text,
DescribeHsm -> Maybe Text
hsmArn :: Prelude.Maybe Prelude.Text
}
deriving (DescribeHsm -> DescribeHsm -> Bool
(DescribeHsm -> DescribeHsm -> Bool)
-> (DescribeHsm -> DescribeHsm -> Bool) -> Eq DescribeHsm
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeHsm -> DescribeHsm -> Bool
$c/= :: DescribeHsm -> DescribeHsm -> Bool
== :: DescribeHsm -> DescribeHsm -> Bool
$c== :: DescribeHsm -> DescribeHsm -> Bool
Prelude.Eq, ReadPrec [DescribeHsm]
ReadPrec DescribeHsm
Int -> ReadS DescribeHsm
ReadS [DescribeHsm]
(Int -> ReadS DescribeHsm)
-> ReadS [DescribeHsm]
-> ReadPrec DescribeHsm
-> ReadPrec [DescribeHsm]
-> Read DescribeHsm
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeHsm]
$creadListPrec :: ReadPrec [DescribeHsm]
readPrec :: ReadPrec DescribeHsm
$creadPrec :: ReadPrec DescribeHsm
readList :: ReadS [DescribeHsm]
$creadList :: ReadS [DescribeHsm]
readsPrec :: Int -> ReadS DescribeHsm
$creadsPrec :: Int -> ReadS DescribeHsm
Prelude.Read, Int -> DescribeHsm -> ShowS
[DescribeHsm] -> ShowS
DescribeHsm -> String
(Int -> DescribeHsm -> ShowS)
-> (DescribeHsm -> String)
-> ([DescribeHsm] -> ShowS)
-> Show DescribeHsm
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeHsm] -> ShowS
$cshowList :: [DescribeHsm] -> ShowS
show :: DescribeHsm -> String
$cshow :: DescribeHsm -> String
showsPrec :: Int -> DescribeHsm -> ShowS
$cshowsPrec :: Int -> DescribeHsm -> ShowS
Prelude.Show, (forall x. DescribeHsm -> Rep DescribeHsm x)
-> (forall x. Rep DescribeHsm x -> DescribeHsm)
-> Generic DescribeHsm
forall x. Rep DescribeHsm x -> DescribeHsm
forall x. DescribeHsm -> Rep DescribeHsm x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeHsm x -> DescribeHsm
$cfrom :: forall x. DescribeHsm -> Rep DescribeHsm x
Prelude.Generic)
newDescribeHsm ::
DescribeHsm
newDescribeHsm :: DescribeHsm
newDescribeHsm =
DescribeHsm' :: Maybe Text -> Maybe Text -> DescribeHsm
DescribeHsm'
{ $sel:hsmSerialNumber:DescribeHsm' :: Maybe Text
hsmSerialNumber = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:hsmArn:DescribeHsm' :: Maybe Text
hsmArn = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
describeHsm_hsmSerialNumber :: Lens.Lens' DescribeHsm (Prelude.Maybe Prelude.Text)
describeHsm_hsmSerialNumber :: (Maybe Text -> f (Maybe Text)) -> DescribeHsm -> f DescribeHsm
describeHsm_hsmSerialNumber = (DescribeHsm -> Maybe Text)
-> (DescribeHsm -> Maybe Text -> DescribeHsm)
-> Lens DescribeHsm DescribeHsm (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHsm' {Maybe Text
hsmSerialNumber :: Maybe Text
$sel:hsmSerialNumber:DescribeHsm' :: DescribeHsm -> Maybe Text
hsmSerialNumber} -> Maybe Text
hsmSerialNumber) (\s :: DescribeHsm
s@DescribeHsm' {} Maybe Text
a -> DescribeHsm
s {$sel:hsmSerialNumber:DescribeHsm' :: Maybe Text
hsmSerialNumber = Maybe Text
a} :: DescribeHsm)
describeHsm_hsmArn :: Lens.Lens' DescribeHsm (Prelude.Maybe Prelude.Text)
describeHsm_hsmArn :: (Maybe Text -> f (Maybe Text)) -> DescribeHsm -> f DescribeHsm
describeHsm_hsmArn = (DescribeHsm -> Maybe Text)
-> (DescribeHsm -> Maybe Text -> DescribeHsm)
-> Lens DescribeHsm DescribeHsm (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHsm' {Maybe Text
hsmArn :: Maybe Text
$sel:hsmArn:DescribeHsm' :: DescribeHsm -> Maybe Text
hsmArn} -> Maybe Text
hsmArn) (\s :: DescribeHsm
s@DescribeHsm' {} Maybe Text
a -> DescribeHsm
s {$sel:hsmArn:DescribeHsm' :: Maybe Text
hsmArn = Maybe Text
a} :: DescribeHsm)
instance Core.AWSRequest DescribeHsm where
type AWSResponse DescribeHsm = DescribeHsmResponse
request :: DescribeHsm -> Request DescribeHsm
request = Service -> DescribeHsm -> Request DescribeHsm
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeHsm
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeHsm)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DescribeHsm))
-> Logger
-> Service
-> Proxy DescribeHsm
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeHsm)))
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 HsmStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe SubscriptionType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeHsmResponse
DescribeHsmResponse'
(Maybe HsmStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe SubscriptionType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeHsmResponse)
-> Either String (Maybe HsmStatus)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe SubscriptionType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeHsmResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe HsmStatus)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Status")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe SubscriptionType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeHsmResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe SubscriptionType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeHsmResponse)
forall (f :: * -> *) a b. Applicative f => 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
"IamRoleArn")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe SubscriptionType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeHsmResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe SubscriptionType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeHsmResponse)
forall (f :: * -> *) a b. Applicative f => 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
"EniId")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe SubscriptionType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeHsmResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe SubscriptionType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeHsmResponse)
forall (f :: * -> *) a b. Applicative f => 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
"VpcId")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe SubscriptionType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeHsmResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe SubscriptionType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeHsmResponse)
forall (f :: * -> *) a b. Applicative f => 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
"SshKeyLastUpdated")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe SubscriptionType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeHsmResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe SubscriptionType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeHsmResponse)
forall (f :: * -> *) a b. Applicative f => 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
"SubscriptionEndDate")
Either
String
(Maybe Text
-> Maybe SubscriptionType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeHsmResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe SubscriptionType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeHsmResponse)
forall (f :: * -> *) a b. Applicative f => 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
"ServerCertUri")
Either
String
(Maybe SubscriptionType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeHsmResponse)
-> Either String (Maybe SubscriptionType)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeHsmResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe SubscriptionType)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"SubscriptionType")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeHsmResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeHsmResponse)
forall (f :: * -> *) a b. Applicative f => 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
"SshPublicKey")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeHsmResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeHsmResponse)
forall (f :: * -> *) a b. Applicative f => 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
"SubnetId")
Either
String
(Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeHsmResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeHsmResponse)
forall (f :: * -> *) a b. Applicative f => 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
"StatusDetails")
Either
String
(Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeHsmResponse)
-> Either String (Maybe [Text])
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeHsmResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Partitions" Either String (Maybe (Maybe [Text]))
-> Maybe [Text] -> Either String (Maybe [Text])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeHsmResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeHsmResponse)
forall (f :: * -> *) a b. Applicative f => 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
"SubscriptionStartDate")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeHsmResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeHsmResponse)
forall (f :: * -> *) a b. Applicative f => 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
"AvailabilityZone")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeHsmResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeHsmResponse)
forall (f :: * -> *) a b. Applicative f => 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
"ServerCertLastUpdated")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeHsmResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeHsmResponse)
forall (f :: * -> *) a b. Applicative f => 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
"SoftwareVersion")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeHsmResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeHsmResponse)
forall (f :: * -> *) a b. Applicative f => 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
"VendorName")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeHsmResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text -> Maybe Text -> Int -> DescribeHsmResponse)
forall (f :: * -> *) a b. Applicative f => 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
"SerialNumber")
Either
String
(Maybe Text
-> Maybe Text -> Maybe Text -> Int -> DescribeHsmResponse)
-> Either String (Maybe Text)
-> Either
String (Maybe Text -> Maybe Text -> Int -> DescribeHsmResponse)
forall (f :: * -> *) a b. Applicative f => 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 (Maybe Text -> Maybe Text -> Int -> DescribeHsmResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Int -> DescribeHsmResponse)
forall (f :: * -> *) a b. Applicative f => 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
"EniIp")
Either String (Maybe Text -> Int -> DescribeHsmResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeHsmResponse)
forall (f :: * -> *) a b. Applicative f => 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
"HsmType")
Either String (Int -> DescribeHsmResponse)
-> Either String Int -> Either String DescribeHsmResponse
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 DescribeHsm
instance Prelude.NFData DescribeHsm
instance Core.ToHeaders DescribeHsm where
toHeaders :: DescribeHsm -> ResponseHeaders
toHeaders =
ResponseHeaders -> DescribeHsm -> 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.DescribeHsm" ::
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 DescribeHsm where
toJSON :: DescribeHsm -> Value
toJSON DescribeHsm' {Maybe Text
hsmArn :: Maybe Text
hsmSerialNumber :: Maybe Text
$sel:hsmArn:DescribeHsm' :: DescribeHsm -> Maybe Text
$sel:hsmSerialNumber:DescribeHsm' :: DescribeHsm -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"HsmSerialNumber" 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
hsmSerialNumber,
(Text
"HsmArn" 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
hsmArn
]
)
instance Core.ToPath DescribeHsm where
toPath :: DescribeHsm -> ByteString
toPath = ByteString -> DescribeHsm -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DescribeHsm where
toQuery :: DescribeHsm -> QueryString
toQuery = QueryString -> DescribeHsm -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DescribeHsmResponse = DescribeHsmResponse'
{
DescribeHsmResponse -> Maybe HsmStatus
status :: Prelude.Maybe HsmStatus,
DescribeHsmResponse -> Maybe Text
iamRoleArn :: Prelude.Maybe Prelude.Text,
DescribeHsmResponse -> Maybe Text
eniId :: Prelude.Maybe Prelude.Text,
DescribeHsmResponse -> Maybe Text
vpcId :: Prelude.Maybe Prelude.Text,
DescribeHsmResponse -> Maybe Text
sshKeyLastUpdated :: Prelude.Maybe Prelude.Text,
DescribeHsmResponse -> Maybe Text
subscriptionEndDate :: Prelude.Maybe Prelude.Text,
DescribeHsmResponse -> Maybe Text
serverCertUri :: Prelude.Maybe Prelude.Text,
DescribeHsmResponse -> Maybe SubscriptionType
subscriptionType :: Prelude.Maybe SubscriptionType,
DescribeHsmResponse -> Maybe Text
sshPublicKey :: Prelude.Maybe Prelude.Text,
DescribeHsmResponse -> Maybe Text
subnetId :: Prelude.Maybe Prelude.Text,
DescribeHsmResponse -> Maybe Text
statusDetails :: Prelude.Maybe Prelude.Text,
DescribeHsmResponse -> Maybe [Text]
partitions :: Prelude.Maybe [Prelude.Text],
DescribeHsmResponse -> Maybe Text
subscriptionStartDate :: Prelude.Maybe Prelude.Text,
DescribeHsmResponse -> Maybe Text
availabilityZone :: Prelude.Maybe Prelude.Text,
DescribeHsmResponse -> Maybe Text
serverCertLastUpdated :: Prelude.Maybe Prelude.Text,
DescribeHsmResponse -> Maybe Text
softwareVersion :: Prelude.Maybe Prelude.Text,
DescribeHsmResponse -> Maybe Text
vendorName :: Prelude.Maybe Prelude.Text,
DescribeHsmResponse -> Maybe Text
serialNumber :: Prelude.Maybe Prelude.Text,
DescribeHsmResponse -> Maybe Text
hsmArn :: Prelude.Maybe Prelude.Text,
DescribeHsmResponse -> Maybe Text
eniIp :: Prelude.Maybe Prelude.Text,
DescribeHsmResponse -> Maybe Text
hsmType :: Prelude.Maybe Prelude.Text,
DescribeHsmResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeHsmResponse -> DescribeHsmResponse -> Bool
(DescribeHsmResponse -> DescribeHsmResponse -> Bool)
-> (DescribeHsmResponse -> DescribeHsmResponse -> Bool)
-> Eq DescribeHsmResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeHsmResponse -> DescribeHsmResponse -> Bool
$c/= :: DescribeHsmResponse -> DescribeHsmResponse -> Bool
== :: DescribeHsmResponse -> DescribeHsmResponse -> Bool
$c== :: DescribeHsmResponse -> DescribeHsmResponse -> Bool
Prelude.Eq, ReadPrec [DescribeHsmResponse]
ReadPrec DescribeHsmResponse
Int -> ReadS DescribeHsmResponse
ReadS [DescribeHsmResponse]
(Int -> ReadS DescribeHsmResponse)
-> ReadS [DescribeHsmResponse]
-> ReadPrec DescribeHsmResponse
-> ReadPrec [DescribeHsmResponse]
-> Read DescribeHsmResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeHsmResponse]
$creadListPrec :: ReadPrec [DescribeHsmResponse]
readPrec :: ReadPrec DescribeHsmResponse
$creadPrec :: ReadPrec DescribeHsmResponse
readList :: ReadS [DescribeHsmResponse]
$creadList :: ReadS [DescribeHsmResponse]
readsPrec :: Int -> ReadS DescribeHsmResponse
$creadsPrec :: Int -> ReadS DescribeHsmResponse
Prelude.Read, Int -> DescribeHsmResponse -> ShowS
[DescribeHsmResponse] -> ShowS
DescribeHsmResponse -> String
(Int -> DescribeHsmResponse -> ShowS)
-> (DescribeHsmResponse -> String)
-> ([DescribeHsmResponse] -> ShowS)
-> Show DescribeHsmResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeHsmResponse] -> ShowS
$cshowList :: [DescribeHsmResponse] -> ShowS
show :: DescribeHsmResponse -> String
$cshow :: DescribeHsmResponse -> String
showsPrec :: Int -> DescribeHsmResponse -> ShowS
$cshowsPrec :: Int -> DescribeHsmResponse -> ShowS
Prelude.Show, (forall x. DescribeHsmResponse -> Rep DescribeHsmResponse x)
-> (forall x. Rep DescribeHsmResponse x -> DescribeHsmResponse)
-> Generic DescribeHsmResponse
forall x. Rep DescribeHsmResponse x -> DescribeHsmResponse
forall x. DescribeHsmResponse -> Rep DescribeHsmResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeHsmResponse x -> DescribeHsmResponse
$cfrom :: forall x. DescribeHsmResponse -> Rep DescribeHsmResponse x
Prelude.Generic)
newDescribeHsmResponse ::
Prelude.Int ->
DescribeHsmResponse
newDescribeHsmResponse :: Int -> DescribeHsmResponse
newDescribeHsmResponse Int
pHttpStatus_ =
DescribeHsmResponse' :: Maybe HsmStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe SubscriptionType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeHsmResponse
DescribeHsmResponse'
{ $sel:status:DescribeHsmResponse' :: Maybe HsmStatus
status = Maybe HsmStatus
forall a. Maybe a
Prelude.Nothing,
$sel:iamRoleArn:DescribeHsmResponse' :: Maybe Text
iamRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:eniId:DescribeHsmResponse' :: Maybe Text
eniId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:vpcId:DescribeHsmResponse' :: Maybe Text
vpcId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:sshKeyLastUpdated:DescribeHsmResponse' :: Maybe Text
sshKeyLastUpdated = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:subscriptionEndDate:DescribeHsmResponse' :: Maybe Text
subscriptionEndDate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:serverCertUri:DescribeHsmResponse' :: Maybe Text
serverCertUri = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:subscriptionType:DescribeHsmResponse' :: Maybe SubscriptionType
subscriptionType = Maybe SubscriptionType
forall a. Maybe a
Prelude.Nothing,
$sel:sshPublicKey:DescribeHsmResponse' :: Maybe Text
sshPublicKey = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:subnetId:DescribeHsmResponse' :: Maybe Text
subnetId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:statusDetails:DescribeHsmResponse' :: Maybe Text
statusDetails = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:partitions:DescribeHsmResponse' :: Maybe [Text]
partitions = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:subscriptionStartDate:DescribeHsmResponse' :: Maybe Text
subscriptionStartDate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:availabilityZone:DescribeHsmResponse' :: Maybe Text
availabilityZone = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:serverCertLastUpdated:DescribeHsmResponse' :: Maybe Text
serverCertLastUpdated = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:softwareVersion:DescribeHsmResponse' :: Maybe Text
softwareVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:vendorName:DescribeHsmResponse' :: Maybe Text
vendorName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:serialNumber:DescribeHsmResponse' :: Maybe Text
serialNumber = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:hsmArn:DescribeHsmResponse' :: Maybe Text
hsmArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:eniIp:DescribeHsmResponse' :: Maybe Text
eniIp = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:hsmType:DescribeHsmResponse' :: Maybe Text
hsmType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeHsmResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeHsmResponse_status :: Lens.Lens' DescribeHsmResponse (Prelude.Maybe HsmStatus)
describeHsmResponse_status :: (Maybe HsmStatus -> f (Maybe HsmStatus))
-> DescribeHsmResponse -> f DescribeHsmResponse
describeHsmResponse_status = (DescribeHsmResponse -> Maybe HsmStatus)
-> (DescribeHsmResponse -> Maybe HsmStatus -> DescribeHsmResponse)
-> Lens
DescribeHsmResponse
DescribeHsmResponse
(Maybe HsmStatus)
(Maybe HsmStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHsmResponse' {Maybe HsmStatus
status :: Maybe HsmStatus
$sel:status:DescribeHsmResponse' :: DescribeHsmResponse -> Maybe HsmStatus
status} -> Maybe HsmStatus
status) (\s :: DescribeHsmResponse
s@DescribeHsmResponse' {} Maybe HsmStatus
a -> DescribeHsmResponse
s {$sel:status:DescribeHsmResponse' :: Maybe HsmStatus
status = Maybe HsmStatus
a} :: DescribeHsmResponse)
describeHsmResponse_iamRoleArn :: Lens.Lens' DescribeHsmResponse (Prelude.Maybe Prelude.Text)
describeHsmResponse_iamRoleArn :: (Maybe Text -> f (Maybe Text))
-> DescribeHsmResponse -> f DescribeHsmResponse
describeHsmResponse_iamRoleArn = (DescribeHsmResponse -> Maybe Text)
-> (DescribeHsmResponse -> Maybe Text -> DescribeHsmResponse)
-> Lens
DescribeHsmResponse DescribeHsmResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHsmResponse' {Maybe Text
iamRoleArn :: Maybe Text
$sel:iamRoleArn:DescribeHsmResponse' :: DescribeHsmResponse -> Maybe Text
iamRoleArn} -> Maybe Text
iamRoleArn) (\s :: DescribeHsmResponse
s@DescribeHsmResponse' {} Maybe Text
a -> DescribeHsmResponse
s {$sel:iamRoleArn:DescribeHsmResponse' :: Maybe Text
iamRoleArn = Maybe Text
a} :: DescribeHsmResponse)
describeHsmResponse_eniId :: Lens.Lens' DescribeHsmResponse (Prelude.Maybe Prelude.Text)
describeHsmResponse_eniId :: (Maybe Text -> f (Maybe Text))
-> DescribeHsmResponse -> f DescribeHsmResponse
describeHsmResponse_eniId = (DescribeHsmResponse -> Maybe Text)
-> (DescribeHsmResponse -> Maybe Text -> DescribeHsmResponse)
-> Lens
DescribeHsmResponse DescribeHsmResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHsmResponse' {Maybe Text
eniId :: Maybe Text
$sel:eniId:DescribeHsmResponse' :: DescribeHsmResponse -> Maybe Text
eniId} -> Maybe Text
eniId) (\s :: DescribeHsmResponse
s@DescribeHsmResponse' {} Maybe Text
a -> DescribeHsmResponse
s {$sel:eniId:DescribeHsmResponse' :: Maybe Text
eniId = Maybe Text
a} :: DescribeHsmResponse)
describeHsmResponse_vpcId :: Lens.Lens' DescribeHsmResponse (Prelude.Maybe Prelude.Text)
describeHsmResponse_vpcId :: (Maybe Text -> f (Maybe Text))
-> DescribeHsmResponse -> f DescribeHsmResponse
describeHsmResponse_vpcId = (DescribeHsmResponse -> Maybe Text)
-> (DescribeHsmResponse -> Maybe Text -> DescribeHsmResponse)
-> Lens
DescribeHsmResponse DescribeHsmResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHsmResponse' {Maybe Text
vpcId :: Maybe Text
$sel:vpcId:DescribeHsmResponse' :: DescribeHsmResponse -> Maybe Text
vpcId} -> Maybe Text
vpcId) (\s :: DescribeHsmResponse
s@DescribeHsmResponse' {} Maybe Text
a -> DescribeHsmResponse
s {$sel:vpcId:DescribeHsmResponse' :: Maybe Text
vpcId = Maybe Text
a} :: DescribeHsmResponse)
describeHsmResponse_sshKeyLastUpdated :: Lens.Lens' DescribeHsmResponse (Prelude.Maybe Prelude.Text)
describeHsmResponse_sshKeyLastUpdated :: (Maybe Text -> f (Maybe Text))
-> DescribeHsmResponse -> f DescribeHsmResponse
describeHsmResponse_sshKeyLastUpdated = (DescribeHsmResponse -> Maybe Text)
-> (DescribeHsmResponse -> Maybe Text -> DescribeHsmResponse)
-> Lens
DescribeHsmResponse DescribeHsmResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHsmResponse' {Maybe Text
sshKeyLastUpdated :: Maybe Text
$sel:sshKeyLastUpdated:DescribeHsmResponse' :: DescribeHsmResponse -> Maybe Text
sshKeyLastUpdated} -> Maybe Text
sshKeyLastUpdated) (\s :: DescribeHsmResponse
s@DescribeHsmResponse' {} Maybe Text
a -> DescribeHsmResponse
s {$sel:sshKeyLastUpdated:DescribeHsmResponse' :: Maybe Text
sshKeyLastUpdated = Maybe Text
a} :: DescribeHsmResponse)
describeHsmResponse_subscriptionEndDate :: Lens.Lens' DescribeHsmResponse (Prelude.Maybe Prelude.Text)
describeHsmResponse_subscriptionEndDate :: (Maybe Text -> f (Maybe Text))
-> DescribeHsmResponse -> f DescribeHsmResponse
describeHsmResponse_subscriptionEndDate = (DescribeHsmResponse -> Maybe Text)
-> (DescribeHsmResponse -> Maybe Text -> DescribeHsmResponse)
-> Lens
DescribeHsmResponse DescribeHsmResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHsmResponse' {Maybe Text
subscriptionEndDate :: Maybe Text
$sel:subscriptionEndDate:DescribeHsmResponse' :: DescribeHsmResponse -> Maybe Text
subscriptionEndDate} -> Maybe Text
subscriptionEndDate) (\s :: DescribeHsmResponse
s@DescribeHsmResponse' {} Maybe Text
a -> DescribeHsmResponse
s {$sel:subscriptionEndDate:DescribeHsmResponse' :: Maybe Text
subscriptionEndDate = Maybe Text
a} :: DescribeHsmResponse)
describeHsmResponse_serverCertUri :: Lens.Lens' DescribeHsmResponse (Prelude.Maybe Prelude.Text)
describeHsmResponse_serverCertUri :: (Maybe Text -> f (Maybe Text))
-> DescribeHsmResponse -> f DescribeHsmResponse
describeHsmResponse_serverCertUri = (DescribeHsmResponse -> Maybe Text)
-> (DescribeHsmResponse -> Maybe Text -> DescribeHsmResponse)
-> Lens
DescribeHsmResponse DescribeHsmResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHsmResponse' {Maybe Text
serverCertUri :: Maybe Text
$sel:serverCertUri:DescribeHsmResponse' :: DescribeHsmResponse -> Maybe Text
serverCertUri} -> Maybe Text
serverCertUri) (\s :: DescribeHsmResponse
s@DescribeHsmResponse' {} Maybe Text
a -> DescribeHsmResponse
s {$sel:serverCertUri:DescribeHsmResponse' :: Maybe Text
serverCertUri = Maybe Text
a} :: DescribeHsmResponse)
describeHsmResponse_subscriptionType :: Lens.Lens' DescribeHsmResponse (Prelude.Maybe SubscriptionType)
describeHsmResponse_subscriptionType :: (Maybe SubscriptionType -> f (Maybe SubscriptionType))
-> DescribeHsmResponse -> f DescribeHsmResponse
describeHsmResponse_subscriptionType = (DescribeHsmResponse -> Maybe SubscriptionType)
-> (DescribeHsmResponse
-> Maybe SubscriptionType -> DescribeHsmResponse)
-> Lens
DescribeHsmResponse
DescribeHsmResponse
(Maybe SubscriptionType)
(Maybe SubscriptionType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHsmResponse' {Maybe SubscriptionType
subscriptionType :: Maybe SubscriptionType
$sel:subscriptionType:DescribeHsmResponse' :: DescribeHsmResponse -> Maybe SubscriptionType
subscriptionType} -> Maybe SubscriptionType
subscriptionType) (\s :: DescribeHsmResponse
s@DescribeHsmResponse' {} Maybe SubscriptionType
a -> DescribeHsmResponse
s {$sel:subscriptionType:DescribeHsmResponse' :: Maybe SubscriptionType
subscriptionType = Maybe SubscriptionType
a} :: DescribeHsmResponse)
describeHsmResponse_sshPublicKey :: Lens.Lens' DescribeHsmResponse (Prelude.Maybe Prelude.Text)
describeHsmResponse_sshPublicKey :: (Maybe Text -> f (Maybe Text))
-> DescribeHsmResponse -> f DescribeHsmResponse
describeHsmResponse_sshPublicKey = (DescribeHsmResponse -> Maybe Text)
-> (DescribeHsmResponse -> Maybe Text -> DescribeHsmResponse)
-> Lens
DescribeHsmResponse DescribeHsmResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHsmResponse' {Maybe Text
sshPublicKey :: Maybe Text
$sel:sshPublicKey:DescribeHsmResponse' :: DescribeHsmResponse -> Maybe Text
sshPublicKey} -> Maybe Text
sshPublicKey) (\s :: DescribeHsmResponse
s@DescribeHsmResponse' {} Maybe Text
a -> DescribeHsmResponse
s {$sel:sshPublicKey:DescribeHsmResponse' :: Maybe Text
sshPublicKey = Maybe Text
a} :: DescribeHsmResponse)
describeHsmResponse_subnetId :: Lens.Lens' DescribeHsmResponse (Prelude.Maybe Prelude.Text)
describeHsmResponse_subnetId :: (Maybe Text -> f (Maybe Text))
-> DescribeHsmResponse -> f DescribeHsmResponse
describeHsmResponse_subnetId = (DescribeHsmResponse -> Maybe Text)
-> (DescribeHsmResponse -> Maybe Text -> DescribeHsmResponse)
-> Lens
DescribeHsmResponse DescribeHsmResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHsmResponse' {Maybe Text
subnetId :: Maybe Text
$sel:subnetId:DescribeHsmResponse' :: DescribeHsmResponse -> Maybe Text
subnetId} -> Maybe Text
subnetId) (\s :: DescribeHsmResponse
s@DescribeHsmResponse' {} Maybe Text
a -> DescribeHsmResponse
s {$sel:subnetId:DescribeHsmResponse' :: Maybe Text
subnetId = Maybe Text
a} :: DescribeHsmResponse)
describeHsmResponse_statusDetails :: Lens.Lens' DescribeHsmResponse (Prelude.Maybe Prelude.Text)
describeHsmResponse_statusDetails :: (Maybe Text -> f (Maybe Text))
-> DescribeHsmResponse -> f DescribeHsmResponse
describeHsmResponse_statusDetails = (DescribeHsmResponse -> Maybe Text)
-> (DescribeHsmResponse -> Maybe Text -> DescribeHsmResponse)
-> Lens
DescribeHsmResponse DescribeHsmResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHsmResponse' {Maybe Text
statusDetails :: Maybe Text
$sel:statusDetails:DescribeHsmResponse' :: DescribeHsmResponse -> Maybe Text
statusDetails} -> Maybe Text
statusDetails) (\s :: DescribeHsmResponse
s@DescribeHsmResponse' {} Maybe Text
a -> DescribeHsmResponse
s {$sel:statusDetails:DescribeHsmResponse' :: Maybe Text
statusDetails = Maybe Text
a} :: DescribeHsmResponse)
describeHsmResponse_partitions :: Lens.Lens' DescribeHsmResponse (Prelude.Maybe [Prelude.Text])
describeHsmResponse_partitions :: (Maybe [Text] -> f (Maybe [Text]))
-> DescribeHsmResponse -> f DescribeHsmResponse
describeHsmResponse_partitions = (DescribeHsmResponse -> Maybe [Text])
-> (DescribeHsmResponse -> Maybe [Text] -> DescribeHsmResponse)
-> Lens
DescribeHsmResponse
DescribeHsmResponse
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHsmResponse' {Maybe [Text]
partitions :: Maybe [Text]
$sel:partitions:DescribeHsmResponse' :: DescribeHsmResponse -> Maybe [Text]
partitions} -> Maybe [Text]
partitions) (\s :: DescribeHsmResponse
s@DescribeHsmResponse' {} Maybe [Text]
a -> DescribeHsmResponse
s {$sel:partitions:DescribeHsmResponse' :: Maybe [Text]
partitions = Maybe [Text]
a} :: DescribeHsmResponse) ((Maybe [Text] -> f (Maybe [Text]))
-> DescribeHsmResponse -> f DescribeHsmResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DescribeHsmResponse
-> f DescribeHsmResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describeHsmResponse_subscriptionStartDate :: Lens.Lens' DescribeHsmResponse (Prelude.Maybe Prelude.Text)
describeHsmResponse_subscriptionStartDate :: (Maybe Text -> f (Maybe Text))
-> DescribeHsmResponse -> f DescribeHsmResponse
describeHsmResponse_subscriptionStartDate = (DescribeHsmResponse -> Maybe Text)
-> (DescribeHsmResponse -> Maybe Text -> DescribeHsmResponse)
-> Lens
DescribeHsmResponse DescribeHsmResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHsmResponse' {Maybe Text
subscriptionStartDate :: Maybe Text
$sel:subscriptionStartDate:DescribeHsmResponse' :: DescribeHsmResponse -> Maybe Text
subscriptionStartDate} -> Maybe Text
subscriptionStartDate) (\s :: DescribeHsmResponse
s@DescribeHsmResponse' {} Maybe Text
a -> DescribeHsmResponse
s {$sel:subscriptionStartDate:DescribeHsmResponse' :: Maybe Text
subscriptionStartDate = Maybe Text
a} :: DescribeHsmResponse)
describeHsmResponse_availabilityZone :: Lens.Lens' DescribeHsmResponse (Prelude.Maybe Prelude.Text)
describeHsmResponse_availabilityZone :: (Maybe Text -> f (Maybe Text))
-> DescribeHsmResponse -> f DescribeHsmResponse
describeHsmResponse_availabilityZone = (DescribeHsmResponse -> Maybe Text)
-> (DescribeHsmResponse -> Maybe Text -> DescribeHsmResponse)
-> Lens
DescribeHsmResponse DescribeHsmResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHsmResponse' {Maybe Text
availabilityZone :: Maybe Text
$sel:availabilityZone:DescribeHsmResponse' :: DescribeHsmResponse -> Maybe Text
availabilityZone} -> Maybe Text
availabilityZone) (\s :: DescribeHsmResponse
s@DescribeHsmResponse' {} Maybe Text
a -> DescribeHsmResponse
s {$sel:availabilityZone:DescribeHsmResponse' :: Maybe Text
availabilityZone = Maybe Text
a} :: DescribeHsmResponse)
describeHsmResponse_serverCertLastUpdated :: Lens.Lens' DescribeHsmResponse (Prelude.Maybe Prelude.Text)
describeHsmResponse_serverCertLastUpdated :: (Maybe Text -> f (Maybe Text))
-> DescribeHsmResponse -> f DescribeHsmResponse
describeHsmResponse_serverCertLastUpdated = (DescribeHsmResponse -> Maybe Text)
-> (DescribeHsmResponse -> Maybe Text -> DescribeHsmResponse)
-> Lens
DescribeHsmResponse DescribeHsmResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHsmResponse' {Maybe Text
serverCertLastUpdated :: Maybe Text
$sel:serverCertLastUpdated:DescribeHsmResponse' :: DescribeHsmResponse -> Maybe Text
serverCertLastUpdated} -> Maybe Text
serverCertLastUpdated) (\s :: DescribeHsmResponse
s@DescribeHsmResponse' {} Maybe Text
a -> DescribeHsmResponse
s {$sel:serverCertLastUpdated:DescribeHsmResponse' :: Maybe Text
serverCertLastUpdated = Maybe Text
a} :: DescribeHsmResponse)
describeHsmResponse_softwareVersion :: Lens.Lens' DescribeHsmResponse (Prelude.Maybe Prelude.Text)
describeHsmResponse_softwareVersion :: (Maybe Text -> f (Maybe Text))
-> DescribeHsmResponse -> f DescribeHsmResponse
describeHsmResponse_softwareVersion = (DescribeHsmResponse -> Maybe Text)
-> (DescribeHsmResponse -> Maybe Text -> DescribeHsmResponse)
-> Lens
DescribeHsmResponse DescribeHsmResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHsmResponse' {Maybe Text
softwareVersion :: Maybe Text
$sel:softwareVersion:DescribeHsmResponse' :: DescribeHsmResponse -> Maybe Text
softwareVersion} -> Maybe Text
softwareVersion) (\s :: DescribeHsmResponse
s@DescribeHsmResponse' {} Maybe Text
a -> DescribeHsmResponse
s {$sel:softwareVersion:DescribeHsmResponse' :: Maybe Text
softwareVersion = Maybe Text
a} :: DescribeHsmResponse)
describeHsmResponse_vendorName :: Lens.Lens' DescribeHsmResponse (Prelude.Maybe Prelude.Text)
describeHsmResponse_vendorName :: (Maybe Text -> f (Maybe Text))
-> DescribeHsmResponse -> f DescribeHsmResponse
describeHsmResponse_vendorName = (DescribeHsmResponse -> Maybe Text)
-> (DescribeHsmResponse -> Maybe Text -> DescribeHsmResponse)
-> Lens
DescribeHsmResponse DescribeHsmResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHsmResponse' {Maybe Text
vendorName :: Maybe Text
$sel:vendorName:DescribeHsmResponse' :: DescribeHsmResponse -> Maybe Text
vendorName} -> Maybe Text
vendorName) (\s :: DescribeHsmResponse
s@DescribeHsmResponse' {} Maybe Text
a -> DescribeHsmResponse
s {$sel:vendorName:DescribeHsmResponse' :: Maybe Text
vendorName = Maybe Text
a} :: DescribeHsmResponse)
describeHsmResponse_serialNumber :: Lens.Lens' DescribeHsmResponse (Prelude.Maybe Prelude.Text)
describeHsmResponse_serialNumber :: (Maybe Text -> f (Maybe Text))
-> DescribeHsmResponse -> f DescribeHsmResponse
describeHsmResponse_serialNumber = (DescribeHsmResponse -> Maybe Text)
-> (DescribeHsmResponse -> Maybe Text -> DescribeHsmResponse)
-> Lens
DescribeHsmResponse DescribeHsmResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHsmResponse' {Maybe Text
serialNumber :: Maybe Text
$sel:serialNumber:DescribeHsmResponse' :: DescribeHsmResponse -> Maybe Text
serialNumber} -> Maybe Text
serialNumber) (\s :: DescribeHsmResponse
s@DescribeHsmResponse' {} Maybe Text
a -> DescribeHsmResponse
s {$sel:serialNumber:DescribeHsmResponse' :: Maybe Text
serialNumber = Maybe Text
a} :: DescribeHsmResponse)
describeHsmResponse_hsmArn :: Lens.Lens' DescribeHsmResponse (Prelude.Maybe Prelude.Text)
describeHsmResponse_hsmArn :: (Maybe Text -> f (Maybe Text))
-> DescribeHsmResponse -> f DescribeHsmResponse
describeHsmResponse_hsmArn = (DescribeHsmResponse -> Maybe Text)
-> (DescribeHsmResponse -> Maybe Text -> DescribeHsmResponse)
-> Lens
DescribeHsmResponse DescribeHsmResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHsmResponse' {Maybe Text
hsmArn :: Maybe Text
$sel:hsmArn:DescribeHsmResponse' :: DescribeHsmResponse -> Maybe Text
hsmArn} -> Maybe Text
hsmArn) (\s :: DescribeHsmResponse
s@DescribeHsmResponse' {} Maybe Text
a -> DescribeHsmResponse
s {$sel:hsmArn:DescribeHsmResponse' :: Maybe Text
hsmArn = Maybe Text
a} :: DescribeHsmResponse)
describeHsmResponse_eniIp :: Lens.Lens' DescribeHsmResponse (Prelude.Maybe Prelude.Text)
describeHsmResponse_eniIp :: (Maybe Text -> f (Maybe Text))
-> DescribeHsmResponse -> f DescribeHsmResponse
describeHsmResponse_eniIp = (DescribeHsmResponse -> Maybe Text)
-> (DescribeHsmResponse -> Maybe Text -> DescribeHsmResponse)
-> Lens
DescribeHsmResponse DescribeHsmResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHsmResponse' {Maybe Text
eniIp :: Maybe Text
$sel:eniIp:DescribeHsmResponse' :: DescribeHsmResponse -> Maybe Text
eniIp} -> Maybe Text
eniIp) (\s :: DescribeHsmResponse
s@DescribeHsmResponse' {} Maybe Text
a -> DescribeHsmResponse
s {$sel:eniIp:DescribeHsmResponse' :: Maybe Text
eniIp = Maybe Text
a} :: DescribeHsmResponse)
describeHsmResponse_hsmType :: Lens.Lens' DescribeHsmResponse (Prelude.Maybe Prelude.Text)
describeHsmResponse_hsmType :: (Maybe Text -> f (Maybe Text))
-> DescribeHsmResponse -> f DescribeHsmResponse
describeHsmResponse_hsmType = (DescribeHsmResponse -> Maybe Text)
-> (DescribeHsmResponse -> Maybe Text -> DescribeHsmResponse)
-> Lens
DescribeHsmResponse DescribeHsmResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHsmResponse' {Maybe Text
hsmType :: Maybe Text
$sel:hsmType:DescribeHsmResponse' :: DescribeHsmResponse -> Maybe Text
hsmType} -> Maybe Text
hsmType) (\s :: DescribeHsmResponse
s@DescribeHsmResponse' {} Maybe Text
a -> DescribeHsmResponse
s {$sel:hsmType:DescribeHsmResponse' :: Maybe Text
hsmType = Maybe Text
a} :: DescribeHsmResponse)
describeHsmResponse_httpStatus :: Lens.Lens' DescribeHsmResponse Prelude.Int
describeHsmResponse_httpStatus :: (Int -> f Int) -> DescribeHsmResponse -> f DescribeHsmResponse
describeHsmResponse_httpStatus = (DescribeHsmResponse -> Int)
-> (DescribeHsmResponse -> Int -> DescribeHsmResponse)
-> Lens DescribeHsmResponse DescribeHsmResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHsmResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeHsmResponse' :: DescribeHsmResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeHsmResponse
s@DescribeHsmResponse' {} Int
a -> DescribeHsmResponse
s {$sel:httpStatus:DescribeHsmResponse' :: Int
httpStatus = Int
a} :: DescribeHsmResponse)
instance Prelude.NFData DescribeHsmResponse