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