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