module Stratosphere.Invoicing.InvoiceUnit (
module Exports, InvoiceUnit(..), mkInvoiceUnit
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Invoicing.InvoiceUnit.ResourceTagProperty as Exports
import {-# SOURCE #-} Stratosphere.Invoicing.InvoiceUnit.RuleProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data InvoiceUnit
=
InvoiceUnit {InvoiceUnit -> ()
haddock_workaround_ :: (),
InvoiceUnit -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
InvoiceUnit -> Value Text
invoiceReceiver :: (Value Prelude.Text),
InvoiceUnit -> Value Text
name :: (Value Prelude.Text),
InvoiceUnit -> Maybe [ResourceTagProperty]
resourceTags :: (Prelude.Maybe [ResourceTagProperty]),
InvoiceUnit -> RuleProperty
rule :: RuleProperty,
InvoiceUnit -> Maybe (Value Bool)
taxInheritanceDisabled :: (Prelude.Maybe (Value Prelude.Bool))}
deriving stock (InvoiceUnit -> InvoiceUnit -> Bool
(InvoiceUnit -> InvoiceUnit -> Bool)
-> (InvoiceUnit -> InvoiceUnit -> Bool) -> Eq InvoiceUnit
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: InvoiceUnit -> InvoiceUnit -> Bool
== :: InvoiceUnit -> InvoiceUnit -> Bool
$c/= :: InvoiceUnit -> InvoiceUnit -> Bool
/= :: InvoiceUnit -> InvoiceUnit -> Bool
Prelude.Eq, Int -> InvoiceUnit -> ShowS
[InvoiceUnit] -> ShowS
InvoiceUnit -> String
(Int -> InvoiceUnit -> ShowS)
-> (InvoiceUnit -> String)
-> ([InvoiceUnit] -> ShowS)
-> Show InvoiceUnit
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> InvoiceUnit -> ShowS
showsPrec :: Int -> InvoiceUnit -> ShowS
$cshow :: InvoiceUnit -> String
show :: InvoiceUnit -> String
$cshowList :: [InvoiceUnit] -> ShowS
showList :: [InvoiceUnit] -> ShowS
Prelude.Show)
mkInvoiceUnit ::
Value Prelude.Text
-> Value Prelude.Text -> RuleProperty -> InvoiceUnit
mkInvoiceUnit :: Value Text -> Value Text -> RuleProperty -> InvoiceUnit
mkInvoiceUnit Value Text
invoiceReceiver Value Text
name RuleProperty
rule
= InvoiceUnit
{haddock_workaround_ :: ()
haddock_workaround_ = (), invoiceReceiver :: Value Text
invoiceReceiver = Value Text
invoiceReceiver,
name :: Value Text
name = Value Text
name, rule :: RuleProperty
rule = RuleProperty
rule, description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
resourceTags :: Maybe [ResourceTagProperty]
resourceTags = Maybe [ResourceTagProperty]
forall a. Maybe a
Prelude.Nothing,
taxInheritanceDisabled :: Maybe (Value Bool)
taxInheritanceDisabled = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties InvoiceUnit where
toResourceProperties :: InvoiceUnit -> ResourceProperties
toResourceProperties InvoiceUnit {Maybe [ResourceTagProperty]
Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
RuleProperty
haddock_workaround_ :: InvoiceUnit -> ()
description :: InvoiceUnit -> Maybe (Value Text)
invoiceReceiver :: InvoiceUnit -> Value Text
name :: InvoiceUnit -> Value Text
resourceTags :: InvoiceUnit -> Maybe [ResourceTagProperty]
rule :: InvoiceUnit -> RuleProperty
taxInheritanceDisabled :: InvoiceUnit -> Maybe (Value Bool)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
invoiceReceiver :: Value Text
name :: Value Text
resourceTags :: Maybe [ResourceTagProperty]
rule :: RuleProperty
taxInheritanceDisabled :: Maybe (Value Bool)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Invoicing::InvoiceUnit",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
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
"InvoiceReceiver" 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
invoiceReceiver, 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
"Rule" Key -> RuleProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= RuleProperty
rule]
([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
"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 -> [ResourceTagProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ResourceTags" ([ResourceTagProperty] -> (Key, Value))
-> Maybe [ResourceTagProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ResourceTagProperty]
resourceTags,
Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"TaxInheritanceDisabled"
(Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
taxInheritanceDisabled]))}
instance JSON.ToJSON InvoiceUnit where
toJSON :: InvoiceUnit -> Value
toJSON InvoiceUnit {Maybe [ResourceTagProperty]
Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
RuleProperty
haddock_workaround_ :: InvoiceUnit -> ()
description :: InvoiceUnit -> Maybe (Value Text)
invoiceReceiver :: InvoiceUnit -> Value Text
name :: InvoiceUnit -> Value Text
resourceTags :: InvoiceUnit -> Maybe [ResourceTagProperty]
rule :: InvoiceUnit -> RuleProperty
taxInheritanceDisabled :: InvoiceUnit -> Maybe (Value Bool)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
invoiceReceiver :: Value Text
name :: Value Text
resourceTags :: Maybe [ResourceTagProperty]
rule :: RuleProperty
taxInheritanceDisabled :: Maybe (Value Bool)
..}
= [(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
"InvoiceReceiver" 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
invoiceReceiver, 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
"Rule" Key -> RuleProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= RuleProperty
rule]
([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
"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 -> [ResourceTagProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ResourceTags" ([ResourceTagProperty] -> (Key, Value))
-> Maybe [ResourceTagProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ResourceTagProperty]
resourceTags,
Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"TaxInheritanceDisabled"
(Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
taxInheritanceDisabled])))
instance Property "Description" InvoiceUnit where
type PropertyType "Description" InvoiceUnit = Value Prelude.Text
set :: PropertyType "Description" InvoiceUnit
-> InvoiceUnit -> InvoiceUnit
set PropertyType "Description" InvoiceUnit
newValue InvoiceUnit {Maybe [ResourceTagProperty]
Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
RuleProperty
haddock_workaround_ :: InvoiceUnit -> ()
description :: InvoiceUnit -> Maybe (Value Text)
invoiceReceiver :: InvoiceUnit -> Value Text
name :: InvoiceUnit -> Value Text
resourceTags :: InvoiceUnit -> Maybe [ResourceTagProperty]
rule :: InvoiceUnit -> RuleProperty
taxInheritanceDisabled :: InvoiceUnit -> Maybe (Value Bool)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
invoiceReceiver :: Value Text
name :: Value Text
resourceTags :: Maybe [ResourceTagProperty]
rule :: RuleProperty
taxInheritanceDisabled :: Maybe (Value Bool)
..}
= InvoiceUnit {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" InvoiceUnit
Value Text
newValue, Maybe [ResourceTagProperty]
Maybe (Value Bool)
()
Value Text
RuleProperty
haddock_workaround_ :: ()
invoiceReceiver :: Value Text
name :: Value Text
resourceTags :: Maybe [ResourceTagProperty]
rule :: RuleProperty
taxInheritanceDisabled :: Maybe (Value Bool)
haddock_workaround_ :: ()
invoiceReceiver :: Value Text
name :: Value Text
resourceTags :: Maybe [ResourceTagProperty]
rule :: RuleProperty
taxInheritanceDisabled :: Maybe (Value Bool)
..}
instance Property "InvoiceReceiver" InvoiceUnit where
type PropertyType "InvoiceReceiver" InvoiceUnit = Value Prelude.Text
set :: PropertyType "InvoiceReceiver" InvoiceUnit
-> InvoiceUnit -> InvoiceUnit
set PropertyType "InvoiceReceiver" InvoiceUnit
newValue InvoiceUnit {Maybe [ResourceTagProperty]
Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
RuleProperty
haddock_workaround_ :: InvoiceUnit -> ()
description :: InvoiceUnit -> Maybe (Value Text)
invoiceReceiver :: InvoiceUnit -> Value Text
name :: InvoiceUnit -> Value Text
resourceTags :: InvoiceUnit -> Maybe [ResourceTagProperty]
rule :: InvoiceUnit -> RuleProperty
taxInheritanceDisabled :: InvoiceUnit -> Maybe (Value Bool)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
invoiceReceiver :: Value Text
name :: Value Text
resourceTags :: Maybe [ResourceTagProperty]
rule :: RuleProperty
taxInheritanceDisabled :: Maybe (Value Bool)
..}
= InvoiceUnit {invoiceReceiver :: Value Text
invoiceReceiver = PropertyType "InvoiceReceiver" InvoiceUnit
Value Text
newValue, Maybe [ResourceTagProperty]
Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
RuleProperty
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
resourceTags :: Maybe [ResourceTagProperty]
rule :: RuleProperty
taxInheritanceDisabled :: Maybe (Value Bool)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
resourceTags :: Maybe [ResourceTagProperty]
rule :: RuleProperty
taxInheritanceDisabled :: Maybe (Value Bool)
..}
instance Property "Name" InvoiceUnit where
type PropertyType "Name" InvoiceUnit = Value Prelude.Text
set :: PropertyType "Name" InvoiceUnit -> InvoiceUnit -> InvoiceUnit
set PropertyType "Name" InvoiceUnit
newValue InvoiceUnit {Maybe [ResourceTagProperty]
Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
RuleProperty
haddock_workaround_ :: InvoiceUnit -> ()
description :: InvoiceUnit -> Maybe (Value Text)
invoiceReceiver :: InvoiceUnit -> Value Text
name :: InvoiceUnit -> Value Text
resourceTags :: InvoiceUnit -> Maybe [ResourceTagProperty]
rule :: InvoiceUnit -> RuleProperty
taxInheritanceDisabled :: InvoiceUnit -> Maybe (Value Bool)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
invoiceReceiver :: Value Text
name :: Value Text
resourceTags :: Maybe [ResourceTagProperty]
rule :: RuleProperty
taxInheritanceDisabled :: Maybe (Value Bool)
..} = InvoiceUnit {name :: Value Text
name = PropertyType "Name" InvoiceUnit
Value Text
newValue, Maybe [ResourceTagProperty]
Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
RuleProperty
haddock_workaround_ :: ()
description :: Maybe (Value Text)
invoiceReceiver :: Value Text
resourceTags :: Maybe [ResourceTagProperty]
rule :: RuleProperty
taxInheritanceDisabled :: Maybe (Value Bool)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
invoiceReceiver :: Value Text
resourceTags :: Maybe [ResourceTagProperty]
rule :: RuleProperty
taxInheritanceDisabled :: Maybe (Value Bool)
..}
instance Property "ResourceTags" InvoiceUnit where
type PropertyType "ResourceTags" InvoiceUnit = [ResourceTagProperty]
set :: PropertyType "ResourceTags" InvoiceUnit
-> InvoiceUnit -> InvoiceUnit
set PropertyType "ResourceTags" InvoiceUnit
newValue InvoiceUnit {Maybe [ResourceTagProperty]
Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
RuleProperty
haddock_workaround_ :: InvoiceUnit -> ()
description :: InvoiceUnit -> Maybe (Value Text)
invoiceReceiver :: InvoiceUnit -> Value Text
name :: InvoiceUnit -> Value Text
resourceTags :: InvoiceUnit -> Maybe [ResourceTagProperty]
rule :: InvoiceUnit -> RuleProperty
taxInheritanceDisabled :: InvoiceUnit -> Maybe (Value Bool)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
invoiceReceiver :: Value Text
name :: Value Text
resourceTags :: Maybe [ResourceTagProperty]
rule :: RuleProperty
taxInheritanceDisabled :: Maybe (Value Bool)
..}
= InvoiceUnit {resourceTags :: Maybe [ResourceTagProperty]
resourceTags = [ResourceTagProperty] -> Maybe [ResourceTagProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [ResourceTagProperty]
PropertyType "ResourceTags" InvoiceUnit
newValue, Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
RuleProperty
haddock_workaround_ :: ()
description :: Maybe (Value Text)
invoiceReceiver :: Value Text
name :: Value Text
rule :: RuleProperty
taxInheritanceDisabled :: Maybe (Value Bool)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
invoiceReceiver :: Value Text
name :: Value Text
rule :: RuleProperty
taxInheritanceDisabled :: Maybe (Value Bool)
..}
instance Property "Rule" InvoiceUnit where
type PropertyType "Rule" InvoiceUnit = RuleProperty
set :: PropertyType "Rule" InvoiceUnit -> InvoiceUnit -> InvoiceUnit
set PropertyType "Rule" InvoiceUnit
newValue InvoiceUnit {Maybe [ResourceTagProperty]
Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
RuleProperty
haddock_workaround_ :: InvoiceUnit -> ()
description :: InvoiceUnit -> Maybe (Value Text)
invoiceReceiver :: InvoiceUnit -> Value Text
name :: InvoiceUnit -> Value Text
resourceTags :: InvoiceUnit -> Maybe [ResourceTagProperty]
rule :: InvoiceUnit -> RuleProperty
taxInheritanceDisabled :: InvoiceUnit -> Maybe (Value Bool)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
invoiceReceiver :: Value Text
name :: Value Text
resourceTags :: Maybe [ResourceTagProperty]
rule :: RuleProperty
taxInheritanceDisabled :: Maybe (Value Bool)
..} = InvoiceUnit {rule :: RuleProperty
rule = PropertyType "Rule" InvoiceUnit
RuleProperty
newValue, Maybe [ResourceTagProperty]
Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
invoiceReceiver :: Value Text
name :: Value Text
resourceTags :: Maybe [ResourceTagProperty]
taxInheritanceDisabled :: Maybe (Value Bool)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
invoiceReceiver :: Value Text
name :: Value Text
resourceTags :: Maybe [ResourceTagProperty]
taxInheritanceDisabled :: Maybe (Value Bool)
..}
instance Property "TaxInheritanceDisabled" InvoiceUnit where
type PropertyType "TaxInheritanceDisabled" InvoiceUnit = Value Prelude.Bool
set :: PropertyType "TaxInheritanceDisabled" InvoiceUnit
-> InvoiceUnit -> InvoiceUnit
set PropertyType "TaxInheritanceDisabled" InvoiceUnit
newValue InvoiceUnit {Maybe [ResourceTagProperty]
Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
RuleProperty
haddock_workaround_ :: InvoiceUnit -> ()
description :: InvoiceUnit -> Maybe (Value Text)
invoiceReceiver :: InvoiceUnit -> Value Text
name :: InvoiceUnit -> Value Text
resourceTags :: InvoiceUnit -> Maybe [ResourceTagProperty]
rule :: InvoiceUnit -> RuleProperty
taxInheritanceDisabled :: InvoiceUnit -> Maybe (Value Bool)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
invoiceReceiver :: Value Text
name :: Value Text
resourceTags :: Maybe [ResourceTagProperty]
rule :: RuleProperty
taxInheritanceDisabled :: Maybe (Value Bool)
..}
= InvoiceUnit {taxInheritanceDisabled :: Maybe (Value Bool)
taxInheritanceDisabled = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "TaxInheritanceDisabled" InvoiceUnit
Value Bool
newValue, Maybe [ResourceTagProperty]
Maybe (Value Text)
()
Value Text
RuleProperty
haddock_workaround_ :: ()
description :: Maybe (Value Text)
invoiceReceiver :: Value Text
name :: Value Text
resourceTags :: Maybe [ResourceTagProperty]
rule :: RuleProperty
haddock_workaround_ :: ()
description :: Maybe (Value Text)
invoiceReceiver :: Value Text
name :: Value Text
resourceTags :: Maybe [ResourceTagProperty]
rule :: RuleProperty
..}