module Stratosphere.IoTAnalytics.Pipeline.AddAttributesProperty (
        AddAttributesProperty(..), mkAddAttributesProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data AddAttributesProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotanalytics-pipeline-addattributes.html>
    AddAttributesProperty {AddAttributesProperty -> ()
haddock_workaround_ :: (),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotanalytics-pipeline-addattributes.html#cfn-iotanalytics-pipeline-addattributes-attributes>
                           AddAttributesProperty -> Map Text (Value Text)
attributes :: (Prelude.Map Prelude.Text (Value Prelude.Text)),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotanalytics-pipeline-addattributes.html#cfn-iotanalytics-pipeline-addattributes-name>
                           AddAttributesProperty -> Value Text
name :: (Value Prelude.Text),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotanalytics-pipeline-addattributes.html#cfn-iotanalytics-pipeline-addattributes-next>
                           AddAttributesProperty -> Maybe (Value Text)
next :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (AddAttributesProperty -> AddAttributesProperty -> Bool
(AddAttributesProperty -> AddAttributesProperty -> Bool)
-> (AddAttributesProperty -> AddAttributesProperty -> Bool)
-> Eq AddAttributesProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AddAttributesProperty -> AddAttributesProperty -> Bool
== :: AddAttributesProperty -> AddAttributesProperty -> Bool
$c/= :: AddAttributesProperty -> AddAttributesProperty -> Bool
/= :: AddAttributesProperty -> AddAttributesProperty -> Bool
Prelude.Eq, Int -> AddAttributesProperty -> ShowS
[AddAttributesProperty] -> ShowS
AddAttributesProperty -> String
(Int -> AddAttributesProperty -> ShowS)
-> (AddAttributesProperty -> String)
-> ([AddAttributesProperty] -> ShowS)
-> Show AddAttributesProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AddAttributesProperty -> ShowS
showsPrec :: Int -> AddAttributesProperty -> ShowS
$cshow :: AddAttributesProperty -> String
show :: AddAttributesProperty -> String
$cshowList :: [AddAttributesProperty] -> ShowS
showList :: [AddAttributesProperty] -> ShowS
Prelude.Show)
mkAddAttributesProperty ::
  Prelude.Map Prelude.Text (Value Prelude.Text)
  -> Value Prelude.Text -> AddAttributesProperty
mkAddAttributesProperty :: Map Text (Value Text) -> Value Text -> AddAttributesProperty
mkAddAttributesProperty Map Text (Value Text)
attributes Value Text
name
  = AddAttributesProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), attributes :: Map Text (Value Text)
attributes = Map Text (Value Text)
attributes, name :: Value Text
name = Value Text
name,
       next :: Maybe (Value Text)
next = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties AddAttributesProperty where
  toResourceProperties :: AddAttributesProperty -> ResourceProperties
toResourceProperties AddAttributesProperty {Maybe (Value Text)
()
Map Text (Value Text)
Value Text
haddock_workaround_ :: AddAttributesProperty -> ()
attributes :: AddAttributesProperty -> Map Text (Value Text)
name :: AddAttributesProperty -> Value Text
next :: AddAttributesProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
attributes :: Map Text (Value Text)
name :: Value Text
next :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::IoTAnalytics::Pipeline.AddAttributes",
         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
"Attributes" Key -> Map Text (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..= Map Text (Value Text)
attributes, Key
"Name" 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
name]
                           ([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
"Next" (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)
next]))}
instance JSON.ToJSON AddAttributesProperty where
  toJSON :: AddAttributesProperty -> Value
toJSON AddAttributesProperty {Maybe (Value Text)
()
Map Text (Value Text)
Value Text
haddock_workaround_ :: AddAttributesProperty -> ()
attributes :: AddAttributesProperty -> Map Text (Value Text)
name :: AddAttributesProperty -> Value Text
next :: AddAttributesProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
attributes :: Map Text (Value Text)
name :: Value Text
next :: Maybe (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
"Attributes" Key -> Map Text (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..= Map Text (Value Text)
attributes, Key
"Name" 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
name]
              ([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
"Next" (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)
next])))
instance Property "Attributes" AddAttributesProperty where
  type PropertyType "Attributes" AddAttributesProperty = Prelude.Map Prelude.Text (Value Prelude.Text)
  set :: PropertyType "Attributes" AddAttributesProperty
-> AddAttributesProperty -> AddAttributesProperty
set PropertyType "Attributes" AddAttributesProperty
newValue AddAttributesProperty {Maybe (Value Text)
()
Map Text (Value Text)
Value Text
haddock_workaround_ :: AddAttributesProperty -> ()
attributes :: AddAttributesProperty -> Map Text (Value Text)
name :: AddAttributesProperty -> Value Text
next :: AddAttributesProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
attributes :: Map Text (Value Text)
name :: Value Text
next :: Maybe (Value Text)
..}
    = AddAttributesProperty {attributes :: Map Text (Value Text)
attributes = Map Text (Value Text)
PropertyType "Attributes" AddAttributesProperty
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
name :: Value Text
next :: Maybe (Value Text)
haddock_workaround_ :: ()
name :: Value Text
next :: Maybe (Value Text)
..}
instance Property "Name" AddAttributesProperty where
  type PropertyType "Name" AddAttributesProperty = Value Prelude.Text
  set :: PropertyType "Name" AddAttributesProperty
-> AddAttributesProperty -> AddAttributesProperty
set PropertyType "Name" AddAttributesProperty
newValue AddAttributesProperty {Maybe (Value Text)
()
Map Text (Value Text)
Value Text
haddock_workaround_ :: AddAttributesProperty -> ()
attributes :: AddAttributesProperty -> Map Text (Value Text)
name :: AddAttributesProperty -> Value Text
next :: AddAttributesProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
attributes :: Map Text (Value Text)
name :: Value Text
next :: Maybe (Value Text)
..}
    = AddAttributesProperty {name :: Value Text
name = PropertyType "Name" AddAttributesProperty
Value Text
newValue, Maybe (Value Text)
()
Map Text (Value Text)
haddock_workaround_ :: ()
attributes :: Map Text (Value Text)
next :: Maybe (Value Text)
haddock_workaround_ :: ()
attributes :: Map Text (Value Text)
next :: Maybe (Value Text)
..}
instance Property "Next" AddAttributesProperty where
  type PropertyType "Next" AddAttributesProperty = Value Prelude.Text
  set :: PropertyType "Next" AddAttributesProperty
-> AddAttributesProperty -> AddAttributesProperty
set PropertyType "Next" AddAttributesProperty
newValue AddAttributesProperty {Maybe (Value Text)
()
Map Text (Value Text)
Value Text
haddock_workaround_ :: AddAttributesProperty -> ()
attributes :: AddAttributesProperty -> Map Text (Value Text)
name :: AddAttributesProperty -> Value Text
next :: AddAttributesProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
attributes :: Map Text (Value Text)
name :: Value Text
next :: Maybe (Value Text)
..}
    = AddAttributesProperty {next :: Maybe (Value Text)
next = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Next" AddAttributesProperty
Value Text
newValue, ()
Map Text (Value Text)
Value Text
haddock_workaround_ :: ()
attributes :: Map Text (Value Text)
name :: Value Text
haddock_workaround_ :: ()
attributes :: Map Text (Value Text)
name :: Value Text
..}