{-# 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.ElasticSearch.Types.ReservedElasticsearchInstance where
import qualified Amazonka.Core as Core
import Amazonka.ElasticSearch.Types.ESPartitionInstanceType
import Amazonka.ElasticSearch.Types.RecurringCharge
import Amazonka.ElasticSearch.Types.ReservedElasticsearchInstancePaymentOption
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ReservedElasticsearchInstance = ReservedElasticsearchInstance'
{
ReservedElasticsearchInstance -> Maybe Text
state :: Prelude.Maybe Prelude.Text,
ReservedElasticsearchInstance -> Maybe Text
currencyCode :: Prelude.Maybe Prelude.Text,
ReservedElasticsearchInstance -> Maybe POSIX
startTime :: Prelude.Maybe Core.POSIX,
ReservedElasticsearchInstance -> Maybe Text
reservedElasticsearchInstanceOfferingId :: Prelude.Maybe Prelude.Text,
ReservedElasticsearchInstance -> Maybe Text
reservedElasticsearchInstanceId :: Prelude.Maybe Prelude.Text,
ReservedElasticsearchInstance -> Maybe Int
elasticsearchInstanceCount :: Prelude.Maybe Prelude.Int,
ReservedElasticsearchInstance -> Maybe Text
reservationName :: Prelude.Maybe Prelude.Text,
ReservedElasticsearchInstance -> Maybe ESPartitionInstanceType
elasticsearchInstanceType :: Prelude.Maybe ESPartitionInstanceType,
ReservedElasticsearchInstance -> Maybe [RecurringCharge]
recurringCharges :: Prelude.Maybe [RecurringCharge],
ReservedElasticsearchInstance -> Maybe Double
usagePrice :: Prelude.Maybe Prelude.Double,
ReservedElasticsearchInstance -> Maybe Double
fixedPrice :: Prelude.Maybe Prelude.Double,
ReservedElasticsearchInstance -> Maybe Int
duration :: Prelude.Maybe Prelude.Int,
ReservedElasticsearchInstance
-> Maybe ReservedElasticsearchInstancePaymentOption
paymentOption :: Prelude.Maybe ReservedElasticsearchInstancePaymentOption
}
deriving (ReservedElasticsearchInstance
-> ReservedElasticsearchInstance -> Bool
(ReservedElasticsearchInstance
-> ReservedElasticsearchInstance -> Bool)
-> (ReservedElasticsearchInstance
-> ReservedElasticsearchInstance -> Bool)
-> Eq ReservedElasticsearchInstance
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ReservedElasticsearchInstance
-> ReservedElasticsearchInstance -> Bool
$c/= :: ReservedElasticsearchInstance
-> ReservedElasticsearchInstance -> Bool
== :: ReservedElasticsearchInstance
-> ReservedElasticsearchInstance -> Bool
$c== :: ReservedElasticsearchInstance
-> ReservedElasticsearchInstance -> Bool
Prelude.Eq, ReadPrec [ReservedElasticsearchInstance]
ReadPrec ReservedElasticsearchInstance
Int -> ReadS ReservedElasticsearchInstance
ReadS [ReservedElasticsearchInstance]
(Int -> ReadS ReservedElasticsearchInstance)
-> ReadS [ReservedElasticsearchInstance]
-> ReadPrec ReservedElasticsearchInstance
-> ReadPrec [ReservedElasticsearchInstance]
-> Read ReservedElasticsearchInstance
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ReservedElasticsearchInstance]
$creadListPrec :: ReadPrec [ReservedElasticsearchInstance]
readPrec :: ReadPrec ReservedElasticsearchInstance
$creadPrec :: ReadPrec ReservedElasticsearchInstance
readList :: ReadS [ReservedElasticsearchInstance]
$creadList :: ReadS [ReservedElasticsearchInstance]
readsPrec :: Int -> ReadS ReservedElasticsearchInstance
$creadsPrec :: Int -> ReadS ReservedElasticsearchInstance
Prelude.Read, Int -> ReservedElasticsearchInstance -> ShowS
[ReservedElasticsearchInstance] -> ShowS
ReservedElasticsearchInstance -> String
(Int -> ReservedElasticsearchInstance -> ShowS)
-> (ReservedElasticsearchInstance -> String)
-> ([ReservedElasticsearchInstance] -> ShowS)
-> Show ReservedElasticsearchInstance
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ReservedElasticsearchInstance] -> ShowS
$cshowList :: [ReservedElasticsearchInstance] -> ShowS
show :: ReservedElasticsearchInstance -> String
$cshow :: ReservedElasticsearchInstance -> String
showsPrec :: Int -> ReservedElasticsearchInstance -> ShowS
$cshowsPrec :: Int -> ReservedElasticsearchInstance -> ShowS
Prelude.Show, (forall x.
ReservedElasticsearchInstance
-> Rep ReservedElasticsearchInstance x)
-> (forall x.
Rep ReservedElasticsearchInstance x
-> ReservedElasticsearchInstance)
-> Generic ReservedElasticsearchInstance
forall x.
Rep ReservedElasticsearchInstance x
-> ReservedElasticsearchInstance
forall x.
ReservedElasticsearchInstance
-> Rep ReservedElasticsearchInstance x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ReservedElasticsearchInstance x
-> ReservedElasticsearchInstance
$cfrom :: forall x.
ReservedElasticsearchInstance
-> Rep ReservedElasticsearchInstance x
Prelude.Generic)
newReservedElasticsearchInstance ::
ReservedElasticsearchInstance
newReservedElasticsearchInstance :: ReservedElasticsearchInstance
newReservedElasticsearchInstance =
ReservedElasticsearchInstance' :: Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe ESPartitionInstanceType
-> Maybe [RecurringCharge]
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> Maybe ReservedElasticsearchInstancePaymentOption
-> ReservedElasticsearchInstance
ReservedElasticsearchInstance'
{ $sel:state:ReservedElasticsearchInstance' :: Maybe Text
state =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:currencyCode:ReservedElasticsearchInstance' :: Maybe Text
currencyCode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:startTime:ReservedElasticsearchInstance' :: Maybe POSIX
startTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:reservedElasticsearchInstanceOfferingId:ReservedElasticsearchInstance' :: Maybe Text
reservedElasticsearchInstanceOfferingId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:reservedElasticsearchInstanceId:ReservedElasticsearchInstance' :: Maybe Text
reservedElasticsearchInstanceId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:elasticsearchInstanceCount:ReservedElasticsearchInstance' :: Maybe Int
elasticsearchInstanceCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:reservationName:ReservedElasticsearchInstance' :: Maybe Text
reservationName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:elasticsearchInstanceType:ReservedElasticsearchInstance' :: Maybe ESPartitionInstanceType
elasticsearchInstanceType = Maybe ESPartitionInstanceType
forall a. Maybe a
Prelude.Nothing,
$sel:recurringCharges:ReservedElasticsearchInstance' :: Maybe [RecurringCharge]
recurringCharges = Maybe [RecurringCharge]
forall a. Maybe a
Prelude.Nothing,
$sel:usagePrice:ReservedElasticsearchInstance' :: Maybe Double
usagePrice = Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:fixedPrice:ReservedElasticsearchInstance' :: Maybe Double
fixedPrice = Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:duration:ReservedElasticsearchInstance' :: Maybe Int
duration = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:paymentOption:ReservedElasticsearchInstance' :: Maybe ReservedElasticsearchInstancePaymentOption
paymentOption = Maybe ReservedElasticsearchInstancePaymentOption
forall a. Maybe a
Prelude.Nothing
}
reservedElasticsearchInstance_state :: Lens.Lens' ReservedElasticsearchInstance (Prelude.Maybe Prelude.Text)
reservedElasticsearchInstance_state :: (Maybe Text -> f (Maybe Text))
-> ReservedElasticsearchInstance -> f ReservedElasticsearchInstance
reservedElasticsearchInstance_state = (ReservedElasticsearchInstance -> Maybe Text)
-> (ReservedElasticsearchInstance
-> Maybe Text -> ReservedElasticsearchInstance)
-> Lens
ReservedElasticsearchInstance
ReservedElasticsearchInstance
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservedElasticsearchInstance' {Maybe Text
state :: Maybe Text
$sel:state:ReservedElasticsearchInstance' :: ReservedElasticsearchInstance -> Maybe Text
state} -> Maybe Text
state) (\s :: ReservedElasticsearchInstance
s@ReservedElasticsearchInstance' {} Maybe Text
a -> ReservedElasticsearchInstance
s {$sel:state:ReservedElasticsearchInstance' :: Maybe Text
state = Maybe Text
a} :: ReservedElasticsearchInstance)
reservedElasticsearchInstance_currencyCode :: Lens.Lens' ReservedElasticsearchInstance (Prelude.Maybe Prelude.Text)
reservedElasticsearchInstance_currencyCode :: (Maybe Text -> f (Maybe Text))
-> ReservedElasticsearchInstance -> f ReservedElasticsearchInstance
reservedElasticsearchInstance_currencyCode = (ReservedElasticsearchInstance -> Maybe Text)
-> (ReservedElasticsearchInstance
-> Maybe Text -> ReservedElasticsearchInstance)
-> Lens
ReservedElasticsearchInstance
ReservedElasticsearchInstance
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservedElasticsearchInstance' {Maybe Text
currencyCode :: Maybe Text
$sel:currencyCode:ReservedElasticsearchInstance' :: ReservedElasticsearchInstance -> Maybe Text
currencyCode} -> Maybe Text
currencyCode) (\s :: ReservedElasticsearchInstance
s@ReservedElasticsearchInstance' {} Maybe Text
a -> ReservedElasticsearchInstance
s {$sel:currencyCode:ReservedElasticsearchInstance' :: Maybe Text
currencyCode = Maybe Text
a} :: ReservedElasticsearchInstance)
reservedElasticsearchInstance_startTime :: Lens.Lens' ReservedElasticsearchInstance (Prelude.Maybe Prelude.UTCTime)
reservedElasticsearchInstance_startTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ReservedElasticsearchInstance -> f ReservedElasticsearchInstance
reservedElasticsearchInstance_startTime = (ReservedElasticsearchInstance -> Maybe POSIX)
-> (ReservedElasticsearchInstance
-> Maybe POSIX -> ReservedElasticsearchInstance)
-> Lens
ReservedElasticsearchInstance
ReservedElasticsearchInstance
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservedElasticsearchInstance' {Maybe POSIX
startTime :: Maybe POSIX
$sel:startTime:ReservedElasticsearchInstance' :: ReservedElasticsearchInstance -> Maybe POSIX
startTime} -> Maybe POSIX
startTime) (\s :: ReservedElasticsearchInstance
s@ReservedElasticsearchInstance' {} Maybe POSIX
a -> ReservedElasticsearchInstance
s {$sel:startTime:ReservedElasticsearchInstance' :: Maybe POSIX
startTime = Maybe POSIX
a} :: ReservedElasticsearchInstance) ((Maybe POSIX -> f (Maybe POSIX))
-> ReservedElasticsearchInstance
-> f ReservedElasticsearchInstance)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ReservedElasticsearchInstance
-> f ReservedElasticsearchInstance
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
reservedElasticsearchInstance_reservedElasticsearchInstanceOfferingId :: Lens.Lens' ReservedElasticsearchInstance (Prelude.Maybe Prelude.Text)
reservedElasticsearchInstance_reservedElasticsearchInstanceOfferingId :: (Maybe Text -> f (Maybe Text))
-> ReservedElasticsearchInstance -> f ReservedElasticsearchInstance
reservedElasticsearchInstance_reservedElasticsearchInstanceOfferingId = (ReservedElasticsearchInstance -> Maybe Text)
-> (ReservedElasticsearchInstance
-> Maybe Text -> ReservedElasticsearchInstance)
-> Lens
ReservedElasticsearchInstance
ReservedElasticsearchInstance
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservedElasticsearchInstance' {Maybe Text
reservedElasticsearchInstanceOfferingId :: Maybe Text
$sel:reservedElasticsearchInstanceOfferingId:ReservedElasticsearchInstance' :: ReservedElasticsearchInstance -> Maybe Text
reservedElasticsearchInstanceOfferingId} -> Maybe Text
reservedElasticsearchInstanceOfferingId) (\s :: ReservedElasticsearchInstance
s@ReservedElasticsearchInstance' {} Maybe Text
a -> ReservedElasticsearchInstance
s {$sel:reservedElasticsearchInstanceOfferingId:ReservedElasticsearchInstance' :: Maybe Text
reservedElasticsearchInstanceOfferingId = Maybe Text
a} :: ReservedElasticsearchInstance)
reservedElasticsearchInstance_reservedElasticsearchInstanceId :: Lens.Lens' ReservedElasticsearchInstance (Prelude.Maybe Prelude.Text)
reservedElasticsearchInstance_reservedElasticsearchInstanceId :: (Maybe Text -> f (Maybe Text))
-> ReservedElasticsearchInstance -> f ReservedElasticsearchInstance
reservedElasticsearchInstance_reservedElasticsearchInstanceId = (ReservedElasticsearchInstance -> Maybe Text)
-> (ReservedElasticsearchInstance
-> Maybe Text -> ReservedElasticsearchInstance)
-> Lens
ReservedElasticsearchInstance
ReservedElasticsearchInstance
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservedElasticsearchInstance' {Maybe Text
reservedElasticsearchInstanceId :: Maybe Text
$sel:reservedElasticsearchInstanceId:ReservedElasticsearchInstance' :: ReservedElasticsearchInstance -> Maybe Text
reservedElasticsearchInstanceId} -> Maybe Text
reservedElasticsearchInstanceId) (\s :: ReservedElasticsearchInstance
s@ReservedElasticsearchInstance' {} Maybe Text
a -> ReservedElasticsearchInstance
s {$sel:reservedElasticsearchInstanceId:ReservedElasticsearchInstance' :: Maybe Text
reservedElasticsearchInstanceId = Maybe Text
a} :: ReservedElasticsearchInstance)
reservedElasticsearchInstance_elasticsearchInstanceCount :: Lens.Lens' ReservedElasticsearchInstance (Prelude.Maybe Prelude.Int)
reservedElasticsearchInstance_elasticsearchInstanceCount :: (Maybe Int -> f (Maybe Int))
-> ReservedElasticsearchInstance -> f ReservedElasticsearchInstance
reservedElasticsearchInstance_elasticsearchInstanceCount = (ReservedElasticsearchInstance -> Maybe Int)
-> (ReservedElasticsearchInstance
-> Maybe Int -> ReservedElasticsearchInstance)
-> Lens
ReservedElasticsearchInstance
ReservedElasticsearchInstance
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservedElasticsearchInstance' {Maybe Int
elasticsearchInstanceCount :: Maybe Int
$sel:elasticsearchInstanceCount:ReservedElasticsearchInstance' :: ReservedElasticsearchInstance -> Maybe Int
elasticsearchInstanceCount} -> Maybe Int
elasticsearchInstanceCount) (\s :: ReservedElasticsearchInstance
s@ReservedElasticsearchInstance' {} Maybe Int
a -> ReservedElasticsearchInstance
s {$sel:elasticsearchInstanceCount:ReservedElasticsearchInstance' :: Maybe Int
elasticsearchInstanceCount = Maybe Int
a} :: ReservedElasticsearchInstance)
reservedElasticsearchInstance_reservationName :: Lens.Lens' ReservedElasticsearchInstance (Prelude.Maybe Prelude.Text)
reservedElasticsearchInstance_reservationName :: (Maybe Text -> f (Maybe Text))
-> ReservedElasticsearchInstance -> f ReservedElasticsearchInstance
reservedElasticsearchInstance_reservationName = (ReservedElasticsearchInstance -> Maybe Text)
-> (ReservedElasticsearchInstance
-> Maybe Text -> ReservedElasticsearchInstance)
-> Lens
ReservedElasticsearchInstance
ReservedElasticsearchInstance
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservedElasticsearchInstance' {Maybe Text
reservationName :: Maybe Text
$sel:reservationName:ReservedElasticsearchInstance' :: ReservedElasticsearchInstance -> Maybe Text
reservationName} -> Maybe Text
reservationName) (\s :: ReservedElasticsearchInstance
s@ReservedElasticsearchInstance' {} Maybe Text
a -> ReservedElasticsearchInstance
s {$sel:reservationName:ReservedElasticsearchInstance' :: Maybe Text
reservationName = Maybe Text
a} :: ReservedElasticsearchInstance)
reservedElasticsearchInstance_elasticsearchInstanceType :: Lens.Lens' ReservedElasticsearchInstance (Prelude.Maybe ESPartitionInstanceType)
reservedElasticsearchInstance_elasticsearchInstanceType :: (Maybe ESPartitionInstanceType
-> f (Maybe ESPartitionInstanceType))
-> ReservedElasticsearchInstance -> f ReservedElasticsearchInstance
reservedElasticsearchInstance_elasticsearchInstanceType = (ReservedElasticsearchInstance -> Maybe ESPartitionInstanceType)
-> (ReservedElasticsearchInstance
-> Maybe ESPartitionInstanceType -> ReservedElasticsearchInstance)
-> Lens
ReservedElasticsearchInstance
ReservedElasticsearchInstance
(Maybe ESPartitionInstanceType)
(Maybe ESPartitionInstanceType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservedElasticsearchInstance' {Maybe ESPartitionInstanceType
elasticsearchInstanceType :: Maybe ESPartitionInstanceType
$sel:elasticsearchInstanceType:ReservedElasticsearchInstance' :: ReservedElasticsearchInstance -> Maybe ESPartitionInstanceType
elasticsearchInstanceType} -> Maybe ESPartitionInstanceType
elasticsearchInstanceType) (\s :: ReservedElasticsearchInstance
s@ReservedElasticsearchInstance' {} Maybe ESPartitionInstanceType
a -> ReservedElasticsearchInstance
s {$sel:elasticsearchInstanceType:ReservedElasticsearchInstance' :: Maybe ESPartitionInstanceType
elasticsearchInstanceType = Maybe ESPartitionInstanceType
a} :: ReservedElasticsearchInstance)
reservedElasticsearchInstance_recurringCharges :: Lens.Lens' ReservedElasticsearchInstance (Prelude.Maybe [RecurringCharge])
reservedElasticsearchInstance_recurringCharges :: (Maybe [RecurringCharge] -> f (Maybe [RecurringCharge]))
-> ReservedElasticsearchInstance -> f ReservedElasticsearchInstance
reservedElasticsearchInstance_recurringCharges = (ReservedElasticsearchInstance -> Maybe [RecurringCharge])
-> (ReservedElasticsearchInstance
-> Maybe [RecurringCharge] -> ReservedElasticsearchInstance)
-> Lens
ReservedElasticsearchInstance
ReservedElasticsearchInstance
(Maybe [RecurringCharge])
(Maybe [RecurringCharge])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservedElasticsearchInstance' {Maybe [RecurringCharge]
recurringCharges :: Maybe [RecurringCharge]
$sel:recurringCharges:ReservedElasticsearchInstance' :: ReservedElasticsearchInstance -> Maybe [RecurringCharge]
recurringCharges} -> Maybe [RecurringCharge]
recurringCharges) (\s :: ReservedElasticsearchInstance
s@ReservedElasticsearchInstance' {} Maybe [RecurringCharge]
a -> ReservedElasticsearchInstance
s {$sel:recurringCharges:ReservedElasticsearchInstance' :: Maybe [RecurringCharge]
recurringCharges = Maybe [RecurringCharge]
a} :: ReservedElasticsearchInstance) ((Maybe [RecurringCharge] -> f (Maybe [RecurringCharge]))
-> ReservedElasticsearchInstance
-> f ReservedElasticsearchInstance)
-> ((Maybe [RecurringCharge] -> f (Maybe [RecurringCharge]))
-> Maybe [RecurringCharge] -> f (Maybe [RecurringCharge]))
-> (Maybe [RecurringCharge] -> f (Maybe [RecurringCharge]))
-> ReservedElasticsearchInstance
-> f ReservedElasticsearchInstance
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
reservedElasticsearchInstance_usagePrice :: Lens.Lens' ReservedElasticsearchInstance (Prelude.Maybe Prelude.Double)
reservedElasticsearchInstance_usagePrice :: (Maybe Double -> f (Maybe Double))
-> ReservedElasticsearchInstance -> f ReservedElasticsearchInstance
reservedElasticsearchInstance_usagePrice = (ReservedElasticsearchInstance -> Maybe Double)
-> (ReservedElasticsearchInstance
-> Maybe Double -> ReservedElasticsearchInstance)
-> Lens
ReservedElasticsearchInstance
ReservedElasticsearchInstance
(Maybe Double)
(Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservedElasticsearchInstance' {Maybe Double
usagePrice :: Maybe Double
$sel:usagePrice:ReservedElasticsearchInstance' :: ReservedElasticsearchInstance -> Maybe Double
usagePrice} -> Maybe Double
usagePrice) (\s :: ReservedElasticsearchInstance
s@ReservedElasticsearchInstance' {} Maybe Double
a -> ReservedElasticsearchInstance
s {$sel:usagePrice:ReservedElasticsearchInstance' :: Maybe Double
usagePrice = Maybe Double
a} :: ReservedElasticsearchInstance)
reservedElasticsearchInstance_fixedPrice :: Lens.Lens' ReservedElasticsearchInstance (Prelude.Maybe Prelude.Double)
reservedElasticsearchInstance_fixedPrice :: (Maybe Double -> f (Maybe Double))
-> ReservedElasticsearchInstance -> f ReservedElasticsearchInstance
reservedElasticsearchInstance_fixedPrice = (ReservedElasticsearchInstance -> Maybe Double)
-> (ReservedElasticsearchInstance
-> Maybe Double -> ReservedElasticsearchInstance)
-> Lens
ReservedElasticsearchInstance
ReservedElasticsearchInstance
(Maybe Double)
(Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservedElasticsearchInstance' {Maybe Double
fixedPrice :: Maybe Double
$sel:fixedPrice:ReservedElasticsearchInstance' :: ReservedElasticsearchInstance -> Maybe Double
fixedPrice} -> Maybe Double
fixedPrice) (\s :: ReservedElasticsearchInstance
s@ReservedElasticsearchInstance' {} Maybe Double
a -> ReservedElasticsearchInstance
s {$sel:fixedPrice:ReservedElasticsearchInstance' :: Maybe Double
fixedPrice = Maybe Double
a} :: ReservedElasticsearchInstance)
reservedElasticsearchInstance_duration :: Lens.Lens' ReservedElasticsearchInstance (Prelude.Maybe Prelude.Int)
reservedElasticsearchInstance_duration :: (Maybe Int -> f (Maybe Int))
-> ReservedElasticsearchInstance -> f ReservedElasticsearchInstance
reservedElasticsearchInstance_duration = (ReservedElasticsearchInstance -> Maybe Int)
-> (ReservedElasticsearchInstance
-> Maybe Int -> ReservedElasticsearchInstance)
-> Lens
ReservedElasticsearchInstance
ReservedElasticsearchInstance
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservedElasticsearchInstance' {Maybe Int
duration :: Maybe Int
$sel:duration:ReservedElasticsearchInstance' :: ReservedElasticsearchInstance -> Maybe Int
duration} -> Maybe Int
duration) (\s :: ReservedElasticsearchInstance
s@ReservedElasticsearchInstance' {} Maybe Int
a -> ReservedElasticsearchInstance
s {$sel:duration:ReservedElasticsearchInstance' :: Maybe Int
duration = Maybe Int
a} :: ReservedElasticsearchInstance)
reservedElasticsearchInstance_paymentOption :: Lens.Lens' ReservedElasticsearchInstance (Prelude.Maybe ReservedElasticsearchInstancePaymentOption)
reservedElasticsearchInstance_paymentOption :: (Maybe ReservedElasticsearchInstancePaymentOption
-> f (Maybe ReservedElasticsearchInstancePaymentOption))
-> ReservedElasticsearchInstance -> f ReservedElasticsearchInstance
reservedElasticsearchInstance_paymentOption = (ReservedElasticsearchInstance
-> Maybe ReservedElasticsearchInstancePaymentOption)
-> (ReservedElasticsearchInstance
-> Maybe ReservedElasticsearchInstancePaymentOption
-> ReservedElasticsearchInstance)
-> Lens
ReservedElasticsearchInstance
ReservedElasticsearchInstance
(Maybe ReservedElasticsearchInstancePaymentOption)
(Maybe ReservedElasticsearchInstancePaymentOption)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservedElasticsearchInstance' {Maybe ReservedElasticsearchInstancePaymentOption
paymentOption :: Maybe ReservedElasticsearchInstancePaymentOption
$sel:paymentOption:ReservedElasticsearchInstance' :: ReservedElasticsearchInstance
-> Maybe ReservedElasticsearchInstancePaymentOption
paymentOption} -> Maybe ReservedElasticsearchInstancePaymentOption
paymentOption) (\s :: ReservedElasticsearchInstance
s@ReservedElasticsearchInstance' {} Maybe ReservedElasticsearchInstancePaymentOption
a -> ReservedElasticsearchInstance
s {$sel:paymentOption:ReservedElasticsearchInstance' :: Maybe ReservedElasticsearchInstancePaymentOption
paymentOption = Maybe ReservedElasticsearchInstancePaymentOption
a} :: ReservedElasticsearchInstance)
instance Core.FromJSON ReservedElasticsearchInstance where
parseJSON :: Value -> Parser ReservedElasticsearchInstance
parseJSON =
String
-> (Object -> Parser ReservedElasticsearchInstance)
-> Value
-> Parser ReservedElasticsearchInstance
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ReservedElasticsearchInstance"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe ESPartitionInstanceType
-> Maybe [RecurringCharge]
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> Maybe ReservedElasticsearchInstancePaymentOption
-> ReservedElasticsearchInstance
ReservedElasticsearchInstance'
(Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe ESPartitionInstanceType
-> Maybe [RecurringCharge]
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> Maybe ReservedElasticsearchInstancePaymentOption
-> ReservedElasticsearchInstance)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe ESPartitionInstanceType
-> Maybe [RecurringCharge]
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> Maybe ReservedElasticsearchInstancePaymentOption
-> ReservedElasticsearchInstance)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"State")
Parser
(Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe ESPartitionInstanceType
-> Maybe [RecurringCharge]
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> Maybe ReservedElasticsearchInstancePaymentOption
-> ReservedElasticsearchInstance)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe ESPartitionInstanceType
-> Maybe [RecurringCharge]
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> Maybe ReservedElasticsearchInstancePaymentOption
-> ReservedElasticsearchInstance)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CurrencyCode")
Parser
(Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe ESPartitionInstanceType
-> Maybe [RecurringCharge]
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> Maybe ReservedElasticsearchInstancePaymentOption
-> ReservedElasticsearchInstance)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe ESPartitionInstanceType
-> Maybe [RecurringCharge]
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> Maybe ReservedElasticsearchInstancePaymentOption
-> ReservedElasticsearchInstance)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StartTime")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe ESPartitionInstanceType
-> Maybe [RecurringCharge]
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> Maybe ReservedElasticsearchInstancePaymentOption
-> ReservedElasticsearchInstance)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe ESPartitionInstanceType
-> Maybe [RecurringCharge]
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> Maybe ReservedElasticsearchInstancePaymentOption
-> ReservedElasticsearchInstance)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ReservedElasticsearchInstanceOfferingId"
)
Parser
(Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe ESPartitionInstanceType
-> Maybe [RecurringCharge]
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> Maybe ReservedElasticsearchInstancePaymentOption
-> ReservedElasticsearchInstance)
-> Parser (Maybe Text)
-> Parser
(Maybe Int
-> Maybe Text
-> Maybe ESPartitionInstanceType
-> Maybe [RecurringCharge]
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> Maybe ReservedElasticsearchInstancePaymentOption
-> ReservedElasticsearchInstance)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ReservedElasticsearchInstanceId")
Parser
(Maybe Int
-> Maybe Text
-> Maybe ESPartitionInstanceType
-> Maybe [RecurringCharge]
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> Maybe ReservedElasticsearchInstancePaymentOption
-> ReservedElasticsearchInstance)
-> Parser (Maybe Int)
-> Parser
(Maybe Text
-> Maybe ESPartitionInstanceType
-> Maybe [RecurringCharge]
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> Maybe ReservedElasticsearchInstancePaymentOption
-> ReservedElasticsearchInstance)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ElasticsearchInstanceCount")
Parser
(Maybe Text
-> Maybe ESPartitionInstanceType
-> Maybe [RecurringCharge]
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> Maybe ReservedElasticsearchInstancePaymentOption
-> ReservedElasticsearchInstance)
-> Parser (Maybe Text)
-> Parser
(Maybe ESPartitionInstanceType
-> Maybe [RecurringCharge]
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> Maybe ReservedElasticsearchInstancePaymentOption
-> ReservedElasticsearchInstance)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ReservationName")
Parser
(Maybe ESPartitionInstanceType
-> Maybe [RecurringCharge]
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> Maybe ReservedElasticsearchInstancePaymentOption
-> ReservedElasticsearchInstance)
-> Parser (Maybe ESPartitionInstanceType)
-> Parser
(Maybe [RecurringCharge]
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> Maybe ReservedElasticsearchInstancePaymentOption
-> ReservedElasticsearchInstance)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ESPartitionInstanceType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ElasticsearchInstanceType")
Parser
(Maybe [RecurringCharge]
-> Maybe Double
-> Maybe Double
-> Maybe Int
-> Maybe ReservedElasticsearchInstancePaymentOption
-> ReservedElasticsearchInstance)
-> Parser (Maybe [RecurringCharge])
-> Parser
(Maybe Double
-> Maybe Double
-> Maybe Int
-> Maybe ReservedElasticsearchInstancePaymentOption
-> ReservedElasticsearchInstance)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [RecurringCharge]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RecurringCharges"
Parser (Maybe (Maybe [RecurringCharge]))
-> Maybe [RecurringCharge] -> Parser (Maybe [RecurringCharge])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [RecurringCharge]
forall a. Monoid a => a
Prelude.mempty
)
Parser
(Maybe Double
-> Maybe Double
-> Maybe Int
-> Maybe ReservedElasticsearchInstancePaymentOption
-> ReservedElasticsearchInstance)
-> Parser (Maybe Double)
-> Parser
(Maybe Double
-> Maybe Int
-> Maybe ReservedElasticsearchInstancePaymentOption
-> ReservedElasticsearchInstance)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Double)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"UsagePrice")
Parser
(Maybe Double
-> Maybe Int
-> Maybe ReservedElasticsearchInstancePaymentOption
-> ReservedElasticsearchInstance)
-> Parser (Maybe Double)
-> Parser
(Maybe Int
-> Maybe ReservedElasticsearchInstancePaymentOption
-> ReservedElasticsearchInstance)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Double)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"FixedPrice")
Parser
(Maybe Int
-> Maybe ReservedElasticsearchInstancePaymentOption
-> ReservedElasticsearchInstance)
-> Parser (Maybe Int)
-> Parser
(Maybe ReservedElasticsearchInstancePaymentOption
-> ReservedElasticsearchInstance)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Duration")
Parser
(Maybe ReservedElasticsearchInstancePaymentOption
-> ReservedElasticsearchInstance)
-> Parser (Maybe ReservedElasticsearchInstancePaymentOption)
-> Parser ReservedElasticsearchInstance
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text
-> Parser (Maybe ReservedElasticsearchInstancePaymentOption)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PaymentOption")
)
instance
Prelude.Hashable
ReservedElasticsearchInstance
instance Prelude.NFData ReservedElasticsearchInstance