module Stratosphere.IVS.StreamKey (
StreamKey(..), mkStreamKey
) 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 StreamKey
=
StreamKey {StreamKey -> ()
haddock_workaround_ :: (),
StreamKey -> Value Text
channelArn :: (Value Prelude.Text),
StreamKey -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
deriving stock (StreamKey -> StreamKey -> Bool
(StreamKey -> StreamKey -> Bool)
-> (StreamKey -> StreamKey -> Bool) -> Eq StreamKey
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: StreamKey -> StreamKey -> Bool
== :: StreamKey -> StreamKey -> Bool
$c/= :: StreamKey -> StreamKey -> Bool
/= :: StreamKey -> StreamKey -> Bool
Prelude.Eq, Int -> StreamKey -> ShowS
[StreamKey] -> ShowS
StreamKey -> String
(Int -> StreamKey -> ShowS)
-> (StreamKey -> String)
-> ([StreamKey] -> ShowS)
-> Show StreamKey
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> StreamKey -> ShowS
showsPrec :: Int -> StreamKey -> ShowS
$cshow :: StreamKey -> String
show :: StreamKey -> String
$cshowList :: [StreamKey] -> ShowS
showList :: [StreamKey] -> ShowS
Prelude.Show)
mkStreamKey :: Value Prelude.Text -> StreamKey
mkStreamKey :: Value Text -> StreamKey
mkStreamKey Value Text
channelArn
= StreamKey
{haddock_workaround_ :: ()
haddock_workaround_ = (), channelArn :: Value Text
channelArn = Value Text
channelArn,
tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties StreamKey where
toResourceProperties :: StreamKey -> ResourceProperties
toResourceProperties StreamKey {Maybe [Tag]
()
Value Text
haddock_workaround_ :: StreamKey -> ()
channelArn :: StreamKey -> Value Text
tags :: StreamKey -> Maybe [Tag]
haddock_workaround_ :: ()
channelArn :: Value Text
tags :: Maybe [Tag]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::IVS::StreamKey", 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
"ChannelArn" 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
channelArn]
([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 StreamKey where
toJSON :: StreamKey -> Value
toJSON StreamKey {Maybe [Tag]
()
Value Text
haddock_workaround_ :: StreamKey -> ()
channelArn :: StreamKey -> Value Text
tags :: StreamKey -> Maybe [Tag]
haddock_workaround_ :: ()
channelArn :: 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
"ChannelArn" 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
channelArn]
([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 "ChannelArn" StreamKey where
type PropertyType "ChannelArn" StreamKey = Value Prelude.Text
set :: PropertyType "ChannelArn" StreamKey -> StreamKey -> StreamKey
set PropertyType "ChannelArn" StreamKey
newValue StreamKey {Maybe [Tag]
()
Value Text
haddock_workaround_ :: StreamKey -> ()
channelArn :: StreamKey -> Value Text
tags :: StreamKey -> Maybe [Tag]
haddock_workaround_ :: ()
channelArn :: Value Text
tags :: Maybe [Tag]
..} = StreamKey {channelArn :: Value Text
channelArn = PropertyType "ChannelArn" StreamKey
Value Text
newValue, Maybe [Tag]
()
haddock_workaround_ :: ()
tags :: Maybe [Tag]
haddock_workaround_ :: ()
tags :: Maybe [Tag]
..}
instance Property "Tags" StreamKey where
type PropertyType "Tags" StreamKey = [Tag]
set :: PropertyType "Tags" StreamKey -> StreamKey -> StreamKey
set PropertyType "Tags" StreamKey
newValue StreamKey {Maybe [Tag]
()
Value Text
haddock_workaround_ :: StreamKey -> ()
channelArn :: StreamKey -> Value Text
tags :: StreamKey -> Maybe [Tag]
haddock_workaround_ :: ()
channelArn :: Value Text
tags :: Maybe [Tag]
..}
= StreamKey {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" StreamKey
newValue, ()
Value Text
haddock_workaround_ :: ()
channelArn :: Value Text
haddock_workaround_ :: ()
channelArn :: Value Text
..}