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