module Stratosphere.ResourceProperties.ConnectionSettings where
import Control.Lens
import Data.Aeson
import Data.Aeson.Types
import Data.Text
import GHC.Generics
import Stratosphere.Values
data ConnectionSettings =
ConnectionSettings
{ _connectionSettingsIdleTimeout :: Val Integer'
} deriving (Show, Generic)
instance ToJSON ConnectionSettings where
toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 19, omitNothingFields = True }
instance FromJSON ConnectionSettings where
parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 19, omitNothingFields = True }
connectionSettings
:: Val Integer'
-> ConnectionSettings
connectionSettings idleTimeoutarg =
ConnectionSettings
{ _connectionSettingsIdleTimeout = idleTimeoutarg
}
csIdleTimeout :: Lens' ConnectionSettings (Val Integer')
csIdleTimeout = lens _connectionSettingsIdleTimeout (\s a -> s { _connectionSettingsIdleTimeout = a })