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