{-# 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.Forecast.DescribeDatasetImportJob
-- 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)
--
-- Describes a dataset import job created using the CreateDatasetImportJob
-- operation.
--
-- In addition to listing the parameters provided in the
-- @CreateDatasetImportJob@ request, this operation includes the following
-- properties:
--
-- -   @CreationTime@
--
-- -   @LastModificationTime@
--
-- -   @DataSize@
--
-- -   @FieldStatistics@
--
-- -   @Status@
--
-- -   @Message@ - If an error occurred, information about the error.
module Amazonka.Forecast.DescribeDatasetImportJob
  ( -- * Creating a Request
    DescribeDatasetImportJob (..),
    newDescribeDatasetImportJob,

    -- * Request Lenses
    describeDatasetImportJob_datasetImportJobArn,

    -- * Destructuring the Response
    DescribeDatasetImportJobResponse (..),
    newDescribeDatasetImportJobResponse,

    -- * Response Lenses
    describeDatasetImportJobResponse_creationTime,
    describeDatasetImportJobResponse_status,
    describeDatasetImportJobResponse_datasetImportJobName,
    describeDatasetImportJobResponse_datasetArn,
    describeDatasetImportJobResponse_timestampFormat,
    describeDatasetImportJobResponse_dataSize,
    describeDatasetImportJobResponse_estimatedTimeRemainingInMinutes,
    describeDatasetImportJobResponse_fieldStatistics,
    describeDatasetImportJobResponse_dataSource,
    describeDatasetImportJobResponse_datasetImportJobArn,
    describeDatasetImportJobResponse_useGeolocationForTimeZone,
    describeDatasetImportJobResponse_message,
    describeDatasetImportJobResponse_geolocationFormat,
    describeDatasetImportJobResponse_timeZone,
    describeDatasetImportJobResponse_lastModificationTime,
    describeDatasetImportJobResponse_httpStatus,
  )
where

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

-- | /See:/ 'newDescribeDatasetImportJob' smart constructor.
data DescribeDatasetImportJob = DescribeDatasetImportJob'
  { -- | The Amazon Resource Name (ARN) of the dataset import job.
    DescribeDatasetImportJob -> Text
datasetImportJobArn :: Prelude.Text
  }
  deriving (DescribeDatasetImportJob -> DescribeDatasetImportJob -> Bool
(DescribeDatasetImportJob -> DescribeDatasetImportJob -> Bool)
-> (DescribeDatasetImportJob -> DescribeDatasetImportJob -> Bool)
-> Eq DescribeDatasetImportJob
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeDatasetImportJob -> DescribeDatasetImportJob -> Bool
$c/= :: DescribeDatasetImportJob -> DescribeDatasetImportJob -> Bool
== :: DescribeDatasetImportJob -> DescribeDatasetImportJob -> Bool
$c== :: DescribeDatasetImportJob -> DescribeDatasetImportJob -> Bool
Prelude.Eq, ReadPrec [DescribeDatasetImportJob]
ReadPrec DescribeDatasetImportJob
Int -> ReadS DescribeDatasetImportJob
ReadS [DescribeDatasetImportJob]
(Int -> ReadS DescribeDatasetImportJob)
-> ReadS [DescribeDatasetImportJob]
-> ReadPrec DescribeDatasetImportJob
-> ReadPrec [DescribeDatasetImportJob]
-> Read DescribeDatasetImportJob
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeDatasetImportJob]
$creadListPrec :: ReadPrec [DescribeDatasetImportJob]
readPrec :: ReadPrec DescribeDatasetImportJob
$creadPrec :: ReadPrec DescribeDatasetImportJob
readList :: ReadS [DescribeDatasetImportJob]
$creadList :: ReadS [DescribeDatasetImportJob]
readsPrec :: Int -> ReadS DescribeDatasetImportJob
$creadsPrec :: Int -> ReadS DescribeDatasetImportJob
Prelude.Read, Int -> DescribeDatasetImportJob -> ShowS
[DescribeDatasetImportJob] -> ShowS
DescribeDatasetImportJob -> String
(Int -> DescribeDatasetImportJob -> ShowS)
-> (DescribeDatasetImportJob -> String)
-> ([DescribeDatasetImportJob] -> ShowS)
-> Show DescribeDatasetImportJob
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeDatasetImportJob] -> ShowS
$cshowList :: [DescribeDatasetImportJob] -> ShowS
show :: DescribeDatasetImportJob -> String
$cshow :: DescribeDatasetImportJob -> String
showsPrec :: Int -> DescribeDatasetImportJob -> ShowS
$cshowsPrec :: Int -> DescribeDatasetImportJob -> ShowS
Prelude.Show, (forall x.
 DescribeDatasetImportJob -> Rep DescribeDatasetImportJob x)
-> (forall x.
    Rep DescribeDatasetImportJob x -> DescribeDatasetImportJob)
-> Generic DescribeDatasetImportJob
forall x.
Rep DescribeDatasetImportJob x -> DescribeDatasetImportJob
forall x.
DescribeDatasetImportJob -> Rep DescribeDatasetImportJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeDatasetImportJob x -> DescribeDatasetImportJob
$cfrom :: forall x.
DescribeDatasetImportJob -> Rep DescribeDatasetImportJob x
Prelude.Generic)

-- |
-- Create a value of 'DescribeDatasetImportJob' 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:
--
-- 'datasetImportJobArn', 'describeDatasetImportJob_datasetImportJobArn' - The Amazon Resource Name (ARN) of the dataset import job.
newDescribeDatasetImportJob ::
  -- | 'datasetImportJobArn'
  Prelude.Text ->
  DescribeDatasetImportJob
newDescribeDatasetImportJob :: Text -> DescribeDatasetImportJob
newDescribeDatasetImportJob Text
pDatasetImportJobArn_ =
  DescribeDatasetImportJob' :: Text -> DescribeDatasetImportJob
DescribeDatasetImportJob'
    { $sel:datasetImportJobArn:DescribeDatasetImportJob' :: Text
datasetImportJobArn =
        Text
pDatasetImportJobArn_
    }

-- | The Amazon Resource Name (ARN) of the dataset import job.
describeDatasetImportJob_datasetImportJobArn :: Lens.Lens' DescribeDatasetImportJob Prelude.Text
describeDatasetImportJob_datasetImportJobArn :: (Text -> f Text)
-> DescribeDatasetImportJob -> f DescribeDatasetImportJob
describeDatasetImportJob_datasetImportJobArn = (DescribeDatasetImportJob -> Text)
-> (DescribeDatasetImportJob -> Text -> DescribeDatasetImportJob)
-> Lens DescribeDatasetImportJob DescribeDatasetImportJob Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDatasetImportJob' {Text
datasetImportJobArn :: Text
$sel:datasetImportJobArn:DescribeDatasetImportJob' :: DescribeDatasetImportJob -> Text
datasetImportJobArn} -> Text
datasetImportJobArn) (\s :: DescribeDatasetImportJob
s@DescribeDatasetImportJob' {} Text
a -> DescribeDatasetImportJob
s {$sel:datasetImportJobArn:DescribeDatasetImportJob' :: Text
datasetImportJobArn = Text
a} :: DescribeDatasetImportJob)

instance Core.AWSRequest DescribeDatasetImportJob where
  type
    AWSResponse DescribeDatasetImportJob =
      DescribeDatasetImportJobResponse
  request :: DescribeDatasetImportJob -> Request DescribeDatasetImportJob
request = Service
-> DescribeDatasetImportJob -> Request DescribeDatasetImportJob
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeDatasetImportJob
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeDatasetImportJob)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeDatasetImportJob))
-> Logger
-> Service
-> Proxy DescribeDatasetImportJob
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeDatasetImportJob)))
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 POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Double
-> Maybe Integer
-> Maybe (HashMap Text Statistics)
-> Maybe DataSource
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Int
-> DescribeDatasetImportJobResponse
DescribeDatasetImportJobResponse'
            (Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Double
 -> Maybe Integer
 -> Maybe (HashMap Text Statistics)
 -> Maybe DataSource
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Int
 -> DescribeDatasetImportJobResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Double
      -> Maybe Integer
      -> Maybe (HashMap Text Statistics)
      -> Maybe DataSource
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Int
      -> DescribeDatasetImportJobResponse)
forall (f :: * -> *) a b. Functor 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
"CreationTime")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Double
   -> Maybe Integer
   -> Maybe (HashMap Text Statistics)
   -> Maybe DataSource
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Int
   -> DescribeDatasetImportJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Double
      -> Maybe Integer
      -> Maybe (HashMap Text Statistics)
      -> Maybe DataSource
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Int
      -> DescribeDatasetImportJobResponse)
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
"Status")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Double
   -> Maybe Integer
   -> Maybe (HashMap Text Statistics)
   -> Maybe DataSource
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Int
   -> DescribeDatasetImportJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Double
      -> Maybe Integer
      -> Maybe (HashMap Text Statistics)
      -> Maybe DataSource
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Int
      -> DescribeDatasetImportJobResponse)
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
"DatasetImportJobName")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Double
   -> Maybe Integer
   -> Maybe (HashMap Text Statistics)
   -> Maybe DataSource
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Int
   -> DescribeDatasetImportJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Double
      -> Maybe Integer
      -> Maybe (HashMap Text Statistics)
      -> Maybe DataSource
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Int
      -> DescribeDatasetImportJobResponse)
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
"DatasetArn")
            Either
  String
  (Maybe Text
   -> Maybe Double
   -> Maybe Integer
   -> Maybe (HashMap Text Statistics)
   -> Maybe DataSource
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Int
   -> DescribeDatasetImportJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Double
      -> Maybe Integer
      -> Maybe (HashMap Text Statistics)
      -> Maybe DataSource
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Int
      -> DescribeDatasetImportJobResponse)
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
"TimestampFormat")
            Either
  String
  (Maybe Double
   -> Maybe Integer
   -> Maybe (HashMap Text Statistics)
   -> Maybe DataSource
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Int
   -> DescribeDatasetImportJobResponse)
-> Either String (Maybe Double)
-> Either
     String
     (Maybe Integer
      -> Maybe (HashMap Text Statistics)
      -> Maybe DataSource
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Int
      -> DescribeDatasetImportJobResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Double)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"DataSize")
            Either
  String
  (Maybe Integer
   -> Maybe (HashMap Text Statistics)
   -> Maybe DataSource
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Int
   -> DescribeDatasetImportJobResponse)
-> Either String (Maybe Integer)
-> Either
     String
     (Maybe (HashMap Text Statistics)
      -> Maybe DataSource
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Int
      -> DescribeDatasetImportJobResponse)
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
"EstimatedTimeRemainingInMinutes")
            Either
  String
  (Maybe (HashMap Text Statistics)
   -> Maybe DataSource
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Int
   -> DescribeDatasetImportJobResponse)
-> Either String (Maybe (HashMap Text Statistics))
-> Either
     String
     (Maybe DataSource
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Int
      -> DescribeDatasetImportJobResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Either String (Maybe (Maybe (HashMap Text Statistics)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"FieldStatistics"
                            Either String (Maybe (Maybe (HashMap Text Statistics)))
-> Maybe (HashMap Text Statistics)
-> Either String (Maybe (HashMap Text Statistics))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text Statistics)
forall a. Monoid a => a
Prelude.mempty
                        )
            Either
  String
  (Maybe DataSource
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Int
   -> DescribeDatasetImportJobResponse)
-> Either String (Maybe DataSource)
-> Either
     String
     (Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Int
      -> DescribeDatasetImportJobResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe DataSource)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"DataSource")
            Either
  String
  (Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Int
   -> DescribeDatasetImportJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Int
      -> DescribeDatasetImportJobResponse)
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
"DatasetImportJobArn")
            Either
  String
  (Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Int
   -> DescribeDatasetImportJobResponse)
-> Either String (Maybe Bool)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Int
      -> DescribeDatasetImportJobResponse)
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
"UseGeolocationForTimeZone")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Int
   -> DescribeDatasetImportJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Int
      -> DescribeDatasetImportJobResponse)
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 Text
   -> Maybe Text
   -> Maybe POSIX
   -> Int
   -> DescribeDatasetImportJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe POSIX -> Int -> DescribeDatasetImportJobResponse)
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
"GeolocationFormat")
            Either
  String
  (Maybe Text
   -> Maybe POSIX -> Int -> DescribeDatasetImportJobResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe POSIX -> Int -> DescribeDatasetImportJobResponse)
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
"TimeZone")
            Either
  String (Maybe POSIX -> Int -> DescribeDatasetImportJobResponse)
-> Either String (Maybe POSIX)
-> Either String (Int -> DescribeDatasetImportJobResponse)
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
"LastModificationTime")
            Either String (Int -> DescribeDatasetImportJobResponse)
-> Either String Int
-> Either String DescribeDatasetImportJobResponse
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 DescribeDatasetImportJob

instance Prelude.NFData DescribeDatasetImportJob

instance Core.ToHeaders DescribeDatasetImportJob where
  toHeaders :: DescribeDatasetImportJob -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeDatasetImportJob -> 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
"AmazonForecast.DescribeDatasetImportJob" ::
                          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 DescribeDatasetImportJob where
  toJSON :: DescribeDatasetImportJob -> Value
toJSON DescribeDatasetImportJob' {Text
datasetImportJobArn :: Text
$sel:datasetImportJobArn:DescribeDatasetImportJob' :: DescribeDatasetImportJob -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"DatasetImportJobArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
datasetImportJobArn)
          ]
      )

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

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

-- | /See:/ 'newDescribeDatasetImportJobResponse' smart constructor.
data DescribeDatasetImportJobResponse = DescribeDatasetImportJobResponse'
  { -- | When the dataset import job was created.
    DescribeDatasetImportJobResponse -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
    -- | The status of the dataset import job. States include:
    --
    -- -   @ACTIVE@
    --
    -- -   @CREATE_PENDING@, @CREATE_IN_PROGRESS@, @CREATE_FAILED@
    --
    -- -   @DELETE_PENDING@, @DELETE_IN_PROGRESS@, @DELETE_FAILED@
    --
    -- -   @CREATE_STOPPING@, @CREATE_STOPPED@
    DescribeDatasetImportJobResponse -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
    -- | The name of the dataset import job.
    DescribeDatasetImportJobResponse -> Maybe Text
datasetImportJobName :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the dataset that the training data was
    -- imported to.
    DescribeDatasetImportJobResponse -> Maybe Text
datasetArn :: Prelude.Maybe Prelude.Text,
    -- | The format of timestamps in the dataset. The format that you specify
    -- depends on the @DataFrequency@ specified when the dataset was created.
    -- The following formats are supported
    --
    -- -   \"yyyy-MM-dd\"
    --
    --     For the following data frequencies: Y, M, W, and D
    --
    -- -   \"yyyy-MM-dd HH:mm:ss\"
    --
    --     For the following data frequencies: H, 30min, 15min, and 1min; and
    --     optionally, for: Y, M, W, and D
    DescribeDatasetImportJobResponse -> Maybe Text
timestampFormat :: Prelude.Maybe Prelude.Text,
    -- | The size of the dataset in gigabytes (GB) after the import job has
    -- finished.
    DescribeDatasetImportJobResponse -> Maybe Double
dataSize :: Prelude.Maybe Prelude.Double,
    -- | The estimated time remaining in minutes for the dataset import job to
    -- complete.
    DescribeDatasetImportJobResponse -> Maybe Integer
estimatedTimeRemainingInMinutes :: Prelude.Maybe Prelude.Integer,
    -- | Statistical information about each field in the input data.
    DescribeDatasetImportJobResponse -> Maybe (HashMap Text Statistics)
fieldStatistics :: Prelude.Maybe (Prelude.HashMap Prelude.Text Statistics),
    -- | The location of the training data to import and an AWS Identity and
    -- Access Management (IAM) role that Amazon Forecast can assume to access
    -- the data.
    --
    -- If encryption is used, @DataSource@ includes an AWS Key Management
    -- Service (KMS) key.
    DescribeDatasetImportJobResponse -> Maybe DataSource
dataSource :: Prelude.Maybe DataSource,
    -- | The ARN of the dataset import job.
    DescribeDatasetImportJobResponse -> Maybe Text
datasetImportJobArn :: Prelude.Maybe Prelude.Text,
    -- | Whether @TimeZone@ is automatically derived from the geolocation
    -- attribute.
    DescribeDatasetImportJobResponse -> Maybe Bool
useGeolocationForTimeZone :: Prelude.Maybe Prelude.Bool,
    -- | If an error occurred, an informational message about the error.
    DescribeDatasetImportJobResponse -> Maybe Text
message :: Prelude.Maybe Prelude.Text,
    -- | The format of the geolocation attribute. Valid Values:@\"LAT_LONG\"@ and
    -- @\"CC_POSTALCODE\"@.
    DescribeDatasetImportJobResponse -> Maybe Text
geolocationFormat :: Prelude.Maybe Prelude.Text,
    -- | The single time zone applied to every item in the dataset
    DescribeDatasetImportJobResponse -> Maybe Text
timeZone :: Prelude.Maybe Prelude.Text,
    -- | The last time the resource was modified. The timestamp depends on the
    -- status of the job:
    --
    -- -   @CREATE_PENDING@ - The @CreationTime@.
    --
    -- -   @CREATE_IN_PROGRESS@ - The current timestamp.
    --
    -- -   @CREATE_STOPPING@ - The current timestamp.
    --
    -- -   @CREATE_STOPPED@ - When the job stopped.
    --
    -- -   @ACTIVE@ or @CREATE_FAILED@ - When the job finished or failed.
    DescribeDatasetImportJobResponse -> Maybe POSIX
lastModificationTime :: Prelude.Maybe Core.POSIX,
    -- | The response's http status code.
    DescribeDatasetImportJobResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeDatasetImportJobResponse
-> DescribeDatasetImportJobResponse -> Bool
(DescribeDatasetImportJobResponse
 -> DescribeDatasetImportJobResponse -> Bool)
-> (DescribeDatasetImportJobResponse
    -> DescribeDatasetImportJobResponse -> Bool)
-> Eq DescribeDatasetImportJobResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeDatasetImportJobResponse
-> DescribeDatasetImportJobResponse -> Bool
$c/= :: DescribeDatasetImportJobResponse
-> DescribeDatasetImportJobResponse -> Bool
== :: DescribeDatasetImportJobResponse
-> DescribeDatasetImportJobResponse -> Bool
$c== :: DescribeDatasetImportJobResponse
-> DescribeDatasetImportJobResponse -> Bool
Prelude.Eq, ReadPrec [DescribeDatasetImportJobResponse]
ReadPrec DescribeDatasetImportJobResponse
Int -> ReadS DescribeDatasetImportJobResponse
ReadS [DescribeDatasetImportJobResponse]
(Int -> ReadS DescribeDatasetImportJobResponse)
-> ReadS [DescribeDatasetImportJobResponse]
-> ReadPrec DescribeDatasetImportJobResponse
-> ReadPrec [DescribeDatasetImportJobResponse]
-> Read DescribeDatasetImportJobResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeDatasetImportJobResponse]
$creadListPrec :: ReadPrec [DescribeDatasetImportJobResponse]
readPrec :: ReadPrec DescribeDatasetImportJobResponse
$creadPrec :: ReadPrec DescribeDatasetImportJobResponse
readList :: ReadS [DescribeDatasetImportJobResponse]
$creadList :: ReadS [DescribeDatasetImportJobResponse]
readsPrec :: Int -> ReadS DescribeDatasetImportJobResponse
$creadsPrec :: Int -> ReadS DescribeDatasetImportJobResponse
Prelude.Read, Int -> DescribeDatasetImportJobResponse -> ShowS
[DescribeDatasetImportJobResponse] -> ShowS
DescribeDatasetImportJobResponse -> String
(Int -> DescribeDatasetImportJobResponse -> ShowS)
-> (DescribeDatasetImportJobResponse -> String)
-> ([DescribeDatasetImportJobResponse] -> ShowS)
-> Show DescribeDatasetImportJobResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeDatasetImportJobResponse] -> ShowS
$cshowList :: [DescribeDatasetImportJobResponse] -> ShowS
show :: DescribeDatasetImportJobResponse -> String
$cshow :: DescribeDatasetImportJobResponse -> String
showsPrec :: Int -> DescribeDatasetImportJobResponse -> ShowS
$cshowsPrec :: Int -> DescribeDatasetImportJobResponse -> ShowS
Prelude.Show, (forall x.
 DescribeDatasetImportJobResponse
 -> Rep DescribeDatasetImportJobResponse x)
-> (forall x.
    Rep DescribeDatasetImportJobResponse x
    -> DescribeDatasetImportJobResponse)
-> Generic DescribeDatasetImportJobResponse
forall x.
Rep DescribeDatasetImportJobResponse x
-> DescribeDatasetImportJobResponse
forall x.
DescribeDatasetImportJobResponse
-> Rep DescribeDatasetImportJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeDatasetImportJobResponse x
-> DescribeDatasetImportJobResponse
$cfrom :: forall x.
DescribeDatasetImportJobResponse
-> Rep DescribeDatasetImportJobResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeDatasetImportJobResponse' 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:
--
-- 'creationTime', 'describeDatasetImportJobResponse_creationTime' - When the dataset import job was created.
--
-- 'status', 'describeDatasetImportJobResponse_status' - The status of the dataset import job. States include:
--
-- -   @ACTIVE@
--
-- -   @CREATE_PENDING@, @CREATE_IN_PROGRESS@, @CREATE_FAILED@
--
-- -   @DELETE_PENDING@, @DELETE_IN_PROGRESS@, @DELETE_FAILED@
--
-- -   @CREATE_STOPPING@, @CREATE_STOPPED@
--
-- 'datasetImportJobName', 'describeDatasetImportJobResponse_datasetImportJobName' - The name of the dataset import job.
--
-- 'datasetArn', 'describeDatasetImportJobResponse_datasetArn' - The Amazon Resource Name (ARN) of the dataset that the training data was
-- imported to.
--
-- 'timestampFormat', 'describeDatasetImportJobResponse_timestampFormat' - The format of timestamps in the dataset. The format that you specify
-- depends on the @DataFrequency@ specified when the dataset was created.
-- The following formats are supported
--
-- -   \"yyyy-MM-dd\"
--
--     For the following data frequencies: Y, M, W, and D
--
-- -   \"yyyy-MM-dd HH:mm:ss\"
--
--     For the following data frequencies: H, 30min, 15min, and 1min; and
--     optionally, for: Y, M, W, and D
--
-- 'dataSize', 'describeDatasetImportJobResponse_dataSize' - The size of the dataset in gigabytes (GB) after the import job has
-- finished.
--
-- 'estimatedTimeRemainingInMinutes', 'describeDatasetImportJobResponse_estimatedTimeRemainingInMinutes' - The estimated time remaining in minutes for the dataset import job to
-- complete.
--
-- 'fieldStatistics', 'describeDatasetImportJobResponse_fieldStatistics' - Statistical information about each field in the input data.
--
-- 'dataSource', 'describeDatasetImportJobResponse_dataSource' - The location of the training data to import and an AWS Identity and
-- Access Management (IAM) role that Amazon Forecast can assume to access
-- the data.
--
-- If encryption is used, @DataSource@ includes an AWS Key Management
-- Service (KMS) key.
--
-- 'datasetImportJobArn', 'describeDatasetImportJobResponse_datasetImportJobArn' - The ARN of the dataset import job.
--
-- 'useGeolocationForTimeZone', 'describeDatasetImportJobResponse_useGeolocationForTimeZone' - Whether @TimeZone@ is automatically derived from the geolocation
-- attribute.
--
-- 'message', 'describeDatasetImportJobResponse_message' - If an error occurred, an informational message about the error.
--
-- 'geolocationFormat', 'describeDatasetImportJobResponse_geolocationFormat' - The format of the geolocation attribute. Valid Values:@\"LAT_LONG\"@ and
-- @\"CC_POSTALCODE\"@.
--
-- 'timeZone', 'describeDatasetImportJobResponse_timeZone' - The single time zone applied to every item in the dataset
--
-- 'lastModificationTime', 'describeDatasetImportJobResponse_lastModificationTime' - The last time the resource was modified. The timestamp depends on the
-- status of the job:
--
-- -   @CREATE_PENDING@ - The @CreationTime@.
--
-- -   @CREATE_IN_PROGRESS@ - The current timestamp.
--
-- -   @CREATE_STOPPING@ - The current timestamp.
--
-- -   @CREATE_STOPPED@ - When the job stopped.
--
-- -   @ACTIVE@ or @CREATE_FAILED@ - When the job finished or failed.
--
-- 'httpStatus', 'describeDatasetImportJobResponse_httpStatus' - The response's http status code.
newDescribeDatasetImportJobResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeDatasetImportJobResponse
newDescribeDatasetImportJobResponse :: Int -> DescribeDatasetImportJobResponse
newDescribeDatasetImportJobResponse Int
pHttpStatus_ =
  DescribeDatasetImportJobResponse' :: Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Double
-> Maybe Integer
-> Maybe (HashMap Text Statistics)
-> Maybe DataSource
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Int
-> DescribeDatasetImportJobResponse
DescribeDatasetImportJobResponse'
    { $sel:creationTime:DescribeDatasetImportJobResponse' :: Maybe POSIX
creationTime =
        Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:status:DescribeDatasetImportJobResponse' :: Maybe Text
status = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:datasetImportJobName:DescribeDatasetImportJobResponse' :: Maybe Text
datasetImportJobName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:datasetArn:DescribeDatasetImportJobResponse' :: Maybe Text
datasetArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:timestampFormat:DescribeDatasetImportJobResponse' :: Maybe Text
timestampFormat = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:dataSize:DescribeDatasetImportJobResponse' :: Maybe Double
dataSize = Maybe Double
forall a. Maybe a
Prelude.Nothing,
      $sel:estimatedTimeRemainingInMinutes:DescribeDatasetImportJobResponse' :: Maybe Integer
estimatedTimeRemainingInMinutes =
        Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:fieldStatistics:DescribeDatasetImportJobResponse' :: Maybe (HashMap Text Statistics)
fieldStatistics = Maybe (HashMap Text Statistics)
forall a. Maybe a
Prelude.Nothing,
      $sel:dataSource:DescribeDatasetImportJobResponse' :: Maybe DataSource
dataSource = Maybe DataSource
forall a. Maybe a
Prelude.Nothing,
      $sel:datasetImportJobArn:DescribeDatasetImportJobResponse' :: Maybe Text
datasetImportJobArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:useGeolocationForTimeZone:DescribeDatasetImportJobResponse' :: Maybe Bool
useGeolocationForTimeZone =
        Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:message:DescribeDatasetImportJobResponse' :: Maybe Text
message = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:geolocationFormat:DescribeDatasetImportJobResponse' :: Maybe Text
geolocationFormat = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:timeZone:DescribeDatasetImportJobResponse' :: Maybe Text
timeZone = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModificationTime:DescribeDatasetImportJobResponse' :: Maybe POSIX
lastModificationTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeDatasetImportJobResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | When the dataset import job was created.
describeDatasetImportJobResponse_creationTime :: Lens.Lens' DescribeDatasetImportJobResponse (Prelude.Maybe Prelude.UTCTime)
describeDatasetImportJobResponse_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeDatasetImportJobResponse
-> f DescribeDatasetImportJobResponse
describeDatasetImportJobResponse_creationTime = (DescribeDatasetImportJobResponse -> Maybe POSIX)
-> (DescribeDatasetImportJobResponse
    -> Maybe POSIX -> DescribeDatasetImportJobResponse)
-> Lens
     DescribeDatasetImportJobResponse
     DescribeDatasetImportJobResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDatasetImportJobResponse' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:DescribeDatasetImportJobResponse' :: DescribeDatasetImportJobResponse -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: DescribeDatasetImportJobResponse
s@DescribeDatasetImportJobResponse' {} Maybe POSIX
a -> DescribeDatasetImportJobResponse
s {$sel:creationTime:DescribeDatasetImportJobResponse' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: DescribeDatasetImportJobResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeDatasetImportJobResponse
 -> f DescribeDatasetImportJobResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeDatasetImportJobResponse
-> f DescribeDatasetImportJobResponse
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 status of the dataset import job. States include:
--
-- -   @ACTIVE@
--
-- -   @CREATE_PENDING@, @CREATE_IN_PROGRESS@, @CREATE_FAILED@
--
-- -   @DELETE_PENDING@, @DELETE_IN_PROGRESS@, @DELETE_FAILED@
--
-- -   @CREATE_STOPPING@, @CREATE_STOPPED@
describeDatasetImportJobResponse_status :: Lens.Lens' DescribeDatasetImportJobResponse (Prelude.Maybe Prelude.Text)
describeDatasetImportJobResponse_status :: (Maybe Text -> f (Maybe Text))
-> DescribeDatasetImportJobResponse
-> f DescribeDatasetImportJobResponse
describeDatasetImportJobResponse_status = (DescribeDatasetImportJobResponse -> Maybe Text)
-> (DescribeDatasetImportJobResponse
    -> Maybe Text -> DescribeDatasetImportJobResponse)
-> Lens
     DescribeDatasetImportJobResponse
     DescribeDatasetImportJobResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDatasetImportJobResponse' {Maybe Text
status :: Maybe Text
$sel:status:DescribeDatasetImportJobResponse' :: DescribeDatasetImportJobResponse -> Maybe Text
status} -> Maybe Text
status) (\s :: DescribeDatasetImportJobResponse
s@DescribeDatasetImportJobResponse' {} Maybe Text
a -> DescribeDatasetImportJobResponse
s {$sel:status:DescribeDatasetImportJobResponse' :: Maybe Text
status = Maybe Text
a} :: DescribeDatasetImportJobResponse)

-- | The name of the dataset import job.
describeDatasetImportJobResponse_datasetImportJobName :: Lens.Lens' DescribeDatasetImportJobResponse (Prelude.Maybe Prelude.Text)
describeDatasetImportJobResponse_datasetImportJobName :: (Maybe Text -> f (Maybe Text))
-> DescribeDatasetImportJobResponse
-> f DescribeDatasetImportJobResponse
describeDatasetImportJobResponse_datasetImportJobName = (DescribeDatasetImportJobResponse -> Maybe Text)
-> (DescribeDatasetImportJobResponse
    -> Maybe Text -> DescribeDatasetImportJobResponse)
-> Lens
     DescribeDatasetImportJobResponse
     DescribeDatasetImportJobResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDatasetImportJobResponse' {Maybe Text
datasetImportJobName :: Maybe Text
$sel:datasetImportJobName:DescribeDatasetImportJobResponse' :: DescribeDatasetImportJobResponse -> Maybe Text
datasetImportJobName} -> Maybe Text
datasetImportJobName) (\s :: DescribeDatasetImportJobResponse
s@DescribeDatasetImportJobResponse' {} Maybe Text
a -> DescribeDatasetImportJobResponse
s {$sel:datasetImportJobName:DescribeDatasetImportJobResponse' :: Maybe Text
datasetImportJobName = Maybe Text
a} :: DescribeDatasetImportJobResponse)

-- | The Amazon Resource Name (ARN) of the dataset that the training data was
-- imported to.
describeDatasetImportJobResponse_datasetArn :: Lens.Lens' DescribeDatasetImportJobResponse (Prelude.Maybe Prelude.Text)
describeDatasetImportJobResponse_datasetArn :: (Maybe Text -> f (Maybe Text))
-> DescribeDatasetImportJobResponse
-> f DescribeDatasetImportJobResponse
describeDatasetImportJobResponse_datasetArn = (DescribeDatasetImportJobResponse -> Maybe Text)
-> (DescribeDatasetImportJobResponse
    -> Maybe Text -> DescribeDatasetImportJobResponse)
-> Lens
     DescribeDatasetImportJobResponse
     DescribeDatasetImportJobResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDatasetImportJobResponse' {Maybe Text
datasetArn :: Maybe Text
$sel:datasetArn:DescribeDatasetImportJobResponse' :: DescribeDatasetImportJobResponse -> Maybe Text
datasetArn} -> Maybe Text
datasetArn) (\s :: DescribeDatasetImportJobResponse
s@DescribeDatasetImportJobResponse' {} Maybe Text
a -> DescribeDatasetImportJobResponse
s {$sel:datasetArn:DescribeDatasetImportJobResponse' :: Maybe Text
datasetArn = Maybe Text
a} :: DescribeDatasetImportJobResponse)

-- | The format of timestamps in the dataset. The format that you specify
-- depends on the @DataFrequency@ specified when the dataset was created.
-- The following formats are supported
--
-- -   \"yyyy-MM-dd\"
--
--     For the following data frequencies: Y, M, W, and D
--
-- -   \"yyyy-MM-dd HH:mm:ss\"
--
--     For the following data frequencies: H, 30min, 15min, and 1min; and
--     optionally, for: Y, M, W, and D
describeDatasetImportJobResponse_timestampFormat :: Lens.Lens' DescribeDatasetImportJobResponse (Prelude.Maybe Prelude.Text)
describeDatasetImportJobResponse_timestampFormat :: (Maybe Text -> f (Maybe Text))
-> DescribeDatasetImportJobResponse
-> f DescribeDatasetImportJobResponse
describeDatasetImportJobResponse_timestampFormat = (DescribeDatasetImportJobResponse -> Maybe Text)
-> (DescribeDatasetImportJobResponse
    -> Maybe Text -> DescribeDatasetImportJobResponse)
-> Lens
     DescribeDatasetImportJobResponse
     DescribeDatasetImportJobResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDatasetImportJobResponse' {Maybe Text
timestampFormat :: Maybe Text
$sel:timestampFormat:DescribeDatasetImportJobResponse' :: DescribeDatasetImportJobResponse -> Maybe Text
timestampFormat} -> Maybe Text
timestampFormat) (\s :: DescribeDatasetImportJobResponse
s@DescribeDatasetImportJobResponse' {} Maybe Text
a -> DescribeDatasetImportJobResponse
s {$sel:timestampFormat:DescribeDatasetImportJobResponse' :: Maybe Text
timestampFormat = Maybe Text
a} :: DescribeDatasetImportJobResponse)

-- | The size of the dataset in gigabytes (GB) after the import job has
-- finished.
describeDatasetImportJobResponse_dataSize :: Lens.Lens' DescribeDatasetImportJobResponse (Prelude.Maybe Prelude.Double)
describeDatasetImportJobResponse_dataSize :: (Maybe Double -> f (Maybe Double))
-> DescribeDatasetImportJobResponse
-> f DescribeDatasetImportJobResponse
describeDatasetImportJobResponse_dataSize = (DescribeDatasetImportJobResponse -> Maybe Double)
-> (DescribeDatasetImportJobResponse
    -> Maybe Double -> DescribeDatasetImportJobResponse)
-> Lens
     DescribeDatasetImportJobResponse
     DescribeDatasetImportJobResponse
     (Maybe Double)
     (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDatasetImportJobResponse' {Maybe Double
dataSize :: Maybe Double
$sel:dataSize:DescribeDatasetImportJobResponse' :: DescribeDatasetImportJobResponse -> Maybe Double
dataSize} -> Maybe Double
dataSize) (\s :: DescribeDatasetImportJobResponse
s@DescribeDatasetImportJobResponse' {} Maybe Double
a -> DescribeDatasetImportJobResponse
s {$sel:dataSize:DescribeDatasetImportJobResponse' :: Maybe Double
dataSize = Maybe Double
a} :: DescribeDatasetImportJobResponse)

-- | The estimated time remaining in minutes for the dataset import job to
-- complete.
describeDatasetImportJobResponse_estimatedTimeRemainingInMinutes :: Lens.Lens' DescribeDatasetImportJobResponse (Prelude.Maybe Prelude.Integer)
describeDatasetImportJobResponse_estimatedTimeRemainingInMinutes :: (Maybe Integer -> f (Maybe Integer))
-> DescribeDatasetImportJobResponse
-> f DescribeDatasetImportJobResponse
describeDatasetImportJobResponse_estimatedTimeRemainingInMinutes = (DescribeDatasetImportJobResponse -> Maybe Integer)
-> (DescribeDatasetImportJobResponse
    -> Maybe Integer -> DescribeDatasetImportJobResponse)
-> Lens
     DescribeDatasetImportJobResponse
     DescribeDatasetImportJobResponse
     (Maybe Integer)
     (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDatasetImportJobResponse' {Maybe Integer
estimatedTimeRemainingInMinutes :: Maybe Integer
$sel:estimatedTimeRemainingInMinutes:DescribeDatasetImportJobResponse' :: DescribeDatasetImportJobResponse -> Maybe Integer
estimatedTimeRemainingInMinutes} -> Maybe Integer
estimatedTimeRemainingInMinutes) (\s :: DescribeDatasetImportJobResponse
s@DescribeDatasetImportJobResponse' {} Maybe Integer
a -> DescribeDatasetImportJobResponse
s {$sel:estimatedTimeRemainingInMinutes:DescribeDatasetImportJobResponse' :: Maybe Integer
estimatedTimeRemainingInMinutes = Maybe Integer
a} :: DescribeDatasetImportJobResponse)

-- | Statistical information about each field in the input data.
describeDatasetImportJobResponse_fieldStatistics :: Lens.Lens' DescribeDatasetImportJobResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Statistics))
describeDatasetImportJobResponse_fieldStatistics :: (Maybe (HashMap Text Statistics)
 -> f (Maybe (HashMap Text Statistics)))
-> DescribeDatasetImportJobResponse
-> f DescribeDatasetImportJobResponse
describeDatasetImportJobResponse_fieldStatistics = (DescribeDatasetImportJobResponse
 -> Maybe (HashMap Text Statistics))
-> (DescribeDatasetImportJobResponse
    -> Maybe (HashMap Text Statistics)
    -> DescribeDatasetImportJobResponse)
-> Lens
     DescribeDatasetImportJobResponse
     DescribeDatasetImportJobResponse
     (Maybe (HashMap Text Statistics))
     (Maybe (HashMap Text Statistics))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDatasetImportJobResponse' {Maybe (HashMap Text Statistics)
fieldStatistics :: Maybe (HashMap Text Statistics)
$sel:fieldStatistics:DescribeDatasetImportJobResponse' :: DescribeDatasetImportJobResponse -> Maybe (HashMap Text Statistics)
fieldStatistics} -> Maybe (HashMap Text Statistics)
fieldStatistics) (\s :: DescribeDatasetImportJobResponse
s@DescribeDatasetImportJobResponse' {} Maybe (HashMap Text Statistics)
a -> DescribeDatasetImportJobResponse
s {$sel:fieldStatistics:DescribeDatasetImportJobResponse' :: Maybe (HashMap Text Statistics)
fieldStatistics = Maybe (HashMap Text Statistics)
a} :: DescribeDatasetImportJobResponse) ((Maybe (HashMap Text Statistics)
  -> f (Maybe (HashMap Text Statistics)))
 -> DescribeDatasetImportJobResponse
 -> f DescribeDatasetImportJobResponse)
-> ((Maybe (HashMap Text Statistics)
     -> f (Maybe (HashMap Text Statistics)))
    -> Maybe (HashMap Text Statistics)
    -> f (Maybe (HashMap Text Statistics)))
-> (Maybe (HashMap Text Statistics)
    -> f (Maybe (HashMap Text Statistics)))
-> DescribeDatasetImportJobResponse
-> f DescribeDatasetImportJobResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Statistics)
  (HashMap Text Statistics)
  (HashMap Text Statistics)
  (HashMap Text Statistics)
-> Iso
     (Maybe (HashMap Text Statistics))
     (Maybe (HashMap Text Statistics))
     (Maybe (HashMap Text Statistics))
     (Maybe (HashMap Text Statistics))
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
  (HashMap Text Statistics)
  (HashMap Text Statistics)
  (HashMap Text Statistics)
  (HashMap Text Statistics)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The location of the training data to import and an AWS Identity and
-- Access Management (IAM) role that Amazon Forecast can assume to access
-- the data.
--
-- If encryption is used, @DataSource@ includes an AWS Key Management
-- Service (KMS) key.
describeDatasetImportJobResponse_dataSource :: Lens.Lens' DescribeDatasetImportJobResponse (Prelude.Maybe DataSource)
describeDatasetImportJobResponse_dataSource :: (Maybe DataSource -> f (Maybe DataSource))
-> DescribeDatasetImportJobResponse
-> f DescribeDatasetImportJobResponse
describeDatasetImportJobResponse_dataSource = (DescribeDatasetImportJobResponse -> Maybe DataSource)
-> (DescribeDatasetImportJobResponse
    -> Maybe DataSource -> DescribeDatasetImportJobResponse)
-> Lens
     DescribeDatasetImportJobResponse
     DescribeDatasetImportJobResponse
     (Maybe DataSource)
     (Maybe DataSource)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDatasetImportJobResponse' {Maybe DataSource
dataSource :: Maybe DataSource
$sel:dataSource:DescribeDatasetImportJobResponse' :: DescribeDatasetImportJobResponse -> Maybe DataSource
dataSource} -> Maybe DataSource
dataSource) (\s :: DescribeDatasetImportJobResponse
s@DescribeDatasetImportJobResponse' {} Maybe DataSource
a -> DescribeDatasetImportJobResponse
s {$sel:dataSource:DescribeDatasetImportJobResponse' :: Maybe DataSource
dataSource = Maybe DataSource
a} :: DescribeDatasetImportJobResponse)

-- | The ARN of the dataset import job.
describeDatasetImportJobResponse_datasetImportJobArn :: Lens.Lens' DescribeDatasetImportJobResponse (Prelude.Maybe Prelude.Text)
describeDatasetImportJobResponse_datasetImportJobArn :: (Maybe Text -> f (Maybe Text))
-> DescribeDatasetImportJobResponse
-> f DescribeDatasetImportJobResponse
describeDatasetImportJobResponse_datasetImportJobArn = (DescribeDatasetImportJobResponse -> Maybe Text)
-> (DescribeDatasetImportJobResponse
    -> Maybe Text -> DescribeDatasetImportJobResponse)
-> Lens
     DescribeDatasetImportJobResponse
     DescribeDatasetImportJobResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDatasetImportJobResponse' {Maybe Text
datasetImportJobArn :: Maybe Text
$sel:datasetImportJobArn:DescribeDatasetImportJobResponse' :: DescribeDatasetImportJobResponse -> Maybe Text
datasetImportJobArn} -> Maybe Text
datasetImportJobArn) (\s :: DescribeDatasetImportJobResponse
s@DescribeDatasetImportJobResponse' {} Maybe Text
a -> DescribeDatasetImportJobResponse
s {$sel:datasetImportJobArn:DescribeDatasetImportJobResponse' :: Maybe Text
datasetImportJobArn = Maybe Text
a} :: DescribeDatasetImportJobResponse)

-- | Whether @TimeZone@ is automatically derived from the geolocation
-- attribute.
describeDatasetImportJobResponse_useGeolocationForTimeZone :: Lens.Lens' DescribeDatasetImportJobResponse (Prelude.Maybe Prelude.Bool)
describeDatasetImportJobResponse_useGeolocationForTimeZone :: (Maybe Bool -> f (Maybe Bool))
-> DescribeDatasetImportJobResponse
-> f DescribeDatasetImportJobResponse
describeDatasetImportJobResponse_useGeolocationForTimeZone = (DescribeDatasetImportJobResponse -> Maybe Bool)
-> (DescribeDatasetImportJobResponse
    -> Maybe Bool -> DescribeDatasetImportJobResponse)
-> Lens
     DescribeDatasetImportJobResponse
     DescribeDatasetImportJobResponse
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDatasetImportJobResponse' {Maybe Bool
useGeolocationForTimeZone :: Maybe Bool
$sel:useGeolocationForTimeZone:DescribeDatasetImportJobResponse' :: DescribeDatasetImportJobResponse -> Maybe Bool
useGeolocationForTimeZone} -> Maybe Bool
useGeolocationForTimeZone) (\s :: DescribeDatasetImportJobResponse
s@DescribeDatasetImportJobResponse' {} Maybe Bool
a -> DescribeDatasetImportJobResponse
s {$sel:useGeolocationForTimeZone:DescribeDatasetImportJobResponse' :: Maybe Bool
useGeolocationForTimeZone = Maybe Bool
a} :: DescribeDatasetImportJobResponse)

-- | If an error occurred, an informational message about the error.
describeDatasetImportJobResponse_message :: Lens.Lens' DescribeDatasetImportJobResponse (Prelude.Maybe Prelude.Text)
describeDatasetImportJobResponse_message :: (Maybe Text -> f (Maybe Text))
-> DescribeDatasetImportJobResponse
-> f DescribeDatasetImportJobResponse
describeDatasetImportJobResponse_message = (DescribeDatasetImportJobResponse -> Maybe Text)
-> (DescribeDatasetImportJobResponse
    -> Maybe Text -> DescribeDatasetImportJobResponse)
-> Lens
     DescribeDatasetImportJobResponse
     DescribeDatasetImportJobResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDatasetImportJobResponse' {Maybe Text
message :: Maybe Text
$sel:message:DescribeDatasetImportJobResponse' :: DescribeDatasetImportJobResponse -> Maybe Text
message} -> Maybe Text
message) (\s :: DescribeDatasetImportJobResponse
s@DescribeDatasetImportJobResponse' {} Maybe Text
a -> DescribeDatasetImportJobResponse
s {$sel:message:DescribeDatasetImportJobResponse' :: Maybe Text
message = Maybe Text
a} :: DescribeDatasetImportJobResponse)

-- | The format of the geolocation attribute. Valid Values:@\"LAT_LONG\"@ and
-- @\"CC_POSTALCODE\"@.
describeDatasetImportJobResponse_geolocationFormat :: Lens.Lens' DescribeDatasetImportJobResponse (Prelude.Maybe Prelude.Text)
describeDatasetImportJobResponse_geolocationFormat :: (Maybe Text -> f (Maybe Text))
-> DescribeDatasetImportJobResponse
-> f DescribeDatasetImportJobResponse
describeDatasetImportJobResponse_geolocationFormat = (DescribeDatasetImportJobResponse -> Maybe Text)
-> (DescribeDatasetImportJobResponse
    -> Maybe Text -> DescribeDatasetImportJobResponse)
-> Lens
     DescribeDatasetImportJobResponse
     DescribeDatasetImportJobResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDatasetImportJobResponse' {Maybe Text
geolocationFormat :: Maybe Text
$sel:geolocationFormat:DescribeDatasetImportJobResponse' :: DescribeDatasetImportJobResponse -> Maybe Text
geolocationFormat} -> Maybe Text
geolocationFormat) (\s :: DescribeDatasetImportJobResponse
s@DescribeDatasetImportJobResponse' {} Maybe Text
a -> DescribeDatasetImportJobResponse
s {$sel:geolocationFormat:DescribeDatasetImportJobResponse' :: Maybe Text
geolocationFormat = Maybe Text
a} :: DescribeDatasetImportJobResponse)

-- | The single time zone applied to every item in the dataset
describeDatasetImportJobResponse_timeZone :: Lens.Lens' DescribeDatasetImportJobResponse (Prelude.Maybe Prelude.Text)
describeDatasetImportJobResponse_timeZone :: (Maybe Text -> f (Maybe Text))
-> DescribeDatasetImportJobResponse
-> f DescribeDatasetImportJobResponse
describeDatasetImportJobResponse_timeZone = (DescribeDatasetImportJobResponse -> Maybe Text)
-> (DescribeDatasetImportJobResponse
    -> Maybe Text -> DescribeDatasetImportJobResponse)
-> Lens
     DescribeDatasetImportJobResponse
     DescribeDatasetImportJobResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDatasetImportJobResponse' {Maybe Text
timeZone :: Maybe Text
$sel:timeZone:DescribeDatasetImportJobResponse' :: DescribeDatasetImportJobResponse -> Maybe Text
timeZone} -> Maybe Text
timeZone) (\s :: DescribeDatasetImportJobResponse
s@DescribeDatasetImportJobResponse' {} Maybe Text
a -> DescribeDatasetImportJobResponse
s {$sel:timeZone:DescribeDatasetImportJobResponse' :: Maybe Text
timeZone = Maybe Text
a} :: DescribeDatasetImportJobResponse)

-- | The last time the resource was modified. The timestamp depends on the
-- status of the job:
--
-- -   @CREATE_PENDING@ - The @CreationTime@.
--
-- -   @CREATE_IN_PROGRESS@ - The current timestamp.
--
-- -   @CREATE_STOPPING@ - The current timestamp.
--
-- -   @CREATE_STOPPED@ - When the job stopped.
--
-- -   @ACTIVE@ or @CREATE_FAILED@ - When the job finished or failed.
describeDatasetImportJobResponse_lastModificationTime :: Lens.Lens' DescribeDatasetImportJobResponse (Prelude.Maybe Prelude.UTCTime)
describeDatasetImportJobResponse_lastModificationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeDatasetImportJobResponse
-> f DescribeDatasetImportJobResponse
describeDatasetImportJobResponse_lastModificationTime = (DescribeDatasetImportJobResponse -> Maybe POSIX)
-> (DescribeDatasetImportJobResponse
    -> Maybe POSIX -> DescribeDatasetImportJobResponse)
-> Lens
     DescribeDatasetImportJobResponse
     DescribeDatasetImportJobResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDatasetImportJobResponse' {Maybe POSIX
lastModificationTime :: Maybe POSIX
$sel:lastModificationTime:DescribeDatasetImportJobResponse' :: DescribeDatasetImportJobResponse -> Maybe POSIX
lastModificationTime} -> Maybe POSIX
lastModificationTime) (\s :: DescribeDatasetImportJobResponse
s@DescribeDatasetImportJobResponse' {} Maybe POSIX
a -> DescribeDatasetImportJobResponse
s {$sel:lastModificationTime:DescribeDatasetImportJobResponse' :: Maybe POSIX
lastModificationTime = Maybe POSIX
a} :: DescribeDatasetImportJobResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeDatasetImportJobResponse
 -> f DescribeDatasetImportJobResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeDatasetImportJobResponse
-> f DescribeDatasetImportJobResponse
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 response's http status code.
describeDatasetImportJobResponse_httpStatus :: Lens.Lens' DescribeDatasetImportJobResponse Prelude.Int
describeDatasetImportJobResponse_httpStatus :: (Int -> f Int)
-> DescribeDatasetImportJobResponse
-> f DescribeDatasetImportJobResponse
describeDatasetImportJobResponse_httpStatus = (DescribeDatasetImportJobResponse -> Int)
-> (DescribeDatasetImportJobResponse
    -> Int -> DescribeDatasetImportJobResponse)
-> Lens
     DescribeDatasetImportJobResponse
     DescribeDatasetImportJobResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDatasetImportJobResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeDatasetImportJobResponse' :: DescribeDatasetImportJobResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeDatasetImportJobResponse
s@DescribeDatasetImportJobResponse' {} Int
a -> DescribeDatasetImportJobResponse
s {$sel:httpStatus:DescribeDatasetImportJobResponse' :: Int
httpStatus = Int
a} :: DescribeDatasetImportJobResponse)

instance
  Prelude.NFData
    DescribeDatasetImportJobResponse