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