module Stratosphere.DAX.SubnetGroup (
        SubnetGroup(..), mkSubnetGroup
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data SubnetGroup
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dax-subnetgroup.html>
    SubnetGroup {SubnetGroup -> ()
haddock_workaround_ :: (),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dax-subnetgroup.html#cfn-dax-subnetgroup-description>
                 SubnetGroup -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dax-subnetgroup.html#cfn-dax-subnetgroup-subnetgroupname>
                 SubnetGroup -> Maybe (Value Text)
subnetGroupName :: (Prelude.Maybe (Value Prelude.Text)),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dax-subnetgroup.html#cfn-dax-subnetgroup-subnetids>
                 SubnetGroup -> ValueList Text
subnetIds :: (ValueList Prelude.Text)}
  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 :: ValueList Prelude.Text -> SubnetGroup
mkSubnetGroup :: ValueList Text -> SubnetGroup
mkSubnetGroup ValueList Text
subnetIds
  = SubnetGroup
      {haddock_workaround_ :: ()
haddock_workaround_ = (), subnetIds :: ValueList Text
subnetIds = ValueList Text
subnetIds,
       description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, subnetGroupName :: Maybe (Value Text)
subnetGroupName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties SubnetGroup where
  toResourceProperties :: SubnetGroup -> ResourceProperties
toResourceProperties SubnetGroup {Maybe (Value Text)
()
ValueList Text
haddock_workaround_ :: SubnetGroup -> ()
description :: SubnetGroup -> Maybe (Value Text)
subnetGroupName :: SubnetGroup -> Maybe (Value Text)
subnetIds :: SubnetGroup -> ValueList Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
subnetGroupName :: Maybe (Value Text)
subnetIds :: ValueList Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::DAX::SubnetGroup", supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         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
"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
"Description" (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)
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..=) Key
"SubnetGroupName" (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)
subnetGroupName]))}
instance JSON.ToJSON SubnetGroup where
  toJSON :: SubnetGroup -> Value
toJSON SubnetGroup {Maybe (Value Text)
()
ValueList Text
haddock_workaround_ :: SubnetGroup -> ()
description :: SubnetGroup -> Maybe (Value Text)
subnetGroupName :: SubnetGroup -> Maybe (Value Text)
subnetIds :: SubnetGroup -> ValueList Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
subnetGroupName :: Maybe (Value Text)
subnetIds :: ValueList Text
..}
    = [(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
"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
"Description" (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)
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..=) Key
"SubnetGroupName" (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)
subnetGroupName])))
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 (Value Text)
()
ValueList Text
haddock_workaround_ :: SubnetGroup -> ()
description :: SubnetGroup -> Maybe (Value Text)
subnetGroupName :: SubnetGroup -> Maybe (Value Text)
subnetIds :: SubnetGroup -> ValueList Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
subnetGroupName :: Maybe (Value Text)
subnetIds :: ValueList Text
..}
    = SubnetGroup {description :: Maybe (Value Text)
description = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Description" SubnetGroup
Value Text
newValue, Maybe (Value Text)
()
ValueList Text
haddock_workaround_ :: ()
subnetGroupName :: Maybe (Value Text)
subnetIds :: ValueList Text
haddock_workaround_ :: ()
subnetGroupName :: Maybe (Value Text)
subnetIds :: ValueList Text
..}
instance Property "SubnetGroupName" SubnetGroup where
  type PropertyType "SubnetGroupName" SubnetGroup = Value Prelude.Text
  set :: PropertyType "SubnetGroupName" SubnetGroup
-> SubnetGroup -> SubnetGroup
set PropertyType "SubnetGroupName" SubnetGroup
newValue SubnetGroup {Maybe (Value Text)
()
ValueList Text
haddock_workaround_ :: SubnetGroup -> ()
description :: SubnetGroup -> Maybe (Value Text)
subnetGroupName :: SubnetGroup -> Maybe (Value Text)
subnetIds :: SubnetGroup -> ValueList Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
subnetGroupName :: Maybe (Value Text)
subnetIds :: ValueList Text
..}
    = SubnetGroup {subnetGroupName :: Maybe (Value Text)
subnetGroupName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SubnetGroupName" SubnetGroup
Value Text
newValue, Maybe (Value Text)
()
ValueList Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
subnetIds :: ValueList Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
subnetIds :: ValueList Text
..}
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 (Value Text)
()
ValueList Text
haddock_workaround_ :: SubnetGroup -> ()
description :: SubnetGroup -> Maybe (Value Text)
subnetGroupName :: SubnetGroup -> Maybe (Value Text)
subnetIds :: SubnetGroup -> ValueList Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
subnetGroupName :: Maybe (Value Text)
subnetIds :: ValueList Text
..}
    = SubnetGroup {subnetIds :: ValueList Text
subnetIds = PropertyType "SubnetIds" SubnetGroup
ValueList Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
description :: Maybe (Value Text)
subnetGroupName :: Maybe (Value Text)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
subnetGroupName :: Maybe (Value Text)
..}