module Stratosphere.LicenseManager.Grant (
Grant(..), mkGrant
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data Grant
=
Grant {Grant -> ()
haddock_workaround_ :: (),
Grant -> Maybe (ValueList Text)
allowedOperations :: (Prelude.Maybe (ValueList Prelude.Text)),
Grant -> Maybe (Value Text)
grantName :: (Prelude.Maybe (Value Prelude.Text)),
Grant -> Maybe (Value Text)
homeRegion :: (Prelude.Maybe (Value Prelude.Text)),
Grant -> Maybe (Value Text)
licenseArn :: (Prelude.Maybe (Value Prelude.Text)),
Grant -> Maybe (ValueList Text)
principals :: (Prelude.Maybe (ValueList Prelude.Text)),
Grant -> Maybe (Value Text)
status :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (Grant -> Grant -> Bool
(Grant -> Grant -> Bool) -> (Grant -> Grant -> Bool) -> Eq Grant
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Grant -> Grant -> Bool
== :: Grant -> Grant -> Bool
$c/= :: Grant -> Grant -> Bool
/= :: Grant -> Grant -> Bool
Prelude.Eq, Int -> Grant -> ShowS
[Grant] -> ShowS
Grant -> String
(Int -> Grant -> ShowS)
-> (Grant -> String) -> ([Grant] -> ShowS) -> Show Grant
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Grant -> ShowS
showsPrec :: Int -> Grant -> ShowS
$cshow :: Grant -> String
show :: Grant -> String
$cshowList :: [Grant] -> ShowS
showList :: [Grant] -> ShowS
Prelude.Show)
mkGrant :: Grant
mkGrant :: Grant
mkGrant
= Grant
{haddock_workaround_ :: ()
haddock_workaround_ = (), allowedOperations :: Maybe (ValueList Text)
allowedOperations = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing,
grantName :: Maybe (Value Text)
grantName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, homeRegion :: Maybe (Value Text)
homeRegion = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
licenseArn :: Maybe (Value Text)
licenseArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, principals :: Maybe (ValueList Text)
principals = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing,
status :: Maybe (Value Text)
status = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Grant where
toResourceProperties :: Grant -> ResourceProperties
toResourceProperties Grant {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: Grant -> ()
allowedOperations :: Grant -> Maybe (ValueList Text)
grantName :: Grant -> Maybe (Value Text)
homeRegion :: Grant -> Maybe (Value Text)
licenseArn :: Grant -> Maybe (Value Text)
principals :: Grant -> Maybe (ValueList Text)
status :: Grant -> Maybe (Value Text)
haddock_workaround_ :: ()
allowedOperations :: Maybe (ValueList Text)
grantName :: Maybe (Value Text)
homeRegion :: Maybe (Value Text)
licenseArn :: Maybe (Value Text)
principals :: Maybe (ValueList Text)
status :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::LicenseManager::Grant",
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 -> 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
"AllowedOperations" (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)
allowedOperations,
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
"GrantName" (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)
grantName,
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
"HomeRegion" (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)
homeRegion,
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
"LicenseArn" (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)
licenseArn,
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 -> 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
"Status" (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)
status])}
instance JSON.ToJSON Grant where
toJSON :: Grant -> Value
toJSON Grant {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: Grant -> ()
allowedOperations :: Grant -> Maybe (ValueList Text)
grantName :: Grant -> Maybe (Value Text)
homeRegion :: Grant -> Maybe (Value Text)
licenseArn :: Grant -> Maybe (Value Text)
principals :: Grant -> Maybe (ValueList Text)
status :: Grant -> Maybe (Value Text)
haddock_workaround_ :: ()
allowedOperations :: Maybe (ValueList Text)
grantName :: Maybe (Value Text)
homeRegion :: Maybe (Value Text)
licenseArn :: Maybe (Value Text)
principals :: Maybe (ValueList Text)
status :: 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 -> 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
"AllowedOperations" (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)
allowedOperations,
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
"GrantName" (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)
grantName,
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
"HomeRegion" (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)
homeRegion,
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
"LicenseArn" (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)
licenseArn,
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 -> 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
"Status" (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)
status]))
instance Property "AllowedOperations" Grant where
type PropertyType "AllowedOperations" Grant = ValueList Prelude.Text
set :: PropertyType "AllowedOperations" Grant -> Grant -> Grant
set PropertyType "AllowedOperations" Grant
newValue Grant {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: Grant -> ()
allowedOperations :: Grant -> Maybe (ValueList Text)
grantName :: Grant -> Maybe (Value Text)
homeRegion :: Grant -> Maybe (Value Text)
licenseArn :: Grant -> Maybe (Value Text)
principals :: Grant -> Maybe (ValueList Text)
status :: Grant -> Maybe (Value Text)
haddock_workaround_ :: ()
allowedOperations :: Maybe (ValueList Text)
grantName :: Maybe (Value Text)
homeRegion :: Maybe (Value Text)
licenseArn :: Maybe (Value Text)
principals :: Maybe (ValueList Text)
status :: Maybe (Value Text)
..}
= Grant {allowedOperations :: Maybe (ValueList Text)
allowedOperations = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "AllowedOperations" Grant
ValueList Text
newValue, Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: ()
grantName :: Maybe (Value Text)
homeRegion :: Maybe (Value Text)
licenseArn :: Maybe (Value Text)
principals :: Maybe (ValueList Text)
status :: Maybe (Value Text)
haddock_workaround_ :: ()
grantName :: Maybe (Value Text)
homeRegion :: Maybe (Value Text)
licenseArn :: Maybe (Value Text)
principals :: Maybe (ValueList Text)
status :: Maybe (Value Text)
..}
instance Property "GrantName" Grant where
type PropertyType "GrantName" Grant = Value Prelude.Text
set :: PropertyType "GrantName" Grant -> Grant -> Grant
set PropertyType "GrantName" Grant
newValue Grant {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: Grant -> ()
allowedOperations :: Grant -> Maybe (ValueList Text)
grantName :: Grant -> Maybe (Value Text)
homeRegion :: Grant -> Maybe (Value Text)
licenseArn :: Grant -> Maybe (Value Text)
principals :: Grant -> Maybe (ValueList Text)
status :: Grant -> Maybe (Value Text)
haddock_workaround_ :: ()
allowedOperations :: Maybe (ValueList Text)
grantName :: Maybe (Value Text)
homeRegion :: Maybe (Value Text)
licenseArn :: Maybe (Value Text)
principals :: Maybe (ValueList Text)
status :: Maybe (Value Text)
..}
= Grant {grantName :: Maybe (Value Text)
grantName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "GrantName" Grant
Value Text
newValue, Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: ()
allowedOperations :: Maybe (ValueList Text)
homeRegion :: Maybe (Value Text)
licenseArn :: Maybe (Value Text)
principals :: Maybe (ValueList Text)
status :: Maybe (Value Text)
haddock_workaround_ :: ()
allowedOperations :: Maybe (ValueList Text)
homeRegion :: Maybe (Value Text)
licenseArn :: Maybe (Value Text)
principals :: Maybe (ValueList Text)
status :: Maybe (Value Text)
..}
instance Property "HomeRegion" Grant where
type PropertyType "HomeRegion" Grant = Value Prelude.Text
set :: PropertyType "HomeRegion" Grant -> Grant -> Grant
set PropertyType "HomeRegion" Grant
newValue Grant {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: Grant -> ()
allowedOperations :: Grant -> Maybe (ValueList Text)
grantName :: Grant -> Maybe (Value Text)
homeRegion :: Grant -> Maybe (Value Text)
licenseArn :: Grant -> Maybe (Value Text)
principals :: Grant -> Maybe (ValueList Text)
status :: Grant -> Maybe (Value Text)
haddock_workaround_ :: ()
allowedOperations :: Maybe (ValueList Text)
grantName :: Maybe (Value Text)
homeRegion :: Maybe (Value Text)
licenseArn :: Maybe (Value Text)
principals :: Maybe (ValueList Text)
status :: Maybe (Value Text)
..}
= Grant {homeRegion :: Maybe (Value Text)
homeRegion = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "HomeRegion" Grant
Value Text
newValue, Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: ()
allowedOperations :: Maybe (ValueList Text)
grantName :: Maybe (Value Text)
licenseArn :: Maybe (Value Text)
principals :: Maybe (ValueList Text)
status :: Maybe (Value Text)
haddock_workaround_ :: ()
allowedOperations :: Maybe (ValueList Text)
grantName :: Maybe (Value Text)
licenseArn :: Maybe (Value Text)
principals :: Maybe (ValueList Text)
status :: Maybe (Value Text)
..}
instance Property "LicenseArn" Grant where
type PropertyType "LicenseArn" Grant = Value Prelude.Text
set :: PropertyType "LicenseArn" Grant -> Grant -> Grant
set PropertyType "LicenseArn" Grant
newValue Grant {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: Grant -> ()
allowedOperations :: Grant -> Maybe (ValueList Text)
grantName :: Grant -> Maybe (Value Text)
homeRegion :: Grant -> Maybe (Value Text)
licenseArn :: Grant -> Maybe (Value Text)
principals :: Grant -> Maybe (ValueList Text)
status :: Grant -> Maybe (Value Text)
haddock_workaround_ :: ()
allowedOperations :: Maybe (ValueList Text)
grantName :: Maybe (Value Text)
homeRegion :: Maybe (Value Text)
licenseArn :: Maybe (Value Text)
principals :: Maybe (ValueList Text)
status :: Maybe (Value Text)
..}
= Grant {licenseArn :: Maybe (Value Text)
licenseArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "LicenseArn" Grant
Value Text
newValue, Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: ()
allowedOperations :: Maybe (ValueList Text)
grantName :: Maybe (Value Text)
homeRegion :: Maybe (Value Text)
principals :: Maybe (ValueList Text)
status :: Maybe (Value Text)
haddock_workaround_ :: ()
allowedOperations :: Maybe (ValueList Text)
grantName :: Maybe (Value Text)
homeRegion :: Maybe (Value Text)
principals :: Maybe (ValueList Text)
status :: Maybe (Value Text)
..}
instance Property "Principals" Grant where
type PropertyType "Principals" Grant = ValueList Prelude.Text
set :: PropertyType "Principals" Grant -> Grant -> Grant
set PropertyType "Principals" Grant
newValue Grant {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: Grant -> ()
allowedOperations :: Grant -> Maybe (ValueList Text)
grantName :: Grant -> Maybe (Value Text)
homeRegion :: Grant -> Maybe (Value Text)
licenseArn :: Grant -> Maybe (Value Text)
principals :: Grant -> Maybe (ValueList Text)
status :: Grant -> Maybe (Value Text)
haddock_workaround_ :: ()
allowedOperations :: Maybe (ValueList Text)
grantName :: Maybe (Value Text)
homeRegion :: Maybe (Value Text)
licenseArn :: Maybe (Value Text)
principals :: Maybe (ValueList Text)
status :: Maybe (Value Text)
..}
= Grant {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" Grant
ValueList Text
newValue, Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: ()
allowedOperations :: Maybe (ValueList Text)
grantName :: Maybe (Value Text)
homeRegion :: Maybe (Value Text)
licenseArn :: Maybe (Value Text)
status :: Maybe (Value Text)
haddock_workaround_ :: ()
allowedOperations :: Maybe (ValueList Text)
grantName :: Maybe (Value Text)
homeRegion :: Maybe (Value Text)
licenseArn :: Maybe (Value Text)
status :: Maybe (Value Text)
..}
instance Property "Status" Grant where
type PropertyType "Status" Grant = Value Prelude.Text
set :: PropertyType "Status" Grant -> Grant -> Grant
set PropertyType "Status" Grant
newValue Grant {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: Grant -> ()
allowedOperations :: Grant -> Maybe (ValueList Text)
grantName :: Grant -> Maybe (Value Text)
homeRegion :: Grant -> Maybe (Value Text)
licenseArn :: Grant -> Maybe (Value Text)
principals :: Grant -> Maybe (ValueList Text)
status :: Grant -> Maybe (Value Text)
haddock_workaround_ :: ()
allowedOperations :: Maybe (ValueList Text)
grantName :: Maybe (Value Text)
homeRegion :: Maybe (Value Text)
licenseArn :: Maybe (Value Text)
principals :: Maybe (ValueList Text)
status :: Maybe (Value Text)
..}
= Grant {status :: Maybe (Value Text)
status = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Status" Grant
Value Text
newValue, Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: ()
allowedOperations :: Maybe (ValueList Text)
grantName :: Maybe (Value Text)
homeRegion :: Maybe (Value Text)
licenseArn :: Maybe (Value Text)
principals :: Maybe (ValueList Text)
haddock_workaround_ :: ()
allowedOperations :: Maybe (ValueList Text)
grantName :: Maybe (Value Text)
homeRegion :: Maybe (Value Text)
licenseArn :: Maybe (Value Text)
principals :: Maybe (ValueList Text)
..}