module Stratosphere.WorkSpaces.WorkspacesPool.TimeoutSettingsProperty (
        TimeoutSettingsProperty(..), mkTimeoutSettingsProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data TimeoutSettingsProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-workspaces-workspacespool-timeoutsettings.html>
    TimeoutSettingsProperty {TimeoutSettingsProperty -> ()
haddock_workaround_ :: (),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-workspaces-workspacespool-timeoutsettings.html#cfn-workspaces-workspacespool-timeoutsettings-disconnecttimeoutinseconds>
                             TimeoutSettingsProperty -> Maybe (Value Integer)
disconnectTimeoutInSeconds :: (Prelude.Maybe (Value Prelude.Integer)),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-workspaces-workspacespool-timeoutsettings.html#cfn-workspaces-workspacespool-timeoutsettings-idledisconnecttimeoutinseconds>
                             TimeoutSettingsProperty -> Maybe (Value Integer)
idleDisconnectTimeoutInSeconds :: (Prelude.Maybe (Value Prelude.Integer)),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-workspaces-workspacespool-timeoutsettings.html#cfn-workspaces-workspacespool-timeoutsettings-maxuserdurationinseconds>
                             TimeoutSettingsProperty -> Maybe (Value Integer)
maxUserDurationInSeconds :: (Prelude.Maybe (Value Prelude.Integer))}
  deriving stock (TimeoutSettingsProperty -> TimeoutSettingsProperty -> Bool
(TimeoutSettingsProperty -> TimeoutSettingsProperty -> Bool)
-> (TimeoutSettingsProperty -> TimeoutSettingsProperty -> Bool)
-> Eq TimeoutSettingsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TimeoutSettingsProperty -> TimeoutSettingsProperty -> Bool
== :: TimeoutSettingsProperty -> TimeoutSettingsProperty -> Bool
$c/= :: TimeoutSettingsProperty -> TimeoutSettingsProperty -> Bool
/= :: TimeoutSettingsProperty -> TimeoutSettingsProperty -> Bool
Prelude.Eq, Int -> TimeoutSettingsProperty -> ShowS
[TimeoutSettingsProperty] -> ShowS
TimeoutSettingsProperty -> String
(Int -> TimeoutSettingsProperty -> ShowS)
-> (TimeoutSettingsProperty -> String)
-> ([TimeoutSettingsProperty] -> ShowS)
-> Show TimeoutSettingsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TimeoutSettingsProperty -> ShowS
showsPrec :: Int -> TimeoutSettingsProperty -> ShowS
$cshow :: TimeoutSettingsProperty -> String
show :: TimeoutSettingsProperty -> String
$cshowList :: [TimeoutSettingsProperty] -> ShowS
showList :: [TimeoutSettingsProperty] -> ShowS
Prelude.Show)
mkTimeoutSettingsProperty :: TimeoutSettingsProperty
mkTimeoutSettingsProperty :: TimeoutSettingsProperty
mkTimeoutSettingsProperty
  = TimeoutSettingsProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       disconnectTimeoutInSeconds :: Maybe (Value Integer)
disconnectTimeoutInSeconds = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing,
       idleDisconnectTimeoutInSeconds :: Maybe (Value Integer)
idleDisconnectTimeoutInSeconds = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing,
       maxUserDurationInSeconds :: Maybe (Value Integer)
maxUserDurationInSeconds = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties TimeoutSettingsProperty where
  toResourceProperties :: TimeoutSettingsProperty -> ResourceProperties
toResourceProperties TimeoutSettingsProperty {Maybe (Value Integer)
()
haddock_workaround_ :: TimeoutSettingsProperty -> ()
disconnectTimeoutInSeconds :: TimeoutSettingsProperty -> Maybe (Value Integer)
idleDisconnectTimeoutInSeconds :: TimeoutSettingsProperty -> Maybe (Value Integer)
maxUserDurationInSeconds :: TimeoutSettingsProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
disconnectTimeoutInSeconds :: Maybe (Value Integer)
idleDisconnectTimeoutInSeconds :: Maybe (Value Integer)
maxUserDurationInSeconds :: Maybe (Value Integer)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::WorkSpaces::WorkspacesPool.TimeoutSettings",
         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
"DisconnectTimeoutInSeconds"
                              (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)
disconnectTimeoutInSeconds,
                            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
"IdleDisconnectTimeoutInSeconds"
                              (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)
idleDisconnectTimeoutInSeconds,
                            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
"MaxUserDurationInSeconds"
                              (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)
maxUserDurationInSeconds])}
instance JSON.ToJSON TimeoutSettingsProperty where
  toJSON :: TimeoutSettingsProperty -> Value
toJSON TimeoutSettingsProperty {Maybe (Value Integer)
()
haddock_workaround_ :: TimeoutSettingsProperty -> ()
disconnectTimeoutInSeconds :: TimeoutSettingsProperty -> Maybe (Value Integer)
idleDisconnectTimeoutInSeconds :: TimeoutSettingsProperty -> Maybe (Value Integer)
maxUserDurationInSeconds :: TimeoutSettingsProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
disconnectTimeoutInSeconds :: Maybe (Value Integer)
idleDisconnectTimeoutInSeconds :: Maybe (Value Integer)
maxUserDurationInSeconds :: 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
"DisconnectTimeoutInSeconds"
                 (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)
disconnectTimeoutInSeconds,
               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
"IdleDisconnectTimeoutInSeconds"
                 (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)
idleDisconnectTimeoutInSeconds,
               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
"MaxUserDurationInSeconds"
                 (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)
maxUserDurationInSeconds]))
instance Property "DisconnectTimeoutInSeconds" TimeoutSettingsProperty where
  type PropertyType "DisconnectTimeoutInSeconds" TimeoutSettingsProperty = Value Prelude.Integer
  set :: PropertyType "DisconnectTimeoutInSeconds" TimeoutSettingsProperty
-> TimeoutSettingsProperty -> TimeoutSettingsProperty
set PropertyType "DisconnectTimeoutInSeconds" TimeoutSettingsProperty
newValue TimeoutSettingsProperty {Maybe (Value Integer)
()
haddock_workaround_ :: TimeoutSettingsProperty -> ()
disconnectTimeoutInSeconds :: TimeoutSettingsProperty -> Maybe (Value Integer)
idleDisconnectTimeoutInSeconds :: TimeoutSettingsProperty -> Maybe (Value Integer)
maxUserDurationInSeconds :: TimeoutSettingsProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
disconnectTimeoutInSeconds :: Maybe (Value Integer)
idleDisconnectTimeoutInSeconds :: Maybe (Value Integer)
maxUserDurationInSeconds :: Maybe (Value Integer)
..}
    = TimeoutSettingsProperty
        {disconnectTimeoutInSeconds :: Maybe (Value Integer)
disconnectTimeoutInSeconds = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DisconnectTimeoutInSeconds" TimeoutSettingsProperty
Value Integer
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
idleDisconnectTimeoutInSeconds :: Maybe (Value Integer)
maxUserDurationInSeconds :: Maybe (Value Integer)
haddock_workaround_ :: ()
idleDisconnectTimeoutInSeconds :: Maybe (Value Integer)
maxUserDurationInSeconds :: Maybe (Value Integer)
..}
instance Property "IdleDisconnectTimeoutInSeconds" TimeoutSettingsProperty where
  type PropertyType "IdleDisconnectTimeoutInSeconds" TimeoutSettingsProperty = Value Prelude.Integer
  set :: PropertyType
  "IdleDisconnectTimeoutInSeconds" TimeoutSettingsProperty
-> TimeoutSettingsProperty -> TimeoutSettingsProperty
set PropertyType
  "IdleDisconnectTimeoutInSeconds" TimeoutSettingsProperty
newValue TimeoutSettingsProperty {Maybe (Value Integer)
()
haddock_workaround_ :: TimeoutSettingsProperty -> ()
disconnectTimeoutInSeconds :: TimeoutSettingsProperty -> Maybe (Value Integer)
idleDisconnectTimeoutInSeconds :: TimeoutSettingsProperty -> Maybe (Value Integer)
maxUserDurationInSeconds :: TimeoutSettingsProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
disconnectTimeoutInSeconds :: Maybe (Value Integer)
idleDisconnectTimeoutInSeconds :: Maybe (Value Integer)
maxUserDurationInSeconds :: Maybe (Value Integer)
..}
    = TimeoutSettingsProperty
        {idleDisconnectTimeoutInSeconds :: Maybe (Value Integer)
idleDisconnectTimeoutInSeconds = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "IdleDisconnectTimeoutInSeconds" TimeoutSettingsProperty
Value Integer
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
disconnectTimeoutInSeconds :: Maybe (Value Integer)
maxUserDurationInSeconds :: Maybe (Value Integer)
haddock_workaround_ :: ()
disconnectTimeoutInSeconds :: Maybe (Value Integer)
maxUserDurationInSeconds :: Maybe (Value Integer)
..}
instance Property "MaxUserDurationInSeconds" TimeoutSettingsProperty where
  type PropertyType "MaxUserDurationInSeconds" TimeoutSettingsProperty = Value Prelude.Integer
  set :: PropertyType "MaxUserDurationInSeconds" TimeoutSettingsProperty
-> TimeoutSettingsProperty -> TimeoutSettingsProperty
set PropertyType "MaxUserDurationInSeconds" TimeoutSettingsProperty
newValue TimeoutSettingsProperty {Maybe (Value Integer)
()
haddock_workaround_ :: TimeoutSettingsProperty -> ()
disconnectTimeoutInSeconds :: TimeoutSettingsProperty -> Maybe (Value Integer)
idleDisconnectTimeoutInSeconds :: TimeoutSettingsProperty -> Maybe (Value Integer)
maxUserDurationInSeconds :: TimeoutSettingsProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
disconnectTimeoutInSeconds :: Maybe (Value Integer)
idleDisconnectTimeoutInSeconds :: Maybe (Value Integer)
maxUserDurationInSeconds :: Maybe (Value Integer)
..}
    = TimeoutSettingsProperty
        {maxUserDurationInSeconds :: Maybe (Value Integer)
maxUserDurationInSeconds = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "MaxUserDurationInSeconds" TimeoutSettingsProperty
Value Integer
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
disconnectTimeoutInSeconds :: Maybe (Value Integer)
idleDisconnectTimeoutInSeconds :: Maybe (Value Integer)
haddock_workaround_ :: ()
disconnectTimeoutInSeconds :: Maybe (Value Integer)
idleDisconnectTimeoutInSeconds :: Maybe (Value Integer)
..}