{-# 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.DataExchange.GetDataSet
-- 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)
--
-- This operation returns information about a data set.
module Amazonka.DataExchange.GetDataSet
  ( -- * Creating a Request
    GetDataSet (..),
    newGetDataSet,

    -- * Request Lenses
    getDataSet_dataSetId,

    -- * Destructuring the Response
    GetDataSetResponse (..),
    newGetDataSetResponse,

    -- * Response Lenses
    getDataSetResponse_origin,
    getDataSetResponse_arn,
    getDataSetResponse_createdAt,
    getDataSetResponse_sourceId,
    getDataSetResponse_originDetails,
    getDataSetResponse_name,
    getDataSetResponse_id,
    getDataSetResponse_assetType,
    getDataSetResponse_updatedAt,
    getDataSetResponse_description,
    getDataSetResponse_tags,
    getDataSetResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.DataExchange.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:/ 'newGetDataSet' smart constructor.
data GetDataSet = GetDataSet'
  { -- | The unique identifier for a data set.
    GetDataSet -> Text
dataSetId :: Prelude.Text
  }
  deriving (GetDataSet -> GetDataSet -> Bool
(GetDataSet -> GetDataSet -> Bool)
-> (GetDataSet -> GetDataSet -> Bool) -> Eq GetDataSet
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetDataSet -> GetDataSet -> Bool
$c/= :: GetDataSet -> GetDataSet -> Bool
== :: GetDataSet -> GetDataSet -> Bool
$c== :: GetDataSet -> GetDataSet -> Bool
Prelude.Eq, ReadPrec [GetDataSet]
ReadPrec GetDataSet
Int -> ReadS GetDataSet
ReadS [GetDataSet]
(Int -> ReadS GetDataSet)
-> ReadS [GetDataSet]
-> ReadPrec GetDataSet
-> ReadPrec [GetDataSet]
-> Read GetDataSet
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetDataSet]
$creadListPrec :: ReadPrec [GetDataSet]
readPrec :: ReadPrec GetDataSet
$creadPrec :: ReadPrec GetDataSet
readList :: ReadS [GetDataSet]
$creadList :: ReadS [GetDataSet]
readsPrec :: Int -> ReadS GetDataSet
$creadsPrec :: Int -> ReadS GetDataSet
Prelude.Read, Int -> GetDataSet -> ShowS
[GetDataSet] -> ShowS
GetDataSet -> String
(Int -> GetDataSet -> ShowS)
-> (GetDataSet -> String)
-> ([GetDataSet] -> ShowS)
-> Show GetDataSet
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetDataSet] -> ShowS
$cshowList :: [GetDataSet] -> ShowS
show :: GetDataSet -> String
$cshow :: GetDataSet -> String
showsPrec :: Int -> GetDataSet -> ShowS
$cshowsPrec :: Int -> GetDataSet -> ShowS
Prelude.Show, (forall x. GetDataSet -> Rep GetDataSet x)
-> (forall x. Rep GetDataSet x -> GetDataSet) -> Generic GetDataSet
forall x. Rep GetDataSet x -> GetDataSet
forall x. GetDataSet -> Rep GetDataSet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetDataSet x -> GetDataSet
$cfrom :: forall x. GetDataSet -> Rep GetDataSet x
Prelude.Generic)

-- |
-- Create a value of 'GetDataSet' 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:
--
-- 'dataSetId', 'getDataSet_dataSetId' - The unique identifier for a data set.
newGetDataSet ::
  -- | 'dataSetId'
  Prelude.Text ->
  GetDataSet
newGetDataSet :: Text -> GetDataSet
newGetDataSet Text
pDataSetId_ =
  GetDataSet' :: Text -> GetDataSet
GetDataSet' {$sel:dataSetId:GetDataSet' :: Text
dataSetId = Text
pDataSetId_}

-- | The unique identifier for a data set.
getDataSet_dataSetId :: Lens.Lens' GetDataSet Prelude.Text
getDataSet_dataSetId :: (Text -> f Text) -> GetDataSet -> f GetDataSet
getDataSet_dataSetId = (GetDataSet -> Text)
-> (GetDataSet -> Text -> GetDataSet)
-> Lens GetDataSet GetDataSet Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDataSet' {Text
dataSetId :: Text
$sel:dataSetId:GetDataSet' :: GetDataSet -> Text
dataSetId} -> Text
dataSetId) (\s :: GetDataSet
s@GetDataSet' {} Text
a -> GetDataSet
s {$sel:dataSetId:GetDataSet' :: Text
dataSetId = Text
a} :: GetDataSet)

instance Core.AWSRequest GetDataSet where
  type AWSResponse GetDataSet = GetDataSetResponse
  request :: GetDataSet -> Request GetDataSet
request = Service -> GetDataSet -> Request GetDataSet
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy GetDataSet
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetDataSet)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetDataSet))
-> Logger
-> Service
-> Proxy GetDataSet
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetDataSet)))
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 Origin
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe OriginDetails
-> Maybe Text
-> Maybe Text
-> Maybe AssetType
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> GetDataSetResponse
GetDataSetResponse'
            (Maybe Origin
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe OriginDetails
 -> Maybe Text
 -> Maybe Text
 -> Maybe AssetType
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Int
 -> GetDataSetResponse)
-> Either String (Maybe Origin)
-> Either
     String
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe OriginDetails
      -> Maybe Text
      -> Maybe Text
      -> Maybe AssetType
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> GetDataSetResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Origin)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Origin")
            Either
  String
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe OriginDetails
   -> Maybe Text
   -> Maybe Text
   -> Maybe AssetType
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> GetDataSetResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe POSIX
      -> Maybe Text
      -> Maybe OriginDetails
      -> Maybe Text
      -> Maybe Text
      -> Maybe AssetType
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> GetDataSetResponse)
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
"Arn")
            Either
  String
  (Maybe POSIX
   -> Maybe Text
   -> Maybe OriginDetails
   -> Maybe Text
   -> Maybe Text
   -> Maybe AssetType
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> GetDataSetResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe OriginDetails
      -> Maybe Text
      -> Maybe Text
      -> Maybe AssetType
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> GetDataSetResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CreatedAt")
            Either
  String
  (Maybe Text
   -> Maybe OriginDetails
   -> Maybe Text
   -> Maybe Text
   -> Maybe AssetType
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> GetDataSetResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe OriginDetails
      -> Maybe Text
      -> Maybe Text
      -> Maybe AssetType
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> GetDataSetResponse)
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
"SourceId")
            Either
  String
  (Maybe OriginDetails
   -> Maybe Text
   -> Maybe Text
   -> Maybe AssetType
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> GetDataSetResponse)
-> Either String (Maybe OriginDetails)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe AssetType
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> GetDataSetResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe OriginDetails)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"OriginDetails")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe AssetType
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> GetDataSetResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe AssetType
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> GetDataSetResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Name")
            Either
  String
  (Maybe Text
   -> Maybe AssetType
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> GetDataSetResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe AssetType
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> GetDataSetResponse)
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
"Id")
            Either
  String
  (Maybe AssetType
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> GetDataSetResponse)
-> Either String (Maybe AssetType)
-> Either
     String
     (Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> GetDataSetResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe AssetType)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"AssetType")
            Either
  String
  (Maybe POSIX
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> GetDataSetResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe (HashMap Text Text) -> Int -> GetDataSetResponse)
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
"UpdatedAt")
            Either
  String
  (Maybe Text
   -> Maybe (HashMap Text Text) -> Int -> GetDataSetResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe (HashMap Text Text) -> Int -> GetDataSetResponse)
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
"Description")
            Either
  String (Maybe (HashMap Text Text) -> Int -> GetDataSetResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either String (Int -> GetDataSetResponse)
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 -> GetDataSetResponse)
-> Either String Int -> Either String GetDataSetResponse
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 GetDataSet

instance Prelude.NFData GetDataSet

instance Core.ToHeaders GetDataSet where
  toHeaders :: GetDataSet -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetDataSet -> 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 GetDataSet where
  toPath :: GetDataSet -> ByteString
toPath GetDataSet' {Text
dataSetId :: Text
$sel:dataSetId:GetDataSet' :: GetDataSet -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/v1/data-sets/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
dataSetId]

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

-- | /See:/ 'newGetDataSetResponse' smart constructor.
data GetDataSetResponse = GetDataSetResponse'
  { -- | A property that defines the data set as OWNED by the account (for
    -- providers) or ENTITLED to the account (for subscribers).
    GetDataSetResponse -> Maybe Origin
origin :: Prelude.Maybe Origin,
    -- | The ARN for the data set.
    GetDataSetResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The date and time that the data set was created, in ISO 8601 format.
    GetDataSetResponse -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
    -- | The data set ID of the owned data set corresponding to the entitled data
    -- set being viewed. This parameter is returned when a data set owner is
    -- viewing the entitled copy of its owned data set.
    GetDataSetResponse -> Maybe Text
sourceId :: Prelude.Maybe Prelude.Text,
    -- | If the origin of this data set is ENTITLED, includes the details for the
    -- product on AWS Marketplace.
    GetDataSetResponse -> Maybe OriginDetails
originDetails :: Prelude.Maybe OriginDetails,
    -- | The name of the data set.
    GetDataSetResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The unique identifier for the data set.
    GetDataSetResponse -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | The type of asset that is added to a data set.
    GetDataSetResponse -> Maybe AssetType
assetType :: Prelude.Maybe AssetType,
    -- | The date and time that the data set was last updated, in ISO 8601
    -- format.
    GetDataSetResponse -> Maybe POSIX
updatedAt :: Prelude.Maybe Core.POSIX,
    -- | The description for the data set.
    GetDataSetResponse -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The tags for the data set.
    GetDataSetResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The response's http status code.
    GetDataSetResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetDataSetResponse -> GetDataSetResponse -> Bool
(GetDataSetResponse -> GetDataSetResponse -> Bool)
-> (GetDataSetResponse -> GetDataSetResponse -> Bool)
-> Eq GetDataSetResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetDataSetResponse -> GetDataSetResponse -> Bool
$c/= :: GetDataSetResponse -> GetDataSetResponse -> Bool
== :: GetDataSetResponse -> GetDataSetResponse -> Bool
$c== :: GetDataSetResponse -> GetDataSetResponse -> Bool
Prelude.Eq, ReadPrec [GetDataSetResponse]
ReadPrec GetDataSetResponse
Int -> ReadS GetDataSetResponse
ReadS [GetDataSetResponse]
(Int -> ReadS GetDataSetResponse)
-> ReadS [GetDataSetResponse]
-> ReadPrec GetDataSetResponse
-> ReadPrec [GetDataSetResponse]
-> Read GetDataSetResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetDataSetResponse]
$creadListPrec :: ReadPrec [GetDataSetResponse]
readPrec :: ReadPrec GetDataSetResponse
$creadPrec :: ReadPrec GetDataSetResponse
readList :: ReadS [GetDataSetResponse]
$creadList :: ReadS [GetDataSetResponse]
readsPrec :: Int -> ReadS GetDataSetResponse
$creadsPrec :: Int -> ReadS GetDataSetResponse
Prelude.Read, Int -> GetDataSetResponse -> ShowS
[GetDataSetResponse] -> ShowS
GetDataSetResponse -> String
(Int -> GetDataSetResponse -> ShowS)
-> (GetDataSetResponse -> String)
-> ([GetDataSetResponse] -> ShowS)
-> Show GetDataSetResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetDataSetResponse] -> ShowS
$cshowList :: [GetDataSetResponse] -> ShowS
show :: GetDataSetResponse -> String
$cshow :: GetDataSetResponse -> String
showsPrec :: Int -> GetDataSetResponse -> ShowS
$cshowsPrec :: Int -> GetDataSetResponse -> ShowS
Prelude.Show, (forall x. GetDataSetResponse -> Rep GetDataSetResponse x)
-> (forall x. Rep GetDataSetResponse x -> GetDataSetResponse)
-> Generic GetDataSetResponse
forall x. Rep GetDataSetResponse x -> GetDataSetResponse
forall x. GetDataSetResponse -> Rep GetDataSetResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetDataSetResponse x -> GetDataSetResponse
$cfrom :: forall x. GetDataSetResponse -> Rep GetDataSetResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetDataSetResponse' 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:
--
-- 'origin', 'getDataSetResponse_origin' - A property that defines the data set as OWNED by the account (for
-- providers) or ENTITLED to the account (for subscribers).
--
-- 'arn', 'getDataSetResponse_arn' - The ARN for the data set.
--
-- 'createdAt', 'getDataSetResponse_createdAt' - The date and time that the data set was created, in ISO 8601 format.
--
-- 'sourceId', 'getDataSetResponse_sourceId' - The data set ID of the owned data set corresponding to the entitled data
-- set being viewed. This parameter is returned when a data set owner is
-- viewing the entitled copy of its owned data set.
--
-- 'originDetails', 'getDataSetResponse_originDetails' - If the origin of this data set is ENTITLED, includes the details for the
-- product on AWS Marketplace.
--
-- 'name', 'getDataSetResponse_name' - The name of the data set.
--
-- 'id', 'getDataSetResponse_id' - The unique identifier for the data set.
--
-- 'assetType', 'getDataSetResponse_assetType' - The type of asset that is added to a data set.
--
-- 'updatedAt', 'getDataSetResponse_updatedAt' - The date and time that the data set was last updated, in ISO 8601
-- format.
--
-- 'description', 'getDataSetResponse_description' - The description for the data set.
--
-- 'tags', 'getDataSetResponse_tags' - The tags for the data set.
--
-- 'httpStatus', 'getDataSetResponse_httpStatus' - The response's http status code.
newGetDataSetResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetDataSetResponse
newGetDataSetResponse :: Int -> GetDataSetResponse
newGetDataSetResponse Int
pHttpStatus_ =
  GetDataSetResponse' :: Maybe Origin
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe OriginDetails
-> Maybe Text
-> Maybe Text
-> Maybe AssetType
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> GetDataSetResponse
GetDataSetResponse'
    { $sel:origin:GetDataSetResponse' :: Maybe Origin
origin = Maybe Origin
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:GetDataSetResponse' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:GetDataSetResponse' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:sourceId:GetDataSetResponse' :: Maybe Text
sourceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:originDetails:GetDataSetResponse' :: Maybe OriginDetails
originDetails = Maybe OriginDetails
forall a. Maybe a
Prelude.Nothing,
      $sel:name:GetDataSetResponse' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:id:GetDataSetResponse' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:assetType:GetDataSetResponse' :: Maybe AssetType
assetType = Maybe AssetType
forall a. Maybe a
Prelude.Nothing,
      $sel:updatedAt:GetDataSetResponse' :: Maybe POSIX
updatedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:description:GetDataSetResponse' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:GetDataSetResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetDataSetResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A property that defines the data set as OWNED by the account (for
-- providers) or ENTITLED to the account (for subscribers).
getDataSetResponse_origin :: Lens.Lens' GetDataSetResponse (Prelude.Maybe Origin)
getDataSetResponse_origin :: (Maybe Origin -> f (Maybe Origin))
-> GetDataSetResponse -> f GetDataSetResponse
getDataSetResponse_origin = (GetDataSetResponse -> Maybe Origin)
-> (GetDataSetResponse -> Maybe Origin -> GetDataSetResponse)
-> Lens
     GetDataSetResponse GetDataSetResponse (Maybe Origin) (Maybe Origin)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDataSetResponse' {Maybe Origin
origin :: Maybe Origin
$sel:origin:GetDataSetResponse' :: GetDataSetResponse -> Maybe Origin
origin} -> Maybe Origin
origin) (\s :: GetDataSetResponse
s@GetDataSetResponse' {} Maybe Origin
a -> GetDataSetResponse
s {$sel:origin:GetDataSetResponse' :: Maybe Origin
origin = Maybe Origin
a} :: GetDataSetResponse)

-- | The ARN for the data set.
getDataSetResponse_arn :: Lens.Lens' GetDataSetResponse (Prelude.Maybe Prelude.Text)
getDataSetResponse_arn :: (Maybe Text -> f (Maybe Text))
-> GetDataSetResponse -> f GetDataSetResponse
getDataSetResponse_arn = (GetDataSetResponse -> Maybe Text)
-> (GetDataSetResponse -> Maybe Text -> GetDataSetResponse)
-> Lens
     GetDataSetResponse GetDataSetResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDataSetResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:GetDataSetResponse' :: GetDataSetResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: GetDataSetResponse
s@GetDataSetResponse' {} Maybe Text
a -> GetDataSetResponse
s {$sel:arn:GetDataSetResponse' :: Maybe Text
arn = Maybe Text
a} :: GetDataSetResponse)

-- | The date and time that the data set was created, in ISO 8601 format.
getDataSetResponse_createdAt :: Lens.Lens' GetDataSetResponse (Prelude.Maybe Prelude.UTCTime)
getDataSetResponse_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GetDataSetResponse -> f GetDataSetResponse
getDataSetResponse_createdAt = (GetDataSetResponse -> Maybe POSIX)
-> (GetDataSetResponse -> Maybe POSIX -> GetDataSetResponse)
-> Lens
     GetDataSetResponse GetDataSetResponse (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDataSetResponse' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:GetDataSetResponse' :: GetDataSetResponse -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: GetDataSetResponse
s@GetDataSetResponse' {} Maybe POSIX
a -> GetDataSetResponse
s {$sel:createdAt:GetDataSetResponse' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: GetDataSetResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> GetDataSetResponse -> f GetDataSetResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GetDataSetResponse
-> f GetDataSetResponse
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 data set ID of the owned data set corresponding to the entitled data
-- set being viewed. This parameter is returned when a data set owner is
-- viewing the entitled copy of its owned data set.
getDataSetResponse_sourceId :: Lens.Lens' GetDataSetResponse (Prelude.Maybe Prelude.Text)
getDataSetResponse_sourceId :: (Maybe Text -> f (Maybe Text))
-> GetDataSetResponse -> f GetDataSetResponse
getDataSetResponse_sourceId = (GetDataSetResponse -> Maybe Text)
-> (GetDataSetResponse -> Maybe Text -> GetDataSetResponse)
-> Lens
     GetDataSetResponse GetDataSetResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDataSetResponse' {Maybe Text
sourceId :: Maybe Text
$sel:sourceId:GetDataSetResponse' :: GetDataSetResponse -> Maybe Text
sourceId} -> Maybe Text
sourceId) (\s :: GetDataSetResponse
s@GetDataSetResponse' {} Maybe Text
a -> GetDataSetResponse
s {$sel:sourceId:GetDataSetResponse' :: Maybe Text
sourceId = Maybe Text
a} :: GetDataSetResponse)

-- | If the origin of this data set is ENTITLED, includes the details for the
-- product on AWS Marketplace.
getDataSetResponse_originDetails :: Lens.Lens' GetDataSetResponse (Prelude.Maybe OriginDetails)
getDataSetResponse_originDetails :: (Maybe OriginDetails -> f (Maybe OriginDetails))
-> GetDataSetResponse -> f GetDataSetResponse
getDataSetResponse_originDetails = (GetDataSetResponse -> Maybe OriginDetails)
-> (GetDataSetResponse
    -> Maybe OriginDetails -> GetDataSetResponse)
-> Lens
     GetDataSetResponse
     GetDataSetResponse
     (Maybe OriginDetails)
     (Maybe OriginDetails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDataSetResponse' {Maybe OriginDetails
originDetails :: Maybe OriginDetails
$sel:originDetails:GetDataSetResponse' :: GetDataSetResponse -> Maybe OriginDetails
originDetails} -> Maybe OriginDetails
originDetails) (\s :: GetDataSetResponse
s@GetDataSetResponse' {} Maybe OriginDetails
a -> GetDataSetResponse
s {$sel:originDetails:GetDataSetResponse' :: Maybe OriginDetails
originDetails = Maybe OriginDetails
a} :: GetDataSetResponse)

-- | The name of the data set.
getDataSetResponse_name :: Lens.Lens' GetDataSetResponse (Prelude.Maybe Prelude.Text)
getDataSetResponse_name :: (Maybe Text -> f (Maybe Text))
-> GetDataSetResponse -> f GetDataSetResponse
getDataSetResponse_name = (GetDataSetResponse -> Maybe Text)
-> (GetDataSetResponse -> Maybe Text -> GetDataSetResponse)
-> Lens
     GetDataSetResponse GetDataSetResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDataSetResponse' {Maybe Text
name :: Maybe Text
$sel:name:GetDataSetResponse' :: GetDataSetResponse -> Maybe Text
name} -> Maybe Text
name) (\s :: GetDataSetResponse
s@GetDataSetResponse' {} Maybe Text
a -> GetDataSetResponse
s {$sel:name:GetDataSetResponse' :: Maybe Text
name = Maybe Text
a} :: GetDataSetResponse)

-- | The unique identifier for the data set.
getDataSetResponse_id :: Lens.Lens' GetDataSetResponse (Prelude.Maybe Prelude.Text)
getDataSetResponse_id :: (Maybe Text -> f (Maybe Text))
-> GetDataSetResponse -> f GetDataSetResponse
getDataSetResponse_id = (GetDataSetResponse -> Maybe Text)
-> (GetDataSetResponse -> Maybe Text -> GetDataSetResponse)
-> Lens
     GetDataSetResponse GetDataSetResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDataSetResponse' {Maybe Text
id :: Maybe Text
$sel:id:GetDataSetResponse' :: GetDataSetResponse -> Maybe Text
id} -> Maybe Text
id) (\s :: GetDataSetResponse
s@GetDataSetResponse' {} Maybe Text
a -> GetDataSetResponse
s {$sel:id:GetDataSetResponse' :: Maybe Text
id = Maybe Text
a} :: GetDataSetResponse)

-- | The type of asset that is added to a data set.
getDataSetResponse_assetType :: Lens.Lens' GetDataSetResponse (Prelude.Maybe AssetType)
getDataSetResponse_assetType :: (Maybe AssetType -> f (Maybe AssetType))
-> GetDataSetResponse -> f GetDataSetResponse
getDataSetResponse_assetType = (GetDataSetResponse -> Maybe AssetType)
-> (GetDataSetResponse -> Maybe AssetType -> GetDataSetResponse)
-> Lens
     GetDataSetResponse
     GetDataSetResponse
     (Maybe AssetType)
     (Maybe AssetType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDataSetResponse' {Maybe AssetType
assetType :: Maybe AssetType
$sel:assetType:GetDataSetResponse' :: GetDataSetResponse -> Maybe AssetType
assetType} -> Maybe AssetType
assetType) (\s :: GetDataSetResponse
s@GetDataSetResponse' {} Maybe AssetType
a -> GetDataSetResponse
s {$sel:assetType:GetDataSetResponse' :: Maybe AssetType
assetType = Maybe AssetType
a} :: GetDataSetResponse)

-- | The date and time that the data set was last updated, in ISO 8601
-- format.
getDataSetResponse_updatedAt :: Lens.Lens' GetDataSetResponse (Prelude.Maybe Prelude.UTCTime)
getDataSetResponse_updatedAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GetDataSetResponse -> f GetDataSetResponse
getDataSetResponse_updatedAt = (GetDataSetResponse -> Maybe POSIX)
-> (GetDataSetResponse -> Maybe POSIX -> GetDataSetResponse)
-> Lens
     GetDataSetResponse GetDataSetResponse (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDataSetResponse' {Maybe POSIX
updatedAt :: Maybe POSIX
$sel:updatedAt:GetDataSetResponse' :: GetDataSetResponse -> Maybe POSIX
updatedAt} -> Maybe POSIX
updatedAt) (\s :: GetDataSetResponse
s@GetDataSetResponse' {} Maybe POSIX
a -> GetDataSetResponse
s {$sel:updatedAt:GetDataSetResponse' :: Maybe POSIX
updatedAt = Maybe POSIX
a} :: GetDataSetResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> GetDataSetResponse -> f GetDataSetResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GetDataSetResponse
-> f GetDataSetResponse
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 description for the data set.
getDataSetResponse_description :: Lens.Lens' GetDataSetResponse (Prelude.Maybe Prelude.Text)
getDataSetResponse_description :: (Maybe Text -> f (Maybe Text))
-> GetDataSetResponse -> f GetDataSetResponse
getDataSetResponse_description = (GetDataSetResponse -> Maybe Text)
-> (GetDataSetResponse -> Maybe Text -> GetDataSetResponse)
-> Lens
     GetDataSetResponse GetDataSetResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDataSetResponse' {Maybe Text
description :: Maybe Text
$sel:description:GetDataSetResponse' :: GetDataSetResponse -> Maybe Text
description} -> Maybe Text
description) (\s :: GetDataSetResponse
s@GetDataSetResponse' {} Maybe Text
a -> GetDataSetResponse
s {$sel:description:GetDataSetResponse' :: Maybe Text
description = Maybe Text
a} :: GetDataSetResponse)

-- | The tags for the data set.
getDataSetResponse_tags :: Lens.Lens' GetDataSetResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
getDataSetResponse_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> GetDataSetResponse -> f GetDataSetResponse
getDataSetResponse_tags = (GetDataSetResponse -> Maybe (HashMap Text Text))
-> (GetDataSetResponse
    -> Maybe (HashMap Text Text) -> GetDataSetResponse)
-> Lens
     GetDataSetResponse
     GetDataSetResponse
     (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 (\GetDataSetResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:GetDataSetResponse' :: GetDataSetResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: GetDataSetResponse
s@GetDataSetResponse' {} Maybe (HashMap Text Text)
a -> GetDataSetResponse
s {$sel:tags:GetDataSetResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: GetDataSetResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> GetDataSetResponse -> f GetDataSetResponse)
-> ((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)))
-> GetDataSetResponse
-> f GetDataSetResponse
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.
getDataSetResponse_httpStatus :: Lens.Lens' GetDataSetResponse Prelude.Int
getDataSetResponse_httpStatus :: (Int -> f Int) -> GetDataSetResponse -> f GetDataSetResponse
getDataSetResponse_httpStatus = (GetDataSetResponse -> Int)
-> (GetDataSetResponse -> Int -> GetDataSetResponse)
-> Lens GetDataSetResponse GetDataSetResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDataSetResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetDataSetResponse' :: GetDataSetResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetDataSetResponse
s@GetDataSetResponse' {} Int
a -> GetDataSetResponse
s {$sel:httpStatus:GetDataSetResponse' :: Int
httpStatus = Int
a} :: GetDataSetResponse)

instance Prelude.NFData GetDataSetResponse