module Stratosphere.Budgets.Budget.ExpressionDimensionValuesProperty (
        ExpressionDimensionValuesProperty(..),
        mkExpressionDimensionValuesProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ExpressionDimensionValuesProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-budgets-budget-expressiondimensionvalues.html>
    ExpressionDimensionValuesProperty {ExpressionDimensionValuesProperty -> ()
haddock_workaround_ :: (),
                                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-budgets-budget-expressiondimensionvalues.html#cfn-budgets-budget-expressiondimensionvalues-key>
                                       ExpressionDimensionValuesProperty -> Maybe (Value Text)
key :: (Prelude.Maybe (Value Prelude.Text)),
                                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-budgets-budget-expressiondimensionvalues.html#cfn-budgets-budget-expressiondimensionvalues-matchoptions>
                                       ExpressionDimensionValuesProperty -> Maybe (ValueList Text)
matchOptions :: (Prelude.Maybe (ValueList Prelude.Text)),
                                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-budgets-budget-expressiondimensionvalues.html#cfn-budgets-budget-expressiondimensionvalues-values>
                                       ExpressionDimensionValuesProperty -> Maybe (ValueList Text)
values :: (Prelude.Maybe (ValueList Prelude.Text))}
  deriving stock (ExpressionDimensionValuesProperty
-> ExpressionDimensionValuesProperty -> Bool
(ExpressionDimensionValuesProperty
 -> ExpressionDimensionValuesProperty -> Bool)
-> (ExpressionDimensionValuesProperty
    -> ExpressionDimensionValuesProperty -> Bool)
-> Eq ExpressionDimensionValuesProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ExpressionDimensionValuesProperty
-> ExpressionDimensionValuesProperty -> Bool
== :: ExpressionDimensionValuesProperty
-> ExpressionDimensionValuesProperty -> Bool
$c/= :: ExpressionDimensionValuesProperty
-> ExpressionDimensionValuesProperty -> Bool
/= :: ExpressionDimensionValuesProperty
-> ExpressionDimensionValuesProperty -> Bool
Prelude.Eq, Int -> ExpressionDimensionValuesProperty -> ShowS
[ExpressionDimensionValuesProperty] -> ShowS
ExpressionDimensionValuesProperty -> String
(Int -> ExpressionDimensionValuesProperty -> ShowS)
-> (ExpressionDimensionValuesProperty -> String)
-> ([ExpressionDimensionValuesProperty] -> ShowS)
-> Show ExpressionDimensionValuesProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ExpressionDimensionValuesProperty -> ShowS
showsPrec :: Int -> ExpressionDimensionValuesProperty -> ShowS
$cshow :: ExpressionDimensionValuesProperty -> String
show :: ExpressionDimensionValuesProperty -> String
$cshowList :: [ExpressionDimensionValuesProperty] -> ShowS
showList :: [ExpressionDimensionValuesProperty] -> ShowS
Prelude.Show)
mkExpressionDimensionValuesProperty ::
  ExpressionDimensionValuesProperty
mkExpressionDimensionValuesProperty :: ExpressionDimensionValuesProperty
mkExpressionDimensionValuesProperty
  = ExpressionDimensionValuesProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), key :: Maybe (Value Text)
key = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       matchOptions :: Maybe (ValueList Text)
matchOptions = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing, values :: Maybe (ValueList Text)
values = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ExpressionDimensionValuesProperty where
  toResourceProperties :: ExpressionDimensionValuesProperty -> ResourceProperties
toResourceProperties ExpressionDimensionValuesProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: ExpressionDimensionValuesProperty -> ()
key :: ExpressionDimensionValuesProperty -> Maybe (Value Text)
matchOptions :: ExpressionDimensionValuesProperty -> Maybe (ValueList Text)
values :: ExpressionDimensionValuesProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
key :: Maybe (Value Text)
matchOptions :: Maybe (ValueList Text)
values :: Maybe (ValueList Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Budgets::Budget.ExpressionDimensionValues",
         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 -> 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
"Key" (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)
key,
                            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
"MatchOptions" (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)
matchOptions,
                            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
"Values" (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)
values])}
instance JSON.ToJSON ExpressionDimensionValuesProperty where
  toJSON :: ExpressionDimensionValuesProperty -> Value
toJSON ExpressionDimensionValuesProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: ExpressionDimensionValuesProperty -> ()
key :: ExpressionDimensionValuesProperty -> Maybe (Value Text)
matchOptions :: ExpressionDimensionValuesProperty -> Maybe (ValueList Text)
values :: ExpressionDimensionValuesProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
key :: Maybe (Value Text)
matchOptions :: Maybe (ValueList Text)
values :: Maybe (ValueList 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 -> 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
"Key" (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)
key,
               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
"MatchOptions" (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)
matchOptions,
               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
"Values" (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)
values]))
instance Property "Key" ExpressionDimensionValuesProperty where
  type PropertyType "Key" ExpressionDimensionValuesProperty = Value Prelude.Text
  set :: PropertyType "Key" ExpressionDimensionValuesProperty
-> ExpressionDimensionValuesProperty
-> ExpressionDimensionValuesProperty
set PropertyType "Key" ExpressionDimensionValuesProperty
newValue ExpressionDimensionValuesProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: ExpressionDimensionValuesProperty -> ()
key :: ExpressionDimensionValuesProperty -> Maybe (Value Text)
matchOptions :: ExpressionDimensionValuesProperty -> Maybe (ValueList Text)
values :: ExpressionDimensionValuesProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
key :: Maybe (Value Text)
matchOptions :: Maybe (ValueList Text)
values :: Maybe (ValueList Text)
..}
    = ExpressionDimensionValuesProperty
        {key :: Maybe (Value Text)
key = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Key" ExpressionDimensionValuesProperty
Value Text
newValue, Maybe (ValueList Text)
()
haddock_workaround_ :: ()
matchOptions :: Maybe (ValueList Text)
values :: Maybe (ValueList Text)
haddock_workaround_ :: ()
matchOptions :: Maybe (ValueList Text)
values :: Maybe (ValueList Text)
..}
instance Property "MatchOptions" ExpressionDimensionValuesProperty where
  type PropertyType "MatchOptions" ExpressionDimensionValuesProperty = ValueList Prelude.Text
  set :: PropertyType "MatchOptions" ExpressionDimensionValuesProperty
-> ExpressionDimensionValuesProperty
-> ExpressionDimensionValuesProperty
set PropertyType "MatchOptions" ExpressionDimensionValuesProperty
newValue ExpressionDimensionValuesProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: ExpressionDimensionValuesProperty -> ()
key :: ExpressionDimensionValuesProperty -> Maybe (Value Text)
matchOptions :: ExpressionDimensionValuesProperty -> Maybe (ValueList Text)
values :: ExpressionDimensionValuesProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
key :: Maybe (Value Text)
matchOptions :: Maybe (ValueList Text)
values :: Maybe (ValueList Text)
..}
    = ExpressionDimensionValuesProperty
        {matchOptions :: Maybe (ValueList Text)
matchOptions = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "MatchOptions" ExpressionDimensionValuesProperty
ValueList Text
newValue, Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: ()
key :: Maybe (Value Text)
values :: Maybe (ValueList Text)
haddock_workaround_ :: ()
key :: Maybe (Value Text)
values :: Maybe (ValueList Text)
..}
instance Property "Values" ExpressionDimensionValuesProperty where
  type PropertyType "Values" ExpressionDimensionValuesProperty = ValueList Prelude.Text
  set :: PropertyType "Values" ExpressionDimensionValuesProperty
-> ExpressionDimensionValuesProperty
-> ExpressionDimensionValuesProperty
set PropertyType "Values" ExpressionDimensionValuesProperty
newValue ExpressionDimensionValuesProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: ExpressionDimensionValuesProperty -> ()
key :: ExpressionDimensionValuesProperty -> Maybe (Value Text)
matchOptions :: ExpressionDimensionValuesProperty -> Maybe (ValueList Text)
values :: ExpressionDimensionValuesProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
key :: Maybe (Value Text)
matchOptions :: Maybe (ValueList Text)
values :: Maybe (ValueList Text)
..}
    = ExpressionDimensionValuesProperty
        {values :: Maybe (ValueList Text)
values = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Values" ExpressionDimensionValuesProperty
ValueList Text
newValue, Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: ()
key :: Maybe (Value Text)
matchOptions :: Maybe (ValueList Text)
haddock_workaround_ :: ()
key :: Maybe (Value Text)
matchOptions :: Maybe (ValueList Text)
..}