module Stratosphere.Backup.Framework (
module Exports, Framework(..), mkFramework
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Backup.Framework.FrameworkControlProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data Framework
=
Framework {Framework -> ()
haddock_workaround_ :: (),
Framework -> [FrameworkControlProperty]
frameworkControls :: [FrameworkControlProperty],
Framework -> Maybe (Value Text)
frameworkDescription :: (Prelude.Maybe (Value Prelude.Text)),
Framework -> Maybe (Value Text)
frameworkName :: (Prelude.Maybe (Value Prelude.Text)),
Framework -> Maybe [Tag]
frameworkTags :: (Prelude.Maybe [Tag])}
deriving stock (Framework -> Framework -> Bool
(Framework -> Framework -> Bool)
-> (Framework -> Framework -> Bool) -> Eq Framework
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Framework -> Framework -> Bool
== :: Framework -> Framework -> Bool
$c/= :: Framework -> Framework -> Bool
/= :: Framework -> Framework -> Bool
Prelude.Eq, Int -> Framework -> ShowS
[Framework] -> ShowS
Framework -> String
(Int -> Framework -> ShowS)
-> (Framework -> String)
-> ([Framework] -> ShowS)
-> Show Framework
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Framework -> ShowS
showsPrec :: Int -> Framework -> ShowS
$cshow :: Framework -> String
show :: Framework -> String
$cshowList :: [Framework] -> ShowS
showList :: [Framework] -> ShowS
Prelude.Show)
mkFramework :: [FrameworkControlProperty] -> Framework
mkFramework :: [FrameworkControlProperty] -> Framework
mkFramework [FrameworkControlProperty]
frameworkControls
= Framework
{haddock_workaround_ :: ()
haddock_workaround_ = (), frameworkControls :: [FrameworkControlProperty]
frameworkControls = [FrameworkControlProperty]
frameworkControls,
frameworkDescription :: Maybe (Value Text)
frameworkDescription = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
frameworkName :: Maybe (Value Text)
frameworkName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, frameworkTags :: Maybe [Tag]
frameworkTags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Framework where
toResourceProperties :: Framework -> ResourceProperties
toResourceProperties Framework {[FrameworkControlProperty]
Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: Framework -> ()
frameworkControls :: Framework -> [FrameworkControlProperty]
frameworkDescription :: Framework -> Maybe (Value Text)
frameworkName :: Framework -> Maybe (Value Text)
frameworkTags :: Framework -> Maybe [Tag]
haddock_workaround_ :: ()
frameworkControls :: [FrameworkControlProperty]
frameworkDescription :: Maybe (Value Text)
frameworkName :: Maybe (Value Text)
frameworkTags :: Maybe [Tag]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Backup::Framework", 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
"FrameworkControls" Key -> [FrameworkControlProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [FrameworkControlProperty]
frameworkControls]
([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
"FrameworkDescription" (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)
frameworkDescription,
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
"FrameworkName" (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)
frameworkName,
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
"FrameworkTags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
frameworkTags]))}
instance JSON.ToJSON Framework where
toJSON :: Framework -> Value
toJSON Framework {[FrameworkControlProperty]
Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: Framework -> ()
frameworkControls :: Framework -> [FrameworkControlProperty]
frameworkDescription :: Framework -> Maybe (Value Text)
frameworkName :: Framework -> Maybe (Value Text)
frameworkTags :: Framework -> Maybe [Tag]
haddock_workaround_ :: ()
frameworkControls :: [FrameworkControlProperty]
frameworkDescription :: Maybe (Value Text)
frameworkName :: Maybe (Value Text)
frameworkTags :: 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
"FrameworkControls" Key -> [FrameworkControlProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [FrameworkControlProperty]
frameworkControls]
([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
"FrameworkDescription" (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)
frameworkDescription,
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
"FrameworkName" (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)
frameworkName,
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
"FrameworkTags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
frameworkTags])))
instance Property "FrameworkControls" Framework where
type PropertyType "FrameworkControls" Framework = [FrameworkControlProperty]
set :: PropertyType "FrameworkControls" Framework
-> Framework -> Framework
set PropertyType "FrameworkControls" Framework
newValue Framework {[FrameworkControlProperty]
Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: Framework -> ()
frameworkControls :: Framework -> [FrameworkControlProperty]
frameworkDescription :: Framework -> Maybe (Value Text)
frameworkName :: Framework -> Maybe (Value Text)
frameworkTags :: Framework -> Maybe [Tag]
haddock_workaround_ :: ()
frameworkControls :: [FrameworkControlProperty]
frameworkDescription :: Maybe (Value Text)
frameworkName :: Maybe (Value Text)
frameworkTags :: Maybe [Tag]
..}
= Framework {frameworkControls :: [FrameworkControlProperty]
frameworkControls = [FrameworkControlProperty]
PropertyType "FrameworkControls" Framework
newValue, Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: ()
frameworkDescription :: Maybe (Value Text)
frameworkName :: Maybe (Value Text)
frameworkTags :: Maybe [Tag]
haddock_workaround_ :: ()
frameworkDescription :: Maybe (Value Text)
frameworkName :: Maybe (Value Text)
frameworkTags :: Maybe [Tag]
..}
instance Property "FrameworkDescription" Framework where
type PropertyType "FrameworkDescription" Framework = Value Prelude.Text
set :: PropertyType "FrameworkDescription" Framework
-> Framework -> Framework
set PropertyType "FrameworkDescription" Framework
newValue Framework {[FrameworkControlProperty]
Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: Framework -> ()
frameworkControls :: Framework -> [FrameworkControlProperty]
frameworkDescription :: Framework -> Maybe (Value Text)
frameworkName :: Framework -> Maybe (Value Text)
frameworkTags :: Framework -> Maybe [Tag]
haddock_workaround_ :: ()
frameworkControls :: [FrameworkControlProperty]
frameworkDescription :: Maybe (Value Text)
frameworkName :: Maybe (Value Text)
frameworkTags :: Maybe [Tag]
..}
= Framework {frameworkDescription :: Maybe (Value Text)
frameworkDescription = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "FrameworkDescription" Framework
Value Text
newValue, [FrameworkControlProperty]
Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: ()
frameworkControls :: [FrameworkControlProperty]
frameworkName :: Maybe (Value Text)
frameworkTags :: Maybe [Tag]
haddock_workaround_ :: ()
frameworkControls :: [FrameworkControlProperty]
frameworkName :: Maybe (Value Text)
frameworkTags :: Maybe [Tag]
..}
instance Property "FrameworkName" Framework where
type PropertyType "FrameworkName" Framework = Value Prelude.Text
set :: PropertyType "FrameworkName" Framework -> Framework -> Framework
set PropertyType "FrameworkName" Framework
newValue Framework {[FrameworkControlProperty]
Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: Framework -> ()
frameworkControls :: Framework -> [FrameworkControlProperty]
frameworkDescription :: Framework -> Maybe (Value Text)
frameworkName :: Framework -> Maybe (Value Text)
frameworkTags :: Framework -> Maybe [Tag]
haddock_workaround_ :: ()
frameworkControls :: [FrameworkControlProperty]
frameworkDescription :: Maybe (Value Text)
frameworkName :: Maybe (Value Text)
frameworkTags :: Maybe [Tag]
..}
= Framework {frameworkName :: Maybe (Value Text)
frameworkName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "FrameworkName" Framework
Value Text
newValue, [FrameworkControlProperty]
Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: ()
frameworkControls :: [FrameworkControlProperty]
frameworkDescription :: Maybe (Value Text)
frameworkTags :: Maybe [Tag]
haddock_workaround_ :: ()
frameworkControls :: [FrameworkControlProperty]
frameworkDescription :: Maybe (Value Text)
frameworkTags :: Maybe [Tag]
..}
instance Property "FrameworkTags" Framework where
type PropertyType "FrameworkTags" Framework = [Tag]
set :: PropertyType "FrameworkTags" Framework -> Framework -> Framework
set PropertyType "FrameworkTags" Framework
newValue Framework {[FrameworkControlProperty]
Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: Framework -> ()
frameworkControls :: Framework -> [FrameworkControlProperty]
frameworkDescription :: Framework -> Maybe (Value Text)
frameworkName :: Framework -> Maybe (Value Text)
frameworkTags :: Framework -> Maybe [Tag]
haddock_workaround_ :: ()
frameworkControls :: [FrameworkControlProperty]
frameworkDescription :: Maybe (Value Text)
frameworkName :: Maybe (Value Text)
frameworkTags :: Maybe [Tag]
..}
= Framework {frameworkTags :: Maybe [Tag]
frameworkTags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "FrameworkTags" Framework
newValue, [FrameworkControlProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ()
frameworkControls :: [FrameworkControlProperty]
frameworkDescription :: Maybe (Value Text)
frameworkName :: Maybe (Value Text)
haddock_workaround_ :: ()
frameworkControls :: [FrameworkControlProperty]
frameworkDescription :: Maybe (Value Text)
frameworkName :: Maybe (Value Text)
..}