{-# 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.RDS.Types.ReservedDBInstance where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.RDS.Types.RecurringCharge
data ReservedDBInstance = ReservedDBInstance'
{
ReservedDBInstance -> Maybe Int
dbInstanceCount :: Prelude.Maybe Prelude.Int,
ReservedDBInstance -> Maybe Text
state :: Prelude.Maybe Prelude.Text,
ReservedDBInstance -> Maybe Text
currencyCode :: Prelude.Maybe Prelude.Text,
ReservedDBInstance -> Maybe ISO8601
startTime :: Prelude.Maybe Core.ISO8601,
ReservedDBInstance -> Maybe Text
productDescription :: Prelude.Maybe Prelude.Text,
ReservedDBInstance -> Maybe Text
leaseId :: Prelude.Maybe Prelude.Text,
ReservedDBInstance -> Maybe Text
reservedDBInstanceId :: Prelude.Maybe Prelude.Text,
ReservedDBInstance -> Maybe Text
reservedDBInstanceArn :: Prelude.Maybe Prelude.Text,
ReservedDBInstance -> Maybe Text
dbInstanceClass :: Prelude.Maybe Prelude.Text,
ReservedDBInstance -> Maybe Bool
multiAZ :: Prelude.Maybe Prelude.Bool,
ReservedDBInstance -> Maybe Text
reservedDBInstancesOfferingId :: Prelude.Maybe Prelude.Text,
ReservedDBInstance -> Maybe [RecurringCharge]
recurringCharges :: Prelude.Maybe [RecurringCharge],
ReservedDBInstance -> Maybe Text
offeringType :: Prelude.Maybe Prelude.Text,
ReservedDBInstance -> Maybe Double
usagePrice :: Prelude.Maybe Prelude.Double,
ReservedDBInstance -> Maybe Double
fixedPrice :: Prelude.Maybe Prelude.Double,
ReservedDBInstance -> Maybe Int
duration :: Prelude.Maybe Prelude.Int
}
deriving (ReservedDBInstance -> ReservedDBInstance -> Bool
(ReservedDBInstance -> ReservedDBInstance -> Bool)
-> (ReservedDBInstance -> ReservedDBInstance -> Bool)
-> Eq ReservedDBInstance
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ReservedDBInstance -> ReservedDBInstance -> Bool
$c/= :: ReservedDBInstance -> ReservedDBInstance -> Bool
== :: ReservedDBInstance -> ReservedDBInstance -> Bool
$c== :: ReservedDBInstance -> ReservedDBInstance -> Bool
Prelude.Eq, ReadPrec [ReservedDBInstance]
ReadPrec ReservedDBInstance
Int -> ReadS ReservedDBInstance
ReadS [ReservedDBInstance]
(Int -> ReadS ReservedDBInstance)
-> ReadS [ReservedDBInstance]
-> ReadPrec ReservedDBInstance
-> ReadPrec [ReservedDBInstance]
-> Read ReservedDBInstance
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ReservedDBInstance]
$creadListPrec :: ReadPrec [ReservedDBInstance]
readPrec :: ReadPrec ReservedDBInstance
$creadPrec :: ReadPrec ReservedDBInstance
readList :: ReadS [ReservedDBInstance]
$creadList :: ReadS [ReservedDBInstance]
readsPrec :: Int -> ReadS ReservedDBInstance
$creadsPrec :: Int -> ReadS ReservedDBInstance
Prelude.Read, Int -> ReservedDBInstance -> ShowS
[ReservedDBInstance] -> ShowS
ReservedDBInstance -> String
(Int -> ReservedDBInstance -> ShowS)
-> (ReservedDBInstance -> String)
-> ([ReservedDBInstance] -> ShowS)
-> Show ReservedDBInstance
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ReservedDBInstance] -> ShowS
$cshowList :: [ReservedDBInstance] -> ShowS
show :: ReservedDBInstance -> String
$cshow :: ReservedDBInstance -> String
showsPrec :: Int -> ReservedDBInstance -> ShowS
$cshowsPrec :: Int -> ReservedDBInstance -> ShowS
Prelude.Show, (forall x. ReservedDBInstance -> Rep ReservedDBInstance x)
-> (forall x. Rep ReservedDBInstance x -> ReservedDBInstance)
-> Generic ReservedDBInstance
forall x. Rep ReservedDBInstance x -> ReservedDBInstance
forall x. ReservedDBInstance -> Rep ReservedDBInstance x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ReservedDBInstance x -> ReservedDBInstance
$cfrom :: forall x. ReservedDBInstance -> Rep ReservedDBInstance x
Prelude.Generic)
newReservedDBInstance ::
ReservedDBInstance
newReservedDBInstance :: ReservedDBInstance
newReservedDBInstance =
ReservedDBInstance' :: Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe [RecurringCharge]
-> Maybe Text
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> ReservedDBInstance
ReservedDBInstance'
{ $sel:dbInstanceCount:ReservedDBInstance' :: Maybe Int
dbInstanceCount =
Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:state:ReservedDBInstance' :: Maybe Text
state = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:currencyCode:ReservedDBInstance' :: Maybe Text
currencyCode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:startTime:ReservedDBInstance' :: Maybe ISO8601
startTime = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
$sel:productDescription:ReservedDBInstance' :: Maybe Text
productDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:leaseId:ReservedDBInstance' :: Maybe Text
leaseId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:reservedDBInstanceId:ReservedDBInstance' :: Maybe Text
reservedDBInstanceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:reservedDBInstanceArn:ReservedDBInstance' :: Maybe Text
reservedDBInstanceArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:dbInstanceClass:ReservedDBInstance' :: Maybe Text
dbInstanceClass = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:multiAZ:ReservedDBInstance' :: Maybe Bool
multiAZ = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:reservedDBInstancesOfferingId:ReservedDBInstance' :: Maybe Text
reservedDBInstancesOfferingId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:recurringCharges:ReservedDBInstance' :: Maybe [RecurringCharge]
recurringCharges = Maybe [RecurringCharge]
forall a. Maybe a
Prelude.Nothing,
$sel:offeringType:ReservedDBInstance' :: Maybe Text
offeringType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:usagePrice:ReservedDBInstance' :: Maybe Double
usagePrice = Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:fixedPrice:ReservedDBInstance' :: Maybe Double
fixedPrice = Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:duration:ReservedDBInstance' :: Maybe Int
duration = Maybe Int
forall a. Maybe a
Prelude.Nothing
}
reservedDBInstance_dbInstanceCount :: Lens.Lens' ReservedDBInstance (Prelude.Maybe Prelude.Int)
reservedDBInstance_dbInstanceCount :: (Maybe Int -> f (Maybe Int))
-> ReservedDBInstance -> f ReservedDBInstance
reservedDBInstance_dbInstanceCount = (ReservedDBInstance -> Maybe Int)
-> (ReservedDBInstance -> Maybe Int -> ReservedDBInstance)
-> Lens
ReservedDBInstance ReservedDBInstance (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservedDBInstance' {Maybe Int
dbInstanceCount :: Maybe Int
$sel:dbInstanceCount:ReservedDBInstance' :: ReservedDBInstance -> Maybe Int
dbInstanceCount} -> Maybe Int
dbInstanceCount) (\s :: ReservedDBInstance
s@ReservedDBInstance' {} Maybe Int
a -> ReservedDBInstance
s {$sel:dbInstanceCount:ReservedDBInstance' :: Maybe Int
dbInstanceCount = Maybe Int
a} :: ReservedDBInstance)
reservedDBInstance_state :: Lens.Lens' ReservedDBInstance (Prelude.Maybe Prelude.Text)
reservedDBInstance_state :: (Maybe Text -> f (Maybe Text))
-> ReservedDBInstance -> f ReservedDBInstance
reservedDBInstance_state = (ReservedDBInstance -> Maybe Text)
-> (ReservedDBInstance -> Maybe Text -> ReservedDBInstance)
-> Lens
ReservedDBInstance ReservedDBInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservedDBInstance' {Maybe Text
state :: Maybe Text
$sel:state:ReservedDBInstance' :: ReservedDBInstance -> Maybe Text
state} -> Maybe Text
state) (\s :: ReservedDBInstance
s@ReservedDBInstance' {} Maybe Text
a -> ReservedDBInstance
s {$sel:state:ReservedDBInstance' :: Maybe Text
state = Maybe Text
a} :: ReservedDBInstance)
reservedDBInstance_currencyCode :: Lens.Lens' ReservedDBInstance (Prelude.Maybe Prelude.Text)
reservedDBInstance_currencyCode :: (Maybe Text -> f (Maybe Text))
-> ReservedDBInstance -> f ReservedDBInstance
reservedDBInstance_currencyCode = (ReservedDBInstance -> Maybe Text)
-> (ReservedDBInstance -> Maybe Text -> ReservedDBInstance)
-> Lens
ReservedDBInstance ReservedDBInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservedDBInstance' {Maybe Text
currencyCode :: Maybe Text
$sel:currencyCode:ReservedDBInstance' :: ReservedDBInstance -> Maybe Text
currencyCode} -> Maybe Text
currencyCode) (\s :: ReservedDBInstance
s@ReservedDBInstance' {} Maybe Text
a -> ReservedDBInstance
s {$sel:currencyCode:ReservedDBInstance' :: Maybe Text
currencyCode = Maybe Text
a} :: ReservedDBInstance)
reservedDBInstance_startTime :: Lens.Lens' ReservedDBInstance (Prelude.Maybe Prelude.UTCTime)
reservedDBInstance_startTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ReservedDBInstance -> f ReservedDBInstance
reservedDBInstance_startTime = (ReservedDBInstance -> Maybe ISO8601)
-> (ReservedDBInstance -> Maybe ISO8601 -> ReservedDBInstance)
-> Lens
ReservedDBInstance
ReservedDBInstance
(Maybe ISO8601)
(Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservedDBInstance' {Maybe ISO8601
startTime :: Maybe ISO8601
$sel:startTime:ReservedDBInstance' :: ReservedDBInstance -> Maybe ISO8601
startTime} -> Maybe ISO8601
startTime) (\s :: ReservedDBInstance
s@ReservedDBInstance' {} Maybe ISO8601
a -> ReservedDBInstance
s {$sel:startTime:ReservedDBInstance' :: Maybe ISO8601
startTime = Maybe ISO8601
a} :: ReservedDBInstance) ((Maybe ISO8601 -> f (Maybe ISO8601))
-> ReservedDBInstance -> f ReservedDBInstance)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ReservedDBInstance
-> f ReservedDBInstance
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso ISO8601 ISO8601 UTCTime UTCTime
-> Iso
(Maybe ISO8601) (Maybe ISO8601) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso ISO8601 ISO8601 UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
reservedDBInstance_productDescription :: Lens.Lens' ReservedDBInstance (Prelude.Maybe Prelude.Text)
reservedDBInstance_productDescription :: (Maybe Text -> f (Maybe Text))
-> ReservedDBInstance -> f ReservedDBInstance
reservedDBInstance_productDescription = (ReservedDBInstance -> Maybe Text)
-> (ReservedDBInstance -> Maybe Text -> ReservedDBInstance)
-> Lens
ReservedDBInstance ReservedDBInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservedDBInstance' {Maybe Text
productDescription :: Maybe Text
$sel:productDescription:ReservedDBInstance' :: ReservedDBInstance -> Maybe Text
productDescription} -> Maybe Text
productDescription) (\s :: ReservedDBInstance
s@ReservedDBInstance' {} Maybe Text
a -> ReservedDBInstance
s {$sel:productDescription:ReservedDBInstance' :: Maybe Text
productDescription = Maybe Text
a} :: ReservedDBInstance)
reservedDBInstance_leaseId :: Lens.Lens' ReservedDBInstance (Prelude.Maybe Prelude.Text)
reservedDBInstance_leaseId :: (Maybe Text -> f (Maybe Text))
-> ReservedDBInstance -> f ReservedDBInstance
reservedDBInstance_leaseId = (ReservedDBInstance -> Maybe Text)
-> (ReservedDBInstance -> Maybe Text -> ReservedDBInstance)
-> Lens
ReservedDBInstance ReservedDBInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservedDBInstance' {Maybe Text
leaseId :: Maybe Text
$sel:leaseId:ReservedDBInstance' :: ReservedDBInstance -> Maybe Text
leaseId} -> Maybe Text
leaseId) (\s :: ReservedDBInstance
s@ReservedDBInstance' {} Maybe Text
a -> ReservedDBInstance
s {$sel:leaseId:ReservedDBInstance' :: Maybe Text
leaseId = Maybe Text
a} :: ReservedDBInstance)
reservedDBInstance_reservedDBInstanceId :: Lens.Lens' ReservedDBInstance (Prelude.Maybe Prelude.Text)
reservedDBInstance_reservedDBInstanceId :: (Maybe Text -> f (Maybe Text))
-> ReservedDBInstance -> f ReservedDBInstance
reservedDBInstance_reservedDBInstanceId = (ReservedDBInstance -> Maybe Text)
-> (ReservedDBInstance -> Maybe Text -> ReservedDBInstance)
-> Lens
ReservedDBInstance ReservedDBInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservedDBInstance' {Maybe Text
reservedDBInstanceId :: Maybe Text
$sel:reservedDBInstanceId:ReservedDBInstance' :: ReservedDBInstance -> Maybe Text
reservedDBInstanceId} -> Maybe Text
reservedDBInstanceId) (\s :: ReservedDBInstance
s@ReservedDBInstance' {} Maybe Text
a -> ReservedDBInstance
s {$sel:reservedDBInstanceId:ReservedDBInstance' :: Maybe Text
reservedDBInstanceId = Maybe Text
a} :: ReservedDBInstance)
reservedDBInstance_reservedDBInstanceArn :: Lens.Lens' ReservedDBInstance (Prelude.Maybe Prelude.Text)
reservedDBInstance_reservedDBInstanceArn :: (Maybe Text -> f (Maybe Text))
-> ReservedDBInstance -> f ReservedDBInstance
reservedDBInstance_reservedDBInstanceArn = (ReservedDBInstance -> Maybe Text)
-> (ReservedDBInstance -> Maybe Text -> ReservedDBInstance)
-> Lens
ReservedDBInstance ReservedDBInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservedDBInstance' {Maybe Text
reservedDBInstanceArn :: Maybe Text
$sel:reservedDBInstanceArn:ReservedDBInstance' :: ReservedDBInstance -> Maybe Text
reservedDBInstanceArn} -> Maybe Text
reservedDBInstanceArn) (\s :: ReservedDBInstance
s@ReservedDBInstance' {} Maybe Text
a -> ReservedDBInstance
s {$sel:reservedDBInstanceArn:ReservedDBInstance' :: Maybe Text
reservedDBInstanceArn = Maybe Text
a} :: ReservedDBInstance)
reservedDBInstance_dbInstanceClass :: Lens.Lens' ReservedDBInstance (Prelude.Maybe Prelude.Text)
reservedDBInstance_dbInstanceClass :: (Maybe Text -> f (Maybe Text))
-> ReservedDBInstance -> f ReservedDBInstance
reservedDBInstance_dbInstanceClass = (ReservedDBInstance -> Maybe Text)
-> (ReservedDBInstance -> Maybe Text -> ReservedDBInstance)
-> Lens
ReservedDBInstance ReservedDBInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservedDBInstance' {Maybe Text
dbInstanceClass :: Maybe Text
$sel:dbInstanceClass:ReservedDBInstance' :: ReservedDBInstance -> Maybe Text
dbInstanceClass} -> Maybe Text
dbInstanceClass) (\s :: ReservedDBInstance
s@ReservedDBInstance' {} Maybe Text
a -> ReservedDBInstance
s {$sel:dbInstanceClass:ReservedDBInstance' :: Maybe Text
dbInstanceClass = Maybe Text
a} :: ReservedDBInstance)
reservedDBInstance_multiAZ :: Lens.Lens' ReservedDBInstance (Prelude.Maybe Prelude.Bool)
reservedDBInstance_multiAZ :: (Maybe Bool -> f (Maybe Bool))
-> ReservedDBInstance -> f ReservedDBInstance
reservedDBInstance_multiAZ = (ReservedDBInstance -> Maybe Bool)
-> (ReservedDBInstance -> Maybe Bool -> ReservedDBInstance)
-> Lens
ReservedDBInstance ReservedDBInstance (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservedDBInstance' {Maybe Bool
multiAZ :: Maybe Bool
$sel:multiAZ:ReservedDBInstance' :: ReservedDBInstance -> Maybe Bool
multiAZ} -> Maybe Bool
multiAZ) (\s :: ReservedDBInstance
s@ReservedDBInstance' {} Maybe Bool
a -> ReservedDBInstance
s {$sel:multiAZ:ReservedDBInstance' :: Maybe Bool
multiAZ = Maybe Bool
a} :: ReservedDBInstance)
reservedDBInstance_reservedDBInstancesOfferingId :: Lens.Lens' ReservedDBInstance (Prelude.Maybe Prelude.Text)
reservedDBInstance_reservedDBInstancesOfferingId :: (Maybe Text -> f (Maybe Text))
-> ReservedDBInstance -> f ReservedDBInstance
reservedDBInstance_reservedDBInstancesOfferingId = (ReservedDBInstance -> Maybe Text)
-> (ReservedDBInstance -> Maybe Text -> ReservedDBInstance)
-> Lens
ReservedDBInstance ReservedDBInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservedDBInstance' {Maybe Text
reservedDBInstancesOfferingId :: Maybe Text
$sel:reservedDBInstancesOfferingId:ReservedDBInstance' :: ReservedDBInstance -> Maybe Text
reservedDBInstancesOfferingId} -> Maybe Text
reservedDBInstancesOfferingId) (\s :: ReservedDBInstance
s@ReservedDBInstance' {} Maybe Text
a -> ReservedDBInstance
s {$sel:reservedDBInstancesOfferingId:ReservedDBInstance' :: Maybe Text
reservedDBInstancesOfferingId = Maybe Text
a} :: ReservedDBInstance)
reservedDBInstance_recurringCharges :: Lens.Lens' ReservedDBInstance (Prelude.Maybe [RecurringCharge])
reservedDBInstance_recurringCharges :: (Maybe [RecurringCharge] -> f (Maybe [RecurringCharge]))
-> ReservedDBInstance -> f ReservedDBInstance
reservedDBInstance_recurringCharges = (ReservedDBInstance -> Maybe [RecurringCharge])
-> (ReservedDBInstance
-> Maybe [RecurringCharge] -> ReservedDBInstance)
-> Lens
ReservedDBInstance
ReservedDBInstance
(Maybe [RecurringCharge])
(Maybe [RecurringCharge])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservedDBInstance' {Maybe [RecurringCharge]
recurringCharges :: Maybe [RecurringCharge]
$sel:recurringCharges:ReservedDBInstance' :: ReservedDBInstance -> Maybe [RecurringCharge]
recurringCharges} -> Maybe [RecurringCharge]
recurringCharges) (\s :: ReservedDBInstance
s@ReservedDBInstance' {} Maybe [RecurringCharge]
a -> ReservedDBInstance
s {$sel:recurringCharges:ReservedDBInstance' :: Maybe [RecurringCharge]
recurringCharges = Maybe [RecurringCharge]
a} :: ReservedDBInstance) ((Maybe [RecurringCharge] -> f (Maybe [RecurringCharge]))
-> ReservedDBInstance -> f ReservedDBInstance)
-> ((Maybe [RecurringCharge] -> f (Maybe [RecurringCharge]))
-> Maybe [RecurringCharge] -> f (Maybe [RecurringCharge]))
-> (Maybe [RecurringCharge] -> f (Maybe [RecurringCharge]))
-> ReservedDBInstance
-> f ReservedDBInstance
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[RecurringCharge]
[RecurringCharge]
[RecurringCharge]
[RecurringCharge]
-> Iso
(Maybe [RecurringCharge])
(Maybe [RecurringCharge])
(Maybe [RecurringCharge])
(Maybe [RecurringCharge])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
[RecurringCharge]
[RecurringCharge]
[RecurringCharge]
[RecurringCharge]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
reservedDBInstance_offeringType :: Lens.Lens' ReservedDBInstance (Prelude.Maybe Prelude.Text)
reservedDBInstance_offeringType :: (Maybe Text -> f (Maybe Text))
-> ReservedDBInstance -> f ReservedDBInstance
reservedDBInstance_offeringType = (ReservedDBInstance -> Maybe Text)
-> (ReservedDBInstance -> Maybe Text -> ReservedDBInstance)
-> Lens
ReservedDBInstance ReservedDBInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservedDBInstance' {Maybe Text
offeringType :: Maybe Text
$sel:offeringType:ReservedDBInstance' :: ReservedDBInstance -> Maybe Text
offeringType} -> Maybe Text
offeringType) (\s :: ReservedDBInstance
s@ReservedDBInstance' {} Maybe Text
a -> ReservedDBInstance
s {$sel:offeringType:ReservedDBInstance' :: Maybe Text
offeringType = Maybe Text
a} :: ReservedDBInstance)
reservedDBInstance_usagePrice :: Lens.Lens' ReservedDBInstance (Prelude.Maybe Prelude.Double)
reservedDBInstance_usagePrice :: (Maybe Double -> f (Maybe Double))
-> ReservedDBInstance -> f ReservedDBInstance
reservedDBInstance_usagePrice = (ReservedDBInstance -> Maybe Double)
-> (ReservedDBInstance -> Maybe Double -> ReservedDBInstance)
-> Lens
ReservedDBInstance ReservedDBInstance (Maybe Double) (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservedDBInstance' {Maybe Double
usagePrice :: Maybe Double
$sel:usagePrice:ReservedDBInstance' :: ReservedDBInstance -> Maybe Double
usagePrice} -> Maybe Double
usagePrice) (\s :: ReservedDBInstance
s@ReservedDBInstance' {} Maybe Double
a -> ReservedDBInstance
s {$sel:usagePrice:ReservedDBInstance' :: Maybe Double
usagePrice = Maybe Double
a} :: ReservedDBInstance)
reservedDBInstance_fixedPrice :: Lens.Lens' ReservedDBInstance (Prelude.Maybe Prelude.Double)
reservedDBInstance_fixedPrice :: (Maybe Double -> f (Maybe Double))
-> ReservedDBInstance -> f ReservedDBInstance
reservedDBInstance_fixedPrice = (ReservedDBInstance -> Maybe Double)
-> (ReservedDBInstance -> Maybe Double -> ReservedDBInstance)
-> Lens
ReservedDBInstance ReservedDBInstance (Maybe Double) (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservedDBInstance' {Maybe Double
fixedPrice :: Maybe Double
$sel:fixedPrice:ReservedDBInstance' :: ReservedDBInstance -> Maybe Double
fixedPrice} -> Maybe Double
fixedPrice) (\s :: ReservedDBInstance
s@ReservedDBInstance' {} Maybe Double
a -> ReservedDBInstance
s {$sel:fixedPrice:ReservedDBInstance' :: Maybe Double
fixedPrice = Maybe Double
a} :: ReservedDBInstance)
reservedDBInstance_duration :: Lens.Lens' ReservedDBInstance (Prelude.Maybe Prelude.Int)
reservedDBInstance_duration :: (Maybe Int -> f (Maybe Int))
-> ReservedDBInstance -> f ReservedDBInstance
reservedDBInstance_duration = (ReservedDBInstance -> Maybe Int)
-> (ReservedDBInstance -> Maybe Int -> ReservedDBInstance)
-> Lens
ReservedDBInstance ReservedDBInstance (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservedDBInstance' {Maybe Int
duration :: Maybe Int
$sel:duration:ReservedDBInstance' :: ReservedDBInstance -> Maybe Int
duration} -> Maybe Int
duration) (\s :: ReservedDBInstance
s@ReservedDBInstance' {} Maybe Int
a -> ReservedDBInstance
s {$sel:duration:ReservedDBInstance' :: Maybe Int
duration = Maybe Int
a} :: ReservedDBInstance)
instance Core.FromXML ReservedDBInstance where
parseXML :: [Node] -> Either String ReservedDBInstance
parseXML [Node]
x =
Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe [RecurringCharge]
-> Maybe Text
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> ReservedDBInstance
ReservedDBInstance'
(Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe [RecurringCharge]
-> Maybe Text
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> ReservedDBInstance)
-> Either String (Maybe Int)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe [RecurringCharge]
-> Maybe Text
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> ReservedDBInstance)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Int)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"DBInstanceCount")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe [RecurringCharge]
-> Maybe Text
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> ReservedDBInstance)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe [RecurringCharge]
-> Maybe Text
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> ReservedDBInstance)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"State")
Either
String
(Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe [RecurringCharge]
-> Maybe Text
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> ReservedDBInstance)
-> Either String (Maybe Text)
-> Either
String
(Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe [RecurringCharge]
-> Maybe Text
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> ReservedDBInstance)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"CurrencyCode")
Either
String
(Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe [RecurringCharge]
-> Maybe Text
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> ReservedDBInstance)
-> Either String (Maybe ISO8601)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe [RecurringCharge]
-> Maybe Text
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> ReservedDBInstance)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe ISO8601)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"StartTime")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe [RecurringCharge]
-> Maybe Text
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> ReservedDBInstance)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe [RecurringCharge]
-> Maybe Text
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> ReservedDBInstance)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ProductDescription")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe [RecurringCharge]
-> Maybe Text
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> ReservedDBInstance)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe [RecurringCharge]
-> Maybe Text
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> ReservedDBInstance)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"LeaseId")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe [RecurringCharge]
-> Maybe Text
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> ReservedDBInstance)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe [RecurringCharge]
-> Maybe Text
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> ReservedDBInstance)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ReservedDBInstanceId")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe [RecurringCharge]
-> Maybe Text
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> ReservedDBInstance)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe [RecurringCharge]
-> Maybe Text
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> ReservedDBInstance)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ReservedDBInstanceArn")
Either
String
(Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe [RecurringCharge]
-> Maybe Text
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> ReservedDBInstance)
-> Either String (Maybe Text)
-> Either
String
(Maybe Bool
-> Maybe Text
-> Maybe [RecurringCharge]
-> Maybe Text
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> ReservedDBInstance)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"DBInstanceClass")
Either
String
(Maybe Bool
-> Maybe Text
-> Maybe [RecurringCharge]
-> Maybe Text
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> ReservedDBInstance)
-> Either String (Maybe Bool)
-> Either
String
(Maybe Text
-> Maybe [RecurringCharge]
-> Maybe Text
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> ReservedDBInstance)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Bool)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"MultiAZ")
Either
String
(Maybe Text
-> Maybe [RecurringCharge]
-> Maybe Text
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> ReservedDBInstance)
-> Either String (Maybe Text)
-> Either
String
(Maybe [RecurringCharge]
-> Maybe Text
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> ReservedDBInstance)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ReservedDBInstancesOfferingId")
Either
String
(Maybe [RecurringCharge]
-> Maybe Text
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> ReservedDBInstance)
-> Either String (Maybe [RecurringCharge])
-> Either
String
(Maybe Text
-> Maybe Double -> Maybe Double -> Maybe Int -> ReservedDBInstance)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"RecurringCharges"
Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
Either String [Node]
-> ([Node] -> Either String (Maybe [RecurringCharge]))
-> Either String (Maybe [RecurringCharge])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [RecurringCharge])
-> [Node] -> Either String (Maybe [RecurringCharge])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [RecurringCharge]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"RecurringCharge")
)
Either
String
(Maybe Text
-> Maybe Double -> Maybe Double -> Maybe Int -> ReservedDBInstance)
-> Either String (Maybe Text)
-> Either
String
(Maybe Double -> Maybe Double -> Maybe Int -> ReservedDBInstance)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"OfferingType")
Either
String
(Maybe Double -> Maybe Double -> Maybe Int -> ReservedDBInstance)
-> Either String (Maybe Double)
-> Either String (Maybe Double -> Maybe Int -> ReservedDBInstance)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Double)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"UsagePrice")
Either String (Maybe Double -> Maybe Int -> ReservedDBInstance)
-> Either String (Maybe Double)
-> Either String (Maybe Int -> ReservedDBInstance)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Double)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"FixedPrice")
Either String (Maybe Int -> ReservedDBInstance)
-> Either String (Maybe Int) -> Either String ReservedDBInstance
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Int)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Duration")
instance Prelude.Hashable ReservedDBInstance
instance Prelude.NFData ReservedDBInstance