{-# 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.Redshift.Types.ReservedNodeOffering where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Redshift.Internal
import Amazonka.Redshift.Types.RecurringCharge
import Amazonka.Redshift.Types.ReservedNodeOfferingType
data ReservedNodeOffering = ReservedNodeOffering'
{ ReservedNodeOffering -> Maybe ReservedNodeOfferingType
reservedNodeOfferingType :: Prelude.Maybe ReservedNodeOfferingType,
ReservedNodeOffering -> Maybe Text
currencyCode :: Prelude.Maybe Prelude.Text,
ReservedNodeOffering -> Maybe Text
reservedNodeOfferingId :: Prelude.Maybe Prelude.Text,
ReservedNodeOffering -> Maybe [RecurringCharge]
recurringCharges :: Prelude.Maybe [RecurringCharge],
ReservedNodeOffering -> Maybe Text
offeringType :: Prelude.Maybe Prelude.Text,
ReservedNodeOffering -> Maybe Double
usagePrice :: Prelude.Maybe Prelude.Double,
ReservedNodeOffering -> Maybe Text
nodeType :: Prelude.Maybe Prelude.Text,
ReservedNodeOffering -> Maybe Double
fixedPrice :: Prelude.Maybe Prelude.Double,
ReservedNodeOffering -> Maybe Int
duration :: Prelude.Maybe Prelude.Int
}
deriving (ReservedNodeOffering -> ReservedNodeOffering -> Bool
(ReservedNodeOffering -> ReservedNodeOffering -> Bool)
-> (ReservedNodeOffering -> ReservedNodeOffering -> Bool)
-> Eq ReservedNodeOffering
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ReservedNodeOffering -> ReservedNodeOffering -> Bool
$c/= :: ReservedNodeOffering -> ReservedNodeOffering -> Bool
== :: ReservedNodeOffering -> ReservedNodeOffering -> Bool
$c== :: ReservedNodeOffering -> ReservedNodeOffering -> Bool
Prelude.Eq, ReadPrec [ReservedNodeOffering]
ReadPrec ReservedNodeOffering
Int -> ReadS ReservedNodeOffering
ReadS [ReservedNodeOffering]
(Int -> ReadS ReservedNodeOffering)
-> ReadS [ReservedNodeOffering]
-> ReadPrec ReservedNodeOffering
-> ReadPrec [ReservedNodeOffering]
-> Read ReservedNodeOffering
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ReservedNodeOffering]
$creadListPrec :: ReadPrec [ReservedNodeOffering]
readPrec :: ReadPrec ReservedNodeOffering
$creadPrec :: ReadPrec ReservedNodeOffering
readList :: ReadS [ReservedNodeOffering]
$creadList :: ReadS [ReservedNodeOffering]
readsPrec :: Int -> ReadS ReservedNodeOffering
$creadsPrec :: Int -> ReadS ReservedNodeOffering
Prelude.Read, Int -> ReservedNodeOffering -> ShowS
[ReservedNodeOffering] -> ShowS
ReservedNodeOffering -> String
(Int -> ReservedNodeOffering -> ShowS)
-> (ReservedNodeOffering -> String)
-> ([ReservedNodeOffering] -> ShowS)
-> Show ReservedNodeOffering
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ReservedNodeOffering] -> ShowS
$cshowList :: [ReservedNodeOffering] -> ShowS
show :: ReservedNodeOffering -> String
$cshow :: ReservedNodeOffering -> String
showsPrec :: Int -> ReservedNodeOffering -> ShowS
$cshowsPrec :: Int -> ReservedNodeOffering -> ShowS
Prelude.Show, (forall x. ReservedNodeOffering -> Rep ReservedNodeOffering x)
-> (forall x. Rep ReservedNodeOffering x -> ReservedNodeOffering)
-> Generic ReservedNodeOffering
forall x. Rep ReservedNodeOffering x -> ReservedNodeOffering
forall x. ReservedNodeOffering -> Rep ReservedNodeOffering x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ReservedNodeOffering x -> ReservedNodeOffering
$cfrom :: forall x. ReservedNodeOffering -> Rep ReservedNodeOffering x
Prelude.Generic)
newReservedNodeOffering ::
ReservedNodeOffering
newReservedNodeOffering :: ReservedNodeOffering
newReservedNodeOffering =
ReservedNodeOffering' :: Maybe ReservedNodeOfferingType
-> Maybe Text
-> Maybe Text
-> Maybe [RecurringCharge]
-> Maybe Text
-> Maybe Double
-> Maybe Text
-> Maybe Double
-> Maybe Int
-> ReservedNodeOffering
ReservedNodeOffering'
{ $sel:reservedNodeOfferingType:ReservedNodeOffering' :: Maybe ReservedNodeOfferingType
reservedNodeOfferingType =
Maybe ReservedNodeOfferingType
forall a. Maybe a
Prelude.Nothing,
$sel:currencyCode:ReservedNodeOffering' :: Maybe Text
currencyCode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:reservedNodeOfferingId:ReservedNodeOffering' :: Maybe Text
reservedNodeOfferingId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:recurringCharges:ReservedNodeOffering' :: Maybe [RecurringCharge]
recurringCharges = Maybe [RecurringCharge]
forall a. Maybe a
Prelude.Nothing,
$sel:offeringType:ReservedNodeOffering' :: Maybe Text
offeringType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:usagePrice:ReservedNodeOffering' :: Maybe Double
usagePrice = Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:nodeType:ReservedNodeOffering' :: Maybe Text
nodeType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:fixedPrice:ReservedNodeOffering' :: Maybe Double
fixedPrice = Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:duration:ReservedNodeOffering' :: Maybe Int
duration = Maybe Int
forall a. Maybe a
Prelude.Nothing
}
reservedNodeOffering_reservedNodeOfferingType :: Lens.Lens' ReservedNodeOffering (Prelude.Maybe ReservedNodeOfferingType)
reservedNodeOffering_reservedNodeOfferingType :: (Maybe ReservedNodeOfferingType
-> f (Maybe ReservedNodeOfferingType))
-> ReservedNodeOffering -> f ReservedNodeOffering
reservedNodeOffering_reservedNodeOfferingType = (ReservedNodeOffering -> Maybe ReservedNodeOfferingType)
-> (ReservedNodeOffering
-> Maybe ReservedNodeOfferingType -> ReservedNodeOffering)
-> Lens
ReservedNodeOffering
ReservedNodeOffering
(Maybe ReservedNodeOfferingType)
(Maybe ReservedNodeOfferingType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservedNodeOffering' {Maybe ReservedNodeOfferingType
reservedNodeOfferingType :: Maybe ReservedNodeOfferingType
$sel:reservedNodeOfferingType:ReservedNodeOffering' :: ReservedNodeOffering -> Maybe ReservedNodeOfferingType
reservedNodeOfferingType} -> Maybe ReservedNodeOfferingType
reservedNodeOfferingType) (\s :: ReservedNodeOffering
s@ReservedNodeOffering' {} Maybe ReservedNodeOfferingType
a -> ReservedNodeOffering
s {$sel:reservedNodeOfferingType:ReservedNodeOffering' :: Maybe ReservedNodeOfferingType
reservedNodeOfferingType = Maybe ReservedNodeOfferingType
a} :: ReservedNodeOffering)
reservedNodeOffering_currencyCode :: Lens.Lens' ReservedNodeOffering (Prelude.Maybe Prelude.Text)
reservedNodeOffering_currencyCode :: (Maybe Text -> f (Maybe Text))
-> ReservedNodeOffering -> f ReservedNodeOffering
reservedNodeOffering_currencyCode = (ReservedNodeOffering -> Maybe Text)
-> (ReservedNodeOffering -> Maybe Text -> ReservedNodeOffering)
-> Lens
ReservedNodeOffering ReservedNodeOffering (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservedNodeOffering' {Maybe Text
currencyCode :: Maybe Text
$sel:currencyCode:ReservedNodeOffering' :: ReservedNodeOffering -> Maybe Text
currencyCode} -> Maybe Text
currencyCode) (\s :: ReservedNodeOffering
s@ReservedNodeOffering' {} Maybe Text
a -> ReservedNodeOffering
s {$sel:currencyCode:ReservedNodeOffering' :: Maybe Text
currencyCode = Maybe Text
a} :: ReservedNodeOffering)
reservedNodeOffering_reservedNodeOfferingId :: Lens.Lens' ReservedNodeOffering (Prelude.Maybe Prelude.Text)
reservedNodeOffering_reservedNodeOfferingId :: (Maybe Text -> f (Maybe Text))
-> ReservedNodeOffering -> f ReservedNodeOffering
reservedNodeOffering_reservedNodeOfferingId = (ReservedNodeOffering -> Maybe Text)
-> (ReservedNodeOffering -> Maybe Text -> ReservedNodeOffering)
-> Lens
ReservedNodeOffering ReservedNodeOffering (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservedNodeOffering' {Maybe Text
reservedNodeOfferingId :: Maybe Text
$sel:reservedNodeOfferingId:ReservedNodeOffering' :: ReservedNodeOffering -> Maybe Text
reservedNodeOfferingId} -> Maybe Text
reservedNodeOfferingId) (\s :: ReservedNodeOffering
s@ReservedNodeOffering' {} Maybe Text
a -> ReservedNodeOffering
s {$sel:reservedNodeOfferingId:ReservedNodeOffering' :: Maybe Text
reservedNodeOfferingId = Maybe Text
a} :: ReservedNodeOffering)
reservedNodeOffering_recurringCharges :: Lens.Lens' ReservedNodeOffering (Prelude.Maybe [RecurringCharge])
reservedNodeOffering_recurringCharges :: (Maybe [RecurringCharge] -> f (Maybe [RecurringCharge]))
-> ReservedNodeOffering -> f ReservedNodeOffering
reservedNodeOffering_recurringCharges = (ReservedNodeOffering -> Maybe [RecurringCharge])
-> (ReservedNodeOffering
-> Maybe [RecurringCharge] -> ReservedNodeOffering)
-> Lens
ReservedNodeOffering
ReservedNodeOffering
(Maybe [RecurringCharge])
(Maybe [RecurringCharge])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservedNodeOffering' {Maybe [RecurringCharge]
recurringCharges :: Maybe [RecurringCharge]
$sel:recurringCharges:ReservedNodeOffering' :: ReservedNodeOffering -> Maybe [RecurringCharge]
recurringCharges} -> Maybe [RecurringCharge]
recurringCharges) (\s :: ReservedNodeOffering
s@ReservedNodeOffering' {} Maybe [RecurringCharge]
a -> ReservedNodeOffering
s {$sel:recurringCharges:ReservedNodeOffering' :: Maybe [RecurringCharge]
recurringCharges = Maybe [RecurringCharge]
a} :: ReservedNodeOffering) ((Maybe [RecurringCharge] -> f (Maybe [RecurringCharge]))
-> ReservedNodeOffering -> f ReservedNodeOffering)
-> ((Maybe [RecurringCharge] -> f (Maybe [RecurringCharge]))
-> Maybe [RecurringCharge] -> f (Maybe [RecurringCharge]))
-> (Maybe [RecurringCharge] -> f (Maybe [RecurringCharge]))
-> ReservedNodeOffering
-> f ReservedNodeOffering
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
reservedNodeOffering_offeringType :: Lens.Lens' ReservedNodeOffering (Prelude.Maybe Prelude.Text)
reservedNodeOffering_offeringType :: (Maybe Text -> f (Maybe Text))
-> ReservedNodeOffering -> f ReservedNodeOffering
reservedNodeOffering_offeringType = (ReservedNodeOffering -> Maybe Text)
-> (ReservedNodeOffering -> Maybe Text -> ReservedNodeOffering)
-> Lens
ReservedNodeOffering ReservedNodeOffering (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservedNodeOffering' {Maybe Text
offeringType :: Maybe Text
$sel:offeringType:ReservedNodeOffering' :: ReservedNodeOffering -> Maybe Text
offeringType} -> Maybe Text
offeringType) (\s :: ReservedNodeOffering
s@ReservedNodeOffering' {} Maybe Text
a -> ReservedNodeOffering
s {$sel:offeringType:ReservedNodeOffering' :: Maybe Text
offeringType = Maybe Text
a} :: ReservedNodeOffering)
reservedNodeOffering_usagePrice :: Lens.Lens' ReservedNodeOffering (Prelude.Maybe Prelude.Double)
reservedNodeOffering_usagePrice :: (Maybe Double -> f (Maybe Double))
-> ReservedNodeOffering -> f ReservedNodeOffering
reservedNodeOffering_usagePrice = (ReservedNodeOffering -> Maybe Double)
-> (ReservedNodeOffering -> Maybe Double -> ReservedNodeOffering)
-> Lens
ReservedNodeOffering
ReservedNodeOffering
(Maybe Double)
(Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservedNodeOffering' {Maybe Double
usagePrice :: Maybe Double
$sel:usagePrice:ReservedNodeOffering' :: ReservedNodeOffering -> Maybe Double
usagePrice} -> Maybe Double
usagePrice) (\s :: ReservedNodeOffering
s@ReservedNodeOffering' {} Maybe Double
a -> ReservedNodeOffering
s {$sel:usagePrice:ReservedNodeOffering' :: Maybe Double
usagePrice = Maybe Double
a} :: ReservedNodeOffering)
reservedNodeOffering_nodeType :: Lens.Lens' ReservedNodeOffering (Prelude.Maybe Prelude.Text)
reservedNodeOffering_nodeType :: (Maybe Text -> f (Maybe Text))
-> ReservedNodeOffering -> f ReservedNodeOffering
reservedNodeOffering_nodeType = (ReservedNodeOffering -> Maybe Text)
-> (ReservedNodeOffering -> Maybe Text -> ReservedNodeOffering)
-> Lens
ReservedNodeOffering ReservedNodeOffering (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservedNodeOffering' {Maybe Text
nodeType :: Maybe Text
$sel:nodeType:ReservedNodeOffering' :: ReservedNodeOffering -> Maybe Text
nodeType} -> Maybe Text
nodeType) (\s :: ReservedNodeOffering
s@ReservedNodeOffering' {} Maybe Text
a -> ReservedNodeOffering
s {$sel:nodeType:ReservedNodeOffering' :: Maybe Text
nodeType = Maybe Text
a} :: ReservedNodeOffering)
reservedNodeOffering_fixedPrice :: Lens.Lens' ReservedNodeOffering (Prelude.Maybe Prelude.Double)
reservedNodeOffering_fixedPrice :: (Maybe Double -> f (Maybe Double))
-> ReservedNodeOffering -> f ReservedNodeOffering
reservedNodeOffering_fixedPrice = (ReservedNodeOffering -> Maybe Double)
-> (ReservedNodeOffering -> Maybe Double -> ReservedNodeOffering)
-> Lens
ReservedNodeOffering
ReservedNodeOffering
(Maybe Double)
(Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservedNodeOffering' {Maybe Double
fixedPrice :: Maybe Double
$sel:fixedPrice:ReservedNodeOffering' :: ReservedNodeOffering -> Maybe Double
fixedPrice} -> Maybe Double
fixedPrice) (\s :: ReservedNodeOffering
s@ReservedNodeOffering' {} Maybe Double
a -> ReservedNodeOffering
s {$sel:fixedPrice:ReservedNodeOffering' :: Maybe Double
fixedPrice = Maybe Double
a} :: ReservedNodeOffering)
reservedNodeOffering_duration :: Lens.Lens' ReservedNodeOffering (Prelude.Maybe Prelude.Int)
reservedNodeOffering_duration :: (Maybe Int -> f (Maybe Int))
-> ReservedNodeOffering -> f ReservedNodeOffering
reservedNodeOffering_duration = (ReservedNodeOffering -> Maybe Int)
-> (ReservedNodeOffering -> Maybe Int -> ReservedNodeOffering)
-> Lens
ReservedNodeOffering ReservedNodeOffering (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservedNodeOffering' {Maybe Int
duration :: Maybe Int
$sel:duration:ReservedNodeOffering' :: ReservedNodeOffering -> Maybe Int
duration} -> Maybe Int
duration) (\s :: ReservedNodeOffering
s@ReservedNodeOffering' {} Maybe Int
a -> ReservedNodeOffering
s {$sel:duration:ReservedNodeOffering' :: Maybe Int
duration = Maybe Int
a} :: ReservedNodeOffering)
instance Core.FromXML ReservedNodeOffering where
parseXML :: [Node] -> Either String ReservedNodeOffering
parseXML [Node]
x =
Maybe ReservedNodeOfferingType
-> Maybe Text
-> Maybe Text
-> Maybe [RecurringCharge]
-> Maybe Text
-> Maybe Double
-> Maybe Text
-> Maybe Double
-> Maybe Int
-> ReservedNodeOffering
ReservedNodeOffering'
(Maybe ReservedNodeOfferingType
-> Maybe Text
-> Maybe Text
-> Maybe [RecurringCharge]
-> Maybe Text
-> Maybe Double
-> Maybe Text
-> Maybe Double
-> Maybe Int
-> ReservedNodeOffering)
-> Either String (Maybe ReservedNodeOfferingType)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe [RecurringCharge]
-> Maybe Text
-> Maybe Double
-> Maybe Text
-> Maybe Double
-> Maybe Int
-> ReservedNodeOffering)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe ReservedNodeOfferingType)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ReservedNodeOfferingType")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe [RecurringCharge]
-> Maybe Text
-> Maybe Double
-> Maybe Text
-> Maybe Double
-> Maybe Int
-> ReservedNodeOffering)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe [RecurringCharge]
-> Maybe Text
-> Maybe Double
-> Maybe Text
-> Maybe Double
-> Maybe Int
-> ReservedNodeOffering)
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 Text
-> Maybe [RecurringCharge]
-> Maybe Text
-> Maybe Double
-> Maybe Text
-> Maybe Double
-> Maybe Int
-> ReservedNodeOffering)
-> Either String (Maybe Text)
-> Either
String
(Maybe [RecurringCharge]
-> Maybe Text
-> Maybe Double
-> Maybe Text
-> Maybe Double
-> Maybe Int
-> ReservedNodeOffering)
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
"ReservedNodeOfferingId")
Either
String
(Maybe [RecurringCharge]
-> Maybe Text
-> Maybe Double
-> Maybe Text
-> Maybe Double
-> Maybe Int
-> ReservedNodeOffering)
-> Either String (Maybe [RecurringCharge])
-> Either
String
(Maybe Text
-> Maybe Double
-> Maybe Text
-> Maybe Double
-> Maybe Int
-> ReservedNodeOffering)
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 Text
-> Maybe Double
-> Maybe Int
-> ReservedNodeOffering)
-> Either String (Maybe Text)
-> Either
String
(Maybe Double
-> Maybe Text -> Maybe Double -> Maybe Int -> ReservedNodeOffering)
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 Text -> Maybe Double -> Maybe Int -> ReservedNodeOffering)
-> Either String (Maybe Double)
-> Either
String
(Maybe Text -> Maybe Double -> Maybe Int -> ReservedNodeOffering)
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 Text -> Maybe Double -> Maybe Int -> ReservedNodeOffering)
-> Either String (Maybe Text)
-> Either
String (Maybe Double -> Maybe Int -> ReservedNodeOffering)
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
"NodeType")
Either String (Maybe Double -> Maybe Int -> ReservedNodeOffering)
-> Either String (Maybe Double)
-> Either String (Maybe Int -> ReservedNodeOffering)
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 -> ReservedNodeOffering)
-> Either String (Maybe Int) -> Either String ReservedNodeOffering
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 ReservedNodeOffering
instance Prelude.NFData ReservedNodeOffering