module Stratosphere.Lambda.Version.RuntimePolicyProperty (
        RuntimePolicyProperty(..), mkRuntimePolicyProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data RuntimePolicyProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-version-runtimepolicy.html>
    RuntimePolicyProperty {RuntimePolicyProperty -> ()
haddock_workaround_ :: (),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-version-runtimepolicy.html#cfn-lambda-version-runtimepolicy-runtimeversionarn>
                           RuntimePolicyProperty -> Maybe (Value Text)
runtimeVersionArn :: (Prelude.Maybe (Value Prelude.Text)),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-version-runtimepolicy.html#cfn-lambda-version-runtimepolicy-updateruntimeon>
                           RuntimePolicyProperty -> Value Text
updateRuntimeOn :: (Value Prelude.Text)}
  deriving stock (RuntimePolicyProperty -> RuntimePolicyProperty -> Bool
(RuntimePolicyProperty -> RuntimePolicyProperty -> Bool)
-> (RuntimePolicyProperty -> RuntimePolicyProperty -> Bool)
-> Eq RuntimePolicyProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RuntimePolicyProperty -> RuntimePolicyProperty -> Bool
== :: RuntimePolicyProperty -> RuntimePolicyProperty -> Bool
$c/= :: RuntimePolicyProperty -> RuntimePolicyProperty -> Bool
/= :: RuntimePolicyProperty -> RuntimePolicyProperty -> Bool
Prelude.Eq, Int -> RuntimePolicyProperty -> ShowS
[RuntimePolicyProperty] -> ShowS
RuntimePolicyProperty -> String
(Int -> RuntimePolicyProperty -> ShowS)
-> (RuntimePolicyProperty -> String)
-> ([RuntimePolicyProperty] -> ShowS)
-> Show RuntimePolicyProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RuntimePolicyProperty -> ShowS
showsPrec :: Int -> RuntimePolicyProperty -> ShowS
$cshow :: RuntimePolicyProperty -> String
show :: RuntimePolicyProperty -> String
$cshowList :: [RuntimePolicyProperty] -> ShowS
showList :: [RuntimePolicyProperty] -> ShowS
Prelude.Show)
mkRuntimePolicyProperty ::
  Value Prelude.Text -> RuntimePolicyProperty
mkRuntimePolicyProperty :: Value Text -> RuntimePolicyProperty
mkRuntimePolicyProperty Value Text
updateRuntimeOn
  = RuntimePolicyProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), updateRuntimeOn :: Value Text
updateRuntimeOn = Value Text
updateRuntimeOn,
       runtimeVersionArn :: Maybe (Value Text)
runtimeVersionArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties RuntimePolicyProperty where
  toResourceProperties :: RuntimePolicyProperty -> ResourceProperties
toResourceProperties RuntimePolicyProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: RuntimePolicyProperty -> ()
runtimeVersionArn :: RuntimePolicyProperty -> Maybe (Value Text)
updateRuntimeOn :: RuntimePolicyProperty -> Value Text
haddock_workaround_ :: ()
runtimeVersionArn :: Maybe (Value Text)
updateRuntimeOn :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Lambda::Version.RuntimePolicy",
         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
"UpdateRuntimeOn" 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
updateRuntimeOn]
                           ([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
"RuntimeVersionArn" (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)
runtimeVersionArn]))}
instance JSON.ToJSON RuntimePolicyProperty where
  toJSON :: RuntimePolicyProperty -> Value
toJSON RuntimePolicyProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: RuntimePolicyProperty -> ()
runtimeVersionArn :: RuntimePolicyProperty -> Maybe (Value Text)
updateRuntimeOn :: RuntimePolicyProperty -> Value Text
haddock_workaround_ :: ()
runtimeVersionArn :: Maybe (Value Text)
updateRuntimeOn :: 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
"UpdateRuntimeOn" 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
updateRuntimeOn]
              ([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
"RuntimeVersionArn" (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)
runtimeVersionArn])))
instance Property "RuntimeVersionArn" RuntimePolicyProperty where
  type PropertyType "RuntimeVersionArn" RuntimePolicyProperty = Value Prelude.Text
  set :: PropertyType "RuntimeVersionArn" RuntimePolicyProperty
-> RuntimePolicyProperty -> RuntimePolicyProperty
set PropertyType "RuntimeVersionArn" RuntimePolicyProperty
newValue RuntimePolicyProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: RuntimePolicyProperty -> ()
runtimeVersionArn :: RuntimePolicyProperty -> Maybe (Value Text)
updateRuntimeOn :: RuntimePolicyProperty -> Value Text
haddock_workaround_ :: ()
runtimeVersionArn :: Maybe (Value Text)
updateRuntimeOn :: Value Text
..}
    = RuntimePolicyProperty
        {runtimeVersionArn :: Maybe (Value Text)
runtimeVersionArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "RuntimeVersionArn" RuntimePolicyProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
updateRuntimeOn :: Value Text
haddock_workaround_ :: ()
updateRuntimeOn :: Value Text
..}
instance Property "UpdateRuntimeOn" RuntimePolicyProperty where
  type PropertyType "UpdateRuntimeOn" RuntimePolicyProperty = Value Prelude.Text
  set :: PropertyType "UpdateRuntimeOn" RuntimePolicyProperty
-> RuntimePolicyProperty -> RuntimePolicyProperty
set PropertyType "UpdateRuntimeOn" RuntimePolicyProperty
newValue RuntimePolicyProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: RuntimePolicyProperty -> ()
runtimeVersionArn :: RuntimePolicyProperty -> Maybe (Value Text)
updateRuntimeOn :: RuntimePolicyProperty -> Value Text
haddock_workaround_ :: ()
runtimeVersionArn :: Maybe (Value Text)
updateRuntimeOn :: Value Text
..}
    = RuntimePolicyProperty {updateRuntimeOn :: Value Text
updateRuntimeOn = PropertyType "UpdateRuntimeOn" RuntimePolicyProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
runtimeVersionArn :: Maybe (Value Text)
haddock_workaround_ :: ()
runtimeVersionArn :: Maybe (Value Text)
..}