module Stratosphere.GlobalAccelerator.CrossAccountAttachment (
module Exports, CrossAccountAttachment(..),
mkCrossAccountAttachment
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.GlobalAccelerator.CrossAccountAttachment.ResourceProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data CrossAccountAttachment
=
CrossAccountAttachment {CrossAccountAttachment -> ()
haddock_workaround_ :: (),
CrossAccountAttachment -> Value Text
name :: (Value Prelude.Text),
CrossAccountAttachment -> Maybe (ValueList Text)
principals :: (Prelude.Maybe (ValueList Prelude.Text)),
CrossAccountAttachment -> Maybe [ResourceProperty]
resources :: (Prelude.Maybe [ResourceProperty]),
CrossAccountAttachment -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
deriving stock (CrossAccountAttachment -> CrossAccountAttachment -> Bool
(CrossAccountAttachment -> CrossAccountAttachment -> Bool)
-> (CrossAccountAttachment -> CrossAccountAttachment -> Bool)
-> Eq CrossAccountAttachment
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CrossAccountAttachment -> CrossAccountAttachment -> Bool
== :: CrossAccountAttachment -> CrossAccountAttachment -> Bool
$c/= :: CrossAccountAttachment -> CrossAccountAttachment -> Bool
/= :: CrossAccountAttachment -> CrossAccountAttachment -> Bool
Prelude.Eq, Int -> CrossAccountAttachment -> ShowS
[CrossAccountAttachment] -> ShowS
CrossAccountAttachment -> String
(Int -> CrossAccountAttachment -> ShowS)
-> (CrossAccountAttachment -> String)
-> ([CrossAccountAttachment] -> ShowS)
-> Show CrossAccountAttachment
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CrossAccountAttachment -> ShowS
showsPrec :: Int -> CrossAccountAttachment -> ShowS
$cshow :: CrossAccountAttachment -> String
show :: CrossAccountAttachment -> String
$cshowList :: [CrossAccountAttachment] -> ShowS
showList :: [CrossAccountAttachment] -> ShowS
Prelude.Show)
mkCrossAccountAttachment ::
Value Prelude.Text -> CrossAccountAttachment
mkCrossAccountAttachment :: Value Text -> CrossAccountAttachment
mkCrossAccountAttachment Value Text
name
= CrossAccountAttachment
{haddock_workaround_ :: ()
haddock_workaround_ = (), name :: Value Text
name = Value Text
name,
principals :: Maybe (ValueList Text)
principals = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing, resources :: Maybe [ResourceProperty]
resources = Maybe [ResourceProperty]
forall a. Maybe a
Prelude.Nothing,
tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CrossAccountAttachment where
toResourceProperties :: CrossAccountAttachment -> ResourceProperties
toResourceProperties CrossAccountAttachment {Maybe [Tag]
Maybe [ResourceProperty]
Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: CrossAccountAttachment -> ()
name :: CrossAccountAttachment -> Value Text
principals :: CrossAccountAttachment -> Maybe (ValueList Text)
resources :: CrossAccountAttachment -> Maybe [ResourceProperty]
tags :: CrossAccountAttachment -> Maybe [Tag]
haddock_workaround_ :: ()
name :: Value Text
principals :: Maybe (ValueList Text)
resources :: Maybe [ResourceProperty]
tags :: Maybe [Tag]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::GlobalAccelerator::CrossAccountAttachment",
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]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[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
"Principals" (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)
principals,
Key -> [ResourceProperty] -> (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" ([ResourceProperty] -> (Key, Value))
-> Maybe [ResourceProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ResourceProperty]
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 CrossAccountAttachment where
toJSON :: CrossAccountAttachment -> Value
toJSON CrossAccountAttachment {Maybe [Tag]
Maybe [ResourceProperty]
Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: CrossAccountAttachment -> ()
name :: CrossAccountAttachment -> Value Text
principals :: CrossAccountAttachment -> Maybe (ValueList Text)
resources :: CrossAccountAttachment -> Maybe [ResourceProperty]
tags :: CrossAccountAttachment -> Maybe [Tag]
haddock_workaround_ :: ()
name :: Value Text
principals :: Maybe (ValueList Text)
resources :: Maybe [ResourceProperty]
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]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[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
"Principals" (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)
principals,
Key -> [ResourceProperty] -> (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" ([ResourceProperty] -> (Key, Value))
-> Maybe [ResourceProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ResourceProperty]
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 "Name" CrossAccountAttachment where
type PropertyType "Name" CrossAccountAttachment = Value Prelude.Text
set :: PropertyType "Name" CrossAccountAttachment
-> CrossAccountAttachment -> CrossAccountAttachment
set PropertyType "Name" CrossAccountAttachment
newValue CrossAccountAttachment {Maybe [Tag]
Maybe [ResourceProperty]
Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: CrossAccountAttachment -> ()
name :: CrossAccountAttachment -> Value Text
principals :: CrossAccountAttachment -> Maybe (ValueList Text)
resources :: CrossAccountAttachment -> Maybe [ResourceProperty]
tags :: CrossAccountAttachment -> Maybe [Tag]
haddock_workaround_ :: ()
name :: Value Text
principals :: Maybe (ValueList Text)
resources :: Maybe [ResourceProperty]
tags :: Maybe [Tag]
..}
= CrossAccountAttachment {name :: Value Text
name = PropertyType "Name" CrossAccountAttachment
Value Text
newValue, Maybe [Tag]
Maybe [ResourceProperty]
Maybe (ValueList Text)
()
haddock_workaround_ :: ()
principals :: Maybe (ValueList Text)
resources :: Maybe [ResourceProperty]
tags :: Maybe [Tag]
haddock_workaround_ :: ()
principals :: Maybe (ValueList Text)
resources :: Maybe [ResourceProperty]
tags :: Maybe [Tag]
..}
instance Property "Principals" CrossAccountAttachment where
type PropertyType "Principals" CrossAccountAttachment = ValueList Prelude.Text
set :: PropertyType "Principals" CrossAccountAttachment
-> CrossAccountAttachment -> CrossAccountAttachment
set PropertyType "Principals" CrossAccountAttachment
newValue CrossAccountAttachment {Maybe [Tag]
Maybe [ResourceProperty]
Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: CrossAccountAttachment -> ()
name :: CrossAccountAttachment -> Value Text
principals :: CrossAccountAttachment -> Maybe (ValueList Text)
resources :: CrossAccountAttachment -> Maybe [ResourceProperty]
tags :: CrossAccountAttachment -> Maybe [Tag]
haddock_workaround_ :: ()
name :: Value Text
principals :: Maybe (ValueList Text)
resources :: Maybe [ResourceProperty]
tags :: Maybe [Tag]
..}
= CrossAccountAttachment {principals :: Maybe (ValueList Text)
principals = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Principals" CrossAccountAttachment
ValueList Text
newValue, Maybe [Tag]
Maybe [ResourceProperty]
()
Value Text
haddock_workaround_ :: ()
name :: Value Text
resources :: Maybe [ResourceProperty]
tags :: Maybe [Tag]
haddock_workaround_ :: ()
name :: Value Text
resources :: Maybe [ResourceProperty]
tags :: Maybe [Tag]
..}
instance Property "Resources" CrossAccountAttachment where
type PropertyType "Resources" CrossAccountAttachment = [ResourceProperty]
set :: PropertyType "Resources" CrossAccountAttachment
-> CrossAccountAttachment -> CrossAccountAttachment
set PropertyType "Resources" CrossAccountAttachment
newValue CrossAccountAttachment {Maybe [Tag]
Maybe [ResourceProperty]
Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: CrossAccountAttachment -> ()
name :: CrossAccountAttachment -> Value Text
principals :: CrossAccountAttachment -> Maybe (ValueList Text)
resources :: CrossAccountAttachment -> Maybe [ResourceProperty]
tags :: CrossAccountAttachment -> Maybe [Tag]
haddock_workaround_ :: ()
name :: Value Text
principals :: Maybe (ValueList Text)
resources :: Maybe [ResourceProperty]
tags :: Maybe [Tag]
..}
= CrossAccountAttachment {resources :: Maybe [ResourceProperty]
resources = [ResourceProperty] -> Maybe [ResourceProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [ResourceProperty]
PropertyType "Resources" CrossAccountAttachment
newValue, Maybe [Tag]
Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: ()
name :: Value Text
principals :: Maybe (ValueList Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
name :: Value Text
principals :: Maybe (ValueList Text)
tags :: Maybe [Tag]
..}
instance Property "Tags" CrossAccountAttachment where
type PropertyType "Tags" CrossAccountAttachment = [Tag]
set :: PropertyType "Tags" CrossAccountAttachment
-> CrossAccountAttachment -> CrossAccountAttachment
set PropertyType "Tags" CrossAccountAttachment
newValue CrossAccountAttachment {Maybe [Tag]
Maybe [ResourceProperty]
Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: CrossAccountAttachment -> ()
name :: CrossAccountAttachment -> Value Text
principals :: CrossAccountAttachment -> Maybe (ValueList Text)
resources :: CrossAccountAttachment -> Maybe [ResourceProperty]
tags :: CrossAccountAttachment -> Maybe [Tag]
haddock_workaround_ :: ()
name :: Value Text
principals :: Maybe (ValueList Text)
resources :: Maybe [ResourceProperty]
tags :: Maybe [Tag]
..}
= CrossAccountAttachment {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" CrossAccountAttachment
newValue, Maybe [ResourceProperty]
Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: ()
name :: Value Text
principals :: Maybe (ValueList Text)
resources :: Maybe [ResourceProperty]
haddock_workaround_ :: ()
name :: Value Text
principals :: Maybe (ValueList Text)
resources :: Maybe [ResourceProperty]
..}