{-# 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.UpdateTieringInput where
import Amazonka.BillingConductor.Types.UpdateFreeTierConfig
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 UpdateTieringInput = UpdateTieringInput'
{
UpdateTieringInput -> UpdateFreeTierConfig
freeTier :: UpdateFreeTierConfig
}
deriving (UpdateTieringInput -> UpdateTieringInput -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateTieringInput -> UpdateTieringInput -> Bool
$c/= :: UpdateTieringInput -> UpdateTieringInput -> Bool
== :: UpdateTieringInput -> UpdateTieringInput -> Bool
$c== :: UpdateTieringInput -> UpdateTieringInput -> Bool
Prelude.Eq, ReadPrec [UpdateTieringInput]
ReadPrec UpdateTieringInput
Int -> ReadS UpdateTieringInput
ReadS [UpdateTieringInput]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateTieringInput]
$creadListPrec :: ReadPrec [UpdateTieringInput]
readPrec :: ReadPrec UpdateTieringInput
$creadPrec :: ReadPrec UpdateTieringInput
readList :: ReadS [UpdateTieringInput]
$creadList :: ReadS [UpdateTieringInput]
readsPrec :: Int -> ReadS UpdateTieringInput
$creadsPrec :: Int -> ReadS UpdateTieringInput
Prelude.Read, Int -> UpdateTieringInput -> ShowS
[UpdateTieringInput] -> ShowS
UpdateTieringInput -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateTieringInput] -> ShowS
$cshowList :: [UpdateTieringInput] -> ShowS
show :: UpdateTieringInput -> String
$cshow :: UpdateTieringInput -> String
showsPrec :: Int -> UpdateTieringInput -> ShowS
$cshowsPrec :: Int -> UpdateTieringInput -> ShowS
Prelude.Show, forall x. Rep UpdateTieringInput x -> UpdateTieringInput
forall x. UpdateTieringInput -> Rep UpdateTieringInput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateTieringInput x -> UpdateTieringInput
$cfrom :: forall x. UpdateTieringInput -> Rep UpdateTieringInput x
Prelude.Generic)
newUpdateTieringInput ::
UpdateFreeTierConfig ->
UpdateTieringInput
newUpdateTieringInput :: UpdateFreeTierConfig -> UpdateTieringInput
newUpdateTieringInput UpdateFreeTierConfig
pFreeTier_ =
UpdateTieringInput' {$sel:freeTier:UpdateTieringInput' :: UpdateFreeTierConfig
freeTier = UpdateFreeTierConfig
pFreeTier_}
updateTieringInput_freeTier :: Lens.Lens' UpdateTieringInput UpdateFreeTierConfig
updateTieringInput_freeTier :: Lens' UpdateTieringInput UpdateFreeTierConfig
updateTieringInput_freeTier = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTieringInput' {UpdateFreeTierConfig
freeTier :: UpdateFreeTierConfig
$sel:freeTier:UpdateTieringInput' :: UpdateTieringInput -> UpdateFreeTierConfig
freeTier} -> UpdateFreeTierConfig
freeTier) (\s :: UpdateTieringInput
s@UpdateTieringInput' {} UpdateFreeTierConfig
a -> UpdateTieringInput
s {$sel:freeTier:UpdateTieringInput' :: UpdateFreeTierConfig
freeTier = UpdateFreeTierConfig
a} :: UpdateTieringInput)
instance Data.FromJSON UpdateTieringInput where
parseJSON :: Value -> Parser UpdateTieringInput
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"UpdateTieringInput"
( \Object
x ->
UpdateFreeTierConfig -> UpdateTieringInput
UpdateTieringInput'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"FreeTier")
)
instance Prelude.Hashable UpdateTieringInput where
hashWithSalt :: Int -> UpdateTieringInput -> Int
hashWithSalt Int
_salt UpdateTieringInput' {UpdateFreeTierConfig
freeTier :: UpdateFreeTierConfig
$sel:freeTier:UpdateTieringInput' :: UpdateTieringInput -> UpdateFreeTierConfig
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` UpdateFreeTierConfig
freeTier
instance Prelude.NFData UpdateTieringInput where
rnf :: UpdateTieringInput -> ()
rnf UpdateTieringInput' {UpdateFreeTierConfig
freeTier :: UpdateFreeTierConfig
$sel:freeTier:UpdateTieringInput' :: UpdateTieringInput -> UpdateFreeTierConfig
..} = forall a. NFData a => a -> ()
Prelude.rnf UpdateFreeTierConfig
freeTier
instance Data.ToJSON UpdateTieringInput where
toJSON :: UpdateTieringInput -> Value
toJSON UpdateTieringInput' {UpdateFreeTierConfig
freeTier :: UpdateFreeTierConfig
$sel:freeTier:UpdateTieringInput' :: UpdateTieringInput -> UpdateFreeTierConfig
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[forall a. a -> Maybe a
Prelude.Just (Key
"FreeTier" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= UpdateFreeTierConfig
freeTier)]
)