{-# 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.DescribeHsmClientCertificates
(
DescribeHsmClientCertificates (..),
newDescribeHsmClientCertificates,
describeHsmClientCertificates_tagValues,
describeHsmClientCertificates_tagKeys,
describeHsmClientCertificates_hsmClientCertificateIdentifier,
describeHsmClientCertificates_marker,
describeHsmClientCertificates_maxRecords,
DescribeHsmClientCertificatesResponse (..),
newDescribeHsmClientCertificatesResponse,
describeHsmClientCertificatesResponse_marker,
describeHsmClientCertificatesResponse_hsmClientCertificates,
describeHsmClientCertificatesResponse_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 DescribeHsmClientCertificates = DescribeHsmClientCertificates'
{
DescribeHsmClientCertificates -> Maybe [Text]
tagValues :: Prelude.Maybe [Prelude.Text],
DescribeHsmClientCertificates -> Maybe [Text]
tagKeys :: Prelude.Maybe [Prelude.Text],
DescribeHsmClientCertificates -> Maybe Text
hsmClientCertificateIdentifier :: Prelude.Maybe Prelude.Text,
DescribeHsmClientCertificates -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
DescribeHsmClientCertificates -> Maybe Int
maxRecords :: Prelude.Maybe Prelude.Int
}
deriving (DescribeHsmClientCertificates
-> DescribeHsmClientCertificates -> Bool
(DescribeHsmClientCertificates
-> DescribeHsmClientCertificates -> Bool)
-> (DescribeHsmClientCertificates
-> DescribeHsmClientCertificates -> Bool)
-> Eq DescribeHsmClientCertificates
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeHsmClientCertificates
-> DescribeHsmClientCertificates -> Bool
$c/= :: DescribeHsmClientCertificates
-> DescribeHsmClientCertificates -> Bool
== :: DescribeHsmClientCertificates
-> DescribeHsmClientCertificates -> Bool
$c== :: DescribeHsmClientCertificates
-> DescribeHsmClientCertificates -> Bool
Prelude.Eq, ReadPrec [DescribeHsmClientCertificates]
ReadPrec DescribeHsmClientCertificates
Int -> ReadS DescribeHsmClientCertificates
ReadS [DescribeHsmClientCertificates]
(Int -> ReadS DescribeHsmClientCertificates)
-> ReadS [DescribeHsmClientCertificates]
-> ReadPrec DescribeHsmClientCertificates
-> ReadPrec [DescribeHsmClientCertificates]
-> Read DescribeHsmClientCertificates
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeHsmClientCertificates]
$creadListPrec :: ReadPrec [DescribeHsmClientCertificates]
readPrec :: ReadPrec DescribeHsmClientCertificates
$creadPrec :: ReadPrec DescribeHsmClientCertificates
readList :: ReadS [DescribeHsmClientCertificates]
$creadList :: ReadS [DescribeHsmClientCertificates]
readsPrec :: Int -> ReadS DescribeHsmClientCertificates
$creadsPrec :: Int -> ReadS DescribeHsmClientCertificates
Prelude.Read, Int -> DescribeHsmClientCertificates -> ShowS
[DescribeHsmClientCertificates] -> ShowS
DescribeHsmClientCertificates -> String
(Int -> DescribeHsmClientCertificates -> ShowS)
-> (DescribeHsmClientCertificates -> String)
-> ([DescribeHsmClientCertificates] -> ShowS)
-> Show DescribeHsmClientCertificates
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeHsmClientCertificates] -> ShowS
$cshowList :: [DescribeHsmClientCertificates] -> ShowS
show :: DescribeHsmClientCertificates -> String
$cshow :: DescribeHsmClientCertificates -> String
showsPrec :: Int -> DescribeHsmClientCertificates -> ShowS
$cshowsPrec :: Int -> DescribeHsmClientCertificates -> ShowS
Prelude.Show, (forall x.
DescribeHsmClientCertificates
-> Rep DescribeHsmClientCertificates x)
-> (forall x.
Rep DescribeHsmClientCertificates x
-> DescribeHsmClientCertificates)
-> Generic DescribeHsmClientCertificates
forall x.
Rep DescribeHsmClientCertificates x
-> DescribeHsmClientCertificates
forall x.
DescribeHsmClientCertificates
-> Rep DescribeHsmClientCertificates x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeHsmClientCertificates x
-> DescribeHsmClientCertificates
$cfrom :: forall x.
DescribeHsmClientCertificates
-> Rep DescribeHsmClientCertificates x
Prelude.Generic)
newDescribeHsmClientCertificates ::
DescribeHsmClientCertificates
newDescribeHsmClientCertificates :: DescribeHsmClientCertificates
newDescribeHsmClientCertificates =
DescribeHsmClientCertificates' :: Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> DescribeHsmClientCertificates
DescribeHsmClientCertificates'
{ $sel:tagValues:DescribeHsmClientCertificates' :: Maybe [Text]
tagValues =
Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:tagKeys:DescribeHsmClientCertificates' :: Maybe [Text]
tagKeys = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:hsmClientCertificateIdentifier:DescribeHsmClientCertificates' :: Maybe Text
hsmClientCertificateIdentifier =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:marker:DescribeHsmClientCertificates' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxRecords:DescribeHsmClientCertificates' :: Maybe Int
maxRecords = Maybe Int
forall a. Maybe a
Prelude.Nothing
}
describeHsmClientCertificates_tagValues :: Lens.Lens' DescribeHsmClientCertificates (Prelude.Maybe [Prelude.Text])
describeHsmClientCertificates_tagValues :: (Maybe [Text] -> f (Maybe [Text]))
-> DescribeHsmClientCertificates -> f DescribeHsmClientCertificates
describeHsmClientCertificates_tagValues = (DescribeHsmClientCertificates -> Maybe [Text])
-> (DescribeHsmClientCertificates
-> Maybe [Text] -> DescribeHsmClientCertificates)
-> Lens
DescribeHsmClientCertificates
DescribeHsmClientCertificates
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHsmClientCertificates' {Maybe [Text]
tagValues :: Maybe [Text]
$sel:tagValues:DescribeHsmClientCertificates' :: DescribeHsmClientCertificates -> Maybe [Text]
tagValues} -> Maybe [Text]
tagValues) (\s :: DescribeHsmClientCertificates
s@DescribeHsmClientCertificates' {} Maybe [Text]
a -> DescribeHsmClientCertificates
s {$sel:tagValues:DescribeHsmClientCertificates' :: Maybe [Text]
tagValues = Maybe [Text]
a} :: DescribeHsmClientCertificates) ((Maybe [Text] -> f (Maybe [Text]))
-> DescribeHsmClientCertificates
-> f DescribeHsmClientCertificates)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DescribeHsmClientCertificates
-> f DescribeHsmClientCertificates
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
describeHsmClientCertificates_tagKeys :: Lens.Lens' DescribeHsmClientCertificates (Prelude.Maybe [Prelude.Text])
describeHsmClientCertificates_tagKeys :: (Maybe [Text] -> f (Maybe [Text]))
-> DescribeHsmClientCertificates -> f DescribeHsmClientCertificates
describeHsmClientCertificates_tagKeys = (DescribeHsmClientCertificates -> Maybe [Text])
-> (DescribeHsmClientCertificates
-> Maybe [Text] -> DescribeHsmClientCertificates)
-> Lens
DescribeHsmClientCertificates
DescribeHsmClientCertificates
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHsmClientCertificates' {Maybe [Text]
tagKeys :: Maybe [Text]
$sel:tagKeys:DescribeHsmClientCertificates' :: DescribeHsmClientCertificates -> Maybe [Text]
tagKeys} -> Maybe [Text]
tagKeys) (\s :: DescribeHsmClientCertificates
s@DescribeHsmClientCertificates' {} Maybe [Text]
a -> DescribeHsmClientCertificates
s {$sel:tagKeys:DescribeHsmClientCertificates' :: Maybe [Text]
tagKeys = Maybe [Text]
a} :: DescribeHsmClientCertificates) ((Maybe [Text] -> f (Maybe [Text]))
-> DescribeHsmClientCertificates
-> f DescribeHsmClientCertificates)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DescribeHsmClientCertificates
-> f DescribeHsmClientCertificates
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
describeHsmClientCertificates_hsmClientCertificateIdentifier :: Lens.Lens' DescribeHsmClientCertificates (Prelude.Maybe Prelude.Text)
describeHsmClientCertificates_hsmClientCertificateIdentifier :: (Maybe Text -> f (Maybe Text))
-> DescribeHsmClientCertificates -> f DescribeHsmClientCertificates
describeHsmClientCertificates_hsmClientCertificateIdentifier = (DescribeHsmClientCertificates -> Maybe Text)
-> (DescribeHsmClientCertificates
-> Maybe Text -> DescribeHsmClientCertificates)
-> Lens
DescribeHsmClientCertificates
DescribeHsmClientCertificates
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHsmClientCertificates' {Maybe Text
hsmClientCertificateIdentifier :: Maybe Text
$sel:hsmClientCertificateIdentifier:DescribeHsmClientCertificates' :: DescribeHsmClientCertificates -> Maybe Text
hsmClientCertificateIdentifier} -> Maybe Text
hsmClientCertificateIdentifier) (\s :: DescribeHsmClientCertificates
s@DescribeHsmClientCertificates' {} Maybe Text
a -> DescribeHsmClientCertificates
s {$sel:hsmClientCertificateIdentifier:DescribeHsmClientCertificates' :: Maybe Text
hsmClientCertificateIdentifier = Maybe Text
a} :: DescribeHsmClientCertificates)
describeHsmClientCertificates_marker :: Lens.Lens' DescribeHsmClientCertificates (Prelude.Maybe Prelude.Text)
describeHsmClientCertificates_marker :: (Maybe Text -> f (Maybe Text))
-> DescribeHsmClientCertificates -> f DescribeHsmClientCertificates
describeHsmClientCertificates_marker = (DescribeHsmClientCertificates -> Maybe Text)
-> (DescribeHsmClientCertificates
-> Maybe Text -> DescribeHsmClientCertificates)
-> Lens
DescribeHsmClientCertificates
DescribeHsmClientCertificates
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHsmClientCertificates' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeHsmClientCertificates' :: DescribeHsmClientCertificates -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeHsmClientCertificates
s@DescribeHsmClientCertificates' {} Maybe Text
a -> DescribeHsmClientCertificates
s {$sel:marker:DescribeHsmClientCertificates' :: Maybe Text
marker = Maybe Text
a} :: DescribeHsmClientCertificates)
describeHsmClientCertificates_maxRecords :: Lens.Lens' DescribeHsmClientCertificates (Prelude.Maybe Prelude.Int)
describeHsmClientCertificates_maxRecords :: (Maybe Int -> f (Maybe Int))
-> DescribeHsmClientCertificates -> f DescribeHsmClientCertificates
describeHsmClientCertificates_maxRecords = (DescribeHsmClientCertificates -> Maybe Int)
-> (DescribeHsmClientCertificates
-> Maybe Int -> DescribeHsmClientCertificates)
-> Lens
DescribeHsmClientCertificates
DescribeHsmClientCertificates
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHsmClientCertificates' {Maybe Int
maxRecords :: Maybe Int
$sel:maxRecords:DescribeHsmClientCertificates' :: DescribeHsmClientCertificates -> Maybe Int
maxRecords} -> Maybe Int
maxRecords) (\s :: DescribeHsmClientCertificates
s@DescribeHsmClientCertificates' {} Maybe Int
a -> DescribeHsmClientCertificates
s {$sel:maxRecords:DescribeHsmClientCertificates' :: Maybe Int
maxRecords = Maybe Int
a} :: DescribeHsmClientCertificates)
instance Core.AWSPager DescribeHsmClientCertificates where
page :: DescribeHsmClientCertificates
-> AWSResponse DescribeHsmClientCertificates
-> Maybe DescribeHsmClientCertificates
page DescribeHsmClientCertificates
rq AWSResponse DescribeHsmClientCertificates
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeHsmClientCertificates
DescribeHsmClientCertificatesResponse
rs
DescribeHsmClientCertificatesResponse
-> Getting (First Text) DescribeHsmClientCertificatesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeHsmClientCertificatesResponse
-> Const (First Text) DescribeHsmClientCertificatesResponse
Lens' DescribeHsmClientCertificatesResponse (Maybe Text)
describeHsmClientCertificatesResponse_marker
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeHsmClientCertificatesResponse
-> Const (First Text) DescribeHsmClientCertificatesResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeHsmClientCertificatesResponse 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 DescribeHsmClientCertificates
forall a. Maybe a
Prelude.Nothing
| Maybe [HsmClientCertificate] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeHsmClientCertificates
DescribeHsmClientCertificatesResponse
rs
DescribeHsmClientCertificatesResponse
-> Getting
(First [HsmClientCertificate])
DescribeHsmClientCertificatesResponse
[HsmClientCertificate]
-> Maybe [HsmClientCertificate]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [HsmClientCertificate]
-> Const
(First [HsmClientCertificate]) (Maybe [HsmClientCertificate]))
-> DescribeHsmClientCertificatesResponse
-> Const
(First [HsmClientCertificate])
DescribeHsmClientCertificatesResponse
Lens'
DescribeHsmClientCertificatesResponse
(Maybe [HsmClientCertificate])
describeHsmClientCertificatesResponse_hsmClientCertificates
((Maybe [HsmClientCertificate]
-> Const
(First [HsmClientCertificate]) (Maybe [HsmClientCertificate]))
-> DescribeHsmClientCertificatesResponse
-> Const
(First [HsmClientCertificate])
DescribeHsmClientCertificatesResponse)
-> (([HsmClientCertificate]
-> Const (First [HsmClientCertificate]) [HsmClientCertificate])
-> Maybe [HsmClientCertificate]
-> Const
(First [HsmClientCertificate]) (Maybe [HsmClientCertificate]))
-> Getting
(First [HsmClientCertificate])
DescribeHsmClientCertificatesResponse
[HsmClientCertificate]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([HsmClientCertificate]
-> Const (First [HsmClientCertificate]) [HsmClientCertificate])
-> Maybe [HsmClientCertificate]
-> Const
(First [HsmClientCertificate]) (Maybe [HsmClientCertificate])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe DescribeHsmClientCertificates
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
DescribeHsmClientCertificates
-> Maybe DescribeHsmClientCertificates
forall a. a -> Maybe a
Prelude.Just (DescribeHsmClientCertificates
-> Maybe DescribeHsmClientCertificates)
-> DescribeHsmClientCertificates
-> Maybe DescribeHsmClientCertificates
forall a b. (a -> b) -> a -> b
Prelude.$
DescribeHsmClientCertificates
rq
DescribeHsmClientCertificates
-> (DescribeHsmClientCertificates -> DescribeHsmClientCertificates)
-> DescribeHsmClientCertificates
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribeHsmClientCertificates
-> Identity DescribeHsmClientCertificates
Lens
DescribeHsmClientCertificates
DescribeHsmClientCertificates
(Maybe Text)
(Maybe Text)
describeHsmClientCertificates_marker
((Maybe Text -> Identity (Maybe Text))
-> DescribeHsmClientCertificates
-> Identity DescribeHsmClientCertificates)
-> Maybe Text
-> DescribeHsmClientCertificates
-> DescribeHsmClientCertificates
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeHsmClientCertificates
DescribeHsmClientCertificatesResponse
rs
DescribeHsmClientCertificatesResponse
-> Getting (First Text) DescribeHsmClientCertificatesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeHsmClientCertificatesResponse
-> Const (First Text) DescribeHsmClientCertificatesResponse
Lens' DescribeHsmClientCertificatesResponse (Maybe Text)
describeHsmClientCertificatesResponse_marker
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeHsmClientCertificatesResponse
-> Const (First Text) DescribeHsmClientCertificatesResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeHsmClientCertificatesResponse 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
DescribeHsmClientCertificates
where
type
AWSResponse DescribeHsmClientCertificates =
DescribeHsmClientCertificatesResponse
request :: DescribeHsmClientCertificates
-> Request DescribeHsmClientCertificates
request = Service
-> DescribeHsmClientCertificates
-> Request DescribeHsmClientCertificates
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeHsmClientCertificates
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeHsmClientCertificates)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse DescribeHsmClientCertificates))
-> Logger
-> Service
-> Proxy DescribeHsmClientCertificates
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeHsmClientCertificates)))
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
"DescribeHsmClientCertificatesResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe Text
-> Maybe [HsmClientCertificate]
-> Int
-> DescribeHsmClientCertificatesResponse
DescribeHsmClientCertificatesResponse'
(Maybe Text
-> Maybe [HsmClientCertificate]
-> Int
-> DescribeHsmClientCertificatesResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe [HsmClientCertificate]
-> Int -> DescribeHsmClientCertificatesResponse)
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 [HsmClientCertificate]
-> Int -> DescribeHsmClientCertificatesResponse)
-> Either String (Maybe [HsmClientCertificate])
-> Either String (Int -> DescribeHsmClientCertificatesResponse)
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
"HsmClientCertificates"
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 [HsmClientCertificate]))
-> Either String (Maybe [HsmClientCertificate])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [HsmClientCertificate])
-> [Node] -> Either String (Maybe [HsmClientCertificate])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [HsmClientCertificate]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"HsmClientCertificate")
)
Either String (Int -> DescribeHsmClientCertificatesResponse)
-> Either String Int
-> Either String DescribeHsmClientCertificatesResponse
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
DescribeHsmClientCertificates
instance Prelude.NFData DescribeHsmClientCertificates
instance Core.ToHeaders DescribeHsmClientCertificates where
toHeaders :: DescribeHsmClientCertificates -> ResponseHeaders
toHeaders = ResponseHeaders -> DescribeHsmClientCertificates -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath DescribeHsmClientCertificates where
toPath :: DescribeHsmClientCertificates -> ByteString
toPath = ByteString -> DescribeHsmClientCertificates -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DescribeHsmClientCertificates where
toQuery :: DescribeHsmClientCertificates -> QueryString
toQuery DescribeHsmClientCertificates' {Maybe Int
Maybe [Text]
Maybe Text
maxRecords :: Maybe Int
marker :: Maybe Text
hsmClientCertificateIdentifier :: Maybe Text
tagKeys :: Maybe [Text]
tagValues :: Maybe [Text]
$sel:maxRecords:DescribeHsmClientCertificates' :: DescribeHsmClientCertificates -> Maybe Int
$sel:marker:DescribeHsmClientCertificates' :: DescribeHsmClientCertificates -> Maybe Text
$sel:hsmClientCertificateIdentifier:DescribeHsmClientCertificates' :: DescribeHsmClientCertificates -> Maybe Text
$sel:tagKeys:DescribeHsmClientCertificates' :: DescribeHsmClientCertificates -> Maybe [Text]
$sel:tagValues:DescribeHsmClientCertificates' :: DescribeHsmClientCertificates -> 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
"DescribeHsmClientCertificates" ::
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
"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
"HsmClientCertificateIdentifier"
ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
hsmClientCertificateIdentifier,
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 DescribeHsmClientCertificatesResponse = DescribeHsmClientCertificatesResponse'
{
DescribeHsmClientCertificatesResponse -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
DescribeHsmClientCertificatesResponse
-> Maybe [HsmClientCertificate]
hsmClientCertificates :: Prelude.Maybe [HsmClientCertificate],
DescribeHsmClientCertificatesResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeHsmClientCertificatesResponse
-> DescribeHsmClientCertificatesResponse -> Bool
(DescribeHsmClientCertificatesResponse
-> DescribeHsmClientCertificatesResponse -> Bool)
-> (DescribeHsmClientCertificatesResponse
-> DescribeHsmClientCertificatesResponse -> Bool)
-> Eq DescribeHsmClientCertificatesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeHsmClientCertificatesResponse
-> DescribeHsmClientCertificatesResponse -> Bool
$c/= :: DescribeHsmClientCertificatesResponse
-> DescribeHsmClientCertificatesResponse -> Bool
== :: DescribeHsmClientCertificatesResponse
-> DescribeHsmClientCertificatesResponse -> Bool
$c== :: DescribeHsmClientCertificatesResponse
-> DescribeHsmClientCertificatesResponse -> Bool
Prelude.Eq, ReadPrec [DescribeHsmClientCertificatesResponse]
ReadPrec DescribeHsmClientCertificatesResponse
Int -> ReadS DescribeHsmClientCertificatesResponse
ReadS [DescribeHsmClientCertificatesResponse]
(Int -> ReadS DescribeHsmClientCertificatesResponse)
-> ReadS [DescribeHsmClientCertificatesResponse]
-> ReadPrec DescribeHsmClientCertificatesResponse
-> ReadPrec [DescribeHsmClientCertificatesResponse]
-> Read DescribeHsmClientCertificatesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeHsmClientCertificatesResponse]
$creadListPrec :: ReadPrec [DescribeHsmClientCertificatesResponse]
readPrec :: ReadPrec DescribeHsmClientCertificatesResponse
$creadPrec :: ReadPrec DescribeHsmClientCertificatesResponse
readList :: ReadS [DescribeHsmClientCertificatesResponse]
$creadList :: ReadS [DescribeHsmClientCertificatesResponse]
readsPrec :: Int -> ReadS DescribeHsmClientCertificatesResponse
$creadsPrec :: Int -> ReadS DescribeHsmClientCertificatesResponse
Prelude.Read, Int -> DescribeHsmClientCertificatesResponse -> ShowS
[DescribeHsmClientCertificatesResponse] -> ShowS
DescribeHsmClientCertificatesResponse -> String
(Int -> DescribeHsmClientCertificatesResponse -> ShowS)
-> (DescribeHsmClientCertificatesResponse -> String)
-> ([DescribeHsmClientCertificatesResponse] -> ShowS)
-> Show DescribeHsmClientCertificatesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeHsmClientCertificatesResponse] -> ShowS
$cshowList :: [DescribeHsmClientCertificatesResponse] -> ShowS
show :: DescribeHsmClientCertificatesResponse -> String
$cshow :: DescribeHsmClientCertificatesResponse -> String
showsPrec :: Int -> DescribeHsmClientCertificatesResponse -> ShowS
$cshowsPrec :: Int -> DescribeHsmClientCertificatesResponse -> ShowS
Prelude.Show, (forall x.
DescribeHsmClientCertificatesResponse
-> Rep DescribeHsmClientCertificatesResponse x)
-> (forall x.
Rep DescribeHsmClientCertificatesResponse x
-> DescribeHsmClientCertificatesResponse)
-> Generic DescribeHsmClientCertificatesResponse
forall x.
Rep DescribeHsmClientCertificatesResponse x
-> DescribeHsmClientCertificatesResponse
forall x.
DescribeHsmClientCertificatesResponse
-> Rep DescribeHsmClientCertificatesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeHsmClientCertificatesResponse x
-> DescribeHsmClientCertificatesResponse
$cfrom :: forall x.
DescribeHsmClientCertificatesResponse
-> Rep DescribeHsmClientCertificatesResponse x
Prelude.Generic)
newDescribeHsmClientCertificatesResponse ::
Prelude.Int ->
DescribeHsmClientCertificatesResponse
newDescribeHsmClientCertificatesResponse :: Int -> DescribeHsmClientCertificatesResponse
newDescribeHsmClientCertificatesResponse Int
pHttpStatus_ =
DescribeHsmClientCertificatesResponse' :: Maybe Text
-> Maybe [HsmClientCertificate]
-> Int
-> DescribeHsmClientCertificatesResponse
DescribeHsmClientCertificatesResponse'
{ $sel:marker:DescribeHsmClientCertificatesResponse' :: Maybe Text
marker =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:hsmClientCertificates:DescribeHsmClientCertificatesResponse' :: Maybe [HsmClientCertificate]
hsmClientCertificates =
Maybe [HsmClientCertificate]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeHsmClientCertificatesResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeHsmClientCertificatesResponse_marker :: Lens.Lens' DescribeHsmClientCertificatesResponse (Prelude.Maybe Prelude.Text)
describeHsmClientCertificatesResponse_marker :: (Maybe Text -> f (Maybe Text))
-> DescribeHsmClientCertificatesResponse
-> f DescribeHsmClientCertificatesResponse
describeHsmClientCertificatesResponse_marker = (DescribeHsmClientCertificatesResponse -> Maybe Text)
-> (DescribeHsmClientCertificatesResponse
-> Maybe Text -> DescribeHsmClientCertificatesResponse)
-> Lens' DescribeHsmClientCertificatesResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHsmClientCertificatesResponse' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeHsmClientCertificatesResponse' :: DescribeHsmClientCertificatesResponse -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeHsmClientCertificatesResponse
s@DescribeHsmClientCertificatesResponse' {} Maybe Text
a -> DescribeHsmClientCertificatesResponse
s {$sel:marker:DescribeHsmClientCertificatesResponse' :: Maybe Text
marker = Maybe Text
a} :: DescribeHsmClientCertificatesResponse)
describeHsmClientCertificatesResponse_hsmClientCertificates :: Lens.Lens' DescribeHsmClientCertificatesResponse (Prelude.Maybe [HsmClientCertificate])
describeHsmClientCertificatesResponse_hsmClientCertificates :: (Maybe [HsmClientCertificate] -> f (Maybe [HsmClientCertificate]))
-> DescribeHsmClientCertificatesResponse
-> f DescribeHsmClientCertificatesResponse
describeHsmClientCertificatesResponse_hsmClientCertificates = (DescribeHsmClientCertificatesResponse
-> Maybe [HsmClientCertificate])
-> (DescribeHsmClientCertificatesResponse
-> Maybe [HsmClientCertificate]
-> DescribeHsmClientCertificatesResponse)
-> Lens'
DescribeHsmClientCertificatesResponse
(Maybe [HsmClientCertificate])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHsmClientCertificatesResponse' {Maybe [HsmClientCertificate]
hsmClientCertificates :: Maybe [HsmClientCertificate]
$sel:hsmClientCertificates:DescribeHsmClientCertificatesResponse' :: DescribeHsmClientCertificatesResponse
-> Maybe [HsmClientCertificate]
hsmClientCertificates} -> Maybe [HsmClientCertificate]
hsmClientCertificates) (\s :: DescribeHsmClientCertificatesResponse
s@DescribeHsmClientCertificatesResponse' {} Maybe [HsmClientCertificate]
a -> DescribeHsmClientCertificatesResponse
s {$sel:hsmClientCertificates:DescribeHsmClientCertificatesResponse' :: Maybe [HsmClientCertificate]
hsmClientCertificates = Maybe [HsmClientCertificate]
a} :: DescribeHsmClientCertificatesResponse) ((Maybe [HsmClientCertificate] -> f (Maybe [HsmClientCertificate]))
-> DescribeHsmClientCertificatesResponse
-> f DescribeHsmClientCertificatesResponse)
-> ((Maybe [HsmClientCertificate]
-> f (Maybe [HsmClientCertificate]))
-> Maybe [HsmClientCertificate]
-> f (Maybe [HsmClientCertificate]))
-> (Maybe [HsmClientCertificate]
-> f (Maybe [HsmClientCertificate]))
-> DescribeHsmClientCertificatesResponse
-> f DescribeHsmClientCertificatesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[HsmClientCertificate]
[HsmClientCertificate]
[HsmClientCertificate]
[HsmClientCertificate]
-> Iso
(Maybe [HsmClientCertificate])
(Maybe [HsmClientCertificate])
(Maybe [HsmClientCertificate])
(Maybe [HsmClientCertificate])
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
[HsmClientCertificate]
[HsmClientCertificate]
[HsmClientCertificate]
[HsmClientCertificate]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describeHsmClientCertificatesResponse_httpStatus :: Lens.Lens' DescribeHsmClientCertificatesResponse Prelude.Int
describeHsmClientCertificatesResponse_httpStatus :: (Int -> f Int)
-> DescribeHsmClientCertificatesResponse
-> f DescribeHsmClientCertificatesResponse
describeHsmClientCertificatesResponse_httpStatus = (DescribeHsmClientCertificatesResponse -> Int)
-> (DescribeHsmClientCertificatesResponse
-> Int -> DescribeHsmClientCertificatesResponse)
-> Lens
DescribeHsmClientCertificatesResponse
DescribeHsmClientCertificatesResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHsmClientCertificatesResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeHsmClientCertificatesResponse' :: DescribeHsmClientCertificatesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeHsmClientCertificatesResponse
s@DescribeHsmClientCertificatesResponse' {} Int
a -> DescribeHsmClientCertificatesResponse
s {$sel:httpStatus:DescribeHsmClientCertificatesResponse' :: Int
httpStatus = Int
a} :: DescribeHsmClientCertificatesResponse)
instance
Prelude.NFData
DescribeHsmClientCertificatesResponse