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