module Stratosphere.Billing.BillingView.DimensionsProperty (
        DimensionsProperty(..), mkDimensionsProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data DimensionsProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-billing-billingview-dimensions.html>
    DimensionsProperty {DimensionsProperty -> ()
haddock_workaround_ :: (),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-billing-billingview-dimensions.html#cfn-billing-billingview-dimensions-key>
                        DimensionsProperty -> Maybe (Value Text)
key :: (Prelude.Maybe (Value Prelude.Text)),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-billing-billingview-dimensions.html#cfn-billing-billingview-dimensions-values>
                        DimensionsProperty -> Maybe (ValueList Text)
values :: (Prelude.Maybe (ValueList Prelude.Text))}
  deriving stock (DimensionsProperty -> DimensionsProperty -> Bool
(DimensionsProperty -> DimensionsProperty -> Bool)
-> (DimensionsProperty -> DimensionsProperty -> Bool)
-> Eq DimensionsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DimensionsProperty -> DimensionsProperty -> Bool
== :: DimensionsProperty -> DimensionsProperty -> Bool
$c/= :: DimensionsProperty -> DimensionsProperty -> Bool
/= :: DimensionsProperty -> DimensionsProperty -> Bool
Prelude.Eq, Int -> DimensionsProperty -> ShowS
[DimensionsProperty] -> ShowS
DimensionsProperty -> String
(Int -> DimensionsProperty -> ShowS)
-> (DimensionsProperty -> String)
-> ([DimensionsProperty] -> ShowS)
-> Show DimensionsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DimensionsProperty -> ShowS
showsPrec :: Int -> DimensionsProperty -> ShowS
$cshow :: DimensionsProperty -> String
show :: DimensionsProperty -> String
$cshowList :: [DimensionsProperty] -> ShowS
showList :: [DimensionsProperty] -> ShowS
Prelude.Show)
mkDimensionsProperty :: DimensionsProperty
mkDimensionsProperty :: DimensionsProperty
mkDimensionsProperty
  = DimensionsProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), key :: Maybe (Value Text)
key = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       values :: Maybe (ValueList Text)
values = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties DimensionsProperty where
  toResourceProperties :: DimensionsProperty -> ResourceProperties
toResourceProperties DimensionsProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: DimensionsProperty -> ()
key :: DimensionsProperty -> Maybe (Value Text)
values :: DimensionsProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
key :: Maybe (Value Text)
values :: Maybe (ValueList Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Billing::BillingView.Dimensions",
         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
"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 DimensionsProperty where
  toJSON :: DimensionsProperty -> Value
toJSON DimensionsProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: DimensionsProperty -> ()
key :: DimensionsProperty -> Maybe (Value Text)
values :: DimensionsProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
key :: Maybe (Value 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
"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" DimensionsProperty where
  type PropertyType "Key" DimensionsProperty = Value Prelude.Text
  set :: PropertyType "Key" DimensionsProperty
-> DimensionsProperty -> DimensionsProperty
set PropertyType "Key" DimensionsProperty
newValue DimensionsProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: DimensionsProperty -> ()
key :: DimensionsProperty -> Maybe (Value Text)
values :: DimensionsProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
key :: Maybe (Value Text)
values :: Maybe (ValueList Text)
..}
    = DimensionsProperty {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" DimensionsProperty
Value Text
newValue, Maybe (ValueList Text)
()
haddock_workaround_ :: ()
values :: Maybe (ValueList Text)
haddock_workaround_ :: ()
values :: Maybe (ValueList Text)
..}
instance Property "Values" DimensionsProperty where
  type PropertyType "Values" DimensionsProperty = ValueList Prelude.Text
  set :: PropertyType "Values" DimensionsProperty
-> DimensionsProperty -> DimensionsProperty
set PropertyType "Values" DimensionsProperty
newValue DimensionsProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: DimensionsProperty -> ()
key :: DimensionsProperty -> Maybe (Value Text)
values :: DimensionsProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
key :: Maybe (Value Text)
values :: Maybe (ValueList Text)
..}
    = DimensionsProperty {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" DimensionsProperty
ValueList Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
key :: Maybe (Value Text)
haddock_workaround_ :: ()
key :: Maybe (Value Text)
..}