{-# 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.AppSync.UpdateFunction
(
UpdateFunction (..),
newUpdateFunction,
updateFunction_requestMappingTemplate,
updateFunction_responseMappingTemplate,
updateFunction_syncConfig,
updateFunction_description,
updateFunction_apiId,
updateFunction_name,
updateFunction_functionId,
updateFunction_dataSourceName,
updateFunction_functionVersion,
UpdateFunctionResponse (..),
newUpdateFunctionResponse,
updateFunctionResponse_functionConfiguration,
updateFunctionResponse_httpStatus,
)
where
import Amazonka.AppSync.Types
import qualified Amazonka.Core as Core
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 UpdateFunction = UpdateFunction'
{
UpdateFunction -> Maybe Text
requestMappingTemplate :: Prelude.Maybe Prelude.Text,
UpdateFunction -> Maybe Text
responseMappingTemplate :: Prelude.Maybe Prelude.Text,
UpdateFunction -> Maybe SyncConfig
syncConfig :: Prelude.Maybe SyncConfig,
UpdateFunction -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
UpdateFunction -> Text
apiId :: Prelude.Text,
UpdateFunction -> Text
name :: Prelude.Text,
UpdateFunction -> Text
functionId :: Prelude.Text,
UpdateFunction -> Text
dataSourceName :: Prelude.Text,
UpdateFunction -> Text
functionVersion :: Prelude.Text
}
deriving (UpdateFunction -> UpdateFunction -> Bool
(UpdateFunction -> UpdateFunction -> Bool)
-> (UpdateFunction -> UpdateFunction -> Bool) -> Eq UpdateFunction
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateFunction -> UpdateFunction -> Bool
$c/= :: UpdateFunction -> UpdateFunction -> Bool
== :: UpdateFunction -> UpdateFunction -> Bool
$c== :: UpdateFunction -> UpdateFunction -> Bool
Prelude.Eq, ReadPrec [UpdateFunction]
ReadPrec UpdateFunction
Int -> ReadS UpdateFunction
ReadS [UpdateFunction]
(Int -> ReadS UpdateFunction)
-> ReadS [UpdateFunction]
-> ReadPrec UpdateFunction
-> ReadPrec [UpdateFunction]
-> Read UpdateFunction
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateFunction]
$creadListPrec :: ReadPrec [UpdateFunction]
readPrec :: ReadPrec UpdateFunction
$creadPrec :: ReadPrec UpdateFunction
readList :: ReadS [UpdateFunction]
$creadList :: ReadS [UpdateFunction]
readsPrec :: Int -> ReadS UpdateFunction
$creadsPrec :: Int -> ReadS UpdateFunction
Prelude.Read, Int -> UpdateFunction -> ShowS
[UpdateFunction] -> ShowS
UpdateFunction -> String
(Int -> UpdateFunction -> ShowS)
-> (UpdateFunction -> String)
-> ([UpdateFunction] -> ShowS)
-> Show UpdateFunction
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateFunction] -> ShowS
$cshowList :: [UpdateFunction] -> ShowS
show :: UpdateFunction -> String
$cshow :: UpdateFunction -> String
showsPrec :: Int -> UpdateFunction -> ShowS
$cshowsPrec :: Int -> UpdateFunction -> ShowS
Prelude.Show, (forall x. UpdateFunction -> Rep UpdateFunction x)
-> (forall x. Rep UpdateFunction x -> UpdateFunction)
-> Generic UpdateFunction
forall x. Rep UpdateFunction x -> UpdateFunction
forall x. UpdateFunction -> Rep UpdateFunction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateFunction x -> UpdateFunction
$cfrom :: forall x. UpdateFunction -> Rep UpdateFunction x
Prelude.Generic)
newUpdateFunction ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
UpdateFunction
newUpdateFunction :: Text -> Text -> Text -> Text -> Text -> UpdateFunction
newUpdateFunction
Text
pApiId_
Text
pName_
Text
pFunctionId_
Text
pDataSourceName_
Text
pFunctionVersion_ =
UpdateFunction' :: Maybe Text
-> Maybe Text
-> Maybe SyncConfig
-> Maybe Text
-> Text
-> Text
-> Text
-> Text
-> Text
-> UpdateFunction
UpdateFunction'
{ $sel:requestMappingTemplate:UpdateFunction' :: Maybe Text
requestMappingTemplate =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:responseMappingTemplate:UpdateFunction' :: Maybe Text
responseMappingTemplate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:syncConfig:UpdateFunction' :: Maybe SyncConfig
syncConfig = Maybe SyncConfig
forall a. Maybe a
Prelude.Nothing,
$sel:description:UpdateFunction' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:apiId:UpdateFunction' :: Text
apiId = Text
pApiId_,
$sel:name:UpdateFunction' :: Text
name = Text
pName_,
$sel:functionId:UpdateFunction' :: Text
functionId = Text
pFunctionId_,
$sel:dataSourceName:UpdateFunction' :: Text
dataSourceName = Text
pDataSourceName_,
$sel:functionVersion:UpdateFunction' :: Text
functionVersion = Text
pFunctionVersion_
}
updateFunction_requestMappingTemplate :: Lens.Lens' UpdateFunction (Prelude.Maybe Prelude.Text)
updateFunction_requestMappingTemplate :: (Maybe Text -> f (Maybe Text))
-> UpdateFunction -> f UpdateFunction
updateFunction_requestMappingTemplate = (UpdateFunction -> Maybe Text)
-> (UpdateFunction -> Maybe Text -> UpdateFunction)
-> Lens UpdateFunction UpdateFunction (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFunction' {Maybe Text
requestMappingTemplate :: Maybe Text
$sel:requestMappingTemplate:UpdateFunction' :: UpdateFunction -> Maybe Text
requestMappingTemplate} -> Maybe Text
requestMappingTemplate) (\s :: UpdateFunction
s@UpdateFunction' {} Maybe Text
a -> UpdateFunction
s {$sel:requestMappingTemplate:UpdateFunction' :: Maybe Text
requestMappingTemplate = Maybe Text
a} :: UpdateFunction)
updateFunction_responseMappingTemplate :: Lens.Lens' UpdateFunction (Prelude.Maybe Prelude.Text)
updateFunction_responseMappingTemplate :: (Maybe Text -> f (Maybe Text))
-> UpdateFunction -> f UpdateFunction
updateFunction_responseMappingTemplate = (UpdateFunction -> Maybe Text)
-> (UpdateFunction -> Maybe Text -> UpdateFunction)
-> Lens UpdateFunction UpdateFunction (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFunction' {Maybe Text
responseMappingTemplate :: Maybe Text
$sel:responseMappingTemplate:UpdateFunction' :: UpdateFunction -> Maybe Text
responseMappingTemplate} -> Maybe Text
responseMappingTemplate) (\s :: UpdateFunction
s@UpdateFunction' {} Maybe Text
a -> UpdateFunction
s {$sel:responseMappingTemplate:UpdateFunction' :: Maybe Text
responseMappingTemplate = Maybe Text
a} :: UpdateFunction)
updateFunction_syncConfig :: Lens.Lens' UpdateFunction (Prelude.Maybe SyncConfig)
updateFunction_syncConfig :: (Maybe SyncConfig -> f (Maybe SyncConfig))
-> UpdateFunction -> f UpdateFunction
updateFunction_syncConfig = (UpdateFunction -> Maybe SyncConfig)
-> (UpdateFunction -> Maybe SyncConfig -> UpdateFunction)
-> Lens
UpdateFunction UpdateFunction (Maybe SyncConfig) (Maybe SyncConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFunction' {Maybe SyncConfig
syncConfig :: Maybe SyncConfig
$sel:syncConfig:UpdateFunction' :: UpdateFunction -> Maybe SyncConfig
syncConfig} -> Maybe SyncConfig
syncConfig) (\s :: UpdateFunction
s@UpdateFunction' {} Maybe SyncConfig
a -> UpdateFunction
s {$sel:syncConfig:UpdateFunction' :: Maybe SyncConfig
syncConfig = Maybe SyncConfig
a} :: UpdateFunction)
updateFunction_description :: Lens.Lens' UpdateFunction (Prelude.Maybe Prelude.Text)
updateFunction_description :: (Maybe Text -> f (Maybe Text))
-> UpdateFunction -> f UpdateFunction
updateFunction_description = (UpdateFunction -> Maybe Text)
-> (UpdateFunction -> Maybe Text -> UpdateFunction)
-> Lens UpdateFunction UpdateFunction (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFunction' {Maybe Text
description :: Maybe Text
$sel:description:UpdateFunction' :: UpdateFunction -> Maybe Text
description} -> Maybe Text
description) (\s :: UpdateFunction
s@UpdateFunction' {} Maybe Text
a -> UpdateFunction
s {$sel:description:UpdateFunction' :: Maybe Text
description = Maybe Text
a} :: UpdateFunction)
updateFunction_apiId :: Lens.Lens' UpdateFunction Prelude.Text
updateFunction_apiId :: (Text -> f Text) -> UpdateFunction -> f UpdateFunction
updateFunction_apiId = (UpdateFunction -> Text)
-> (UpdateFunction -> Text -> UpdateFunction)
-> Lens UpdateFunction UpdateFunction Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFunction' {Text
apiId :: Text
$sel:apiId:UpdateFunction' :: UpdateFunction -> Text
apiId} -> Text
apiId) (\s :: UpdateFunction
s@UpdateFunction' {} Text
a -> UpdateFunction
s {$sel:apiId:UpdateFunction' :: Text
apiId = Text
a} :: UpdateFunction)
updateFunction_name :: Lens.Lens' UpdateFunction Prelude.Text
updateFunction_name :: (Text -> f Text) -> UpdateFunction -> f UpdateFunction
updateFunction_name = (UpdateFunction -> Text)
-> (UpdateFunction -> Text -> UpdateFunction)
-> Lens UpdateFunction UpdateFunction Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFunction' {Text
name :: Text
$sel:name:UpdateFunction' :: UpdateFunction -> Text
name} -> Text
name) (\s :: UpdateFunction
s@UpdateFunction' {} Text
a -> UpdateFunction
s {$sel:name:UpdateFunction' :: Text
name = Text
a} :: UpdateFunction)
updateFunction_functionId :: Lens.Lens' UpdateFunction Prelude.Text
updateFunction_functionId :: (Text -> f Text) -> UpdateFunction -> f UpdateFunction
updateFunction_functionId = (UpdateFunction -> Text)
-> (UpdateFunction -> Text -> UpdateFunction)
-> Lens UpdateFunction UpdateFunction Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFunction' {Text
functionId :: Text
$sel:functionId:UpdateFunction' :: UpdateFunction -> Text
functionId} -> Text
functionId) (\s :: UpdateFunction
s@UpdateFunction' {} Text
a -> UpdateFunction
s {$sel:functionId:UpdateFunction' :: Text
functionId = Text
a} :: UpdateFunction)
updateFunction_dataSourceName :: Lens.Lens' UpdateFunction Prelude.Text
updateFunction_dataSourceName :: (Text -> f Text) -> UpdateFunction -> f UpdateFunction
updateFunction_dataSourceName = (UpdateFunction -> Text)
-> (UpdateFunction -> Text -> UpdateFunction)
-> Lens UpdateFunction UpdateFunction Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFunction' {Text
dataSourceName :: Text
$sel:dataSourceName:UpdateFunction' :: UpdateFunction -> Text
dataSourceName} -> Text
dataSourceName) (\s :: UpdateFunction
s@UpdateFunction' {} Text
a -> UpdateFunction
s {$sel:dataSourceName:UpdateFunction' :: Text
dataSourceName = Text
a} :: UpdateFunction)
updateFunction_functionVersion :: Lens.Lens' UpdateFunction Prelude.Text
updateFunction_functionVersion :: (Text -> f Text) -> UpdateFunction -> f UpdateFunction
updateFunction_functionVersion = (UpdateFunction -> Text)
-> (UpdateFunction -> Text -> UpdateFunction)
-> Lens UpdateFunction UpdateFunction Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFunction' {Text
functionVersion :: Text
$sel:functionVersion:UpdateFunction' :: UpdateFunction -> Text
functionVersion} -> Text
functionVersion) (\s :: UpdateFunction
s@UpdateFunction' {} Text
a -> UpdateFunction
s {$sel:functionVersion:UpdateFunction' :: Text
functionVersion = Text
a} :: UpdateFunction)
instance Core.AWSRequest UpdateFunction where
type
AWSResponse UpdateFunction =
UpdateFunctionResponse
request :: UpdateFunction -> Request UpdateFunction
request = Service -> UpdateFunction -> Request UpdateFunction
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy UpdateFunction
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateFunction)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse UpdateFunction))
-> Logger
-> Service
-> Proxy UpdateFunction
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateFunction)))
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 FunctionConfiguration -> Int -> UpdateFunctionResponse
UpdateFunctionResponse'
(Maybe FunctionConfiguration -> Int -> UpdateFunctionResponse)
-> Either String (Maybe FunctionConfiguration)
-> Either String (Int -> UpdateFunctionResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe FunctionConfiguration)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"functionConfiguration")
Either String (Int -> UpdateFunctionResponse)
-> Either String Int -> Either String UpdateFunctionResponse
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 UpdateFunction
instance Prelude.NFData UpdateFunction
instance Core.ToHeaders UpdateFunction where
toHeaders :: UpdateFunction -> ResponseHeaders
toHeaders =
ResponseHeaders -> UpdateFunction -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ 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 UpdateFunction where
toJSON :: UpdateFunction -> Value
toJSON UpdateFunction' {Maybe Text
Maybe SyncConfig
Text
functionVersion :: Text
dataSourceName :: Text
functionId :: Text
name :: Text
apiId :: Text
description :: Maybe Text
syncConfig :: Maybe SyncConfig
responseMappingTemplate :: Maybe Text
requestMappingTemplate :: Maybe Text
$sel:functionVersion:UpdateFunction' :: UpdateFunction -> Text
$sel:dataSourceName:UpdateFunction' :: UpdateFunction -> Text
$sel:functionId:UpdateFunction' :: UpdateFunction -> Text
$sel:name:UpdateFunction' :: UpdateFunction -> Text
$sel:apiId:UpdateFunction' :: UpdateFunction -> Text
$sel:description:UpdateFunction' :: UpdateFunction -> Maybe Text
$sel:syncConfig:UpdateFunction' :: UpdateFunction -> Maybe SyncConfig
$sel:responseMappingTemplate:UpdateFunction' :: UpdateFunction -> Maybe Text
$sel:requestMappingTemplate:UpdateFunction' :: UpdateFunction -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"requestMappingTemplate" 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
requestMappingTemplate,
(Text
"responseMappingTemplate" 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
responseMappingTemplate,
(Text
"syncConfig" Text -> SyncConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (SyncConfig -> Pair) -> Maybe SyncConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SyncConfig
syncConfig,
(Text
"description" 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
description,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"dataSourceName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
dataSourceName),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"functionVersion" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
functionVersion)
]
)
instance Core.ToPath UpdateFunction where
toPath :: UpdateFunction -> ByteString
toPath UpdateFunction' {Maybe Text
Maybe SyncConfig
Text
functionVersion :: Text
dataSourceName :: Text
functionId :: Text
name :: Text
apiId :: Text
description :: Maybe Text
syncConfig :: Maybe SyncConfig
responseMappingTemplate :: Maybe Text
requestMappingTemplate :: Maybe Text
$sel:functionVersion:UpdateFunction' :: UpdateFunction -> Text
$sel:dataSourceName:UpdateFunction' :: UpdateFunction -> Text
$sel:functionId:UpdateFunction' :: UpdateFunction -> Text
$sel:name:UpdateFunction' :: UpdateFunction -> Text
$sel:apiId:UpdateFunction' :: UpdateFunction -> Text
$sel:description:UpdateFunction' :: UpdateFunction -> Maybe Text
$sel:syncConfig:UpdateFunction' :: UpdateFunction -> Maybe SyncConfig
$sel:responseMappingTemplate:UpdateFunction' :: UpdateFunction -> Maybe Text
$sel:requestMappingTemplate:UpdateFunction' :: UpdateFunction -> Maybe Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/v1/apis/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
apiId,
ByteString
"/functions/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
functionId
]
instance Core.ToQuery UpdateFunction where
toQuery :: UpdateFunction -> QueryString
toQuery = QueryString -> UpdateFunction -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data UpdateFunctionResponse = UpdateFunctionResponse'
{
UpdateFunctionResponse -> Maybe FunctionConfiguration
functionConfiguration :: Prelude.Maybe FunctionConfiguration,
UpdateFunctionResponse -> Int
httpStatus :: Prelude.Int
}
deriving (UpdateFunctionResponse -> UpdateFunctionResponse -> Bool
(UpdateFunctionResponse -> UpdateFunctionResponse -> Bool)
-> (UpdateFunctionResponse -> UpdateFunctionResponse -> Bool)
-> Eq UpdateFunctionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateFunctionResponse -> UpdateFunctionResponse -> Bool
$c/= :: UpdateFunctionResponse -> UpdateFunctionResponse -> Bool
== :: UpdateFunctionResponse -> UpdateFunctionResponse -> Bool
$c== :: UpdateFunctionResponse -> UpdateFunctionResponse -> Bool
Prelude.Eq, ReadPrec [UpdateFunctionResponse]
ReadPrec UpdateFunctionResponse
Int -> ReadS UpdateFunctionResponse
ReadS [UpdateFunctionResponse]
(Int -> ReadS UpdateFunctionResponse)
-> ReadS [UpdateFunctionResponse]
-> ReadPrec UpdateFunctionResponse
-> ReadPrec [UpdateFunctionResponse]
-> Read UpdateFunctionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateFunctionResponse]
$creadListPrec :: ReadPrec [UpdateFunctionResponse]
readPrec :: ReadPrec UpdateFunctionResponse
$creadPrec :: ReadPrec UpdateFunctionResponse
readList :: ReadS [UpdateFunctionResponse]
$creadList :: ReadS [UpdateFunctionResponse]
readsPrec :: Int -> ReadS UpdateFunctionResponse
$creadsPrec :: Int -> ReadS UpdateFunctionResponse
Prelude.Read, Int -> UpdateFunctionResponse -> ShowS
[UpdateFunctionResponse] -> ShowS
UpdateFunctionResponse -> String
(Int -> UpdateFunctionResponse -> ShowS)
-> (UpdateFunctionResponse -> String)
-> ([UpdateFunctionResponse] -> ShowS)
-> Show UpdateFunctionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateFunctionResponse] -> ShowS
$cshowList :: [UpdateFunctionResponse] -> ShowS
show :: UpdateFunctionResponse -> String
$cshow :: UpdateFunctionResponse -> String
showsPrec :: Int -> UpdateFunctionResponse -> ShowS
$cshowsPrec :: Int -> UpdateFunctionResponse -> ShowS
Prelude.Show, (forall x. UpdateFunctionResponse -> Rep UpdateFunctionResponse x)
-> (forall x.
Rep UpdateFunctionResponse x -> UpdateFunctionResponse)
-> Generic UpdateFunctionResponse
forall x. Rep UpdateFunctionResponse x -> UpdateFunctionResponse
forall x. UpdateFunctionResponse -> Rep UpdateFunctionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateFunctionResponse x -> UpdateFunctionResponse
$cfrom :: forall x. UpdateFunctionResponse -> Rep UpdateFunctionResponse x
Prelude.Generic)
newUpdateFunctionResponse ::
Prelude.Int ->
UpdateFunctionResponse
newUpdateFunctionResponse :: Int -> UpdateFunctionResponse
newUpdateFunctionResponse Int
pHttpStatus_ =
UpdateFunctionResponse' :: Maybe FunctionConfiguration -> Int -> UpdateFunctionResponse
UpdateFunctionResponse'
{ $sel:functionConfiguration:UpdateFunctionResponse' :: Maybe FunctionConfiguration
functionConfiguration =
Maybe FunctionConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:UpdateFunctionResponse' :: Int
httpStatus = Int
pHttpStatus_
}
updateFunctionResponse_functionConfiguration :: Lens.Lens' UpdateFunctionResponse (Prelude.Maybe FunctionConfiguration)
updateFunctionResponse_functionConfiguration :: (Maybe FunctionConfiguration -> f (Maybe FunctionConfiguration))
-> UpdateFunctionResponse -> f UpdateFunctionResponse
updateFunctionResponse_functionConfiguration = (UpdateFunctionResponse -> Maybe FunctionConfiguration)
-> (UpdateFunctionResponse
-> Maybe FunctionConfiguration -> UpdateFunctionResponse)
-> Lens
UpdateFunctionResponse
UpdateFunctionResponse
(Maybe FunctionConfiguration)
(Maybe FunctionConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFunctionResponse' {Maybe FunctionConfiguration
functionConfiguration :: Maybe FunctionConfiguration
$sel:functionConfiguration:UpdateFunctionResponse' :: UpdateFunctionResponse -> Maybe FunctionConfiguration
functionConfiguration} -> Maybe FunctionConfiguration
functionConfiguration) (\s :: UpdateFunctionResponse
s@UpdateFunctionResponse' {} Maybe FunctionConfiguration
a -> UpdateFunctionResponse
s {$sel:functionConfiguration:UpdateFunctionResponse' :: Maybe FunctionConfiguration
functionConfiguration = Maybe FunctionConfiguration
a} :: UpdateFunctionResponse)
updateFunctionResponse_httpStatus :: Lens.Lens' UpdateFunctionResponse Prelude.Int
updateFunctionResponse_httpStatus :: (Int -> f Int)
-> UpdateFunctionResponse -> f UpdateFunctionResponse
updateFunctionResponse_httpStatus = (UpdateFunctionResponse -> Int)
-> (UpdateFunctionResponse -> Int -> UpdateFunctionResponse)
-> Lens UpdateFunctionResponse UpdateFunctionResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFunctionResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateFunctionResponse' :: UpdateFunctionResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateFunctionResponse
s@UpdateFunctionResponse' {} Int
a -> UpdateFunctionResponse
s {$sel:httpStatus:UpdateFunctionResponse' :: Int
httpStatus = Int
a} :: UpdateFunctionResponse)
instance Prelude.NFData UpdateFunctionResponse