module Stratosphere.QuickSight.CustomPermissions (
module Exports, CustomPermissions(..), mkCustomPermissions
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.QuickSight.CustomPermissions.CapabilitiesProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data CustomPermissions
=
CustomPermissions {CustomPermissions -> ()
haddock_workaround_ :: (),
CustomPermissions -> Value Text
awsAccountId :: (Value Prelude.Text),
CustomPermissions -> Maybe CapabilitiesProperty
capabilities :: (Prelude.Maybe CapabilitiesProperty),
CustomPermissions -> Value Text
customPermissionsName :: (Value Prelude.Text),
CustomPermissions -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
deriving stock (CustomPermissions -> CustomPermissions -> Bool
(CustomPermissions -> CustomPermissions -> Bool)
-> (CustomPermissions -> CustomPermissions -> Bool)
-> Eq CustomPermissions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CustomPermissions -> CustomPermissions -> Bool
== :: CustomPermissions -> CustomPermissions -> Bool
$c/= :: CustomPermissions -> CustomPermissions -> Bool
/= :: CustomPermissions -> CustomPermissions -> Bool
Prelude.Eq, Int -> CustomPermissions -> ShowS
[CustomPermissions] -> ShowS
CustomPermissions -> String
(Int -> CustomPermissions -> ShowS)
-> (CustomPermissions -> String)
-> ([CustomPermissions] -> ShowS)
-> Show CustomPermissions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CustomPermissions -> ShowS
showsPrec :: Int -> CustomPermissions -> ShowS
$cshow :: CustomPermissions -> String
show :: CustomPermissions -> String
$cshowList :: [CustomPermissions] -> ShowS
showList :: [CustomPermissions] -> ShowS
Prelude.Show)
mkCustomPermissions ::
Value Prelude.Text -> Value Prelude.Text -> CustomPermissions
mkCustomPermissions :: Value Text -> Value Text -> CustomPermissions
mkCustomPermissions Value Text
awsAccountId Value Text
customPermissionsName
= CustomPermissions
{haddock_workaround_ :: ()
haddock_workaround_ = (), awsAccountId :: Value Text
awsAccountId = Value Text
awsAccountId,
customPermissionsName :: Value Text
customPermissionsName = Value Text
customPermissionsName,
capabilities :: Maybe CapabilitiesProperty
capabilities = Maybe CapabilitiesProperty
forall a. Maybe a
Prelude.Nothing, tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CustomPermissions where
toResourceProperties :: CustomPermissions -> ResourceProperties
toResourceProperties CustomPermissions {Maybe [Tag]
Maybe CapabilitiesProperty
()
Value Text
haddock_workaround_ :: CustomPermissions -> ()
awsAccountId :: CustomPermissions -> Value Text
capabilities :: CustomPermissions -> Maybe CapabilitiesProperty
customPermissionsName :: CustomPermissions -> Value Text
tags :: CustomPermissions -> Maybe [Tag]
haddock_workaround_ :: ()
awsAccountId :: Value Text
capabilities :: Maybe CapabilitiesProperty
customPermissionsName :: Value Text
tags :: Maybe [Tag]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::QuickSight::CustomPermissions",
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
"AwsAccountId" 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
awsAccountId,
Key
"CustomPermissionsName" 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
customPermissionsName]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> CapabilitiesProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Capabilities" (CapabilitiesProperty -> (Key, Value))
-> Maybe CapabilitiesProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CapabilitiesProperty
capabilities,
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 CustomPermissions where
toJSON :: CustomPermissions -> Value
toJSON CustomPermissions {Maybe [Tag]
Maybe CapabilitiesProperty
()
Value Text
haddock_workaround_ :: CustomPermissions -> ()
awsAccountId :: CustomPermissions -> Value Text
capabilities :: CustomPermissions -> Maybe CapabilitiesProperty
customPermissionsName :: CustomPermissions -> Value Text
tags :: CustomPermissions -> Maybe [Tag]
haddock_workaround_ :: ()
awsAccountId :: Value Text
capabilities :: Maybe CapabilitiesProperty
customPermissionsName :: Value 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
"AwsAccountId" 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
awsAccountId,
Key
"CustomPermissionsName" 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
customPermissionsName]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> CapabilitiesProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Capabilities" (CapabilitiesProperty -> (Key, Value))
-> Maybe CapabilitiesProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CapabilitiesProperty
capabilities,
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 "AwsAccountId" CustomPermissions where
type PropertyType "AwsAccountId" CustomPermissions = Value Prelude.Text
set :: PropertyType "AwsAccountId" CustomPermissions
-> CustomPermissions -> CustomPermissions
set PropertyType "AwsAccountId" CustomPermissions
newValue CustomPermissions {Maybe [Tag]
Maybe CapabilitiesProperty
()
Value Text
haddock_workaround_ :: CustomPermissions -> ()
awsAccountId :: CustomPermissions -> Value Text
capabilities :: CustomPermissions -> Maybe CapabilitiesProperty
customPermissionsName :: CustomPermissions -> Value Text
tags :: CustomPermissions -> Maybe [Tag]
haddock_workaround_ :: ()
awsAccountId :: Value Text
capabilities :: Maybe CapabilitiesProperty
customPermissionsName :: Value Text
tags :: Maybe [Tag]
..}
= CustomPermissions {awsAccountId :: Value Text
awsAccountId = PropertyType "AwsAccountId" CustomPermissions
Value Text
newValue, Maybe [Tag]
Maybe CapabilitiesProperty
()
Value Text
haddock_workaround_ :: ()
capabilities :: Maybe CapabilitiesProperty
customPermissionsName :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
capabilities :: Maybe CapabilitiesProperty
customPermissionsName :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Capabilities" CustomPermissions where
type PropertyType "Capabilities" CustomPermissions = CapabilitiesProperty
set :: PropertyType "Capabilities" CustomPermissions
-> CustomPermissions -> CustomPermissions
set PropertyType "Capabilities" CustomPermissions
newValue CustomPermissions {Maybe [Tag]
Maybe CapabilitiesProperty
()
Value Text
haddock_workaround_ :: CustomPermissions -> ()
awsAccountId :: CustomPermissions -> Value Text
capabilities :: CustomPermissions -> Maybe CapabilitiesProperty
customPermissionsName :: CustomPermissions -> Value Text
tags :: CustomPermissions -> Maybe [Tag]
haddock_workaround_ :: ()
awsAccountId :: Value Text
capabilities :: Maybe CapabilitiesProperty
customPermissionsName :: Value Text
tags :: Maybe [Tag]
..}
= CustomPermissions {capabilities :: Maybe CapabilitiesProperty
capabilities = CapabilitiesProperty -> Maybe CapabilitiesProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Capabilities" CustomPermissions
CapabilitiesProperty
newValue, Maybe [Tag]
()
Value Text
haddock_workaround_ :: ()
awsAccountId :: Value Text
customPermissionsName :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
awsAccountId :: Value Text
customPermissionsName :: Value Text
tags :: Maybe [Tag]
..}
instance Property "CustomPermissionsName" CustomPermissions where
type PropertyType "CustomPermissionsName" CustomPermissions = Value Prelude.Text
set :: PropertyType "CustomPermissionsName" CustomPermissions
-> CustomPermissions -> CustomPermissions
set PropertyType "CustomPermissionsName" CustomPermissions
newValue CustomPermissions {Maybe [Tag]
Maybe CapabilitiesProperty
()
Value Text
haddock_workaround_ :: CustomPermissions -> ()
awsAccountId :: CustomPermissions -> Value Text
capabilities :: CustomPermissions -> Maybe CapabilitiesProperty
customPermissionsName :: CustomPermissions -> Value Text
tags :: CustomPermissions -> Maybe [Tag]
haddock_workaround_ :: ()
awsAccountId :: Value Text
capabilities :: Maybe CapabilitiesProperty
customPermissionsName :: Value Text
tags :: Maybe [Tag]
..}
= CustomPermissions {customPermissionsName :: Value Text
customPermissionsName = PropertyType "CustomPermissionsName" CustomPermissions
Value Text
newValue, Maybe [Tag]
Maybe CapabilitiesProperty
()
Value Text
haddock_workaround_ :: ()
awsAccountId :: Value Text
capabilities :: Maybe CapabilitiesProperty
tags :: Maybe [Tag]
haddock_workaround_ :: ()
awsAccountId :: Value Text
capabilities :: Maybe CapabilitiesProperty
tags :: Maybe [Tag]
..}
instance Property "Tags" CustomPermissions where
type PropertyType "Tags" CustomPermissions = [Tag]
set :: PropertyType "Tags" CustomPermissions
-> CustomPermissions -> CustomPermissions
set PropertyType "Tags" CustomPermissions
newValue CustomPermissions {Maybe [Tag]
Maybe CapabilitiesProperty
()
Value Text
haddock_workaround_ :: CustomPermissions -> ()
awsAccountId :: CustomPermissions -> Value Text
capabilities :: CustomPermissions -> Maybe CapabilitiesProperty
customPermissionsName :: CustomPermissions -> Value Text
tags :: CustomPermissions -> Maybe [Tag]
haddock_workaround_ :: ()
awsAccountId :: Value Text
capabilities :: Maybe CapabilitiesProperty
customPermissionsName :: Value Text
tags :: Maybe [Tag]
..}
= CustomPermissions {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" CustomPermissions
newValue, Maybe CapabilitiesProperty
()
Value Text
haddock_workaround_ :: ()
awsAccountId :: Value Text
capabilities :: Maybe CapabilitiesProperty
customPermissionsName :: Value Text
haddock_workaround_ :: ()
awsAccountId :: Value Text
capabilities :: Maybe CapabilitiesProperty
customPermissionsName :: Value Text
..}