module Stratosphere.MediaPackageV2.ChannelGroup (
        ChannelGroup(..), mkChannelGroup
    ) 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 ChannelGroup
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackagev2-channelgroup.html>
    ChannelGroup {ChannelGroup -> ()
haddock_workaround_ :: (),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackagev2-channelgroup.html#cfn-mediapackagev2-channelgroup-channelgroupname>
                  ChannelGroup -> Value Text
channelGroupName :: (Value Prelude.Text),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackagev2-channelgroup.html#cfn-mediapackagev2-channelgroup-description>
                  ChannelGroup -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackagev2-channelgroup.html#cfn-mediapackagev2-channelgroup-tags>
                  ChannelGroup -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
  deriving stock (ChannelGroup -> ChannelGroup -> Bool
(ChannelGroup -> ChannelGroup -> Bool)
-> (ChannelGroup -> ChannelGroup -> Bool) -> Eq ChannelGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ChannelGroup -> ChannelGroup -> Bool
== :: ChannelGroup -> ChannelGroup -> Bool
$c/= :: ChannelGroup -> ChannelGroup -> Bool
/= :: ChannelGroup -> ChannelGroup -> Bool
Prelude.Eq, Int -> ChannelGroup -> ShowS
[ChannelGroup] -> ShowS
ChannelGroup -> String
(Int -> ChannelGroup -> ShowS)
-> (ChannelGroup -> String)
-> ([ChannelGroup] -> ShowS)
-> Show ChannelGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ChannelGroup -> ShowS
showsPrec :: Int -> ChannelGroup -> ShowS
$cshow :: ChannelGroup -> String
show :: ChannelGroup -> String
$cshowList :: [ChannelGroup] -> ShowS
showList :: [ChannelGroup] -> ShowS
Prelude.Show)
mkChannelGroup :: Value Prelude.Text -> ChannelGroup
mkChannelGroup :: Value Text -> ChannelGroup
mkChannelGroup Value Text
channelGroupName
  = ChannelGroup
      {haddock_workaround_ :: ()
haddock_workaround_ = (), channelGroupName :: Value Text
channelGroupName = Value Text
channelGroupName,
       description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ChannelGroup where
  toResourceProperties :: ChannelGroup -> ResourceProperties
toResourceProperties ChannelGroup {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ChannelGroup -> ()
channelGroupName :: ChannelGroup -> Value Text
description :: ChannelGroup -> Maybe (Value Text)
tags :: ChannelGroup -> Maybe [Tag]
haddock_workaround_ :: ()
channelGroupName :: Value Text
description :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::MediaPackageV2::ChannelGroup",
         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
"ChannelGroupName" 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
channelGroupName]
                           ([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
"Description" (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)
description,
                               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 ChannelGroup where
  toJSON :: ChannelGroup -> Value
toJSON ChannelGroup {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ChannelGroup -> ()
channelGroupName :: ChannelGroup -> Value Text
description :: ChannelGroup -> Maybe (Value Text)
tags :: ChannelGroup -> Maybe [Tag]
haddock_workaround_ :: ()
channelGroupName :: Value Text
description :: 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
"ChannelGroupName" 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
channelGroupName]
              ([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
"Description" (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)
description,
                  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 "ChannelGroupName" ChannelGroup where
  type PropertyType "ChannelGroupName" ChannelGroup = Value Prelude.Text
  set :: PropertyType "ChannelGroupName" ChannelGroup
-> ChannelGroup -> ChannelGroup
set PropertyType "ChannelGroupName" ChannelGroup
newValue ChannelGroup {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ChannelGroup -> ()
channelGroupName :: ChannelGroup -> Value Text
description :: ChannelGroup -> Maybe (Value Text)
tags :: ChannelGroup -> Maybe [Tag]
haddock_workaround_ :: ()
channelGroupName :: Value Text
description :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = ChannelGroup {channelGroupName :: Value Text
channelGroupName = PropertyType "ChannelGroupName" ChannelGroup
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: ()
description :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "Description" ChannelGroup where
  type PropertyType "Description" ChannelGroup = Value Prelude.Text
  set :: PropertyType "Description" ChannelGroup
-> ChannelGroup -> ChannelGroup
set PropertyType "Description" ChannelGroup
newValue ChannelGroup {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ChannelGroup -> ()
channelGroupName :: ChannelGroup -> Value Text
description :: ChannelGroup -> Maybe (Value Text)
tags :: ChannelGroup -> Maybe [Tag]
haddock_workaround_ :: ()
channelGroupName :: Value Text
description :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = ChannelGroup {description :: Maybe (Value Text)
description = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Description" ChannelGroup
Value Text
newValue, Maybe [Tag]
()
Value Text
haddock_workaround_ :: ()
channelGroupName :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
channelGroupName :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Tags" ChannelGroup where
  type PropertyType "Tags" ChannelGroup = [Tag]
  set :: PropertyType "Tags" ChannelGroup -> ChannelGroup -> ChannelGroup
set PropertyType "Tags" ChannelGroup
newValue ChannelGroup {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ChannelGroup -> ()
channelGroupName :: ChannelGroup -> Value Text
description :: ChannelGroup -> Maybe (Value Text)
tags :: ChannelGroup -> Maybe [Tag]
haddock_workaround_ :: ()
channelGroupName :: Value Text
description :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = ChannelGroup {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" ChannelGroup
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
channelGroupName :: Value Text
description :: Maybe (Value Text)
haddock_workaround_ :: ()
channelGroupName :: Value Text
description :: Maybe (Value Text)
..}