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