module Stratosphere.SecurityLake.AwsLogSource (
        AwsLogSource(..), mkAwsLogSource
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data AwsLogSource
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-securitylake-awslogsource.html>
    AwsLogSource {AwsLogSource -> ()
haddock_workaround_ :: (),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-securitylake-awslogsource.html#cfn-securitylake-awslogsource-accounts>
                  AwsLogSource -> Maybe (ValueList Text)
accounts :: (Prelude.Maybe (ValueList Prelude.Text)),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-securitylake-awslogsource.html#cfn-securitylake-awslogsource-datalakearn>
                  AwsLogSource -> Value Text
dataLakeArn :: (Value Prelude.Text),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-securitylake-awslogsource.html#cfn-securitylake-awslogsource-sourcename>
                  AwsLogSource -> Value Text
sourceName :: (Value Prelude.Text),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-securitylake-awslogsource.html#cfn-securitylake-awslogsource-sourceversion>
                  AwsLogSource -> Value Text
sourceVersion :: (Value Prelude.Text)}
  deriving stock (AwsLogSource -> AwsLogSource -> Bool
(AwsLogSource -> AwsLogSource -> Bool)
-> (AwsLogSource -> AwsLogSource -> Bool) -> Eq AwsLogSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AwsLogSource -> AwsLogSource -> Bool
== :: AwsLogSource -> AwsLogSource -> Bool
$c/= :: AwsLogSource -> AwsLogSource -> Bool
/= :: AwsLogSource -> AwsLogSource -> Bool
Prelude.Eq, Int -> AwsLogSource -> ShowS
[AwsLogSource] -> ShowS
AwsLogSource -> String
(Int -> AwsLogSource -> ShowS)
-> (AwsLogSource -> String)
-> ([AwsLogSource] -> ShowS)
-> Show AwsLogSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AwsLogSource -> ShowS
showsPrec :: Int -> AwsLogSource -> ShowS
$cshow :: AwsLogSource -> String
show :: AwsLogSource -> String
$cshowList :: [AwsLogSource] -> ShowS
showList :: [AwsLogSource] -> ShowS
Prelude.Show)
mkAwsLogSource ::
  Value Prelude.Text
  -> Value Prelude.Text -> Value Prelude.Text -> AwsLogSource
mkAwsLogSource :: Value Text -> Value Text -> Value Text -> AwsLogSource
mkAwsLogSource Value Text
dataLakeArn Value Text
sourceName Value Text
sourceVersion
  = AwsLogSource
      {haddock_workaround_ :: ()
haddock_workaround_ = (), dataLakeArn :: Value Text
dataLakeArn = Value Text
dataLakeArn,
       sourceName :: Value Text
sourceName = Value Text
sourceName, sourceVersion :: Value Text
sourceVersion = Value Text
sourceVersion,
       accounts :: Maybe (ValueList Text)
accounts = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties AwsLogSource where
  toResourceProperties :: AwsLogSource -> ResourceProperties
toResourceProperties AwsLogSource {Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: AwsLogSource -> ()
accounts :: AwsLogSource -> Maybe (ValueList Text)
dataLakeArn :: AwsLogSource -> Value Text
sourceName :: AwsLogSource -> Value Text
sourceVersion :: AwsLogSource -> Value Text
haddock_workaround_ :: ()
accounts :: Maybe (ValueList Text)
dataLakeArn :: Value Text
sourceName :: Value Text
sourceVersion :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::SecurityLake::AwsLogSource",
         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
"DataLakeArn" 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
dataLakeArn,
                            Key
"SourceName" 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
sourceName,
                            Key
"SourceVersion" 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
sourceVersion]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> ValueList 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
"Accounts" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
accounts]))}
instance JSON.ToJSON AwsLogSource where
  toJSON :: AwsLogSource -> Value
toJSON AwsLogSource {Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: AwsLogSource -> ()
accounts :: AwsLogSource -> Maybe (ValueList Text)
dataLakeArn :: AwsLogSource -> Value Text
sourceName :: AwsLogSource -> Value Text
sourceVersion :: AwsLogSource -> Value Text
haddock_workaround_ :: ()
accounts :: Maybe (ValueList Text)
dataLakeArn :: Value Text
sourceName :: Value Text
sourceVersion :: 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
"DataLakeArn" 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
dataLakeArn,
               Key
"SourceName" 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
sourceName,
               Key
"SourceVersion" 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
sourceVersion]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> ValueList 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
"Accounts" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
accounts])))
instance Property "Accounts" AwsLogSource where
  type PropertyType "Accounts" AwsLogSource = ValueList Prelude.Text
  set :: PropertyType "Accounts" AwsLogSource
-> AwsLogSource -> AwsLogSource
set PropertyType "Accounts" AwsLogSource
newValue AwsLogSource {Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: AwsLogSource -> ()
accounts :: AwsLogSource -> Maybe (ValueList Text)
dataLakeArn :: AwsLogSource -> Value Text
sourceName :: AwsLogSource -> Value Text
sourceVersion :: AwsLogSource -> Value Text
haddock_workaround_ :: ()
accounts :: Maybe (ValueList Text)
dataLakeArn :: Value Text
sourceName :: Value Text
sourceVersion :: Value Text
..}
    = AwsLogSource {accounts :: Maybe (ValueList Text)
accounts = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Accounts" AwsLogSource
ValueList Text
newValue, ()
Value Text
haddock_workaround_ :: ()
dataLakeArn :: Value Text
sourceName :: Value Text
sourceVersion :: Value Text
haddock_workaround_ :: ()
dataLakeArn :: Value Text
sourceName :: Value Text
sourceVersion :: Value Text
..}
instance Property "DataLakeArn" AwsLogSource where
  type PropertyType "DataLakeArn" AwsLogSource = Value Prelude.Text
  set :: PropertyType "DataLakeArn" AwsLogSource
-> AwsLogSource -> AwsLogSource
set PropertyType "DataLakeArn" AwsLogSource
newValue AwsLogSource {Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: AwsLogSource -> ()
accounts :: AwsLogSource -> Maybe (ValueList Text)
dataLakeArn :: AwsLogSource -> Value Text
sourceName :: AwsLogSource -> Value Text
sourceVersion :: AwsLogSource -> Value Text
haddock_workaround_ :: ()
accounts :: Maybe (ValueList Text)
dataLakeArn :: Value Text
sourceName :: Value Text
sourceVersion :: Value Text
..}
    = AwsLogSource {dataLakeArn :: Value Text
dataLakeArn = PropertyType "DataLakeArn" AwsLogSource
Value Text
newValue, Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: ()
accounts :: Maybe (ValueList Text)
sourceName :: Value Text
sourceVersion :: Value Text
haddock_workaround_ :: ()
accounts :: Maybe (ValueList Text)
sourceName :: Value Text
sourceVersion :: Value Text
..}
instance Property "SourceName" AwsLogSource where
  type PropertyType "SourceName" AwsLogSource = Value Prelude.Text
  set :: PropertyType "SourceName" AwsLogSource
-> AwsLogSource -> AwsLogSource
set PropertyType "SourceName" AwsLogSource
newValue AwsLogSource {Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: AwsLogSource -> ()
accounts :: AwsLogSource -> Maybe (ValueList Text)
dataLakeArn :: AwsLogSource -> Value Text
sourceName :: AwsLogSource -> Value Text
sourceVersion :: AwsLogSource -> Value Text
haddock_workaround_ :: ()
accounts :: Maybe (ValueList Text)
dataLakeArn :: Value Text
sourceName :: Value Text
sourceVersion :: Value Text
..}
    = AwsLogSource {sourceName :: Value Text
sourceName = PropertyType "SourceName" AwsLogSource
Value Text
newValue, Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: ()
accounts :: Maybe (ValueList Text)
dataLakeArn :: Value Text
sourceVersion :: Value Text
haddock_workaround_ :: ()
accounts :: Maybe (ValueList Text)
dataLakeArn :: Value Text
sourceVersion :: Value Text
..}
instance Property "SourceVersion" AwsLogSource where
  type PropertyType "SourceVersion" AwsLogSource = Value Prelude.Text
  set :: PropertyType "SourceVersion" AwsLogSource
-> AwsLogSource -> AwsLogSource
set PropertyType "SourceVersion" AwsLogSource
newValue AwsLogSource {Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: AwsLogSource -> ()
accounts :: AwsLogSource -> Maybe (ValueList Text)
dataLakeArn :: AwsLogSource -> Value Text
sourceName :: AwsLogSource -> Value Text
sourceVersion :: AwsLogSource -> Value Text
haddock_workaround_ :: ()
accounts :: Maybe (ValueList Text)
dataLakeArn :: Value Text
sourceName :: Value Text
sourceVersion :: Value Text
..}
    = AwsLogSource {sourceVersion :: Value Text
sourceVersion = PropertyType "SourceVersion" AwsLogSource
Value Text
newValue, Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: ()
accounts :: Maybe (ValueList Text)
dataLakeArn :: Value Text
sourceName :: Value Text
haddock_workaround_ :: ()
accounts :: Maybe (ValueList Text)
dataLakeArn :: Value Text
sourceName :: Value Text
..}