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