module Stratosphere.Redshift.ClusterParameterGroup (
        module Exports, ClusterParameterGroup(..), mkClusterParameterGroup
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Redshift.ClusterParameterGroup.ParameterProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data ClusterParameterGroup
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-redshift-clusterparametergroup.html>
    ClusterParameterGroup {ClusterParameterGroup -> ()
haddock_workaround_ :: (),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-redshift-clusterparametergroup.html#cfn-redshift-clusterparametergroup-description>
                           ClusterParameterGroup -> Value Text
description :: (Value Prelude.Text),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-redshift-clusterparametergroup.html#cfn-redshift-clusterparametergroup-parametergroupfamily>
                           ClusterParameterGroup -> Value Text
parameterGroupFamily :: (Value Prelude.Text),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-redshift-clusterparametergroup.html#cfn-redshift-clusterparametergroup-parametergroupname>
                           ClusterParameterGroup -> Maybe (Value Text)
parameterGroupName :: (Prelude.Maybe (Value Prelude.Text)),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-redshift-clusterparametergroup.html#cfn-redshift-clusterparametergroup-parameters>
                           ClusterParameterGroup -> Maybe [ParameterProperty]
parameters :: (Prelude.Maybe [ParameterProperty]),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-redshift-clusterparametergroup.html#cfn-redshift-clusterparametergroup-tags>
                           ClusterParameterGroup -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
  deriving stock (ClusterParameterGroup -> ClusterParameterGroup -> Bool
(ClusterParameterGroup -> ClusterParameterGroup -> Bool)
-> (ClusterParameterGroup -> ClusterParameterGroup -> Bool)
-> Eq ClusterParameterGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ClusterParameterGroup -> ClusterParameterGroup -> Bool
== :: ClusterParameterGroup -> ClusterParameterGroup -> Bool
$c/= :: ClusterParameterGroup -> ClusterParameterGroup -> Bool
/= :: ClusterParameterGroup -> ClusterParameterGroup -> Bool
Prelude.Eq, Int -> ClusterParameterGroup -> ShowS
[ClusterParameterGroup] -> ShowS
ClusterParameterGroup -> String
(Int -> ClusterParameterGroup -> ShowS)
-> (ClusterParameterGroup -> String)
-> ([ClusterParameterGroup] -> ShowS)
-> Show ClusterParameterGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ClusterParameterGroup -> ShowS
showsPrec :: Int -> ClusterParameterGroup -> ShowS
$cshow :: ClusterParameterGroup -> String
show :: ClusterParameterGroup -> String
$cshowList :: [ClusterParameterGroup] -> ShowS
showList :: [ClusterParameterGroup] -> ShowS
Prelude.Show)
mkClusterParameterGroup ::
  Value Prelude.Text -> Value Prelude.Text -> ClusterParameterGroup
mkClusterParameterGroup :: Value Text -> Value Text -> ClusterParameterGroup
mkClusterParameterGroup Value Text
description Value Text
parameterGroupFamily
  = ClusterParameterGroup
      {haddock_workaround_ :: ()
haddock_workaround_ = (), description :: Value Text
description = Value Text
description,
       parameterGroupFamily :: Value Text
parameterGroupFamily = Value Text
parameterGroupFamily,
       parameterGroupName :: Maybe (Value Text)
parameterGroupName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, parameters :: Maybe [ParameterProperty]
parameters = Maybe [ParameterProperty]
forall a. Maybe a
Prelude.Nothing,
       tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ClusterParameterGroup where
  toResourceProperties :: ClusterParameterGroup -> ResourceProperties
toResourceProperties ClusterParameterGroup {Maybe [Tag]
Maybe [ParameterProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ClusterParameterGroup -> ()
description :: ClusterParameterGroup -> Value Text
parameterGroupFamily :: ClusterParameterGroup -> Value Text
parameterGroupName :: ClusterParameterGroup -> Maybe (Value Text)
parameters :: ClusterParameterGroup -> Maybe [ParameterProperty]
tags :: ClusterParameterGroup -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Value Text
parameterGroupFamily :: Value Text
parameterGroupName :: Maybe (Value Text)
parameters :: Maybe [ParameterProperty]
tags :: Maybe [Tag]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Redshift::ClusterParameterGroup",
         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
"Description" 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
description,
                            Key
"ParameterGroupFamily" 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
parameterGroupFamily]
                           ([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
"ParameterGroupName" (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)
parameterGroupName,
                               Key -> [ParameterProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Parameters" ([ParameterProperty] -> (Key, Value))
-> Maybe [ParameterProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ParameterProperty]
parameters,
                               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 ClusterParameterGroup where
  toJSON :: ClusterParameterGroup -> Value
toJSON ClusterParameterGroup {Maybe [Tag]
Maybe [ParameterProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ClusterParameterGroup -> ()
description :: ClusterParameterGroup -> Value Text
parameterGroupFamily :: ClusterParameterGroup -> Value Text
parameterGroupName :: ClusterParameterGroup -> Maybe (Value Text)
parameters :: ClusterParameterGroup -> Maybe [ParameterProperty]
tags :: ClusterParameterGroup -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Value Text
parameterGroupFamily :: Value Text
parameterGroupName :: Maybe (Value Text)
parameters :: Maybe [ParameterProperty]
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
"Description" 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
description,
               Key
"ParameterGroupFamily" 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
parameterGroupFamily]
              ([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
"ParameterGroupName" (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)
parameterGroupName,
                  Key -> [ParameterProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Parameters" ([ParameterProperty] -> (Key, Value))
-> Maybe [ParameterProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ParameterProperty]
parameters,
                  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 "Description" ClusterParameterGroup where
  type PropertyType "Description" ClusterParameterGroup = Value Prelude.Text
  set :: PropertyType "Description" ClusterParameterGroup
-> ClusterParameterGroup -> ClusterParameterGroup
set PropertyType "Description" ClusterParameterGroup
newValue ClusterParameterGroup {Maybe [Tag]
Maybe [ParameterProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ClusterParameterGroup -> ()
description :: ClusterParameterGroup -> Value Text
parameterGroupFamily :: ClusterParameterGroup -> Value Text
parameterGroupName :: ClusterParameterGroup -> Maybe (Value Text)
parameters :: ClusterParameterGroup -> Maybe [ParameterProperty]
tags :: ClusterParameterGroup -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Value Text
parameterGroupFamily :: Value Text
parameterGroupName :: Maybe (Value Text)
parameters :: Maybe [ParameterProperty]
tags :: Maybe [Tag]
..}
    = ClusterParameterGroup {description :: Value Text
description = PropertyType "Description" ClusterParameterGroup
Value Text
newValue, Maybe [Tag]
Maybe [ParameterProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
parameterGroupFamily :: Value Text
parameterGroupName :: Maybe (Value Text)
parameters :: Maybe [ParameterProperty]
tags :: Maybe [Tag]
haddock_workaround_ :: ()
parameterGroupFamily :: Value Text
parameterGroupName :: Maybe (Value Text)
parameters :: Maybe [ParameterProperty]
tags :: Maybe [Tag]
..}
instance Property "ParameterGroupFamily" ClusterParameterGroup where
  type PropertyType "ParameterGroupFamily" ClusterParameterGroup = Value Prelude.Text
  set :: PropertyType "ParameterGroupFamily" ClusterParameterGroup
-> ClusterParameterGroup -> ClusterParameterGroup
set PropertyType "ParameterGroupFamily" ClusterParameterGroup
newValue ClusterParameterGroup {Maybe [Tag]
Maybe [ParameterProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ClusterParameterGroup -> ()
description :: ClusterParameterGroup -> Value Text
parameterGroupFamily :: ClusterParameterGroup -> Value Text
parameterGroupName :: ClusterParameterGroup -> Maybe (Value Text)
parameters :: ClusterParameterGroup -> Maybe [ParameterProperty]
tags :: ClusterParameterGroup -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Value Text
parameterGroupFamily :: Value Text
parameterGroupName :: Maybe (Value Text)
parameters :: Maybe [ParameterProperty]
tags :: Maybe [Tag]
..}
    = ClusterParameterGroup {parameterGroupFamily :: Value Text
parameterGroupFamily = PropertyType "ParameterGroupFamily" ClusterParameterGroup
Value Text
newValue, Maybe [Tag]
Maybe [ParameterProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Value Text
parameterGroupName :: Maybe (Value Text)
parameters :: Maybe [ParameterProperty]
tags :: Maybe [Tag]
haddock_workaround_ :: ()
description :: Value Text
parameterGroupName :: Maybe (Value Text)
parameters :: Maybe [ParameterProperty]
tags :: Maybe [Tag]
..}
instance Property "ParameterGroupName" ClusterParameterGroup where
  type PropertyType "ParameterGroupName" ClusterParameterGroup = Value Prelude.Text
  set :: PropertyType "ParameterGroupName" ClusterParameterGroup
-> ClusterParameterGroup -> ClusterParameterGroup
set PropertyType "ParameterGroupName" ClusterParameterGroup
newValue ClusterParameterGroup {Maybe [Tag]
Maybe [ParameterProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ClusterParameterGroup -> ()
description :: ClusterParameterGroup -> Value Text
parameterGroupFamily :: ClusterParameterGroup -> Value Text
parameterGroupName :: ClusterParameterGroup -> Maybe (Value Text)
parameters :: ClusterParameterGroup -> Maybe [ParameterProperty]
tags :: ClusterParameterGroup -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Value Text
parameterGroupFamily :: Value Text
parameterGroupName :: Maybe (Value Text)
parameters :: Maybe [ParameterProperty]
tags :: Maybe [Tag]
..}
    = ClusterParameterGroup
        {parameterGroupName :: Maybe (Value Text)
parameterGroupName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ParameterGroupName" ClusterParameterGroup
Value Text
newValue, Maybe [Tag]
Maybe [ParameterProperty]
()
Value Text
haddock_workaround_ :: ()
description :: Value Text
parameterGroupFamily :: Value Text
parameters :: Maybe [ParameterProperty]
tags :: Maybe [Tag]
haddock_workaround_ :: ()
description :: Value Text
parameterGroupFamily :: Value Text
parameters :: Maybe [ParameterProperty]
tags :: Maybe [Tag]
..}
instance Property "Parameters" ClusterParameterGroup where
  type PropertyType "Parameters" ClusterParameterGroup = [ParameterProperty]
  set :: PropertyType "Parameters" ClusterParameterGroup
-> ClusterParameterGroup -> ClusterParameterGroup
set PropertyType "Parameters" ClusterParameterGroup
newValue ClusterParameterGroup {Maybe [Tag]
Maybe [ParameterProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ClusterParameterGroup -> ()
description :: ClusterParameterGroup -> Value Text
parameterGroupFamily :: ClusterParameterGroup -> Value Text
parameterGroupName :: ClusterParameterGroup -> Maybe (Value Text)
parameters :: ClusterParameterGroup -> Maybe [ParameterProperty]
tags :: ClusterParameterGroup -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Value Text
parameterGroupFamily :: Value Text
parameterGroupName :: Maybe (Value Text)
parameters :: Maybe [ParameterProperty]
tags :: Maybe [Tag]
..}
    = ClusterParameterGroup {parameters :: Maybe [ParameterProperty]
parameters = [ParameterProperty] -> Maybe [ParameterProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [ParameterProperty]
PropertyType "Parameters" ClusterParameterGroup
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Value Text
parameterGroupFamily :: Value Text
parameterGroupName :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
description :: Value Text
parameterGroupFamily :: Value Text
parameterGroupName :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "Tags" ClusterParameterGroup where
  type PropertyType "Tags" ClusterParameterGroup = [Tag]
  set :: PropertyType "Tags" ClusterParameterGroup
-> ClusterParameterGroup -> ClusterParameterGroup
set PropertyType "Tags" ClusterParameterGroup
newValue ClusterParameterGroup {Maybe [Tag]
Maybe [ParameterProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ClusterParameterGroup -> ()
description :: ClusterParameterGroup -> Value Text
parameterGroupFamily :: ClusterParameterGroup -> Value Text
parameterGroupName :: ClusterParameterGroup -> Maybe (Value Text)
parameters :: ClusterParameterGroup -> Maybe [ParameterProperty]
tags :: ClusterParameterGroup -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Value Text
parameterGroupFamily :: Value Text
parameterGroupName :: Maybe (Value Text)
parameters :: Maybe [ParameterProperty]
tags :: Maybe [Tag]
..}
    = ClusterParameterGroup {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" ClusterParameterGroup
newValue, Maybe [ParameterProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Value Text
parameterGroupFamily :: Value Text
parameterGroupName :: Maybe (Value Text)
parameters :: Maybe [ParameterProperty]
haddock_workaround_ :: ()
description :: Value Text
parameterGroupFamily :: Value Text
parameterGroupName :: Maybe (Value Text)
parameters :: Maybe [ParameterProperty]
..}