module Stratosphere.DataZone.PolicyGrant.UserPolicyGrantPrincipalProperty (
UserPolicyGrantPrincipalProperty(..),
mkUserPolicyGrantPrincipalProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data UserPolicyGrantPrincipalProperty
=
UserPolicyGrantPrincipalProperty {UserPolicyGrantPrincipalProperty -> ()
haddock_workaround_ :: (),
UserPolicyGrantPrincipalProperty -> Maybe Object
allUsersGrantFilter :: (Prelude.Maybe JSON.Object),
UserPolicyGrantPrincipalProperty -> Maybe (Value Text)
userIdentifier :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (UserPolicyGrantPrincipalProperty
-> UserPolicyGrantPrincipalProperty -> Bool
(UserPolicyGrantPrincipalProperty
-> UserPolicyGrantPrincipalProperty -> Bool)
-> (UserPolicyGrantPrincipalProperty
-> UserPolicyGrantPrincipalProperty -> Bool)
-> Eq UserPolicyGrantPrincipalProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: UserPolicyGrantPrincipalProperty
-> UserPolicyGrantPrincipalProperty -> Bool
== :: UserPolicyGrantPrincipalProperty
-> UserPolicyGrantPrincipalProperty -> Bool
$c/= :: UserPolicyGrantPrincipalProperty
-> UserPolicyGrantPrincipalProperty -> Bool
/= :: UserPolicyGrantPrincipalProperty
-> UserPolicyGrantPrincipalProperty -> Bool
Prelude.Eq, Int -> UserPolicyGrantPrincipalProperty -> ShowS
[UserPolicyGrantPrincipalProperty] -> ShowS
UserPolicyGrantPrincipalProperty -> String
(Int -> UserPolicyGrantPrincipalProperty -> ShowS)
-> (UserPolicyGrantPrincipalProperty -> String)
-> ([UserPolicyGrantPrincipalProperty] -> ShowS)
-> Show UserPolicyGrantPrincipalProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> UserPolicyGrantPrincipalProperty -> ShowS
showsPrec :: Int -> UserPolicyGrantPrincipalProperty -> ShowS
$cshow :: UserPolicyGrantPrincipalProperty -> String
show :: UserPolicyGrantPrincipalProperty -> String
$cshowList :: [UserPolicyGrantPrincipalProperty] -> ShowS
showList :: [UserPolicyGrantPrincipalProperty] -> ShowS
Prelude.Show)
mkUserPolicyGrantPrincipalProperty ::
UserPolicyGrantPrincipalProperty
mkUserPolicyGrantPrincipalProperty :: UserPolicyGrantPrincipalProperty
mkUserPolicyGrantPrincipalProperty
= UserPolicyGrantPrincipalProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), allUsersGrantFilter :: Maybe Object
allUsersGrantFilter = Maybe Object
forall a. Maybe a
Prelude.Nothing,
userIdentifier :: Maybe (Value Text)
userIdentifier = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties UserPolicyGrantPrincipalProperty where
toResourceProperties :: UserPolicyGrantPrincipalProperty -> ResourceProperties
toResourceProperties UserPolicyGrantPrincipalProperty {Maybe Object
Maybe (Value Text)
()
haddock_workaround_ :: UserPolicyGrantPrincipalProperty -> ()
allUsersGrantFilter :: UserPolicyGrantPrincipalProperty -> Maybe Object
userIdentifier :: UserPolicyGrantPrincipalProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
allUsersGrantFilter :: Maybe Object
userIdentifier :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::DataZone::PolicyGrant.UserPolicyGrantPrincipal",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Object -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AllUsersGrantFilter" (Object -> (Key, Value)) -> Maybe Object -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Object
allUsersGrantFilter,
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
"UserIdentifier" (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)
userIdentifier])}
instance JSON.ToJSON UserPolicyGrantPrincipalProperty where
toJSON :: UserPolicyGrantPrincipalProperty -> Value
toJSON UserPolicyGrantPrincipalProperty {Maybe Object
Maybe (Value Text)
()
haddock_workaround_ :: UserPolicyGrantPrincipalProperty -> ()
allUsersGrantFilter :: UserPolicyGrantPrincipalProperty -> Maybe Object
userIdentifier :: UserPolicyGrantPrincipalProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
allUsersGrantFilter :: Maybe Object
userIdentifier :: Maybe (Value Text)
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Object -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AllUsersGrantFilter" (Object -> (Key, Value)) -> Maybe Object -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Object
allUsersGrantFilter,
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
"UserIdentifier" (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)
userIdentifier]))
instance Property "AllUsersGrantFilter" UserPolicyGrantPrincipalProperty where
type PropertyType "AllUsersGrantFilter" UserPolicyGrantPrincipalProperty = JSON.Object
set :: PropertyType "AllUsersGrantFilter" UserPolicyGrantPrincipalProperty
-> UserPolicyGrantPrincipalProperty
-> UserPolicyGrantPrincipalProperty
set PropertyType "AllUsersGrantFilter" UserPolicyGrantPrincipalProperty
newValue UserPolicyGrantPrincipalProperty {Maybe Object
Maybe (Value Text)
()
haddock_workaround_ :: UserPolicyGrantPrincipalProperty -> ()
allUsersGrantFilter :: UserPolicyGrantPrincipalProperty -> Maybe Object
userIdentifier :: UserPolicyGrantPrincipalProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
allUsersGrantFilter :: Maybe Object
userIdentifier :: Maybe (Value Text)
..}
= UserPolicyGrantPrincipalProperty
{allUsersGrantFilter :: Maybe Object
allUsersGrantFilter = Object -> Maybe Object
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure Object
PropertyType "AllUsersGrantFilter" UserPolicyGrantPrincipalProperty
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
userIdentifier :: Maybe (Value Text)
haddock_workaround_ :: ()
userIdentifier :: Maybe (Value Text)
..}
instance Property "UserIdentifier" UserPolicyGrantPrincipalProperty where
type PropertyType "UserIdentifier" UserPolicyGrantPrincipalProperty = Value Prelude.Text
set :: PropertyType "UserIdentifier" UserPolicyGrantPrincipalProperty
-> UserPolicyGrantPrincipalProperty
-> UserPolicyGrantPrincipalProperty
set PropertyType "UserIdentifier" UserPolicyGrantPrincipalProperty
newValue UserPolicyGrantPrincipalProperty {Maybe Object
Maybe (Value Text)
()
haddock_workaround_ :: UserPolicyGrantPrincipalProperty -> ()
allUsersGrantFilter :: UserPolicyGrantPrincipalProperty -> Maybe Object
userIdentifier :: UserPolicyGrantPrincipalProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
allUsersGrantFilter :: Maybe Object
userIdentifier :: Maybe (Value Text)
..}
= UserPolicyGrantPrincipalProperty
{userIdentifier :: Maybe (Value Text)
userIdentifier = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "UserIdentifier" UserPolicyGrantPrincipalProperty
Value Text
newValue, Maybe Object
()
haddock_workaround_ :: ()
allUsersGrantFilter :: Maybe Object
haddock_workaround_ :: ()
allUsersGrantFilter :: Maybe Object
..}