module Stratosphere.SSMGuiConnect.Preferences (
module Exports, Preferences(..), mkPreferences
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.SSMGuiConnect.Preferences.ConnectionRecordingPreferencesProperty as Exports
import Stratosphere.ResourceProperties
data Preferences
=
Preferences {Preferences -> ()
haddock_workaround_ :: (),
Preferences -> Maybe ConnectionRecordingPreferencesProperty
connectionRecordingPreferences :: (Prelude.Maybe ConnectionRecordingPreferencesProperty)}
deriving stock (Preferences -> Preferences -> Bool
(Preferences -> Preferences -> Bool)
-> (Preferences -> Preferences -> Bool) -> Eq Preferences
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Preferences -> Preferences -> Bool
== :: Preferences -> Preferences -> Bool
$c/= :: Preferences -> Preferences -> Bool
/= :: Preferences -> Preferences -> Bool
Prelude.Eq, Int -> Preferences -> ShowS
[Preferences] -> ShowS
Preferences -> String
(Int -> Preferences -> ShowS)
-> (Preferences -> String)
-> ([Preferences] -> ShowS)
-> Show Preferences
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Preferences -> ShowS
showsPrec :: Int -> Preferences -> ShowS
$cshow :: Preferences -> String
show :: Preferences -> String
$cshowList :: [Preferences] -> ShowS
showList :: [Preferences] -> ShowS
Prelude.Show)
mkPreferences :: Preferences
mkPreferences :: Preferences
mkPreferences
= Preferences
{haddock_workaround_ :: ()
haddock_workaround_ = (),
connectionRecordingPreferences :: Maybe ConnectionRecordingPreferencesProperty
connectionRecordingPreferences = Maybe ConnectionRecordingPreferencesProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Preferences where
toResourceProperties :: Preferences -> ResourceProperties
toResourceProperties Preferences {Maybe ConnectionRecordingPreferencesProperty
()
haddock_workaround_ :: Preferences -> ()
connectionRecordingPreferences :: Preferences -> Maybe ConnectionRecordingPreferencesProperty
haddock_workaround_ :: ()
connectionRecordingPreferences :: Maybe ConnectionRecordingPreferencesProperty
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::SSMGuiConnect::Preferences",
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 -> ConnectionRecordingPreferencesProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ConnectionRecordingPreferences"
(ConnectionRecordingPreferencesProperty -> (Key, Value))
-> Maybe ConnectionRecordingPreferencesProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ConnectionRecordingPreferencesProperty
connectionRecordingPreferences])}
instance JSON.ToJSON Preferences where
toJSON :: Preferences -> Value
toJSON Preferences {Maybe ConnectionRecordingPreferencesProperty
()
haddock_workaround_ :: Preferences -> ()
connectionRecordingPreferences :: Preferences -> Maybe ConnectionRecordingPreferencesProperty
haddock_workaround_ :: ()
connectionRecordingPreferences :: Maybe ConnectionRecordingPreferencesProperty
..}
= [(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 -> ConnectionRecordingPreferencesProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ConnectionRecordingPreferences"
(ConnectionRecordingPreferencesProperty -> (Key, Value))
-> Maybe ConnectionRecordingPreferencesProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ConnectionRecordingPreferencesProperty
connectionRecordingPreferences]))
instance Property "ConnectionRecordingPreferences" Preferences where
type PropertyType "ConnectionRecordingPreferences" Preferences = ConnectionRecordingPreferencesProperty
set :: PropertyType "ConnectionRecordingPreferences" Preferences
-> Preferences -> Preferences
set PropertyType "ConnectionRecordingPreferences" Preferences
newValue Preferences {Maybe ConnectionRecordingPreferencesProperty
()
haddock_workaround_ :: Preferences -> ()
connectionRecordingPreferences :: Preferences -> Maybe ConnectionRecordingPreferencesProperty
haddock_workaround_ :: ()
connectionRecordingPreferences :: Maybe ConnectionRecordingPreferencesProperty
..}
= Preferences
{connectionRecordingPreferences :: Maybe ConnectionRecordingPreferencesProperty
connectionRecordingPreferences = ConnectionRecordingPreferencesProperty
-> Maybe ConnectionRecordingPreferencesProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ConnectionRecordingPreferences" Preferences
ConnectionRecordingPreferencesProperty
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}