module Stratosphere.S3ObjectLambda.AccessPoint.AwsLambdaProperty (
        AwsLambdaProperty(..), mkAwsLambdaProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data AwsLambdaProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3objectlambda-accesspoint-awslambda.html>
    AwsLambdaProperty {AwsLambdaProperty -> ()
haddock_workaround_ :: (),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3objectlambda-accesspoint-awslambda.html#cfn-s3objectlambda-accesspoint-awslambda-functionarn>
                       AwsLambdaProperty -> Value Text
functionArn :: (Value Prelude.Text),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3objectlambda-accesspoint-awslambda.html#cfn-s3objectlambda-accesspoint-awslambda-functionpayload>
                       AwsLambdaProperty -> Maybe (Value Text)
functionPayload :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (AwsLambdaProperty -> AwsLambdaProperty -> Bool
(AwsLambdaProperty -> AwsLambdaProperty -> Bool)
-> (AwsLambdaProperty -> AwsLambdaProperty -> Bool)
-> Eq AwsLambdaProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AwsLambdaProperty -> AwsLambdaProperty -> Bool
== :: AwsLambdaProperty -> AwsLambdaProperty -> Bool
$c/= :: AwsLambdaProperty -> AwsLambdaProperty -> Bool
/= :: AwsLambdaProperty -> AwsLambdaProperty -> Bool
Prelude.Eq, Int -> AwsLambdaProperty -> ShowS
[AwsLambdaProperty] -> ShowS
AwsLambdaProperty -> String
(Int -> AwsLambdaProperty -> ShowS)
-> (AwsLambdaProperty -> String)
-> ([AwsLambdaProperty] -> ShowS)
-> Show AwsLambdaProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AwsLambdaProperty -> ShowS
showsPrec :: Int -> AwsLambdaProperty -> ShowS
$cshow :: AwsLambdaProperty -> String
show :: AwsLambdaProperty -> String
$cshowList :: [AwsLambdaProperty] -> ShowS
showList :: [AwsLambdaProperty] -> ShowS
Prelude.Show)
mkAwsLambdaProperty :: Value Prelude.Text -> AwsLambdaProperty
mkAwsLambdaProperty :: Value Text -> AwsLambdaProperty
mkAwsLambdaProperty Value Text
functionArn
  = AwsLambdaProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), functionArn :: Value Text
functionArn = Value Text
functionArn,
       functionPayload :: Maybe (Value Text)
functionPayload = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties AwsLambdaProperty where
  toResourceProperties :: AwsLambdaProperty -> ResourceProperties
toResourceProperties AwsLambdaProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: AwsLambdaProperty -> ()
functionArn :: AwsLambdaProperty -> Value Text
functionPayload :: AwsLambdaProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
functionArn :: Value Text
functionPayload :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::S3ObjectLambda::AccessPoint.AwsLambda",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
                           [Key
"FunctionArn" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
functionArn]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"FunctionPayload" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
functionPayload]))}
instance JSON.ToJSON AwsLambdaProperty where
  toJSON :: AwsLambdaProperty -> Value
toJSON AwsLambdaProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: AwsLambdaProperty -> ()
functionArn :: AwsLambdaProperty -> Value Text
functionPayload :: AwsLambdaProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
functionArn :: Value Text
functionPayload :: Maybe (Value Text)
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
              [Key
"FunctionArn" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
functionArn]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"FunctionPayload" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
functionPayload])))
instance Property "FunctionArn" AwsLambdaProperty where
  type PropertyType "FunctionArn" AwsLambdaProperty = Value Prelude.Text
  set :: PropertyType "FunctionArn" AwsLambdaProperty
-> AwsLambdaProperty -> AwsLambdaProperty
set PropertyType "FunctionArn" AwsLambdaProperty
newValue AwsLambdaProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: AwsLambdaProperty -> ()
functionArn :: AwsLambdaProperty -> Value Text
functionPayload :: AwsLambdaProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
functionArn :: Value Text
functionPayload :: Maybe (Value Text)
..}
    = AwsLambdaProperty {functionArn :: Value Text
functionArn = PropertyType "FunctionArn" AwsLambdaProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
functionPayload :: Maybe (Value Text)
haddock_workaround_ :: ()
functionPayload :: Maybe (Value Text)
..}
instance Property "FunctionPayload" AwsLambdaProperty where
  type PropertyType "FunctionPayload" AwsLambdaProperty = Value Prelude.Text
  set :: PropertyType "FunctionPayload" AwsLambdaProperty
-> AwsLambdaProperty -> AwsLambdaProperty
set PropertyType "FunctionPayload" AwsLambdaProperty
newValue AwsLambdaProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: AwsLambdaProperty -> ()
functionArn :: AwsLambdaProperty -> Value Text
functionPayload :: AwsLambdaProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
functionArn :: Value Text
functionPayload :: Maybe (Value Text)
..}
    = AwsLambdaProperty {functionPayload :: Maybe (Value Text)
functionPayload = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "FunctionPayload" AwsLambdaProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
functionArn :: Value Text
haddock_workaround_ :: ()
functionArn :: Value Text
..}