module Stratosphere.Lambda.Alias (
        module Exports, Alias(..), mkAlias
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Lambda.Alias.AliasRoutingConfigurationProperty as Exports
import {-# SOURCE #-} Stratosphere.Lambda.Alias.ProvisionedConcurrencyConfigurationProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data Alias
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-alias.html>
    Alias {Alias -> ()
haddock_workaround_ :: (),
           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-alias.html#cfn-lambda-alias-description>
           Alias -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-alias.html#cfn-lambda-alias-functionname>
           Alias -> Value Text
functionName :: (Value Prelude.Text),
           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-alias.html#cfn-lambda-alias-functionversion>
           Alias -> Value Text
functionVersion :: (Value Prelude.Text),
           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-alias.html#cfn-lambda-alias-name>
           Alias -> Value Text
name :: (Value Prelude.Text),
           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-alias.html#cfn-lambda-alias-provisionedconcurrencyconfig>
           Alias -> Maybe ProvisionedConcurrencyConfigurationProperty
provisionedConcurrencyConfig :: (Prelude.Maybe ProvisionedConcurrencyConfigurationProperty),
           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-alias.html#cfn-lambda-alias-routingconfig>
           Alias -> Maybe AliasRoutingConfigurationProperty
routingConfig :: (Prelude.Maybe AliasRoutingConfigurationProperty)}
  deriving stock (Alias -> Alias -> Bool
(Alias -> Alias -> Bool) -> (Alias -> Alias -> Bool) -> Eq Alias
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Alias -> Alias -> Bool
== :: Alias -> Alias -> Bool
$c/= :: Alias -> Alias -> Bool
/= :: Alias -> Alias -> Bool
Prelude.Eq, Int -> Alias -> ShowS
[Alias] -> ShowS
Alias -> String
(Int -> Alias -> ShowS)
-> (Alias -> String) -> ([Alias] -> ShowS) -> Show Alias
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Alias -> ShowS
showsPrec :: Int -> Alias -> ShowS
$cshow :: Alias -> String
show :: Alias -> String
$cshowList :: [Alias] -> ShowS
showList :: [Alias] -> ShowS
Prelude.Show)
mkAlias ::
  Value Prelude.Text
  -> Value Prelude.Text -> Value Prelude.Text -> Alias
mkAlias :: Value Text -> Value Text -> Value Text -> Alias
mkAlias Value Text
functionName Value Text
functionVersion Value Text
name
  = Alias
      {haddock_workaround_ :: ()
haddock_workaround_ = (), functionName :: Value Text
functionName = Value Text
functionName,
       functionVersion :: Value Text
functionVersion = Value Text
functionVersion, name :: Value Text
name = Value Text
name,
       description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       provisionedConcurrencyConfig :: Maybe ProvisionedConcurrencyConfigurationProperty
provisionedConcurrencyConfig = Maybe ProvisionedConcurrencyConfigurationProperty
forall a. Maybe a
Prelude.Nothing,
       routingConfig :: Maybe AliasRoutingConfigurationProperty
routingConfig = Maybe AliasRoutingConfigurationProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Alias where
  toResourceProperties :: Alias -> ResourceProperties
toResourceProperties Alias {Maybe (Value Text)
Maybe ProvisionedConcurrencyConfigurationProperty
Maybe AliasRoutingConfigurationProperty
()
Value Text
haddock_workaround_ :: Alias -> ()
description :: Alias -> Maybe (Value Text)
functionName :: Alias -> Value Text
functionVersion :: Alias -> Value Text
name :: Alias -> Value Text
provisionedConcurrencyConfig :: Alias -> Maybe ProvisionedConcurrencyConfigurationProperty
routingConfig :: Alias -> Maybe AliasRoutingConfigurationProperty
haddock_workaround_ :: ()
description :: Maybe (Value Text)
functionName :: Value Text
functionVersion :: Value Text
name :: Value Text
provisionedConcurrencyConfig :: Maybe ProvisionedConcurrencyConfigurationProperty
routingConfig :: Maybe AliasRoutingConfigurationProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Lambda::Alias", 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
"FunctionName" 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
functionName,
                            Key
"FunctionVersion" 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
functionVersion, Key
"Name" 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
name]
                           ([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
"Description" (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)
description,
                               Key -> ProvisionedConcurrencyConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ProvisionedConcurrencyConfig"
                                 (ProvisionedConcurrencyConfigurationProperty -> (Key, Value))
-> Maybe ProvisionedConcurrencyConfigurationProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ProvisionedConcurrencyConfigurationProperty
provisionedConcurrencyConfig,
                               Key -> AliasRoutingConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"RoutingConfig" (AliasRoutingConfigurationProperty -> (Key, Value))
-> Maybe AliasRoutingConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AliasRoutingConfigurationProperty
routingConfig]))}
instance JSON.ToJSON Alias where
  toJSON :: Alias -> Value
toJSON Alias {Maybe (Value Text)
Maybe ProvisionedConcurrencyConfigurationProperty
Maybe AliasRoutingConfigurationProperty
()
Value Text
haddock_workaround_ :: Alias -> ()
description :: Alias -> Maybe (Value Text)
functionName :: Alias -> Value Text
functionVersion :: Alias -> Value Text
name :: Alias -> Value Text
provisionedConcurrencyConfig :: Alias -> Maybe ProvisionedConcurrencyConfigurationProperty
routingConfig :: Alias -> Maybe AliasRoutingConfigurationProperty
haddock_workaround_ :: ()
description :: Maybe (Value Text)
functionName :: Value Text
functionVersion :: Value Text
name :: Value Text
provisionedConcurrencyConfig :: Maybe ProvisionedConcurrencyConfigurationProperty
routingConfig :: Maybe AliasRoutingConfigurationProperty
..}
    = [(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
"FunctionName" 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
functionName,
               Key
"FunctionVersion" 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
functionVersion, Key
"Name" 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
name]
              ([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
"Description" (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)
description,
                  Key -> ProvisionedConcurrencyConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ProvisionedConcurrencyConfig"
                    (ProvisionedConcurrencyConfigurationProperty -> (Key, Value))
-> Maybe ProvisionedConcurrencyConfigurationProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ProvisionedConcurrencyConfigurationProperty
provisionedConcurrencyConfig,
                  Key -> AliasRoutingConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"RoutingConfig" (AliasRoutingConfigurationProperty -> (Key, Value))
-> Maybe AliasRoutingConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AliasRoutingConfigurationProperty
routingConfig])))
instance Property "Description" Alias where
  type PropertyType "Description" Alias = Value Prelude.Text
  set :: PropertyType "Description" Alias -> Alias -> Alias
set PropertyType "Description" Alias
newValue Alias {Maybe (Value Text)
Maybe ProvisionedConcurrencyConfigurationProperty
Maybe AliasRoutingConfigurationProperty
()
Value Text
haddock_workaround_ :: Alias -> ()
description :: Alias -> Maybe (Value Text)
functionName :: Alias -> Value Text
functionVersion :: Alias -> Value Text
name :: Alias -> Value Text
provisionedConcurrencyConfig :: Alias -> Maybe ProvisionedConcurrencyConfigurationProperty
routingConfig :: Alias -> Maybe AliasRoutingConfigurationProperty
haddock_workaround_ :: ()
description :: Maybe (Value Text)
functionName :: Value Text
functionVersion :: Value Text
name :: Value Text
provisionedConcurrencyConfig :: Maybe ProvisionedConcurrencyConfigurationProperty
routingConfig :: Maybe AliasRoutingConfigurationProperty
..}
    = Alias {description :: Maybe (Value Text)
description = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Description" Alias
Value Text
newValue, Maybe ProvisionedConcurrencyConfigurationProperty
Maybe AliasRoutingConfigurationProperty
()
Value Text
haddock_workaround_ :: ()
functionName :: Value Text
functionVersion :: Value Text
name :: Value Text
provisionedConcurrencyConfig :: Maybe ProvisionedConcurrencyConfigurationProperty
routingConfig :: Maybe AliasRoutingConfigurationProperty
haddock_workaround_ :: ()
functionName :: Value Text
functionVersion :: Value Text
name :: Value Text
provisionedConcurrencyConfig :: Maybe ProvisionedConcurrencyConfigurationProperty
routingConfig :: Maybe AliasRoutingConfigurationProperty
..}
instance Property "FunctionName" Alias where
  type PropertyType "FunctionName" Alias = Value Prelude.Text
  set :: PropertyType "FunctionName" Alias -> Alias -> Alias
set PropertyType "FunctionName" Alias
newValue Alias {Maybe (Value Text)
Maybe ProvisionedConcurrencyConfigurationProperty
Maybe AliasRoutingConfigurationProperty
()
Value Text
haddock_workaround_ :: Alias -> ()
description :: Alias -> Maybe (Value Text)
functionName :: Alias -> Value Text
functionVersion :: Alias -> Value Text
name :: Alias -> Value Text
provisionedConcurrencyConfig :: Alias -> Maybe ProvisionedConcurrencyConfigurationProperty
routingConfig :: Alias -> Maybe AliasRoutingConfigurationProperty
haddock_workaround_ :: ()
description :: Maybe (Value Text)
functionName :: Value Text
functionVersion :: Value Text
name :: Value Text
provisionedConcurrencyConfig :: Maybe ProvisionedConcurrencyConfigurationProperty
routingConfig :: Maybe AliasRoutingConfigurationProperty
..} = Alias {functionName :: Value Text
functionName = PropertyType "FunctionName" Alias
Value Text
newValue, Maybe (Value Text)
Maybe ProvisionedConcurrencyConfigurationProperty
Maybe AliasRoutingConfigurationProperty
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
functionVersion :: Value Text
name :: Value Text
provisionedConcurrencyConfig :: Maybe ProvisionedConcurrencyConfigurationProperty
routingConfig :: Maybe AliasRoutingConfigurationProperty
haddock_workaround_ :: ()
description :: Maybe (Value Text)
functionVersion :: Value Text
name :: Value Text
provisionedConcurrencyConfig :: Maybe ProvisionedConcurrencyConfigurationProperty
routingConfig :: Maybe AliasRoutingConfigurationProperty
..}
instance Property "FunctionVersion" Alias where
  type PropertyType "FunctionVersion" Alias = Value Prelude.Text
  set :: PropertyType "FunctionVersion" Alias -> Alias -> Alias
set PropertyType "FunctionVersion" Alias
newValue Alias {Maybe (Value Text)
Maybe ProvisionedConcurrencyConfigurationProperty
Maybe AliasRoutingConfigurationProperty
()
Value Text
haddock_workaround_ :: Alias -> ()
description :: Alias -> Maybe (Value Text)
functionName :: Alias -> Value Text
functionVersion :: Alias -> Value Text
name :: Alias -> Value Text
provisionedConcurrencyConfig :: Alias -> Maybe ProvisionedConcurrencyConfigurationProperty
routingConfig :: Alias -> Maybe AliasRoutingConfigurationProperty
haddock_workaround_ :: ()
description :: Maybe (Value Text)
functionName :: Value Text
functionVersion :: Value Text
name :: Value Text
provisionedConcurrencyConfig :: Maybe ProvisionedConcurrencyConfigurationProperty
routingConfig :: Maybe AliasRoutingConfigurationProperty
..} = Alias {functionVersion :: Value Text
functionVersion = PropertyType "FunctionVersion" Alias
Value Text
newValue, Maybe (Value Text)
Maybe ProvisionedConcurrencyConfigurationProperty
Maybe AliasRoutingConfigurationProperty
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
functionName :: Value Text
name :: Value Text
provisionedConcurrencyConfig :: Maybe ProvisionedConcurrencyConfigurationProperty
routingConfig :: Maybe AliasRoutingConfigurationProperty
haddock_workaround_ :: ()
description :: Maybe (Value Text)
functionName :: Value Text
name :: Value Text
provisionedConcurrencyConfig :: Maybe ProvisionedConcurrencyConfigurationProperty
routingConfig :: Maybe AliasRoutingConfigurationProperty
..}
instance Property "Name" Alias where
  type PropertyType "Name" Alias = Value Prelude.Text
  set :: PropertyType "Name" Alias -> Alias -> Alias
set PropertyType "Name" Alias
newValue Alias {Maybe (Value Text)
Maybe ProvisionedConcurrencyConfigurationProperty
Maybe AliasRoutingConfigurationProperty
()
Value Text
haddock_workaround_ :: Alias -> ()
description :: Alias -> Maybe (Value Text)
functionName :: Alias -> Value Text
functionVersion :: Alias -> Value Text
name :: Alias -> Value Text
provisionedConcurrencyConfig :: Alias -> Maybe ProvisionedConcurrencyConfigurationProperty
routingConfig :: Alias -> Maybe AliasRoutingConfigurationProperty
haddock_workaround_ :: ()
description :: Maybe (Value Text)
functionName :: Value Text
functionVersion :: Value Text
name :: Value Text
provisionedConcurrencyConfig :: Maybe ProvisionedConcurrencyConfigurationProperty
routingConfig :: Maybe AliasRoutingConfigurationProperty
..} = Alias {name :: Value Text
name = PropertyType "Name" Alias
Value Text
newValue, Maybe (Value Text)
Maybe ProvisionedConcurrencyConfigurationProperty
Maybe AliasRoutingConfigurationProperty
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
functionName :: Value Text
functionVersion :: Value Text
provisionedConcurrencyConfig :: Maybe ProvisionedConcurrencyConfigurationProperty
routingConfig :: Maybe AliasRoutingConfigurationProperty
haddock_workaround_ :: ()
description :: Maybe (Value Text)
functionName :: Value Text
functionVersion :: Value Text
provisionedConcurrencyConfig :: Maybe ProvisionedConcurrencyConfigurationProperty
routingConfig :: Maybe AliasRoutingConfigurationProperty
..}
instance Property "ProvisionedConcurrencyConfig" Alias where
  type PropertyType "ProvisionedConcurrencyConfig" Alias = ProvisionedConcurrencyConfigurationProperty
  set :: PropertyType "ProvisionedConcurrencyConfig" Alias -> Alias -> Alias
set PropertyType "ProvisionedConcurrencyConfig" Alias
newValue Alias {Maybe (Value Text)
Maybe ProvisionedConcurrencyConfigurationProperty
Maybe AliasRoutingConfigurationProperty
()
Value Text
haddock_workaround_ :: Alias -> ()
description :: Alias -> Maybe (Value Text)
functionName :: Alias -> Value Text
functionVersion :: Alias -> Value Text
name :: Alias -> Value Text
provisionedConcurrencyConfig :: Alias -> Maybe ProvisionedConcurrencyConfigurationProperty
routingConfig :: Alias -> Maybe AliasRoutingConfigurationProperty
haddock_workaround_ :: ()
description :: Maybe (Value Text)
functionName :: Value Text
functionVersion :: Value Text
name :: Value Text
provisionedConcurrencyConfig :: Maybe ProvisionedConcurrencyConfigurationProperty
routingConfig :: Maybe AliasRoutingConfigurationProperty
..}
    = Alias {provisionedConcurrencyConfig :: Maybe ProvisionedConcurrencyConfigurationProperty
provisionedConcurrencyConfig = ProvisionedConcurrencyConfigurationProperty
-> Maybe ProvisionedConcurrencyConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ProvisionedConcurrencyConfig" Alias
ProvisionedConcurrencyConfigurationProperty
newValue, Maybe (Value Text)
Maybe AliasRoutingConfigurationProperty
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
functionName :: Value Text
functionVersion :: Value Text
name :: Value Text
routingConfig :: Maybe AliasRoutingConfigurationProperty
haddock_workaround_ :: ()
description :: Maybe (Value Text)
functionName :: Value Text
functionVersion :: Value Text
name :: Value Text
routingConfig :: Maybe AliasRoutingConfigurationProperty
..}
instance Property "RoutingConfig" Alias where
  type PropertyType "RoutingConfig" Alias = AliasRoutingConfigurationProperty
  set :: PropertyType "RoutingConfig" Alias -> Alias -> Alias
set PropertyType "RoutingConfig" Alias
newValue Alias {Maybe (Value Text)
Maybe ProvisionedConcurrencyConfigurationProperty
Maybe AliasRoutingConfigurationProperty
()
Value Text
haddock_workaround_ :: Alias -> ()
description :: Alias -> Maybe (Value Text)
functionName :: Alias -> Value Text
functionVersion :: Alias -> Value Text
name :: Alias -> Value Text
provisionedConcurrencyConfig :: Alias -> Maybe ProvisionedConcurrencyConfigurationProperty
routingConfig :: Alias -> Maybe AliasRoutingConfigurationProperty
haddock_workaround_ :: ()
description :: Maybe (Value Text)
functionName :: Value Text
functionVersion :: Value Text
name :: Value Text
provisionedConcurrencyConfig :: Maybe ProvisionedConcurrencyConfigurationProperty
routingConfig :: Maybe AliasRoutingConfigurationProperty
..}
    = Alias {routingConfig :: Maybe AliasRoutingConfigurationProperty
routingConfig = AliasRoutingConfigurationProperty
-> Maybe AliasRoutingConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "RoutingConfig" Alias
AliasRoutingConfigurationProperty
newValue, Maybe (Value Text)
Maybe ProvisionedConcurrencyConfigurationProperty
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
functionName :: Value Text
functionVersion :: Value Text
name :: Value Text
provisionedConcurrencyConfig :: Maybe ProvisionedConcurrencyConfigurationProperty
haddock_workaround_ :: ()
description :: Maybe (Value Text)
functionName :: Value Text
functionVersion :: Value Text
name :: Value Text
provisionedConcurrencyConfig :: Maybe ProvisionedConcurrencyConfigurationProperty
..}