module Stratosphere.EventSchemas.Discoverer (
        module Exports, Discoverer(..), mkDiscoverer
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.EventSchemas.Discoverer.TagsEntryProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data Discoverer
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eventschemas-discoverer.html>
    Discoverer {Discoverer -> ()
haddock_workaround_ :: (),
                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eventschemas-discoverer.html#cfn-eventschemas-discoverer-crossaccount>
                Discoverer -> Maybe (Value Bool)
crossAccount :: (Prelude.Maybe (Value Prelude.Bool)),
                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eventschemas-discoverer.html#cfn-eventschemas-discoverer-description>
                Discoverer -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eventschemas-discoverer.html#cfn-eventschemas-discoverer-sourcearn>
                Discoverer -> Value Text
sourceArn :: (Value Prelude.Text),
                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eventschemas-discoverer.html#cfn-eventschemas-discoverer-tags>
                Discoverer -> Maybe [TagsEntryProperty]
tags :: (Prelude.Maybe [TagsEntryProperty])}
  deriving stock (Discoverer -> Discoverer -> Bool
(Discoverer -> Discoverer -> Bool)
-> (Discoverer -> Discoverer -> Bool) -> Eq Discoverer
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Discoverer -> Discoverer -> Bool
== :: Discoverer -> Discoverer -> Bool
$c/= :: Discoverer -> Discoverer -> Bool
/= :: Discoverer -> Discoverer -> Bool
Prelude.Eq, Int -> Discoverer -> ShowS
[Discoverer] -> ShowS
Discoverer -> String
(Int -> Discoverer -> ShowS)
-> (Discoverer -> String)
-> ([Discoverer] -> ShowS)
-> Show Discoverer
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Discoverer -> ShowS
showsPrec :: Int -> Discoverer -> ShowS
$cshow :: Discoverer -> String
show :: Discoverer -> String
$cshowList :: [Discoverer] -> ShowS
showList :: [Discoverer] -> ShowS
Prelude.Show)
mkDiscoverer :: Value Prelude.Text -> Discoverer
mkDiscoverer :: Value Text -> Discoverer
mkDiscoverer Value Text
sourceArn
  = Discoverer
      {haddock_workaround_ :: ()
haddock_workaround_ = (), sourceArn :: Value Text
sourceArn = Value Text
sourceArn,
       crossAccount :: Maybe (Value Bool)
crossAccount = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing, description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       tags :: Maybe [TagsEntryProperty]
tags = Maybe [TagsEntryProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Discoverer where
  toResourceProperties :: Discoverer -> ResourceProperties
toResourceProperties Discoverer {Maybe [TagsEntryProperty]
Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Discoverer -> ()
crossAccount :: Discoverer -> Maybe (Value Bool)
description :: Discoverer -> Maybe (Value Text)
sourceArn :: Discoverer -> Value Text
tags :: Discoverer -> Maybe [TagsEntryProperty]
haddock_workaround_ :: ()
crossAccount :: Maybe (Value Bool)
description :: Maybe (Value Text)
sourceArn :: Value Text
tags :: Maybe [TagsEntryProperty]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::EventSchemas::Discoverer",
         supportsTags :: Bool
supportsTags = Bool
Prelude.True,
         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
"SourceArn" 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
sourceArn]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"CrossAccount" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
crossAccount,
                               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
"Description" (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)
description,
                               Key -> [TagsEntryProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([TagsEntryProperty] -> (Key, Value))
-> Maybe [TagsEntryProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [TagsEntryProperty]
tags]))}
instance JSON.ToJSON Discoverer where
  toJSON :: Discoverer -> Value
toJSON Discoverer {Maybe [TagsEntryProperty]
Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Discoverer -> ()
crossAccount :: Discoverer -> Maybe (Value Bool)
description :: Discoverer -> Maybe (Value Text)
sourceArn :: Discoverer -> Value Text
tags :: Discoverer -> Maybe [TagsEntryProperty]
haddock_workaround_ :: ()
crossAccount :: Maybe (Value Bool)
description :: Maybe (Value Text)
sourceArn :: Value Text
tags :: Maybe [TagsEntryProperty]
..}
    = [(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
"SourceArn" 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
sourceArn]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"CrossAccount" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
crossAccount,
                  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
"Description" (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)
description,
                  Key -> [TagsEntryProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([TagsEntryProperty] -> (Key, Value))
-> Maybe [TagsEntryProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [TagsEntryProperty]
tags])))
instance Property "CrossAccount" Discoverer where
  type PropertyType "CrossAccount" Discoverer = Value Prelude.Bool
  set :: PropertyType "CrossAccount" Discoverer -> Discoverer -> Discoverer
set PropertyType "CrossAccount" Discoverer
newValue Discoverer {Maybe [TagsEntryProperty]
Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Discoverer -> ()
crossAccount :: Discoverer -> Maybe (Value Bool)
description :: Discoverer -> Maybe (Value Text)
sourceArn :: Discoverer -> Value Text
tags :: Discoverer -> Maybe [TagsEntryProperty]
haddock_workaround_ :: ()
crossAccount :: Maybe (Value Bool)
description :: Maybe (Value Text)
sourceArn :: Value Text
tags :: Maybe [TagsEntryProperty]
..}
    = Discoverer {crossAccount :: Maybe (Value Bool)
crossAccount = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CrossAccount" Discoverer
Value Bool
newValue, Maybe [TagsEntryProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
sourceArn :: Value Text
tags :: Maybe [TagsEntryProperty]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
sourceArn :: Value Text
tags :: Maybe [TagsEntryProperty]
..}
instance Property "Description" Discoverer where
  type PropertyType "Description" Discoverer = Value Prelude.Text
  set :: PropertyType "Description" Discoverer -> Discoverer -> Discoverer
set PropertyType "Description" Discoverer
newValue Discoverer {Maybe [TagsEntryProperty]
Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Discoverer -> ()
crossAccount :: Discoverer -> Maybe (Value Bool)
description :: Discoverer -> Maybe (Value Text)
sourceArn :: Discoverer -> Value Text
tags :: Discoverer -> Maybe [TagsEntryProperty]
haddock_workaround_ :: ()
crossAccount :: Maybe (Value Bool)
description :: Maybe (Value Text)
sourceArn :: Value Text
tags :: Maybe [TagsEntryProperty]
..}
    = Discoverer {description :: Maybe (Value Text)
description = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Description" Discoverer
Value Text
newValue, Maybe [TagsEntryProperty]
Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: ()
crossAccount :: Maybe (Value Bool)
sourceArn :: Value Text
tags :: Maybe [TagsEntryProperty]
haddock_workaround_ :: ()
crossAccount :: Maybe (Value Bool)
sourceArn :: Value Text
tags :: Maybe [TagsEntryProperty]
..}
instance Property "SourceArn" Discoverer where
  type PropertyType "SourceArn" Discoverer = Value Prelude.Text
  set :: PropertyType "SourceArn" Discoverer -> Discoverer -> Discoverer
set PropertyType "SourceArn" Discoverer
newValue Discoverer {Maybe [TagsEntryProperty]
Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Discoverer -> ()
crossAccount :: Discoverer -> Maybe (Value Bool)
description :: Discoverer -> Maybe (Value Text)
sourceArn :: Discoverer -> Value Text
tags :: Discoverer -> Maybe [TagsEntryProperty]
haddock_workaround_ :: ()
crossAccount :: Maybe (Value Bool)
description :: Maybe (Value Text)
sourceArn :: Value Text
tags :: Maybe [TagsEntryProperty]
..}
    = Discoverer {sourceArn :: Value Text
sourceArn = PropertyType "SourceArn" Discoverer
Value Text
newValue, Maybe [TagsEntryProperty]
Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ()
crossAccount :: Maybe (Value Bool)
description :: Maybe (Value Text)
tags :: Maybe [TagsEntryProperty]
haddock_workaround_ :: ()
crossAccount :: Maybe (Value Bool)
description :: Maybe (Value Text)
tags :: Maybe [TagsEntryProperty]
..}
instance Property "Tags" Discoverer where
  type PropertyType "Tags" Discoverer = [TagsEntryProperty]
  set :: PropertyType "Tags" Discoverer -> Discoverer -> Discoverer
set PropertyType "Tags" Discoverer
newValue Discoverer {Maybe [TagsEntryProperty]
Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Discoverer -> ()
crossAccount :: Discoverer -> Maybe (Value Bool)
description :: Discoverer -> Maybe (Value Text)
sourceArn :: Discoverer -> Value Text
tags :: Discoverer -> Maybe [TagsEntryProperty]
haddock_workaround_ :: ()
crossAccount :: Maybe (Value Bool)
description :: Maybe (Value Text)
sourceArn :: Value Text
tags :: Maybe [TagsEntryProperty]
..}
    = Discoverer {tags :: Maybe [TagsEntryProperty]
tags = [TagsEntryProperty] -> Maybe [TagsEntryProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [TagsEntryProperty]
PropertyType "Tags" Discoverer
newValue, Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
crossAccount :: Maybe (Value Bool)
description :: Maybe (Value Text)
sourceArn :: Value Text
haddock_workaround_ :: ()
crossAccount :: Maybe (Value Bool)
description :: Maybe (Value Text)
sourceArn :: Value Text
..}