module Stratosphere.GameLift.GameSessionQueue.PlayerLatencyPolicyProperty (
        PlayerLatencyPolicyProperty(..), mkPlayerLatencyPolicyProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data PlayerLatencyPolicyProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-gamesessionqueue-playerlatencypolicy.html>
    PlayerLatencyPolicyProperty {PlayerLatencyPolicyProperty -> ()
haddock_workaround_ :: (),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-gamesessionqueue-playerlatencypolicy.html#cfn-gamelift-gamesessionqueue-playerlatencypolicy-maximumindividualplayerlatencymilliseconds>
                                 PlayerLatencyPolicyProperty -> Maybe (Value Integer)
maximumIndividualPlayerLatencyMilliseconds :: (Prelude.Maybe (Value Prelude.Integer)),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-gamesessionqueue-playerlatencypolicy.html#cfn-gamelift-gamesessionqueue-playerlatencypolicy-policydurationseconds>
                                 PlayerLatencyPolicyProperty -> Maybe (Value Integer)
policyDurationSeconds :: (Prelude.Maybe (Value Prelude.Integer))}
  deriving stock (PlayerLatencyPolicyProperty -> PlayerLatencyPolicyProperty -> Bool
(PlayerLatencyPolicyProperty
 -> PlayerLatencyPolicyProperty -> Bool)
-> (PlayerLatencyPolicyProperty
    -> PlayerLatencyPolicyProperty -> Bool)
-> Eq PlayerLatencyPolicyProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PlayerLatencyPolicyProperty -> PlayerLatencyPolicyProperty -> Bool
== :: PlayerLatencyPolicyProperty -> PlayerLatencyPolicyProperty -> Bool
$c/= :: PlayerLatencyPolicyProperty -> PlayerLatencyPolicyProperty -> Bool
/= :: PlayerLatencyPolicyProperty -> PlayerLatencyPolicyProperty -> Bool
Prelude.Eq, Int -> PlayerLatencyPolicyProperty -> ShowS
[PlayerLatencyPolicyProperty] -> ShowS
PlayerLatencyPolicyProperty -> String
(Int -> PlayerLatencyPolicyProperty -> ShowS)
-> (PlayerLatencyPolicyProperty -> String)
-> ([PlayerLatencyPolicyProperty] -> ShowS)
-> Show PlayerLatencyPolicyProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PlayerLatencyPolicyProperty -> ShowS
showsPrec :: Int -> PlayerLatencyPolicyProperty -> ShowS
$cshow :: PlayerLatencyPolicyProperty -> String
show :: PlayerLatencyPolicyProperty -> String
$cshowList :: [PlayerLatencyPolicyProperty] -> ShowS
showList :: [PlayerLatencyPolicyProperty] -> ShowS
Prelude.Show)
mkPlayerLatencyPolicyProperty :: PlayerLatencyPolicyProperty
mkPlayerLatencyPolicyProperty :: PlayerLatencyPolicyProperty
mkPlayerLatencyPolicyProperty
  = PlayerLatencyPolicyProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       maximumIndividualPlayerLatencyMilliseconds :: Maybe (Value Integer)
maximumIndividualPlayerLatencyMilliseconds = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing,
       policyDurationSeconds :: Maybe (Value Integer)
policyDurationSeconds = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties PlayerLatencyPolicyProperty where
  toResourceProperties :: PlayerLatencyPolicyProperty -> ResourceProperties
toResourceProperties PlayerLatencyPolicyProperty {Maybe (Value Integer)
()
haddock_workaround_ :: PlayerLatencyPolicyProperty -> ()
maximumIndividualPlayerLatencyMilliseconds :: PlayerLatencyPolicyProperty -> Maybe (Value Integer)
policyDurationSeconds :: PlayerLatencyPolicyProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
maximumIndividualPlayerLatencyMilliseconds :: Maybe (Value Integer)
policyDurationSeconds :: Maybe (Value Integer)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::GameLift::GameSessionQueue.PlayerLatencyPolicy",
         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
"MaximumIndividualPlayerLatencyMilliseconds"
                              (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)
maximumIndividualPlayerLatencyMilliseconds,
                            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
"PolicyDurationSeconds"
                              (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)
policyDurationSeconds])}
instance JSON.ToJSON PlayerLatencyPolicyProperty where
  toJSON :: PlayerLatencyPolicyProperty -> Value
toJSON PlayerLatencyPolicyProperty {Maybe (Value Integer)
()
haddock_workaround_ :: PlayerLatencyPolicyProperty -> ()
maximumIndividualPlayerLatencyMilliseconds :: PlayerLatencyPolicyProperty -> Maybe (Value Integer)
policyDurationSeconds :: PlayerLatencyPolicyProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
maximumIndividualPlayerLatencyMilliseconds :: Maybe (Value Integer)
policyDurationSeconds :: 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
"MaximumIndividualPlayerLatencyMilliseconds"
                 (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)
maximumIndividualPlayerLatencyMilliseconds,
               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
"PolicyDurationSeconds"
                 (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)
policyDurationSeconds]))
instance Property "MaximumIndividualPlayerLatencyMilliseconds" PlayerLatencyPolicyProperty where
  type PropertyType "MaximumIndividualPlayerLatencyMilliseconds" PlayerLatencyPolicyProperty = Value Prelude.Integer
  set :: PropertyType
  "MaximumIndividualPlayerLatencyMilliseconds"
  PlayerLatencyPolicyProperty
-> PlayerLatencyPolicyProperty -> PlayerLatencyPolicyProperty
set PropertyType
  "MaximumIndividualPlayerLatencyMilliseconds"
  PlayerLatencyPolicyProperty
newValue PlayerLatencyPolicyProperty {Maybe (Value Integer)
()
haddock_workaround_ :: PlayerLatencyPolicyProperty -> ()
maximumIndividualPlayerLatencyMilliseconds :: PlayerLatencyPolicyProperty -> Maybe (Value Integer)
policyDurationSeconds :: PlayerLatencyPolicyProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
maximumIndividualPlayerLatencyMilliseconds :: Maybe (Value Integer)
policyDurationSeconds :: Maybe (Value Integer)
..}
    = PlayerLatencyPolicyProperty
        {maximumIndividualPlayerLatencyMilliseconds :: Maybe (Value Integer)
maximumIndividualPlayerLatencyMilliseconds = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure
                                                        PropertyType
  "MaximumIndividualPlayerLatencyMilliseconds"
  PlayerLatencyPolicyProperty
Value Integer
newValue,
         Maybe (Value Integer)
()
haddock_workaround_ :: ()
policyDurationSeconds :: Maybe (Value Integer)
haddock_workaround_ :: ()
policyDurationSeconds :: Maybe (Value Integer)
..}
instance Property "PolicyDurationSeconds" PlayerLatencyPolicyProperty where
  type PropertyType "PolicyDurationSeconds" PlayerLatencyPolicyProperty = Value Prelude.Integer
  set :: PropertyType "PolicyDurationSeconds" PlayerLatencyPolicyProperty
-> PlayerLatencyPolicyProperty -> PlayerLatencyPolicyProperty
set PropertyType "PolicyDurationSeconds" PlayerLatencyPolicyProperty
newValue PlayerLatencyPolicyProperty {Maybe (Value Integer)
()
haddock_workaround_ :: PlayerLatencyPolicyProperty -> ()
maximumIndividualPlayerLatencyMilliseconds :: PlayerLatencyPolicyProperty -> Maybe (Value Integer)
policyDurationSeconds :: PlayerLatencyPolicyProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
maximumIndividualPlayerLatencyMilliseconds :: Maybe (Value Integer)
policyDurationSeconds :: Maybe (Value Integer)
..}
    = PlayerLatencyPolicyProperty
        {policyDurationSeconds :: Maybe (Value Integer)
policyDurationSeconds = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "PolicyDurationSeconds" PlayerLatencyPolicyProperty
Value Integer
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
maximumIndividualPlayerLatencyMilliseconds :: Maybe (Value Integer)
haddock_workaround_ :: ()
maximumIndividualPlayerLatencyMilliseconds :: Maybe (Value Integer)
..}