{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.DMS.Types.SchemaShortInfoResponse
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.DMS.Types.SchemaShortInfoResponse where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude

-- | Describes a schema in a Fleet Advisor collector inventory.
--
-- /See:/ 'newSchemaShortInfoResponse' smart constructor.
data SchemaShortInfoResponse = SchemaShortInfoResponse'
  { -- | The ID of a database in a Fleet Advisor collector inventory.
    SchemaShortInfoResponse -> Maybe Text
databaseId :: Prelude.Maybe Prelude.Text,
    -- | The IP address of a database in a Fleet Advisor collector inventory.
    SchemaShortInfoResponse -> Maybe Text
databaseIpAddress :: Prelude.Maybe Prelude.Text,
    -- | The name of a database in a Fleet Advisor collector inventory.
    SchemaShortInfoResponse -> Maybe Text
databaseName :: Prelude.Maybe Prelude.Text,
    -- | The ID of a schema in a Fleet Advisor collector inventory.
    SchemaShortInfoResponse -> Maybe Text
schemaId :: Prelude.Maybe Prelude.Text,
    -- | The name of a schema in a Fleet Advisor collector inventory.
    SchemaShortInfoResponse -> Maybe Text
schemaName :: Prelude.Maybe Prelude.Text
  }
  deriving (SchemaShortInfoResponse -> SchemaShortInfoResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SchemaShortInfoResponse -> SchemaShortInfoResponse -> Bool
$c/= :: SchemaShortInfoResponse -> SchemaShortInfoResponse -> Bool
== :: SchemaShortInfoResponse -> SchemaShortInfoResponse -> Bool
$c== :: SchemaShortInfoResponse -> SchemaShortInfoResponse -> Bool
Prelude.Eq, ReadPrec [SchemaShortInfoResponse]
ReadPrec SchemaShortInfoResponse
Int -> ReadS SchemaShortInfoResponse
ReadS [SchemaShortInfoResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SchemaShortInfoResponse]
$creadListPrec :: ReadPrec [SchemaShortInfoResponse]
readPrec :: ReadPrec SchemaShortInfoResponse
$creadPrec :: ReadPrec SchemaShortInfoResponse
readList :: ReadS [SchemaShortInfoResponse]
$creadList :: ReadS [SchemaShortInfoResponse]
readsPrec :: Int -> ReadS SchemaShortInfoResponse
$creadsPrec :: Int -> ReadS SchemaShortInfoResponse
Prelude.Read, Int -> SchemaShortInfoResponse -> ShowS
[SchemaShortInfoResponse] -> ShowS
SchemaShortInfoResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SchemaShortInfoResponse] -> ShowS
$cshowList :: [SchemaShortInfoResponse] -> ShowS
show :: SchemaShortInfoResponse -> String
$cshow :: SchemaShortInfoResponse -> String
showsPrec :: Int -> SchemaShortInfoResponse -> ShowS
$cshowsPrec :: Int -> SchemaShortInfoResponse -> ShowS
Prelude.Show, forall x. Rep SchemaShortInfoResponse x -> SchemaShortInfoResponse
forall x. SchemaShortInfoResponse -> Rep SchemaShortInfoResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SchemaShortInfoResponse x -> SchemaShortInfoResponse
$cfrom :: forall x. SchemaShortInfoResponse -> Rep SchemaShortInfoResponse x
Prelude.Generic)

-- |
-- Create a value of 'SchemaShortInfoResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'databaseId', 'schemaShortInfoResponse_databaseId' - The ID of a database in a Fleet Advisor collector inventory.
--
-- 'databaseIpAddress', 'schemaShortInfoResponse_databaseIpAddress' - The IP address of a database in a Fleet Advisor collector inventory.
--
-- 'databaseName', 'schemaShortInfoResponse_databaseName' - The name of a database in a Fleet Advisor collector inventory.
--
-- 'schemaId', 'schemaShortInfoResponse_schemaId' - The ID of a schema in a Fleet Advisor collector inventory.
--
-- 'schemaName', 'schemaShortInfoResponse_schemaName' - The name of a schema in a Fleet Advisor collector inventory.
newSchemaShortInfoResponse ::
  SchemaShortInfoResponse
newSchemaShortInfoResponse :: SchemaShortInfoResponse
newSchemaShortInfoResponse =
  SchemaShortInfoResponse'
    { $sel:databaseId:SchemaShortInfoResponse' :: Maybe Text
databaseId =
        forall a. Maybe a
Prelude.Nothing,
      $sel:databaseIpAddress:SchemaShortInfoResponse' :: Maybe Text
databaseIpAddress = forall a. Maybe a
Prelude.Nothing,
      $sel:databaseName:SchemaShortInfoResponse' :: Maybe Text
databaseName = forall a. Maybe a
Prelude.Nothing,
      $sel:schemaId:SchemaShortInfoResponse' :: Maybe Text
schemaId = forall a. Maybe a
Prelude.Nothing,
      $sel:schemaName:SchemaShortInfoResponse' :: Maybe Text
schemaName = forall a. Maybe a
Prelude.Nothing
    }

-- | The ID of a database in a Fleet Advisor collector inventory.
schemaShortInfoResponse_databaseId :: Lens.Lens' SchemaShortInfoResponse (Prelude.Maybe Prelude.Text)
schemaShortInfoResponse_databaseId :: Lens' SchemaShortInfoResponse (Maybe Text)
schemaShortInfoResponse_databaseId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SchemaShortInfoResponse' {Maybe Text
databaseId :: Maybe Text
$sel:databaseId:SchemaShortInfoResponse' :: SchemaShortInfoResponse -> Maybe Text
databaseId} -> Maybe Text
databaseId) (\s :: SchemaShortInfoResponse
s@SchemaShortInfoResponse' {} Maybe Text
a -> SchemaShortInfoResponse
s {$sel:databaseId:SchemaShortInfoResponse' :: Maybe Text
databaseId = Maybe Text
a} :: SchemaShortInfoResponse)

-- | The IP address of a database in a Fleet Advisor collector inventory.
schemaShortInfoResponse_databaseIpAddress :: Lens.Lens' SchemaShortInfoResponse (Prelude.Maybe Prelude.Text)
schemaShortInfoResponse_databaseIpAddress :: Lens' SchemaShortInfoResponse (Maybe Text)
schemaShortInfoResponse_databaseIpAddress = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SchemaShortInfoResponse' {Maybe Text
databaseIpAddress :: Maybe Text
$sel:databaseIpAddress:SchemaShortInfoResponse' :: SchemaShortInfoResponse -> Maybe Text
databaseIpAddress} -> Maybe Text
databaseIpAddress) (\s :: SchemaShortInfoResponse
s@SchemaShortInfoResponse' {} Maybe Text
a -> SchemaShortInfoResponse
s {$sel:databaseIpAddress:SchemaShortInfoResponse' :: Maybe Text
databaseIpAddress = Maybe Text
a} :: SchemaShortInfoResponse)

-- | The name of a database in a Fleet Advisor collector inventory.
schemaShortInfoResponse_databaseName :: Lens.Lens' SchemaShortInfoResponse (Prelude.Maybe Prelude.Text)
schemaShortInfoResponse_databaseName :: Lens' SchemaShortInfoResponse (Maybe Text)
schemaShortInfoResponse_databaseName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SchemaShortInfoResponse' {Maybe Text
databaseName :: Maybe Text
$sel:databaseName:SchemaShortInfoResponse' :: SchemaShortInfoResponse -> Maybe Text
databaseName} -> Maybe Text
databaseName) (\s :: SchemaShortInfoResponse
s@SchemaShortInfoResponse' {} Maybe Text
a -> SchemaShortInfoResponse
s {$sel:databaseName:SchemaShortInfoResponse' :: Maybe Text
databaseName = Maybe Text
a} :: SchemaShortInfoResponse)

-- | The ID of a schema in a Fleet Advisor collector inventory.
schemaShortInfoResponse_schemaId :: Lens.Lens' SchemaShortInfoResponse (Prelude.Maybe Prelude.Text)
schemaShortInfoResponse_schemaId :: Lens' SchemaShortInfoResponse (Maybe Text)
schemaShortInfoResponse_schemaId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SchemaShortInfoResponse' {Maybe Text
schemaId :: Maybe Text
$sel:schemaId:SchemaShortInfoResponse' :: SchemaShortInfoResponse -> Maybe Text
schemaId} -> Maybe Text
schemaId) (\s :: SchemaShortInfoResponse
s@SchemaShortInfoResponse' {} Maybe Text
a -> SchemaShortInfoResponse
s {$sel:schemaId:SchemaShortInfoResponse' :: Maybe Text
schemaId = Maybe Text
a} :: SchemaShortInfoResponse)

-- | The name of a schema in a Fleet Advisor collector inventory.
schemaShortInfoResponse_schemaName :: Lens.Lens' SchemaShortInfoResponse (Prelude.Maybe Prelude.Text)
schemaShortInfoResponse_schemaName :: Lens' SchemaShortInfoResponse (Maybe Text)
schemaShortInfoResponse_schemaName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SchemaShortInfoResponse' {Maybe Text
schemaName :: Maybe Text
$sel:schemaName:SchemaShortInfoResponse' :: SchemaShortInfoResponse -> Maybe Text
schemaName} -> Maybe Text
schemaName) (\s :: SchemaShortInfoResponse
s@SchemaShortInfoResponse' {} Maybe Text
a -> SchemaShortInfoResponse
s {$sel:schemaName:SchemaShortInfoResponse' :: Maybe Text
schemaName = Maybe Text
a} :: SchemaShortInfoResponse)

instance Data.FromJSON SchemaShortInfoResponse where
  parseJSON :: Value -> Parser SchemaShortInfoResponse
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"SchemaShortInfoResponse"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SchemaShortInfoResponse
SchemaShortInfoResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"DatabaseId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"DatabaseIpAddress")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"DatabaseName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"SchemaId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"SchemaName")
      )

instance Prelude.Hashable SchemaShortInfoResponse where
  hashWithSalt :: Int -> SchemaShortInfoResponse -> Int
hashWithSalt Int
_salt SchemaShortInfoResponse' {Maybe Text
schemaName :: Maybe Text
schemaId :: Maybe Text
databaseName :: Maybe Text
databaseIpAddress :: Maybe Text
databaseId :: Maybe Text
$sel:schemaName:SchemaShortInfoResponse' :: SchemaShortInfoResponse -> Maybe Text
$sel:schemaId:SchemaShortInfoResponse' :: SchemaShortInfoResponse -> Maybe Text
$sel:databaseName:SchemaShortInfoResponse' :: SchemaShortInfoResponse -> Maybe Text
$sel:databaseIpAddress:SchemaShortInfoResponse' :: SchemaShortInfoResponse -> Maybe Text
$sel:databaseId:SchemaShortInfoResponse' :: SchemaShortInfoResponse -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
databaseId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
databaseIpAddress
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
databaseName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
schemaId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
schemaName

instance Prelude.NFData SchemaShortInfoResponse where
  rnf :: SchemaShortInfoResponse -> ()
rnf SchemaShortInfoResponse' {Maybe Text
schemaName :: Maybe Text
schemaId :: Maybe Text
databaseName :: Maybe Text
databaseIpAddress :: Maybe Text
databaseId :: Maybe Text
$sel:schemaName:SchemaShortInfoResponse' :: SchemaShortInfoResponse -> Maybe Text
$sel:schemaId:SchemaShortInfoResponse' :: SchemaShortInfoResponse -> Maybe Text
$sel:databaseName:SchemaShortInfoResponse' :: SchemaShortInfoResponse -> Maybe Text
$sel:databaseIpAddress:SchemaShortInfoResponse' :: SchemaShortInfoResponse -> Maybe Text
$sel:databaseId:SchemaShortInfoResponse' :: SchemaShortInfoResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
databaseId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
databaseIpAddress
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
databaseName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
schemaId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
schemaName