{-# 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.ElastiCache.Types.ReservedCacheNode where
import qualified Amazonka.Core as Core
import Amazonka.ElastiCache.Types.RecurringCharge
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ReservedCacheNode = ReservedCacheNode'
{
ReservedCacheNode -> Maybe Text
cacheNodeType :: Prelude.Maybe Prelude.Text,
ReservedCacheNode -> Maybe Text
state :: Prelude.Maybe Prelude.Text,
ReservedCacheNode -> Maybe ISO8601
startTime :: Prelude.Maybe Core.ISO8601,
ReservedCacheNode -> Maybe Text
productDescription :: Prelude.Maybe Prelude.Text,
ReservedCacheNode -> Maybe Text
reservationARN :: Prelude.Maybe Prelude.Text,
ReservedCacheNode -> Maybe Int
cacheNodeCount :: Prelude.Maybe Prelude.Int,
ReservedCacheNode -> Maybe Text
reservedCacheNodeId :: Prelude.Maybe Prelude.Text,
ReservedCacheNode -> Maybe [RecurringCharge]
recurringCharges :: Prelude.Maybe [RecurringCharge],
ReservedCacheNode -> Maybe Text
offeringType :: Prelude.Maybe Prelude.Text,
ReservedCacheNode -> Maybe Double
usagePrice :: Prelude.Maybe Prelude.Double,
ReservedCacheNode -> Maybe Double
fixedPrice :: Prelude.Maybe Prelude.Double,
ReservedCacheNode -> Maybe Int
duration :: Prelude.Maybe Prelude.Int,
ReservedCacheNode -> Maybe Text
reservedCacheNodesOfferingId :: Prelude.Maybe Prelude.Text
}
deriving (ReservedCacheNode -> ReservedCacheNode -> Bool
(ReservedCacheNode -> ReservedCacheNode -> Bool)
-> (ReservedCacheNode -> ReservedCacheNode -> Bool)
-> Eq ReservedCacheNode
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ReservedCacheNode -> ReservedCacheNode -> Bool
$c/= :: ReservedCacheNode -> ReservedCacheNode -> Bool
== :: ReservedCacheNode -> ReservedCacheNode -> Bool
$c== :: ReservedCacheNode -> ReservedCacheNode -> Bool
Prelude.Eq, ReadPrec [ReservedCacheNode]
ReadPrec ReservedCacheNode
Int -> ReadS ReservedCacheNode
ReadS [ReservedCacheNode]
(Int -> ReadS ReservedCacheNode)
-> ReadS [ReservedCacheNode]
-> ReadPrec ReservedCacheNode
-> ReadPrec [ReservedCacheNode]
-> Read ReservedCacheNode
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ReservedCacheNode]
$creadListPrec :: ReadPrec [ReservedCacheNode]
readPrec :: ReadPrec ReservedCacheNode
$creadPrec :: ReadPrec ReservedCacheNode
readList :: ReadS [ReservedCacheNode]
$creadList :: ReadS [ReservedCacheNode]
readsPrec :: Int -> ReadS ReservedCacheNode
$creadsPrec :: Int -> ReadS ReservedCacheNode
Prelude.Read, Int -> ReservedCacheNode -> ShowS
[ReservedCacheNode] -> ShowS
ReservedCacheNode -> String
(Int -> ReservedCacheNode -> ShowS)
-> (ReservedCacheNode -> String)
-> ([ReservedCacheNode] -> ShowS)
-> Show ReservedCacheNode
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ReservedCacheNode] -> ShowS
$cshowList :: [ReservedCacheNode] -> ShowS
show :: ReservedCacheNode -> String
$cshow :: ReservedCacheNode -> String
showsPrec :: Int -> ReservedCacheNode -> ShowS
$cshowsPrec :: Int -> ReservedCacheNode -> ShowS
Prelude.Show, (forall x. ReservedCacheNode -> Rep ReservedCacheNode x)
-> (forall x. Rep ReservedCacheNode x -> ReservedCacheNode)
-> Generic ReservedCacheNode
forall x. Rep ReservedCacheNode x -> ReservedCacheNode
forall x. ReservedCacheNode -> Rep ReservedCacheNode x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ReservedCacheNode x -> ReservedCacheNode
$cfrom :: forall x. ReservedCacheNode -> Rep ReservedCacheNode x
Prelude.Generic)
newReservedCacheNode ::
ReservedCacheNode
newReservedCacheNode :: ReservedCacheNode
newReservedCacheNode =
ReservedCacheNode' :: Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe [RecurringCharge]
-> Maybe Text
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> Maybe Text
-> ReservedCacheNode
ReservedCacheNode'
{ $sel:cacheNodeType:ReservedCacheNode' :: Maybe Text
cacheNodeType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:state:ReservedCacheNode' :: Maybe Text
state = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:startTime:ReservedCacheNode' :: Maybe ISO8601
startTime = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
$sel:productDescription:ReservedCacheNode' :: Maybe Text
productDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:reservationARN:ReservedCacheNode' :: Maybe Text
reservationARN = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:cacheNodeCount:ReservedCacheNode' :: Maybe Int
cacheNodeCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:reservedCacheNodeId:ReservedCacheNode' :: Maybe Text
reservedCacheNodeId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:recurringCharges:ReservedCacheNode' :: Maybe [RecurringCharge]
recurringCharges = Maybe [RecurringCharge]
forall a. Maybe a
Prelude.Nothing,
$sel:offeringType:ReservedCacheNode' :: Maybe Text
offeringType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:usagePrice:ReservedCacheNode' :: Maybe Double
usagePrice = Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:fixedPrice:ReservedCacheNode' :: Maybe Double
fixedPrice = Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:duration:ReservedCacheNode' :: Maybe Int
duration = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:reservedCacheNodesOfferingId:ReservedCacheNode' :: Maybe Text
reservedCacheNodesOfferingId = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
reservedCacheNode_cacheNodeType :: Lens.Lens' ReservedCacheNode (Prelude.Maybe Prelude.Text)
reservedCacheNode_cacheNodeType :: (Maybe Text -> f (Maybe Text))
-> ReservedCacheNode -> f ReservedCacheNode
reservedCacheNode_cacheNodeType = (ReservedCacheNode -> Maybe Text)
-> (ReservedCacheNode -> Maybe Text -> ReservedCacheNode)
-> Lens
ReservedCacheNode ReservedCacheNode (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservedCacheNode' {Maybe Text
cacheNodeType :: Maybe Text
$sel:cacheNodeType:ReservedCacheNode' :: ReservedCacheNode -> Maybe Text
cacheNodeType} -> Maybe Text
cacheNodeType) (\s :: ReservedCacheNode
s@ReservedCacheNode' {} Maybe Text
a -> ReservedCacheNode
s {$sel:cacheNodeType:ReservedCacheNode' :: Maybe Text
cacheNodeType = Maybe Text
a} :: ReservedCacheNode)
reservedCacheNode_state :: Lens.Lens' ReservedCacheNode (Prelude.Maybe Prelude.Text)
reservedCacheNode_state :: (Maybe Text -> f (Maybe Text))
-> ReservedCacheNode -> f ReservedCacheNode
reservedCacheNode_state = (ReservedCacheNode -> Maybe Text)
-> (ReservedCacheNode -> Maybe Text -> ReservedCacheNode)
-> Lens
ReservedCacheNode ReservedCacheNode (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservedCacheNode' {Maybe Text
state :: Maybe Text
$sel:state:ReservedCacheNode' :: ReservedCacheNode -> Maybe Text
state} -> Maybe Text
state) (\s :: ReservedCacheNode
s@ReservedCacheNode' {} Maybe Text
a -> ReservedCacheNode
s {$sel:state:ReservedCacheNode' :: Maybe Text
state = Maybe Text
a} :: ReservedCacheNode)
reservedCacheNode_startTime :: Lens.Lens' ReservedCacheNode (Prelude.Maybe Prelude.UTCTime)
reservedCacheNode_startTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ReservedCacheNode -> f ReservedCacheNode
reservedCacheNode_startTime = (ReservedCacheNode -> Maybe ISO8601)
-> (ReservedCacheNode -> Maybe ISO8601 -> ReservedCacheNode)
-> Lens
ReservedCacheNode ReservedCacheNode (Maybe ISO8601) (Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservedCacheNode' {Maybe ISO8601
startTime :: Maybe ISO8601
$sel:startTime:ReservedCacheNode' :: ReservedCacheNode -> Maybe ISO8601
startTime} -> Maybe ISO8601
startTime) (\s :: ReservedCacheNode
s@ReservedCacheNode' {} Maybe ISO8601
a -> ReservedCacheNode
s {$sel:startTime:ReservedCacheNode' :: Maybe ISO8601
startTime = Maybe ISO8601
a} :: ReservedCacheNode) ((Maybe ISO8601 -> f (Maybe ISO8601))
-> ReservedCacheNode -> f ReservedCacheNode)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ReservedCacheNode
-> f ReservedCacheNode
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
reservedCacheNode_productDescription :: Lens.Lens' ReservedCacheNode (Prelude.Maybe Prelude.Text)
reservedCacheNode_productDescription :: (Maybe Text -> f (Maybe Text))
-> ReservedCacheNode -> f ReservedCacheNode
reservedCacheNode_productDescription = (ReservedCacheNode -> Maybe Text)
-> (ReservedCacheNode -> Maybe Text -> ReservedCacheNode)
-> Lens
ReservedCacheNode ReservedCacheNode (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservedCacheNode' {Maybe Text
productDescription :: Maybe Text
$sel:productDescription:ReservedCacheNode' :: ReservedCacheNode -> Maybe Text
productDescription} -> Maybe Text
productDescription) (\s :: ReservedCacheNode
s@ReservedCacheNode' {} Maybe Text
a -> ReservedCacheNode
s {$sel:productDescription:ReservedCacheNode' :: Maybe Text
productDescription = Maybe Text
a} :: ReservedCacheNode)
reservedCacheNode_reservationARN :: Lens.Lens' ReservedCacheNode (Prelude.Maybe Prelude.Text)
reservedCacheNode_reservationARN :: (Maybe Text -> f (Maybe Text))
-> ReservedCacheNode -> f ReservedCacheNode
reservedCacheNode_reservationARN = (ReservedCacheNode -> Maybe Text)
-> (ReservedCacheNode -> Maybe Text -> ReservedCacheNode)
-> Lens
ReservedCacheNode ReservedCacheNode (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservedCacheNode' {Maybe Text
reservationARN :: Maybe Text
$sel:reservationARN:ReservedCacheNode' :: ReservedCacheNode -> Maybe Text
reservationARN} -> Maybe Text
reservationARN) (\s :: ReservedCacheNode
s@ReservedCacheNode' {} Maybe Text
a -> ReservedCacheNode
s {$sel:reservationARN:ReservedCacheNode' :: Maybe Text
reservationARN = Maybe Text
a} :: ReservedCacheNode)
reservedCacheNode_cacheNodeCount :: Lens.Lens' ReservedCacheNode (Prelude.Maybe Prelude.Int)
reservedCacheNode_cacheNodeCount :: (Maybe Int -> f (Maybe Int))
-> ReservedCacheNode -> f ReservedCacheNode
reservedCacheNode_cacheNodeCount = (ReservedCacheNode -> Maybe Int)
-> (ReservedCacheNode -> Maybe Int -> ReservedCacheNode)
-> Lens ReservedCacheNode ReservedCacheNode (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservedCacheNode' {Maybe Int
cacheNodeCount :: Maybe Int
$sel:cacheNodeCount:ReservedCacheNode' :: ReservedCacheNode -> Maybe Int
cacheNodeCount} -> Maybe Int
cacheNodeCount) (\s :: ReservedCacheNode
s@ReservedCacheNode' {} Maybe Int
a -> ReservedCacheNode
s {$sel:cacheNodeCount:ReservedCacheNode' :: Maybe Int
cacheNodeCount = Maybe Int
a} :: ReservedCacheNode)
reservedCacheNode_reservedCacheNodeId :: Lens.Lens' ReservedCacheNode (Prelude.Maybe Prelude.Text)
reservedCacheNode_reservedCacheNodeId :: (Maybe Text -> f (Maybe Text))
-> ReservedCacheNode -> f ReservedCacheNode
reservedCacheNode_reservedCacheNodeId = (ReservedCacheNode -> Maybe Text)
-> (ReservedCacheNode -> Maybe Text -> ReservedCacheNode)
-> Lens
ReservedCacheNode ReservedCacheNode (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservedCacheNode' {Maybe Text
reservedCacheNodeId :: Maybe Text
$sel:reservedCacheNodeId:ReservedCacheNode' :: ReservedCacheNode -> Maybe Text
reservedCacheNodeId} -> Maybe Text
reservedCacheNodeId) (\s :: ReservedCacheNode
s@ReservedCacheNode' {} Maybe Text
a -> ReservedCacheNode
s {$sel:reservedCacheNodeId:ReservedCacheNode' :: Maybe Text
reservedCacheNodeId = Maybe Text
a} :: ReservedCacheNode)
reservedCacheNode_recurringCharges :: Lens.Lens' ReservedCacheNode (Prelude.Maybe [RecurringCharge])
reservedCacheNode_recurringCharges :: (Maybe [RecurringCharge] -> f (Maybe [RecurringCharge]))
-> ReservedCacheNode -> f ReservedCacheNode
reservedCacheNode_recurringCharges = (ReservedCacheNode -> Maybe [RecurringCharge])
-> (ReservedCacheNode
-> Maybe [RecurringCharge] -> ReservedCacheNode)
-> Lens
ReservedCacheNode
ReservedCacheNode
(Maybe [RecurringCharge])
(Maybe [RecurringCharge])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservedCacheNode' {Maybe [RecurringCharge]
recurringCharges :: Maybe [RecurringCharge]
$sel:recurringCharges:ReservedCacheNode' :: ReservedCacheNode -> Maybe [RecurringCharge]
recurringCharges} -> Maybe [RecurringCharge]
recurringCharges) (\s :: ReservedCacheNode
s@ReservedCacheNode' {} Maybe [RecurringCharge]
a -> ReservedCacheNode
s {$sel:recurringCharges:ReservedCacheNode' :: Maybe [RecurringCharge]
recurringCharges = Maybe [RecurringCharge]
a} :: ReservedCacheNode) ((Maybe [RecurringCharge] -> f (Maybe [RecurringCharge]))
-> ReservedCacheNode -> f ReservedCacheNode)
-> ((Maybe [RecurringCharge] -> f (Maybe [RecurringCharge]))
-> Maybe [RecurringCharge] -> f (Maybe [RecurringCharge]))
-> (Maybe [RecurringCharge] -> f (Maybe [RecurringCharge]))
-> ReservedCacheNode
-> f ReservedCacheNode
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
reservedCacheNode_offeringType :: Lens.Lens' ReservedCacheNode (Prelude.Maybe Prelude.Text)
reservedCacheNode_offeringType :: (Maybe Text -> f (Maybe Text))
-> ReservedCacheNode -> f ReservedCacheNode
reservedCacheNode_offeringType = (ReservedCacheNode -> Maybe Text)
-> (ReservedCacheNode -> Maybe Text -> ReservedCacheNode)
-> Lens
ReservedCacheNode ReservedCacheNode (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservedCacheNode' {Maybe Text
offeringType :: Maybe Text
$sel:offeringType:ReservedCacheNode' :: ReservedCacheNode -> Maybe Text
offeringType} -> Maybe Text
offeringType) (\s :: ReservedCacheNode
s@ReservedCacheNode' {} Maybe Text
a -> ReservedCacheNode
s {$sel:offeringType:ReservedCacheNode' :: Maybe Text
offeringType = Maybe Text
a} :: ReservedCacheNode)
reservedCacheNode_usagePrice :: Lens.Lens' ReservedCacheNode (Prelude.Maybe Prelude.Double)
reservedCacheNode_usagePrice :: (Maybe Double -> f (Maybe Double))
-> ReservedCacheNode -> f ReservedCacheNode
reservedCacheNode_usagePrice = (ReservedCacheNode -> Maybe Double)
-> (ReservedCacheNode -> Maybe Double -> ReservedCacheNode)
-> Lens
ReservedCacheNode ReservedCacheNode (Maybe Double) (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservedCacheNode' {Maybe Double
usagePrice :: Maybe Double
$sel:usagePrice:ReservedCacheNode' :: ReservedCacheNode -> Maybe Double
usagePrice} -> Maybe Double
usagePrice) (\s :: ReservedCacheNode
s@ReservedCacheNode' {} Maybe Double
a -> ReservedCacheNode
s {$sel:usagePrice:ReservedCacheNode' :: Maybe Double
usagePrice = Maybe Double
a} :: ReservedCacheNode)
reservedCacheNode_fixedPrice :: Lens.Lens' ReservedCacheNode (Prelude.Maybe Prelude.Double)
reservedCacheNode_fixedPrice :: (Maybe Double -> f (Maybe Double))
-> ReservedCacheNode -> f ReservedCacheNode
reservedCacheNode_fixedPrice = (ReservedCacheNode -> Maybe Double)
-> (ReservedCacheNode -> Maybe Double -> ReservedCacheNode)
-> Lens
ReservedCacheNode ReservedCacheNode (Maybe Double) (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservedCacheNode' {Maybe Double
fixedPrice :: Maybe Double
$sel:fixedPrice:ReservedCacheNode' :: ReservedCacheNode -> Maybe Double
fixedPrice} -> Maybe Double
fixedPrice) (\s :: ReservedCacheNode
s@ReservedCacheNode' {} Maybe Double
a -> ReservedCacheNode
s {$sel:fixedPrice:ReservedCacheNode' :: Maybe Double
fixedPrice = Maybe Double
a} :: ReservedCacheNode)
reservedCacheNode_duration :: Lens.Lens' ReservedCacheNode (Prelude.Maybe Prelude.Int)
reservedCacheNode_duration :: (Maybe Int -> f (Maybe Int))
-> ReservedCacheNode -> f ReservedCacheNode
reservedCacheNode_duration = (ReservedCacheNode -> Maybe Int)
-> (ReservedCacheNode -> Maybe Int -> ReservedCacheNode)
-> Lens ReservedCacheNode ReservedCacheNode (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservedCacheNode' {Maybe Int
duration :: Maybe Int
$sel:duration:ReservedCacheNode' :: ReservedCacheNode -> Maybe Int
duration} -> Maybe Int
duration) (\s :: ReservedCacheNode
s@ReservedCacheNode' {} Maybe Int
a -> ReservedCacheNode
s {$sel:duration:ReservedCacheNode' :: Maybe Int
duration = Maybe Int
a} :: ReservedCacheNode)
reservedCacheNode_reservedCacheNodesOfferingId :: Lens.Lens' ReservedCacheNode (Prelude.Maybe Prelude.Text)
reservedCacheNode_reservedCacheNodesOfferingId :: (Maybe Text -> f (Maybe Text))
-> ReservedCacheNode -> f ReservedCacheNode
reservedCacheNode_reservedCacheNodesOfferingId = (ReservedCacheNode -> Maybe Text)
-> (ReservedCacheNode -> Maybe Text -> ReservedCacheNode)
-> Lens
ReservedCacheNode ReservedCacheNode (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservedCacheNode' {Maybe Text
reservedCacheNodesOfferingId :: Maybe Text
$sel:reservedCacheNodesOfferingId:ReservedCacheNode' :: ReservedCacheNode -> Maybe Text
reservedCacheNodesOfferingId} -> Maybe Text
reservedCacheNodesOfferingId) (\s :: ReservedCacheNode
s@ReservedCacheNode' {} Maybe Text
a -> ReservedCacheNode
s {$sel:reservedCacheNodesOfferingId:ReservedCacheNode' :: Maybe Text
reservedCacheNodesOfferingId = Maybe Text
a} :: ReservedCacheNode)
instance Core.FromXML ReservedCacheNode where
parseXML :: [Node] -> Either String ReservedCacheNode
parseXML [Node]
x =
Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe [RecurringCharge]
-> Maybe Text
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> Maybe Text
-> ReservedCacheNode
ReservedCacheNode'
(Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe [RecurringCharge]
-> Maybe Text
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> Maybe Text
-> ReservedCacheNode)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe [RecurringCharge]
-> Maybe Text
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> Maybe Text
-> ReservedCacheNode)
forall (f :: * -> *) a b. Functor 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
"CacheNodeType")
Either
String
(Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe [RecurringCharge]
-> Maybe Text
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> Maybe Text
-> ReservedCacheNode)
-> Either String (Maybe Text)
-> Either
String
(Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe [RecurringCharge]
-> Maybe Text
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> Maybe Text
-> ReservedCacheNode)
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 ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe [RecurringCharge]
-> Maybe Text
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> Maybe Text
-> ReservedCacheNode)
-> Either String (Maybe ISO8601)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe [RecurringCharge]
-> Maybe Text
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> Maybe Text
-> ReservedCacheNode)
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 Int
-> Maybe Text
-> Maybe [RecurringCharge]
-> Maybe Text
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> Maybe Text
-> ReservedCacheNode)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe [RecurringCharge]
-> Maybe Text
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> Maybe Text
-> ReservedCacheNode)
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 Int
-> Maybe Text
-> Maybe [RecurringCharge]
-> Maybe Text
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> Maybe Text
-> ReservedCacheNode)
-> Either String (Maybe Text)
-> Either
String
(Maybe Int
-> Maybe Text
-> Maybe [RecurringCharge]
-> Maybe Text
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> Maybe Text
-> ReservedCacheNode)
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
"ReservationARN")
Either
String
(Maybe Int
-> Maybe Text
-> Maybe [RecurringCharge]
-> Maybe Text
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> Maybe Text
-> ReservedCacheNode)
-> Either String (Maybe Int)
-> Either
String
(Maybe Text
-> Maybe [RecurringCharge]
-> Maybe Text
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> Maybe Text
-> ReservedCacheNode)
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
"CacheNodeCount")
Either
String
(Maybe Text
-> Maybe [RecurringCharge]
-> Maybe Text
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> Maybe Text
-> ReservedCacheNode)
-> Either String (Maybe Text)
-> Either
String
(Maybe [RecurringCharge]
-> Maybe Text
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> Maybe Text
-> ReservedCacheNode)
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
"ReservedCacheNodeId")
Either
String
(Maybe [RecurringCharge]
-> Maybe Text
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> Maybe Text
-> ReservedCacheNode)
-> Either String (Maybe [RecurringCharge])
-> Either
String
(Maybe Text
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> Maybe Text
-> ReservedCacheNode)
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
-> Maybe Text
-> ReservedCacheNode)
-> Either String (Maybe Text)
-> Either
String
(Maybe Double
-> Maybe Double -> Maybe Int -> Maybe Text -> ReservedCacheNode)
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 -> Maybe Text -> ReservedCacheNode)
-> Either String (Maybe Double)
-> Either
String
(Maybe Double -> Maybe Int -> Maybe Text -> ReservedCacheNode)
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 -> Maybe Text -> ReservedCacheNode)
-> Either String (Maybe Double)
-> Either String (Maybe Int -> Maybe Text -> ReservedCacheNode)
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 -> Maybe Text -> ReservedCacheNode)
-> Either String (Maybe Int)
-> Either String (Maybe Text -> ReservedCacheNode)
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")
Either String (Maybe Text -> ReservedCacheNode)
-> Either String (Maybe Text) -> Either String ReservedCacheNode
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
"ReservedCacheNodesOfferingId")
instance Prelude.Hashable ReservedCacheNode
instance Prelude.NFData ReservedCacheNode