{-# 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.BillingConductor.Types.BillingGroupCostReportElement where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data BillingGroupCostReportElement = BillingGroupCostReportElement'
{
BillingGroupCostReportElement -> Maybe Text
aWSCost :: Prelude.Maybe Prelude.Text,
BillingGroupCostReportElement -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
BillingGroupCostReportElement -> Maybe Text
currency :: Prelude.Maybe Prelude.Text,
BillingGroupCostReportElement -> Maybe Text
margin :: Prelude.Maybe Prelude.Text,
BillingGroupCostReportElement -> Maybe Text
marginPercentage :: Prelude.Maybe Prelude.Text,
BillingGroupCostReportElement -> Maybe Text
proformaCost :: Prelude.Maybe Prelude.Text
}
deriving (BillingGroupCostReportElement
-> BillingGroupCostReportElement -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BillingGroupCostReportElement
-> BillingGroupCostReportElement -> Bool
$c/= :: BillingGroupCostReportElement
-> BillingGroupCostReportElement -> Bool
== :: BillingGroupCostReportElement
-> BillingGroupCostReportElement -> Bool
$c== :: BillingGroupCostReportElement
-> BillingGroupCostReportElement -> Bool
Prelude.Eq, ReadPrec [BillingGroupCostReportElement]
ReadPrec BillingGroupCostReportElement
Int -> ReadS BillingGroupCostReportElement
ReadS [BillingGroupCostReportElement]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BillingGroupCostReportElement]
$creadListPrec :: ReadPrec [BillingGroupCostReportElement]
readPrec :: ReadPrec BillingGroupCostReportElement
$creadPrec :: ReadPrec BillingGroupCostReportElement
readList :: ReadS [BillingGroupCostReportElement]
$creadList :: ReadS [BillingGroupCostReportElement]
readsPrec :: Int -> ReadS BillingGroupCostReportElement
$creadsPrec :: Int -> ReadS BillingGroupCostReportElement
Prelude.Read, Int -> BillingGroupCostReportElement -> ShowS
[BillingGroupCostReportElement] -> ShowS
BillingGroupCostReportElement -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BillingGroupCostReportElement] -> ShowS
$cshowList :: [BillingGroupCostReportElement] -> ShowS
show :: BillingGroupCostReportElement -> String
$cshow :: BillingGroupCostReportElement -> String
showsPrec :: Int -> BillingGroupCostReportElement -> ShowS
$cshowsPrec :: Int -> BillingGroupCostReportElement -> ShowS
Prelude.Show, forall x.
Rep BillingGroupCostReportElement x
-> BillingGroupCostReportElement
forall x.
BillingGroupCostReportElement
-> Rep BillingGroupCostReportElement x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BillingGroupCostReportElement x
-> BillingGroupCostReportElement
$cfrom :: forall x.
BillingGroupCostReportElement
-> Rep BillingGroupCostReportElement x
Prelude.Generic)
newBillingGroupCostReportElement ::
BillingGroupCostReportElement
newBillingGroupCostReportElement :: BillingGroupCostReportElement
newBillingGroupCostReportElement =
BillingGroupCostReportElement'
{ $sel:aWSCost:BillingGroupCostReportElement' :: Maybe Text
aWSCost =
forall a. Maybe a
Prelude.Nothing,
$sel:arn:BillingGroupCostReportElement' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
$sel:currency:BillingGroupCostReportElement' :: Maybe Text
currency = forall a. Maybe a
Prelude.Nothing,
$sel:margin:BillingGroupCostReportElement' :: Maybe Text
margin = forall a. Maybe a
Prelude.Nothing,
$sel:marginPercentage:BillingGroupCostReportElement' :: Maybe Text
marginPercentage = forall a. Maybe a
Prelude.Nothing,
$sel:proformaCost:BillingGroupCostReportElement' :: Maybe Text
proformaCost = forall a. Maybe a
Prelude.Nothing
}
billingGroupCostReportElement_aWSCost :: Lens.Lens' BillingGroupCostReportElement (Prelude.Maybe Prelude.Text)
billingGroupCostReportElement_aWSCost :: Lens' BillingGroupCostReportElement (Maybe Text)
billingGroupCostReportElement_aWSCost = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BillingGroupCostReportElement' {Maybe Text
aWSCost :: Maybe Text
$sel:aWSCost:BillingGroupCostReportElement' :: BillingGroupCostReportElement -> Maybe Text
aWSCost} -> Maybe Text
aWSCost) (\s :: BillingGroupCostReportElement
s@BillingGroupCostReportElement' {} Maybe Text
a -> BillingGroupCostReportElement
s {$sel:aWSCost:BillingGroupCostReportElement' :: Maybe Text
aWSCost = Maybe Text
a} :: BillingGroupCostReportElement)
billingGroupCostReportElement_arn :: Lens.Lens' BillingGroupCostReportElement (Prelude.Maybe Prelude.Text)
billingGroupCostReportElement_arn :: Lens' BillingGroupCostReportElement (Maybe Text)
billingGroupCostReportElement_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BillingGroupCostReportElement' {Maybe Text
arn :: Maybe Text
$sel:arn:BillingGroupCostReportElement' :: BillingGroupCostReportElement -> Maybe Text
arn} -> Maybe Text
arn) (\s :: BillingGroupCostReportElement
s@BillingGroupCostReportElement' {} Maybe Text
a -> BillingGroupCostReportElement
s {$sel:arn:BillingGroupCostReportElement' :: Maybe Text
arn = Maybe Text
a} :: BillingGroupCostReportElement)
billingGroupCostReportElement_currency :: Lens.Lens' BillingGroupCostReportElement (Prelude.Maybe Prelude.Text)
billingGroupCostReportElement_currency :: Lens' BillingGroupCostReportElement (Maybe Text)
billingGroupCostReportElement_currency = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BillingGroupCostReportElement' {Maybe Text
currency :: Maybe Text
$sel:currency:BillingGroupCostReportElement' :: BillingGroupCostReportElement -> Maybe Text
currency} -> Maybe Text
currency) (\s :: BillingGroupCostReportElement
s@BillingGroupCostReportElement' {} Maybe Text
a -> BillingGroupCostReportElement
s {$sel:currency:BillingGroupCostReportElement' :: Maybe Text
currency = Maybe Text
a} :: BillingGroupCostReportElement)
billingGroupCostReportElement_margin :: Lens.Lens' BillingGroupCostReportElement (Prelude.Maybe Prelude.Text)
billingGroupCostReportElement_margin :: Lens' BillingGroupCostReportElement (Maybe Text)
billingGroupCostReportElement_margin = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BillingGroupCostReportElement' {Maybe Text
margin :: Maybe Text
$sel:margin:BillingGroupCostReportElement' :: BillingGroupCostReportElement -> Maybe Text
margin} -> Maybe Text
margin) (\s :: BillingGroupCostReportElement
s@BillingGroupCostReportElement' {} Maybe Text
a -> BillingGroupCostReportElement
s {$sel:margin:BillingGroupCostReportElement' :: Maybe Text
margin = Maybe Text
a} :: BillingGroupCostReportElement)
billingGroupCostReportElement_marginPercentage :: Lens.Lens' BillingGroupCostReportElement (Prelude.Maybe Prelude.Text)
billingGroupCostReportElement_marginPercentage :: Lens' BillingGroupCostReportElement (Maybe Text)
billingGroupCostReportElement_marginPercentage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BillingGroupCostReportElement' {Maybe Text
marginPercentage :: Maybe Text
$sel:marginPercentage:BillingGroupCostReportElement' :: BillingGroupCostReportElement -> Maybe Text
marginPercentage} -> Maybe Text
marginPercentage) (\s :: BillingGroupCostReportElement
s@BillingGroupCostReportElement' {} Maybe Text
a -> BillingGroupCostReportElement
s {$sel:marginPercentage:BillingGroupCostReportElement' :: Maybe Text
marginPercentage = Maybe Text
a} :: BillingGroupCostReportElement)
billingGroupCostReportElement_proformaCost :: Lens.Lens' BillingGroupCostReportElement (Prelude.Maybe Prelude.Text)
billingGroupCostReportElement_proformaCost :: Lens' BillingGroupCostReportElement (Maybe Text)
billingGroupCostReportElement_proformaCost = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BillingGroupCostReportElement' {Maybe Text
proformaCost :: Maybe Text
$sel:proformaCost:BillingGroupCostReportElement' :: BillingGroupCostReportElement -> Maybe Text
proformaCost} -> Maybe Text
proformaCost) (\s :: BillingGroupCostReportElement
s@BillingGroupCostReportElement' {} Maybe Text
a -> BillingGroupCostReportElement
s {$sel:proformaCost:BillingGroupCostReportElement' :: Maybe Text
proformaCost = Maybe Text
a} :: BillingGroupCostReportElement)
instance Data.FromJSON BillingGroupCostReportElement where
parseJSON :: Value -> Parser BillingGroupCostReportElement
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"BillingGroupCostReportElement"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> BillingGroupCostReportElement
BillingGroupCostReportElement'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"AWSCost")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Arn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Currency")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Margin")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"MarginPercentage")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ProformaCost")
)
instance
Prelude.Hashable
BillingGroupCostReportElement
where
hashWithSalt :: Int -> BillingGroupCostReportElement -> Int
hashWithSalt Int
_salt BillingGroupCostReportElement' {Maybe Text
proformaCost :: Maybe Text
marginPercentage :: Maybe Text
margin :: Maybe Text
currency :: Maybe Text
arn :: Maybe Text
aWSCost :: Maybe Text
$sel:proformaCost:BillingGroupCostReportElement' :: BillingGroupCostReportElement -> Maybe Text
$sel:marginPercentage:BillingGroupCostReportElement' :: BillingGroupCostReportElement -> Maybe Text
$sel:margin:BillingGroupCostReportElement' :: BillingGroupCostReportElement -> Maybe Text
$sel:currency:BillingGroupCostReportElement' :: BillingGroupCostReportElement -> Maybe Text
$sel:arn:BillingGroupCostReportElement' :: BillingGroupCostReportElement -> Maybe Text
$sel:aWSCost:BillingGroupCostReportElement' :: BillingGroupCostReportElement -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
aWSCost
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
currency
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
margin
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
marginPercentage
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
proformaCost
instance Prelude.NFData BillingGroupCostReportElement where
rnf :: BillingGroupCostReportElement -> ()
rnf BillingGroupCostReportElement' {Maybe Text
proformaCost :: Maybe Text
marginPercentage :: Maybe Text
margin :: Maybe Text
currency :: Maybe Text
arn :: Maybe Text
aWSCost :: Maybe Text
$sel:proformaCost:BillingGroupCostReportElement' :: BillingGroupCostReportElement -> Maybe Text
$sel:marginPercentage:BillingGroupCostReportElement' :: BillingGroupCostReportElement -> Maybe Text
$sel:margin:BillingGroupCostReportElement' :: BillingGroupCostReportElement -> Maybe Text
$sel:currency:BillingGroupCostReportElement' :: BillingGroupCostReportElement -> Maybe Text
$sel:arn:BillingGroupCostReportElement' :: BillingGroupCostReportElement -> Maybe Text
$sel:aWSCost:BillingGroupCostReportElement' :: BillingGroupCostReportElement -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
aWSCost
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
currency
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
margin
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
marginPercentage
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
proformaCost