module Stratosphere.Redshift.ClusterSubnetGroup (
        ClusterSubnetGroup(..), mkClusterSubnetGroup
    ) 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 ClusterSubnetGroup
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-redshift-clustersubnetgroup.html>
    ClusterSubnetGroup {ClusterSubnetGroup -> ()
haddock_workaround_ :: (),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-redshift-clustersubnetgroup.html#cfn-redshift-clustersubnetgroup-description>
                        ClusterSubnetGroup -> Value Text
description :: (Value Prelude.Text),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-redshift-clustersubnetgroup.html#cfn-redshift-clustersubnetgroup-subnetids>
                        ClusterSubnetGroup -> ValueList Text
subnetIds :: (ValueList Prelude.Text),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-redshift-clustersubnetgroup.html#cfn-redshift-clustersubnetgroup-tags>
                        ClusterSubnetGroup -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
  deriving stock (ClusterSubnetGroup -> ClusterSubnetGroup -> Bool
(ClusterSubnetGroup -> ClusterSubnetGroup -> Bool)
-> (ClusterSubnetGroup -> ClusterSubnetGroup -> Bool)
-> Eq ClusterSubnetGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ClusterSubnetGroup -> ClusterSubnetGroup -> Bool
== :: ClusterSubnetGroup -> ClusterSubnetGroup -> Bool
$c/= :: ClusterSubnetGroup -> ClusterSubnetGroup -> Bool
/= :: ClusterSubnetGroup -> ClusterSubnetGroup -> Bool
Prelude.Eq, Int -> ClusterSubnetGroup -> ShowS
[ClusterSubnetGroup] -> ShowS
ClusterSubnetGroup -> String
(Int -> ClusterSubnetGroup -> ShowS)
-> (ClusterSubnetGroup -> String)
-> ([ClusterSubnetGroup] -> ShowS)
-> Show ClusterSubnetGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ClusterSubnetGroup -> ShowS
showsPrec :: Int -> ClusterSubnetGroup -> ShowS
$cshow :: ClusterSubnetGroup -> String
show :: ClusterSubnetGroup -> String
$cshowList :: [ClusterSubnetGroup] -> ShowS
showList :: [ClusterSubnetGroup] -> ShowS
Prelude.Show)
mkClusterSubnetGroup ::
  Value Prelude.Text -> ValueList Prelude.Text -> ClusterSubnetGroup
mkClusterSubnetGroup :: Value Text -> ValueList Text -> ClusterSubnetGroup
mkClusterSubnetGroup Value Text
description ValueList Text
subnetIds
  = ClusterSubnetGroup
      {haddock_workaround_ :: ()
haddock_workaround_ = (), description :: Value Text
description = Value Text
description,
       subnetIds :: ValueList Text
subnetIds = ValueList Text
subnetIds, tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ClusterSubnetGroup where
  toResourceProperties :: ClusterSubnetGroup -> ResourceProperties
toResourceProperties ClusterSubnetGroup {Maybe [Tag]
()
ValueList Text
Value Text
haddock_workaround_ :: ClusterSubnetGroup -> ()
description :: ClusterSubnetGroup -> Value Text
subnetIds :: ClusterSubnetGroup -> ValueList Text
tags :: ClusterSubnetGroup -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Value Text
subnetIds :: ValueList Text
tags :: Maybe [Tag]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Redshift::ClusterSubnetGroup",
         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
"SubnetIds" Key -> ValueList Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ValueList Text
subnetIds]
                           ([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 ClusterSubnetGroup where
  toJSON :: ClusterSubnetGroup -> Value
toJSON ClusterSubnetGroup {Maybe [Tag]
()
ValueList Text
Value Text
haddock_workaround_ :: ClusterSubnetGroup -> ()
description :: ClusterSubnetGroup -> Value Text
subnetIds :: ClusterSubnetGroup -> ValueList Text
tags :: ClusterSubnetGroup -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Value Text
subnetIds :: ValueList 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, Key
"SubnetIds" Key -> ValueList Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ValueList Text
subnetIds]
              ([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" ClusterSubnetGroup where
  type PropertyType "Description" ClusterSubnetGroup = Value Prelude.Text
  set :: PropertyType "Description" ClusterSubnetGroup
-> ClusterSubnetGroup -> ClusterSubnetGroup
set PropertyType "Description" ClusterSubnetGroup
newValue ClusterSubnetGroup {Maybe [Tag]
()
ValueList Text
Value Text
haddock_workaround_ :: ClusterSubnetGroup -> ()
description :: ClusterSubnetGroup -> Value Text
subnetIds :: ClusterSubnetGroup -> ValueList Text
tags :: ClusterSubnetGroup -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Value Text
subnetIds :: ValueList Text
tags :: Maybe [Tag]
..}
    = ClusterSubnetGroup {description :: Value Text
description = PropertyType "Description" ClusterSubnetGroup
Value Text
newValue, Maybe [Tag]
()
ValueList Text
haddock_workaround_ :: ()
subnetIds :: ValueList Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
subnetIds :: ValueList Text
tags :: Maybe [Tag]
..}
instance Property "SubnetIds" ClusterSubnetGroup where
  type PropertyType "SubnetIds" ClusterSubnetGroup = ValueList Prelude.Text
  set :: PropertyType "SubnetIds" ClusterSubnetGroup
-> ClusterSubnetGroup -> ClusterSubnetGroup
set PropertyType "SubnetIds" ClusterSubnetGroup
newValue ClusterSubnetGroup {Maybe [Tag]
()
ValueList Text
Value Text
haddock_workaround_ :: ClusterSubnetGroup -> ()
description :: ClusterSubnetGroup -> Value Text
subnetIds :: ClusterSubnetGroup -> ValueList Text
tags :: ClusterSubnetGroup -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Value Text
subnetIds :: ValueList Text
tags :: Maybe [Tag]
..}
    = ClusterSubnetGroup {subnetIds :: ValueList Text
subnetIds = PropertyType "SubnetIds" ClusterSubnetGroup
ValueList Text
newValue, Maybe [Tag]
()
Value Text
haddock_workaround_ :: ()
description :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
description :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Tags" ClusterSubnetGroup where
  type PropertyType "Tags" ClusterSubnetGroup = [Tag]
  set :: PropertyType "Tags" ClusterSubnetGroup
-> ClusterSubnetGroup -> ClusterSubnetGroup
set PropertyType "Tags" ClusterSubnetGroup
newValue ClusterSubnetGroup {Maybe [Tag]
()
ValueList Text
Value Text
haddock_workaround_ :: ClusterSubnetGroup -> ()
description :: ClusterSubnetGroup -> Value Text
subnetIds :: ClusterSubnetGroup -> ValueList Text
tags :: ClusterSubnetGroup -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Value Text
subnetIds :: ValueList Text
tags :: Maybe [Tag]
..}
    = ClusterSubnetGroup {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" ClusterSubnetGroup
newValue, ()
ValueList Text
Value Text
haddock_workaround_ :: ()
description :: Value Text
subnetIds :: ValueList Text
haddock_workaround_ :: ()
description :: Value Text
subnetIds :: ValueList Text
..}