module Stratosphere.GameLift.ContainerFleet.GameSessionCreationLimitPolicyProperty (
        GameSessionCreationLimitPolicyProperty(..),
        mkGameSessionCreationLimitPolicyProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data GameSessionCreationLimitPolicyProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containerfleet-gamesessioncreationlimitpolicy.html>
    GameSessionCreationLimitPolicyProperty {GameSessionCreationLimitPolicyProperty -> ()
haddock_workaround_ :: (),
                                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containerfleet-gamesessioncreationlimitpolicy.html#cfn-gamelift-containerfleet-gamesessioncreationlimitpolicy-newgamesessionspercreator>
                                            GameSessionCreationLimitPolicyProperty -> Maybe (Value Integer)
newGameSessionsPerCreator :: (Prelude.Maybe (Value Prelude.Integer)),
                                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containerfleet-gamesessioncreationlimitpolicy.html#cfn-gamelift-containerfleet-gamesessioncreationlimitpolicy-policyperiodinminutes>
                                            GameSessionCreationLimitPolicyProperty -> Maybe (Value Integer)
policyPeriodInMinutes :: (Prelude.Maybe (Value Prelude.Integer))}
  deriving stock (GameSessionCreationLimitPolicyProperty
-> GameSessionCreationLimitPolicyProperty -> Bool
(GameSessionCreationLimitPolicyProperty
 -> GameSessionCreationLimitPolicyProperty -> Bool)
-> (GameSessionCreationLimitPolicyProperty
    -> GameSessionCreationLimitPolicyProperty -> Bool)
-> Eq GameSessionCreationLimitPolicyProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GameSessionCreationLimitPolicyProperty
-> GameSessionCreationLimitPolicyProperty -> Bool
== :: GameSessionCreationLimitPolicyProperty
-> GameSessionCreationLimitPolicyProperty -> Bool
$c/= :: GameSessionCreationLimitPolicyProperty
-> GameSessionCreationLimitPolicyProperty -> Bool
/= :: GameSessionCreationLimitPolicyProperty
-> GameSessionCreationLimitPolicyProperty -> Bool
Prelude.Eq, Int -> GameSessionCreationLimitPolicyProperty -> ShowS
[GameSessionCreationLimitPolicyProperty] -> ShowS
GameSessionCreationLimitPolicyProperty -> String
(Int -> GameSessionCreationLimitPolicyProperty -> ShowS)
-> (GameSessionCreationLimitPolicyProperty -> String)
-> ([GameSessionCreationLimitPolicyProperty] -> ShowS)
-> Show GameSessionCreationLimitPolicyProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GameSessionCreationLimitPolicyProperty -> ShowS
showsPrec :: Int -> GameSessionCreationLimitPolicyProperty -> ShowS
$cshow :: GameSessionCreationLimitPolicyProperty -> String
show :: GameSessionCreationLimitPolicyProperty -> String
$cshowList :: [GameSessionCreationLimitPolicyProperty] -> ShowS
showList :: [GameSessionCreationLimitPolicyProperty] -> ShowS
Prelude.Show)
mkGameSessionCreationLimitPolicyProperty ::
  GameSessionCreationLimitPolicyProperty
mkGameSessionCreationLimitPolicyProperty :: GameSessionCreationLimitPolicyProperty
mkGameSessionCreationLimitPolicyProperty
  = GameSessionCreationLimitPolicyProperty
      {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 GameSessionCreationLimitPolicyProperty where
  toResourceProperties :: GameSessionCreationLimitPolicyProperty -> ResourceProperties
toResourceProperties GameSessionCreationLimitPolicyProperty {Maybe (Value Integer)
()
haddock_workaround_ :: GameSessionCreationLimitPolicyProperty -> ()
newGameSessionsPerCreator :: GameSessionCreationLimitPolicyProperty -> Maybe (Value Integer)
policyPeriodInMinutes :: GameSessionCreationLimitPolicyProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
newGameSessionsPerCreator :: Maybe (Value Integer)
policyPeriodInMinutes :: Maybe (Value Integer)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::GameLift::ContainerFleet.GameSessionCreationLimitPolicy",
         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 GameSessionCreationLimitPolicyProperty where
  toJSON :: GameSessionCreationLimitPolicyProperty -> Value
toJSON GameSessionCreationLimitPolicyProperty {Maybe (Value Integer)
()
haddock_workaround_ :: GameSessionCreationLimitPolicyProperty -> ()
newGameSessionsPerCreator :: GameSessionCreationLimitPolicyProperty -> Maybe (Value Integer)
policyPeriodInMinutes :: GameSessionCreationLimitPolicyProperty -> 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" GameSessionCreationLimitPolicyProperty where
  type PropertyType "NewGameSessionsPerCreator" GameSessionCreationLimitPolicyProperty = Value Prelude.Integer
  set :: PropertyType
  "NewGameSessionsPerCreator" GameSessionCreationLimitPolicyProperty
-> GameSessionCreationLimitPolicyProperty
-> GameSessionCreationLimitPolicyProperty
set PropertyType
  "NewGameSessionsPerCreator" GameSessionCreationLimitPolicyProperty
newValue GameSessionCreationLimitPolicyProperty {Maybe (Value Integer)
()
haddock_workaround_ :: GameSessionCreationLimitPolicyProperty -> ()
newGameSessionsPerCreator :: GameSessionCreationLimitPolicyProperty -> Maybe (Value Integer)
policyPeriodInMinutes :: GameSessionCreationLimitPolicyProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
newGameSessionsPerCreator :: Maybe (Value Integer)
policyPeriodInMinutes :: Maybe (Value Integer)
..}
    = GameSessionCreationLimitPolicyProperty
        {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" GameSessionCreationLimitPolicyProperty
Value Integer
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
policyPeriodInMinutes :: Maybe (Value Integer)
haddock_workaround_ :: ()
policyPeriodInMinutes :: Maybe (Value Integer)
..}
instance Property "PolicyPeriodInMinutes" GameSessionCreationLimitPolicyProperty where
  type PropertyType "PolicyPeriodInMinutes" GameSessionCreationLimitPolicyProperty = Value Prelude.Integer
  set :: PropertyType
  "PolicyPeriodInMinutes" GameSessionCreationLimitPolicyProperty
-> GameSessionCreationLimitPolicyProperty
-> GameSessionCreationLimitPolicyProperty
set PropertyType
  "PolicyPeriodInMinutes" GameSessionCreationLimitPolicyProperty
newValue GameSessionCreationLimitPolicyProperty {Maybe (Value Integer)
()
haddock_workaround_ :: GameSessionCreationLimitPolicyProperty -> ()
newGameSessionsPerCreator :: GameSessionCreationLimitPolicyProperty -> Maybe (Value Integer)
policyPeriodInMinutes :: GameSessionCreationLimitPolicyProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
newGameSessionsPerCreator :: Maybe (Value Integer)
policyPeriodInMinutes :: Maybe (Value Integer)
..}
    = GameSessionCreationLimitPolicyProperty
        {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" GameSessionCreationLimitPolicyProperty
Value Integer
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
newGameSessionsPerCreator :: Maybe (Value Integer)
haddock_workaround_ :: ()
newGameSessionsPerCreator :: Maybe (Value Integer)
..}