module Stratosphere.FMS.ResourceSet (
        ResourceSet(..), mkResourceSet
    ) 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 ResourceSet
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-fms-resourceset.html>
    ResourceSet {ResourceSet -> ()
haddock_workaround_ :: (),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-fms-resourceset.html#cfn-fms-resourceset-description>
                 ResourceSet -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-fms-resourceset.html#cfn-fms-resourceset-name>
                 ResourceSet -> Value Text
name :: (Value Prelude.Text),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-fms-resourceset.html#cfn-fms-resourceset-resourcetypelist>
                 ResourceSet -> ValueList Text
resourceTypeList :: (ValueList Prelude.Text),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-fms-resourceset.html#cfn-fms-resourceset-resources>
                 ResourceSet -> Maybe (ValueList Text)
resources :: (Prelude.Maybe (ValueList Prelude.Text)),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-fms-resourceset.html#cfn-fms-resourceset-tags>
                 ResourceSet -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
  deriving stock (ResourceSet -> ResourceSet -> Bool
(ResourceSet -> ResourceSet -> Bool)
-> (ResourceSet -> ResourceSet -> Bool) -> Eq ResourceSet
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ResourceSet -> ResourceSet -> Bool
== :: ResourceSet -> ResourceSet -> Bool
$c/= :: ResourceSet -> ResourceSet -> Bool
/= :: ResourceSet -> ResourceSet -> Bool
Prelude.Eq, Int -> ResourceSet -> ShowS
[ResourceSet] -> ShowS
ResourceSet -> String
(Int -> ResourceSet -> ShowS)
-> (ResourceSet -> String)
-> ([ResourceSet] -> ShowS)
-> Show ResourceSet
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ResourceSet -> ShowS
showsPrec :: Int -> ResourceSet -> ShowS
$cshow :: ResourceSet -> String
show :: ResourceSet -> String
$cshowList :: [ResourceSet] -> ShowS
showList :: [ResourceSet] -> ShowS
Prelude.Show)
mkResourceSet ::
  Value Prelude.Text -> ValueList Prelude.Text -> ResourceSet
mkResourceSet :: Value Text -> ValueList Text -> ResourceSet
mkResourceSet Value Text
name ValueList Text
resourceTypeList
  = ResourceSet
      {haddock_workaround_ :: ()
haddock_workaround_ = (), name :: Value Text
name = Value Text
name,
       resourceTypeList :: ValueList Text
resourceTypeList = ValueList Text
resourceTypeList, description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       resources :: Maybe (ValueList Text)
resources = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing, tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ResourceSet where
  toResourceProperties :: ResourceSet -> ResourceProperties
toResourceProperties ResourceSet {Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Text)
()
ValueList Text
Value Text
haddock_workaround_ :: ResourceSet -> ()
description :: ResourceSet -> Maybe (Value Text)
name :: ResourceSet -> Value Text
resourceTypeList :: ResourceSet -> ValueList Text
resources :: ResourceSet -> Maybe (ValueList Text)
tags :: ResourceSet -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
resourceTypeList :: ValueList Text
resources :: Maybe (ValueList Text)
tags :: Maybe [Tag]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::FMS::ResourceSet", 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
"Name" 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
name, Key
"ResourceTypeList" 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
resourceTypeList]
                           ([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 -> 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..=) Key
"Resources" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
resources,
                               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 ResourceSet where
  toJSON :: ResourceSet -> Value
toJSON ResourceSet {Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Text)
()
ValueList Text
Value Text
haddock_workaround_ :: ResourceSet -> ()
description :: ResourceSet -> Maybe (Value Text)
name :: ResourceSet -> Value Text
resourceTypeList :: ResourceSet -> ValueList Text
resources :: ResourceSet -> Maybe (ValueList Text)
tags :: ResourceSet -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
resourceTypeList :: ValueList Text
resources :: Maybe (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
"Name" 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
name, Key
"ResourceTypeList" 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
resourceTypeList]
              ([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 -> 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..=) Key
"Resources" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
resources,
                  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" ResourceSet where
  type PropertyType "Description" ResourceSet = Value Prelude.Text
  set :: PropertyType "Description" ResourceSet
-> ResourceSet -> ResourceSet
set PropertyType "Description" ResourceSet
newValue ResourceSet {Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Text)
()
ValueList Text
Value Text
haddock_workaround_ :: ResourceSet -> ()
description :: ResourceSet -> Maybe (Value Text)
name :: ResourceSet -> Value Text
resourceTypeList :: ResourceSet -> ValueList Text
resources :: ResourceSet -> Maybe (ValueList Text)
tags :: ResourceSet -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
resourceTypeList :: ValueList Text
resources :: Maybe (ValueList Text)
tags :: Maybe [Tag]
..}
    = ResourceSet {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" ResourceSet
Value Text
newValue, Maybe [Tag]
Maybe (ValueList Text)
()
ValueList Text
Value Text
haddock_workaround_ :: ()
name :: Value Text
resourceTypeList :: ValueList Text
resources :: Maybe (ValueList Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
name :: Value Text
resourceTypeList :: ValueList Text
resources :: Maybe (ValueList Text)
tags :: Maybe [Tag]
..}
instance Property "Name" ResourceSet where
  type PropertyType "Name" ResourceSet = Value Prelude.Text
  set :: PropertyType "Name" ResourceSet -> ResourceSet -> ResourceSet
set PropertyType "Name" ResourceSet
newValue ResourceSet {Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Text)
()
ValueList Text
Value Text
haddock_workaround_ :: ResourceSet -> ()
description :: ResourceSet -> Maybe (Value Text)
name :: ResourceSet -> Value Text
resourceTypeList :: ResourceSet -> ValueList Text
resources :: ResourceSet -> Maybe (ValueList Text)
tags :: ResourceSet -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
resourceTypeList :: ValueList Text
resources :: Maybe (ValueList Text)
tags :: Maybe [Tag]
..} = ResourceSet {name :: Value Text
name = PropertyType "Name" ResourceSet
Value Text
newValue, Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Text)
()
ValueList Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
resourceTypeList :: ValueList Text
resources :: Maybe (ValueList Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
resourceTypeList :: ValueList Text
resources :: Maybe (ValueList Text)
tags :: Maybe [Tag]
..}
instance Property "ResourceTypeList" ResourceSet where
  type PropertyType "ResourceTypeList" ResourceSet = ValueList Prelude.Text
  set :: PropertyType "ResourceTypeList" ResourceSet
-> ResourceSet -> ResourceSet
set PropertyType "ResourceTypeList" ResourceSet
newValue ResourceSet {Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Text)
()
ValueList Text
Value Text
haddock_workaround_ :: ResourceSet -> ()
description :: ResourceSet -> Maybe (Value Text)
name :: ResourceSet -> Value Text
resourceTypeList :: ResourceSet -> ValueList Text
resources :: ResourceSet -> Maybe (ValueList Text)
tags :: ResourceSet -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
resourceTypeList :: ValueList Text
resources :: Maybe (ValueList Text)
tags :: Maybe [Tag]
..}
    = ResourceSet {resourceTypeList :: ValueList Text
resourceTypeList = PropertyType "ResourceTypeList" ResourceSet
ValueList Text
newValue, Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
resources :: Maybe (ValueList Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
resources :: Maybe (ValueList Text)
tags :: Maybe [Tag]
..}
instance Property "Resources" ResourceSet where
  type PropertyType "Resources" ResourceSet = ValueList Prelude.Text
  set :: PropertyType "Resources" ResourceSet -> ResourceSet -> ResourceSet
set PropertyType "Resources" ResourceSet
newValue ResourceSet {Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Text)
()
ValueList Text
Value Text
haddock_workaround_ :: ResourceSet -> ()
description :: ResourceSet -> Maybe (Value Text)
name :: ResourceSet -> Value Text
resourceTypeList :: ResourceSet -> ValueList Text
resources :: ResourceSet -> Maybe (ValueList Text)
tags :: ResourceSet -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
resourceTypeList :: ValueList Text
resources :: Maybe (ValueList Text)
tags :: Maybe [Tag]
..}
    = ResourceSet {resources :: Maybe (ValueList Text)
resources = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Resources" ResourceSet
ValueList Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
ValueList Text
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
resourceTypeList :: ValueList Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
resourceTypeList :: ValueList Text
tags :: Maybe [Tag]
..}
instance Property "Tags" ResourceSet where
  type PropertyType "Tags" ResourceSet = [Tag]
  set :: PropertyType "Tags" ResourceSet -> ResourceSet -> ResourceSet
set PropertyType "Tags" ResourceSet
newValue ResourceSet {Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Text)
()
ValueList Text
Value Text
haddock_workaround_ :: ResourceSet -> ()
description :: ResourceSet -> Maybe (Value Text)
name :: ResourceSet -> Value Text
resourceTypeList :: ResourceSet -> ValueList Text
resources :: ResourceSet -> Maybe (ValueList Text)
tags :: ResourceSet -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
resourceTypeList :: ValueList Text
resources :: Maybe (ValueList Text)
tags :: Maybe [Tag]
..}
    = ResourceSet {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" ResourceSet
newValue, Maybe (ValueList Text)
Maybe (Value Text)
()
ValueList Text
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
resourceTypeList :: ValueList Text
resources :: Maybe (ValueList Text)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
resourceTypeList :: ValueList Text
resources :: Maybe (ValueList Text)
..}