module Stratosphere.DocDB.DBSubnetGroup (
        DBSubnetGroup(..), mkDBSubnetGroup
    ) 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 DBSubnetGroup
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbsubnetgroup.html>
    DBSubnetGroup {DBSubnetGroup -> ()
haddock_workaround_ :: (),
                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbsubnetgroup.html#cfn-docdb-dbsubnetgroup-dbsubnetgroupdescription>
                   DBSubnetGroup -> Value Text
dBSubnetGroupDescription :: (Value Prelude.Text),
                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbsubnetgroup.html#cfn-docdb-dbsubnetgroup-dbsubnetgroupname>
                   DBSubnetGroup -> Maybe (Value Text)
dBSubnetGroupName :: (Prelude.Maybe (Value Prelude.Text)),
                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbsubnetgroup.html#cfn-docdb-dbsubnetgroup-subnetids>
                   DBSubnetGroup -> ValueList Text
subnetIds :: (ValueList Prelude.Text),
                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbsubnetgroup.html#cfn-docdb-dbsubnetgroup-tags>
                   DBSubnetGroup -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
  deriving stock (DBSubnetGroup -> DBSubnetGroup -> Bool
(DBSubnetGroup -> DBSubnetGroup -> Bool)
-> (DBSubnetGroup -> DBSubnetGroup -> Bool) -> Eq DBSubnetGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DBSubnetGroup -> DBSubnetGroup -> Bool
== :: DBSubnetGroup -> DBSubnetGroup -> Bool
$c/= :: DBSubnetGroup -> DBSubnetGroup -> Bool
/= :: DBSubnetGroup -> DBSubnetGroup -> Bool
Prelude.Eq, Int -> DBSubnetGroup -> ShowS
[DBSubnetGroup] -> ShowS
DBSubnetGroup -> String
(Int -> DBSubnetGroup -> ShowS)
-> (DBSubnetGroup -> String)
-> ([DBSubnetGroup] -> ShowS)
-> Show DBSubnetGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DBSubnetGroup -> ShowS
showsPrec :: Int -> DBSubnetGroup -> ShowS
$cshow :: DBSubnetGroup -> String
show :: DBSubnetGroup -> String
$cshowList :: [DBSubnetGroup] -> ShowS
showList :: [DBSubnetGroup] -> ShowS
Prelude.Show)
mkDBSubnetGroup ::
  Value Prelude.Text -> ValueList Prelude.Text -> DBSubnetGroup
mkDBSubnetGroup :: Value Text -> ValueList Text -> DBSubnetGroup
mkDBSubnetGroup Value Text
dBSubnetGroupDescription ValueList Text
subnetIds
  = DBSubnetGroup
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       dBSubnetGroupDescription :: Value Text
dBSubnetGroupDescription = Value Text
dBSubnetGroupDescription,
       subnetIds :: ValueList Text
subnetIds = ValueList Text
subnetIds, dBSubnetGroupName :: Maybe (Value Text)
dBSubnetGroupName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties DBSubnetGroup where
  toResourceProperties :: DBSubnetGroup -> ResourceProperties
toResourceProperties DBSubnetGroup {Maybe [Tag]
Maybe (Value Text)
()
ValueList Text
Value Text
haddock_workaround_ :: DBSubnetGroup -> ()
dBSubnetGroupDescription :: DBSubnetGroup -> Value Text
dBSubnetGroupName :: DBSubnetGroup -> Maybe (Value Text)
subnetIds :: DBSubnetGroup -> ValueList Text
tags :: DBSubnetGroup -> Maybe [Tag]
haddock_workaround_ :: ()
dBSubnetGroupDescription :: Value Text
dBSubnetGroupName :: Maybe (Value Text)
subnetIds :: ValueList Text
tags :: Maybe [Tag]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::DocDB::DBSubnetGroup",
         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
"DBSubnetGroupDescription" 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
dBSubnetGroupDescription,
                            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
"DBSubnetGroupName" (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)
dBSubnetGroupName,
                               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 DBSubnetGroup where
  toJSON :: DBSubnetGroup -> Value
toJSON DBSubnetGroup {Maybe [Tag]
Maybe (Value Text)
()
ValueList Text
Value Text
haddock_workaround_ :: DBSubnetGroup -> ()
dBSubnetGroupDescription :: DBSubnetGroup -> Value Text
dBSubnetGroupName :: DBSubnetGroup -> Maybe (Value Text)
subnetIds :: DBSubnetGroup -> ValueList Text
tags :: DBSubnetGroup -> Maybe [Tag]
haddock_workaround_ :: ()
dBSubnetGroupDescription :: Value Text
dBSubnetGroupName :: Maybe (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
"DBSubnetGroupDescription" 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
dBSubnetGroupDescription,
               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
"DBSubnetGroupName" (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)
dBSubnetGroupName,
                  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 "DBSubnetGroupDescription" DBSubnetGroup where
  type PropertyType "DBSubnetGroupDescription" DBSubnetGroup = Value Prelude.Text
  set :: PropertyType "DBSubnetGroupDescription" DBSubnetGroup
-> DBSubnetGroup -> DBSubnetGroup
set PropertyType "DBSubnetGroupDescription" DBSubnetGroup
newValue DBSubnetGroup {Maybe [Tag]
Maybe (Value Text)
()
ValueList Text
Value Text
haddock_workaround_ :: DBSubnetGroup -> ()
dBSubnetGroupDescription :: DBSubnetGroup -> Value Text
dBSubnetGroupName :: DBSubnetGroup -> Maybe (Value Text)
subnetIds :: DBSubnetGroup -> ValueList Text
tags :: DBSubnetGroup -> Maybe [Tag]
haddock_workaround_ :: ()
dBSubnetGroupDescription :: Value Text
dBSubnetGroupName :: Maybe (Value Text)
subnetIds :: ValueList Text
tags :: Maybe [Tag]
..}
    = DBSubnetGroup {dBSubnetGroupDescription :: Value Text
dBSubnetGroupDescription = PropertyType "DBSubnetGroupDescription" DBSubnetGroup
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
ValueList Text
haddock_workaround_ :: ()
dBSubnetGroupName :: Maybe (Value Text)
subnetIds :: ValueList Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
dBSubnetGroupName :: Maybe (Value Text)
subnetIds :: ValueList Text
tags :: Maybe [Tag]
..}
instance Property "DBSubnetGroupName" DBSubnetGroup where
  type PropertyType "DBSubnetGroupName" DBSubnetGroup = Value Prelude.Text
  set :: PropertyType "DBSubnetGroupName" DBSubnetGroup
-> DBSubnetGroup -> DBSubnetGroup
set PropertyType "DBSubnetGroupName" DBSubnetGroup
newValue DBSubnetGroup {Maybe [Tag]
Maybe (Value Text)
()
ValueList Text
Value Text
haddock_workaround_ :: DBSubnetGroup -> ()
dBSubnetGroupDescription :: DBSubnetGroup -> Value Text
dBSubnetGroupName :: DBSubnetGroup -> Maybe (Value Text)
subnetIds :: DBSubnetGroup -> ValueList Text
tags :: DBSubnetGroup -> Maybe [Tag]
haddock_workaround_ :: ()
dBSubnetGroupDescription :: Value Text
dBSubnetGroupName :: Maybe (Value Text)
subnetIds :: ValueList Text
tags :: Maybe [Tag]
..}
    = DBSubnetGroup {dBSubnetGroupName :: Maybe (Value Text)
dBSubnetGroupName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DBSubnetGroupName" DBSubnetGroup
Value Text
newValue, Maybe [Tag]
()
ValueList Text
Value Text
haddock_workaround_ :: ()
dBSubnetGroupDescription :: Value Text
subnetIds :: ValueList Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
dBSubnetGroupDescription :: Value Text
subnetIds :: ValueList Text
tags :: Maybe [Tag]
..}
instance Property "SubnetIds" DBSubnetGroup where
  type PropertyType "SubnetIds" DBSubnetGroup = ValueList Prelude.Text
  set :: PropertyType "SubnetIds" DBSubnetGroup
-> DBSubnetGroup -> DBSubnetGroup
set PropertyType "SubnetIds" DBSubnetGroup
newValue DBSubnetGroup {Maybe [Tag]
Maybe (Value Text)
()
ValueList Text
Value Text
haddock_workaround_ :: DBSubnetGroup -> ()
dBSubnetGroupDescription :: DBSubnetGroup -> Value Text
dBSubnetGroupName :: DBSubnetGroup -> Maybe (Value Text)
subnetIds :: DBSubnetGroup -> ValueList Text
tags :: DBSubnetGroup -> Maybe [Tag]
haddock_workaround_ :: ()
dBSubnetGroupDescription :: Value Text
dBSubnetGroupName :: Maybe (Value Text)
subnetIds :: ValueList Text
tags :: Maybe [Tag]
..}
    = DBSubnetGroup {subnetIds :: ValueList Text
subnetIds = PropertyType "SubnetIds" DBSubnetGroup
ValueList Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
dBSubnetGroupDescription :: Value Text
dBSubnetGroupName :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
dBSubnetGroupDescription :: Value Text
dBSubnetGroupName :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "Tags" DBSubnetGroup where
  type PropertyType "Tags" DBSubnetGroup = [Tag]
  set :: PropertyType "Tags" DBSubnetGroup -> DBSubnetGroup -> DBSubnetGroup
set PropertyType "Tags" DBSubnetGroup
newValue DBSubnetGroup {Maybe [Tag]
Maybe (Value Text)
()
ValueList Text
Value Text
haddock_workaround_ :: DBSubnetGroup -> ()
dBSubnetGroupDescription :: DBSubnetGroup -> Value Text
dBSubnetGroupName :: DBSubnetGroup -> Maybe (Value Text)
subnetIds :: DBSubnetGroup -> ValueList Text
tags :: DBSubnetGroup -> Maybe [Tag]
haddock_workaround_ :: ()
dBSubnetGroupDescription :: Value Text
dBSubnetGroupName :: Maybe (Value Text)
subnetIds :: ValueList Text
tags :: Maybe [Tag]
..}
    = DBSubnetGroup {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" DBSubnetGroup
newValue, Maybe (Value Text)
()
ValueList Text
Value Text
haddock_workaround_ :: ()
dBSubnetGroupDescription :: Value Text
dBSubnetGroupName :: Maybe (Value Text)
subnetIds :: ValueList Text
haddock_workaround_ :: ()
dBSubnetGroupDescription :: Value Text
dBSubnetGroupName :: Maybe (Value Text)
subnetIds :: ValueList Text
..}