module Stratosphere.GuardDuty.Master (
Master(..), mkMaster
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data Master
=
Master {Master -> ()
haddock_workaround_ :: (),
Master -> Value Text
detectorId :: (Value Prelude.Text),
Master -> Maybe (Value Text)
invitationId :: (Prelude.Maybe (Value Prelude.Text)),
Master -> Value Text
masterId :: (Value Prelude.Text)}
deriving stock (Master -> Master -> Bool
(Master -> Master -> Bool)
-> (Master -> Master -> Bool) -> Eq Master
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Master -> Master -> Bool
== :: Master -> Master -> Bool
$c/= :: Master -> Master -> Bool
/= :: Master -> Master -> Bool
Prelude.Eq, Int -> Master -> ShowS
[Master] -> ShowS
Master -> String
(Int -> Master -> ShowS)
-> (Master -> String) -> ([Master] -> ShowS) -> Show Master
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Master -> ShowS
showsPrec :: Int -> Master -> ShowS
$cshow :: Master -> String
show :: Master -> String
$cshowList :: [Master] -> ShowS
showList :: [Master] -> ShowS
Prelude.Show)
mkMaster :: Value Prelude.Text -> Value Prelude.Text -> Master
mkMaster :: Value Text -> Value Text -> Master
mkMaster Value Text
detectorId Value Text
masterId
= Master
{haddock_workaround_ :: ()
haddock_workaround_ = (), detectorId :: Value Text
detectorId = Value Text
detectorId,
masterId :: Value Text
masterId = Value Text
masterId, invitationId :: Maybe (Value Text)
invitationId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Master where
toResourceProperties :: Master -> ResourceProperties
toResourceProperties Master {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Master -> ()
detectorId :: Master -> Value Text
invitationId :: Master -> Maybe (Value Text)
masterId :: Master -> Value Text
haddock_workaround_ :: ()
detectorId :: Value Text
invitationId :: Maybe (Value Text)
masterId :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::GuardDuty::Master", supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"DetectorId" 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..= Value Text
detectorId, Key
"MasterId" 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..= Value Text
masterId]
([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
"InvitationId" (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)
invitationId]))}
instance JSON.ToJSON Master where
toJSON :: Master -> Value
toJSON Master {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Master -> ()
detectorId :: Master -> Value Text
invitationId :: Master -> Maybe (Value Text)
masterId :: Master -> Value Text
haddock_workaround_ :: ()
detectorId :: Value Text
invitationId :: Maybe (Value Text)
masterId :: Value Text
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"DetectorId" 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..= Value Text
detectorId, Key
"MasterId" 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..= Value Text
masterId]
([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
"InvitationId" (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)
invitationId])))
instance Property "DetectorId" Master where
type PropertyType "DetectorId" Master = Value Prelude.Text
set :: PropertyType "DetectorId" Master -> Master -> Master
set PropertyType "DetectorId" Master
newValue Master {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Master -> ()
detectorId :: Master -> Value Text
invitationId :: Master -> Maybe (Value Text)
masterId :: Master -> Value Text
haddock_workaround_ :: ()
detectorId :: Value Text
invitationId :: Maybe (Value Text)
masterId :: Value Text
..} = Master {detectorId :: Value Text
detectorId = PropertyType "DetectorId" Master
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
invitationId :: Maybe (Value Text)
masterId :: Value Text
haddock_workaround_ :: ()
invitationId :: Maybe (Value Text)
masterId :: Value Text
..}
instance Property "InvitationId" Master where
type PropertyType "InvitationId" Master = Value Prelude.Text
set :: PropertyType "InvitationId" Master -> Master -> Master
set PropertyType "InvitationId" Master
newValue Master {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Master -> ()
detectorId :: Master -> Value Text
invitationId :: Master -> Maybe (Value Text)
masterId :: Master -> Value Text
haddock_workaround_ :: ()
detectorId :: Value Text
invitationId :: Maybe (Value Text)
masterId :: Value Text
..}
= Master {invitationId :: Maybe (Value Text)
invitationId = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "InvitationId" Master
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
detectorId :: Value Text
masterId :: Value Text
haddock_workaround_ :: ()
detectorId :: Value Text
masterId :: Value Text
..}
instance Property "MasterId" Master where
type PropertyType "MasterId" Master = Value Prelude.Text
set :: PropertyType "MasterId" Master -> Master -> Master
set PropertyType "MasterId" Master
newValue Master {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Master -> ()
detectorId :: Master -> Value Text
invitationId :: Master -> Maybe (Value Text)
masterId :: Master -> Value Text
haddock_workaround_ :: ()
detectorId :: Value Text
invitationId :: Maybe (Value Text)
masterId :: Value Text
..} = Master {masterId :: Value Text
masterId = PropertyType "MasterId" Master
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
detectorId :: Value Text
invitationId :: Maybe (Value Text)
haddock_workaround_ :: ()
detectorId :: Value Text
invitationId :: Maybe (Value Text)
..}