{-# 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.GetFunctionCodeSigningConfig
(
GetFunctionCodeSigningConfig (..),
newGetFunctionCodeSigningConfig,
getFunctionCodeSigningConfig_functionName,
GetFunctionCodeSigningConfigResponse (..),
newGetFunctionCodeSigningConfigResponse,
getFunctionCodeSigningConfigResponse_httpStatus,
getFunctionCodeSigningConfigResponse_codeSigningConfigArn,
getFunctionCodeSigningConfigResponse_functionName,
)
where
import qualified Amazonka.Core as Core
import Amazonka.Lambda.Types
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 GetFunctionCodeSigningConfig = GetFunctionCodeSigningConfig'
{
GetFunctionCodeSigningConfig -> Text
functionName :: Prelude.Text
}
deriving (GetFunctionCodeSigningConfig
-> GetFunctionCodeSigningConfig -> Bool
(GetFunctionCodeSigningConfig
-> GetFunctionCodeSigningConfig -> Bool)
-> (GetFunctionCodeSigningConfig
-> GetFunctionCodeSigningConfig -> Bool)
-> Eq GetFunctionCodeSigningConfig
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetFunctionCodeSigningConfig
-> GetFunctionCodeSigningConfig -> Bool
$c/= :: GetFunctionCodeSigningConfig
-> GetFunctionCodeSigningConfig -> Bool
== :: GetFunctionCodeSigningConfig
-> GetFunctionCodeSigningConfig -> Bool
$c== :: GetFunctionCodeSigningConfig
-> GetFunctionCodeSigningConfig -> Bool
Prelude.Eq, ReadPrec [GetFunctionCodeSigningConfig]
ReadPrec GetFunctionCodeSigningConfig
Int -> ReadS GetFunctionCodeSigningConfig
ReadS [GetFunctionCodeSigningConfig]
(Int -> ReadS GetFunctionCodeSigningConfig)
-> ReadS [GetFunctionCodeSigningConfig]
-> ReadPrec GetFunctionCodeSigningConfig
-> ReadPrec [GetFunctionCodeSigningConfig]
-> Read GetFunctionCodeSigningConfig
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetFunctionCodeSigningConfig]
$creadListPrec :: ReadPrec [GetFunctionCodeSigningConfig]
readPrec :: ReadPrec GetFunctionCodeSigningConfig
$creadPrec :: ReadPrec GetFunctionCodeSigningConfig
readList :: ReadS [GetFunctionCodeSigningConfig]
$creadList :: ReadS [GetFunctionCodeSigningConfig]
readsPrec :: Int -> ReadS GetFunctionCodeSigningConfig
$creadsPrec :: Int -> ReadS GetFunctionCodeSigningConfig
Prelude.Read, Int -> GetFunctionCodeSigningConfig -> ShowS
[GetFunctionCodeSigningConfig] -> ShowS
GetFunctionCodeSigningConfig -> String
(Int -> GetFunctionCodeSigningConfig -> ShowS)
-> (GetFunctionCodeSigningConfig -> String)
-> ([GetFunctionCodeSigningConfig] -> ShowS)
-> Show GetFunctionCodeSigningConfig
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetFunctionCodeSigningConfig] -> ShowS
$cshowList :: [GetFunctionCodeSigningConfig] -> ShowS
show :: GetFunctionCodeSigningConfig -> String
$cshow :: GetFunctionCodeSigningConfig -> String
showsPrec :: Int -> GetFunctionCodeSigningConfig -> ShowS
$cshowsPrec :: Int -> GetFunctionCodeSigningConfig -> ShowS
Prelude.Show, (forall x.
GetFunctionCodeSigningConfig -> Rep GetFunctionCodeSigningConfig x)
-> (forall x.
Rep GetFunctionCodeSigningConfig x -> GetFunctionCodeSigningConfig)
-> Generic GetFunctionCodeSigningConfig
forall x.
Rep GetFunctionCodeSigningConfig x -> GetFunctionCodeSigningConfig
forall x.
GetFunctionCodeSigningConfig -> Rep GetFunctionCodeSigningConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetFunctionCodeSigningConfig x -> GetFunctionCodeSigningConfig
$cfrom :: forall x.
GetFunctionCodeSigningConfig -> Rep GetFunctionCodeSigningConfig x
Prelude.Generic)
newGetFunctionCodeSigningConfig ::
Prelude.Text ->
GetFunctionCodeSigningConfig
newGetFunctionCodeSigningConfig :: Text -> GetFunctionCodeSigningConfig
newGetFunctionCodeSigningConfig Text
pFunctionName_ =
GetFunctionCodeSigningConfig' :: Text -> GetFunctionCodeSigningConfig
GetFunctionCodeSigningConfig'
{ $sel:functionName:GetFunctionCodeSigningConfig' :: Text
functionName =
Text
pFunctionName_
}
getFunctionCodeSigningConfig_functionName :: Lens.Lens' GetFunctionCodeSigningConfig Prelude.Text
getFunctionCodeSigningConfig_functionName :: (Text -> f Text)
-> GetFunctionCodeSigningConfig -> f GetFunctionCodeSigningConfig
getFunctionCodeSigningConfig_functionName = (GetFunctionCodeSigningConfig -> Text)
-> (GetFunctionCodeSigningConfig
-> Text -> GetFunctionCodeSigningConfig)
-> Lens
GetFunctionCodeSigningConfig GetFunctionCodeSigningConfig Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetFunctionCodeSigningConfig' {Text
functionName :: Text
$sel:functionName:GetFunctionCodeSigningConfig' :: GetFunctionCodeSigningConfig -> Text
functionName} -> Text
functionName) (\s :: GetFunctionCodeSigningConfig
s@GetFunctionCodeSigningConfig' {} Text
a -> GetFunctionCodeSigningConfig
s {$sel:functionName:GetFunctionCodeSigningConfig' :: Text
functionName = Text
a} :: GetFunctionCodeSigningConfig)
instance Core.AWSRequest GetFunctionCodeSigningConfig where
type
AWSResponse GetFunctionCodeSigningConfig =
GetFunctionCodeSigningConfigResponse
request :: GetFunctionCodeSigningConfig
-> Request GetFunctionCodeSigningConfig
request = Service
-> GetFunctionCodeSigningConfig
-> Request GetFunctionCodeSigningConfig
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
response :: Logger
-> Service
-> Proxy GetFunctionCodeSigningConfig
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetFunctionCodeSigningConfig)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse GetFunctionCodeSigningConfig))
-> Logger
-> Service
-> Proxy GetFunctionCodeSigningConfig
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetFunctionCodeSigningConfig)))
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 ->
Int -> Text -> Text -> GetFunctionCodeSigningConfigResponse
GetFunctionCodeSigningConfigResponse'
(Int -> Text -> Text -> GetFunctionCodeSigningConfigResponse)
-> Either String Int
-> Either
String (Text -> Text -> GetFunctionCodeSigningConfigResponse)
forall (f :: * -> *) a b. Functor 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))
Either
String (Text -> Text -> GetFunctionCodeSigningConfigResponse)
-> Either String Text
-> Either String (Text -> GetFunctionCodeSigningConfigResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"CodeSigningConfigArn")
Either String (Text -> GetFunctionCodeSigningConfigResponse)
-> Either String Text
-> Either String GetFunctionCodeSigningConfigResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"FunctionName")
)
instance
Prelude.Hashable
GetFunctionCodeSigningConfig
instance Prelude.NFData GetFunctionCodeSigningConfig
instance Core.ToHeaders GetFunctionCodeSigningConfig where
toHeaders :: GetFunctionCodeSigningConfig -> ResponseHeaders
toHeaders = ResponseHeaders -> GetFunctionCodeSigningConfig -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath GetFunctionCodeSigningConfig where
toPath :: GetFunctionCodeSigningConfig -> ByteString
toPath GetFunctionCodeSigningConfig' {Text
functionName :: Text
$sel:functionName:GetFunctionCodeSigningConfig' :: GetFunctionCodeSigningConfig -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/2020-06-30/functions/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
functionName,
ByteString
"/code-signing-config"
]
instance Core.ToQuery GetFunctionCodeSigningConfig where
toQuery :: GetFunctionCodeSigningConfig -> QueryString
toQuery = QueryString -> GetFunctionCodeSigningConfig -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data GetFunctionCodeSigningConfigResponse = GetFunctionCodeSigningConfigResponse'
{
GetFunctionCodeSigningConfigResponse -> Int
httpStatus :: Prelude.Int,
GetFunctionCodeSigningConfigResponse -> Text
codeSigningConfigArn :: Prelude.Text,
GetFunctionCodeSigningConfigResponse -> Text
functionName :: Prelude.Text
}
deriving (GetFunctionCodeSigningConfigResponse
-> GetFunctionCodeSigningConfigResponse -> Bool
(GetFunctionCodeSigningConfigResponse
-> GetFunctionCodeSigningConfigResponse -> Bool)
-> (GetFunctionCodeSigningConfigResponse
-> GetFunctionCodeSigningConfigResponse -> Bool)
-> Eq GetFunctionCodeSigningConfigResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetFunctionCodeSigningConfigResponse
-> GetFunctionCodeSigningConfigResponse -> Bool
$c/= :: GetFunctionCodeSigningConfigResponse
-> GetFunctionCodeSigningConfigResponse -> Bool
== :: GetFunctionCodeSigningConfigResponse
-> GetFunctionCodeSigningConfigResponse -> Bool
$c== :: GetFunctionCodeSigningConfigResponse
-> GetFunctionCodeSigningConfigResponse -> Bool
Prelude.Eq, ReadPrec [GetFunctionCodeSigningConfigResponse]
ReadPrec GetFunctionCodeSigningConfigResponse
Int -> ReadS GetFunctionCodeSigningConfigResponse
ReadS [GetFunctionCodeSigningConfigResponse]
(Int -> ReadS GetFunctionCodeSigningConfigResponse)
-> ReadS [GetFunctionCodeSigningConfigResponse]
-> ReadPrec GetFunctionCodeSigningConfigResponse
-> ReadPrec [GetFunctionCodeSigningConfigResponse]
-> Read GetFunctionCodeSigningConfigResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetFunctionCodeSigningConfigResponse]
$creadListPrec :: ReadPrec [GetFunctionCodeSigningConfigResponse]
readPrec :: ReadPrec GetFunctionCodeSigningConfigResponse
$creadPrec :: ReadPrec GetFunctionCodeSigningConfigResponse
readList :: ReadS [GetFunctionCodeSigningConfigResponse]
$creadList :: ReadS [GetFunctionCodeSigningConfigResponse]
readsPrec :: Int -> ReadS GetFunctionCodeSigningConfigResponse
$creadsPrec :: Int -> ReadS GetFunctionCodeSigningConfigResponse
Prelude.Read, Int -> GetFunctionCodeSigningConfigResponse -> ShowS
[GetFunctionCodeSigningConfigResponse] -> ShowS
GetFunctionCodeSigningConfigResponse -> String
(Int -> GetFunctionCodeSigningConfigResponse -> ShowS)
-> (GetFunctionCodeSigningConfigResponse -> String)
-> ([GetFunctionCodeSigningConfigResponse] -> ShowS)
-> Show GetFunctionCodeSigningConfigResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetFunctionCodeSigningConfigResponse] -> ShowS
$cshowList :: [GetFunctionCodeSigningConfigResponse] -> ShowS
show :: GetFunctionCodeSigningConfigResponse -> String
$cshow :: GetFunctionCodeSigningConfigResponse -> String
showsPrec :: Int -> GetFunctionCodeSigningConfigResponse -> ShowS
$cshowsPrec :: Int -> GetFunctionCodeSigningConfigResponse -> ShowS
Prelude.Show, (forall x.
GetFunctionCodeSigningConfigResponse
-> Rep GetFunctionCodeSigningConfigResponse x)
-> (forall x.
Rep GetFunctionCodeSigningConfigResponse x
-> GetFunctionCodeSigningConfigResponse)
-> Generic GetFunctionCodeSigningConfigResponse
forall x.
Rep GetFunctionCodeSigningConfigResponse x
-> GetFunctionCodeSigningConfigResponse
forall x.
GetFunctionCodeSigningConfigResponse
-> Rep GetFunctionCodeSigningConfigResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetFunctionCodeSigningConfigResponse x
-> GetFunctionCodeSigningConfigResponse
$cfrom :: forall x.
GetFunctionCodeSigningConfigResponse
-> Rep GetFunctionCodeSigningConfigResponse x
Prelude.Generic)
newGetFunctionCodeSigningConfigResponse ::
Prelude.Int ->
Prelude.Text ->
Prelude.Text ->
GetFunctionCodeSigningConfigResponse
newGetFunctionCodeSigningConfigResponse :: Int -> Text -> Text -> GetFunctionCodeSigningConfigResponse
newGetFunctionCodeSigningConfigResponse
Int
pHttpStatus_
Text
pCodeSigningConfigArn_
Text
pFunctionName_ =
GetFunctionCodeSigningConfigResponse' :: Int -> Text -> Text -> GetFunctionCodeSigningConfigResponse
GetFunctionCodeSigningConfigResponse'
{ $sel:httpStatus:GetFunctionCodeSigningConfigResponse' :: Int
httpStatus =
Int
pHttpStatus_,
$sel:codeSigningConfigArn:GetFunctionCodeSigningConfigResponse' :: Text
codeSigningConfigArn =
Text
pCodeSigningConfigArn_,
$sel:functionName:GetFunctionCodeSigningConfigResponse' :: Text
functionName = Text
pFunctionName_
}
getFunctionCodeSigningConfigResponse_httpStatus :: Lens.Lens' GetFunctionCodeSigningConfigResponse Prelude.Int
getFunctionCodeSigningConfigResponse_httpStatus :: (Int -> f Int)
-> GetFunctionCodeSigningConfigResponse
-> f GetFunctionCodeSigningConfigResponse
getFunctionCodeSigningConfigResponse_httpStatus = (GetFunctionCodeSigningConfigResponse -> Int)
-> (GetFunctionCodeSigningConfigResponse
-> Int -> GetFunctionCodeSigningConfigResponse)
-> Lens
GetFunctionCodeSigningConfigResponse
GetFunctionCodeSigningConfigResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetFunctionCodeSigningConfigResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetFunctionCodeSigningConfigResponse' :: GetFunctionCodeSigningConfigResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetFunctionCodeSigningConfigResponse
s@GetFunctionCodeSigningConfigResponse' {} Int
a -> GetFunctionCodeSigningConfigResponse
s {$sel:httpStatus:GetFunctionCodeSigningConfigResponse' :: Int
httpStatus = Int
a} :: GetFunctionCodeSigningConfigResponse)
getFunctionCodeSigningConfigResponse_codeSigningConfigArn :: Lens.Lens' GetFunctionCodeSigningConfigResponse Prelude.Text
getFunctionCodeSigningConfigResponse_codeSigningConfigArn :: (Text -> f Text)
-> GetFunctionCodeSigningConfigResponse
-> f GetFunctionCodeSigningConfigResponse
getFunctionCodeSigningConfigResponse_codeSigningConfigArn = (GetFunctionCodeSigningConfigResponse -> Text)
-> (GetFunctionCodeSigningConfigResponse
-> Text -> GetFunctionCodeSigningConfigResponse)
-> Lens
GetFunctionCodeSigningConfigResponse
GetFunctionCodeSigningConfigResponse
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetFunctionCodeSigningConfigResponse' {Text
codeSigningConfigArn :: Text
$sel:codeSigningConfigArn:GetFunctionCodeSigningConfigResponse' :: GetFunctionCodeSigningConfigResponse -> Text
codeSigningConfigArn} -> Text
codeSigningConfigArn) (\s :: GetFunctionCodeSigningConfigResponse
s@GetFunctionCodeSigningConfigResponse' {} Text
a -> GetFunctionCodeSigningConfigResponse
s {$sel:codeSigningConfigArn:GetFunctionCodeSigningConfigResponse' :: Text
codeSigningConfigArn = Text
a} :: GetFunctionCodeSigningConfigResponse)
getFunctionCodeSigningConfigResponse_functionName :: Lens.Lens' GetFunctionCodeSigningConfigResponse Prelude.Text
getFunctionCodeSigningConfigResponse_functionName :: (Text -> f Text)
-> GetFunctionCodeSigningConfigResponse
-> f GetFunctionCodeSigningConfigResponse
getFunctionCodeSigningConfigResponse_functionName = (GetFunctionCodeSigningConfigResponse -> Text)
-> (GetFunctionCodeSigningConfigResponse
-> Text -> GetFunctionCodeSigningConfigResponse)
-> Lens
GetFunctionCodeSigningConfigResponse
GetFunctionCodeSigningConfigResponse
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetFunctionCodeSigningConfigResponse' {Text
functionName :: Text
$sel:functionName:GetFunctionCodeSigningConfigResponse' :: GetFunctionCodeSigningConfigResponse -> Text
functionName} -> Text
functionName) (\s :: GetFunctionCodeSigningConfigResponse
s@GetFunctionCodeSigningConfigResponse' {} Text
a -> GetFunctionCodeSigningConfigResponse
s {$sel:functionName:GetFunctionCodeSigningConfigResponse' :: Text
functionName = Text
a} :: GetFunctionCodeSigningConfigResponse)
instance
Prelude.NFData
GetFunctionCodeSigningConfigResponse