{-# 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.Lambda.ListCodeSigningConfigs
(
ListCodeSigningConfigs (..),
newListCodeSigningConfigs,
listCodeSigningConfigs_marker,
listCodeSigningConfigs_maxItems,
ListCodeSigningConfigsResponse (..),
newListCodeSigningConfigsResponse,
listCodeSigningConfigsResponse_codeSigningConfigs,
listCodeSigningConfigsResponse_nextMarker,
listCodeSigningConfigsResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Lambda.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data ListCodeSigningConfigs = ListCodeSigningConfigs'
{
ListCodeSigningConfigs -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
ListCodeSigningConfigs -> Maybe Natural
maxItems :: Prelude.Maybe Prelude.Natural
}
deriving (ListCodeSigningConfigs -> ListCodeSigningConfigs -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListCodeSigningConfigs -> ListCodeSigningConfigs -> Bool
$c/= :: ListCodeSigningConfigs -> ListCodeSigningConfigs -> Bool
== :: ListCodeSigningConfigs -> ListCodeSigningConfigs -> Bool
$c== :: ListCodeSigningConfigs -> ListCodeSigningConfigs -> Bool
Prelude.Eq, ReadPrec [ListCodeSigningConfigs]
ReadPrec ListCodeSigningConfigs
Int -> ReadS ListCodeSigningConfigs
ReadS [ListCodeSigningConfigs]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListCodeSigningConfigs]
$creadListPrec :: ReadPrec [ListCodeSigningConfigs]
readPrec :: ReadPrec ListCodeSigningConfigs
$creadPrec :: ReadPrec ListCodeSigningConfigs
readList :: ReadS [ListCodeSigningConfigs]
$creadList :: ReadS [ListCodeSigningConfigs]
readsPrec :: Int -> ReadS ListCodeSigningConfigs
$creadsPrec :: Int -> ReadS ListCodeSigningConfigs
Prelude.Read, Int -> ListCodeSigningConfigs -> ShowS
[ListCodeSigningConfigs] -> ShowS
ListCodeSigningConfigs -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListCodeSigningConfigs] -> ShowS
$cshowList :: [ListCodeSigningConfigs] -> ShowS
show :: ListCodeSigningConfigs -> String
$cshow :: ListCodeSigningConfigs -> String
showsPrec :: Int -> ListCodeSigningConfigs -> ShowS
$cshowsPrec :: Int -> ListCodeSigningConfigs -> ShowS
Prelude.Show, forall x. Rep ListCodeSigningConfigs x -> ListCodeSigningConfigs
forall x. ListCodeSigningConfigs -> Rep ListCodeSigningConfigs x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListCodeSigningConfigs x -> ListCodeSigningConfigs
$cfrom :: forall x. ListCodeSigningConfigs -> Rep ListCodeSigningConfigs x
Prelude.Generic)
newListCodeSigningConfigs ::
ListCodeSigningConfigs
newListCodeSigningConfigs :: ListCodeSigningConfigs
newListCodeSigningConfigs =
ListCodeSigningConfigs'
{ $sel:marker:ListCodeSigningConfigs' :: Maybe Text
marker = forall a. Maybe a
Prelude.Nothing,
$sel:maxItems:ListCodeSigningConfigs' :: Maybe Natural
maxItems = forall a. Maybe a
Prelude.Nothing
}
listCodeSigningConfigs_marker :: Lens.Lens' ListCodeSigningConfigs (Prelude.Maybe Prelude.Text)
listCodeSigningConfigs_marker :: Lens' ListCodeSigningConfigs (Maybe Text)
listCodeSigningConfigs_marker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCodeSigningConfigs' {Maybe Text
marker :: Maybe Text
$sel:marker:ListCodeSigningConfigs' :: ListCodeSigningConfigs -> Maybe Text
marker} -> Maybe Text
marker) (\s :: ListCodeSigningConfigs
s@ListCodeSigningConfigs' {} Maybe Text
a -> ListCodeSigningConfigs
s {$sel:marker:ListCodeSigningConfigs' :: Maybe Text
marker = Maybe Text
a} :: ListCodeSigningConfigs)
listCodeSigningConfigs_maxItems :: Lens.Lens' ListCodeSigningConfigs (Prelude.Maybe Prelude.Natural)
listCodeSigningConfigs_maxItems :: Lens' ListCodeSigningConfigs (Maybe Natural)
listCodeSigningConfigs_maxItems = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCodeSigningConfigs' {Maybe Natural
maxItems :: Maybe Natural
$sel:maxItems:ListCodeSigningConfigs' :: ListCodeSigningConfigs -> Maybe Natural
maxItems} -> Maybe Natural
maxItems) (\s :: ListCodeSigningConfigs
s@ListCodeSigningConfigs' {} Maybe Natural
a -> ListCodeSigningConfigs
s {$sel:maxItems:ListCodeSigningConfigs' :: Maybe Natural
maxItems = Maybe Natural
a} :: ListCodeSigningConfigs)
instance Core.AWSPager ListCodeSigningConfigs where
page :: ListCodeSigningConfigs
-> AWSResponse ListCodeSigningConfigs
-> Maybe ListCodeSigningConfigs
page ListCodeSigningConfigs
rq AWSResponse ListCodeSigningConfigs
rs
| forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListCodeSigningConfigs
rs
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListCodeSigningConfigsResponse (Maybe Text)
listCodeSigningConfigsResponse_nextMarker
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
forall a. Maybe a
Prelude.Nothing
| forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListCodeSigningConfigs
rs
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListCodeSigningConfigsResponse (Maybe [CodeSigningConfig])
listCodeSigningConfigsResponse_codeSigningConfigs
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
forall a. a -> Maybe a
Prelude.Just
forall a b. (a -> b) -> a -> b
Prelude.$ ListCodeSigningConfigs
rq
forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListCodeSigningConfigs (Maybe Text)
listCodeSigningConfigs_marker
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListCodeSigningConfigs
rs
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListCodeSigningConfigsResponse (Maybe Text)
listCodeSigningConfigsResponse_nextMarker
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
instance Core.AWSRequest ListCodeSigningConfigs where
type
AWSResponse ListCodeSigningConfigs =
ListCodeSigningConfigsResponse
request :: (Service -> Service)
-> ListCodeSigningConfigs -> Request ListCodeSigningConfigs
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListCodeSigningConfigs
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListCodeSigningConfigs)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe [CodeSigningConfig]
-> Maybe Text -> Int -> ListCodeSigningConfigsResponse
ListCodeSigningConfigsResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x
forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"CodeSigningConfigs"
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"NextMarker")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable ListCodeSigningConfigs where
hashWithSalt :: Int -> ListCodeSigningConfigs -> Int
hashWithSalt Int
_salt ListCodeSigningConfigs' {Maybe Natural
Maybe Text
maxItems :: Maybe Natural
marker :: Maybe Text
$sel:maxItems:ListCodeSigningConfigs' :: ListCodeSigningConfigs -> Maybe Natural
$sel:marker:ListCodeSigningConfigs' :: ListCodeSigningConfigs -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
marker
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxItems
instance Prelude.NFData ListCodeSigningConfigs where
rnf :: ListCodeSigningConfigs -> ()
rnf ListCodeSigningConfigs' {Maybe Natural
Maybe Text
maxItems :: Maybe Natural
marker :: Maybe Text
$sel:maxItems:ListCodeSigningConfigs' :: ListCodeSigningConfigs -> Maybe Natural
$sel:marker:ListCodeSigningConfigs' :: ListCodeSigningConfigs -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
marker
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxItems
instance Data.ToHeaders ListCodeSigningConfigs where
toHeaders :: ListCodeSigningConfigs -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath ListCodeSigningConfigs where
toPath :: ListCodeSigningConfigs -> ByteString
toPath =
forall a b. a -> b -> a
Prelude.const ByteString
"/2020-04-22/code-signing-configs/"
instance Data.ToQuery ListCodeSigningConfigs where
toQuery :: ListCodeSigningConfigs -> QueryString
toQuery ListCodeSigningConfigs' {Maybe Natural
Maybe Text
maxItems :: Maybe Natural
marker :: Maybe Text
$sel:maxItems:ListCodeSigningConfigs' :: ListCodeSigningConfigs -> Maybe Natural
$sel:marker:ListCodeSigningConfigs' :: ListCodeSigningConfigs -> Maybe Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Marker" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
marker,
ByteString
"MaxItems" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
maxItems
]
data ListCodeSigningConfigsResponse = ListCodeSigningConfigsResponse'
{
ListCodeSigningConfigsResponse -> Maybe [CodeSigningConfig]
codeSigningConfigs :: Prelude.Maybe [CodeSigningConfig],
ListCodeSigningConfigsResponse -> Maybe Text
nextMarker :: Prelude.Maybe Prelude.Text,
ListCodeSigningConfigsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListCodeSigningConfigsResponse
-> ListCodeSigningConfigsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListCodeSigningConfigsResponse
-> ListCodeSigningConfigsResponse -> Bool
$c/= :: ListCodeSigningConfigsResponse
-> ListCodeSigningConfigsResponse -> Bool
== :: ListCodeSigningConfigsResponse
-> ListCodeSigningConfigsResponse -> Bool
$c== :: ListCodeSigningConfigsResponse
-> ListCodeSigningConfigsResponse -> Bool
Prelude.Eq, ReadPrec [ListCodeSigningConfigsResponse]
ReadPrec ListCodeSigningConfigsResponse
Int -> ReadS ListCodeSigningConfigsResponse
ReadS [ListCodeSigningConfigsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListCodeSigningConfigsResponse]
$creadListPrec :: ReadPrec [ListCodeSigningConfigsResponse]
readPrec :: ReadPrec ListCodeSigningConfigsResponse
$creadPrec :: ReadPrec ListCodeSigningConfigsResponse
readList :: ReadS [ListCodeSigningConfigsResponse]
$creadList :: ReadS [ListCodeSigningConfigsResponse]
readsPrec :: Int -> ReadS ListCodeSigningConfigsResponse
$creadsPrec :: Int -> ReadS ListCodeSigningConfigsResponse
Prelude.Read, Int -> ListCodeSigningConfigsResponse -> ShowS
[ListCodeSigningConfigsResponse] -> ShowS
ListCodeSigningConfigsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListCodeSigningConfigsResponse] -> ShowS
$cshowList :: [ListCodeSigningConfigsResponse] -> ShowS
show :: ListCodeSigningConfigsResponse -> String
$cshow :: ListCodeSigningConfigsResponse -> String
showsPrec :: Int -> ListCodeSigningConfigsResponse -> ShowS
$cshowsPrec :: Int -> ListCodeSigningConfigsResponse -> ShowS
Prelude.Show, forall x.
Rep ListCodeSigningConfigsResponse x
-> ListCodeSigningConfigsResponse
forall x.
ListCodeSigningConfigsResponse
-> Rep ListCodeSigningConfigsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListCodeSigningConfigsResponse x
-> ListCodeSigningConfigsResponse
$cfrom :: forall x.
ListCodeSigningConfigsResponse
-> Rep ListCodeSigningConfigsResponse x
Prelude.Generic)
newListCodeSigningConfigsResponse ::
Prelude.Int ->
ListCodeSigningConfigsResponse
newListCodeSigningConfigsResponse :: Int -> ListCodeSigningConfigsResponse
newListCodeSigningConfigsResponse Int
pHttpStatus_ =
ListCodeSigningConfigsResponse'
{ $sel:codeSigningConfigs:ListCodeSigningConfigsResponse' :: Maybe [CodeSigningConfig]
codeSigningConfigs =
forall a. Maybe a
Prelude.Nothing,
$sel:nextMarker:ListCodeSigningConfigsResponse' :: Maybe Text
nextMarker = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListCodeSigningConfigsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listCodeSigningConfigsResponse_codeSigningConfigs :: Lens.Lens' ListCodeSigningConfigsResponse (Prelude.Maybe [CodeSigningConfig])
listCodeSigningConfigsResponse_codeSigningConfigs :: Lens' ListCodeSigningConfigsResponse (Maybe [CodeSigningConfig])
listCodeSigningConfigsResponse_codeSigningConfigs = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCodeSigningConfigsResponse' {Maybe [CodeSigningConfig]
codeSigningConfigs :: Maybe [CodeSigningConfig]
$sel:codeSigningConfigs:ListCodeSigningConfigsResponse' :: ListCodeSigningConfigsResponse -> Maybe [CodeSigningConfig]
codeSigningConfigs} -> Maybe [CodeSigningConfig]
codeSigningConfigs) (\s :: ListCodeSigningConfigsResponse
s@ListCodeSigningConfigsResponse' {} Maybe [CodeSigningConfig]
a -> ListCodeSigningConfigsResponse
s {$sel:codeSigningConfigs:ListCodeSigningConfigsResponse' :: Maybe [CodeSigningConfig]
codeSigningConfigs = Maybe [CodeSigningConfig]
a} :: ListCodeSigningConfigsResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listCodeSigningConfigsResponse_nextMarker :: Lens.Lens' ListCodeSigningConfigsResponse (Prelude.Maybe Prelude.Text)
listCodeSigningConfigsResponse_nextMarker :: Lens' ListCodeSigningConfigsResponse (Maybe Text)
listCodeSigningConfigsResponse_nextMarker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCodeSigningConfigsResponse' {Maybe Text
nextMarker :: Maybe Text
$sel:nextMarker:ListCodeSigningConfigsResponse' :: ListCodeSigningConfigsResponse -> Maybe Text
nextMarker} -> Maybe Text
nextMarker) (\s :: ListCodeSigningConfigsResponse
s@ListCodeSigningConfigsResponse' {} Maybe Text
a -> ListCodeSigningConfigsResponse
s {$sel:nextMarker:ListCodeSigningConfigsResponse' :: Maybe Text
nextMarker = Maybe Text
a} :: ListCodeSigningConfigsResponse)
listCodeSigningConfigsResponse_httpStatus :: Lens.Lens' ListCodeSigningConfigsResponse Prelude.Int
listCodeSigningConfigsResponse_httpStatus :: Lens' ListCodeSigningConfigsResponse Int
listCodeSigningConfigsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCodeSigningConfigsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListCodeSigningConfigsResponse' :: ListCodeSigningConfigsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListCodeSigningConfigsResponse
s@ListCodeSigningConfigsResponse' {} Int
a -> ListCodeSigningConfigsResponse
s {$sel:httpStatus:ListCodeSigningConfigsResponse' :: Int
httpStatus = Int
a} :: ListCodeSigningConfigsResponse)
instance
Prelude.NFData
ListCodeSigningConfigsResponse
where
rnf :: ListCodeSigningConfigsResponse -> ()
rnf ListCodeSigningConfigsResponse' {Int
Maybe [CodeSigningConfig]
Maybe Text
httpStatus :: Int
nextMarker :: Maybe Text
codeSigningConfigs :: Maybe [CodeSigningConfig]
$sel:httpStatus:ListCodeSigningConfigsResponse' :: ListCodeSigningConfigsResponse -> Int
$sel:nextMarker:ListCodeSigningConfigsResponse' :: ListCodeSigningConfigsResponse -> Maybe Text
$sel:codeSigningConfigs:ListCodeSigningConfigsResponse' :: ListCodeSigningConfigsResponse -> Maybe [CodeSigningConfig]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [CodeSigningConfig]
codeSigningConfigs
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextMarker
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus