{-# 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.Lightsail.Types.RelationalDatabaseBlueprint where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Lightsail.Types.RelationalDatabaseEngine
import qualified Amazonka.Prelude as Prelude
data RelationalDatabaseBlueprint = RelationalDatabaseBlueprint'
{
RelationalDatabaseBlueprint -> Maybe Text
engineVersion :: Prelude.Maybe Prelude.Text,
RelationalDatabaseBlueprint -> Maybe Bool
isEngineDefault :: Prelude.Maybe Prelude.Bool,
RelationalDatabaseBlueprint -> Maybe Text
engineVersionDescription :: Prelude.Maybe Prelude.Text,
RelationalDatabaseBlueprint -> Maybe RelationalDatabaseEngine
engine :: Prelude.Maybe RelationalDatabaseEngine,
RelationalDatabaseBlueprint -> Maybe Text
blueprintId :: Prelude.Maybe Prelude.Text,
RelationalDatabaseBlueprint -> Maybe Text
engineDescription :: Prelude.Maybe Prelude.Text
}
deriving (RelationalDatabaseBlueprint -> RelationalDatabaseBlueprint -> Bool
(RelationalDatabaseBlueprint
-> RelationalDatabaseBlueprint -> Bool)
-> (RelationalDatabaseBlueprint
-> RelationalDatabaseBlueprint -> Bool)
-> Eq RelationalDatabaseBlueprint
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RelationalDatabaseBlueprint -> RelationalDatabaseBlueprint -> Bool
$c/= :: RelationalDatabaseBlueprint -> RelationalDatabaseBlueprint -> Bool
== :: RelationalDatabaseBlueprint -> RelationalDatabaseBlueprint -> Bool
$c== :: RelationalDatabaseBlueprint -> RelationalDatabaseBlueprint -> Bool
Prelude.Eq, ReadPrec [RelationalDatabaseBlueprint]
ReadPrec RelationalDatabaseBlueprint
Int -> ReadS RelationalDatabaseBlueprint
ReadS [RelationalDatabaseBlueprint]
(Int -> ReadS RelationalDatabaseBlueprint)
-> ReadS [RelationalDatabaseBlueprint]
-> ReadPrec RelationalDatabaseBlueprint
-> ReadPrec [RelationalDatabaseBlueprint]
-> Read RelationalDatabaseBlueprint
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RelationalDatabaseBlueprint]
$creadListPrec :: ReadPrec [RelationalDatabaseBlueprint]
readPrec :: ReadPrec RelationalDatabaseBlueprint
$creadPrec :: ReadPrec RelationalDatabaseBlueprint
readList :: ReadS [RelationalDatabaseBlueprint]
$creadList :: ReadS [RelationalDatabaseBlueprint]
readsPrec :: Int -> ReadS RelationalDatabaseBlueprint
$creadsPrec :: Int -> ReadS RelationalDatabaseBlueprint
Prelude.Read, Int -> RelationalDatabaseBlueprint -> ShowS
[RelationalDatabaseBlueprint] -> ShowS
RelationalDatabaseBlueprint -> String
(Int -> RelationalDatabaseBlueprint -> ShowS)
-> (RelationalDatabaseBlueprint -> String)
-> ([RelationalDatabaseBlueprint] -> ShowS)
-> Show RelationalDatabaseBlueprint
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RelationalDatabaseBlueprint] -> ShowS
$cshowList :: [RelationalDatabaseBlueprint] -> ShowS
show :: RelationalDatabaseBlueprint -> String
$cshow :: RelationalDatabaseBlueprint -> String
showsPrec :: Int -> RelationalDatabaseBlueprint -> ShowS
$cshowsPrec :: Int -> RelationalDatabaseBlueprint -> ShowS
Prelude.Show, (forall x.
RelationalDatabaseBlueprint -> Rep RelationalDatabaseBlueprint x)
-> (forall x.
Rep RelationalDatabaseBlueprint x -> RelationalDatabaseBlueprint)
-> Generic RelationalDatabaseBlueprint
forall x.
Rep RelationalDatabaseBlueprint x -> RelationalDatabaseBlueprint
forall x.
RelationalDatabaseBlueprint -> Rep RelationalDatabaseBlueprint x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RelationalDatabaseBlueprint x -> RelationalDatabaseBlueprint
$cfrom :: forall x.
RelationalDatabaseBlueprint -> Rep RelationalDatabaseBlueprint x
Prelude.Generic)
newRelationalDatabaseBlueprint ::
RelationalDatabaseBlueprint
newRelationalDatabaseBlueprint :: RelationalDatabaseBlueprint
newRelationalDatabaseBlueprint =
RelationalDatabaseBlueprint' :: Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe RelationalDatabaseEngine
-> Maybe Text
-> Maybe Text
-> RelationalDatabaseBlueprint
RelationalDatabaseBlueprint'
{ $sel:engineVersion:RelationalDatabaseBlueprint' :: Maybe Text
engineVersion =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:isEngineDefault:RelationalDatabaseBlueprint' :: Maybe Bool
isEngineDefault = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:engineVersionDescription:RelationalDatabaseBlueprint' :: Maybe Text
engineVersionDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:engine:RelationalDatabaseBlueprint' :: Maybe RelationalDatabaseEngine
engine = Maybe RelationalDatabaseEngine
forall a. Maybe a
Prelude.Nothing,
$sel:blueprintId:RelationalDatabaseBlueprint' :: Maybe Text
blueprintId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:engineDescription:RelationalDatabaseBlueprint' :: Maybe Text
engineDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
relationalDatabaseBlueprint_engineVersion :: Lens.Lens' RelationalDatabaseBlueprint (Prelude.Maybe Prelude.Text)
relationalDatabaseBlueprint_engineVersion :: (Maybe Text -> f (Maybe Text))
-> RelationalDatabaseBlueprint -> f RelationalDatabaseBlueprint
relationalDatabaseBlueprint_engineVersion = (RelationalDatabaseBlueprint -> Maybe Text)
-> (RelationalDatabaseBlueprint
-> Maybe Text -> RelationalDatabaseBlueprint)
-> Lens
RelationalDatabaseBlueprint
RelationalDatabaseBlueprint
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RelationalDatabaseBlueprint' {Maybe Text
engineVersion :: Maybe Text
$sel:engineVersion:RelationalDatabaseBlueprint' :: RelationalDatabaseBlueprint -> Maybe Text
engineVersion} -> Maybe Text
engineVersion) (\s :: RelationalDatabaseBlueprint
s@RelationalDatabaseBlueprint' {} Maybe Text
a -> RelationalDatabaseBlueprint
s {$sel:engineVersion:RelationalDatabaseBlueprint' :: Maybe Text
engineVersion = Maybe Text
a} :: RelationalDatabaseBlueprint)
relationalDatabaseBlueprint_isEngineDefault :: Lens.Lens' RelationalDatabaseBlueprint (Prelude.Maybe Prelude.Bool)
relationalDatabaseBlueprint_isEngineDefault :: (Maybe Bool -> f (Maybe Bool))
-> RelationalDatabaseBlueprint -> f RelationalDatabaseBlueprint
relationalDatabaseBlueprint_isEngineDefault = (RelationalDatabaseBlueprint -> Maybe Bool)
-> (RelationalDatabaseBlueprint
-> Maybe Bool -> RelationalDatabaseBlueprint)
-> Lens
RelationalDatabaseBlueprint
RelationalDatabaseBlueprint
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RelationalDatabaseBlueprint' {Maybe Bool
isEngineDefault :: Maybe Bool
$sel:isEngineDefault:RelationalDatabaseBlueprint' :: RelationalDatabaseBlueprint -> Maybe Bool
isEngineDefault} -> Maybe Bool
isEngineDefault) (\s :: RelationalDatabaseBlueprint
s@RelationalDatabaseBlueprint' {} Maybe Bool
a -> RelationalDatabaseBlueprint
s {$sel:isEngineDefault:RelationalDatabaseBlueprint' :: Maybe Bool
isEngineDefault = Maybe Bool
a} :: RelationalDatabaseBlueprint)
relationalDatabaseBlueprint_engineVersionDescription :: Lens.Lens' RelationalDatabaseBlueprint (Prelude.Maybe Prelude.Text)
relationalDatabaseBlueprint_engineVersionDescription :: (Maybe Text -> f (Maybe Text))
-> RelationalDatabaseBlueprint -> f RelationalDatabaseBlueprint
relationalDatabaseBlueprint_engineVersionDescription = (RelationalDatabaseBlueprint -> Maybe Text)
-> (RelationalDatabaseBlueprint
-> Maybe Text -> RelationalDatabaseBlueprint)
-> Lens
RelationalDatabaseBlueprint
RelationalDatabaseBlueprint
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RelationalDatabaseBlueprint' {Maybe Text
engineVersionDescription :: Maybe Text
$sel:engineVersionDescription:RelationalDatabaseBlueprint' :: RelationalDatabaseBlueprint -> Maybe Text
engineVersionDescription} -> Maybe Text
engineVersionDescription) (\s :: RelationalDatabaseBlueprint
s@RelationalDatabaseBlueprint' {} Maybe Text
a -> RelationalDatabaseBlueprint
s {$sel:engineVersionDescription:RelationalDatabaseBlueprint' :: Maybe Text
engineVersionDescription = Maybe Text
a} :: RelationalDatabaseBlueprint)
relationalDatabaseBlueprint_engine :: Lens.Lens' RelationalDatabaseBlueprint (Prelude.Maybe RelationalDatabaseEngine)
relationalDatabaseBlueprint_engine :: (Maybe RelationalDatabaseEngine
-> f (Maybe RelationalDatabaseEngine))
-> RelationalDatabaseBlueprint -> f RelationalDatabaseBlueprint
relationalDatabaseBlueprint_engine = (RelationalDatabaseBlueprint -> Maybe RelationalDatabaseEngine)
-> (RelationalDatabaseBlueprint
-> Maybe RelationalDatabaseEngine -> RelationalDatabaseBlueprint)
-> Lens
RelationalDatabaseBlueprint
RelationalDatabaseBlueprint
(Maybe RelationalDatabaseEngine)
(Maybe RelationalDatabaseEngine)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RelationalDatabaseBlueprint' {Maybe RelationalDatabaseEngine
engine :: Maybe RelationalDatabaseEngine
$sel:engine:RelationalDatabaseBlueprint' :: RelationalDatabaseBlueprint -> Maybe RelationalDatabaseEngine
engine} -> Maybe RelationalDatabaseEngine
engine) (\s :: RelationalDatabaseBlueprint
s@RelationalDatabaseBlueprint' {} Maybe RelationalDatabaseEngine
a -> RelationalDatabaseBlueprint
s {$sel:engine:RelationalDatabaseBlueprint' :: Maybe RelationalDatabaseEngine
engine = Maybe RelationalDatabaseEngine
a} :: RelationalDatabaseBlueprint)
relationalDatabaseBlueprint_blueprintId :: Lens.Lens' RelationalDatabaseBlueprint (Prelude.Maybe Prelude.Text)
relationalDatabaseBlueprint_blueprintId :: (Maybe Text -> f (Maybe Text))
-> RelationalDatabaseBlueprint -> f RelationalDatabaseBlueprint
relationalDatabaseBlueprint_blueprintId = (RelationalDatabaseBlueprint -> Maybe Text)
-> (RelationalDatabaseBlueprint
-> Maybe Text -> RelationalDatabaseBlueprint)
-> Lens
RelationalDatabaseBlueprint
RelationalDatabaseBlueprint
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RelationalDatabaseBlueprint' {Maybe Text
blueprintId :: Maybe Text
$sel:blueprintId:RelationalDatabaseBlueprint' :: RelationalDatabaseBlueprint -> Maybe Text
blueprintId} -> Maybe Text
blueprintId) (\s :: RelationalDatabaseBlueprint
s@RelationalDatabaseBlueprint' {} Maybe Text
a -> RelationalDatabaseBlueprint
s {$sel:blueprintId:RelationalDatabaseBlueprint' :: Maybe Text
blueprintId = Maybe Text
a} :: RelationalDatabaseBlueprint)
relationalDatabaseBlueprint_engineDescription :: Lens.Lens' RelationalDatabaseBlueprint (Prelude.Maybe Prelude.Text)
relationalDatabaseBlueprint_engineDescription :: (Maybe Text -> f (Maybe Text))
-> RelationalDatabaseBlueprint -> f RelationalDatabaseBlueprint
relationalDatabaseBlueprint_engineDescription = (RelationalDatabaseBlueprint -> Maybe Text)
-> (RelationalDatabaseBlueprint
-> Maybe Text -> RelationalDatabaseBlueprint)
-> Lens
RelationalDatabaseBlueprint
RelationalDatabaseBlueprint
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RelationalDatabaseBlueprint' {Maybe Text
engineDescription :: Maybe Text
$sel:engineDescription:RelationalDatabaseBlueprint' :: RelationalDatabaseBlueprint -> Maybe Text
engineDescription} -> Maybe Text
engineDescription) (\s :: RelationalDatabaseBlueprint
s@RelationalDatabaseBlueprint' {} Maybe Text
a -> RelationalDatabaseBlueprint
s {$sel:engineDescription:RelationalDatabaseBlueprint' :: Maybe Text
engineDescription = Maybe Text
a} :: RelationalDatabaseBlueprint)
instance Core.FromJSON RelationalDatabaseBlueprint where
parseJSON :: Value -> Parser RelationalDatabaseBlueprint
parseJSON =
String
-> (Object -> Parser RelationalDatabaseBlueprint)
-> Value
-> Parser RelationalDatabaseBlueprint
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"RelationalDatabaseBlueprint"
( \Object
x ->
Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe RelationalDatabaseEngine
-> Maybe Text
-> Maybe Text
-> RelationalDatabaseBlueprint
RelationalDatabaseBlueprint'
(Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe RelationalDatabaseEngine
-> Maybe Text
-> Maybe Text
-> RelationalDatabaseBlueprint)
-> Parser (Maybe Text)
-> Parser
(Maybe Bool
-> Maybe Text
-> Maybe RelationalDatabaseEngine
-> Maybe Text
-> Maybe Text
-> RelationalDatabaseBlueprint)
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
"engineVersion")
Parser
(Maybe Bool
-> Maybe Text
-> Maybe RelationalDatabaseEngine
-> Maybe Text
-> Maybe Text
-> RelationalDatabaseBlueprint)
-> Parser (Maybe Bool)
-> Parser
(Maybe Text
-> Maybe RelationalDatabaseEngine
-> Maybe Text
-> Maybe Text
-> RelationalDatabaseBlueprint)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"isEngineDefault")
Parser
(Maybe Text
-> Maybe RelationalDatabaseEngine
-> Maybe Text
-> Maybe Text
-> RelationalDatabaseBlueprint)
-> Parser (Maybe Text)
-> Parser
(Maybe RelationalDatabaseEngine
-> Maybe Text -> Maybe Text -> RelationalDatabaseBlueprint)
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
"engineVersionDescription")
Parser
(Maybe RelationalDatabaseEngine
-> Maybe Text -> Maybe Text -> RelationalDatabaseBlueprint)
-> Parser (Maybe RelationalDatabaseEngine)
-> Parser (Maybe Text -> Maybe Text -> RelationalDatabaseBlueprint)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe RelationalDatabaseEngine)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"engine")
Parser (Maybe Text -> Maybe Text -> RelationalDatabaseBlueprint)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> RelationalDatabaseBlueprint)
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
"blueprintId")
Parser (Maybe Text -> RelationalDatabaseBlueprint)
-> Parser (Maybe Text) -> Parser RelationalDatabaseBlueprint
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
"engineDescription")
)
instance Prelude.Hashable RelationalDatabaseBlueprint
instance Prelude.NFData RelationalDatabaseBlueprint