module Stratosphere.Deadline.Limit (
        Limit(..), mkLimit
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data Limit
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-deadline-limit.html>
    Limit {Limit -> ()
haddock_workaround_ :: (),
           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-deadline-limit.html#cfn-deadline-limit-amountrequirementname>
           Limit -> Value Text
amountRequirementName :: (Value Prelude.Text),
           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-deadline-limit.html#cfn-deadline-limit-description>
           Limit -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-deadline-limit.html#cfn-deadline-limit-displayname>
           Limit -> Value Text
displayName :: (Value Prelude.Text),
           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-deadline-limit.html#cfn-deadline-limit-farmid>
           Limit -> Value Text
farmId :: (Value Prelude.Text),
           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-deadline-limit.html#cfn-deadline-limit-maxcount>
           Limit -> Value Integer
maxCount :: (Value Prelude.Integer)}
  deriving stock (Limit -> Limit -> Bool
(Limit -> Limit -> Bool) -> (Limit -> Limit -> Bool) -> Eq Limit
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Limit -> Limit -> Bool
== :: Limit -> Limit -> Bool
$c/= :: Limit -> Limit -> Bool
/= :: Limit -> Limit -> Bool
Prelude.Eq, Int -> Limit -> ShowS
[Limit] -> ShowS
Limit -> String
(Int -> Limit -> ShowS)
-> (Limit -> String) -> ([Limit] -> ShowS) -> Show Limit
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Limit -> ShowS
showsPrec :: Int -> Limit -> ShowS
$cshow :: Limit -> String
show :: Limit -> String
$cshowList :: [Limit] -> ShowS
showList :: [Limit] -> ShowS
Prelude.Show)
mkLimit ::
  Value Prelude.Text
  -> Value Prelude.Text
     -> Value Prelude.Text -> Value Prelude.Integer -> Limit
mkLimit :: Value Text -> Value Text -> Value Text -> Value Integer -> Limit
mkLimit Value Text
amountRequirementName Value Text
displayName Value Text
farmId Value Integer
maxCount
  = Limit
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       amountRequirementName :: Value Text
amountRequirementName = Value Text
amountRequirementName,
       displayName :: Value Text
displayName = Value Text
displayName, farmId :: Value Text
farmId = Value Text
farmId, maxCount :: Value Integer
maxCount = Value Integer
maxCount,
       description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Limit where
  toResourceProperties :: Limit -> ResourceProperties
toResourceProperties Limit {Maybe (Value Text)
()
Value Integer
Value Text
haddock_workaround_ :: Limit -> ()
amountRequirementName :: Limit -> Value Text
description :: Limit -> Maybe (Value Text)
displayName :: Limit -> Value Text
farmId :: Limit -> Value Text
maxCount :: Limit -> Value Integer
haddock_workaround_ :: ()
amountRequirementName :: Value Text
description :: Maybe (Value Text)
displayName :: Value Text
farmId :: Value Text
maxCount :: Value Integer
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Deadline::Limit", 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
"AmountRequirementName" 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
amountRequirementName,
                            Key
"DisplayName" 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
displayName, Key
"FarmId" 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
farmId,
                            Key
"MaxCount" Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Integer
maxCount]
                           ([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]))}
instance JSON.ToJSON Limit where
  toJSON :: Limit -> Value
toJSON Limit {Maybe (Value Text)
()
Value Integer
Value Text
haddock_workaround_ :: Limit -> ()
amountRequirementName :: Limit -> Value Text
description :: Limit -> Maybe (Value Text)
displayName :: Limit -> Value Text
farmId :: Limit -> Value Text
maxCount :: Limit -> Value Integer
haddock_workaround_ :: ()
amountRequirementName :: Value Text
description :: Maybe (Value Text)
displayName :: Value Text
farmId :: Value Text
maxCount :: Value Integer
..}
    = [(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
"AmountRequirementName" 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
amountRequirementName,
               Key
"DisplayName" 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
displayName, Key
"FarmId" 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
farmId,
               Key
"MaxCount" Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Integer
maxCount]
              ([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])))
instance Property "AmountRequirementName" Limit where
  type PropertyType "AmountRequirementName" Limit = Value Prelude.Text
  set :: PropertyType "AmountRequirementName" Limit -> Limit -> Limit
set PropertyType "AmountRequirementName" Limit
newValue Limit {Maybe (Value Text)
()
Value Integer
Value Text
haddock_workaround_ :: Limit -> ()
amountRequirementName :: Limit -> Value Text
description :: Limit -> Maybe (Value Text)
displayName :: Limit -> Value Text
farmId :: Limit -> Value Text
maxCount :: Limit -> Value Integer
haddock_workaround_ :: ()
amountRequirementName :: Value Text
description :: Maybe (Value Text)
displayName :: Value Text
farmId :: Value Text
maxCount :: Value Integer
..}
    = Limit {amountRequirementName :: Value Text
amountRequirementName = PropertyType "AmountRequirementName" Limit
Value Text
newValue, Maybe (Value Text)
()
Value Integer
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
displayName :: Value Text
farmId :: Value Text
maxCount :: Value Integer
haddock_workaround_ :: ()
description :: Maybe (Value Text)
displayName :: Value Text
farmId :: Value Text
maxCount :: Value Integer
..}
instance Property "Description" Limit where
  type PropertyType "Description" Limit = Value Prelude.Text
  set :: PropertyType "Description" Limit -> Limit -> Limit
set PropertyType "Description" Limit
newValue Limit {Maybe (Value Text)
()
Value Integer
Value Text
haddock_workaround_ :: Limit -> ()
amountRequirementName :: Limit -> Value Text
description :: Limit -> Maybe (Value Text)
displayName :: Limit -> Value Text
farmId :: Limit -> Value Text
maxCount :: Limit -> Value Integer
haddock_workaround_ :: ()
amountRequirementName :: Value Text
description :: Maybe (Value Text)
displayName :: Value Text
farmId :: Value Text
maxCount :: Value Integer
..}
    = Limit {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" Limit
Value Text
newValue, ()
Value Integer
Value Text
haddock_workaround_ :: ()
amountRequirementName :: Value Text
displayName :: Value Text
farmId :: Value Text
maxCount :: Value Integer
haddock_workaround_ :: ()
amountRequirementName :: Value Text
displayName :: Value Text
farmId :: Value Text
maxCount :: Value Integer
..}
instance Property "DisplayName" Limit where
  type PropertyType "DisplayName" Limit = Value Prelude.Text
  set :: PropertyType "DisplayName" Limit -> Limit -> Limit
set PropertyType "DisplayName" Limit
newValue Limit {Maybe (Value Text)
()
Value Integer
Value Text
haddock_workaround_ :: Limit -> ()
amountRequirementName :: Limit -> Value Text
description :: Limit -> Maybe (Value Text)
displayName :: Limit -> Value Text
farmId :: Limit -> Value Text
maxCount :: Limit -> Value Integer
haddock_workaround_ :: ()
amountRequirementName :: Value Text
description :: Maybe (Value Text)
displayName :: Value Text
farmId :: Value Text
maxCount :: Value Integer
..} = Limit {displayName :: Value Text
displayName = PropertyType "DisplayName" Limit
Value Text
newValue, Maybe (Value Text)
()
Value Integer
Value Text
haddock_workaround_ :: ()
amountRequirementName :: Value Text
description :: Maybe (Value Text)
farmId :: Value Text
maxCount :: Value Integer
haddock_workaround_ :: ()
amountRequirementName :: Value Text
description :: Maybe (Value Text)
farmId :: Value Text
maxCount :: Value Integer
..}
instance Property "FarmId" Limit where
  type PropertyType "FarmId" Limit = Value Prelude.Text
  set :: PropertyType "FarmId" Limit -> Limit -> Limit
set PropertyType "FarmId" Limit
newValue Limit {Maybe (Value Text)
()
Value Integer
Value Text
haddock_workaround_ :: Limit -> ()
amountRequirementName :: Limit -> Value Text
description :: Limit -> Maybe (Value Text)
displayName :: Limit -> Value Text
farmId :: Limit -> Value Text
maxCount :: Limit -> Value Integer
haddock_workaround_ :: ()
amountRequirementName :: Value Text
description :: Maybe (Value Text)
displayName :: Value Text
farmId :: Value Text
maxCount :: Value Integer
..} = Limit {farmId :: Value Text
farmId = PropertyType "FarmId" Limit
Value Text
newValue, Maybe (Value Text)
()
Value Integer
Value Text
haddock_workaround_ :: ()
amountRequirementName :: Value Text
description :: Maybe (Value Text)
displayName :: Value Text
maxCount :: Value Integer
haddock_workaround_ :: ()
amountRequirementName :: Value Text
description :: Maybe (Value Text)
displayName :: Value Text
maxCount :: Value Integer
..}
instance Property "MaxCount" Limit where
  type PropertyType "MaxCount" Limit = Value Prelude.Integer
  set :: PropertyType "MaxCount" Limit -> Limit -> Limit
set PropertyType "MaxCount" Limit
newValue Limit {Maybe (Value Text)
()
Value Integer
Value Text
haddock_workaround_ :: Limit -> ()
amountRequirementName :: Limit -> Value Text
description :: Limit -> Maybe (Value Text)
displayName :: Limit -> Value Text
farmId :: Limit -> Value Text
maxCount :: Limit -> Value Integer
haddock_workaround_ :: ()
amountRequirementName :: Value Text
description :: Maybe (Value Text)
displayName :: Value Text
farmId :: Value Text
maxCount :: Value Integer
..} = Limit {maxCount :: Value Integer
maxCount = PropertyType "MaxCount" Limit
Value Integer
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
amountRequirementName :: Value Text
description :: Maybe (Value Text)
displayName :: Value Text
farmId :: Value Text
haddock_workaround_ :: ()
amountRequirementName :: Value Text
description :: Maybe (Value Text)
displayName :: Value Text
farmId :: Value Text
..}