{-# 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 qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.DocumentDB.Types.AvailabilityZone
import qualified Amazonka.Prelude as Prelude
data OrderableDBInstanceOption = OrderableDBInstanceOption'
{
OrderableDBInstanceOption -> Maybe [AvailabilityZone]
availabilityZones :: Prelude.Maybe [AvailabilityZone],
OrderableDBInstanceOption -> Maybe Text
dbInstanceClass :: Prelude.Maybe Prelude.Text,
OrderableDBInstanceOption -> Maybe Text
engine :: Prelude.Maybe Prelude.Text,
OrderableDBInstanceOption -> Maybe Text
engineVersion :: Prelude.Maybe Prelude.Text,
OrderableDBInstanceOption -> Maybe Text
licenseModel :: Prelude.Maybe Prelude.Text,
OrderableDBInstanceOption -> Maybe Bool
vpc :: Prelude.Maybe Prelude.Bool
}
deriving (OrderableDBInstanceOption -> OrderableDBInstanceOption -> Bool
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]
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
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.
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'
{ $sel:availabilityZones:OrderableDBInstanceOption' :: Maybe [AvailabilityZone]
availabilityZones =
forall a. Maybe a
Prelude.Nothing,
$sel:dbInstanceClass:OrderableDBInstanceOption' :: Maybe Text
dbInstanceClass = forall a. Maybe a
Prelude.Nothing,
$sel:engine:OrderableDBInstanceOption' :: Maybe Text
engine = forall a. Maybe a
Prelude.Nothing,
$sel:engineVersion:OrderableDBInstanceOption' :: Maybe Text
engineVersion = forall a. Maybe a
Prelude.Nothing,
$sel:licenseModel:OrderableDBInstanceOption' :: Maybe Text
licenseModel = forall a. Maybe a
Prelude.Nothing,
$sel:vpc:OrderableDBInstanceOption' :: Maybe Bool
vpc = forall a. Maybe a
Prelude.Nothing
}
orderableDBInstanceOption_availabilityZones :: Lens.Lens' OrderableDBInstanceOption (Prelude.Maybe [AvailabilityZone])
orderableDBInstanceOption_availabilityZones :: Lens' OrderableDBInstanceOption (Maybe [AvailabilityZone])
orderableDBInstanceOption_availabilityZones = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
orderableDBInstanceOption_dbInstanceClass :: Lens.Lens' OrderableDBInstanceOption (Prelude.Maybe Prelude.Text)
orderableDBInstanceOption_dbInstanceClass :: Lens' OrderableDBInstanceOption (Maybe Text)
orderableDBInstanceOption_dbInstanceClass = 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_engine :: Lens.Lens' OrderableDBInstanceOption (Prelude.Maybe Prelude.Text)
orderableDBInstanceOption_engine :: Lens' OrderableDBInstanceOption (Maybe Text)
orderableDBInstanceOption_engine = 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_engineVersion :: Lens.Lens' OrderableDBInstanceOption (Prelude.Maybe Prelude.Text)
orderableDBInstanceOption_engineVersion :: Lens' OrderableDBInstanceOption (Maybe Text)
orderableDBInstanceOption_engineVersion = 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_licenseModel :: Lens.Lens' OrderableDBInstanceOption (Prelude.Maybe Prelude.Text)
orderableDBInstanceOption_licenseModel :: Lens' OrderableDBInstanceOption (Maybe Text)
orderableDBInstanceOption_licenseModel = 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_vpc :: Lens.Lens' OrderableDBInstanceOption (Prelude.Maybe Prelude.Bool)
orderableDBInstanceOption_vpc :: Lens' OrderableDBInstanceOption (Maybe Bool)
orderableDBInstanceOption_vpc = 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 Data.FromXML OrderableDBInstanceOption where
parseXML :: [Node] -> Either String OrderableDBInstanceOption
parseXML [Node]
x =
Maybe [AvailabilityZone]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> OrderableDBInstanceOption
OrderableDBInstanceOption'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( [Node]
x
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"AvailabilityZones"
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"AvailabilityZone")
)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"DBInstanceClass")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"Engine")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"EngineVersion")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"LicenseModel")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"Vpc")
instance Prelude.Hashable OrderableDBInstanceOption where
hashWithSalt :: Int -> OrderableDBInstanceOption -> Int
hashWithSalt Int
_salt OrderableDBInstanceOption' {Maybe Bool
Maybe [AvailabilityZone]
Maybe Text
vpc :: Maybe Bool
licenseModel :: Maybe Text
engineVersion :: Maybe Text
engine :: Maybe Text
dbInstanceClass :: Maybe Text
availabilityZones :: Maybe [AvailabilityZone]
$sel:vpc:OrderableDBInstanceOption' :: OrderableDBInstanceOption -> Maybe Bool
$sel:licenseModel:OrderableDBInstanceOption' :: OrderableDBInstanceOption -> Maybe Text
$sel:engineVersion:OrderableDBInstanceOption' :: OrderableDBInstanceOption -> Maybe Text
$sel:engine:OrderableDBInstanceOption' :: OrderableDBInstanceOption -> Maybe Text
$sel:dbInstanceClass:OrderableDBInstanceOption' :: OrderableDBInstanceOption -> Maybe Text
$sel:availabilityZones:OrderableDBInstanceOption' :: OrderableDBInstanceOption -> Maybe [AvailabilityZone]
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [AvailabilityZone]
availabilityZones
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
dbInstanceClass
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
engine
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
engineVersion
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
licenseModel
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
vpc
instance Prelude.NFData OrderableDBInstanceOption where
rnf :: OrderableDBInstanceOption -> ()
rnf OrderableDBInstanceOption' {Maybe Bool
Maybe [AvailabilityZone]
Maybe Text
vpc :: Maybe Bool
licenseModel :: Maybe Text
engineVersion :: Maybe Text
engine :: Maybe Text
dbInstanceClass :: Maybe Text
availabilityZones :: Maybe [AvailabilityZone]
$sel:vpc:OrderableDBInstanceOption' :: OrderableDBInstanceOption -> Maybe Bool
$sel:licenseModel:OrderableDBInstanceOption' :: OrderableDBInstanceOption -> Maybe Text
$sel:engineVersion:OrderableDBInstanceOption' :: OrderableDBInstanceOption -> Maybe Text
$sel:engine:OrderableDBInstanceOption' :: OrderableDBInstanceOption -> Maybe Text
$sel:dbInstanceClass:OrderableDBInstanceOption' :: OrderableDBInstanceOption -> Maybe Text
$sel:availabilityZones:OrderableDBInstanceOption' :: OrderableDBInstanceOption -> Maybe [AvailabilityZone]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [AvailabilityZone]
availabilityZones
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
dbInstanceClass
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
engine
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
engineVersion
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
licenseModel
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
vpc