{-# 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.QuickSight.Types.DataSource
-- 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.QuickSight.Types.DataSource 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
import Amazonka.QuickSight.Types.DataSourceErrorInfo
import Amazonka.QuickSight.Types.DataSourceParameters
import Amazonka.QuickSight.Types.DataSourceType
import Amazonka.QuickSight.Types.ResourceStatus
import Amazonka.QuickSight.Types.SslProperties
import Amazonka.QuickSight.Types.VpcConnectionProperties

-- | The structure of a data source.
--
-- /See:/ 'newDataSource' smart constructor.
data DataSource = DataSource'
  { -- | A set of alternate data source parameters that you want to share for the
    -- credentials stored with this data source. The credentials are applied in
    -- tandem with the data source parameters when you copy a data source by
    -- using a create or update request. The API operation compares the
    -- @DataSourceParameters@ structure that\'s in the request with the
    -- structures in the @AlternateDataSourceParameters@ allow list. If the
    -- structures are an exact match, the request is allowed to use the
    -- credentials from this existing data source. If the
    -- @AlternateDataSourceParameters@ list is null, the @Credentials@
    -- originally used with this @DataSourceParameters@ are automatically
    -- allowed.
    DataSource -> Maybe (NonEmpty DataSourceParameters)
alternateDataSourceParameters :: Prelude.Maybe (Prelude.NonEmpty DataSourceParameters),
    -- | The Amazon Resource Name (ARN) of the data source.
    DataSource -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The time that this data source was created.
    DataSource -> Maybe POSIX
createdTime :: Prelude.Maybe Data.POSIX,
    -- | The ID of the data source. This ID is unique per Amazon Web Services
    -- Region for each Amazon Web Services account.
    DataSource -> Maybe Text
dataSourceId :: Prelude.Maybe Prelude.Text,
    -- | The parameters that Amazon QuickSight uses to connect to your underlying
    -- source. This is a variant type structure. For this structure to be
    -- valid, only one of the attributes can be non-null.
    DataSource -> Maybe DataSourceParameters
dataSourceParameters :: Prelude.Maybe DataSourceParameters,
    -- | Error information from the last update or the creation of the data
    -- source.
    DataSource -> Maybe DataSourceErrorInfo
errorInfo :: Prelude.Maybe DataSourceErrorInfo,
    -- | The last time that this data source was updated.
    DataSource -> Maybe POSIX
lastUpdatedTime :: Prelude.Maybe Data.POSIX,
    -- | A display name for the data source.
    DataSource -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the secret associated with the data
    -- source in Amazon Secrets Manager.
    DataSource -> Maybe Text
secretArn :: Prelude.Maybe Prelude.Text,
    -- | Secure Socket Layer (SSL) properties that apply when Amazon QuickSight
    -- connects to your underlying source.
    DataSource -> Maybe SslProperties
sslProperties :: Prelude.Maybe SslProperties,
    -- | The HTTP status of the request.
    DataSource -> Maybe ResourceStatus
status :: Prelude.Maybe ResourceStatus,
    -- | The type of the data source. This type indicates which database engine
    -- the data source connects to.
    DataSource -> Maybe DataSourceType
type' :: Prelude.Maybe DataSourceType,
    -- | The VPC connection information. You need to use this parameter only when
    -- you want Amazon QuickSight to use a VPC connection when connecting to
    -- your underlying source.
    DataSource -> Maybe VpcConnectionProperties
vpcConnectionProperties :: Prelude.Maybe VpcConnectionProperties
  }
  deriving (DataSource -> DataSource -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DataSource -> DataSource -> Bool
$c/= :: DataSource -> DataSource -> Bool
== :: DataSource -> DataSource -> Bool
$c== :: DataSource -> DataSource -> Bool
Prelude.Eq, ReadPrec [DataSource]
ReadPrec DataSource
Int -> ReadS DataSource
ReadS [DataSource]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DataSource]
$creadListPrec :: ReadPrec [DataSource]
readPrec :: ReadPrec DataSource
$creadPrec :: ReadPrec DataSource
readList :: ReadS [DataSource]
$creadList :: ReadS [DataSource]
readsPrec :: Int -> ReadS DataSource
$creadsPrec :: Int -> ReadS DataSource
Prelude.Read, Int -> DataSource -> ShowS
[DataSource] -> ShowS
DataSource -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DataSource] -> ShowS
$cshowList :: [DataSource] -> ShowS
show :: DataSource -> String
$cshow :: DataSource -> String
showsPrec :: Int -> DataSource -> ShowS
$cshowsPrec :: Int -> DataSource -> ShowS
Prelude.Show, forall x. Rep DataSource x -> DataSource
forall x. DataSource -> Rep DataSource x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DataSource x -> DataSource
$cfrom :: forall x. DataSource -> Rep DataSource x
Prelude.Generic)

-- |
-- Create a value of 'DataSource' 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:
--
-- 'alternateDataSourceParameters', 'dataSource_alternateDataSourceParameters' - A set of alternate data source parameters that you want to share for the
-- credentials stored with this data source. The credentials are applied in
-- tandem with the data source parameters when you copy a data source by
-- using a create or update request. The API operation compares the
-- @DataSourceParameters@ structure that\'s in the request with the
-- structures in the @AlternateDataSourceParameters@ allow list. If the
-- structures are an exact match, the request is allowed to use the
-- credentials from this existing data source. If the
-- @AlternateDataSourceParameters@ list is null, the @Credentials@
-- originally used with this @DataSourceParameters@ are automatically
-- allowed.
--
-- 'arn', 'dataSource_arn' - The Amazon Resource Name (ARN) of the data source.
--
-- 'createdTime', 'dataSource_createdTime' - The time that this data source was created.
--
-- 'dataSourceId', 'dataSource_dataSourceId' - The ID of the data source. This ID is unique per Amazon Web Services
-- Region for each Amazon Web Services account.
--
-- 'dataSourceParameters', 'dataSource_dataSourceParameters' - The parameters that Amazon QuickSight uses to connect to your underlying
-- source. This is a variant type structure. For this structure to be
-- valid, only one of the attributes can be non-null.
--
-- 'errorInfo', 'dataSource_errorInfo' - Error information from the last update or the creation of the data
-- source.
--
-- 'lastUpdatedTime', 'dataSource_lastUpdatedTime' - The last time that this data source was updated.
--
-- 'name', 'dataSource_name' - A display name for the data source.
--
-- 'secretArn', 'dataSource_secretArn' - The Amazon Resource Name (ARN) of the secret associated with the data
-- source in Amazon Secrets Manager.
--
-- 'sslProperties', 'dataSource_sslProperties' - Secure Socket Layer (SSL) properties that apply when Amazon QuickSight
-- connects to your underlying source.
--
-- 'status', 'dataSource_status' - The HTTP status of the request.
--
-- 'type'', 'dataSource_type' - The type of the data source. This type indicates which database engine
-- the data source connects to.
--
-- 'vpcConnectionProperties', 'dataSource_vpcConnectionProperties' - The VPC connection information. You need to use this parameter only when
-- you want Amazon QuickSight to use a VPC connection when connecting to
-- your underlying source.
newDataSource ::
  DataSource
newDataSource :: DataSource
newDataSource =
  DataSource'
    { $sel:alternateDataSourceParameters:DataSource' :: Maybe (NonEmpty DataSourceParameters)
alternateDataSourceParameters =
        forall a. Maybe a
Prelude.Nothing,
      $sel:arn:DataSource' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
      $sel:createdTime:DataSource' :: Maybe POSIX
createdTime = forall a. Maybe a
Prelude.Nothing,
      $sel:dataSourceId:DataSource' :: Maybe Text
dataSourceId = forall a. Maybe a
Prelude.Nothing,
      $sel:dataSourceParameters:DataSource' :: Maybe DataSourceParameters
dataSourceParameters = forall a. Maybe a
Prelude.Nothing,
      $sel:errorInfo:DataSource' :: Maybe DataSourceErrorInfo
errorInfo = forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedTime:DataSource' :: Maybe POSIX
lastUpdatedTime = forall a. Maybe a
Prelude.Nothing,
      $sel:name:DataSource' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
      $sel:secretArn:DataSource' :: Maybe Text
secretArn = forall a. Maybe a
Prelude.Nothing,
      $sel:sslProperties:DataSource' :: Maybe SslProperties
sslProperties = forall a. Maybe a
Prelude.Nothing,
      $sel:status:DataSource' :: Maybe ResourceStatus
status = forall a. Maybe a
Prelude.Nothing,
      $sel:type':DataSource' :: Maybe DataSourceType
type' = forall a. Maybe a
Prelude.Nothing,
      $sel:vpcConnectionProperties:DataSource' :: Maybe VpcConnectionProperties
vpcConnectionProperties = forall a. Maybe a
Prelude.Nothing
    }

-- | A set of alternate data source parameters that you want to share for the
-- credentials stored with this data source. The credentials are applied in
-- tandem with the data source parameters when you copy a data source by
-- using a create or update request. The API operation compares the
-- @DataSourceParameters@ structure that\'s in the request with the
-- structures in the @AlternateDataSourceParameters@ allow list. If the
-- structures are an exact match, the request is allowed to use the
-- credentials from this existing data source. If the
-- @AlternateDataSourceParameters@ list is null, the @Credentials@
-- originally used with this @DataSourceParameters@ are automatically
-- allowed.
dataSource_alternateDataSourceParameters :: Lens.Lens' DataSource (Prelude.Maybe (Prelude.NonEmpty DataSourceParameters))
dataSource_alternateDataSourceParameters :: Lens' DataSource (Maybe (NonEmpty DataSourceParameters))
dataSource_alternateDataSourceParameters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSource' {Maybe (NonEmpty DataSourceParameters)
alternateDataSourceParameters :: Maybe (NonEmpty DataSourceParameters)
$sel:alternateDataSourceParameters:DataSource' :: DataSource -> Maybe (NonEmpty DataSourceParameters)
alternateDataSourceParameters} -> Maybe (NonEmpty DataSourceParameters)
alternateDataSourceParameters) (\s :: DataSource
s@DataSource' {} Maybe (NonEmpty DataSourceParameters)
a -> DataSource
s {$sel:alternateDataSourceParameters:DataSource' :: Maybe (NonEmpty DataSourceParameters)
alternateDataSourceParameters = Maybe (NonEmpty DataSourceParameters)
a} :: DataSource) 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

-- | The Amazon Resource Name (ARN) of the data source.
dataSource_arn :: Lens.Lens' DataSource (Prelude.Maybe Prelude.Text)
dataSource_arn :: Lens' DataSource (Maybe Text)
dataSource_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSource' {Maybe Text
arn :: Maybe Text
$sel:arn:DataSource' :: DataSource -> Maybe Text
arn} -> Maybe Text
arn) (\s :: DataSource
s@DataSource' {} Maybe Text
a -> DataSource
s {$sel:arn:DataSource' :: Maybe Text
arn = Maybe Text
a} :: DataSource)

-- | The time that this data source was created.
dataSource_createdTime :: Lens.Lens' DataSource (Prelude.Maybe Prelude.UTCTime)
dataSource_createdTime :: Lens' DataSource (Maybe UTCTime)
dataSource_createdTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSource' {Maybe POSIX
createdTime :: Maybe POSIX
$sel:createdTime:DataSource' :: DataSource -> Maybe POSIX
createdTime} -> Maybe POSIX
createdTime) (\s :: DataSource
s@DataSource' {} Maybe POSIX
a -> DataSource
s {$sel:createdTime:DataSource' :: Maybe POSIX
createdTime = Maybe POSIX
a} :: DataSource) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The ID of the data source. This ID is unique per Amazon Web Services
-- Region for each Amazon Web Services account.
dataSource_dataSourceId :: Lens.Lens' DataSource (Prelude.Maybe Prelude.Text)
dataSource_dataSourceId :: Lens' DataSource (Maybe Text)
dataSource_dataSourceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSource' {Maybe Text
dataSourceId :: Maybe Text
$sel:dataSourceId:DataSource' :: DataSource -> Maybe Text
dataSourceId} -> Maybe Text
dataSourceId) (\s :: DataSource
s@DataSource' {} Maybe Text
a -> DataSource
s {$sel:dataSourceId:DataSource' :: Maybe Text
dataSourceId = Maybe Text
a} :: DataSource)

-- | The parameters that Amazon QuickSight uses to connect to your underlying
-- source. This is a variant type structure. For this structure to be
-- valid, only one of the attributes can be non-null.
dataSource_dataSourceParameters :: Lens.Lens' DataSource (Prelude.Maybe DataSourceParameters)
dataSource_dataSourceParameters :: Lens' DataSource (Maybe DataSourceParameters)
dataSource_dataSourceParameters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSource' {Maybe DataSourceParameters
dataSourceParameters :: Maybe DataSourceParameters
$sel:dataSourceParameters:DataSource' :: DataSource -> Maybe DataSourceParameters
dataSourceParameters} -> Maybe DataSourceParameters
dataSourceParameters) (\s :: DataSource
s@DataSource' {} Maybe DataSourceParameters
a -> DataSource
s {$sel:dataSourceParameters:DataSource' :: Maybe DataSourceParameters
dataSourceParameters = Maybe DataSourceParameters
a} :: DataSource)

-- | Error information from the last update or the creation of the data
-- source.
dataSource_errorInfo :: Lens.Lens' DataSource (Prelude.Maybe DataSourceErrorInfo)
dataSource_errorInfo :: Lens' DataSource (Maybe DataSourceErrorInfo)
dataSource_errorInfo = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSource' {Maybe DataSourceErrorInfo
errorInfo :: Maybe DataSourceErrorInfo
$sel:errorInfo:DataSource' :: DataSource -> Maybe DataSourceErrorInfo
errorInfo} -> Maybe DataSourceErrorInfo
errorInfo) (\s :: DataSource
s@DataSource' {} Maybe DataSourceErrorInfo
a -> DataSource
s {$sel:errorInfo:DataSource' :: Maybe DataSourceErrorInfo
errorInfo = Maybe DataSourceErrorInfo
a} :: DataSource)

-- | The last time that this data source was updated.
dataSource_lastUpdatedTime :: Lens.Lens' DataSource (Prelude.Maybe Prelude.UTCTime)
dataSource_lastUpdatedTime :: Lens' DataSource (Maybe UTCTime)
dataSource_lastUpdatedTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSource' {Maybe POSIX
lastUpdatedTime :: Maybe POSIX
$sel:lastUpdatedTime:DataSource' :: DataSource -> Maybe POSIX
lastUpdatedTime} -> Maybe POSIX
lastUpdatedTime) (\s :: DataSource
s@DataSource' {} Maybe POSIX
a -> DataSource
s {$sel:lastUpdatedTime:DataSource' :: Maybe POSIX
lastUpdatedTime = Maybe POSIX
a} :: DataSource) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | A display name for the data source.
dataSource_name :: Lens.Lens' DataSource (Prelude.Maybe Prelude.Text)
dataSource_name :: Lens' DataSource (Maybe Text)
dataSource_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSource' {Maybe Text
name :: Maybe Text
$sel:name:DataSource' :: DataSource -> Maybe Text
name} -> Maybe Text
name) (\s :: DataSource
s@DataSource' {} Maybe Text
a -> DataSource
s {$sel:name:DataSource' :: Maybe Text
name = Maybe Text
a} :: DataSource)

-- | The Amazon Resource Name (ARN) of the secret associated with the data
-- source in Amazon Secrets Manager.
dataSource_secretArn :: Lens.Lens' DataSource (Prelude.Maybe Prelude.Text)
dataSource_secretArn :: Lens' DataSource (Maybe Text)
dataSource_secretArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSource' {Maybe Text
secretArn :: Maybe Text
$sel:secretArn:DataSource' :: DataSource -> Maybe Text
secretArn} -> Maybe Text
secretArn) (\s :: DataSource
s@DataSource' {} Maybe Text
a -> DataSource
s {$sel:secretArn:DataSource' :: Maybe Text
secretArn = Maybe Text
a} :: DataSource)

-- | Secure Socket Layer (SSL) properties that apply when Amazon QuickSight
-- connects to your underlying source.
dataSource_sslProperties :: Lens.Lens' DataSource (Prelude.Maybe SslProperties)
dataSource_sslProperties :: Lens' DataSource (Maybe SslProperties)
dataSource_sslProperties = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSource' {Maybe SslProperties
sslProperties :: Maybe SslProperties
$sel:sslProperties:DataSource' :: DataSource -> Maybe SslProperties
sslProperties} -> Maybe SslProperties
sslProperties) (\s :: DataSource
s@DataSource' {} Maybe SslProperties
a -> DataSource
s {$sel:sslProperties:DataSource' :: Maybe SslProperties
sslProperties = Maybe SslProperties
a} :: DataSource)

-- | The HTTP status of the request.
dataSource_status :: Lens.Lens' DataSource (Prelude.Maybe ResourceStatus)
dataSource_status :: Lens' DataSource (Maybe ResourceStatus)
dataSource_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSource' {Maybe ResourceStatus
status :: Maybe ResourceStatus
$sel:status:DataSource' :: DataSource -> Maybe ResourceStatus
status} -> Maybe ResourceStatus
status) (\s :: DataSource
s@DataSource' {} Maybe ResourceStatus
a -> DataSource
s {$sel:status:DataSource' :: Maybe ResourceStatus
status = Maybe ResourceStatus
a} :: DataSource)

-- | The type of the data source. This type indicates which database engine
-- the data source connects to.
dataSource_type :: Lens.Lens' DataSource (Prelude.Maybe DataSourceType)
dataSource_type :: Lens' DataSource (Maybe DataSourceType)
dataSource_type = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSource' {Maybe DataSourceType
type' :: Maybe DataSourceType
$sel:type':DataSource' :: DataSource -> Maybe DataSourceType
type'} -> Maybe DataSourceType
type') (\s :: DataSource
s@DataSource' {} Maybe DataSourceType
a -> DataSource
s {$sel:type':DataSource' :: Maybe DataSourceType
type' = Maybe DataSourceType
a} :: DataSource)

-- | The VPC connection information. You need to use this parameter only when
-- you want Amazon QuickSight to use a VPC connection when connecting to
-- your underlying source.
dataSource_vpcConnectionProperties :: Lens.Lens' DataSource (Prelude.Maybe VpcConnectionProperties)
dataSource_vpcConnectionProperties :: Lens' DataSource (Maybe VpcConnectionProperties)
dataSource_vpcConnectionProperties = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSource' {Maybe VpcConnectionProperties
vpcConnectionProperties :: Maybe VpcConnectionProperties
$sel:vpcConnectionProperties:DataSource' :: DataSource -> Maybe VpcConnectionProperties
vpcConnectionProperties} -> Maybe VpcConnectionProperties
vpcConnectionProperties) (\s :: DataSource
s@DataSource' {} Maybe VpcConnectionProperties
a -> DataSource
s {$sel:vpcConnectionProperties:DataSource' :: Maybe VpcConnectionProperties
vpcConnectionProperties = Maybe VpcConnectionProperties
a} :: DataSource)

instance Data.FromJSON DataSource where
  parseJSON :: Value -> Parser DataSource
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"DataSource"
      ( \Object
x ->
          Maybe (NonEmpty DataSourceParameters)
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe DataSourceParameters
-> Maybe DataSourceErrorInfo
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe SslProperties
-> Maybe ResourceStatus
-> Maybe DataSourceType
-> Maybe VpcConnectionProperties
-> DataSource
DataSource'
            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
"AlternateDataSourceParameters")
            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
"Arn")
            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
"CreatedTime")
            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
"DataSourceId")
            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
"DataSourceParameters")
            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
"ErrorInfo")
            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
"LastUpdatedTime")
            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
"Name")
            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
"SecretArn")
            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
"SslProperties")
            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
"Status")
            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
"Type")
            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
"VpcConnectionProperties")
      )

instance Prelude.Hashable DataSource where
  hashWithSalt :: Int -> DataSource -> Int
hashWithSalt Int
_salt DataSource' {Maybe (NonEmpty DataSourceParameters)
Maybe Text
Maybe POSIX
Maybe DataSourceErrorInfo
Maybe DataSourceType
Maybe ResourceStatus
Maybe SslProperties
Maybe DataSourceParameters
Maybe VpcConnectionProperties
vpcConnectionProperties :: Maybe VpcConnectionProperties
type' :: Maybe DataSourceType
status :: Maybe ResourceStatus
sslProperties :: Maybe SslProperties
secretArn :: Maybe Text
name :: Maybe Text
lastUpdatedTime :: Maybe POSIX
errorInfo :: Maybe DataSourceErrorInfo
dataSourceParameters :: Maybe DataSourceParameters
dataSourceId :: Maybe Text
createdTime :: Maybe POSIX
arn :: Maybe Text
alternateDataSourceParameters :: Maybe (NonEmpty DataSourceParameters)
$sel:vpcConnectionProperties:DataSource' :: DataSource -> Maybe VpcConnectionProperties
$sel:type':DataSource' :: DataSource -> Maybe DataSourceType
$sel:status:DataSource' :: DataSource -> Maybe ResourceStatus
$sel:sslProperties:DataSource' :: DataSource -> Maybe SslProperties
$sel:secretArn:DataSource' :: DataSource -> Maybe Text
$sel:name:DataSource' :: DataSource -> Maybe Text
$sel:lastUpdatedTime:DataSource' :: DataSource -> Maybe POSIX
$sel:errorInfo:DataSource' :: DataSource -> Maybe DataSourceErrorInfo
$sel:dataSourceParameters:DataSource' :: DataSource -> Maybe DataSourceParameters
$sel:dataSourceId:DataSource' :: DataSource -> Maybe Text
$sel:createdTime:DataSource' :: DataSource -> Maybe POSIX
$sel:arn:DataSource' :: DataSource -> Maybe Text
$sel:alternateDataSourceParameters:DataSource' :: DataSource -> Maybe (NonEmpty DataSourceParameters)
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty DataSourceParameters)
alternateDataSourceParameters
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
createdTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
dataSourceId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DataSourceParameters
dataSourceParameters
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DataSourceErrorInfo
errorInfo
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
lastUpdatedTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
secretArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe SslProperties
sslProperties
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ResourceStatus
status
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DataSourceType
type'
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe VpcConnectionProperties
vpcConnectionProperties

instance Prelude.NFData DataSource where
  rnf :: DataSource -> ()
rnf DataSource' {Maybe (NonEmpty DataSourceParameters)
Maybe Text
Maybe POSIX
Maybe DataSourceErrorInfo
Maybe DataSourceType
Maybe ResourceStatus
Maybe SslProperties
Maybe DataSourceParameters
Maybe VpcConnectionProperties
vpcConnectionProperties :: Maybe VpcConnectionProperties
type' :: Maybe DataSourceType
status :: Maybe ResourceStatus
sslProperties :: Maybe SslProperties
secretArn :: Maybe Text
name :: Maybe Text
lastUpdatedTime :: Maybe POSIX
errorInfo :: Maybe DataSourceErrorInfo
dataSourceParameters :: Maybe DataSourceParameters
dataSourceId :: Maybe Text
createdTime :: Maybe POSIX
arn :: Maybe Text
alternateDataSourceParameters :: Maybe (NonEmpty DataSourceParameters)
$sel:vpcConnectionProperties:DataSource' :: DataSource -> Maybe VpcConnectionProperties
$sel:type':DataSource' :: DataSource -> Maybe DataSourceType
$sel:status:DataSource' :: DataSource -> Maybe ResourceStatus
$sel:sslProperties:DataSource' :: DataSource -> Maybe SslProperties
$sel:secretArn:DataSource' :: DataSource -> Maybe Text
$sel:name:DataSource' :: DataSource -> Maybe Text
$sel:lastUpdatedTime:DataSource' :: DataSource -> Maybe POSIX
$sel:errorInfo:DataSource' :: DataSource -> Maybe DataSourceErrorInfo
$sel:dataSourceParameters:DataSource' :: DataSource -> Maybe DataSourceParameters
$sel:dataSourceId:DataSource' :: DataSource -> Maybe Text
$sel:createdTime:DataSource' :: DataSource -> Maybe POSIX
$sel:arn:DataSource' :: DataSource -> Maybe Text
$sel:alternateDataSourceParameters:DataSource' :: DataSource -> Maybe (NonEmpty DataSourceParameters)
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty DataSourceParameters)
alternateDataSourceParameters
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
createdTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
dataSourceId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe DataSourceParameters
dataSourceParameters
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe DataSourceErrorInfo
errorInfo
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastUpdatedTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
secretArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe SslProperties
sslProperties
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ResourceStatus
status
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe DataSourceType
type'
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe VpcConnectionProperties
vpcConnectionProperties