module Stratosphere.Kinesis.StreamConsumer (
        StreamConsumer(..), mkStreamConsumer
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data StreamConsumer
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kinesis-streamconsumer.html>
    StreamConsumer {StreamConsumer -> ()
haddock_workaround_ :: (),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kinesis-streamconsumer.html#cfn-kinesis-streamconsumer-consumername>
                    StreamConsumer -> Value Text
consumerName :: (Value Prelude.Text),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kinesis-streamconsumer.html#cfn-kinesis-streamconsumer-streamarn>
                    StreamConsumer -> Value Text
streamARN :: (Value Prelude.Text),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kinesis-streamconsumer.html#cfn-kinesis-streamconsumer-tags>
                    StreamConsumer -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
  deriving stock (StreamConsumer -> StreamConsumer -> Bool
(StreamConsumer -> StreamConsumer -> Bool)
-> (StreamConsumer -> StreamConsumer -> Bool) -> Eq StreamConsumer
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: StreamConsumer -> StreamConsumer -> Bool
== :: StreamConsumer -> StreamConsumer -> Bool
$c/= :: StreamConsumer -> StreamConsumer -> Bool
/= :: StreamConsumer -> StreamConsumer -> Bool
Prelude.Eq, Int -> StreamConsumer -> ShowS
[StreamConsumer] -> ShowS
StreamConsumer -> String
(Int -> StreamConsumer -> ShowS)
-> (StreamConsumer -> String)
-> ([StreamConsumer] -> ShowS)
-> Show StreamConsumer
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> StreamConsumer -> ShowS
showsPrec :: Int -> StreamConsumer -> ShowS
$cshow :: StreamConsumer -> String
show :: StreamConsumer -> String
$cshowList :: [StreamConsumer] -> ShowS
showList :: [StreamConsumer] -> ShowS
Prelude.Show)
mkStreamConsumer ::
  Value Prelude.Text -> Value Prelude.Text -> StreamConsumer
mkStreamConsumer :: Value Text -> Value Text -> StreamConsumer
mkStreamConsumer Value Text
consumerName Value Text
streamARN
  = StreamConsumer
      {haddock_workaround_ :: ()
haddock_workaround_ = (), consumerName :: Value Text
consumerName = Value Text
consumerName,
       streamARN :: Value Text
streamARN = Value Text
streamARN, tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties StreamConsumer where
  toResourceProperties :: StreamConsumer -> ResourceProperties
toResourceProperties StreamConsumer {Maybe [Tag]
()
Value Text
haddock_workaround_ :: StreamConsumer -> ()
consumerName :: StreamConsumer -> Value Text
streamARN :: StreamConsumer -> Value Text
tags :: StreamConsumer -> Maybe [Tag]
haddock_workaround_ :: ()
consumerName :: Value Text
streamARN :: Value Text
tags :: Maybe [Tag]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Kinesis::StreamConsumer",
         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
"ConsumerName" 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
consumerName,
                            Key
"StreamARN" 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
streamARN]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [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 StreamConsumer where
  toJSON :: StreamConsumer -> Value
toJSON StreamConsumer {Maybe [Tag]
()
Value Text
haddock_workaround_ :: StreamConsumer -> ()
consumerName :: StreamConsumer -> Value Text
streamARN :: StreamConsumer -> Value Text
tags :: StreamConsumer -> Maybe [Tag]
haddock_workaround_ :: ()
consumerName :: Value Text
streamARN :: 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
"ConsumerName" 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
consumerName,
               Key
"StreamARN" 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
streamARN]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [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 "ConsumerName" StreamConsumer where
  type PropertyType "ConsumerName" StreamConsumer = Value Prelude.Text
  set :: PropertyType "ConsumerName" StreamConsumer
-> StreamConsumer -> StreamConsumer
set PropertyType "ConsumerName" StreamConsumer
newValue StreamConsumer {Maybe [Tag]
()
Value Text
haddock_workaround_ :: StreamConsumer -> ()
consumerName :: StreamConsumer -> Value Text
streamARN :: StreamConsumer -> Value Text
tags :: StreamConsumer -> Maybe [Tag]
haddock_workaround_ :: ()
consumerName :: Value Text
streamARN :: Value Text
tags :: Maybe [Tag]
..}
    = StreamConsumer {consumerName :: Value Text
consumerName = PropertyType "ConsumerName" StreamConsumer
Value Text
newValue, Maybe [Tag]
()
Value Text
haddock_workaround_ :: ()
streamARN :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
streamARN :: Value Text
tags :: Maybe [Tag]
..}
instance Property "StreamARN" StreamConsumer where
  type PropertyType "StreamARN" StreamConsumer = Value Prelude.Text
  set :: PropertyType "StreamARN" StreamConsumer
-> StreamConsumer -> StreamConsumer
set PropertyType "StreamARN" StreamConsumer
newValue StreamConsumer {Maybe [Tag]
()
Value Text
haddock_workaround_ :: StreamConsumer -> ()
consumerName :: StreamConsumer -> Value Text
streamARN :: StreamConsumer -> Value Text
tags :: StreamConsumer -> Maybe [Tag]
haddock_workaround_ :: ()
consumerName :: Value Text
streamARN :: Value Text
tags :: Maybe [Tag]
..}
    = StreamConsumer {streamARN :: Value Text
streamARN = PropertyType "StreamARN" StreamConsumer
Value Text
newValue, Maybe [Tag]
()
Value Text
haddock_workaround_ :: ()
consumerName :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
consumerName :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Tags" StreamConsumer where
  type PropertyType "Tags" StreamConsumer = [Tag]
  set :: PropertyType "Tags" StreamConsumer
-> StreamConsumer -> StreamConsumer
set PropertyType "Tags" StreamConsumer
newValue StreamConsumer {Maybe [Tag]
()
Value Text
haddock_workaround_ :: StreamConsumer -> ()
consumerName :: StreamConsumer -> Value Text
streamARN :: StreamConsumer -> Value Text
tags :: StreamConsumer -> Maybe [Tag]
haddock_workaround_ :: ()
consumerName :: Value Text
streamARN :: Value Text
tags :: Maybe [Tag]
..}
    = StreamConsumer {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" StreamConsumer
newValue, ()
Value Text
haddock_workaround_ :: ()
consumerName :: Value Text
streamARN :: Value Text
haddock_workaround_ :: ()
consumerName :: Value Text
streamARN :: Value Text
..}