module Stratosphere.GameLift.Fleet.ResourceCreationLimitPolicyProperty (
        ResourceCreationLimitPolicyProperty(..),
        mkResourceCreationLimitPolicyProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ResourceCreationLimitPolicyProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-fleet-resourcecreationlimitpolicy.html>
    ResourceCreationLimitPolicyProperty {ResourceCreationLimitPolicyProperty -> ()
haddock_workaround_ :: (),
                                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-fleet-resourcecreationlimitpolicy.html#cfn-gamelift-fleet-resourcecreationlimitpolicy-newgamesessionspercreator>
                                         ResourceCreationLimitPolicyProperty -> Maybe (Value Integer)
newGameSessionsPerCreator :: (Prelude.Maybe (Value Prelude.Integer)),
                                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-fleet-resourcecreationlimitpolicy.html#cfn-gamelift-fleet-resourcecreationlimitpolicy-policyperiodinminutes>
                                         ResourceCreationLimitPolicyProperty -> Maybe (Value Integer)
policyPeriodInMinutes :: (Prelude.Maybe (Value Prelude.Integer))}
  deriving stock (ResourceCreationLimitPolicyProperty
-> ResourceCreationLimitPolicyProperty -> Bool
(ResourceCreationLimitPolicyProperty
 -> ResourceCreationLimitPolicyProperty -> Bool)
-> (ResourceCreationLimitPolicyProperty
    -> ResourceCreationLimitPolicyProperty -> Bool)
-> Eq ResourceCreationLimitPolicyProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ResourceCreationLimitPolicyProperty
-> ResourceCreationLimitPolicyProperty -> Bool
== :: ResourceCreationLimitPolicyProperty
-> ResourceCreationLimitPolicyProperty -> Bool
$c/= :: ResourceCreationLimitPolicyProperty
-> ResourceCreationLimitPolicyProperty -> Bool
/= :: ResourceCreationLimitPolicyProperty
-> ResourceCreationLimitPolicyProperty -> Bool
Prelude.Eq, Int -> ResourceCreationLimitPolicyProperty -> ShowS
[ResourceCreationLimitPolicyProperty] -> ShowS
ResourceCreationLimitPolicyProperty -> String
(Int -> ResourceCreationLimitPolicyProperty -> ShowS)
-> (ResourceCreationLimitPolicyProperty -> String)
-> ([ResourceCreationLimitPolicyProperty] -> ShowS)
-> Show ResourceCreationLimitPolicyProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ResourceCreationLimitPolicyProperty -> ShowS
showsPrec :: Int -> ResourceCreationLimitPolicyProperty -> ShowS
$cshow :: ResourceCreationLimitPolicyProperty -> String
show :: ResourceCreationLimitPolicyProperty -> String
$cshowList :: [ResourceCreationLimitPolicyProperty] -> ShowS
showList :: [ResourceCreationLimitPolicyProperty] -> ShowS
Prelude.Show)
mkResourceCreationLimitPolicyProperty ::
  ResourceCreationLimitPolicyProperty
mkResourceCreationLimitPolicyProperty :: ResourceCreationLimitPolicyProperty
mkResourceCreationLimitPolicyProperty
  = ResourceCreationLimitPolicyProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       newGameSessionsPerCreator :: Maybe (Value Integer)
newGameSessionsPerCreator = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing,
       policyPeriodInMinutes :: Maybe (Value Integer)
policyPeriodInMinutes = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ResourceCreationLimitPolicyProperty where
  toResourceProperties :: ResourceCreationLimitPolicyProperty -> ResourceProperties
toResourceProperties ResourceCreationLimitPolicyProperty {Maybe (Value Integer)
()
haddock_workaround_ :: ResourceCreationLimitPolicyProperty -> ()
newGameSessionsPerCreator :: ResourceCreationLimitPolicyProperty -> Maybe (Value Integer)
policyPeriodInMinutes :: ResourceCreationLimitPolicyProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
newGameSessionsPerCreator :: Maybe (Value Integer)
policyPeriodInMinutes :: Maybe (Value Integer)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::GameLift::Fleet.ResourceCreationLimitPolicy",
         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 -> 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..=) Key
"NewGameSessionsPerCreator"
                              (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
newGameSessionsPerCreator,
                            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..=) Key
"PolicyPeriodInMinutes"
                              (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
policyPeriodInMinutes])}
instance JSON.ToJSON ResourceCreationLimitPolicyProperty where
  toJSON :: ResourceCreationLimitPolicyProperty -> Value
toJSON ResourceCreationLimitPolicyProperty {Maybe (Value Integer)
()
haddock_workaround_ :: ResourceCreationLimitPolicyProperty -> ()
newGameSessionsPerCreator :: ResourceCreationLimitPolicyProperty -> Maybe (Value Integer)
policyPeriodInMinutes :: ResourceCreationLimitPolicyProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
newGameSessionsPerCreator :: Maybe (Value Integer)
policyPeriodInMinutes :: Maybe (Value Integer)
..}
    = [(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 -> 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..=) Key
"NewGameSessionsPerCreator"
                 (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
newGameSessionsPerCreator,
               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..=) Key
"PolicyPeriodInMinutes"
                 (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
policyPeriodInMinutes]))
instance Property "NewGameSessionsPerCreator" ResourceCreationLimitPolicyProperty where
  type PropertyType "NewGameSessionsPerCreator" ResourceCreationLimitPolicyProperty = Value Prelude.Integer
  set :: PropertyType
  "NewGameSessionsPerCreator" ResourceCreationLimitPolicyProperty
-> ResourceCreationLimitPolicyProperty
-> ResourceCreationLimitPolicyProperty
set PropertyType
  "NewGameSessionsPerCreator" ResourceCreationLimitPolicyProperty
newValue ResourceCreationLimitPolicyProperty {Maybe (Value Integer)
()
haddock_workaround_ :: ResourceCreationLimitPolicyProperty -> ()
newGameSessionsPerCreator :: ResourceCreationLimitPolicyProperty -> Maybe (Value Integer)
policyPeriodInMinutes :: ResourceCreationLimitPolicyProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
newGameSessionsPerCreator :: Maybe (Value Integer)
policyPeriodInMinutes :: Maybe (Value Integer)
..}
    = ResourceCreationLimitPolicyProperty
        {newGameSessionsPerCreator :: Maybe (Value Integer)
newGameSessionsPerCreator = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "NewGameSessionsPerCreator" ResourceCreationLimitPolicyProperty
Value Integer
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
policyPeriodInMinutes :: Maybe (Value Integer)
haddock_workaround_ :: ()
policyPeriodInMinutes :: Maybe (Value Integer)
..}
instance Property "PolicyPeriodInMinutes" ResourceCreationLimitPolicyProperty where
  type PropertyType "PolicyPeriodInMinutes" ResourceCreationLimitPolicyProperty = Value Prelude.Integer
  set :: PropertyType
  "PolicyPeriodInMinutes" ResourceCreationLimitPolicyProperty
-> ResourceCreationLimitPolicyProperty
-> ResourceCreationLimitPolicyProperty
set PropertyType
  "PolicyPeriodInMinutes" ResourceCreationLimitPolicyProperty
newValue ResourceCreationLimitPolicyProperty {Maybe (Value Integer)
()
haddock_workaround_ :: ResourceCreationLimitPolicyProperty -> ()
newGameSessionsPerCreator :: ResourceCreationLimitPolicyProperty -> Maybe (Value Integer)
policyPeriodInMinutes :: ResourceCreationLimitPolicyProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
newGameSessionsPerCreator :: Maybe (Value Integer)
policyPeriodInMinutes :: Maybe (Value Integer)
..}
    = ResourceCreationLimitPolicyProperty
        {policyPeriodInMinutes :: Maybe (Value Integer)
policyPeriodInMinutes = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "PolicyPeriodInMinutes" ResourceCreationLimitPolicyProperty
Value Integer
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
newGameSessionsPerCreator :: Maybe (Value Integer)
haddock_workaround_ :: ()
newGameSessionsPerCreator :: Maybe (Value Integer)
..}