{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

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

-- |
-- Module      : Amazonka.MachineLearning.GetDataSource
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns a @DataSource@ that includes metadata and data file information,
-- as well as the current status of the @DataSource@.
--
-- @GetDataSource@ provides results in normal or verbose format. The
-- verbose format adds the schema description and the list of files pointed
-- to by the DataSource to the normal format.
module Amazonka.MachineLearning.GetDataSource
  ( -- * Creating a Request
    GetDataSource (..),
    newGetDataSource,

    -- * Request Lenses
    getDataSource_verbose,
    getDataSource_dataSourceId,

    -- * Destructuring the Response
    GetDataSourceResponse (..),
    newGetDataSourceResponse,

    -- * Response Lenses
    getDataSourceResponse_status,
    getDataSourceResponse_numberOfFiles,
    getDataSourceResponse_lastUpdatedAt,
    getDataSourceResponse_createdAt,
    getDataSourceResponse_computeTime,
    getDataSourceResponse_dataSourceId,
    getDataSourceResponse_rDSMetadata,
    getDataSourceResponse_dataSizeInBytes,
    getDataSourceResponse_dataSourceSchema,
    getDataSourceResponse_startedAt,
    getDataSourceResponse_finishedAt,
    getDataSourceResponse_createdByIamUser,
    getDataSourceResponse_name,
    getDataSourceResponse_logUri,
    getDataSourceResponse_dataLocationS3,
    getDataSourceResponse_computeStatistics,
    getDataSourceResponse_message,
    getDataSourceResponse_redshiftMetadata,
    getDataSourceResponse_dataRearrangement,
    getDataSourceResponse_roleARN,
    getDataSourceResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MachineLearning.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newGetDataSource' smart constructor.
data GetDataSource = GetDataSource'
  { -- | Specifies whether the @GetDataSource@ operation should return
    -- @DataSourceSchema@.
    --
    -- If true, @DataSourceSchema@ is returned.
    --
    -- If false, @DataSourceSchema@ is not returned.
    GetDataSource -> Maybe Bool
verbose :: Prelude.Maybe Prelude.Bool,
    -- | The ID assigned to the @DataSource@ at creation.
    GetDataSource -> Text
dataSourceId :: Prelude.Text
  }
  deriving (GetDataSource -> GetDataSource -> Bool
(GetDataSource -> GetDataSource -> Bool)
-> (GetDataSource -> GetDataSource -> Bool) -> Eq GetDataSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetDataSource -> GetDataSource -> Bool
$c/= :: GetDataSource -> GetDataSource -> Bool
== :: GetDataSource -> GetDataSource -> Bool
$c== :: GetDataSource -> GetDataSource -> Bool
Prelude.Eq, ReadPrec [GetDataSource]
ReadPrec GetDataSource
Int -> ReadS GetDataSource
ReadS [GetDataSource]
(Int -> ReadS GetDataSource)
-> ReadS [GetDataSource]
-> ReadPrec GetDataSource
-> ReadPrec [GetDataSource]
-> Read GetDataSource
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetDataSource]
$creadListPrec :: ReadPrec [GetDataSource]
readPrec :: ReadPrec GetDataSource
$creadPrec :: ReadPrec GetDataSource
readList :: ReadS [GetDataSource]
$creadList :: ReadS [GetDataSource]
readsPrec :: Int -> ReadS GetDataSource
$creadsPrec :: Int -> ReadS GetDataSource
Prelude.Read, Int -> GetDataSource -> ShowS
[GetDataSource] -> ShowS
GetDataSource -> String
(Int -> GetDataSource -> ShowS)
-> (GetDataSource -> String)
-> ([GetDataSource] -> ShowS)
-> Show GetDataSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetDataSource] -> ShowS
$cshowList :: [GetDataSource] -> ShowS
show :: GetDataSource -> String
$cshow :: GetDataSource -> String
showsPrec :: Int -> GetDataSource -> ShowS
$cshowsPrec :: Int -> GetDataSource -> ShowS
Prelude.Show, (forall x. GetDataSource -> Rep GetDataSource x)
-> (forall x. Rep GetDataSource x -> GetDataSource)
-> Generic GetDataSource
forall x. Rep GetDataSource x -> GetDataSource
forall x. GetDataSource -> Rep GetDataSource x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetDataSource x -> GetDataSource
$cfrom :: forall x. GetDataSource -> Rep GetDataSource x
Prelude.Generic)

-- |
-- Create a value of 'GetDataSource' 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:
--
-- 'verbose', 'getDataSource_verbose' - Specifies whether the @GetDataSource@ operation should return
-- @DataSourceSchema@.
--
-- If true, @DataSourceSchema@ is returned.
--
-- If false, @DataSourceSchema@ is not returned.
--
-- 'dataSourceId', 'getDataSource_dataSourceId' - The ID assigned to the @DataSource@ at creation.
newGetDataSource ::
  -- | 'dataSourceId'
  Prelude.Text ->
  GetDataSource
newGetDataSource :: Text -> GetDataSource
newGetDataSource Text
pDataSourceId_ =
  GetDataSource' :: Maybe Bool -> Text -> GetDataSource
GetDataSource'
    { $sel:verbose:GetDataSource' :: Maybe Bool
verbose = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:dataSourceId:GetDataSource' :: Text
dataSourceId = Text
pDataSourceId_
    }

-- | Specifies whether the @GetDataSource@ operation should return
-- @DataSourceSchema@.
--
-- If true, @DataSourceSchema@ is returned.
--
-- If false, @DataSourceSchema@ is not returned.
getDataSource_verbose :: Lens.Lens' GetDataSource (Prelude.Maybe Prelude.Bool)
getDataSource_verbose :: (Maybe Bool -> f (Maybe Bool)) -> GetDataSource -> f GetDataSource
getDataSource_verbose = (GetDataSource -> Maybe Bool)
-> (GetDataSource -> Maybe Bool -> GetDataSource)
-> Lens GetDataSource GetDataSource (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDataSource' {Maybe Bool
verbose :: Maybe Bool
$sel:verbose:GetDataSource' :: GetDataSource -> Maybe Bool
verbose} -> Maybe Bool
verbose) (\s :: GetDataSource
s@GetDataSource' {} Maybe Bool
a -> GetDataSource
s {$sel:verbose:GetDataSource' :: Maybe Bool
verbose = Maybe Bool
a} :: GetDataSource)

-- | The ID assigned to the @DataSource@ at creation.
getDataSource_dataSourceId :: Lens.Lens' GetDataSource Prelude.Text
getDataSource_dataSourceId :: (Text -> f Text) -> GetDataSource -> f GetDataSource
getDataSource_dataSourceId = (GetDataSource -> Text)
-> (GetDataSource -> Text -> GetDataSource)
-> Lens GetDataSource GetDataSource Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDataSource' {Text
dataSourceId :: Text
$sel:dataSourceId:GetDataSource' :: GetDataSource -> Text
dataSourceId} -> Text
dataSourceId) (\s :: GetDataSource
s@GetDataSource' {} Text
a -> GetDataSource
s {$sel:dataSourceId:GetDataSource' :: Text
dataSourceId = Text
a} :: GetDataSource)

instance Core.AWSRequest GetDataSource where
  type
    AWSResponse GetDataSource =
      GetDataSourceResponse
  request :: GetDataSource -> Request GetDataSource
request = Service -> GetDataSource -> Request GetDataSource
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy GetDataSource
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetDataSource)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetDataSource))
-> Logger
-> Service
-> Proxy GetDataSource
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetDataSource)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe EntityStatus
-> Maybe Integer
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Integer
-> Maybe Text
-> Maybe RDSMetadata
-> Maybe Integer
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe RedshiftMetadata
-> Maybe Text
-> Maybe Text
-> Int
-> GetDataSourceResponse
GetDataSourceResponse'
            (Maybe EntityStatus
 -> Maybe Integer
 -> Maybe POSIX
 -> Maybe POSIX
 -> Maybe Integer
 -> Maybe Text
 -> Maybe RDSMetadata
 -> Maybe Integer
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Text
 -> Maybe RedshiftMetadata
 -> Maybe Text
 -> Maybe Text
 -> Int
 -> GetDataSourceResponse)
-> Either String (Maybe EntityStatus)
-> Either
     String
     (Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Integer
      -> Maybe Text
      -> Maybe RDSMetadata
      -> Maybe Integer
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe RedshiftMetadata
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetDataSourceResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe EntityStatus)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Status")
            Either
  String
  (Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Integer
   -> Maybe Text
   -> Maybe RDSMetadata
   -> Maybe Integer
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe RedshiftMetadata
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> GetDataSourceResponse)
-> Either String (Maybe Integer)
-> Either
     String
     (Maybe POSIX
      -> Maybe POSIX
      -> Maybe Integer
      -> Maybe Text
      -> Maybe RDSMetadata
      -> Maybe Integer
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe RedshiftMetadata
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetDataSourceResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"NumberOfFiles")
            Either
  String
  (Maybe POSIX
   -> Maybe POSIX
   -> Maybe Integer
   -> Maybe Text
   -> Maybe RDSMetadata
   -> Maybe Integer
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe RedshiftMetadata
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> GetDataSourceResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe POSIX
      -> Maybe Integer
      -> Maybe Text
      -> Maybe RDSMetadata
      -> Maybe Integer
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe RedshiftMetadata
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetDataSourceResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"LastUpdatedAt")
            Either
  String
  (Maybe POSIX
   -> Maybe Integer
   -> Maybe Text
   -> Maybe RDSMetadata
   -> Maybe Integer
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe RedshiftMetadata
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> GetDataSourceResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Integer
      -> Maybe Text
      -> Maybe RDSMetadata
      -> Maybe Integer
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe RedshiftMetadata
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetDataSourceResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CreatedAt")
            Either
  String
  (Maybe Integer
   -> Maybe Text
   -> Maybe RDSMetadata
   -> Maybe Integer
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe RedshiftMetadata
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> GetDataSourceResponse)
-> Either String (Maybe Integer)
-> Either
     String
     (Maybe Text
      -> Maybe RDSMetadata
      -> Maybe Integer
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe RedshiftMetadata
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetDataSourceResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ComputeTime")
            Either
  String
  (Maybe Text
   -> Maybe RDSMetadata
   -> Maybe Integer
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe RedshiftMetadata
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> GetDataSourceResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe RDSMetadata
      -> Maybe Integer
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe RedshiftMetadata
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetDataSourceResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"DataSourceId")
            Either
  String
  (Maybe RDSMetadata
   -> Maybe Integer
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe RedshiftMetadata
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> GetDataSourceResponse)
-> Either String (Maybe RDSMetadata)
-> Either
     String
     (Maybe Integer
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe RedshiftMetadata
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetDataSourceResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe RDSMetadata)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"RDSMetadata")
            Either
  String
  (Maybe Integer
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe RedshiftMetadata
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> GetDataSourceResponse)
-> Either String (Maybe Integer)
-> Either
     String
     (Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe RedshiftMetadata
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetDataSourceResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"DataSizeInBytes")
            Either
  String
  (Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe RedshiftMetadata
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> GetDataSourceResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe RedshiftMetadata
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetDataSourceResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"DataSourceSchema")
            Either
  String
  (Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe RedshiftMetadata
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> GetDataSourceResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe RedshiftMetadata
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetDataSourceResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"StartedAt")
            Either
  String
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe RedshiftMetadata
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> GetDataSourceResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe RedshiftMetadata
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetDataSourceResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"FinishedAt")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe RedshiftMetadata
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> GetDataSourceResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe RedshiftMetadata
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetDataSourceResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CreatedByIamUser")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe RedshiftMetadata
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> GetDataSourceResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe RedshiftMetadata
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetDataSourceResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Name")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe RedshiftMetadata
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> GetDataSourceResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe RedshiftMetadata
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetDataSourceResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"LogUri")
            Either
  String
  (Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe RedshiftMetadata
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> GetDataSourceResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Bool
      -> Maybe Text
      -> Maybe RedshiftMetadata
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetDataSourceResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"DataLocationS3")
            Either
  String
  (Maybe Bool
   -> Maybe Text
   -> Maybe RedshiftMetadata
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> GetDataSourceResponse)
-> Either String (Maybe Bool)
-> Either
     String
     (Maybe Text
      -> Maybe RedshiftMetadata
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetDataSourceResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ComputeStatistics")
            Either
  String
  (Maybe Text
   -> Maybe RedshiftMetadata
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> GetDataSourceResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe RedshiftMetadata
      -> Maybe Text -> Maybe Text -> Int -> GetDataSourceResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Message")
            Either
  String
  (Maybe RedshiftMetadata
   -> Maybe Text -> Maybe Text -> Int -> GetDataSourceResponse)
-> Either String (Maybe RedshiftMetadata)
-> Either
     String (Maybe Text -> Maybe Text -> Int -> GetDataSourceResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe RedshiftMetadata)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"RedshiftMetadata")
            Either
  String (Maybe Text -> Maybe Text -> Int -> GetDataSourceResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Int -> GetDataSourceResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"DataRearrangement")
            Either String (Maybe Text -> Int -> GetDataSourceResponse)
-> Either String (Maybe Text)
-> Either String (Int -> GetDataSourceResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"RoleARN")
            Either String (Int -> GetDataSourceResponse)
-> Either String Int -> Either String GetDataSourceResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable GetDataSource

instance Prelude.NFData GetDataSource

instance Core.ToHeaders GetDataSource where
  toHeaders :: GetDataSource -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetDataSource -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AmazonML_20141212.GetDataSource" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON GetDataSource where
  toJSON :: GetDataSource -> Value
toJSON GetDataSource' {Maybe Bool
Text
dataSourceId :: Text
verbose :: Maybe Bool
$sel:dataSourceId:GetDataSource' :: GetDataSource -> Text
$sel:verbose:GetDataSource' :: GetDataSource -> Maybe Bool
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"Verbose" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
verbose,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"DataSourceId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
dataSourceId)
          ]
      )

instance Core.ToPath GetDataSource where
  toPath :: GetDataSource -> ByteString
toPath = ByteString -> GetDataSource -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery GetDataSource where
  toQuery :: GetDataSource -> QueryString
toQuery = QueryString -> GetDataSource -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | Represents the output of a @GetDataSource@ operation and describes a
-- @DataSource@.
--
-- /See:/ 'newGetDataSourceResponse' smart constructor.
data GetDataSourceResponse = GetDataSourceResponse'
  { -- | The current status of the @DataSource@. This element can have one of the
    -- following values:
    --
    -- -   @PENDING@ - Amazon ML submitted a request to create a @DataSource@.
    --
    -- -   @INPROGRESS@ - The creation process is underway.
    --
    -- -   @FAILED@ - The request to create a @DataSource@ did not run to
    --     completion. It is not usable.
    --
    -- -   @COMPLETED@ - The creation process completed successfully.
    --
    -- -   @DELETED@ - The @DataSource@ is marked as deleted. It is not usable.
    GetDataSourceResponse -> Maybe EntityStatus
status :: Prelude.Maybe EntityStatus,
    -- | The number of data files referenced by the @DataSource@.
    GetDataSourceResponse -> Maybe Integer
numberOfFiles :: Prelude.Maybe Prelude.Integer,
    -- | The time of the most recent edit to the @DataSource@. The time is
    -- expressed in epoch time.
    GetDataSourceResponse -> Maybe POSIX
lastUpdatedAt :: Prelude.Maybe Core.POSIX,
    -- | The time that the @DataSource@ was created. The time is expressed in
    -- epoch time.
    GetDataSourceResponse -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
    -- | The approximate CPU time in milliseconds that Amazon Machine Learning
    -- spent processing the @DataSource@, normalized and scaled on computation
    -- resources. @ComputeTime@ is only available if the @DataSource@ is in the
    -- @COMPLETED@ state and the @ComputeStatistics@ is set to true.
    GetDataSourceResponse -> Maybe Integer
computeTime :: Prelude.Maybe Prelude.Integer,
    -- | The ID assigned to the @DataSource@ at creation. This value should be
    -- identical to the value of the @DataSourceId@ in the request.
    GetDataSourceResponse -> Maybe Text
dataSourceId :: Prelude.Maybe Prelude.Text,
    GetDataSourceResponse -> Maybe RDSMetadata
rDSMetadata :: Prelude.Maybe RDSMetadata,
    -- | The total size of observations in the data files.
    GetDataSourceResponse -> Maybe Integer
dataSizeInBytes :: Prelude.Maybe Prelude.Integer,
    -- | The schema used by all of the data files of this @DataSource@.
    --
    -- __Note:__ This parameter is provided as part of the verbose format.
    GetDataSourceResponse -> Maybe Text
dataSourceSchema :: Prelude.Maybe Prelude.Text,
    -- | The epoch time when Amazon Machine Learning marked the @DataSource@ as
    -- @INPROGRESS@. @StartedAt@ isn\'t available if the @DataSource@ is in the
    -- @PENDING@ state.
    GetDataSourceResponse -> Maybe POSIX
startedAt :: Prelude.Maybe Core.POSIX,
    -- | The epoch time when Amazon Machine Learning marked the @DataSource@ as
    -- @COMPLETED@ or @FAILED@. @FinishedAt@ is only available when the
    -- @DataSource@ is in the @COMPLETED@ or @FAILED@ state.
    GetDataSourceResponse -> Maybe POSIX
finishedAt :: Prelude.Maybe Core.POSIX,
    -- | The AWS user account from which the @DataSource@ was created. The
    -- account type can be either an AWS root account or an AWS Identity and
    -- Access Management (IAM) user account.
    GetDataSourceResponse -> Maybe Text
createdByIamUser :: Prelude.Maybe Prelude.Text,
    -- | A user-supplied name or description of the @DataSource@.
    GetDataSourceResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | A link to the file containing logs of @CreateDataSourceFrom*@
    -- operations.
    GetDataSourceResponse -> Maybe Text
logUri :: Prelude.Maybe Prelude.Text,
    -- | The location of the data file or directory in Amazon Simple Storage
    -- Service (Amazon S3).
    GetDataSourceResponse -> Maybe Text
dataLocationS3 :: Prelude.Maybe Prelude.Text,
    -- | The parameter is @true@ if statistics need to be generated from the
    -- observation data.
    GetDataSourceResponse -> Maybe Bool
computeStatistics :: Prelude.Maybe Prelude.Bool,
    -- | The user-supplied description of the most recent details about creating
    -- the @DataSource@.
    GetDataSourceResponse -> Maybe Text
message :: Prelude.Maybe Prelude.Text,
    GetDataSourceResponse -> Maybe RedshiftMetadata
redshiftMetadata :: Prelude.Maybe RedshiftMetadata,
    -- | A JSON string that represents the splitting and rearrangement
    -- requirement used when this @DataSource@ was created.
    GetDataSourceResponse -> Maybe Text
dataRearrangement :: Prelude.Maybe Prelude.Text,
    GetDataSourceResponse -> Maybe Text
roleARN :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    GetDataSourceResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetDataSourceResponse -> GetDataSourceResponse -> Bool
(GetDataSourceResponse -> GetDataSourceResponse -> Bool)
-> (GetDataSourceResponse -> GetDataSourceResponse -> Bool)
-> Eq GetDataSourceResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetDataSourceResponse -> GetDataSourceResponse -> Bool
$c/= :: GetDataSourceResponse -> GetDataSourceResponse -> Bool
== :: GetDataSourceResponse -> GetDataSourceResponse -> Bool
$c== :: GetDataSourceResponse -> GetDataSourceResponse -> Bool
Prelude.Eq, ReadPrec [GetDataSourceResponse]
ReadPrec GetDataSourceResponse
Int -> ReadS GetDataSourceResponse
ReadS [GetDataSourceResponse]
(Int -> ReadS GetDataSourceResponse)
-> ReadS [GetDataSourceResponse]
-> ReadPrec GetDataSourceResponse
-> ReadPrec [GetDataSourceResponse]
-> Read GetDataSourceResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetDataSourceResponse]
$creadListPrec :: ReadPrec [GetDataSourceResponse]
readPrec :: ReadPrec GetDataSourceResponse
$creadPrec :: ReadPrec GetDataSourceResponse
readList :: ReadS [GetDataSourceResponse]
$creadList :: ReadS [GetDataSourceResponse]
readsPrec :: Int -> ReadS GetDataSourceResponse
$creadsPrec :: Int -> ReadS GetDataSourceResponse
Prelude.Read, Int -> GetDataSourceResponse -> ShowS
[GetDataSourceResponse] -> ShowS
GetDataSourceResponse -> String
(Int -> GetDataSourceResponse -> ShowS)
-> (GetDataSourceResponse -> String)
-> ([GetDataSourceResponse] -> ShowS)
-> Show GetDataSourceResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetDataSourceResponse] -> ShowS
$cshowList :: [GetDataSourceResponse] -> ShowS
show :: GetDataSourceResponse -> String
$cshow :: GetDataSourceResponse -> String
showsPrec :: Int -> GetDataSourceResponse -> ShowS
$cshowsPrec :: Int -> GetDataSourceResponse -> ShowS
Prelude.Show, (forall x. GetDataSourceResponse -> Rep GetDataSourceResponse x)
-> (forall x. Rep GetDataSourceResponse x -> GetDataSourceResponse)
-> Generic GetDataSourceResponse
forall x. Rep GetDataSourceResponse x -> GetDataSourceResponse
forall x. GetDataSourceResponse -> Rep GetDataSourceResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetDataSourceResponse x -> GetDataSourceResponse
$cfrom :: forall x. GetDataSourceResponse -> Rep GetDataSourceResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetDataSourceResponse' 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:
--
-- 'status', 'getDataSourceResponse_status' - The current status of the @DataSource@. This element can have one of the
-- following values:
--
-- -   @PENDING@ - Amazon ML submitted a request to create a @DataSource@.
--
-- -   @INPROGRESS@ - The creation process is underway.
--
-- -   @FAILED@ - The request to create a @DataSource@ did not run to
--     completion. It is not usable.
--
-- -   @COMPLETED@ - The creation process completed successfully.
--
-- -   @DELETED@ - The @DataSource@ is marked as deleted. It is not usable.
--
-- 'numberOfFiles', 'getDataSourceResponse_numberOfFiles' - The number of data files referenced by the @DataSource@.
--
-- 'lastUpdatedAt', 'getDataSourceResponse_lastUpdatedAt' - The time of the most recent edit to the @DataSource@. The time is
-- expressed in epoch time.
--
-- 'createdAt', 'getDataSourceResponse_createdAt' - The time that the @DataSource@ was created. The time is expressed in
-- epoch time.
--
-- 'computeTime', 'getDataSourceResponse_computeTime' - The approximate CPU time in milliseconds that Amazon Machine Learning
-- spent processing the @DataSource@, normalized and scaled on computation
-- resources. @ComputeTime@ is only available if the @DataSource@ is in the
-- @COMPLETED@ state and the @ComputeStatistics@ is set to true.
--
-- 'dataSourceId', 'getDataSourceResponse_dataSourceId' - The ID assigned to the @DataSource@ at creation. This value should be
-- identical to the value of the @DataSourceId@ in the request.
--
-- 'rDSMetadata', 'getDataSourceResponse_rDSMetadata' - Undocumented member.
--
-- 'dataSizeInBytes', 'getDataSourceResponse_dataSizeInBytes' - The total size of observations in the data files.
--
-- 'dataSourceSchema', 'getDataSourceResponse_dataSourceSchema' - The schema used by all of the data files of this @DataSource@.
--
-- __Note:__ This parameter is provided as part of the verbose format.
--
-- 'startedAt', 'getDataSourceResponse_startedAt' - The epoch time when Amazon Machine Learning marked the @DataSource@ as
-- @INPROGRESS@. @StartedAt@ isn\'t available if the @DataSource@ is in the
-- @PENDING@ state.
--
-- 'finishedAt', 'getDataSourceResponse_finishedAt' - The epoch time when Amazon Machine Learning marked the @DataSource@ as
-- @COMPLETED@ or @FAILED@. @FinishedAt@ is only available when the
-- @DataSource@ is in the @COMPLETED@ or @FAILED@ state.
--
-- 'createdByIamUser', 'getDataSourceResponse_createdByIamUser' - The AWS user account from which the @DataSource@ was created. The
-- account type can be either an AWS root account or an AWS Identity and
-- Access Management (IAM) user account.
--
-- 'name', 'getDataSourceResponse_name' - A user-supplied name or description of the @DataSource@.
--
-- 'logUri', 'getDataSourceResponse_logUri' - A link to the file containing logs of @CreateDataSourceFrom*@
-- operations.
--
-- 'dataLocationS3', 'getDataSourceResponse_dataLocationS3' - The location of the data file or directory in Amazon Simple Storage
-- Service (Amazon S3).
--
-- 'computeStatistics', 'getDataSourceResponse_computeStatistics' - The parameter is @true@ if statistics need to be generated from the
-- observation data.
--
-- 'message', 'getDataSourceResponse_message' - The user-supplied description of the most recent details about creating
-- the @DataSource@.
--
-- 'redshiftMetadata', 'getDataSourceResponse_redshiftMetadata' - Undocumented member.
--
-- 'dataRearrangement', 'getDataSourceResponse_dataRearrangement' - A JSON string that represents the splitting and rearrangement
-- requirement used when this @DataSource@ was created.
--
-- 'roleARN', 'getDataSourceResponse_roleARN' - Undocumented member.
--
-- 'httpStatus', 'getDataSourceResponse_httpStatus' - The response's http status code.
newGetDataSourceResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetDataSourceResponse
newGetDataSourceResponse :: Int -> GetDataSourceResponse
newGetDataSourceResponse Int
pHttpStatus_ =
  GetDataSourceResponse' :: Maybe EntityStatus
-> Maybe Integer
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Integer
-> Maybe Text
-> Maybe RDSMetadata
-> Maybe Integer
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe RedshiftMetadata
-> Maybe Text
-> Maybe Text
-> Int
-> GetDataSourceResponse
GetDataSourceResponse'
    { $sel:status:GetDataSourceResponse' :: Maybe EntityStatus
status = Maybe EntityStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:numberOfFiles:GetDataSourceResponse' :: Maybe Integer
numberOfFiles = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedAt:GetDataSourceResponse' :: Maybe POSIX
lastUpdatedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:GetDataSourceResponse' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:computeTime:GetDataSourceResponse' :: Maybe Integer
computeTime = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:dataSourceId:GetDataSourceResponse' :: Maybe Text
dataSourceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:rDSMetadata:GetDataSourceResponse' :: Maybe RDSMetadata
rDSMetadata = Maybe RDSMetadata
forall a. Maybe a
Prelude.Nothing,
      $sel:dataSizeInBytes:GetDataSourceResponse' :: Maybe Integer
dataSizeInBytes = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:dataSourceSchema:GetDataSourceResponse' :: Maybe Text
dataSourceSchema = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:startedAt:GetDataSourceResponse' :: Maybe POSIX
startedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:finishedAt:GetDataSourceResponse' :: Maybe POSIX
finishedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:createdByIamUser:GetDataSourceResponse' :: Maybe Text
createdByIamUser = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:GetDataSourceResponse' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:logUri:GetDataSourceResponse' :: Maybe Text
logUri = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:dataLocationS3:GetDataSourceResponse' :: Maybe Text
dataLocationS3 = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:computeStatistics:GetDataSourceResponse' :: Maybe Bool
computeStatistics = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:message:GetDataSourceResponse' :: Maybe Text
message = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:redshiftMetadata:GetDataSourceResponse' :: Maybe RedshiftMetadata
redshiftMetadata = Maybe RedshiftMetadata
forall a. Maybe a
Prelude.Nothing,
      $sel:dataRearrangement:GetDataSourceResponse' :: Maybe Text
dataRearrangement = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:roleARN:GetDataSourceResponse' :: Maybe Text
roleARN = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetDataSourceResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The current status of the @DataSource@. This element can have one of the
-- following values:
--
-- -   @PENDING@ - Amazon ML submitted a request to create a @DataSource@.
--
-- -   @INPROGRESS@ - The creation process is underway.
--
-- -   @FAILED@ - The request to create a @DataSource@ did not run to
--     completion. It is not usable.
--
-- -   @COMPLETED@ - The creation process completed successfully.
--
-- -   @DELETED@ - The @DataSource@ is marked as deleted. It is not usable.
getDataSourceResponse_status :: Lens.Lens' GetDataSourceResponse (Prelude.Maybe EntityStatus)
getDataSourceResponse_status :: (Maybe EntityStatus -> f (Maybe EntityStatus))
-> GetDataSourceResponse -> f GetDataSourceResponse
getDataSourceResponse_status = (GetDataSourceResponse -> Maybe EntityStatus)
-> (GetDataSourceResponse
    -> Maybe EntityStatus -> GetDataSourceResponse)
-> Lens
     GetDataSourceResponse
     GetDataSourceResponse
     (Maybe EntityStatus)
     (Maybe EntityStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDataSourceResponse' {Maybe EntityStatus
status :: Maybe EntityStatus
$sel:status:GetDataSourceResponse' :: GetDataSourceResponse -> Maybe EntityStatus
status} -> Maybe EntityStatus
status) (\s :: GetDataSourceResponse
s@GetDataSourceResponse' {} Maybe EntityStatus
a -> GetDataSourceResponse
s {$sel:status:GetDataSourceResponse' :: Maybe EntityStatus
status = Maybe EntityStatus
a} :: GetDataSourceResponse)

-- | The number of data files referenced by the @DataSource@.
getDataSourceResponse_numberOfFiles :: Lens.Lens' GetDataSourceResponse (Prelude.Maybe Prelude.Integer)
getDataSourceResponse_numberOfFiles :: (Maybe Integer -> f (Maybe Integer))
-> GetDataSourceResponse -> f GetDataSourceResponse
getDataSourceResponse_numberOfFiles = (GetDataSourceResponse -> Maybe Integer)
-> (GetDataSourceResponse
    -> Maybe Integer -> GetDataSourceResponse)
-> Lens
     GetDataSourceResponse
     GetDataSourceResponse
     (Maybe Integer)
     (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDataSourceResponse' {Maybe Integer
numberOfFiles :: Maybe Integer
$sel:numberOfFiles:GetDataSourceResponse' :: GetDataSourceResponse -> Maybe Integer
numberOfFiles} -> Maybe Integer
numberOfFiles) (\s :: GetDataSourceResponse
s@GetDataSourceResponse' {} Maybe Integer
a -> GetDataSourceResponse
s {$sel:numberOfFiles:GetDataSourceResponse' :: Maybe Integer
numberOfFiles = Maybe Integer
a} :: GetDataSourceResponse)

-- | The time of the most recent edit to the @DataSource@. The time is
-- expressed in epoch time.
getDataSourceResponse_lastUpdatedAt :: Lens.Lens' GetDataSourceResponse (Prelude.Maybe Prelude.UTCTime)
getDataSourceResponse_lastUpdatedAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GetDataSourceResponse -> f GetDataSourceResponse
getDataSourceResponse_lastUpdatedAt = (GetDataSourceResponse -> Maybe POSIX)
-> (GetDataSourceResponse -> Maybe POSIX -> GetDataSourceResponse)
-> Lens
     GetDataSourceResponse
     GetDataSourceResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDataSourceResponse' {Maybe POSIX
lastUpdatedAt :: Maybe POSIX
$sel:lastUpdatedAt:GetDataSourceResponse' :: GetDataSourceResponse -> Maybe POSIX
lastUpdatedAt} -> Maybe POSIX
lastUpdatedAt) (\s :: GetDataSourceResponse
s@GetDataSourceResponse' {} Maybe POSIX
a -> GetDataSourceResponse
s {$sel:lastUpdatedAt:GetDataSourceResponse' :: Maybe POSIX
lastUpdatedAt = Maybe POSIX
a} :: GetDataSourceResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> GetDataSourceResponse -> f GetDataSourceResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GetDataSourceResponse
-> f GetDataSourceResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The time that the @DataSource@ was created. The time is expressed in
-- epoch time.
getDataSourceResponse_createdAt :: Lens.Lens' GetDataSourceResponse (Prelude.Maybe Prelude.UTCTime)
getDataSourceResponse_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GetDataSourceResponse -> f GetDataSourceResponse
getDataSourceResponse_createdAt = (GetDataSourceResponse -> Maybe POSIX)
-> (GetDataSourceResponse -> Maybe POSIX -> GetDataSourceResponse)
-> Lens
     GetDataSourceResponse
     GetDataSourceResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDataSourceResponse' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:GetDataSourceResponse' :: GetDataSourceResponse -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: GetDataSourceResponse
s@GetDataSourceResponse' {} Maybe POSIX
a -> GetDataSourceResponse
s {$sel:createdAt:GetDataSourceResponse' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: GetDataSourceResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> GetDataSourceResponse -> f GetDataSourceResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GetDataSourceResponse
-> f GetDataSourceResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The approximate CPU time in milliseconds that Amazon Machine Learning
-- spent processing the @DataSource@, normalized and scaled on computation
-- resources. @ComputeTime@ is only available if the @DataSource@ is in the
-- @COMPLETED@ state and the @ComputeStatistics@ is set to true.
getDataSourceResponse_computeTime :: Lens.Lens' GetDataSourceResponse (Prelude.Maybe Prelude.Integer)
getDataSourceResponse_computeTime :: (Maybe Integer -> f (Maybe Integer))
-> GetDataSourceResponse -> f GetDataSourceResponse
getDataSourceResponse_computeTime = (GetDataSourceResponse -> Maybe Integer)
-> (GetDataSourceResponse
    -> Maybe Integer -> GetDataSourceResponse)
-> Lens
     GetDataSourceResponse
     GetDataSourceResponse
     (Maybe Integer)
     (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDataSourceResponse' {Maybe Integer
computeTime :: Maybe Integer
$sel:computeTime:GetDataSourceResponse' :: GetDataSourceResponse -> Maybe Integer
computeTime} -> Maybe Integer
computeTime) (\s :: GetDataSourceResponse
s@GetDataSourceResponse' {} Maybe Integer
a -> GetDataSourceResponse
s {$sel:computeTime:GetDataSourceResponse' :: Maybe Integer
computeTime = Maybe Integer
a} :: GetDataSourceResponse)

-- | The ID assigned to the @DataSource@ at creation. This value should be
-- identical to the value of the @DataSourceId@ in the request.
getDataSourceResponse_dataSourceId :: Lens.Lens' GetDataSourceResponse (Prelude.Maybe Prelude.Text)
getDataSourceResponse_dataSourceId :: (Maybe Text -> f (Maybe Text))
-> GetDataSourceResponse -> f GetDataSourceResponse
getDataSourceResponse_dataSourceId = (GetDataSourceResponse -> Maybe Text)
-> (GetDataSourceResponse -> Maybe Text -> GetDataSourceResponse)
-> Lens
     GetDataSourceResponse
     GetDataSourceResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDataSourceResponse' {Maybe Text
dataSourceId :: Maybe Text
$sel:dataSourceId:GetDataSourceResponse' :: GetDataSourceResponse -> Maybe Text
dataSourceId} -> Maybe Text
dataSourceId) (\s :: GetDataSourceResponse
s@GetDataSourceResponse' {} Maybe Text
a -> GetDataSourceResponse
s {$sel:dataSourceId:GetDataSourceResponse' :: Maybe Text
dataSourceId = Maybe Text
a} :: GetDataSourceResponse)

-- | Undocumented member.
getDataSourceResponse_rDSMetadata :: Lens.Lens' GetDataSourceResponse (Prelude.Maybe RDSMetadata)
getDataSourceResponse_rDSMetadata :: (Maybe RDSMetadata -> f (Maybe RDSMetadata))
-> GetDataSourceResponse -> f GetDataSourceResponse
getDataSourceResponse_rDSMetadata = (GetDataSourceResponse -> Maybe RDSMetadata)
-> (GetDataSourceResponse
    -> Maybe RDSMetadata -> GetDataSourceResponse)
-> Lens
     GetDataSourceResponse
     GetDataSourceResponse
     (Maybe RDSMetadata)
     (Maybe RDSMetadata)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDataSourceResponse' {Maybe RDSMetadata
rDSMetadata :: Maybe RDSMetadata
$sel:rDSMetadata:GetDataSourceResponse' :: GetDataSourceResponse -> Maybe RDSMetadata
rDSMetadata} -> Maybe RDSMetadata
rDSMetadata) (\s :: GetDataSourceResponse
s@GetDataSourceResponse' {} Maybe RDSMetadata
a -> GetDataSourceResponse
s {$sel:rDSMetadata:GetDataSourceResponse' :: Maybe RDSMetadata
rDSMetadata = Maybe RDSMetadata
a} :: GetDataSourceResponse)

-- | The total size of observations in the data files.
getDataSourceResponse_dataSizeInBytes :: Lens.Lens' GetDataSourceResponse (Prelude.Maybe Prelude.Integer)
getDataSourceResponse_dataSizeInBytes :: (Maybe Integer -> f (Maybe Integer))
-> GetDataSourceResponse -> f GetDataSourceResponse
getDataSourceResponse_dataSizeInBytes = (GetDataSourceResponse -> Maybe Integer)
-> (GetDataSourceResponse
    -> Maybe Integer -> GetDataSourceResponse)
-> Lens
     GetDataSourceResponse
     GetDataSourceResponse
     (Maybe Integer)
     (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDataSourceResponse' {Maybe Integer
dataSizeInBytes :: Maybe Integer
$sel:dataSizeInBytes:GetDataSourceResponse' :: GetDataSourceResponse -> Maybe Integer
dataSizeInBytes} -> Maybe Integer
dataSizeInBytes) (\s :: GetDataSourceResponse
s@GetDataSourceResponse' {} Maybe Integer
a -> GetDataSourceResponse
s {$sel:dataSizeInBytes:GetDataSourceResponse' :: Maybe Integer
dataSizeInBytes = Maybe Integer
a} :: GetDataSourceResponse)

-- | The schema used by all of the data files of this @DataSource@.
--
-- __Note:__ This parameter is provided as part of the verbose format.
getDataSourceResponse_dataSourceSchema :: Lens.Lens' GetDataSourceResponse (Prelude.Maybe Prelude.Text)
getDataSourceResponse_dataSourceSchema :: (Maybe Text -> f (Maybe Text))
-> GetDataSourceResponse -> f GetDataSourceResponse
getDataSourceResponse_dataSourceSchema = (GetDataSourceResponse -> Maybe Text)
-> (GetDataSourceResponse -> Maybe Text -> GetDataSourceResponse)
-> Lens
     GetDataSourceResponse
     GetDataSourceResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDataSourceResponse' {Maybe Text
dataSourceSchema :: Maybe Text
$sel:dataSourceSchema:GetDataSourceResponse' :: GetDataSourceResponse -> Maybe Text
dataSourceSchema} -> Maybe Text
dataSourceSchema) (\s :: GetDataSourceResponse
s@GetDataSourceResponse' {} Maybe Text
a -> GetDataSourceResponse
s {$sel:dataSourceSchema:GetDataSourceResponse' :: Maybe Text
dataSourceSchema = Maybe Text
a} :: GetDataSourceResponse)

-- | The epoch time when Amazon Machine Learning marked the @DataSource@ as
-- @INPROGRESS@. @StartedAt@ isn\'t available if the @DataSource@ is in the
-- @PENDING@ state.
getDataSourceResponse_startedAt :: Lens.Lens' GetDataSourceResponse (Prelude.Maybe Prelude.UTCTime)
getDataSourceResponse_startedAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GetDataSourceResponse -> f GetDataSourceResponse
getDataSourceResponse_startedAt = (GetDataSourceResponse -> Maybe POSIX)
-> (GetDataSourceResponse -> Maybe POSIX -> GetDataSourceResponse)
-> Lens
     GetDataSourceResponse
     GetDataSourceResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDataSourceResponse' {Maybe POSIX
startedAt :: Maybe POSIX
$sel:startedAt:GetDataSourceResponse' :: GetDataSourceResponse -> Maybe POSIX
startedAt} -> Maybe POSIX
startedAt) (\s :: GetDataSourceResponse
s@GetDataSourceResponse' {} Maybe POSIX
a -> GetDataSourceResponse
s {$sel:startedAt:GetDataSourceResponse' :: Maybe POSIX
startedAt = Maybe POSIX
a} :: GetDataSourceResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> GetDataSourceResponse -> f GetDataSourceResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GetDataSourceResponse
-> f GetDataSourceResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The epoch time when Amazon Machine Learning marked the @DataSource@ as
-- @COMPLETED@ or @FAILED@. @FinishedAt@ is only available when the
-- @DataSource@ is in the @COMPLETED@ or @FAILED@ state.
getDataSourceResponse_finishedAt :: Lens.Lens' GetDataSourceResponse (Prelude.Maybe Prelude.UTCTime)
getDataSourceResponse_finishedAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GetDataSourceResponse -> f GetDataSourceResponse
getDataSourceResponse_finishedAt = (GetDataSourceResponse -> Maybe POSIX)
-> (GetDataSourceResponse -> Maybe POSIX -> GetDataSourceResponse)
-> Lens
     GetDataSourceResponse
     GetDataSourceResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDataSourceResponse' {Maybe POSIX
finishedAt :: Maybe POSIX
$sel:finishedAt:GetDataSourceResponse' :: GetDataSourceResponse -> Maybe POSIX
finishedAt} -> Maybe POSIX
finishedAt) (\s :: GetDataSourceResponse
s@GetDataSourceResponse' {} Maybe POSIX
a -> GetDataSourceResponse
s {$sel:finishedAt:GetDataSourceResponse' :: Maybe POSIX
finishedAt = Maybe POSIX
a} :: GetDataSourceResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> GetDataSourceResponse -> f GetDataSourceResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GetDataSourceResponse
-> f GetDataSourceResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The AWS user account from which the @DataSource@ was created. The
-- account type can be either an AWS root account or an AWS Identity and
-- Access Management (IAM) user account.
getDataSourceResponse_createdByIamUser :: Lens.Lens' GetDataSourceResponse (Prelude.Maybe Prelude.Text)
getDataSourceResponse_createdByIamUser :: (Maybe Text -> f (Maybe Text))
-> GetDataSourceResponse -> f GetDataSourceResponse
getDataSourceResponse_createdByIamUser = (GetDataSourceResponse -> Maybe Text)
-> (GetDataSourceResponse -> Maybe Text -> GetDataSourceResponse)
-> Lens
     GetDataSourceResponse
     GetDataSourceResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDataSourceResponse' {Maybe Text
createdByIamUser :: Maybe Text
$sel:createdByIamUser:GetDataSourceResponse' :: GetDataSourceResponse -> Maybe Text
createdByIamUser} -> Maybe Text
createdByIamUser) (\s :: GetDataSourceResponse
s@GetDataSourceResponse' {} Maybe Text
a -> GetDataSourceResponse
s {$sel:createdByIamUser:GetDataSourceResponse' :: Maybe Text
createdByIamUser = Maybe Text
a} :: GetDataSourceResponse)

-- | A user-supplied name or description of the @DataSource@.
getDataSourceResponse_name :: Lens.Lens' GetDataSourceResponse (Prelude.Maybe Prelude.Text)
getDataSourceResponse_name :: (Maybe Text -> f (Maybe Text))
-> GetDataSourceResponse -> f GetDataSourceResponse
getDataSourceResponse_name = (GetDataSourceResponse -> Maybe Text)
-> (GetDataSourceResponse -> Maybe Text -> GetDataSourceResponse)
-> Lens
     GetDataSourceResponse
     GetDataSourceResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDataSourceResponse' {Maybe Text
name :: Maybe Text
$sel:name:GetDataSourceResponse' :: GetDataSourceResponse -> Maybe Text
name} -> Maybe Text
name) (\s :: GetDataSourceResponse
s@GetDataSourceResponse' {} Maybe Text
a -> GetDataSourceResponse
s {$sel:name:GetDataSourceResponse' :: Maybe Text
name = Maybe Text
a} :: GetDataSourceResponse)

-- | A link to the file containing logs of @CreateDataSourceFrom*@
-- operations.
getDataSourceResponse_logUri :: Lens.Lens' GetDataSourceResponse (Prelude.Maybe Prelude.Text)
getDataSourceResponse_logUri :: (Maybe Text -> f (Maybe Text))
-> GetDataSourceResponse -> f GetDataSourceResponse
getDataSourceResponse_logUri = (GetDataSourceResponse -> Maybe Text)
-> (GetDataSourceResponse -> Maybe Text -> GetDataSourceResponse)
-> Lens
     GetDataSourceResponse
     GetDataSourceResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDataSourceResponse' {Maybe Text
logUri :: Maybe Text
$sel:logUri:GetDataSourceResponse' :: GetDataSourceResponse -> Maybe Text
logUri} -> Maybe Text
logUri) (\s :: GetDataSourceResponse
s@GetDataSourceResponse' {} Maybe Text
a -> GetDataSourceResponse
s {$sel:logUri:GetDataSourceResponse' :: Maybe Text
logUri = Maybe Text
a} :: GetDataSourceResponse)

-- | The location of the data file or directory in Amazon Simple Storage
-- Service (Amazon S3).
getDataSourceResponse_dataLocationS3 :: Lens.Lens' GetDataSourceResponse (Prelude.Maybe Prelude.Text)
getDataSourceResponse_dataLocationS3 :: (Maybe Text -> f (Maybe Text))
-> GetDataSourceResponse -> f GetDataSourceResponse
getDataSourceResponse_dataLocationS3 = (GetDataSourceResponse -> Maybe Text)
-> (GetDataSourceResponse -> Maybe Text -> GetDataSourceResponse)
-> Lens
     GetDataSourceResponse
     GetDataSourceResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDataSourceResponse' {Maybe Text
dataLocationS3 :: Maybe Text
$sel:dataLocationS3:GetDataSourceResponse' :: GetDataSourceResponse -> Maybe Text
dataLocationS3} -> Maybe Text
dataLocationS3) (\s :: GetDataSourceResponse
s@GetDataSourceResponse' {} Maybe Text
a -> GetDataSourceResponse
s {$sel:dataLocationS3:GetDataSourceResponse' :: Maybe Text
dataLocationS3 = Maybe Text
a} :: GetDataSourceResponse)

-- | The parameter is @true@ if statistics need to be generated from the
-- observation data.
getDataSourceResponse_computeStatistics :: Lens.Lens' GetDataSourceResponse (Prelude.Maybe Prelude.Bool)
getDataSourceResponse_computeStatistics :: (Maybe Bool -> f (Maybe Bool))
-> GetDataSourceResponse -> f GetDataSourceResponse
getDataSourceResponse_computeStatistics = (GetDataSourceResponse -> Maybe Bool)
-> (GetDataSourceResponse -> Maybe Bool -> GetDataSourceResponse)
-> Lens
     GetDataSourceResponse
     GetDataSourceResponse
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDataSourceResponse' {Maybe Bool
computeStatistics :: Maybe Bool
$sel:computeStatistics:GetDataSourceResponse' :: GetDataSourceResponse -> Maybe Bool
computeStatistics} -> Maybe Bool
computeStatistics) (\s :: GetDataSourceResponse
s@GetDataSourceResponse' {} Maybe Bool
a -> GetDataSourceResponse
s {$sel:computeStatistics:GetDataSourceResponse' :: Maybe Bool
computeStatistics = Maybe Bool
a} :: GetDataSourceResponse)

-- | The user-supplied description of the most recent details about creating
-- the @DataSource@.
getDataSourceResponse_message :: Lens.Lens' GetDataSourceResponse (Prelude.Maybe Prelude.Text)
getDataSourceResponse_message :: (Maybe Text -> f (Maybe Text))
-> GetDataSourceResponse -> f GetDataSourceResponse
getDataSourceResponse_message = (GetDataSourceResponse -> Maybe Text)
-> (GetDataSourceResponse -> Maybe Text -> GetDataSourceResponse)
-> Lens
     GetDataSourceResponse
     GetDataSourceResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDataSourceResponse' {Maybe Text
message :: Maybe Text
$sel:message:GetDataSourceResponse' :: GetDataSourceResponse -> Maybe Text
message} -> Maybe Text
message) (\s :: GetDataSourceResponse
s@GetDataSourceResponse' {} Maybe Text
a -> GetDataSourceResponse
s {$sel:message:GetDataSourceResponse' :: Maybe Text
message = Maybe Text
a} :: GetDataSourceResponse)

-- | Undocumented member.
getDataSourceResponse_redshiftMetadata :: Lens.Lens' GetDataSourceResponse (Prelude.Maybe RedshiftMetadata)
getDataSourceResponse_redshiftMetadata :: (Maybe RedshiftMetadata -> f (Maybe RedshiftMetadata))
-> GetDataSourceResponse -> f GetDataSourceResponse
getDataSourceResponse_redshiftMetadata = (GetDataSourceResponse -> Maybe RedshiftMetadata)
-> (GetDataSourceResponse
    -> Maybe RedshiftMetadata -> GetDataSourceResponse)
-> Lens
     GetDataSourceResponse
     GetDataSourceResponse
     (Maybe RedshiftMetadata)
     (Maybe RedshiftMetadata)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDataSourceResponse' {Maybe RedshiftMetadata
redshiftMetadata :: Maybe RedshiftMetadata
$sel:redshiftMetadata:GetDataSourceResponse' :: GetDataSourceResponse -> Maybe RedshiftMetadata
redshiftMetadata} -> Maybe RedshiftMetadata
redshiftMetadata) (\s :: GetDataSourceResponse
s@GetDataSourceResponse' {} Maybe RedshiftMetadata
a -> GetDataSourceResponse
s {$sel:redshiftMetadata:GetDataSourceResponse' :: Maybe RedshiftMetadata
redshiftMetadata = Maybe RedshiftMetadata
a} :: GetDataSourceResponse)

-- | A JSON string that represents the splitting and rearrangement
-- requirement used when this @DataSource@ was created.
getDataSourceResponse_dataRearrangement :: Lens.Lens' GetDataSourceResponse (Prelude.Maybe Prelude.Text)
getDataSourceResponse_dataRearrangement :: (Maybe Text -> f (Maybe Text))
-> GetDataSourceResponse -> f GetDataSourceResponse
getDataSourceResponse_dataRearrangement = (GetDataSourceResponse -> Maybe Text)
-> (GetDataSourceResponse -> Maybe Text -> GetDataSourceResponse)
-> Lens
     GetDataSourceResponse
     GetDataSourceResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDataSourceResponse' {Maybe Text
dataRearrangement :: Maybe Text
$sel:dataRearrangement:GetDataSourceResponse' :: GetDataSourceResponse -> Maybe Text
dataRearrangement} -> Maybe Text
dataRearrangement) (\s :: GetDataSourceResponse
s@GetDataSourceResponse' {} Maybe Text
a -> GetDataSourceResponse
s {$sel:dataRearrangement:GetDataSourceResponse' :: Maybe Text
dataRearrangement = Maybe Text
a} :: GetDataSourceResponse)

-- | Undocumented member.
getDataSourceResponse_roleARN :: Lens.Lens' GetDataSourceResponse (Prelude.Maybe Prelude.Text)
getDataSourceResponse_roleARN :: (Maybe Text -> f (Maybe Text))
-> GetDataSourceResponse -> f GetDataSourceResponse
getDataSourceResponse_roleARN = (GetDataSourceResponse -> Maybe Text)
-> (GetDataSourceResponse -> Maybe Text -> GetDataSourceResponse)
-> Lens
     GetDataSourceResponse
     GetDataSourceResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDataSourceResponse' {Maybe Text
roleARN :: Maybe Text
$sel:roleARN:GetDataSourceResponse' :: GetDataSourceResponse -> Maybe Text
roleARN} -> Maybe Text
roleARN) (\s :: GetDataSourceResponse
s@GetDataSourceResponse' {} Maybe Text
a -> GetDataSourceResponse
s {$sel:roleARN:GetDataSourceResponse' :: Maybe Text
roleARN = Maybe Text
a} :: GetDataSourceResponse)

-- | The response's http status code.
getDataSourceResponse_httpStatus :: Lens.Lens' GetDataSourceResponse Prelude.Int
getDataSourceResponse_httpStatus :: (Int -> f Int) -> GetDataSourceResponse -> f GetDataSourceResponse
getDataSourceResponse_httpStatus = (GetDataSourceResponse -> Int)
-> (GetDataSourceResponse -> Int -> GetDataSourceResponse)
-> Lens GetDataSourceResponse GetDataSourceResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDataSourceResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetDataSourceResponse' :: GetDataSourceResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetDataSourceResponse
s@GetDataSourceResponse' {} Int
a -> GetDataSourceResponse
s {$sel:httpStatus:GetDataSourceResponse' :: Int
httpStatus = Int
a} :: GetDataSourceResponse)

instance Prelude.NFData GetDataSourceResponse