{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.Budgets.Types.CostTypes where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data CostTypes = CostTypes'
{
CostTypes -> Maybe Bool
useAmortized :: Prelude.Maybe Prelude.Bool,
CostTypes -> Maybe Bool
includeRecurring :: Prelude.Maybe Prelude.Bool,
CostTypes -> Maybe Bool
useBlended :: Prelude.Maybe Prelude.Bool,
CostTypes -> Maybe Bool
includeSupport :: Prelude.Maybe Prelude.Bool,
CostTypes -> Maybe Bool
includeDiscount :: Prelude.Maybe Prelude.Bool,
CostTypes -> Maybe Bool
includeSubscription :: Prelude.Maybe Prelude.Bool,
CostTypes -> Maybe Bool
includeRefund :: Prelude.Maybe Prelude.Bool,
CostTypes -> Maybe Bool
includeUpfront :: Prelude.Maybe Prelude.Bool,
CostTypes -> Maybe Bool
includeOtherSubscription :: Prelude.Maybe Prelude.Bool,
CostTypes -> Maybe Bool
includeTax :: Prelude.Maybe Prelude.Bool,
CostTypes -> Maybe Bool
includeCredit :: Prelude.Maybe Prelude.Bool
}
deriving (CostTypes -> CostTypes -> Bool
(CostTypes -> CostTypes -> Bool)
-> (CostTypes -> CostTypes -> Bool) -> Eq CostTypes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CostTypes -> CostTypes -> Bool
$c/= :: CostTypes -> CostTypes -> Bool
== :: CostTypes -> CostTypes -> Bool
$c== :: CostTypes -> CostTypes -> Bool
Prelude.Eq, ReadPrec [CostTypes]
ReadPrec CostTypes
Int -> ReadS CostTypes
ReadS [CostTypes]
(Int -> ReadS CostTypes)
-> ReadS [CostTypes]
-> ReadPrec CostTypes
-> ReadPrec [CostTypes]
-> Read CostTypes
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CostTypes]
$creadListPrec :: ReadPrec [CostTypes]
readPrec :: ReadPrec CostTypes
$creadPrec :: ReadPrec CostTypes
readList :: ReadS [CostTypes]
$creadList :: ReadS [CostTypes]
readsPrec :: Int -> ReadS CostTypes
$creadsPrec :: Int -> ReadS CostTypes
Prelude.Read, Int -> CostTypes -> ShowS
[CostTypes] -> ShowS
CostTypes -> String
(Int -> CostTypes -> ShowS)
-> (CostTypes -> String)
-> ([CostTypes] -> ShowS)
-> Show CostTypes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CostTypes] -> ShowS
$cshowList :: [CostTypes] -> ShowS
show :: CostTypes -> String
$cshow :: CostTypes -> String
showsPrec :: Int -> CostTypes -> ShowS
$cshowsPrec :: Int -> CostTypes -> ShowS
Prelude.Show, (forall x. CostTypes -> Rep CostTypes x)
-> (forall x. Rep CostTypes x -> CostTypes) -> Generic CostTypes
forall x. Rep CostTypes x -> CostTypes
forall x. CostTypes -> Rep CostTypes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CostTypes x -> CostTypes
$cfrom :: forall x. CostTypes -> Rep CostTypes x
Prelude.Generic)
newCostTypes ::
CostTypes
newCostTypes :: CostTypes
newCostTypes =
CostTypes' :: Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> CostTypes
CostTypes'
{ $sel:useAmortized:CostTypes' :: Maybe Bool
useAmortized = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:includeRecurring:CostTypes' :: Maybe Bool
includeRecurring = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:useBlended:CostTypes' :: Maybe Bool
useBlended = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:includeSupport:CostTypes' :: Maybe Bool
includeSupport = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:includeDiscount:CostTypes' :: Maybe Bool
includeDiscount = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:includeSubscription:CostTypes' :: Maybe Bool
includeSubscription = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:includeRefund:CostTypes' :: Maybe Bool
includeRefund = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:includeUpfront:CostTypes' :: Maybe Bool
includeUpfront = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:includeOtherSubscription:CostTypes' :: Maybe Bool
includeOtherSubscription = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:includeTax:CostTypes' :: Maybe Bool
includeTax = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:includeCredit:CostTypes' :: Maybe Bool
includeCredit = Maybe Bool
forall a. Maybe a
Prelude.Nothing
}
costTypes_useAmortized :: Lens.Lens' CostTypes (Prelude.Maybe Prelude.Bool)
costTypes_useAmortized :: (Maybe Bool -> f (Maybe Bool)) -> CostTypes -> f CostTypes
costTypes_useAmortized = (CostTypes -> Maybe Bool)
-> (CostTypes -> Maybe Bool -> CostTypes)
-> Lens CostTypes CostTypes (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CostTypes' {Maybe Bool
useAmortized :: Maybe Bool
$sel:useAmortized:CostTypes' :: CostTypes -> Maybe Bool
useAmortized} -> Maybe Bool
useAmortized) (\s :: CostTypes
s@CostTypes' {} Maybe Bool
a -> CostTypes
s {$sel:useAmortized:CostTypes' :: Maybe Bool
useAmortized = Maybe Bool
a} :: CostTypes)
costTypes_includeRecurring :: Lens.Lens' CostTypes (Prelude.Maybe Prelude.Bool)
costTypes_includeRecurring :: (Maybe Bool -> f (Maybe Bool)) -> CostTypes -> f CostTypes
costTypes_includeRecurring = (CostTypes -> Maybe Bool)
-> (CostTypes -> Maybe Bool -> CostTypes)
-> Lens CostTypes CostTypes (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CostTypes' {Maybe Bool
includeRecurring :: Maybe Bool
$sel:includeRecurring:CostTypes' :: CostTypes -> Maybe Bool
includeRecurring} -> Maybe Bool
includeRecurring) (\s :: CostTypes
s@CostTypes' {} Maybe Bool
a -> CostTypes
s {$sel:includeRecurring:CostTypes' :: Maybe Bool
includeRecurring = Maybe Bool
a} :: CostTypes)
costTypes_useBlended :: Lens.Lens' CostTypes (Prelude.Maybe Prelude.Bool)
costTypes_useBlended :: (Maybe Bool -> f (Maybe Bool)) -> CostTypes -> f CostTypes
costTypes_useBlended = (CostTypes -> Maybe Bool)
-> (CostTypes -> Maybe Bool -> CostTypes)
-> Lens CostTypes CostTypes (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CostTypes' {Maybe Bool
useBlended :: Maybe Bool
$sel:useBlended:CostTypes' :: CostTypes -> Maybe Bool
useBlended} -> Maybe Bool
useBlended) (\s :: CostTypes
s@CostTypes' {} Maybe Bool
a -> CostTypes
s {$sel:useBlended:CostTypes' :: Maybe Bool
useBlended = Maybe Bool
a} :: CostTypes)
costTypes_includeSupport :: Lens.Lens' CostTypes (Prelude.Maybe Prelude.Bool)
costTypes_includeSupport :: (Maybe Bool -> f (Maybe Bool)) -> CostTypes -> f CostTypes
costTypes_includeSupport = (CostTypes -> Maybe Bool)
-> (CostTypes -> Maybe Bool -> CostTypes)
-> Lens CostTypes CostTypes (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CostTypes' {Maybe Bool
includeSupport :: Maybe Bool
$sel:includeSupport:CostTypes' :: CostTypes -> Maybe Bool
includeSupport} -> Maybe Bool
includeSupport) (\s :: CostTypes
s@CostTypes' {} Maybe Bool
a -> CostTypes
s {$sel:includeSupport:CostTypes' :: Maybe Bool
includeSupport = Maybe Bool
a} :: CostTypes)
costTypes_includeDiscount :: Lens.Lens' CostTypes (Prelude.Maybe Prelude.Bool)
costTypes_includeDiscount :: (Maybe Bool -> f (Maybe Bool)) -> CostTypes -> f CostTypes
costTypes_includeDiscount = (CostTypes -> Maybe Bool)
-> (CostTypes -> Maybe Bool -> CostTypes)
-> Lens CostTypes CostTypes (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CostTypes' {Maybe Bool
includeDiscount :: Maybe Bool
$sel:includeDiscount:CostTypes' :: CostTypes -> Maybe Bool
includeDiscount} -> Maybe Bool
includeDiscount) (\s :: CostTypes
s@CostTypes' {} Maybe Bool
a -> CostTypes
s {$sel:includeDiscount:CostTypes' :: Maybe Bool
includeDiscount = Maybe Bool
a} :: CostTypes)
costTypes_includeSubscription :: Lens.Lens' CostTypes (Prelude.Maybe Prelude.Bool)
costTypes_includeSubscription :: (Maybe Bool -> f (Maybe Bool)) -> CostTypes -> f CostTypes
costTypes_includeSubscription = (CostTypes -> Maybe Bool)
-> (CostTypes -> Maybe Bool -> CostTypes)
-> Lens CostTypes CostTypes (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CostTypes' {Maybe Bool
includeSubscription :: Maybe Bool
$sel:includeSubscription:CostTypes' :: CostTypes -> Maybe Bool
includeSubscription} -> Maybe Bool
includeSubscription) (\s :: CostTypes
s@CostTypes' {} Maybe Bool
a -> CostTypes
s {$sel:includeSubscription:CostTypes' :: Maybe Bool
includeSubscription = Maybe Bool
a} :: CostTypes)
costTypes_includeRefund :: Lens.Lens' CostTypes (Prelude.Maybe Prelude.Bool)
costTypes_includeRefund :: (Maybe Bool -> f (Maybe Bool)) -> CostTypes -> f CostTypes
costTypes_includeRefund = (CostTypes -> Maybe Bool)
-> (CostTypes -> Maybe Bool -> CostTypes)
-> Lens CostTypes CostTypes (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CostTypes' {Maybe Bool
includeRefund :: Maybe Bool
$sel:includeRefund:CostTypes' :: CostTypes -> Maybe Bool
includeRefund} -> Maybe Bool
includeRefund) (\s :: CostTypes
s@CostTypes' {} Maybe Bool
a -> CostTypes
s {$sel:includeRefund:CostTypes' :: Maybe Bool
includeRefund = Maybe Bool
a} :: CostTypes)
costTypes_includeUpfront :: Lens.Lens' CostTypes (Prelude.Maybe Prelude.Bool)
costTypes_includeUpfront :: (Maybe Bool -> f (Maybe Bool)) -> CostTypes -> f CostTypes
costTypes_includeUpfront = (CostTypes -> Maybe Bool)
-> (CostTypes -> Maybe Bool -> CostTypes)
-> Lens CostTypes CostTypes (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CostTypes' {Maybe Bool
includeUpfront :: Maybe Bool
$sel:includeUpfront:CostTypes' :: CostTypes -> Maybe Bool
includeUpfront} -> Maybe Bool
includeUpfront) (\s :: CostTypes
s@CostTypes' {} Maybe Bool
a -> CostTypes
s {$sel:includeUpfront:CostTypes' :: Maybe Bool
includeUpfront = Maybe Bool
a} :: CostTypes)
costTypes_includeOtherSubscription :: Lens.Lens' CostTypes (Prelude.Maybe Prelude.Bool)
costTypes_includeOtherSubscription :: (Maybe Bool -> f (Maybe Bool)) -> CostTypes -> f CostTypes
costTypes_includeOtherSubscription = (CostTypes -> Maybe Bool)
-> (CostTypes -> Maybe Bool -> CostTypes)
-> Lens CostTypes CostTypes (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CostTypes' {Maybe Bool
includeOtherSubscription :: Maybe Bool
$sel:includeOtherSubscription:CostTypes' :: CostTypes -> Maybe Bool
includeOtherSubscription} -> Maybe Bool
includeOtherSubscription) (\s :: CostTypes
s@CostTypes' {} Maybe Bool
a -> CostTypes
s {$sel:includeOtherSubscription:CostTypes' :: Maybe Bool
includeOtherSubscription = Maybe Bool
a} :: CostTypes)
costTypes_includeTax :: Lens.Lens' CostTypes (Prelude.Maybe Prelude.Bool)
costTypes_includeTax :: (Maybe Bool -> f (Maybe Bool)) -> CostTypes -> f CostTypes
costTypes_includeTax = (CostTypes -> Maybe Bool)
-> (CostTypes -> Maybe Bool -> CostTypes)
-> Lens CostTypes CostTypes (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CostTypes' {Maybe Bool
includeTax :: Maybe Bool
$sel:includeTax:CostTypes' :: CostTypes -> Maybe Bool
includeTax} -> Maybe Bool
includeTax) (\s :: CostTypes
s@CostTypes' {} Maybe Bool
a -> CostTypes
s {$sel:includeTax:CostTypes' :: Maybe Bool
includeTax = Maybe Bool
a} :: CostTypes)
costTypes_includeCredit :: Lens.Lens' CostTypes (Prelude.Maybe Prelude.Bool)
costTypes_includeCredit :: (Maybe Bool -> f (Maybe Bool)) -> CostTypes -> f CostTypes
costTypes_includeCredit = (CostTypes -> Maybe Bool)
-> (CostTypes -> Maybe Bool -> CostTypes)
-> Lens CostTypes CostTypes (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CostTypes' {Maybe Bool
includeCredit :: Maybe Bool
$sel:includeCredit:CostTypes' :: CostTypes -> Maybe Bool
includeCredit} -> Maybe Bool
includeCredit) (\s :: CostTypes
s@CostTypes' {} Maybe Bool
a -> CostTypes
s {$sel:includeCredit:CostTypes' :: Maybe Bool
includeCredit = Maybe Bool
a} :: CostTypes)
instance Core.FromJSON CostTypes where
parseJSON :: Value -> Parser CostTypes
parseJSON =
String -> (Object -> Parser CostTypes) -> Value -> Parser CostTypes
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"CostTypes"
( \Object
x ->
Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> CostTypes
CostTypes'
(Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> CostTypes)
-> Parser (Maybe Bool)
-> Parser
(Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> CostTypes)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"UseAmortized")
Parser
(Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> CostTypes)
-> Parser (Maybe Bool)
-> Parser
(Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> CostTypes)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"IncludeRecurring")
Parser
(Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> CostTypes)
-> Parser (Maybe Bool)
-> Parser
(Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> CostTypes)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"UseBlended")
Parser
(Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> CostTypes)
-> Parser (Maybe Bool)
-> Parser
(Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> CostTypes)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"IncludeSupport")
Parser
(Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> CostTypes)
-> Parser (Maybe Bool)
-> Parser
(Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> CostTypes)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"IncludeDiscount")
Parser
(Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> CostTypes)
-> Parser (Maybe Bool)
-> Parser
(Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> CostTypes)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"IncludeSubscription")
Parser
(Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> CostTypes)
-> Parser (Maybe Bool)
-> Parser
(Maybe Bool -> Maybe Bool -> Maybe Bool -> Maybe Bool -> CostTypes)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"IncludeRefund")
Parser
(Maybe Bool -> Maybe Bool -> Maybe Bool -> Maybe Bool -> CostTypes)
-> Parser (Maybe Bool)
-> Parser (Maybe Bool -> Maybe Bool -> Maybe Bool -> CostTypes)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"IncludeUpfront")
Parser (Maybe Bool -> Maybe Bool -> Maybe Bool -> CostTypes)
-> Parser (Maybe Bool)
-> Parser (Maybe Bool -> Maybe Bool -> CostTypes)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"IncludeOtherSubscription")
Parser (Maybe Bool -> Maybe Bool -> CostTypes)
-> Parser (Maybe Bool) -> Parser (Maybe Bool -> CostTypes)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"IncludeTax")
Parser (Maybe Bool -> CostTypes)
-> Parser (Maybe Bool) -> Parser CostTypes
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"IncludeCredit")
)
instance Prelude.Hashable CostTypes
instance Prelude.NFData CostTypes
instance Core.ToJSON CostTypes where
toJSON :: CostTypes -> Value
toJSON CostTypes' {Maybe Bool
includeCredit :: Maybe Bool
includeTax :: Maybe Bool
includeOtherSubscription :: Maybe Bool
includeUpfront :: Maybe Bool
includeRefund :: Maybe Bool
includeSubscription :: Maybe Bool
includeDiscount :: Maybe Bool
includeSupport :: Maybe Bool
useBlended :: Maybe Bool
includeRecurring :: Maybe Bool
useAmortized :: Maybe Bool
$sel:includeCredit:CostTypes' :: CostTypes -> Maybe Bool
$sel:includeTax:CostTypes' :: CostTypes -> Maybe Bool
$sel:includeOtherSubscription:CostTypes' :: CostTypes -> Maybe Bool
$sel:includeUpfront:CostTypes' :: CostTypes -> Maybe Bool
$sel:includeRefund:CostTypes' :: CostTypes -> Maybe Bool
$sel:includeSubscription:CostTypes' :: CostTypes -> Maybe Bool
$sel:includeDiscount:CostTypes' :: CostTypes -> Maybe Bool
$sel:includeSupport:CostTypes' :: CostTypes -> Maybe Bool
$sel:useBlended:CostTypes' :: CostTypes -> Maybe Bool
$sel:includeRecurring:CostTypes' :: CostTypes -> Maybe Bool
$sel:useAmortized:CostTypes' :: CostTypes -> Maybe Bool
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"UseAmortized" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
useAmortized,
(Text
"IncludeRecurring" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
includeRecurring,
(Text
"UseBlended" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
useBlended,
(Text
"IncludeSupport" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
includeSupport,
(Text
"IncludeDiscount" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
includeDiscount,
(Text
"IncludeSubscription" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
includeSubscription,
(Text
"IncludeRefund" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
includeRefund,
(Text
"IncludeUpfront" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
includeUpfront,
(Text
"IncludeOtherSubscription" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
includeOtherSubscription,
(Text
"IncludeTax" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
includeTax,
(Text
"IncludeCredit" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
includeCredit
]
)