module Stratosphere.AppStream.Entitlement (
        module Exports, Entitlement(..), mkEntitlement
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.AppStream.Entitlement.AttributeProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data Entitlement
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appstream-entitlement.html>
    Entitlement {Entitlement -> ()
haddock_workaround_ :: (),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appstream-entitlement.html#cfn-appstream-entitlement-appvisibility>
                 Entitlement -> Value Text
appVisibility :: (Value Prelude.Text),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appstream-entitlement.html#cfn-appstream-entitlement-attributes>
                 Entitlement -> [AttributeProperty]
attributes :: [AttributeProperty],
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appstream-entitlement.html#cfn-appstream-entitlement-description>
                 Entitlement -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appstream-entitlement.html#cfn-appstream-entitlement-name>
                 Entitlement -> Value Text
name :: (Value Prelude.Text),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appstream-entitlement.html#cfn-appstream-entitlement-stackname>
                 Entitlement -> Value Text
stackName :: (Value Prelude.Text)}
  deriving stock (Entitlement -> Entitlement -> Bool
(Entitlement -> Entitlement -> Bool)
-> (Entitlement -> Entitlement -> Bool) -> Eq Entitlement
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Entitlement -> Entitlement -> Bool
== :: Entitlement -> Entitlement -> Bool
$c/= :: Entitlement -> Entitlement -> Bool
/= :: Entitlement -> Entitlement -> Bool
Prelude.Eq, Int -> Entitlement -> ShowS
[Entitlement] -> ShowS
Entitlement -> String
(Int -> Entitlement -> ShowS)
-> (Entitlement -> String)
-> ([Entitlement] -> ShowS)
-> Show Entitlement
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Entitlement -> ShowS
showsPrec :: Int -> Entitlement -> ShowS
$cshow :: Entitlement -> String
show :: Entitlement -> String
$cshowList :: [Entitlement] -> ShowS
showList :: [Entitlement] -> ShowS
Prelude.Show)
mkEntitlement ::
  Value Prelude.Text
  -> [AttributeProperty]
     -> Value Prelude.Text -> Value Prelude.Text -> Entitlement
mkEntitlement :: Value Text
-> [AttributeProperty] -> Value Text -> Value Text -> Entitlement
mkEntitlement Value Text
appVisibility [AttributeProperty]
attributes Value Text
name Value Text
stackName
  = Entitlement
      {haddock_workaround_ :: ()
haddock_workaround_ = (), appVisibility :: Value Text
appVisibility = Value Text
appVisibility,
       attributes :: [AttributeProperty]
attributes = [AttributeProperty]
attributes, name :: Value Text
name = Value Text
name, stackName :: Value Text
stackName = Value Text
stackName,
       description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Entitlement where
  toResourceProperties :: Entitlement -> ResourceProperties
toResourceProperties Entitlement {[AttributeProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Entitlement -> ()
appVisibility :: Entitlement -> Value Text
attributes :: Entitlement -> [AttributeProperty]
description :: Entitlement -> Maybe (Value Text)
name :: Entitlement -> Value Text
stackName :: Entitlement -> Value Text
haddock_workaround_ :: ()
appVisibility :: Value Text
attributes :: [AttributeProperty]
description :: Maybe (Value Text)
name :: Value Text
stackName :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::AppStream::Entitlement",
         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
"AppVisibility" 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
appVisibility,
                            Key
"Attributes" Key -> [AttributeProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [AttributeProperty]
attributes, 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,
                            Key
"StackName" 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
stackName]
                           ([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
"Description" (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)
description]))}
instance JSON.ToJSON Entitlement where
  toJSON :: Entitlement -> Value
toJSON Entitlement {[AttributeProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Entitlement -> ()
appVisibility :: Entitlement -> Value Text
attributes :: Entitlement -> [AttributeProperty]
description :: Entitlement -> Maybe (Value Text)
name :: Entitlement -> Value Text
stackName :: Entitlement -> Value Text
haddock_workaround_ :: ()
appVisibility :: Value Text
attributes :: [AttributeProperty]
description :: Maybe (Value Text)
name :: Value Text
stackName :: Value Text
..}
    = [(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
"AppVisibility" 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
appVisibility,
               Key
"Attributes" Key -> [AttributeProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [AttributeProperty]
attributes, 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,
               Key
"StackName" 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
stackName]
              ([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
"Description" (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)
description])))
instance Property "AppVisibility" Entitlement where
  type PropertyType "AppVisibility" Entitlement = Value Prelude.Text
  set :: PropertyType "AppVisibility" Entitlement
-> Entitlement -> Entitlement
set PropertyType "AppVisibility" Entitlement
newValue Entitlement {[AttributeProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Entitlement -> ()
appVisibility :: Entitlement -> Value Text
attributes :: Entitlement -> [AttributeProperty]
description :: Entitlement -> Maybe (Value Text)
name :: Entitlement -> Value Text
stackName :: Entitlement -> Value Text
haddock_workaround_ :: ()
appVisibility :: Value Text
attributes :: [AttributeProperty]
description :: Maybe (Value Text)
name :: Value Text
stackName :: Value Text
..}
    = Entitlement {appVisibility :: Value Text
appVisibility = PropertyType "AppVisibility" Entitlement
Value Text
newValue, [AttributeProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
attributes :: [AttributeProperty]
description :: Maybe (Value Text)
name :: Value Text
stackName :: Value Text
haddock_workaround_ :: ()
attributes :: [AttributeProperty]
description :: Maybe (Value Text)
name :: Value Text
stackName :: Value Text
..}
instance Property "Attributes" Entitlement where
  type PropertyType "Attributes" Entitlement = [AttributeProperty]
  set :: PropertyType "Attributes" Entitlement -> Entitlement -> Entitlement
set PropertyType "Attributes" Entitlement
newValue Entitlement {[AttributeProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Entitlement -> ()
appVisibility :: Entitlement -> Value Text
attributes :: Entitlement -> [AttributeProperty]
description :: Entitlement -> Maybe (Value Text)
name :: Entitlement -> Value Text
stackName :: Entitlement -> Value Text
haddock_workaround_ :: ()
appVisibility :: Value Text
attributes :: [AttributeProperty]
description :: Maybe (Value Text)
name :: Value Text
stackName :: Value Text
..}
    = Entitlement {attributes :: [AttributeProperty]
attributes = [AttributeProperty]
PropertyType "Attributes" Entitlement
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
appVisibility :: Value Text
description :: Maybe (Value Text)
name :: Value Text
stackName :: Value Text
haddock_workaround_ :: ()
appVisibility :: Value Text
description :: Maybe (Value Text)
name :: Value Text
stackName :: Value Text
..}
instance Property "Description" Entitlement where
  type PropertyType "Description" Entitlement = Value Prelude.Text
  set :: PropertyType "Description" Entitlement
-> Entitlement -> Entitlement
set PropertyType "Description" Entitlement
newValue Entitlement {[AttributeProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Entitlement -> ()
appVisibility :: Entitlement -> Value Text
attributes :: Entitlement -> [AttributeProperty]
description :: Entitlement -> Maybe (Value Text)
name :: Entitlement -> Value Text
stackName :: Entitlement -> Value Text
haddock_workaround_ :: ()
appVisibility :: Value Text
attributes :: [AttributeProperty]
description :: Maybe (Value Text)
name :: Value Text
stackName :: Value Text
..}
    = Entitlement {description :: Maybe (Value Text)
description = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Description" Entitlement
Value Text
newValue, [AttributeProperty]
()
Value Text
haddock_workaround_ :: ()
appVisibility :: Value Text
attributes :: [AttributeProperty]
name :: Value Text
stackName :: Value Text
haddock_workaround_ :: ()
appVisibility :: Value Text
attributes :: [AttributeProperty]
name :: Value Text
stackName :: Value Text
..}
instance Property "Name" Entitlement where
  type PropertyType "Name" Entitlement = Value Prelude.Text
  set :: PropertyType "Name" Entitlement -> Entitlement -> Entitlement
set PropertyType "Name" Entitlement
newValue Entitlement {[AttributeProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Entitlement -> ()
appVisibility :: Entitlement -> Value Text
attributes :: Entitlement -> [AttributeProperty]
description :: Entitlement -> Maybe (Value Text)
name :: Entitlement -> Value Text
stackName :: Entitlement -> Value Text
haddock_workaround_ :: ()
appVisibility :: Value Text
attributes :: [AttributeProperty]
description :: Maybe (Value Text)
name :: Value Text
stackName :: Value Text
..} = Entitlement {name :: Value Text
name = PropertyType "Name" Entitlement
Value Text
newValue, [AttributeProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
appVisibility :: Value Text
attributes :: [AttributeProperty]
description :: Maybe (Value Text)
stackName :: Value Text
haddock_workaround_ :: ()
appVisibility :: Value Text
attributes :: [AttributeProperty]
description :: Maybe (Value Text)
stackName :: Value Text
..}
instance Property "StackName" Entitlement where
  type PropertyType "StackName" Entitlement = Value Prelude.Text
  set :: PropertyType "StackName" Entitlement -> Entitlement -> Entitlement
set PropertyType "StackName" Entitlement
newValue Entitlement {[AttributeProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Entitlement -> ()
appVisibility :: Entitlement -> Value Text
attributes :: Entitlement -> [AttributeProperty]
description :: Entitlement -> Maybe (Value Text)
name :: Entitlement -> Value Text
stackName :: Entitlement -> Value Text
haddock_workaround_ :: ()
appVisibility :: Value Text
attributes :: [AttributeProperty]
description :: Maybe (Value Text)
name :: Value Text
stackName :: Value Text
..}
    = Entitlement {stackName :: Value Text
stackName = PropertyType "StackName" Entitlement
Value Text
newValue, [AttributeProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
appVisibility :: Value Text
attributes :: [AttributeProperty]
description :: Maybe (Value Text)
name :: Value Text
haddock_workaround_ :: ()
appVisibility :: Value Text
attributes :: [AttributeProperty]
description :: Maybe (Value Text)
name :: Value Text
..}