{-# 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.DocumentDB.Types.OrderableDBInstanceOption where
import qualified Amazonka.Core as Core
import Amazonka.DocumentDB.Types.AvailabilityZone
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data OrderableDBInstanceOption = OrderableDBInstanceOption'
{
OrderableDBInstanceOption -> Maybe Text
engineVersion :: Prelude.Maybe Prelude.Text,
OrderableDBInstanceOption -> Maybe Text
engine :: Prelude.Maybe Prelude.Text,
OrderableDBInstanceOption -> Maybe Text
dbInstanceClass :: Prelude.Maybe Prelude.Text,
OrderableDBInstanceOption -> Maybe Text
licenseModel :: Prelude.Maybe Prelude.Text,
OrderableDBInstanceOption -> Maybe [AvailabilityZone]
availabilityZones :: Prelude.Maybe [AvailabilityZone],
OrderableDBInstanceOption -> Maybe Bool
vpc :: Prelude.Maybe Prelude.Bool
}
deriving (OrderableDBInstanceOption -> OrderableDBInstanceOption -> Bool
(OrderableDBInstanceOption -> OrderableDBInstanceOption -> Bool)
-> (OrderableDBInstanceOption -> OrderableDBInstanceOption -> Bool)
-> Eq OrderableDBInstanceOption
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OrderableDBInstanceOption -> OrderableDBInstanceOption -> Bool
$c/= :: OrderableDBInstanceOption -> OrderableDBInstanceOption -> Bool
== :: OrderableDBInstanceOption -> OrderableDBInstanceOption -> Bool
$c== :: OrderableDBInstanceOption -> OrderableDBInstanceOption -> Bool
Prelude.Eq, ReadPrec [OrderableDBInstanceOption]
ReadPrec OrderableDBInstanceOption
Int -> ReadS OrderableDBInstanceOption
ReadS [OrderableDBInstanceOption]
(Int -> ReadS OrderableDBInstanceOption)
-> ReadS [OrderableDBInstanceOption]
-> ReadPrec OrderableDBInstanceOption
-> ReadPrec [OrderableDBInstanceOption]
-> Read OrderableDBInstanceOption
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [OrderableDBInstanceOption]
$creadListPrec :: ReadPrec [OrderableDBInstanceOption]
readPrec :: ReadPrec OrderableDBInstanceOption
$creadPrec :: ReadPrec OrderableDBInstanceOption
readList :: ReadS [OrderableDBInstanceOption]
$creadList :: ReadS [OrderableDBInstanceOption]
readsPrec :: Int -> ReadS OrderableDBInstanceOption
$creadsPrec :: Int -> ReadS OrderableDBInstanceOption
Prelude.Read, Int -> OrderableDBInstanceOption -> ShowS
[OrderableDBInstanceOption] -> ShowS
OrderableDBInstanceOption -> String
(Int -> OrderableDBInstanceOption -> ShowS)
-> (OrderableDBInstanceOption -> String)
-> ([OrderableDBInstanceOption] -> ShowS)
-> Show OrderableDBInstanceOption
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OrderableDBInstanceOption] -> ShowS
$cshowList :: [OrderableDBInstanceOption] -> ShowS
show :: OrderableDBInstanceOption -> String
$cshow :: OrderableDBInstanceOption -> String
showsPrec :: Int -> OrderableDBInstanceOption -> ShowS
$cshowsPrec :: Int -> OrderableDBInstanceOption -> ShowS
Prelude.Show, (forall x.
OrderableDBInstanceOption -> Rep OrderableDBInstanceOption x)
-> (forall x.
Rep OrderableDBInstanceOption x -> OrderableDBInstanceOption)
-> Generic OrderableDBInstanceOption
forall x.
Rep OrderableDBInstanceOption x -> OrderableDBInstanceOption
forall x.
OrderableDBInstanceOption -> Rep OrderableDBInstanceOption x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep OrderableDBInstanceOption x -> OrderableDBInstanceOption
$cfrom :: forall x.
OrderableDBInstanceOption -> Rep OrderableDBInstanceOption x
Prelude.Generic)
newOrderableDBInstanceOption ::
OrderableDBInstanceOption
newOrderableDBInstanceOption :: OrderableDBInstanceOption
newOrderableDBInstanceOption =
OrderableDBInstanceOption' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [AvailabilityZone]
-> Maybe Bool
-> OrderableDBInstanceOption
OrderableDBInstanceOption'
{ $sel:engineVersion:OrderableDBInstanceOption' :: Maybe Text
engineVersion =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:engine:OrderableDBInstanceOption' :: Maybe Text
engine = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:dbInstanceClass:OrderableDBInstanceOption' :: Maybe Text
dbInstanceClass = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:licenseModel:OrderableDBInstanceOption' :: Maybe Text
licenseModel = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:availabilityZones:OrderableDBInstanceOption' :: Maybe [AvailabilityZone]
availabilityZones = Maybe [AvailabilityZone]
forall a. Maybe a
Prelude.Nothing,
$sel:vpc:OrderableDBInstanceOption' :: Maybe Bool
vpc = Maybe Bool
forall a. Maybe a
Prelude.Nothing
}
orderableDBInstanceOption_engineVersion :: Lens.Lens' OrderableDBInstanceOption (Prelude.Maybe Prelude.Text)
orderableDBInstanceOption_engineVersion :: (Maybe Text -> f (Maybe Text))
-> OrderableDBInstanceOption -> f OrderableDBInstanceOption
orderableDBInstanceOption_engineVersion = (OrderableDBInstanceOption -> Maybe Text)
-> (OrderableDBInstanceOption
-> Maybe Text -> OrderableDBInstanceOption)
-> Lens
OrderableDBInstanceOption
OrderableDBInstanceOption
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrderableDBInstanceOption' {Maybe Text
engineVersion :: Maybe Text
$sel:engineVersion:OrderableDBInstanceOption' :: OrderableDBInstanceOption -> Maybe Text
engineVersion} -> Maybe Text
engineVersion) (\s :: OrderableDBInstanceOption
s@OrderableDBInstanceOption' {} Maybe Text
a -> OrderableDBInstanceOption
s {$sel:engineVersion:OrderableDBInstanceOption' :: Maybe Text
engineVersion = Maybe Text
a} :: OrderableDBInstanceOption)
orderableDBInstanceOption_engine :: Lens.Lens' OrderableDBInstanceOption (Prelude.Maybe Prelude.Text)
orderableDBInstanceOption_engine :: (Maybe Text -> f (Maybe Text))
-> OrderableDBInstanceOption -> f OrderableDBInstanceOption
orderableDBInstanceOption_engine = (OrderableDBInstanceOption -> Maybe Text)
-> (OrderableDBInstanceOption
-> Maybe Text -> OrderableDBInstanceOption)
-> Lens
OrderableDBInstanceOption
OrderableDBInstanceOption
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrderableDBInstanceOption' {Maybe Text
engine :: Maybe Text
$sel:engine:OrderableDBInstanceOption' :: OrderableDBInstanceOption -> Maybe Text
engine} -> Maybe Text
engine) (\s :: OrderableDBInstanceOption
s@OrderableDBInstanceOption' {} Maybe Text
a -> OrderableDBInstanceOption
s {$sel:engine:OrderableDBInstanceOption' :: Maybe Text
engine = Maybe Text
a} :: OrderableDBInstanceOption)
orderableDBInstanceOption_dbInstanceClass :: Lens.Lens' OrderableDBInstanceOption (Prelude.Maybe Prelude.Text)
orderableDBInstanceOption_dbInstanceClass :: (Maybe Text -> f (Maybe Text))
-> OrderableDBInstanceOption -> f OrderableDBInstanceOption
orderableDBInstanceOption_dbInstanceClass = (OrderableDBInstanceOption -> Maybe Text)
-> (OrderableDBInstanceOption
-> Maybe Text -> OrderableDBInstanceOption)
-> Lens
OrderableDBInstanceOption
OrderableDBInstanceOption
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrderableDBInstanceOption' {Maybe Text
dbInstanceClass :: Maybe Text
$sel:dbInstanceClass:OrderableDBInstanceOption' :: OrderableDBInstanceOption -> Maybe Text
dbInstanceClass} -> Maybe Text
dbInstanceClass) (\s :: OrderableDBInstanceOption
s@OrderableDBInstanceOption' {} Maybe Text
a -> OrderableDBInstanceOption
s {$sel:dbInstanceClass:OrderableDBInstanceOption' :: Maybe Text
dbInstanceClass = Maybe Text
a} :: OrderableDBInstanceOption)
orderableDBInstanceOption_licenseModel :: Lens.Lens' OrderableDBInstanceOption (Prelude.Maybe Prelude.Text)
orderableDBInstanceOption_licenseModel :: (Maybe Text -> f (Maybe Text))
-> OrderableDBInstanceOption -> f OrderableDBInstanceOption
orderableDBInstanceOption_licenseModel = (OrderableDBInstanceOption -> Maybe Text)
-> (OrderableDBInstanceOption
-> Maybe Text -> OrderableDBInstanceOption)
-> Lens
OrderableDBInstanceOption
OrderableDBInstanceOption
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrderableDBInstanceOption' {Maybe Text
licenseModel :: Maybe Text
$sel:licenseModel:OrderableDBInstanceOption' :: OrderableDBInstanceOption -> Maybe Text
licenseModel} -> Maybe Text
licenseModel) (\s :: OrderableDBInstanceOption
s@OrderableDBInstanceOption' {} Maybe Text
a -> OrderableDBInstanceOption
s {$sel:licenseModel:OrderableDBInstanceOption' :: Maybe Text
licenseModel = Maybe Text
a} :: OrderableDBInstanceOption)
orderableDBInstanceOption_availabilityZones :: Lens.Lens' OrderableDBInstanceOption (Prelude.Maybe [AvailabilityZone])
orderableDBInstanceOption_availabilityZones :: (Maybe [AvailabilityZone] -> f (Maybe [AvailabilityZone]))
-> OrderableDBInstanceOption -> f OrderableDBInstanceOption
orderableDBInstanceOption_availabilityZones = (OrderableDBInstanceOption -> Maybe [AvailabilityZone])
-> (OrderableDBInstanceOption
-> Maybe [AvailabilityZone] -> OrderableDBInstanceOption)
-> Lens
OrderableDBInstanceOption
OrderableDBInstanceOption
(Maybe [AvailabilityZone])
(Maybe [AvailabilityZone])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrderableDBInstanceOption' {Maybe [AvailabilityZone]
availabilityZones :: Maybe [AvailabilityZone]
$sel:availabilityZones:OrderableDBInstanceOption' :: OrderableDBInstanceOption -> Maybe [AvailabilityZone]
availabilityZones} -> Maybe [AvailabilityZone]
availabilityZones) (\s :: OrderableDBInstanceOption
s@OrderableDBInstanceOption' {} Maybe [AvailabilityZone]
a -> OrderableDBInstanceOption
s {$sel:availabilityZones:OrderableDBInstanceOption' :: Maybe [AvailabilityZone]
availabilityZones = Maybe [AvailabilityZone]
a} :: OrderableDBInstanceOption) ((Maybe [AvailabilityZone] -> f (Maybe [AvailabilityZone]))
-> OrderableDBInstanceOption -> f OrderableDBInstanceOption)
-> ((Maybe [AvailabilityZone] -> f (Maybe [AvailabilityZone]))
-> Maybe [AvailabilityZone] -> f (Maybe [AvailabilityZone]))
-> (Maybe [AvailabilityZone] -> f (Maybe [AvailabilityZone]))
-> OrderableDBInstanceOption
-> f OrderableDBInstanceOption
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[AvailabilityZone]
[AvailabilityZone]
[AvailabilityZone]
[AvailabilityZone]
-> Iso
(Maybe [AvailabilityZone])
(Maybe [AvailabilityZone])
(Maybe [AvailabilityZone])
(Maybe [AvailabilityZone])
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
[AvailabilityZone]
[AvailabilityZone]
[AvailabilityZone]
[AvailabilityZone]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
orderableDBInstanceOption_vpc :: Lens.Lens' OrderableDBInstanceOption (Prelude.Maybe Prelude.Bool)
orderableDBInstanceOption_vpc :: (Maybe Bool -> f (Maybe Bool))
-> OrderableDBInstanceOption -> f OrderableDBInstanceOption
orderableDBInstanceOption_vpc = (OrderableDBInstanceOption -> Maybe Bool)
-> (OrderableDBInstanceOption
-> Maybe Bool -> OrderableDBInstanceOption)
-> Lens
OrderableDBInstanceOption
OrderableDBInstanceOption
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrderableDBInstanceOption' {Maybe Bool
vpc :: Maybe Bool
$sel:vpc:OrderableDBInstanceOption' :: OrderableDBInstanceOption -> Maybe Bool
vpc} -> Maybe Bool
vpc) (\s :: OrderableDBInstanceOption
s@OrderableDBInstanceOption' {} Maybe Bool
a -> OrderableDBInstanceOption
s {$sel:vpc:OrderableDBInstanceOption' :: Maybe Bool
vpc = Maybe Bool
a} :: OrderableDBInstanceOption)
instance Core.FromXML OrderableDBInstanceOption where
parseXML :: [Node] -> Either String OrderableDBInstanceOption
parseXML [Node]
x =
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [AvailabilityZone]
-> Maybe Bool
-> OrderableDBInstanceOption
OrderableDBInstanceOption'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [AvailabilityZone]
-> Maybe Bool
-> OrderableDBInstanceOption)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [AvailabilityZone]
-> Maybe Bool
-> OrderableDBInstanceOption)
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
"EngineVersion")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [AvailabilityZone]
-> Maybe Bool
-> OrderableDBInstanceOption)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe [AvailabilityZone]
-> Maybe Bool
-> OrderableDBInstanceOption)
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
"Engine")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe [AvailabilityZone]
-> Maybe Bool
-> OrderableDBInstanceOption)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe [AvailabilityZone]
-> Maybe Bool
-> OrderableDBInstanceOption)
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 Text
-> Maybe [AvailabilityZone]
-> Maybe Bool
-> OrderableDBInstanceOption)
-> Either String (Maybe Text)
-> Either
String
(Maybe [AvailabilityZone]
-> Maybe Bool -> OrderableDBInstanceOption)
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
"LicenseModel")
Either
String
(Maybe [AvailabilityZone]
-> Maybe Bool -> OrderableDBInstanceOption)
-> Either String (Maybe [AvailabilityZone])
-> Either String (Maybe Bool -> OrderableDBInstanceOption)
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
"AvailabilityZones"
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 [AvailabilityZone]))
-> Either String (Maybe [AvailabilityZone])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [AvailabilityZone])
-> [Node] -> Either String (Maybe [AvailabilityZone])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [AvailabilityZone]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"AvailabilityZone")
)
Either String (Maybe Bool -> OrderableDBInstanceOption)
-> Either String (Maybe Bool)
-> Either String OrderableDBInstanceOption
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
"Vpc")
instance Prelude.Hashable OrderableDBInstanceOption
instance Prelude.NFData OrderableDBInstanceOption