{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- 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_arn,
    getDataSetResponse_assetType,
    getDataSetResponse_createdAt,
    getDataSetResponse_description,
    getDataSetResponse_id,
    getDataSetResponse_name,
    getDataSetResponse_origin,
    getDataSetResponse_originDetails,
    getDataSetResponse_sourceId,
    getDataSetResponse_tags,
    getDataSetResponse_updatedAt,
    getDataSetResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.DataExchange.Types
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
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]
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
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. 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' {$sel:dataSetId:GetDataSet' :: Text
dataSetId = Text
pDataSetId_}

-- | The unique identifier for a data set.
getDataSet_dataSetId :: Lens.Lens' GetDataSet Prelude.Text
getDataSet_dataSetId :: Lens' GetDataSet Text
getDataSet_dataSetId = 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 :: (Service -> Service) -> GetDataSet -> Request GetDataSet
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy GetDataSet
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetDataSet)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe AssetType
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Origin
-> Maybe OriginDetails
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe ISO8601
-> Int
-> GetDataSetResponse
GetDataSetResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Arn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"AssetType")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"CreatedAt")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Description")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Id")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Name")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Origin")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"OriginDetails")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"SourceId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Tags" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"UpdatedAt")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable GetDataSet where
  hashWithSalt :: Int -> GetDataSet -> Int
hashWithSalt Int
_salt GetDataSet' {Text
dataSetId :: Text
$sel:dataSetId:GetDataSet' :: GetDataSet -> Text
..} =
    Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
dataSetId

instance Prelude.NFData GetDataSet where
  rnf :: GetDataSet -> ()
rnf GetDataSet' {Text
dataSetId :: Text
$sel:dataSetId:GetDataSet' :: GetDataSet -> Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Text
dataSetId

instance Data.ToHeaders GetDataSet where
  toHeaders :: GetDataSet -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToPath GetDataSet where
  toPath :: GetDataSet -> ByteString
toPath GetDataSet' {Text
dataSetId :: Text
$sel:dataSetId:GetDataSet' :: GetDataSet -> Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/v1/data-sets/", forall a. ToByteString a => a -> ByteString
Data.toBS Text
dataSetId]

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

-- | /See:/ 'newGetDataSetResponse' smart constructor.
data GetDataSetResponse = GetDataSetResponse'
  { -- | The ARN for the data set.
    GetDataSetResponse -> Maybe Text
arn :: 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 created, in ISO 8601 format.
    GetDataSetResponse -> Maybe ISO8601
createdAt :: Prelude.Maybe Data.ISO8601,
    -- | The description for the data set.
    GetDataSetResponse -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The unique identifier for the data set.
    GetDataSetResponse -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | The name of the data set.
    GetDataSetResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | 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,
    -- | 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 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,
    -- | The tags for the data set.
    GetDataSetResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The date and time that the data set was last updated, in ISO 8601
    -- format.
    GetDataSetResponse -> Maybe ISO8601
updatedAt :: Prelude.Maybe Data.ISO8601,
    -- | The response's http status code.
    GetDataSetResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetDataSetResponse -> GetDataSetResponse -> Bool
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]
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
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. 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:
--
-- 'arn', 'getDataSetResponse_arn' - The ARN for the data set.
--
-- 'assetType', 'getDataSetResponse_assetType' - The type of asset that is added to a data set.
--
-- 'createdAt', 'getDataSetResponse_createdAt' - The date and time that the data set was created, in ISO 8601 format.
--
-- 'description', 'getDataSetResponse_description' - The description for the data set.
--
-- 'id', 'getDataSetResponse_id' - The unique identifier for the data set.
--
-- 'name', 'getDataSetResponse_name' - The name of the data set.
--
-- 'origin', 'getDataSetResponse_origin' - A property that defines the data set as OWNED by the account (for
-- providers) or ENTITLED to the account (for subscribers).
--
-- 'originDetails', 'getDataSetResponse_originDetails' - If the origin of this data set is ENTITLED, includes the details for the
-- product on AWS Marketplace.
--
-- '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.
--
-- 'tags', 'getDataSetResponse_tags' - The tags for the data set.
--
-- 'updatedAt', 'getDataSetResponse_updatedAt' - The date and time that the data set was last updated, in ISO 8601
-- format.
--
-- 'httpStatus', 'getDataSetResponse_httpStatus' - The response's http status code.
newGetDataSetResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetDataSetResponse
newGetDataSetResponse :: Int -> GetDataSetResponse
newGetDataSetResponse Int
pHttpStatus_ =
  GetDataSetResponse'
    { $sel:arn:GetDataSetResponse' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
      $sel:assetType:GetDataSetResponse' :: Maybe AssetType
assetType = forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:GetDataSetResponse' :: Maybe ISO8601
createdAt = forall a. Maybe a
Prelude.Nothing,
      $sel:description:GetDataSetResponse' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
      $sel:id:GetDataSetResponse' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
      $sel:name:GetDataSetResponse' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
      $sel:origin:GetDataSetResponse' :: Maybe Origin
origin = forall a. Maybe a
Prelude.Nothing,
      $sel:originDetails:GetDataSetResponse' :: Maybe OriginDetails
originDetails = forall a. Maybe a
Prelude.Nothing,
      $sel:sourceId:GetDataSetResponse' :: Maybe Text
sourceId = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:GetDataSetResponse' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:updatedAt:GetDataSetResponse' :: Maybe ISO8601
updatedAt = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetDataSetResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The ARN for the data set.
getDataSetResponse_arn :: Lens.Lens' GetDataSetResponse (Prelude.Maybe Prelude.Text)
getDataSetResponse_arn :: Lens' GetDataSetResponse (Maybe Text)
getDataSetResponse_arn = 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 type of asset that is added to a data set.
getDataSetResponse_assetType :: Lens.Lens' GetDataSetResponse (Prelude.Maybe AssetType)
getDataSetResponse_assetType :: Lens' GetDataSetResponse (Maybe AssetType)
getDataSetResponse_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 created, in ISO 8601 format.
getDataSetResponse_createdAt :: Lens.Lens' GetDataSetResponse (Prelude.Maybe Prelude.UTCTime)
getDataSetResponse_createdAt :: Lens' GetDataSetResponse (Maybe UTCTime)
getDataSetResponse_createdAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDataSetResponse' {Maybe ISO8601
createdAt :: Maybe ISO8601
$sel:createdAt:GetDataSetResponse' :: GetDataSetResponse -> Maybe ISO8601
createdAt} -> Maybe ISO8601
createdAt) (\s :: GetDataSetResponse
s@GetDataSetResponse' {} Maybe ISO8601
a -> GetDataSetResponse
s {$sel:createdAt:GetDataSetResponse' :: Maybe ISO8601
createdAt = Maybe ISO8601
a} :: GetDataSetResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The description for the data set.
getDataSetResponse_description :: Lens.Lens' GetDataSetResponse (Prelude.Maybe Prelude.Text)
getDataSetResponse_description :: Lens' GetDataSetResponse (Maybe Text)
getDataSetResponse_description = 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 unique identifier for the data set.
getDataSetResponse_id :: Lens.Lens' GetDataSetResponse (Prelude.Maybe Prelude.Text)
getDataSetResponse_id :: Lens' GetDataSetResponse (Maybe Text)
getDataSetResponse_id = 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 name of the data set.
getDataSetResponse_name :: Lens.Lens' GetDataSetResponse (Prelude.Maybe Prelude.Text)
getDataSetResponse_name :: Lens' GetDataSetResponse (Maybe Text)
getDataSetResponse_name = 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)

-- | 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 :: Lens' GetDataSetResponse (Maybe Origin)
getDataSetResponse_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)

-- | 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 :: Lens' GetDataSetResponse (Maybe OriginDetails)
getDataSetResponse_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 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 :: Lens' GetDataSetResponse (Maybe Text)
getDataSetResponse_sourceId = 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)

-- | The tags for the data set.
getDataSetResponse_tags :: Lens.Lens' GetDataSetResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
getDataSetResponse_tags :: Lens' GetDataSetResponse (Maybe (HashMap Text Text))
getDataSetResponse_tags = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The 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 :: Lens' GetDataSetResponse (Maybe UTCTime)
getDataSetResponse_updatedAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDataSetResponse' {Maybe ISO8601
updatedAt :: Maybe ISO8601
$sel:updatedAt:GetDataSetResponse' :: GetDataSetResponse -> Maybe ISO8601
updatedAt} -> Maybe ISO8601
updatedAt) (\s :: GetDataSetResponse
s@GetDataSetResponse' {} Maybe ISO8601
a -> GetDataSetResponse
s {$sel:updatedAt:GetDataSetResponse' :: Maybe ISO8601
updatedAt = Maybe ISO8601
a} :: GetDataSetResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The response's http status code.
getDataSetResponse_httpStatus :: Lens.Lens' GetDataSetResponse Prelude.Int
getDataSetResponse_httpStatus :: Lens' GetDataSetResponse Int
getDataSetResponse_httpStatus = 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 where
  rnf :: GetDataSetResponse -> ()
rnf GetDataSetResponse' {Int
Maybe Text
Maybe (HashMap Text Text)
Maybe ISO8601
Maybe AssetType
Maybe Origin
Maybe OriginDetails
httpStatus :: Int
updatedAt :: Maybe ISO8601
tags :: Maybe (HashMap Text Text)
sourceId :: Maybe Text
originDetails :: Maybe OriginDetails
origin :: Maybe Origin
name :: Maybe Text
id :: Maybe Text
description :: Maybe Text
createdAt :: Maybe ISO8601
assetType :: Maybe AssetType
arn :: Maybe Text
$sel:httpStatus:GetDataSetResponse' :: GetDataSetResponse -> Int
$sel:updatedAt:GetDataSetResponse' :: GetDataSetResponse -> Maybe ISO8601
$sel:tags:GetDataSetResponse' :: GetDataSetResponse -> Maybe (HashMap Text Text)
$sel:sourceId:GetDataSetResponse' :: GetDataSetResponse -> Maybe Text
$sel:originDetails:GetDataSetResponse' :: GetDataSetResponse -> Maybe OriginDetails
$sel:origin:GetDataSetResponse' :: GetDataSetResponse -> Maybe Origin
$sel:name:GetDataSetResponse' :: GetDataSetResponse -> Maybe Text
$sel:id:GetDataSetResponse' :: GetDataSetResponse -> Maybe Text
$sel:description:GetDataSetResponse' :: GetDataSetResponse -> Maybe Text
$sel:createdAt:GetDataSetResponse' :: GetDataSetResponse -> Maybe ISO8601
$sel:assetType:GetDataSetResponse' :: GetDataSetResponse -> Maybe AssetType
$sel:arn:GetDataSetResponse' :: GetDataSetResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe AssetType
assetType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
createdAt
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
id
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Origin
origin
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe OriginDetails
originDetails
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
sourceId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
updatedAt
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus