{-# 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.DataBrew.DescribeDataset
-- 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 the definition of a specific DataBrew dataset.
module Amazonka.DataBrew.DescribeDataset
  ( -- * Creating a Request
    DescribeDataset (..),
    newDescribeDataset,

    -- * Request Lenses
    describeDataset_name,

    -- * Destructuring the Response
    DescribeDatasetResponse (..),
    newDescribeDatasetResponse,

    -- * Response Lenses
    describeDatasetResponse_lastModifiedDate,
    describeDatasetResponse_pathOptions,
    describeDatasetResponse_createDate,
    describeDatasetResponse_formatOptions,
    describeDatasetResponse_format,
    describeDatasetResponse_createdBy,
    describeDatasetResponse_resourceArn,
    describeDatasetResponse_source,
    describeDatasetResponse_lastModifiedBy,
    describeDatasetResponse_tags,
    describeDatasetResponse_httpStatus,
    describeDatasetResponse_name,
    describeDatasetResponse_input,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.DataBrew.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:/ 'newDescribeDataset' smart constructor.
data DescribeDataset = DescribeDataset'
  { -- | The name of the dataset to be described.
    DescribeDataset -> Text
name :: Prelude.Text
  }
  deriving (DescribeDataset -> DescribeDataset -> Bool
(DescribeDataset -> DescribeDataset -> Bool)
-> (DescribeDataset -> DescribeDataset -> Bool)
-> Eq DescribeDataset
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeDataset -> DescribeDataset -> Bool
$c/= :: DescribeDataset -> DescribeDataset -> Bool
== :: DescribeDataset -> DescribeDataset -> Bool
$c== :: DescribeDataset -> DescribeDataset -> Bool
Prelude.Eq, ReadPrec [DescribeDataset]
ReadPrec DescribeDataset
Int -> ReadS DescribeDataset
ReadS [DescribeDataset]
(Int -> ReadS DescribeDataset)
-> ReadS [DescribeDataset]
-> ReadPrec DescribeDataset
-> ReadPrec [DescribeDataset]
-> Read DescribeDataset
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeDataset]
$creadListPrec :: ReadPrec [DescribeDataset]
readPrec :: ReadPrec DescribeDataset
$creadPrec :: ReadPrec DescribeDataset
readList :: ReadS [DescribeDataset]
$creadList :: ReadS [DescribeDataset]
readsPrec :: Int -> ReadS DescribeDataset
$creadsPrec :: Int -> ReadS DescribeDataset
Prelude.Read, Int -> DescribeDataset -> ShowS
[DescribeDataset] -> ShowS
DescribeDataset -> String
(Int -> DescribeDataset -> ShowS)
-> (DescribeDataset -> String)
-> ([DescribeDataset] -> ShowS)
-> Show DescribeDataset
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeDataset] -> ShowS
$cshowList :: [DescribeDataset] -> ShowS
show :: DescribeDataset -> String
$cshow :: DescribeDataset -> String
showsPrec :: Int -> DescribeDataset -> ShowS
$cshowsPrec :: Int -> DescribeDataset -> ShowS
Prelude.Show, (forall x. DescribeDataset -> Rep DescribeDataset x)
-> (forall x. Rep DescribeDataset x -> DescribeDataset)
-> Generic DescribeDataset
forall x. Rep DescribeDataset x -> DescribeDataset
forall x. DescribeDataset -> Rep DescribeDataset x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeDataset x -> DescribeDataset
$cfrom :: forall x. DescribeDataset -> Rep DescribeDataset x
Prelude.Generic)

-- |
-- Create a value of 'DescribeDataset' 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:
--
-- 'name', 'describeDataset_name' - The name of the dataset to be described.
newDescribeDataset ::
  -- | 'name'
  Prelude.Text ->
  DescribeDataset
newDescribeDataset :: Text -> DescribeDataset
newDescribeDataset Text
pName_ =
  DescribeDataset' :: Text -> DescribeDataset
DescribeDataset' {$sel:name:DescribeDataset' :: Text
name = Text
pName_}

-- | The name of the dataset to be described.
describeDataset_name :: Lens.Lens' DescribeDataset Prelude.Text
describeDataset_name :: (Text -> f Text) -> DescribeDataset -> f DescribeDataset
describeDataset_name = (DescribeDataset -> Text)
-> (DescribeDataset -> Text -> DescribeDataset)
-> Lens DescribeDataset DescribeDataset Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDataset' {Text
name :: Text
$sel:name:DescribeDataset' :: DescribeDataset -> Text
name} -> Text
name) (\s :: DescribeDataset
s@DescribeDataset' {} Text
a -> DescribeDataset
s {$sel:name:DescribeDataset' :: Text
name = Text
a} :: DescribeDataset)

instance Core.AWSRequest DescribeDataset where
  type
    AWSResponse DescribeDataset =
      DescribeDatasetResponse
  request :: DescribeDataset -> Request DescribeDataset
request = Service -> DescribeDataset -> Request DescribeDataset
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeDataset
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeDataset)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeDataset))
-> Logger
-> Service
-> Proxy DescribeDataset
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeDataset)))
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 PathOptions
-> Maybe POSIX
-> Maybe FormatOptions
-> Maybe InputFormat
-> Maybe Text
-> Maybe Text
-> Maybe Source
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> Text
-> Input
-> DescribeDatasetResponse
DescribeDatasetResponse'
            (Maybe POSIX
 -> Maybe PathOptions
 -> Maybe POSIX
 -> Maybe FormatOptions
 -> Maybe InputFormat
 -> Maybe Text
 -> Maybe Text
 -> Maybe Source
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Int
 -> Text
 -> Input
 -> DescribeDatasetResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe PathOptions
      -> Maybe POSIX
      -> Maybe FormatOptions
      -> Maybe InputFormat
      -> Maybe Text
      -> Maybe Text
      -> Maybe Source
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> Text
      -> Input
      -> DescribeDatasetResponse)
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
"LastModifiedDate")
            Either
  String
  (Maybe PathOptions
   -> Maybe POSIX
   -> Maybe FormatOptions
   -> Maybe InputFormat
   -> Maybe Text
   -> Maybe Text
   -> Maybe Source
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> Text
   -> Input
   -> DescribeDatasetResponse)
-> Either String (Maybe PathOptions)
-> Either
     String
     (Maybe POSIX
      -> Maybe FormatOptions
      -> Maybe InputFormat
      -> Maybe Text
      -> Maybe Text
      -> Maybe Source
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> Text
      -> Input
      -> DescribeDatasetResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe PathOptions)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"PathOptions")
            Either
  String
  (Maybe POSIX
   -> Maybe FormatOptions
   -> Maybe InputFormat
   -> Maybe Text
   -> Maybe Text
   -> Maybe Source
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> Text
   -> Input
   -> DescribeDatasetResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe FormatOptions
      -> Maybe InputFormat
      -> Maybe Text
      -> Maybe Text
      -> Maybe Source
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> Text
      -> Input
      -> DescribeDatasetResponse)
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
"CreateDate")
            Either
  String
  (Maybe FormatOptions
   -> Maybe InputFormat
   -> Maybe Text
   -> Maybe Text
   -> Maybe Source
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> Text
   -> Input
   -> DescribeDatasetResponse)
-> Either String (Maybe FormatOptions)
-> Either
     String
     (Maybe InputFormat
      -> Maybe Text
      -> Maybe Text
      -> Maybe Source
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> Text
      -> Input
      -> DescribeDatasetResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe FormatOptions)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"FormatOptions")
            Either
  String
  (Maybe InputFormat
   -> Maybe Text
   -> Maybe Text
   -> Maybe Source
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> Text
   -> Input
   -> DescribeDatasetResponse)
-> Either String (Maybe InputFormat)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Source
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> Text
      -> Input
      -> DescribeDatasetResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe InputFormat)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Format")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Source
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> Text
   -> Input
   -> DescribeDatasetResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Source
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> Text
      -> Input
      -> DescribeDatasetResponse)
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
"CreatedBy")
            Either
  String
  (Maybe Text
   -> Maybe Source
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> Text
   -> Input
   -> DescribeDatasetResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Source
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> Text
      -> Input
      -> DescribeDatasetResponse)
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
"ResourceArn")
            Either
  String
  (Maybe Source
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> Text
   -> Input
   -> DescribeDatasetResponse)
-> Either String (Maybe Source)
-> Either
     String
     (Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> Text
      -> Input
      -> DescribeDatasetResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Source)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Source")
            Either
  String
  (Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> Text
   -> Input
   -> DescribeDatasetResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe (HashMap Text Text)
      -> Int -> Text -> Input -> DescribeDatasetResponse)
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
"LastModifiedBy")
            Either
  String
  (Maybe (HashMap Text Text)
   -> Int -> Text -> Input -> DescribeDatasetResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either String (Int -> Text -> Input -> DescribeDatasetResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Tags" Either String (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text)
-> Either String (Maybe (HashMap Text Text))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> Text -> Input -> DescribeDatasetResponse)
-> Either String Int
-> Either String (Text -> Input -> DescribeDatasetResponse)
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))
            Either String (Text -> Input -> DescribeDatasetResponse)
-> Either String Text
-> Either String (Input -> DescribeDatasetResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"Name")
            Either String (Input -> DescribeDatasetResponse)
-> Either String Input -> Either String DescribeDatasetResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Input
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"Input")
      )

instance Prelude.Hashable DescribeDataset

instance Prelude.NFData DescribeDataset

instance Core.ToHeaders DescribeDataset where
  toHeaders :: DescribeDataset -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeDataset -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ 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.ToPath DescribeDataset where
  toPath :: DescribeDataset -> ByteString
toPath DescribeDataset' {Text
name :: Text
$sel:name:DescribeDataset' :: DescribeDataset -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"/datasets/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
name]

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

-- | /See:/ 'newDescribeDatasetResponse' smart constructor.
data DescribeDatasetResponse = DescribeDatasetResponse'
  { -- | The date and time that the dataset was last modified.
    DescribeDatasetResponse -> Maybe POSIX
lastModifiedDate :: Prelude.Maybe Core.POSIX,
    -- | A set of options that defines how DataBrew interprets an Amazon S3 path
    -- of the dataset.
    DescribeDatasetResponse -> Maybe PathOptions
pathOptions :: Prelude.Maybe PathOptions,
    -- | The date and time that the dataset was created.
    DescribeDatasetResponse -> Maybe POSIX
createDate :: Prelude.Maybe Core.POSIX,
    DescribeDatasetResponse -> Maybe FormatOptions
formatOptions :: Prelude.Maybe FormatOptions,
    -- | The file format of a dataset that is created from an Amazon S3 file or
    -- folder.
    DescribeDatasetResponse -> Maybe InputFormat
format :: Prelude.Maybe InputFormat,
    -- | The identifier (user name) of the user who created the dataset.
    DescribeDatasetResponse -> Maybe Text
createdBy :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the dataset.
    DescribeDatasetResponse -> Maybe Text
resourceArn :: Prelude.Maybe Prelude.Text,
    -- | The location of the data for this dataset, Amazon S3 or the Glue Data
    -- Catalog.
    DescribeDatasetResponse -> Maybe Source
source :: Prelude.Maybe Source,
    -- | The identifier (user name) of the user who last modified the dataset.
    DescribeDatasetResponse -> Maybe Text
lastModifiedBy :: Prelude.Maybe Prelude.Text,
    -- | Metadata tags associated with this dataset.
    DescribeDatasetResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The response's http status code.
    DescribeDatasetResponse -> Int
httpStatus :: Prelude.Int,
    -- | The name of the dataset.
    DescribeDatasetResponse -> Text
name :: Prelude.Text,
    DescribeDatasetResponse -> Input
input :: Input
  }
  deriving (DescribeDatasetResponse -> DescribeDatasetResponse -> Bool
(DescribeDatasetResponse -> DescribeDatasetResponse -> Bool)
-> (DescribeDatasetResponse -> DescribeDatasetResponse -> Bool)
-> Eq DescribeDatasetResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeDatasetResponse -> DescribeDatasetResponse -> Bool
$c/= :: DescribeDatasetResponse -> DescribeDatasetResponse -> Bool
== :: DescribeDatasetResponse -> DescribeDatasetResponse -> Bool
$c== :: DescribeDatasetResponse -> DescribeDatasetResponse -> Bool
Prelude.Eq, ReadPrec [DescribeDatasetResponse]
ReadPrec DescribeDatasetResponse
Int -> ReadS DescribeDatasetResponse
ReadS [DescribeDatasetResponse]
(Int -> ReadS DescribeDatasetResponse)
-> ReadS [DescribeDatasetResponse]
-> ReadPrec DescribeDatasetResponse
-> ReadPrec [DescribeDatasetResponse]
-> Read DescribeDatasetResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeDatasetResponse]
$creadListPrec :: ReadPrec [DescribeDatasetResponse]
readPrec :: ReadPrec DescribeDatasetResponse
$creadPrec :: ReadPrec DescribeDatasetResponse
readList :: ReadS [DescribeDatasetResponse]
$creadList :: ReadS [DescribeDatasetResponse]
readsPrec :: Int -> ReadS DescribeDatasetResponse
$creadsPrec :: Int -> ReadS DescribeDatasetResponse
Prelude.Read, Int -> DescribeDatasetResponse -> ShowS
[DescribeDatasetResponse] -> ShowS
DescribeDatasetResponse -> String
(Int -> DescribeDatasetResponse -> ShowS)
-> (DescribeDatasetResponse -> String)
-> ([DescribeDatasetResponse] -> ShowS)
-> Show DescribeDatasetResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeDatasetResponse] -> ShowS
$cshowList :: [DescribeDatasetResponse] -> ShowS
show :: DescribeDatasetResponse -> String
$cshow :: DescribeDatasetResponse -> String
showsPrec :: Int -> DescribeDatasetResponse -> ShowS
$cshowsPrec :: Int -> DescribeDatasetResponse -> ShowS
Prelude.Show, (forall x.
 DescribeDatasetResponse -> Rep DescribeDatasetResponse x)
-> (forall x.
    Rep DescribeDatasetResponse x -> DescribeDatasetResponse)
-> Generic DescribeDatasetResponse
forall x. Rep DescribeDatasetResponse x -> DescribeDatasetResponse
forall x. DescribeDatasetResponse -> Rep DescribeDatasetResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeDatasetResponse x -> DescribeDatasetResponse
$cfrom :: forall x. DescribeDatasetResponse -> Rep DescribeDatasetResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeDatasetResponse' 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:
--
-- 'lastModifiedDate', 'describeDatasetResponse_lastModifiedDate' - The date and time that the dataset was last modified.
--
-- 'pathOptions', 'describeDatasetResponse_pathOptions' - A set of options that defines how DataBrew interprets an Amazon S3 path
-- of the dataset.
--
-- 'createDate', 'describeDatasetResponse_createDate' - The date and time that the dataset was created.
--
-- 'formatOptions', 'describeDatasetResponse_formatOptions' - Undocumented member.
--
-- 'format', 'describeDatasetResponse_format' - The file format of a dataset that is created from an Amazon S3 file or
-- folder.
--
-- 'createdBy', 'describeDatasetResponse_createdBy' - The identifier (user name) of the user who created the dataset.
--
-- 'resourceArn', 'describeDatasetResponse_resourceArn' - The Amazon Resource Name (ARN) of the dataset.
--
-- 'source', 'describeDatasetResponse_source' - The location of the data for this dataset, Amazon S3 or the Glue Data
-- Catalog.
--
-- 'lastModifiedBy', 'describeDatasetResponse_lastModifiedBy' - The identifier (user name) of the user who last modified the dataset.
--
-- 'tags', 'describeDatasetResponse_tags' - Metadata tags associated with this dataset.
--
-- 'httpStatus', 'describeDatasetResponse_httpStatus' - The response's http status code.
--
-- 'name', 'describeDatasetResponse_name' - The name of the dataset.
--
-- 'input', 'describeDatasetResponse_input' - Undocumented member.
newDescribeDatasetResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'name'
  Prelude.Text ->
  -- | 'input'
  Input ->
  DescribeDatasetResponse
newDescribeDatasetResponse :: Int -> Text -> Input -> DescribeDatasetResponse
newDescribeDatasetResponse
  Int
pHttpStatus_
  Text
pName_
  Input
pInput_ =
    DescribeDatasetResponse' :: Maybe POSIX
-> Maybe PathOptions
-> Maybe POSIX
-> Maybe FormatOptions
-> Maybe InputFormat
-> Maybe Text
-> Maybe Text
-> Maybe Source
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> Text
-> Input
-> DescribeDatasetResponse
DescribeDatasetResponse'
      { $sel:lastModifiedDate:DescribeDatasetResponse' :: Maybe POSIX
lastModifiedDate =
          Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
        $sel:pathOptions:DescribeDatasetResponse' :: Maybe PathOptions
pathOptions = Maybe PathOptions
forall a. Maybe a
Prelude.Nothing,
        $sel:createDate:DescribeDatasetResponse' :: Maybe POSIX
createDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
        $sel:formatOptions:DescribeDatasetResponse' :: Maybe FormatOptions
formatOptions = Maybe FormatOptions
forall a. Maybe a
Prelude.Nothing,
        $sel:format:DescribeDatasetResponse' :: Maybe InputFormat
format = Maybe InputFormat
forall a. Maybe a
Prelude.Nothing,
        $sel:createdBy:DescribeDatasetResponse' :: Maybe Text
createdBy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:resourceArn:DescribeDatasetResponse' :: Maybe Text
resourceArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:source:DescribeDatasetResponse' :: Maybe Source
source = Maybe Source
forall a. Maybe a
Prelude.Nothing,
        $sel:lastModifiedBy:DescribeDatasetResponse' :: Maybe Text
lastModifiedBy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:tags:DescribeDatasetResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DescribeDatasetResponse' :: Int
httpStatus = Int
pHttpStatus_,
        $sel:name:DescribeDatasetResponse' :: Text
name = Text
pName_,
        $sel:input:DescribeDatasetResponse' :: Input
input = Input
pInput_
      }

-- | The date and time that the dataset was last modified.
describeDatasetResponse_lastModifiedDate :: Lens.Lens' DescribeDatasetResponse (Prelude.Maybe Prelude.UTCTime)
describeDatasetResponse_lastModifiedDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeDatasetResponse -> f DescribeDatasetResponse
describeDatasetResponse_lastModifiedDate = (DescribeDatasetResponse -> Maybe POSIX)
-> (DescribeDatasetResponse
    -> Maybe POSIX -> DescribeDatasetResponse)
-> Lens
     DescribeDatasetResponse
     DescribeDatasetResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDatasetResponse' {Maybe POSIX
lastModifiedDate :: Maybe POSIX
$sel:lastModifiedDate:DescribeDatasetResponse' :: DescribeDatasetResponse -> Maybe POSIX
lastModifiedDate} -> Maybe POSIX
lastModifiedDate) (\s :: DescribeDatasetResponse
s@DescribeDatasetResponse' {} Maybe POSIX
a -> DescribeDatasetResponse
s {$sel:lastModifiedDate:DescribeDatasetResponse' :: Maybe POSIX
lastModifiedDate = Maybe POSIX
a} :: DescribeDatasetResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeDatasetResponse -> f DescribeDatasetResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeDatasetResponse
-> f DescribeDatasetResponse
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

-- | A set of options that defines how DataBrew interprets an Amazon S3 path
-- of the dataset.
describeDatasetResponse_pathOptions :: Lens.Lens' DescribeDatasetResponse (Prelude.Maybe PathOptions)
describeDatasetResponse_pathOptions :: (Maybe PathOptions -> f (Maybe PathOptions))
-> DescribeDatasetResponse -> f DescribeDatasetResponse
describeDatasetResponse_pathOptions = (DescribeDatasetResponse -> Maybe PathOptions)
-> (DescribeDatasetResponse
    -> Maybe PathOptions -> DescribeDatasetResponse)
-> Lens
     DescribeDatasetResponse
     DescribeDatasetResponse
     (Maybe PathOptions)
     (Maybe PathOptions)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDatasetResponse' {Maybe PathOptions
pathOptions :: Maybe PathOptions
$sel:pathOptions:DescribeDatasetResponse' :: DescribeDatasetResponse -> Maybe PathOptions
pathOptions} -> Maybe PathOptions
pathOptions) (\s :: DescribeDatasetResponse
s@DescribeDatasetResponse' {} Maybe PathOptions
a -> DescribeDatasetResponse
s {$sel:pathOptions:DescribeDatasetResponse' :: Maybe PathOptions
pathOptions = Maybe PathOptions
a} :: DescribeDatasetResponse)

-- | The date and time that the dataset was created.
describeDatasetResponse_createDate :: Lens.Lens' DescribeDatasetResponse (Prelude.Maybe Prelude.UTCTime)
describeDatasetResponse_createDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeDatasetResponse -> f DescribeDatasetResponse
describeDatasetResponse_createDate = (DescribeDatasetResponse -> Maybe POSIX)
-> (DescribeDatasetResponse
    -> Maybe POSIX -> DescribeDatasetResponse)
-> Lens
     DescribeDatasetResponse
     DescribeDatasetResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDatasetResponse' {Maybe POSIX
createDate :: Maybe POSIX
$sel:createDate:DescribeDatasetResponse' :: DescribeDatasetResponse -> Maybe POSIX
createDate} -> Maybe POSIX
createDate) (\s :: DescribeDatasetResponse
s@DescribeDatasetResponse' {} Maybe POSIX
a -> DescribeDatasetResponse
s {$sel:createDate:DescribeDatasetResponse' :: Maybe POSIX
createDate = Maybe POSIX
a} :: DescribeDatasetResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeDatasetResponse -> f DescribeDatasetResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeDatasetResponse
-> f DescribeDatasetResponse
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

-- | Undocumented member.
describeDatasetResponse_formatOptions :: Lens.Lens' DescribeDatasetResponse (Prelude.Maybe FormatOptions)
describeDatasetResponse_formatOptions :: (Maybe FormatOptions -> f (Maybe FormatOptions))
-> DescribeDatasetResponse -> f DescribeDatasetResponse
describeDatasetResponse_formatOptions = (DescribeDatasetResponse -> Maybe FormatOptions)
-> (DescribeDatasetResponse
    -> Maybe FormatOptions -> DescribeDatasetResponse)
-> Lens
     DescribeDatasetResponse
     DescribeDatasetResponse
     (Maybe FormatOptions)
     (Maybe FormatOptions)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDatasetResponse' {Maybe FormatOptions
formatOptions :: Maybe FormatOptions
$sel:formatOptions:DescribeDatasetResponse' :: DescribeDatasetResponse -> Maybe FormatOptions
formatOptions} -> Maybe FormatOptions
formatOptions) (\s :: DescribeDatasetResponse
s@DescribeDatasetResponse' {} Maybe FormatOptions
a -> DescribeDatasetResponse
s {$sel:formatOptions:DescribeDatasetResponse' :: Maybe FormatOptions
formatOptions = Maybe FormatOptions
a} :: DescribeDatasetResponse)

-- | The file format of a dataset that is created from an Amazon S3 file or
-- folder.
describeDatasetResponse_format :: Lens.Lens' DescribeDatasetResponse (Prelude.Maybe InputFormat)
describeDatasetResponse_format :: (Maybe InputFormat -> f (Maybe InputFormat))
-> DescribeDatasetResponse -> f DescribeDatasetResponse
describeDatasetResponse_format = (DescribeDatasetResponse -> Maybe InputFormat)
-> (DescribeDatasetResponse
    -> Maybe InputFormat -> DescribeDatasetResponse)
-> Lens
     DescribeDatasetResponse
     DescribeDatasetResponse
     (Maybe InputFormat)
     (Maybe InputFormat)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDatasetResponse' {Maybe InputFormat
format :: Maybe InputFormat
$sel:format:DescribeDatasetResponse' :: DescribeDatasetResponse -> Maybe InputFormat
format} -> Maybe InputFormat
format) (\s :: DescribeDatasetResponse
s@DescribeDatasetResponse' {} Maybe InputFormat
a -> DescribeDatasetResponse
s {$sel:format:DescribeDatasetResponse' :: Maybe InputFormat
format = Maybe InputFormat
a} :: DescribeDatasetResponse)

-- | The identifier (user name) of the user who created the dataset.
describeDatasetResponse_createdBy :: Lens.Lens' DescribeDatasetResponse (Prelude.Maybe Prelude.Text)
describeDatasetResponse_createdBy :: (Maybe Text -> f (Maybe Text))
-> DescribeDatasetResponse -> f DescribeDatasetResponse
describeDatasetResponse_createdBy = (DescribeDatasetResponse -> Maybe Text)
-> (DescribeDatasetResponse
    -> Maybe Text -> DescribeDatasetResponse)
-> Lens
     DescribeDatasetResponse
     DescribeDatasetResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDatasetResponse' {Maybe Text
createdBy :: Maybe Text
$sel:createdBy:DescribeDatasetResponse' :: DescribeDatasetResponse -> Maybe Text
createdBy} -> Maybe Text
createdBy) (\s :: DescribeDatasetResponse
s@DescribeDatasetResponse' {} Maybe Text
a -> DescribeDatasetResponse
s {$sel:createdBy:DescribeDatasetResponse' :: Maybe Text
createdBy = Maybe Text
a} :: DescribeDatasetResponse)

-- | The Amazon Resource Name (ARN) of the dataset.
describeDatasetResponse_resourceArn :: Lens.Lens' DescribeDatasetResponse (Prelude.Maybe Prelude.Text)
describeDatasetResponse_resourceArn :: (Maybe Text -> f (Maybe Text))
-> DescribeDatasetResponse -> f DescribeDatasetResponse
describeDatasetResponse_resourceArn = (DescribeDatasetResponse -> Maybe Text)
-> (DescribeDatasetResponse
    -> Maybe Text -> DescribeDatasetResponse)
-> Lens
     DescribeDatasetResponse
     DescribeDatasetResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDatasetResponse' {Maybe Text
resourceArn :: Maybe Text
$sel:resourceArn:DescribeDatasetResponse' :: DescribeDatasetResponse -> Maybe Text
resourceArn} -> Maybe Text
resourceArn) (\s :: DescribeDatasetResponse
s@DescribeDatasetResponse' {} Maybe Text
a -> DescribeDatasetResponse
s {$sel:resourceArn:DescribeDatasetResponse' :: Maybe Text
resourceArn = Maybe Text
a} :: DescribeDatasetResponse)

-- | The location of the data for this dataset, Amazon S3 or the Glue Data
-- Catalog.
describeDatasetResponse_source :: Lens.Lens' DescribeDatasetResponse (Prelude.Maybe Source)
describeDatasetResponse_source :: (Maybe Source -> f (Maybe Source))
-> DescribeDatasetResponse -> f DescribeDatasetResponse
describeDatasetResponse_source = (DescribeDatasetResponse -> Maybe Source)
-> (DescribeDatasetResponse
    -> Maybe Source -> DescribeDatasetResponse)
-> Lens
     DescribeDatasetResponse
     DescribeDatasetResponse
     (Maybe Source)
     (Maybe Source)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDatasetResponse' {Maybe Source
source :: Maybe Source
$sel:source:DescribeDatasetResponse' :: DescribeDatasetResponse -> Maybe Source
source} -> Maybe Source
source) (\s :: DescribeDatasetResponse
s@DescribeDatasetResponse' {} Maybe Source
a -> DescribeDatasetResponse
s {$sel:source:DescribeDatasetResponse' :: Maybe Source
source = Maybe Source
a} :: DescribeDatasetResponse)

-- | The identifier (user name) of the user who last modified the dataset.
describeDatasetResponse_lastModifiedBy :: Lens.Lens' DescribeDatasetResponse (Prelude.Maybe Prelude.Text)
describeDatasetResponse_lastModifiedBy :: (Maybe Text -> f (Maybe Text))
-> DescribeDatasetResponse -> f DescribeDatasetResponse
describeDatasetResponse_lastModifiedBy = (DescribeDatasetResponse -> Maybe Text)
-> (DescribeDatasetResponse
    -> Maybe Text -> DescribeDatasetResponse)
-> Lens
     DescribeDatasetResponse
     DescribeDatasetResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDatasetResponse' {Maybe Text
lastModifiedBy :: Maybe Text
$sel:lastModifiedBy:DescribeDatasetResponse' :: DescribeDatasetResponse -> Maybe Text
lastModifiedBy} -> Maybe Text
lastModifiedBy) (\s :: DescribeDatasetResponse
s@DescribeDatasetResponse' {} Maybe Text
a -> DescribeDatasetResponse
s {$sel:lastModifiedBy:DescribeDatasetResponse' :: Maybe Text
lastModifiedBy = Maybe Text
a} :: DescribeDatasetResponse)

-- | Metadata tags associated with this dataset.
describeDatasetResponse_tags :: Lens.Lens' DescribeDatasetResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
describeDatasetResponse_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> DescribeDatasetResponse -> f DescribeDatasetResponse
describeDatasetResponse_tags = (DescribeDatasetResponse -> Maybe (HashMap Text Text))
-> (DescribeDatasetResponse
    -> Maybe (HashMap Text Text) -> DescribeDatasetResponse)
-> Lens
     DescribeDatasetResponse
     DescribeDatasetResponse
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDatasetResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:DescribeDatasetResponse' :: DescribeDatasetResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: DescribeDatasetResponse
s@DescribeDatasetResponse' {} Maybe (HashMap Text Text)
a -> DescribeDatasetResponse
s {$sel:tags:DescribeDatasetResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: DescribeDatasetResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> DescribeDatasetResponse -> f DescribeDatasetResponse)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> DescribeDatasetResponse
-> f DescribeDatasetResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
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 Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

-- | The name of the dataset.
describeDatasetResponse_name :: Lens.Lens' DescribeDatasetResponse Prelude.Text
describeDatasetResponse_name :: (Text -> f Text)
-> DescribeDatasetResponse -> f DescribeDatasetResponse
describeDatasetResponse_name = (DescribeDatasetResponse -> Text)
-> (DescribeDatasetResponse -> Text -> DescribeDatasetResponse)
-> Lens DescribeDatasetResponse DescribeDatasetResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDatasetResponse' {Text
name :: Text
$sel:name:DescribeDatasetResponse' :: DescribeDatasetResponse -> Text
name} -> Text
name) (\s :: DescribeDatasetResponse
s@DescribeDatasetResponse' {} Text
a -> DescribeDatasetResponse
s {$sel:name:DescribeDatasetResponse' :: Text
name = Text
a} :: DescribeDatasetResponse)

-- | Undocumented member.
describeDatasetResponse_input :: Lens.Lens' DescribeDatasetResponse Input
describeDatasetResponse_input :: (Input -> f Input)
-> DescribeDatasetResponse -> f DescribeDatasetResponse
describeDatasetResponse_input = (DescribeDatasetResponse -> Input)
-> (DescribeDatasetResponse -> Input -> DescribeDatasetResponse)
-> Lens DescribeDatasetResponse DescribeDatasetResponse Input Input
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDatasetResponse' {Input
input :: Input
$sel:input:DescribeDatasetResponse' :: DescribeDatasetResponse -> Input
input} -> Input
input) (\s :: DescribeDatasetResponse
s@DescribeDatasetResponse' {} Input
a -> DescribeDatasetResponse
s {$sel:input:DescribeDatasetResponse' :: Input
input = Input
a} :: DescribeDatasetResponse)

instance Prelude.NFData DescribeDatasetResponse