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