module Stratosphere.Lambda.Alias.AliasRoutingConfigurationProperty (
        module Exports, AliasRoutingConfigurationProperty(..),
        mkAliasRoutingConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Lambda.Alias.VersionWeightProperty as Exports
import Stratosphere.ResourceProperties
data AliasRoutingConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-alias-aliasroutingconfiguration.html>
    AliasRoutingConfigurationProperty {AliasRoutingConfigurationProperty -> ()
haddock_workaround_ :: (),
                                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-alias-aliasroutingconfiguration.html#cfn-lambda-alias-aliasroutingconfiguration-additionalversionweights>
                                       AliasRoutingConfigurationProperty -> Maybe [VersionWeightProperty]
additionalVersionWeights :: (Prelude.Maybe [VersionWeightProperty])}
  deriving stock (AliasRoutingConfigurationProperty
-> AliasRoutingConfigurationProperty -> Bool
(AliasRoutingConfigurationProperty
 -> AliasRoutingConfigurationProperty -> Bool)
-> (AliasRoutingConfigurationProperty
    -> AliasRoutingConfigurationProperty -> Bool)
-> Eq AliasRoutingConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AliasRoutingConfigurationProperty
-> AliasRoutingConfigurationProperty -> Bool
== :: AliasRoutingConfigurationProperty
-> AliasRoutingConfigurationProperty -> Bool
$c/= :: AliasRoutingConfigurationProperty
-> AliasRoutingConfigurationProperty -> Bool
/= :: AliasRoutingConfigurationProperty
-> AliasRoutingConfigurationProperty -> Bool
Prelude.Eq, Int -> AliasRoutingConfigurationProperty -> ShowS
[AliasRoutingConfigurationProperty] -> ShowS
AliasRoutingConfigurationProperty -> String
(Int -> AliasRoutingConfigurationProperty -> ShowS)
-> (AliasRoutingConfigurationProperty -> String)
-> ([AliasRoutingConfigurationProperty] -> ShowS)
-> Show AliasRoutingConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AliasRoutingConfigurationProperty -> ShowS
showsPrec :: Int -> AliasRoutingConfigurationProperty -> ShowS
$cshow :: AliasRoutingConfigurationProperty -> String
show :: AliasRoutingConfigurationProperty -> String
$cshowList :: [AliasRoutingConfigurationProperty] -> ShowS
showList :: [AliasRoutingConfigurationProperty] -> ShowS
Prelude.Show)
mkAliasRoutingConfigurationProperty ::
  AliasRoutingConfigurationProperty
mkAliasRoutingConfigurationProperty :: AliasRoutingConfigurationProperty
mkAliasRoutingConfigurationProperty
  = AliasRoutingConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       additionalVersionWeights :: Maybe [VersionWeightProperty]
additionalVersionWeights = Maybe [VersionWeightProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties AliasRoutingConfigurationProperty where
  toResourceProperties :: AliasRoutingConfigurationProperty -> ResourceProperties
toResourceProperties AliasRoutingConfigurationProperty {Maybe [VersionWeightProperty]
()
haddock_workaround_ :: AliasRoutingConfigurationProperty -> ()
additionalVersionWeights :: AliasRoutingConfigurationProperty -> Maybe [VersionWeightProperty]
haddock_workaround_ :: ()
additionalVersionWeights :: Maybe [VersionWeightProperty]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Lambda::Alias.AliasRoutingConfiguration",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                           [Key -> [VersionWeightProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AdditionalVersionWeights"
                              ([VersionWeightProperty] -> (Key, Value))
-> Maybe [VersionWeightProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [VersionWeightProperty]
additionalVersionWeights])}
instance JSON.ToJSON AliasRoutingConfigurationProperty where
  toJSON :: AliasRoutingConfigurationProperty -> Value
toJSON AliasRoutingConfigurationProperty {Maybe [VersionWeightProperty]
()
haddock_workaround_ :: AliasRoutingConfigurationProperty -> ()
additionalVersionWeights :: AliasRoutingConfigurationProperty -> Maybe [VersionWeightProperty]
haddock_workaround_ :: ()
additionalVersionWeights :: Maybe [VersionWeightProperty]
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
              [Key -> [VersionWeightProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AdditionalVersionWeights"
                 ([VersionWeightProperty] -> (Key, Value))
-> Maybe [VersionWeightProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [VersionWeightProperty]
additionalVersionWeights]))
instance Property "AdditionalVersionWeights" AliasRoutingConfigurationProperty where
  type PropertyType "AdditionalVersionWeights" AliasRoutingConfigurationProperty = [VersionWeightProperty]
  set :: PropertyType
  "AdditionalVersionWeights" AliasRoutingConfigurationProperty
-> AliasRoutingConfigurationProperty
-> AliasRoutingConfigurationProperty
set PropertyType
  "AdditionalVersionWeights" AliasRoutingConfigurationProperty
newValue AliasRoutingConfigurationProperty {Maybe [VersionWeightProperty]
()
haddock_workaround_ :: AliasRoutingConfigurationProperty -> ()
additionalVersionWeights :: AliasRoutingConfigurationProperty -> Maybe [VersionWeightProperty]
haddock_workaround_ :: ()
additionalVersionWeights :: Maybe [VersionWeightProperty]
..}
    = AliasRoutingConfigurationProperty
        {additionalVersionWeights :: Maybe [VersionWeightProperty]
additionalVersionWeights = [VersionWeightProperty] -> Maybe [VersionWeightProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [VersionWeightProperty]
PropertyType
  "AdditionalVersionWeights" AliasRoutingConfigurationProperty
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}