{-# 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.Redshift.DescribeHsmConfigurations
(
DescribeHsmConfigurations (..),
newDescribeHsmConfigurations,
describeHsmConfigurations_tagValues,
describeHsmConfigurations_hsmConfigurationIdentifier,
describeHsmConfigurations_tagKeys,
describeHsmConfigurations_marker,
describeHsmConfigurations_maxRecords,
DescribeHsmConfigurationsResponse (..),
newDescribeHsmConfigurationsResponse,
describeHsmConfigurationsResponse_marker,
describeHsmConfigurationsResponse_hsmConfigurations,
describeHsmConfigurationsResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Redshift.Types
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DescribeHsmConfigurations = DescribeHsmConfigurations'
{
DescribeHsmConfigurations -> Maybe [Text]
tagValues :: Prelude.Maybe [Prelude.Text],
DescribeHsmConfigurations -> Maybe Text
hsmConfigurationIdentifier :: Prelude.Maybe Prelude.Text,
DescribeHsmConfigurations -> Maybe [Text]
tagKeys :: Prelude.Maybe [Prelude.Text],
DescribeHsmConfigurations -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
DescribeHsmConfigurations -> Maybe Int
maxRecords :: Prelude.Maybe Prelude.Int
}
deriving (DescribeHsmConfigurations -> DescribeHsmConfigurations -> Bool
(DescribeHsmConfigurations -> DescribeHsmConfigurations -> Bool)
-> (DescribeHsmConfigurations -> DescribeHsmConfigurations -> Bool)
-> Eq DescribeHsmConfigurations
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeHsmConfigurations -> DescribeHsmConfigurations -> Bool
$c/= :: DescribeHsmConfigurations -> DescribeHsmConfigurations -> Bool
== :: DescribeHsmConfigurations -> DescribeHsmConfigurations -> Bool
$c== :: DescribeHsmConfigurations -> DescribeHsmConfigurations -> Bool
Prelude.Eq, ReadPrec [DescribeHsmConfigurations]
ReadPrec DescribeHsmConfigurations
Int -> ReadS DescribeHsmConfigurations
ReadS [DescribeHsmConfigurations]
(Int -> ReadS DescribeHsmConfigurations)
-> ReadS [DescribeHsmConfigurations]
-> ReadPrec DescribeHsmConfigurations
-> ReadPrec [DescribeHsmConfigurations]
-> Read DescribeHsmConfigurations
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeHsmConfigurations]
$creadListPrec :: ReadPrec [DescribeHsmConfigurations]
readPrec :: ReadPrec DescribeHsmConfigurations
$creadPrec :: ReadPrec DescribeHsmConfigurations
readList :: ReadS [DescribeHsmConfigurations]
$creadList :: ReadS [DescribeHsmConfigurations]
readsPrec :: Int -> ReadS DescribeHsmConfigurations
$creadsPrec :: Int -> ReadS DescribeHsmConfigurations
Prelude.Read, Int -> DescribeHsmConfigurations -> ShowS
[DescribeHsmConfigurations] -> ShowS
DescribeHsmConfigurations -> String
(Int -> DescribeHsmConfigurations -> ShowS)
-> (DescribeHsmConfigurations -> String)
-> ([DescribeHsmConfigurations] -> ShowS)
-> Show DescribeHsmConfigurations
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeHsmConfigurations] -> ShowS
$cshowList :: [DescribeHsmConfigurations] -> ShowS
show :: DescribeHsmConfigurations -> String
$cshow :: DescribeHsmConfigurations -> String
showsPrec :: Int -> DescribeHsmConfigurations -> ShowS
$cshowsPrec :: Int -> DescribeHsmConfigurations -> ShowS
Prelude.Show, (forall x.
DescribeHsmConfigurations -> Rep DescribeHsmConfigurations x)
-> (forall x.
Rep DescribeHsmConfigurations x -> DescribeHsmConfigurations)
-> Generic DescribeHsmConfigurations
forall x.
Rep DescribeHsmConfigurations x -> DescribeHsmConfigurations
forall x.
DescribeHsmConfigurations -> Rep DescribeHsmConfigurations x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeHsmConfigurations x -> DescribeHsmConfigurations
$cfrom :: forall x.
DescribeHsmConfigurations -> Rep DescribeHsmConfigurations x
Prelude.Generic)
newDescribeHsmConfigurations ::
DescribeHsmConfigurations
newDescribeHsmConfigurations :: DescribeHsmConfigurations
newDescribeHsmConfigurations =
DescribeHsmConfigurations' :: Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Int
-> DescribeHsmConfigurations
DescribeHsmConfigurations'
{ $sel:tagValues:DescribeHsmConfigurations' :: Maybe [Text]
tagValues =
Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:hsmConfigurationIdentifier:DescribeHsmConfigurations' :: Maybe Text
hsmConfigurationIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tagKeys:DescribeHsmConfigurations' :: Maybe [Text]
tagKeys = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:marker:DescribeHsmConfigurations' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxRecords:DescribeHsmConfigurations' :: Maybe Int
maxRecords = Maybe Int
forall a. Maybe a
Prelude.Nothing
}
describeHsmConfigurations_tagValues :: Lens.Lens' DescribeHsmConfigurations (Prelude.Maybe [Prelude.Text])
describeHsmConfigurations_tagValues :: (Maybe [Text] -> f (Maybe [Text]))
-> DescribeHsmConfigurations -> f DescribeHsmConfigurations
describeHsmConfigurations_tagValues = (DescribeHsmConfigurations -> Maybe [Text])
-> (DescribeHsmConfigurations
-> Maybe [Text] -> DescribeHsmConfigurations)
-> Lens
DescribeHsmConfigurations
DescribeHsmConfigurations
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHsmConfigurations' {Maybe [Text]
tagValues :: Maybe [Text]
$sel:tagValues:DescribeHsmConfigurations' :: DescribeHsmConfigurations -> Maybe [Text]
tagValues} -> Maybe [Text]
tagValues) (\s :: DescribeHsmConfigurations
s@DescribeHsmConfigurations' {} Maybe [Text]
a -> DescribeHsmConfigurations
s {$sel:tagValues:DescribeHsmConfigurations' :: Maybe [Text]
tagValues = Maybe [Text]
a} :: DescribeHsmConfigurations) ((Maybe [Text] -> f (Maybe [Text]))
-> DescribeHsmConfigurations -> f DescribeHsmConfigurations)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DescribeHsmConfigurations
-> f DescribeHsmConfigurations
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
describeHsmConfigurations_hsmConfigurationIdentifier :: Lens.Lens' DescribeHsmConfigurations (Prelude.Maybe Prelude.Text)
describeHsmConfigurations_hsmConfigurationIdentifier :: (Maybe Text -> f (Maybe Text))
-> DescribeHsmConfigurations -> f DescribeHsmConfigurations
describeHsmConfigurations_hsmConfigurationIdentifier = (DescribeHsmConfigurations -> Maybe Text)
-> (DescribeHsmConfigurations
-> Maybe Text -> DescribeHsmConfigurations)
-> Lens
DescribeHsmConfigurations
DescribeHsmConfigurations
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHsmConfigurations' {Maybe Text
hsmConfigurationIdentifier :: Maybe Text
$sel:hsmConfigurationIdentifier:DescribeHsmConfigurations' :: DescribeHsmConfigurations -> Maybe Text
hsmConfigurationIdentifier} -> Maybe Text
hsmConfigurationIdentifier) (\s :: DescribeHsmConfigurations
s@DescribeHsmConfigurations' {} Maybe Text
a -> DescribeHsmConfigurations
s {$sel:hsmConfigurationIdentifier:DescribeHsmConfigurations' :: Maybe Text
hsmConfigurationIdentifier = Maybe Text
a} :: DescribeHsmConfigurations)
describeHsmConfigurations_tagKeys :: Lens.Lens' DescribeHsmConfigurations (Prelude.Maybe [Prelude.Text])
describeHsmConfigurations_tagKeys :: (Maybe [Text] -> f (Maybe [Text]))
-> DescribeHsmConfigurations -> f DescribeHsmConfigurations
describeHsmConfigurations_tagKeys = (DescribeHsmConfigurations -> Maybe [Text])
-> (DescribeHsmConfigurations
-> Maybe [Text] -> DescribeHsmConfigurations)
-> Lens
DescribeHsmConfigurations
DescribeHsmConfigurations
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHsmConfigurations' {Maybe [Text]
tagKeys :: Maybe [Text]
$sel:tagKeys:DescribeHsmConfigurations' :: DescribeHsmConfigurations -> Maybe [Text]
tagKeys} -> Maybe [Text]
tagKeys) (\s :: DescribeHsmConfigurations
s@DescribeHsmConfigurations' {} Maybe [Text]
a -> DescribeHsmConfigurations
s {$sel:tagKeys:DescribeHsmConfigurations' :: Maybe [Text]
tagKeys = Maybe [Text]
a} :: DescribeHsmConfigurations) ((Maybe [Text] -> f (Maybe [Text]))
-> DescribeHsmConfigurations -> f DescribeHsmConfigurations)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DescribeHsmConfigurations
-> f DescribeHsmConfigurations
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
describeHsmConfigurations_marker :: Lens.Lens' DescribeHsmConfigurations (Prelude.Maybe Prelude.Text)
describeHsmConfigurations_marker :: (Maybe Text -> f (Maybe Text))
-> DescribeHsmConfigurations -> f DescribeHsmConfigurations
describeHsmConfigurations_marker = (DescribeHsmConfigurations -> Maybe Text)
-> (DescribeHsmConfigurations
-> Maybe Text -> DescribeHsmConfigurations)
-> Lens
DescribeHsmConfigurations
DescribeHsmConfigurations
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHsmConfigurations' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeHsmConfigurations' :: DescribeHsmConfigurations -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeHsmConfigurations
s@DescribeHsmConfigurations' {} Maybe Text
a -> DescribeHsmConfigurations
s {$sel:marker:DescribeHsmConfigurations' :: Maybe Text
marker = Maybe Text
a} :: DescribeHsmConfigurations)
describeHsmConfigurations_maxRecords :: Lens.Lens' DescribeHsmConfigurations (Prelude.Maybe Prelude.Int)
describeHsmConfigurations_maxRecords :: (Maybe Int -> f (Maybe Int))
-> DescribeHsmConfigurations -> f DescribeHsmConfigurations
describeHsmConfigurations_maxRecords = (DescribeHsmConfigurations -> Maybe Int)
-> (DescribeHsmConfigurations
-> Maybe Int -> DescribeHsmConfigurations)
-> Lens
DescribeHsmConfigurations
DescribeHsmConfigurations
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHsmConfigurations' {Maybe Int
maxRecords :: Maybe Int
$sel:maxRecords:DescribeHsmConfigurations' :: DescribeHsmConfigurations -> Maybe Int
maxRecords} -> Maybe Int
maxRecords) (\s :: DescribeHsmConfigurations
s@DescribeHsmConfigurations' {} Maybe Int
a -> DescribeHsmConfigurations
s {$sel:maxRecords:DescribeHsmConfigurations' :: Maybe Int
maxRecords = Maybe Int
a} :: DescribeHsmConfigurations)
instance Core.AWSPager DescribeHsmConfigurations where
page :: DescribeHsmConfigurations
-> AWSResponse DescribeHsmConfigurations
-> Maybe DescribeHsmConfigurations
page DescribeHsmConfigurations
rq AWSResponse DescribeHsmConfigurations
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeHsmConfigurations
DescribeHsmConfigurationsResponse
rs
DescribeHsmConfigurationsResponse
-> Getting (First Text) DescribeHsmConfigurationsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeHsmConfigurationsResponse
-> Const (First Text) DescribeHsmConfigurationsResponse
Lens' DescribeHsmConfigurationsResponse (Maybe Text)
describeHsmConfigurationsResponse_marker
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeHsmConfigurationsResponse
-> Const (First Text) DescribeHsmConfigurationsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeHsmConfigurationsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe DescribeHsmConfigurations
forall a. Maybe a
Prelude.Nothing
| Maybe [HsmConfiguration] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeHsmConfigurations
DescribeHsmConfigurationsResponse
rs
DescribeHsmConfigurationsResponse
-> Getting
(First [HsmConfiguration])
DescribeHsmConfigurationsResponse
[HsmConfiguration]
-> Maybe [HsmConfiguration]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [HsmConfiguration]
-> Const (First [HsmConfiguration]) (Maybe [HsmConfiguration]))
-> DescribeHsmConfigurationsResponse
-> Const
(First [HsmConfiguration]) DescribeHsmConfigurationsResponse
Lens' DescribeHsmConfigurationsResponse (Maybe [HsmConfiguration])
describeHsmConfigurationsResponse_hsmConfigurations
((Maybe [HsmConfiguration]
-> Const (First [HsmConfiguration]) (Maybe [HsmConfiguration]))
-> DescribeHsmConfigurationsResponse
-> Const
(First [HsmConfiguration]) DescribeHsmConfigurationsResponse)
-> (([HsmConfiguration]
-> Const (First [HsmConfiguration]) [HsmConfiguration])
-> Maybe [HsmConfiguration]
-> Const (First [HsmConfiguration]) (Maybe [HsmConfiguration]))
-> Getting
(First [HsmConfiguration])
DescribeHsmConfigurationsResponse
[HsmConfiguration]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([HsmConfiguration]
-> Const (First [HsmConfiguration]) [HsmConfiguration])
-> Maybe [HsmConfiguration]
-> Const (First [HsmConfiguration]) (Maybe [HsmConfiguration])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe DescribeHsmConfigurations
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
DescribeHsmConfigurations -> Maybe DescribeHsmConfigurations
forall a. a -> Maybe a
Prelude.Just (DescribeHsmConfigurations -> Maybe DescribeHsmConfigurations)
-> DescribeHsmConfigurations -> Maybe DescribeHsmConfigurations
forall a b. (a -> b) -> a -> b
Prelude.$
DescribeHsmConfigurations
rq
DescribeHsmConfigurations
-> (DescribeHsmConfigurations -> DescribeHsmConfigurations)
-> DescribeHsmConfigurations
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribeHsmConfigurations -> Identity DescribeHsmConfigurations
Lens
DescribeHsmConfigurations
DescribeHsmConfigurations
(Maybe Text)
(Maybe Text)
describeHsmConfigurations_marker
((Maybe Text -> Identity (Maybe Text))
-> DescribeHsmConfigurations -> Identity DescribeHsmConfigurations)
-> Maybe Text
-> DescribeHsmConfigurations
-> DescribeHsmConfigurations
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeHsmConfigurations
DescribeHsmConfigurationsResponse
rs
DescribeHsmConfigurationsResponse
-> Getting (First Text) DescribeHsmConfigurationsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeHsmConfigurationsResponse
-> Const (First Text) DescribeHsmConfigurationsResponse
Lens' DescribeHsmConfigurationsResponse (Maybe Text)
describeHsmConfigurationsResponse_marker
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeHsmConfigurationsResponse
-> Const (First Text) DescribeHsmConfigurationsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeHsmConfigurationsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
instance Core.AWSRequest DescribeHsmConfigurations where
type
AWSResponse DescribeHsmConfigurations =
DescribeHsmConfigurationsResponse
request :: DescribeHsmConfigurations -> Request DescribeHsmConfigurations
request = Service
-> DescribeHsmConfigurations -> Request DescribeHsmConfigurations
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeHsmConfigurations
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeHsmConfigurations)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse DescribeHsmConfigurations))
-> Logger
-> Service
-> Proxy DescribeHsmConfigurations
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeHsmConfigurations)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
-> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
Text
"DescribeHsmConfigurationsResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe Text
-> Maybe [HsmConfiguration]
-> Int
-> DescribeHsmConfigurationsResponse
DescribeHsmConfigurationsResponse'
(Maybe Text
-> Maybe [HsmConfiguration]
-> Int
-> DescribeHsmConfigurationsResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe [HsmConfiguration]
-> Int -> DescribeHsmConfigurationsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Marker")
Either
String
(Maybe [HsmConfiguration]
-> Int -> DescribeHsmConfigurationsResponse)
-> Either String (Maybe [HsmConfiguration])
-> Either String (Int -> DescribeHsmConfigurationsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"HsmConfigurations"
Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
Either String [Node]
-> ([Node] -> Either String (Maybe [HsmConfiguration]))
-> Either String (Maybe [HsmConfiguration])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [HsmConfiguration])
-> [Node] -> Either String (Maybe [HsmConfiguration])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [HsmConfiguration]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"HsmConfiguration")
)
Either String (Int -> DescribeHsmConfigurationsResponse)
-> Either String Int
-> Either String DescribeHsmConfigurationsResponse
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 DescribeHsmConfigurations
instance Prelude.NFData DescribeHsmConfigurations
instance Core.ToHeaders DescribeHsmConfigurations where
toHeaders :: DescribeHsmConfigurations -> ResponseHeaders
toHeaders = ResponseHeaders -> DescribeHsmConfigurations -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath DescribeHsmConfigurations where
toPath :: DescribeHsmConfigurations -> ByteString
toPath = ByteString -> DescribeHsmConfigurations -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DescribeHsmConfigurations where
toQuery :: DescribeHsmConfigurations -> QueryString
toQuery DescribeHsmConfigurations' {Maybe Int
Maybe [Text]
Maybe Text
maxRecords :: Maybe Int
marker :: Maybe Text
tagKeys :: Maybe [Text]
hsmConfigurationIdentifier :: Maybe Text
tagValues :: Maybe [Text]
$sel:maxRecords:DescribeHsmConfigurations' :: DescribeHsmConfigurations -> Maybe Int
$sel:marker:DescribeHsmConfigurations' :: DescribeHsmConfigurations -> Maybe Text
$sel:tagKeys:DescribeHsmConfigurations' :: DescribeHsmConfigurations -> Maybe [Text]
$sel:hsmConfigurationIdentifier:DescribeHsmConfigurations' :: DescribeHsmConfigurations -> Maybe Text
$sel:tagValues:DescribeHsmConfigurations' :: DescribeHsmConfigurations -> Maybe [Text]
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"DescribeHsmConfigurations" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2012-12-01" :: Prelude.ByteString),
ByteString
"TagValues"
ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
(ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"TagValue" ([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
tagValues),
ByteString
"HsmConfigurationIdentifier"
ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
hsmConfigurationIdentifier,
ByteString
"TagKeys"
ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
(ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"TagKey" ([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
tagKeys),
ByteString
"Marker" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
marker,
ByteString
"MaxRecords" ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
maxRecords
]
data DescribeHsmConfigurationsResponse = DescribeHsmConfigurationsResponse'
{
DescribeHsmConfigurationsResponse -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
DescribeHsmConfigurationsResponse -> Maybe [HsmConfiguration]
hsmConfigurations :: Prelude.Maybe [HsmConfiguration],
DescribeHsmConfigurationsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeHsmConfigurationsResponse
-> DescribeHsmConfigurationsResponse -> Bool
(DescribeHsmConfigurationsResponse
-> DescribeHsmConfigurationsResponse -> Bool)
-> (DescribeHsmConfigurationsResponse
-> DescribeHsmConfigurationsResponse -> Bool)
-> Eq DescribeHsmConfigurationsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeHsmConfigurationsResponse
-> DescribeHsmConfigurationsResponse -> Bool
$c/= :: DescribeHsmConfigurationsResponse
-> DescribeHsmConfigurationsResponse -> Bool
== :: DescribeHsmConfigurationsResponse
-> DescribeHsmConfigurationsResponse -> Bool
$c== :: DescribeHsmConfigurationsResponse
-> DescribeHsmConfigurationsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeHsmConfigurationsResponse]
ReadPrec DescribeHsmConfigurationsResponse
Int -> ReadS DescribeHsmConfigurationsResponse
ReadS [DescribeHsmConfigurationsResponse]
(Int -> ReadS DescribeHsmConfigurationsResponse)
-> ReadS [DescribeHsmConfigurationsResponse]
-> ReadPrec DescribeHsmConfigurationsResponse
-> ReadPrec [DescribeHsmConfigurationsResponse]
-> Read DescribeHsmConfigurationsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeHsmConfigurationsResponse]
$creadListPrec :: ReadPrec [DescribeHsmConfigurationsResponse]
readPrec :: ReadPrec DescribeHsmConfigurationsResponse
$creadPrec :: ReadPrec DescribeHsmConfigurationsResponse
readList :: ReadS [DescribeHsmConfigurationsResponse]
$creadList :: ReadS [DescribeHsmConfigurationsResponse]
readsPrec :: Int -> ReadS DescribeHsmConfigurationsResponse
$creadsPrec :: Int -> ReadS DescribeHsmConfigurationsResponse
Prelude.Read, Int -> DescribeHsmConfigurationsResponse -> ShowS
[DescribeHsmConfigurationsResponse] -> ShowS
DescribeHsmConfigurationsResponse -> String
(Int -> DescribeHsmConfigurationsResponse -> ShowS)
-> (DescribeHsmConfigurationsResponse -> String)
-> ([DescribeHsmConfigurationsResponse] -> ShowS)
-> Show DescribeHsmConfigurationsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeHsmConfigurationsResponse] -> ShowS
$cshowList :: [DescribeHsmConfigurationsResponse] -> ShowS
show :: DescribeHsmConfigurationsResponse -> String
$cshow :: DescribeHsmConfigurationsResponse -> String
showsPrec :: Int -> DescribeHsmConfigurationsResponse -> ShowS
$cshowsPrec :: Int -> DescribeHsmConfigurationsResponse -> ShowS
Prelude.Show, (forall x.
DescribeHsmConfigurationsResponse
-> Rep DescribeHsmConfigurationsResponse x)
-> (forall x.
Rep DescribeHsmConfigurationsResponse x
-> DescribeHsmConfigurationsResponse)
-> Generic DescribeHsmConfigurationsResponse
forall x.
Rep DescribeHsmConfigurationsResponse x
-> DescribeHsmConfigurationsResponse
forall x.
DescribeHsmConfigurationsResponse
-> Rep DescribeHsmConfigurationsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeHsmConfigurationsResponse x
-> DescribeHsmConfigurationsResponse
$cfrom :: forall x.
DescribeHsmConfigurationsResponse
-> Rep DescribeHsmConfigurationsResponse x
Prelude.Generic)
newDescribeHsmConfigurationsResponse ::
Prelude.Int ->
DescribeHsmConfigurationsResponse
newDescribeHsmConfigurationsResponse :: Int -> DescribeHsmConfigurationsResponse
newDescribeHsmConfigurationsResponse Int
pHttpStatus_ =
DescribeHsmConfigurationsResponse' :: Maybe Text
-> Maybe [HsmConfiguration]
-> Int
-> DescribeHsmConfigurationsResponse
DescribeHsmConfigurationsResponse'
{ $sel:marker:DescribeHsmConfigurationsResponse' :: Maybe Text
marker =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:hsmConfigurations:DescribeHsmConfigurationsResponse' :: Maybe [HsmConfiguration]
hsmConfigurations = Maybe [HsmConfiguration]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeHsmConfigurationsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeHsmConfigurationsResponse_marker :: Lens.Lens' DescribeHsmConfigurationsResponse (Prelude.Maybe Prelude.Text)
describeHsmConfigurationsResponse_marker :: (Maybe Text -> f (Maybe Text))
-> DescribeHsmConfigurationsResponse
-> f DescribeHsmConfigurationsResponse
describeHsmConfigurationsResponse_marker = (DescribeHsmConfigurationsResponse -> Maybe Text)
-> (DescribeHsmConfigurationsResponse
-> Maybe Text -> DescribeHsmConfigurationsResponse)
-> Lens' DescribeHsmConfigurationsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHsmConfigurationsResponse' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeHsmConfigurationsResponse' :: DescribeHsmConfigurationsResponse -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeHsmConfigurationsResponse
s@DescribeHsmConfigurationsResponse' {} Maybe Text
a -> DescribeHsmConfigurationsResponse
s {$sel:marker:DescribeHsmConfigurationsResponse' :: Maybe Text
marker = Maybe Text
a} :: DescribeHsmConfigurationsResponse)
describeHsmConfigurationsResponse_hsmConfigurations :: Lens.Lens' DescribeHsmConfigurationsResponse (Prelude.Maybe [HsmConfiguration])
describeHsmConfigurationsResponse_hsmConfigurations :: (Maybe [HsmConfiguration] -> f (Maybe [HsmConfiguration]))
-> DescribeHsmConfigurationsResponse
-> f DescribeHsmConfigurationsResponse
describeHsmConfigurationsResponse_hsmConfigurations = (DescribeHsmConfigurationsResponse -> Maybe [HsmConfiguration])
-> (DescribeHsmConfigurationsResponse
-> Maybe [HsmConfiguration] -> DescribeHsmConfigurationsResponse)
-> Lens'
DescribeHsmConfigurationsResponse (Maybe [HsmConfiguration])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHsmConfigurationsResponse' {Maybe [HsmConfiguration]
hsmConfigurations :: Maybe [HsmConfiguration]
$sel:hsmConfigurations:DescribeHsmConfigurationsResponse' :: DescribeHsmConfigurationsResponse -> Maybe [HsmConfiguration]
hsmConfigurations} -> Maybe [HsmConfiguration]
hsmConfigurations) (\s :: DescribeHsmConfigurationsResponse
s@DescribeHsmConfigurationsResponse' {} Maybe [HsmConfiguration]
a -> DescribeHsmConfigurationsResponse
s {$sel:hsmConfigurations:DescribeHsmConfigurationsResponse' :: Maybe [HsmConfiguration]
hsmConfigurations = Maybe [HsmConfiguration]
a} :: DescribeHsmConfigurationsResponse) ((Maybe [HsmConfiguration] -> f (Maybe [HsmConfiguration]))
-> DescribeHsmConfigurationsResponse
-> f DescribeHsmConfigurationsResponse)
-> ((Maybe [HsmConfiguration] -> f (Maybe [HsmConfiguration]))
-> Maybe [HsmConfiguration] -> f (Maybe [HsmConfiguration]))
-> (Maybe [HsmConfiguration] -> f (Maybe [HsmConfiguration]))
-> DescribeHsmConfigurationsResponse
-> f DescribeHsmConfigurationsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[HsmConfiguration]
[HsmConfiguration]
[HsmConfiguration]
[HsmConfiguration]
-> Iso
(Maybe [HsmConfiguration])
(Maybe [HsmConfiguration])
(Maybe [HsmConfiguration])
(Maybe [HsmConfiguration])
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
[HsmConfiguration]
[HsmConfiguration]
[HsmConfiguration]
[HsmConfiguration]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describeHsmConfigurationsResponse_httpStatus :: Lens.Lens' DescribeHsmConfigurationsResponse Prelude.Int
describeHsmConfigurationsResponse_httpStatus :: (Int -> f Int)
-> DescribeHsmConfigurationsResponse
-> f DescribeHsmConfigurationsResponse
describeHsmConfigurationsResponse_httpStatus = (DescribeHsmConfigurationsResponse -> Int)
-> (DescribeHsmConfigurationsResponse
-> Int -> DescribeHsmConfigurationsResponse)
-> Lens
DescribeHsmConfigurationsResponse
DescribeHsmConfigurationsResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHsmConfigurationsResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeHsmConfigurationsResponse' :: DescribeHsmConfigurationsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeHsmConfigurationsResponse
s@DescribeHsmConfigurationsResponse' {} Int
a -> DescribeHsmConfigurationsResponse
s {$sel:httpStatus:DescribeHsmConfigurationsResponse' :: Int
httpStatus = Int
a} :: DescribeHsmConfigurationsResponse)
instance
Prelude.NFData
DescribeHsmConfigurationsResponse