{-# 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.MachineLearning.Types.RDSMetadata where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MachineLearning.Types.RDSDatabase
import qualified Amazonka.Prelude as Prelude
data RDSMetadata = RDSMetadata'
{
RDSMetadata -> Maybe Text
selectSqlQuery :: Prelude.Maybe Prelude.Text,
RDSMetadata -> Maybe Text
dataPipelineId :: Prelude.Maybe Prelude.Text,
RDSMetadata -> Maybe RDSDatabase
database :: Prelude.Maybe RDSDatabase,
RDSMetadata -> Maybe Text
databaseUserName :: Prelude.Maybe Prelude.Text,
RDSMetadata -> Maybe Text
resourceRole :: Prelude.Maybe Prelude.Text,
RDSMetadata -> Maybe Text
serviceRole :: Prelude.Maybe Prelude.Text
}
deriving (RDSMetadata -> RDSMetadata -> Bool
(RDSMetadata -> RDSMetadata -> Bool)
-> (RDSMetadata -> RDSMetadata -> Bool) -> Eq RDSMetadata
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RDSMetadata -> RDSMetadata -> Bool
$c/= :: RDSMetadata -> RDSMetadata -> Bool
== :: RDSMetadata -> RDSMetadata -> Bool
$c== :: RDSMetadata -> RDSMetadata -> Bool
Prelude.Eq, ReadPrec [RDSMetadata]
ReadPrec RDSMetadata
Int -> ReadS RDSMetadata
ReadS [RDSMetadata]
(Int -> ReadS RDSMetadata)
-> ReadS [RDSMetadata]
-> ReadPrec RDSMetadata
-> ReadPrec [RDSMetadata]
-> Read RDSMetadata
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RDSMetadata]
$creadListPrec :: ReadPrec [RDSMetadata]
readPrec :: ReadPrec RDSMetadata
$creadPrec :: ReadPrec RDSMetadata
readList :: ReadS [RDSMetadata]
$creadList :: ReadS [RDSMetadata]
readsPrec :: Int -> ReadS RDSMetadata
$creadsPrec :: Int -> ReadS RDSMetadata
Prelude.Read, Int -> RDSMetadata -> ShowS
[RDSMetadata] -> ShowS
RDSMetadata -> String
(Int -> RDSMetadata -> ShowS)
-> (RDSMetadata -> String)
-> ([RDSMetadata] -> ShowS)
-> Show RDSMetadata
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RDSMetadata] -> ShowS
$cshowList :: [RDSMetadata] -> ShowS
show :: RDSMetadata -> String
$cshow :: RDSMetadata -> String
showsPrec :: Int -> RDSMetadata -> ShowS
$cshowsPrec :: Int -> RDSMetadata -> ShowS
Prelude.Show, (forall x. RDSMetadata -> Rep RDSMetadata x)
-> (forall x. Rep RDSMetadata x -> RDSMetadata)
-> Generic RDSMetadata
forall x. Rep RDSMetadata x -> RDSMetadata
forall x. RDSMetadata -> Rep RDSMetadata x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RDSMetadata x -> RDSMetadata
$cfrom :: forall x. RDSMetadata -> Rep RDSMetadata x
Prelude.Generic)
newRDSMetadata ::
RDSMetadata
newRDSMetadata :: RDSMetadata
newRDSMetadata =
RDSMetadata' :: Maybe Text
-> Maybe Text
-> Maybe RDSDatabase
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> RDSMetadata
RDSMetadata'
{ $sel:selectSqlQuery:RDSMetadata' :: Maybe Text
selectSqlQuery = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:dataPipelineId:RDSMetadata' :: Maybe Text
dataPipelineId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:database:RDSMetadata' :: Maybe RDSDatabase
database = Maybe RDSDatabase
forall a. Maybe a
Prelude.Nothing,
$sel:databaseUserName:RDSMetadata' :: Maybe Text
databaseUserName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:resourceRole:RDSMetadata' :: Maybe Text
resourceRole = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:serviceRole:RDSMetadata' :: Maybe Text
serviceRole = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
rDSMetadata_selectSqlQuery :: Lens.Lens' RDSMetadata (Prelude.Maybe Prelude.Text)
rDSMetadata_selectSqlQuery :: (Maybe Text -> f (Maybe Text)) -> RDSMetadata -> f RDSMetadata
rDSMetadata_selectSqlQuery = (RDSMetadata -> Maybe Text)
-> (RDSMetadata -> Maybe Text -> RDSMetadata)
-> Lens RDSMetadata RDSMetadata (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RDSMetadata' {Maybe Text
selectSqlQuery :: Maybe Text
$sel:selectSqlQuery:RDSMetadata' :: RDSMetadata -> Maybe Text
selectSqlQuery} -> Maybe Text
selectSqlQuery) (\s :: RDSMetadata
s@RDSMetadata' {} Maybe Text
a -> RDSMetadata
s {$sel:selectSqlQuery:RDSMetadata' :: Maybe Text
selectSqlQuery = Maybe Text
a} :: RDSMetadata)
rDSMetadata_dataPipelineId :: Lens.Lens' RDSMetadata (Prelude.Maybe Prelude.Text)
rDSMetadata_dataPipelineId :: (Maybe Text -> f (Maybe Text)) -> RDSMetadata -> f RDSMetadata
rDSMetadata_dataPipelineId = (RDSMetadata -> Maybe Text)
-> (RDSMetadata -> Maybe Text -> RDSMetadata)
-> Lens RDSMetadata RDSMetadata (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RDSMetadata' {Maybe Text
dataPipelineId :: Maybe Text
$sel:dataPipelineId:RDSMetadata' :: RDSMetadata -> Maybe Text
dataPipelineId} -> Maybe Text
dataPipelineId) (\s :: RDSMetadata
s@RDSMetadata' {} Maybe Text
a -> RDSMetadata
s {$sel:dataPipelineId:RDSMetadata' :: Maybe Text
dataPipelineId = Maybe Text
a} :: RDSMetadata)
rDSMetadata_database :: Lens.Lens' RDSMetadata (Prelude.Maybe RDSDatabase)
rDSMetadata_database :: (Maybe RDSDatabase -> f (Maybe RDSDatabase))
-> RDSMetadata -> f RDSMetadata
rDSMetadata_database = (RDSMetadata -> Maybe RDSDatabase)
-> (RDSMetadata -> Maybe RDSDatabase -> RDSMetadata)
-> Lens
RDSMetadata RDSMetadata (Maybe RDSDatabase) (Maybe RDSDatabase)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RDSMetadata' {Maybe RDSDatabase
database :: Maybe RDSDatabase
$sel:database:RDSMetadata' :: RDSMetadata -> Maybe RDSDatabase
database} -> Maybe RDSDatabase
database) (\s :: RDSMetadata
s@RDSMetadata' {} Maybe RDSDatabase
a -> RDSMetadata
s {$sel:database:RDSMetadata' :: Maybe RDSDatabase
database = Maybe RDSDatabase
a} :: RDSMetadata)
rDSMetadata_databaseUserName :: Lens.Lens' RDSMetadata (Prelude.Maybe Prelude.Text)
rDSMetadata_databaseUserName :: (Maybe Text -> f (Maybe Text)) -> RDSMetadata -> f RDSMetadata
rDSMetadata_databaseUserName = (RDSMetadata -> Maybe Text)
-> (RDSMetadata -> Maybe Text -> RDSMetadata)
-> Lens RDSMetadata RDSMetadata (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RDSMetadata' {Maybe Text
databaseUserName :: Maybe Text
$sel:databaseUserName:RDSMetadata' :: RDSMetadata -> Maybe Text
databaseUserName} -> Maybe Text
databaseUserName) (\s :: RDSMetadata
s@RDSMetadata' {} Maybe Text
a -> RDSMetadata
s {$sel:databaseUserName:RDSMetadata' :: Maybe Text
databaseUserName = Maybe Text
a} :: RDSMetadata)
rDSMetadata_resourceRole :: Lens.Lens' RDSMetadata (Prelude.Maybe Prelude.Text)
rDSMetadata_resourceRole :: (Maybe Text -> f (Maybe Text)) -> RDSMetadata -> f RDSMetadata
rDSMetadata_resourceRole = (RDSMetadata -> Maybe Text)
-> (RDSMetadata -> Maybe Text -> RDSMetadata)
-> Lens RDSMetadata RDSMetadata (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RDSMetadata' {Maybe Text
resourceRole :: Maybe Text
$sel:resourceRole:RDSMetadata' :: RDSMetadata -> Maybe Text
resourceRole} -> Maybe Text
resourceRole) (\s :: RDSMetadata
s@RDSMetadata' {} Maybe Text
a -> RDSMetadata
s {$sel:resourceRole:RDSMetadata' :: Maybe Text
resourceRole = Maybe Text
a} :: RDSMetadata)
rDSMetadata_serviceRole :: Lens.Lens' RDSMetadata (Prelude.Maybe Prelude.Text)
rDSMetadata_serviceRole :: (Maybe Text -> f (Maybe Text)) -> RDSMetadata -> f RDSMetadata
rDSMetadata_serviceRole = (RDSMetadata -> Maybe Text)
-> (RDSMetadata -> Maybe Text -> RDSMetadata)
-> Lens RDSMetadata RDSMetadata (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RDSMetadata' {Maybe Text
serviceRole :: Maybe Text
$sel:serviceRole:RDSMetadata' :: RDSMetadata -> Maybe Text
serviceRole} -> Maybe Text
serviceRole) (\s :: RDSMetadata
s@RDSMetadata' {} Maybe Text
a -> RDSMetadata
s {$sel:serviceRole:RDSMetadata' :: Maybe Text
serviceRole = Maybe Text
a} :: RDSMetadata)
instance Core.FromJSON RDSMetadata where
parseJSON :: Value -> Parser RDSMetadata
parseJSON =
String
-> (Object -> Parser RDSMetadata) -> Value -> Parser RDSMetadata
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"RDSMetadata"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe RDSDatabase
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> RDSMetadata
RDSMetadata'
(Maybe Text
-> Maybe Text
-> Maybe RDSDatabase
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> RDSMetadata)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe RDSDatabase
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> RDSMetadata)
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
"SelectSqlQuery")
Parser
(Maybe Text
-> Maybe RDSDatabase
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> RDSMetadata)
-> Parser (Maybe Text)
-> Parser
(Maybe RDSDatabase
-> Maybe Text -> Maybe Text -> Maybe Text -> RDSMetadata)
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
"DataPipelineId")
Parser
(Maybe RDSDatabase
-> Maybe Text -> Maybe Text -> Maybe Text -> RDSMetadata)
-> Parser (Maybe RDSDatabase)
-> Parser (Maybe Text -> Maybe Text -> Maybe Text -> RDSMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe RDSDatabase)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Database")
Parser (Maybe Text -> Maybe Text -> Maybe Text -> RDSMetadata)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> RDSMetadata)
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
"DatabaseUserName")
Parser (Maybe Text -> Maybe Text -> RDSMetadata)
-> Parser (Maybe Text) -> Parser (Maybe Text -> RDSMetadata)
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
"ResourceRole")
Parser (Maybe Text -> RDSMetadata)
-> Parser (Maybe Text) -> Parser RDSMetadata
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
"ServiceRole")
)
instance Prelude.Hashable RDSMetadata
instance Prelude.NFData RDSMetadata