module Stratosphere.Billing.BillingView (
        module Exports, BillingView(..), mkBillingView
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Billing.BillingView.DataFilterExpressionProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data BillingView
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-billing-billingview.html>
    BillingView {BillingView -> ()
haddock_workaround_ :: (),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-billing-billingview.html#cfn-billing-billingview-datafilterexpression>
                 BillingView -> Maybe DataFilterExpressionProperty
dataFilterExpression :: (Prelude.Maybe DataFilterExpressionProperty),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-billing-billingview.html#cfn-billing-billingview-description>
                 BillingView -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-billing-billingview.html#cfn-billing-billingview-name>
                 BillingView -> Value Text
name :: (Value Prelude.Text),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-billing-billingview.html#cfn-billing-billingview-sourceviews>
                 BillingView -> ValueList Text
sourceViews :: (ValueList Prelude.Text),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-billing-billingview.html#cfn-billing-billingview-tags>
                 BillingView -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
  deriving stock (BillingView -> BillingView -> Bool
(BillingView -> BillingView -> Bool)
-> (BillingView -> BillingView -> Bool) -> Eq BillingView
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: BillingView -> BillingView -> Bool
== :: BillingView -> BillingView -> Bool
$c/= :: BillingView -> BillingView -> Bool
/= :: BillingView -> BillingView -> Bool
Prelude.Eq, Int -> BillingView -> ShowS
[BillingView] -> ShowS
BillingView -> String
(Int -> BillingView -> ShowS)
-> (BillingView -> String)
-> ([BillingView] -> ShowS)
-> Show BillingView
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> BillingView -> ShowS
showsPrec :: Int -> BillingView -> ShowS
$cshow :: BillingView -> String
show :: BillingView -> String
$cshowList :: [BillingView] -> ShowS
showList :: [BillingView] -> ShowS
Prelude.Show)
mkBillingView ::
  Value Prelude.Text -> ValueList Prelude.Text -> BillingView
mkBillingView :: Value Text -> ValueList Text -> BillingView
mkBillingView Value Text
name ValueList Text
sourceViews
  = BillingView
      {haddock_workaround_ :: ()
haddock_workaround_ = (), name :: Value Text
name = Value Text
name, sourceViews :: ValueList Text
sourceViews = ValueList Text
sourceViews,
       dataFilterExpression :: Maybe DataFilterExpressionProperty
dataFilterExpression = Maybe DataFilterExpressionProperty
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 BillingView where
  toResourceProperties :: BillingView -> ResourceProperties
toResourceProperties BillingView {Maybe [Tag]
Maybe (Value Text)
Maybe DataFilterExpressionProperty
()
ValueList Text
Value Text
haddock_workaround_ :: BillingView -> ()
dataFilterExpression :: BillingView -> Maybe DataFilterExpressionProperty
description :: BillingView -> Maybe (Value Text)
name :: BillingView -> Value Text
sourceViews :: BillingView -> ValueList Text
tags :: BillingView -> Maybe [Tag]
haddock_workaround_ :: ()
dataFilterExpression :: Maybe DataFilterExpressionProperty
description :: Maybe (Value Text)
name :: Value Text
sourceViews :: ValueList Text
tags :: Maybe [Tag]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Billing::BillingView",
         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, Key
"SourceViews" 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..= ValueList Text
sourceViews]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> DataFilterExpressionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DataFilterExpression" (DataFilterExpressionProperty -> (Key, Value))
-> Maybe DataFilterExpressionProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DataFilterExpressionProperty
dataFilterExpression,
                               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 BillingView where
  toJSON :: BillingView -> Value
toJSON BillingView {Maybe [Tag]
Maybe (Value Text)
Maybe DataFilterExpressionProperty
()
ValueList Text
Value Text
haddock_workaround_ :: BillingView -> ()
dataFilterExpression :: BillingView -> Maybe DataFilterExpressionProperty
description :: BillingView -> Maybe (Value Text)
name :: BillingView -> Value Text
sourceViews :: BillingView -> ValueList Text
tags :: BillingView -> Maybe [Tag]
haddock_workaround_ :: ()
dataFilterExpression :: Maybe DataFilterExpressionProperty
description :: Maybe (Value Text)
name :: Value Text
sourceViews :: ValueList 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, Key
"SourceViews" 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..= ValueList Text
sourceViews]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> DataFilterExpressionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DataFilterExpression" (DataFilterExpressionProperty -> (Key, Value))
-> Maybe DataFilterExpressionProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DataFilterExpressionProperty
dataFilterExpression,
                  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 "DataFilterExpression" BillingView where
  type PropertyType "DataFilterExpression" BillingView = DataFilterExpressionProperty
  set :: PropertyType "DataFilterExpression" BillingView
-> BillingView -> BillingView
set PropertyType "DataFilterExpression" BillingView
newValue BillingView {Maybe [Tag]
Maybe (Value Text)
Maybe DataFilterExpressionProperty
()
ValueList Text
Value Text
haddock_workaround_ :: BillingView -> ()
dataFilterExpression :: BillingView -> Maybe DataFilterExpressionProperty
description :: BillingView -> Maybe (Value Text)
name :: BillingView -> Value Text
sourceViews :: BillingView -> ValueList Text
tags :: BillingView -> Maybe [Tag]
haddock_workaround_ :: ()
dataFilterExpression :: Maybe DataFilterExpressionProperty
description :: Maybe (Value Text)
name :: Value Text
sourceViews :: ValueList Text
tags :: Maybe [Tag]
..}
    = BillingView {dataFilterExpression :: Maybe DataFilterExpressionProperty
dataFilterExpression = DataFilterExpressionProperty -> Maybe DataFilterExpressionProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DataFilterExpression" BillingView
DataFilterExpressionProperty
newValue, Maybe [Tag]
Maybe (Value Text)
()
ValueList Text
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
sourceViews :: ValueList Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
sourceViews :: ValueList Text
tags :: Maybe [Tag]
..}
instance Property "Description" BillingView where
  type PropertyType "Description" BillingView = Value Prelude.Text
  set :: PropertyType "Description" BillingView
-> BillingView -> BillingView
set PropertyType "Description" BillingView
newValue BillingView {Maybe [Tag]
Maybe (Value Text)
Maybe DataFilterExpressionProperty
()
ValueList Text
Value Text
haddock_workaround_ :: BillingView -> ()
dataFilterExpression :: BillingView -> Maybe DataFilterExpressionProperty
description :: BillingView -> Maybe (Value Text)
name :: BillingView -> Value Text
sourceViews :: BillingView -> ValueList Text
tags :: BillingView -> Maybe [Tag]
haddock_workaround_ :: ()
dataFilterExpression :: Maybe DataFilterExpressionProperty
description :: Maybe (Value Text)
name :: Value Text
sourceViews :: ValueList Text
tags :: Maybe [Tag]
..}
    = BillingView {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" BillingView
Value Text
newValue, Maybe [Tag]
Maybe DataFilterExpressionProperty
()
ValueList Text
Value Text
haddock_workaround_ :: ()
dataFilterExpression :: Maybe DataFilterExpressionProperty
name :: Value Text
sourceViews :: ValueList Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
dataFilterExpression :: Maybe DataFilterExpressionProperty
name :: Value Text
sourceViews :: ValueList Text
tags :: Maybe [Tag]
..}
instance Property "Name" BillingView where
  type PropertyType "Name" BillingView = Value Prelude.Text
  set :: PropertyType "Name" BillingView -> BillingView -> BillingView
set PropertyType "Name" BillingView
newValue BillingView {Maybe [Tag]
Maybe (Value Text)
Maybe DataFilterExpressionProperty
()
ValueList Text
Value Text
haddock_workaround_ :: BillingView -> ()
dataFilterExpression :: BillingView -> Maybe DataFilterExpressionProperty
description :: BillingView -> Maybe (Value Text)
name :: BillingView -> Value Text
sourceViews :: BillingView -> ValueList Text
tags :: BillingView -> Maybe [Tag]
haddock_workaround_ :: ()
dataFilterExpression :: Maybe DataFilterExpressionProperty
description :: Maybe (Value Text)
name :: Value Text
sourceViews :: ValueList Text
tags :: Maybe [Tag]
..} = BillingView {name :: Value Text
name = PropertyType "Name" BillingView
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
Maybe DataFilterExpressionProperty
()
ValueList Text
haddock_workaround_ :: ()
dataFilterExpression :: Maybe DataFilterExpressionProperty
description :: Maybe (Value Text)
sourceViews :: ValueList Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
dataFilterExpression :: Maybe DataFilterExpressionProperty
description :: Maybe (Value Text)
sourceViews :: ValueList Text
tags :: Maybe [Tag]
..}
instance Property "SourceViews" BillingView where
  type PropertyType "SourceViews" BillingView = ValueList Prelude.Text
  set :: PropertyType "SourceViews" BillingView
-> BillingView -> BillingView
set PropertyType "SourceViews" BillingView
newValue BillingView {Maybe [Tag]
Maybe (Value Text)
Maybe DataFilterExpressionProperty
()
ValueList Text
Value Text
haddock_workaround_ :: BillingView -> ()
dataFilterExpression :: BillingView -> Maybe DataFilterExpressionProperty
description :: BillingView -> Maybe (Value Text)
name :: BillingView -> Value Text
sourceViews :: BillingView -> ValueList Text
tags :: BillingView -> Maybe [Tag]
haddock_workaround_ :: ()
dataFilterExpression :: Maybe DataFilterExpressionProperty
description :: Maybe (Value Text)
name :: Value Text
sourceViews :: ValueList Text
tags :: Maybe [Tag]
..}
    = BillingView {sourceViews :: ValueList Text
sourceViews = PropertyType "SourceViews" BillingView
ValueList Text
newValue, Maybe [Tag]
Maybe (Value Text)
Maybe DataFilterExpressionProperty
()
Value Text
haddock_workaround_ :: ()
dataFilterExpression :: Maybe DataFilterExpressionProperty
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
dataFilterExpression :: Maybe DataFilterExpressionProperty
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Tags" BillingView where
  type PropertyType "Tags" BillingView = [Tag]
  set :: PropertyType "Tags" BillingView -> BillingView -> BillingView
set PropertyType "Tags" BillingView
newValue BillingView {Maybe [Tag]
Maybe (Value Text)
Maybe DataFilterExpressionProperty
()
ValueList Text
Value Text
haddock_workaround_ :: BillingView -> ()
dataFilterExpression :: BillingView -> Maybe DataFilterExpressionProperty
description :: BillingView -> Maybe (Value Text)
name :: BillingView -> Value Text
sourceViews :: BillingView -> ValueList Text
tags :: BillingView -> Maybe [Tag]
haddock_workaround_ :: ()
dataFilterExpression :: Maybe DataFilterExpressionProperty
description :: Maybe (Value Text)
name :: Value Text
sourceViews :: ValueList Text
tags :: Maybe [Tag]
..}
    = BillingView {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" BillingView
newValue, Maybe (Value Text)
Maybe DataFilterExpressionProperty
()
ValueList Text
Value Text
haddock_workaround_ :: ()
dataFilterExpression :: Maybe DataFilterExpressionProperty
description :: Maybe (Value Text)
name :: Value Text
sourceViews :: ValueList Text
haddock_workaround_ :: ()
dataFilterExpression :: Maybe DataFilterExpressionProperty
description :: Maybe (Value Text)
name :: Value Text
sourceViews :: ValueList Text
..}