{-# 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.Greengrass.CreateFunctionDefinition
(
CreateFunctionDefinition (..),
newCreateFunctionDefinition,
createFunctionDefinition_amznClientToken,
createFunctionDefinition_initialVersion,
createFunctionDefinition_name,
createFunctionDefinition_tags,
CreateFunctionDefinitionResponse (..),
newCreateFunctionDefinitionResponse,
createFunctionDefinitionResponse_latestVersionArn,
createFunctionDefinitionResponse_arn,
createFunctionDefinitionResponse_name,
createFunctionDefinitionResponse_creationTimestamp,
createFunctionDefinitionResponse_id,
createFunctionDefinitionResponse_latestVersion,
createFunctionDefinitionResponse_lastUpdatedTimestamp,
createFunctionDefinitionResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.Greengrass.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 CreateFunctionDefinition = CreateFunctionDefinition'
{
CreateFunctionDefinition -> Maybe Text
amznClientToken :: Prelude.Maybe Prelude.Text,
CreateFunctionDefinition -> Maybe FunctionDefinitionVersion
initialVersion :: Prelude.Maybe FunctionDefinitionVersion,
CreateFunctionDefinition -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
CreateFunctionDefinition -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)
}
deriving (CreateFunctionDefinition -> CreateFunctionDefinition -> Bool
(CreateFunctionDefinition -> CreateFunctionDefinition -> Bool)
-> (CreateFunctionDefinition -> CreateFunctionDefinition -> Bool)
-> Eq CreateFunctionDefinition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateFunctionDefinition -> CreateFunctionDefinition -> Bool
$c/= :: CreateFunctionDefinition -> CreateFunctionDefinition -> Bool
== :: CreateFunctionDefinition -> CreateFunctionDefinition -> Bool
$c== :: CreateFunctionDefinition -> CreateFunctionDefinition -> Bool
Prelude.Eq, ReadPrec [CreateFunctionDefinition]
ReadPrec CreateFunctionDefinition
Int -> ReadS CreateFunctionDefinition
ReadS [CreateFunctionDefinition]
(Int -> ReadS CreateFunctionDefinition)
-> ReadS [CreateFunctionDefinition]
-> ReadPrec CreateFunctionDefinition
-> ReadPrec [CreateFunctionDefinition]
-> Read CreateFunctionDefinition
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateFunctionDefinition]
$creadListPrec :: ReadPrec [CreateFunctionDefinition]
readPrec :: ReadPrec CreateFunctionDefinition
$creadPrec :: ReadPrec CreateFunctionDefinition
readList :: ReadS [CreateFunctionDefinition]
$creadList :: ReadS [CreateFunctionDefinition]
readsPrec :: Int -> ReadS CreateFunctionDefinition
$creadsPrec :: Int -> ReadS CreateFunctionDefinition
Prelude.Read, Int -> CreateFunctionDefinition -> ShowS
[CreateFunctionDefinition] -> ShowS
CreateFunctionDefinition -> String
(Int -> CreateFunctionDefinition -> ShowS)
-> (CreateFunctionDefinition -> String)
-> ([CreateFunctionDefinition] -> ShowS)
-> Show CreateFunctionDefinition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateFunctionDefinition] -> ShowS
$cshowList :: [CreateFunctionDefinition] -> ShowS
show :: CreateFunctionDefinition -> String
$cshow :: CreateFunctionDefinition -> String
showsPrec :: Int -> CreateFunctionDefinition -> ShowS
$cshowsPrec :: Int -> CreateFunctionDefinition -> ShowS
Prelude.Show, (forall x.
CreateFunctionDefinition -> Rep CreateFunctionDefinition x)
-> (forall x.
Rep CreateFunctionDefinition x -> CreateFunctionDefinition)
-> Generic CreateFunctionDefinition
forall x.
Rep CreateFunctionDefinition x -> CreateFunctionDefinition
forall x.
CreateFunctionDefinition -> Rep CreateFunctionDefinition x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateFunctionDefinition x -> CreateFunctionDefinition
$cfrom :: forall x.
CreateFunctionDefinition -> Rep CreateFunctionDefinition x
Prelude.Generic)
newCreateFunctionDefinition ::
CreateFunctionDefinition
newCreateFunctionDefinition :: CreateFunctionDefinition
newCreateFunctionDefinition =
CreateFunctionDefinition' :: Maybe Text
-> Maybe FunctionDefinitionVersion
-> Maybe Text
-> Maybe (HashMap Text Text)
-> CreateFunctionDefinition
CreateFunctionDefinition'
{ $sel:amznClientToken:CreateFunctionDefinition' :: Maybe Text
amznClientToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:initialVersion:CreateFunctionDefinition' :: Maybe FunctionDefinitionVersion
initialVersion = Maybe FunctionDefinitionVersion
forall a. Maybe a
Prelude.Nothing,
$sel:name:CreateFunctionDefinition' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateFunctionDefinition' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing
}
createFunctionDefinition_amznClientToken :: Lens.Lens' CreateFunctionDefinition (Prelude.Maybe Prelude.Text)
createFunctionDefinition_amznClientToken :: (Maybe Text -> f (Maybe Text))
-> CreateFunctionDefinition -> f CreateFunctionDefinition
createFunctionDefinition_amznClientToken = (CreateFunctionDefinition -> Maybe Text)
-> (CreateFunctionDefinition
-> Maybe Text -> CreateFunctionDefinition)
-> Lens
CreateFunctionDefinition
CreateFunctionDefinition
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFunctionDefinition' {Maybe Text
amznClientToken :: Maybe Text
$sel:amznClientToken:CreateFunctionDefinition' :: CreateFunctionDefinition -> Maybe Text
amznClientToken} -> Maybe Text
amznClientToken) (\s :: CreateFunctionDefinition
s@CreateFunctionDefinition' {} Maybe Text
a -> CreateFunctionDefinition
s {$sel:amznClientToken:CreateFunctionDefinition' :: Maybe Text
amznClientToken = Maybe Text
a} :: CreateFunctionDefinition)
createFunctionDefinition_initialVersion :: Lens.Lens' CreateFunctionDefinition (Prelude.Maybe FunctionDefinitionVersion)
createFunctionDefinition_initialVersion :: (Maybe FunctionDefinitionVersion
-> f (Maybe FunctionDefinitionVersion))
-> CreateFunctionDefinition -> f CreateFunctionDefinition
createFunctionDefinition_initialVersion = (CreateFunctionDefinition -> Maybe FunctionDefinitionVersion)
-> (CreateFunctionDefinition
-> Maybe FunctionDefinitionVersion -> CreateFunctionDefinition)
-> Lens
CreateFunctionDefinition
CreateFunctionDefinition
(Maybe FunctionDefinitionVersion)
(Maybe FunctionDefinitionVersion)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFunctionDefinition' {Maybe FunctionDefinitionVersion
initialVersion :: Maybe FunctionDefinitionVersion
$sel:initialVersion:CreateFunctionDefinition' :: CreateFunctionDefinition -> Maybe FunctionDefinitionVersion
initialVersion} -> Maybe FunctionDefinitionVersion
initialVersion) (\s :: CreateFunctionDefinition
s@CreateFunctionDefinition' {} Maybe FunctionDefinitionVersion
a -> CreateFunctionDefinition
s {$sel:initialVersion:CreateFunctionDefinition' :: Maybe FunctionDefinitionVersion
initialVersion = Maybe FunctionDefinitionVersion
a} :: CreateFunctionDefinition)
createFunctionDefinition_name :: Lens.Lens' CreateFunctionDefinition (Prelude.Maybe Prelude.Text)
createFunctionDefinition_name :: (Maybe Text -> f (Maybe Text))
-> CreateFunctionDefinition -> f CreateFunctionDefinition
createFunctionDefinition_name = (CreateFunctionDefinition -> Maybe Text)
-> (CreateFunctionDefinition
-> Maybe Text -> CreateFunctionDefinition)
-> Lens
CreateFunctionDefinition
CreateFunctionDefinition
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFunctionDefinition' {Maybe Text
name :: Maybe Text
$sel:name:CreateFunctionDefinition' :: CreateFunctionDefinition -> Maybe Text
name} -> Maybe Text
name) (\s :: CreateFunctionDefinition
s@CreateFunctionDefinition' {} Maybe Text
a -> CreateFunctionDefinition
s {$sel:name:CreateFunctionDefinition' :: Maybe Text
name = Maybe Text
a} :: CreateFunctionDefinition)
createFunctionDefinition_tags :: Lens.Lens' CreateFunctionDefinition (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createFunctionDefinition_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateFunctionDefinition -> f CreateFunctionDefinition
createFunctionDefinition_tags = (CreateFunctionDefinition -> Maybe (HashMap Text Text))
-> (CreateFunctionDefinition
-> Maybe (HashMap Text Text) -> CreateFunctionDefinition)
-> Lens
CreateFunctionDefinition
CreateFunctionDefinition
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFunctionDefinition' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateFunctionDefinition' :: CreateFunctionDefinition -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateFunctionDefinition
s@CreateFunctionDefinition' {} Maybe (HashMap Text Text)
a -> CreateFunctionDefinition
s {$sel:tags:CreateFunctionDefinition' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateFunctionDefinition) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateFunctionDefinition -> f CreateFunctionDefinition)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateFunctionDefinition
-> f CreateFunctionDefinition
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text 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
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.AWSRequest CreateFunctionDefinition where
type
AWSResponse CreateFunctionDefinition =
CreateFunctionDefinitionResponse
request :: CreateFunctionDefinition -> Request CreateFunctionDefinition
request = Service
-> CreateFunctionDefinition -> Request CreateFunctionDefinition
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateFunctionDefinition
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateFunctionDefinition)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateFunctionDefinition))
-> Logger
-> Service
-> Proxy CreateFunctionDefinition
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateFunctionDefinition)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> CreateFunctionDefinitionResponse
CreateFunctionDefinitionResponse'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> CreateFunctionDefinitionResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> CreateFunctionDefinitionResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"LatestVersionArn")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> CreateFunctionDefinitionResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> CreateFunctionDefinitionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Arn")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> CreateFunctionDefinitionResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> CreateFunctionDefinitionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Name")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> CreateFunctionDefinitionResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> CreateFunctionDefinitionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CreationTimestamp")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> CreateFunctionDefinitionResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text -> Int -> CreateFunctionDefinitionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Id")
Either
String
(Maybe Text
-> Maybe Text -> Int -> CreateFunctionDefinitionResponse)
-> Either String (Maybe Text)
-> Either
String (Maybe Text -> Int -> CreateFunctionDefinitionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"LatestVersion")
Either
String (Maybe Text -> Int -> CreateFunctionDefinitionResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateFunctionDefinitionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"LastUpdatedTimestamp")
Either String (Int -> CreateFunctionDefinitionResponse)
-> Either String Int
-> Either String CreateFunctionDefinitionResponse
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 CreateFunctionDefinition
instance Prelude.NFData CreateFunctionDefinition
instance Core.ToHeaders CreateFunctionDefinition where
toHeaders :: CreateFunctionDefinition -> ResponseHeaders
toHeaders CreateFunctionDefinition' {Maybe Text
Maybe (HashMap Text Text)
Maybe FunctionDefinitionVersion
tags :: Maybe (HashMap Text Text)
name :: Maybe Text
initialVersion :: Maybe FunctionDefinitionVersion
amznClientToken :: Maybe Text
$sel:tags:CreateFunctionDefinition' :: CreateFunctionDefinition -> Maybe (HashMap Text Text)
$sel:name:CreateFunctionDefinition' :: CreateFunctionDefinition -> Maybe Text
$sel:initialVersion:CreateFunctionDefinition' :: CreateFunctionDefinition -> Maybe FunctionDefinitionVersion
$sel:amznClientToken:CreateFunctionDefinition' :: CreateFunctionDefinition -> Maybe Text
..} =
[ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amzn-Client-Token" HeaderName -> Maybe Text -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe Text
amznClientToken,
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# (ByteString
"application/x-amz-json-1.1" :: Prelude.ByteString)
]
instance Core.ToJSON CreateFunctionDefinition where
toJSON :: CreateFunctionDefinition -> Value
toJSON CreateFunctionDefinition' {Maybe Text
Maybe (HashMap Text Text)
Maybe FunctionDefinitionVersion
tags :: Maybe (HashMap Text Text)
name :: Maybe Text
initialVersion :: Maybe FunctionDefinitionVersion
amznClientToken :: Maybe Text
$sel:tags:CreateFunctionDefinition' :: CreateFunctionDefinition -> Maybe (HashMap Text Text)
$sel:name:CreateFunctionDefinition' :: CreateFunctionDefinition -> Maybe Text
$sel:initialVersion:CreateFunctionDefinition' :: CreateFunctionDefinition -> Maybe FunctionDefinitionVersion
$sel:amznClientToken:CreateFunctionDefinition' :: CreateFunctionDefinition -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"InitialVersion" Text -> FunctionDefinitionVersion -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(FunctionDefinitionVersion -> Pair)
-> Maybe FunctionDefinitionVersion -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FunctionDefinitionVersion
initialVersion,
(Text
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
name,
(Text
"tags" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags
]
)
instance Core.ToPath CreateFunctionDefinition where
toPath :: CreateFunctionDefinition -> ByteString
toPath =
ByteString -> CreateFunctionDefinition -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/greengrass/definition/functions"
instance Core.ToQuery CreateFunctionDefinition where
toQuery :: CreateFunctionDefinition -> QueryString
toQuery = QueryString -> CreateFunctionDefinition -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateFunctionDefinitionResponse = CreateFunctionDefinitionResponse'
{
CreateFunctionDefinitionResponse -> Maybe Text
latestVersionArn :: Prelude.Maybe Prelude.Text,
CreateFunctionDefinitionResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
CreateFunctionDefinitionResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
CreateFunctionDefinitionResponse -> Maybe Text
creationTimestamp :: Prelude.Maybe Prelude.Text,
CreateFunctionDefinitionResponse -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
CreateFunctionDefinitionResponse -> Maybe Text
latestVersion :: Prelude.Maybe Prelude.Text,
CreateFunctionDefinitionResponse -> Maybe Text
lastUpdatedTimestamp :: Prelude.Maybe Prelude.Text,
CreateFunctionDefinitionResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateFunctionDefinitionResponse
-> CreateFunctionDefinitionResponse -> Bool
(CreateFunctionDefinitionResponse
-> CreateFunctionDefinitionResponse -> Bool)
-> (CreateFunctionDefinitionResponse
-> CreateFunctionDefinitionResponse -> Bool)
-> Eq CreateFunctionDefinitionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateFunctionDefinitionResponse
-> CreateFunctionDefinitionResponse -> Bool
$c/= :: CreateFunctionDefinitionResponse
-> CreateFunctionDefinitionResponse -> Bool
== :: CreateFunctionDefinitionResponse
-> CreateFunctionDefinitionResponse -> Bool
$c== :: CreateFunctionDefinitionResponse
-> CreateFunctionDefinitionResponse -> Bool
Prelude.Eq, ReadPrec [CreateFunctionDefinitionResponse]
ReadPrec CreateFunctionDefinitionResponse
Int -> ReadS CreateFunctionDefinitionResponse
ReadS [CreateFunctionDefinitionResponse]
(Int -> ReadS CreateFunctionDefinitionResponse)
-> ReadS [CreateFunctionDefinitionResponse]
-> ReadPrec CreateFunctionDefinitionResponse
-> ReadPrec [CreateFunctionDefinitionResponse]
-> Read CreateFunctionDefinitionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateFunctionDefinitionResponse]
$creadListPrec :: ReadPrec [CreateFunctionDefinitionResponse]
readPrec :: ReadPrec CreateFunctionDefinitionResponse
$creadPrec :: ReadPrec CreateFunctionDefinitionResponse
readList :: ReadS [CreateFunctionDefinitionResponse]
$creadList :: ReadS [CreateFunctionDefinitionResponse]
readsPrec :: Int -> ReadS CreateFunctionDefinitionResponse
$creadsPrec :: Int -> ReadS CreateFunctionDefinitionResponse
Prelude.Read, Int -> CreateFunctionDefinitionResponse -> ShowS
[CreateFunctionDefinitionResponse] -> ShowS
CreateFunctionDefinitionResponse -> String
(Int -> CreateFunctionDefinitionResponse -> ShowS)
-> (CreateFunctionDefinitionResponse -> String)
-> ([CreateFunctionDefinitionResponse] -> ShowS)
-> Show CreateFunctionDefinitionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateFunctionDefinitionResponse] -> ShowS
$cshowList :: [CreateFunctionDefinitionResponse] -> ShowS
show :: CreateFunctionDefinitionResponse -> String
$cshow :: CreateFunctionDefinitionResponse -> String
showsPrec :: Int -> CreateFunctionDefinitionResponse -> ShowS
$cshowsPrec :: Int -> CreateFunctionDefinitionResponse -> ShowS
Prelude.Show, (forall x.
CreateFunctionDefinitionResponse
-> Rep CreateFunctionDefinitionResponse x)
-> (forall x.
Rep CreateFunctionDefinitionResponse x
-> CreateFunctionDefinitionResponse)
-> Generic CreateFunctionDefinitionResponse
forall x.
Rep CreateFunctionDefinitionResponse x
-> CreateFunctionDefinitionResponse
forall x.
CreateFunctionDefinitionResponse
-> Rep CreateFunctionDefinitionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateFunctionDefinitionResponse x
-> CreateFunctionDefinitionResponse
$cfrom :: forall x.
CreateFunctionDefinitionResponse
-> Rep CreateFunctionDefinitionResponse x
Prelude.Generic)
newCreateFunctionDefinitionResponse ::
Prelude.Int ->
CreateFunctionDefinitionResponse
newCreateFunctionDefinitionResponse :: Int -> CreateFunctionDefinitionResponse
newCreateFunctionDefinitionResponse Int
pHttpStatus_ =
CreateFunctionDefinitionResponse' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> CreateFunctionDefinitionResponse
CreateFunctionDefinitionResponse'
{ $sel:latestVersionArn:CreateFunctionDefinitionResponse' :: Maybe Text
latestVersionArn =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:arn:CreateFunctionDefinitionResponse' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:CreateFunctionDefinitionResponse' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:creationTimestamp:CreateFunctionDefinitionResponse' :: Maybe Text
creationTimestamp = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:id:CreateFunctionDefinitionResponse' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:latestVersion:CreateFunctionDefinitionResponse' :: Maybe Text
latestVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdatedTimestamp:CreateFunctionDefinitionResponse' :: Maybe Text
lastUpdatedTimestamp = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateFunctionDefinitionResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createFunctionDefinitionResponse_latestVersionArn :: Lens.Lens' CreateFunctionDefinitionResponse (Prelude.Maybe Prelude.Text)
createFunctionDefinitionResponse_latestVersionArn :: (Maybe Text -> f (Maybe Text))
-> CreateFunctionDefinitionResponse
-> f CreateFunctionDefinitionResponse
createFunctionDefinitionResponse_latestVersionArn = (CreateFunctionDefinitionResponse -> Maybe Text)
-> (CreateFunctionDefinitionResponse
-> Maybe Text -> CreateFunctionDefinitionResponse)
-> Lens
CreateFunctionDefinitionResponse
CreateFunctionDefinitionResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFunctionDefinitionResponse' {Maybe Text
latestVersionArn :: Maybe Text
$sel:latestVersionArn:CreateFunctionDefinitionResponse' :: CreateFunctionDefinitionResponse -> Maybe Text
latestVersionArn} -> Maybe Text
latestVersionArn) (\s :: CreateFunctionDefinitionResponse
s@CreateFunctionDefinitionResponse' {} Maybe Text
a -> CreateFunctionDefinitionResponse
s {$sel:latestVersionArn:CreateFunctionDefinitionResponse' :: Maybe Text
latestVersionArn = Maybe Text
a} :: CreateFunctionDefinitionResponse)
createFunctionDefinitionResponse_arn :: Lens.Lens' CreateFunctionDefinitionResponse (Prelude.Maybe Prelude.Text)
createFunctionDefinitionResponse_arn :: (Maybe Text -> f (Maybe Text))
-> CreateFunctionDefinitionResponse
-> f CreateFunctionDefinitionResponse
createFunctionDefinitionResponse_arn = (CreateFunctionDefinitionResponse -> Maybe Text)
-> (CreateFunctionDefinitionResponse
-> Maybe Text -> CreateFunctionDefinitionResponse)
-> Lens
CreateFunctionDefinitionResponse
CreateFunctionDefinitionResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFunctionDefinitionResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:CreateFunctionDefinitionResponse' :: CreateFunctionDefinitionResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: CreateFunctionDefinitionResponse
s@CreateFunctionDefinitionResponse' {} Maybe Text
a -> CreateFunctionDefinitionResponse
s {$sel:arn:CreateFunctionDefinitionResponse' :: Maybe Text
arn = Maybe Text
a} :: CreateFunctionDefinitionResponse)
createFunctionDefinitionResponse_name :: Lens.Lens' CreateFunctionDefinitionResponse (Prelude.Maybe Prelude.Text)
createFunctionDefinitionResponse_name :: (Maybe Text -> f (Maybe Text))
-> CreateFunctionDefinitionResponse
-> f CreateFunctionDefinitionResponse
createFunctionDefinitionResponse_name = (CreateFunctionDefinitionResponse -> Maybe Text)
-> (CreateFunctionDefinitionResponse
-> Maybe Text -> CreateFunctionDefinitionResponse)
-> Lens
CreateFunctionDefinitionResponse
CreateFunctionDefinitionResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFunctionDefinitionResponse' {Maybe Text
name :: Maybe Text
$sel:name:CreateFunctionDefinitionResponse' :: CreateFunctionDefinitionResponse -> Maybe Text
name} -> Maybe Text
name) (\s :: CreateFunctionDefinitionResponse
s@CreateFunctionDefinitionResponse' {} Maybe Text
a -> CreateFunctionDefinitionResponse
s {$sel:name:CreateFunctionDefinitionResponse' :: Maybe Text
name = Maybe Text
a} :: CreateFunctionDefinitionResponse)
createFunctionDefinitionResponse_creationTimestamp :: Lens.Lens' CreateFunctionDefinitionResponse (Prelude.Maybe Prelude.Text)
createFunctionDefinitionResponse_creationTimestamp :: (Maybe Text -> f (Maybe Text))
-> CreateFunctionDefinitionResponse
-> f CreateFunctionDefinitionResponse
createFunctionDefinitionResponse_creationTimestamp = (CreateFunctionDefinitionResponse -> Maybe Text)
-> (CreateFunctionDefinitionResponse
-> Maybe Text -> CreateFunctionDefinitionResponse)
-> Lens
CreateFunctionDefinitionResponse
CreateFunctionDefinitionResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFunctionDefinitionResponse' {Maybe Text
creationTimestamp :: Maybe Text
$sel:creationTimestamp:CreateFunctionDefinitionResponse' :: CreateFunctionDefinitionResponse -> Maybe Text
creationTimestamp} -> Maybe Text
creationTimestamp) (\s :: CreateFunctionDefinitionResponse
s@CreateFunctionDefinitionResponse' {} Maybe Text
a -> CreateFunctionDefinitionResponse
s {$sel:creationTimestamp:CreateFunctionDefinitionResponse' :: Maybe Text
creationTimestamp = Maybe Text
a} :: CreateFunctionDefinitionResponse)
createFunctionDefinitionResponse_id :: Lens.Lens' CreateFunctionDefinitionResponse (Prelude.Maybe Prelude.Text)
createFunctionDefinitionResponse_id :: (Maybe Text -> f (Maybe Text))
-> CreateFunctionDefinitionResponse
-> f CreateFunctionDefinitionResponse
createFunctionDefinitionResponse_id = (CreateFunctionDefinitionResponse -> Maybe Text)
-> (CreateFunctionDefinitionResponse
-> Maybe Text -> CreateFunctionDefinitionResponse)
-> Lens
CreateFunctionDefinitionResponse
CreateFunctionDefinitionResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFunctionDefinitionResponse' {Maybe Text
id :: Maybe Text
$sel:id:CreateFunctionDefinitionResponse' :: CreateFunctionDefinitionResponse -> Maybe Text
id} -> Maybe Text
id) (\s :: CreateFunctionDefinitionResponse
s@CreateFunctionDefinitionResponse' {} Maybe Text
a -> CreateFunctionDefinitionResponse
s {$sel:id:CreateFunctionDefinitionResponse' :: Maybe Text
id = Maybe Text
a} :: CreateFunctionDefinitionResponse)
createFunctionDefinitionResponse_latestVersion :: Lens.Lens' CreateFunctionDefinitionResponse (Prelude.Maybe Prelude.Text)
createFunctionDefinitionResponse_latestVersion :: (Maybe Text -> f (Maybe Text))
-> CreateFunctionDefinitionResponse
-> f CreateFunctionDefinitionResponse
createFunctionDefinitionResponse_latestVersion = (CreateFunctionDefinitionResponse -> Maybe Text)
-> (CreateFunctionDefinitionResponse
-> Maybe Text -> CreateFunctionDefinitionResponse)
-> Lens
CreateFunctionDefinitionResponse
CreateFunctionDefinitionResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFunctionDefinitionResponse' {Maybe Text
latestVersion :: Maybe Text
$sel:latestVersion:CreateFunctionDefinitionResponse' :: CreateFunctionDefinitionResponse -> Maybe Text
latestVersion} -> Maybe Text
latestVersion) (\s :: CreateFunctionDefinitionResponse
s@CreateFunctionDefinitionResponse' {} Maybe Text
a -> CreateFunctionDefinitionResponse
s {$sel:latestVersion:CreateFunctionDefinitionResponse' :: Maybe Text
latestVersion = Maybe Text
a} :: CreateFunctionDefinitionResponse)
createFunctionDefinitionResponse_lastUpdatedTimestamp :: Lens.Lens' CreateFunctionDefinitionResponse (Prelude.Maybe Prelude.Text)
createFunctionDefinitionResponse_lastUpdatedTimestamp :: (Maybe Text -> f (Maybe Text))
-> CreateFunctionDefinitionResponse
-> f CreateFunctionDefinitionResponse
createFunctionDefinitionResponse_lastUpdatedTimestamp = (CreateFunctionDefinitionResponse -> Maybe Text)
-> (CreateFunctionDefinitionResponse
-> Maybe Text -> CreateFunctionDefinitionResponse)
-> Lens
CreateFunctionDefinitionResponse
CreateFunctionDefinitionResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFunctionDefinitionResponse' {Maybe Text
lastUpdatedTimestamp :: Maybe Text
$sel:lastUpdatedTimestamp:CreateFunctionDefinitionResponse' :: CreateFunctionDefinitionResponse -> Maybe Text
lastUpdatedTimestamp} -> Maybe Text
lastUpdatedTimestamp) (\s :: CreateFunctionDefinitionResponse
s@CreateFunctionDefinitionResponse' {} Maybe Text
a -> CreateFunctionDefinitionResponse
s {$sel:lastUpdatedTimestamp:CreateFunctionDefinitionResponse' :: Maybe Text
lastUpdatedTimestamp = Maybe Text
a} :: CreateFunctionDefinitionResponse)
createFunctionDefinitionResponse_httpStatus :: Lens.Lens' CreateFunctionDefinitionResponse Prelude.Int
createFunctionDefinitionResponse_httpStatus :: (Int -> f Int)
-> CreateFunctionDefinitionResponse
-> f CreateFunctionDefinitionResponse
createFunctionDefinitionResponse_httpStatus = (CreateFunctionDefinitionResponse -> Int)
-> (CreateFunctionDefinitionResponse
-> Int -> CreateFunctionDefinitionResponse)
-> Lens
CreateFunctionDefinitionResponse
CreateFunctionDefinitionResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFunctionDefinitionResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateFunctionDefinitionResponse' :: CreateFunctionDefinitionResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateFunctionDefinitionResponse
s@CreateFunctionDefinitionResponse' {} Int
a -> CreateFunctionDefinitionResponse
s {$sel:httpStatus:CreateFunctionDefinitionResponse' :: Int
httpStatus = Int
a} :: CreateFunctionDefinitionResponse)
instance
Prelude.NFData
CreateFunctionDefinitionResponse