{-# 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.GetAsset
-- 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 an asset.
module Amazonka.DataExchange.GetAsset
  ( -- * Creating a Request
    GetAsset (..),
    newGetAsset,

    -- * Request Lenses
    getAsset_assetId,
    getAsset_dataSetId,
    getAsset_revisionId,

    -- * Destructuring the Response
    GetAssetResponse (..),
    newGetAssetResponse,

    -- * Response Lenses
    getAssetResponse_arn,
    getAssetResponse_assetDetails,
    getAssetResponse_assetType,
    getAssetResponse_createdAt,
    getAssetResponse_dataSetId,
    getAssetResponse_id,
    getAssetResponse_name,
    getAssetResponse_revisionId,
    getAssetResponse_sourceId,
    getAssetResponse_updatedAt,
    getAssetResponse_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:/ 'newGetAsset' smart constructor.
data GetAsset = GetAsset'
  { -- | The unique identifier for an asset.
    GetAsset -> Text
assetId :: Prelude.Text,
    -- | The unique identifier for a data set.
    GetAsset -> Text
dataSetId :: Prelude.Text,
    -- | The unique identifier for a revision.
    GetAsset -> Text
revisionId :: Prelude.Text
  }
  deriving (GetAsset -> GetAsset -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetAsset -> GetAsset -> Bool
$c/= :: GetAsset -> GetAsset -> Bool
== :: GetAsset -> GetAsset -> Bool
$c== :: GetAsset -> GetAsset -> Bool
Prelude.Eq, ReadPrec [GetAsset]
ReadPrec GetAsset
Int -> ReadS GetAsset
ReadS [GetAsset]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetAsset]
$creadListPrec :: ReadPrec [GetAsset]
readPrec :: ReadPrec GetAsset
$creadPrec :: ReadPrec GetAsset
readList :: ReadS [GetAsset]
$creadList :: ReadS [GetAsset]
readsPrec :: Int -> ReadS GetAsset
$creadsPrec :: Int -> ReadS GetAsset
Prelude.Read, Int -> GetAsset -> ShowS
[GetAsset] -> ShowS
GetAsset -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetAsset] -> ShowS
$cshowList :: [GetAsset] -> ShowS
show :: GetAsset -> String
$cshow :: GetAsset -> String
showsPrec :: Int -> GetAsset -> ShowS
$cshowsPrec :: Int -> GetAsset -> ShowS
Prelude.Show, forall x. Rep GetAsset x -> GetAsset
forall x. GetAsset -> Rep GetAsset x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetAsset x -> GetAsset
$cfrom :: forall x. GetAsset -> Rep GetAsset x
Prelude.Generic)

-- |
-- Create a value of 'GetAsset' 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:
--
-- 'assetId', 'getAsset_assetId' - The unique identifier for an asset.
--
-- 'dataSetId', 'getAsset_dataSetId' - The unique identifier for a data set.
--
-- 'revisionId', 'getAsset_revisionId' - The unique identifier for a revision.
newGetAsset ::
  -- | 'assetId'
  Prelude.Text ->
  -- | 'dataSetId'
  Prelude.Text ->
  -- | 'revisionId'
  Prelude.Text ->
  GetAsset
newGetAsset :: Text -> Text -> Text -> GetAsset
newGetAsset Text
pAssetId_ Text
pDataSetId_ Text
pRevisionId_ =
  GetAsset'
    { $sel:assetId:GetAsset' :: Text
assetId = Text
pAssetId_,
      $sel:dataSetId:GetAsset' :: Text
dataSetId = Text
pDataSetId_,
      $sel:revisionId:GetAsset' :: Text
revisionId = Text
pRevisionId_
    }

-- | The unique identifier for an asset.
getAsset_assetId :: Lens.Lens' GetAsset Prelude.Text
getAsset_assetId :: Lens' GetAsset Text
getAsset_assetId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAsset' {Text
assetId :: Text
$sel:assetId:GetAsset' :: GetAsset -> Text
assetId} -> Text
assetId) (\s :: GetAsset
s@GetAsset' {} Text
a -> GetAsset
s {$sel:assetId:GetAsset' :: Text
assetId = Text
a} :: GetAsset)

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

-- | The unique identifier for a revision.
getAsset_revisionId :: Lens.Lens' GetAsset Prelude.Text
getAsset_revisionId :: Lens' GetAsset Text
getAsset_revisionId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAsset' {Text
revisionId :: Text
$sel:revisionId:GetAsset' :: GetAsset -> Text
revisionId} -> Text
revisionId) (\s :: GetAsset
s@GetAsset' {} Text
a -> GetAsset
s {$sel:revisionId:GetAsset' :: Text
revisionId = Text
a} :: GetAsset)

instance Core.AWSRequest GetAsset where
  type AWSResponse GetAsset = GetAssetResponse
  request :: (Service -> Service) -> GetAsset -> Request GetAsset
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 GetAsset
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetAsset)))
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 AssetDetails
-> Maybe AssetType
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Int
-> GetAssetResponse
GetAssetResponse'
            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
"AssetDetails")
            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
"DataSetId")
            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
"RevisionId")
            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
"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 GetAsset where
  hashWithSalt :: Int -> GetAsset -> Int
hashWithSalt Int
_salt GetAsset' {Text
revisionId :: Text
dataSetId :: Text
assetId :: Text
$sel:revisionId:GetAsset' :: GetAsset -> Text
$sel:dataSetId:GetAsset' :: GetAsset -> Text
$sel:assetId:GetAsset' :: GetAsset -> Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
assetId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
dataSetId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
revisionId

instance Prelude.NFData GetAsset where
  rnf :: GetAsset -> ()
rnf GetAsset' {Text
revisionId :: Text
dataSetId :: Text
assetId :: Text
$sel:revisionId:GetAsset' :: GetAsset -> Text
$sel:dataSetId:GetAsset' :: GetAsset -> Text
$sel:assetId:GetAsset' :: GetAsset -> Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Text
assetId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
dataSetId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
revisionId

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

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

-- | /See:/ 'newGetAssetResponse' smart constructor.
data GetAssetResponse = GetAssetResponse'
  { -- | The ARN for the asset.
    GetAssetResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | Details about the asset.
    GetAssetResponse -> Maybe AssetDetails
assetDetails :: Prelude.Maybe AssetDetails,
    -- | The type of asset that is added to a data set.
    GetAssetResponse -> Maybe AssetType
assetType :: Prelude.Maybe AssetType,
    -- | The date and time that the asset was created, in ISO 8601 format.
    GetAssetResponse -> Maybe ISO8601
createdAt :: Prelude.Maybe Data.ISO8601,
    -- | The unique identifier for the data set associated with this asset.
    GetAssetResponse -> Maybe Text
dataSetId :: Prelude.Maybe Prelude.Text,
    -- | The unique identifier for the asset.
    GetAssetResponse -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | The name of the asset. When importing from Amazon S3, the Amazon S3
    -- object key is used as the asset name. When exporting to Amazon S3, the
    -- asset name is used as default target Amazon S3 object key. When
    -- importing from Amazon API Gateway API, the API name is used as the asset
    -- name. When importing from Amazon Redshift, the datashare name is used as
    -- the asset name. When importing from AWS Lake Formation, the static
    -- values of \"Database(s) included in the LF-tag policy\" or \"Table(s)
    -- included in the LF-tag policy\" are used as the asset name.
    GetAssetResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The unique identifier for the revision associated with this asset.
    GetAssetResponse -> Maybe Text
revisionId :: Prelude.Maybe Prelude.Text,
    -- | The asset ID of the owned asset corresponding to the entitled asset
    -- being viewed. This parameter is returned when an asset owner is viewing
    -- the entitled copy of its owned asset.
    GetAssetResponse -> Maybe Text
sourceId :: Prelude.Maybe Prelude.Text,
    -- | The date and time that the asset was last updated, in ISO 8601 format.
    GetAssetResponse -> Maybe ISO8601
updatedAt :: Prelude.Maybe Data.ISO8601,
    -- | The response's http status code.
    GetAssetResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetAssetResponse -> GetAssetResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetAssetResponse -> GetAssetResponse -> Bool
$c/= :: GetAssetResponse -> GetAssetResponse -> Bool
== :: GetAssetResponse -> GetAssetResponse -> Bool
$c== :: GetAssetResponse -> GetAssetResponse -> Bool
Prelude.Eq, ReadPrec [GetAssetResponse]
ReadPrec GetAssetResponse
Int -> ReadS GetAssetResponse
ReadS [GetAssetResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetAssetResponse]
$creadListPrec :: ReadPrec [GetAssetResponse]
readPrec :: ReadPrec GetAssetResponse
$creadPrec :: ReadPrec GetAssetResponse
readList :: ReadS [GetAssetResponse]
$creadList :: ReadS [GetAssetResponse]
readsPrec :: Int -> ReadS GetAssetResponse
$creadsPrec :: Int -> ReadS GetAssetResponse
Prelude.Read, Int -> GetAssetResponse -> ShowS
[GetAssetResponse] -> ShowS
GetAssetResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetAssetResponse] -> ShowS
$cshowList :: [GetAssetResponse] -> ShowS
show :: GetAssetResponse -> String
$cshow :: GetAssetResponse -> String
showsPrec :: Int -> GetAssetResponse -> ShowS
$cshowsPrec :: Int -> GetAssetResponse -> ShowS
Prelude.Show, forall x. Rep GetAssetResponse x -> GetAssetResponse
forall x. GetAssetResponse -> Rep GetAssetResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetAssetResponse x -> GetAssetResponse
$cfrom :: forall x. GetAssetResponse -> Rep GetAssetResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetAssetResponse' 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', 'getAssetResponse_arn' - The ARN for the asset.
--
-- 'assetDetails', 'getAssetResponse_assetDetails' - Details about the asset.
--
-- 'assetType', 'getAssetResponse_assetType' - The type of asset that is added to a data set.
--
-- 'createdAt', 'getAssetResponse_createdAt' - The date and time that the asset was created, in ISO 8601 format.
--
-- 'dataSetId', 'getAssetResponse_dataSetId' - The unique identifier for the data set associated with this asset.
--
-- 'id', 'getAssetResponse_id' - The unique identifier for the asset.
--
-- 'name', 'getAssetResponse_name' - The name of the asset. When importing from Amazon S3, the Amazon S3
-- object key is used as the asset name. When exporting to Amazon S3, the
-- asset name is used as default target Amazon S3 object key. When
-- importing from Amazon API Gateway API, the API name is used as the asset
-- name. When importing from Amazon Redshift, the datashare name is used as
-- the asset name. When importing from AWS Lake Formation, the static
-- values of \"Database(s) included in the LF-tag policy\" or \"Table(s)
-- included in the LF-tag policy\" are used as the asset name.
--
-- 'revisionId', 'getAssetResponse_revisionId' - The unique identifier for the revision associated with this asset.
--
-- 'sourceId', 'getAssetResponse_sourceId' - The asset ID of the owned asset corresponding to the entitled asset
-- being viewed. This parameter is returned when an asset owner is viewing
-- the entitled copy of its owned asset.
--
-- 'updatedAt', 'getAssetResponse_updatedAt' - The date and time that the asset was last updated, in ISO 8601 format.
--
-- 'httpStatus', 'getAssetResponse_httpStatus' - The response's http status code.
newGetAssetResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetAssetResponse
newGetAssetResponse :: Int -> GetAssetResponse
newGetAssetResponse Int
pHttpStatus_ =
  GetAssetResponse'
    { $sel:arn:GetAssetResponse' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
      $sel:assetDetails:GetAssetResponse' :: Maybe AssetDetails
assetDetails = forall a. Maybe a
Prelude.Nothing,
      $sel:assetType:GetAssetResponse' :: Maybe AssetType
assetType = forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:GetAssetResponse' :: Maybe ISO8601
createdAt = forall a. Maybe a
Prelude.Nothing,
      $sel:dataSetId:GetAssetResponse' :: Maybe Text
dataSetId = forall a. Maybe a
Prelude.Nothing,
      $sel:id:GetAssetResponse' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
      $sel:name:GetAssetResponse' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
      $sel:revisionId:GetAssetResponse' :: Maybe Text
revisionId = forall a. Maybe a
Prelude.Nothing,
      $sel:sourceId:GetAssetResponse' :: Maybe Text
sourceId = forall a. Maybe a
Prelude.Nothing,
      $sel:updatedAt:GetAssetResponse' :: Maybe ISO8601
updatedAt = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetAssetResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The ARN for the asset.
getAssetResponse_arn :: Lens.Lens' GetAssetResponse (Prelude.Maybe Prelude.Text)
getAssetResponse_arn :: Lens' GetAssetResponse (Maybe Text)
getAssetResponse_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAssetResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:GetAssetResponse' :: GetAssetResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: GetAssetResponse
s@GetAssetResponse' {} Maybe Text
a -> GetAssetResponse
s {$sel:arn:GetAssetResponse' :: Maybe Text
arn = Maybe Text
a} :: GetAssetResponse)

-- | Details about the asset.
getAssetResponse_assetDetails :: Lens.Lens' GetAssetResponse (Prelude.Maybe AssetDetails)
getAssetResponse_assetDetails :: Lens' GetAssetResponse (Maybe AssetDetails)
getAssetResponse_assetDetails = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAssetResponse' {Maybe AssetDetails
assetDetails :: Maybe AssetDetails
$sel:assetDetails:GetAssetResponse' :: GetAssetResponse -> Maybe AssetDetails
assetDetails} -> Maybe AssetDetails
assetDetails) (\s :: GetAssetResponse
s@GetAssetResponse' {} Maybe AssetDetails
a -> GetAssetResponse
s {$sel:assetDetails:GetAssetResponse' :: Maybe AssetDetails
assetDetails = Maybe AssetDetails
a} :: GetAssetResponse)

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

-- | The date and time that the asset was created, in ISO 8601 format.
getAssetResponse_createdAt :: Lens.Lens' GetAssetResponse (Prelude.Maybe Prelude.UTCTime)
getAssetResponse_createdAt :: Lens' GetAssetResponse (Maybe UTCTime)
getAssetResponse_createdAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAssetResponse' {Maybe ISO8601
createdAt :: Maybe ISO8601
$sel:createdAt:GetAssetResponse' :: GetAssetResponse -> Maybe ISO8601
createdAt} -> Maybe ISO8601
createdAt) (\s :: GetAssetResponse
s@GetAssetResponse' {} Maybe ISO8601
a -> GetAssetResponse
s {$sel:createdAt:GetAssetResponse' :: Maybe ISO8601
createdAt = Maybe ISO8601
a} :: GetAssetResponse) 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 unique identifier for the data set associated with this asset.
getAssetResponse_dataSetId :: Lens.Lens' GetAssetResponse (Prelude.Maybe Prelude.Text)
getAssetResponse_dataSetId :: Lens' GetAssetResponse (Maybe Text)
getAssetResponse_dataSetId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAssetResponse' {Maybe Text
dataSetId :: Maybe Text
$sel:dataSetId:GetAssetResponse' :: GetAssetResponse -> Maybe Text
dataSetId} -> Maybe Text
dataSetId) (\s :: GetAssetResponse
s@GetAssetResponse' {} Maybe Text
a -> GetAssetResponse
s {$sel:dataSetId:GetAssetResponse' :: Maybe Text
dataSetId = Maybe Text
a} :: GetAssetResponse)

-- | The unique identifier for the asset.
getAssetResponse_id :: Lens.Lens' GetAssetResponse (Prelude.Maybe Prelude.Text)
getAssetResponse_id :: Lens' GetAssetResponse (Maybe Text)
getAssetResponse_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAssetResponse' {Maybe Text
id :: Maybe Text
$sel:id:GetAssetResponse' :: GetAssetResponse -> Maybe Text
id} -> Maybe Text
id) (\s :: GetAssetResponse
s@GetAssetResponse' {} Maybe Text
a -> GetAssetResponse
s {$sel:id:GetAssetResponse' :: Maybe Text
id = Maybe Text
a} :: GetAssetResponse)

-- | The name of the asset. When importing from Amazon S3, the Amazon S3
-- object key is used as the asset name. When exporting to Amazon S3, the
-- asset name is used as default target Amazon S3 object key. When
-- importing from Amazon API Gateway API, the API name is used as the asset
-- name. When importing from Amazon Redshift, the datashare name is used as
-- the asset name. When importing from AWS Lake Formation, the static
-- values of \"Database(s) included in the LF-tag policy\" or \"Table(s)
-- included in the LF-tag policy\" are used as the asset name.
getAssetResponse_name :: Lens.Lens' GetAssetResponse (Prelude.Maybe Prelude.Text)
getAssetResponse_name :: Lens' GetAssetResponse (Maybe Text)
getAssetResponse_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAssetResponse' {Maybe Text
name :: Maybe Text
$sel:name:GetAssetResponse' :: GetAssetResponse -> Maybe Text
name} -> Maybe Text
name) (\s :: GetAssetResponse
s@GetAssetResponse' {} Maybe Text
a -> GetAssetResponse
s {$sel:name:GetAssetResponse' :: Maybe Text
name = Maybe Text
a} :: GetAssetResponse)

-- | The unique identifier for the revision associated with this asset.
getAssetResponse_revisionId :: Lens.Lens' GetAssetResponse (Prelude.Maybe Prelude.Text)
getAssetResponse_revisionId :: Lens' GetAssetResponse (Maybe Text)
getAssetResponse_revisionId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAssetResponse' {Maybe Text
revisionId :: Maybe Text
$sel:revisionId:GetAssetResponse' :: GetAssetResponse -> Maybe Text
revisionId} -> Maybe Text
revisionId) (\s :: GetAssetResponse
s@GetAssetResponse' {} Maybe Text
a -> GetAssetResponse
s {$sel:revisionId:GetAssetResponse' :: Maybe Text
revisionId = Maybe Text
a} :: GetAssetResponse)

-- | The asset ID of the owned asset corresponding to the entitled asset
-- being viewed. This parameter is returned when an asset owner is viewing
-- the entitled copy of its owned asset.
getAssetResponse_sourceId :: Lens.Lens' GetAssetResponse (Prelude.Maybe Prelude.Text)
getAssetResponse_sourceId :: Lens' GetAssetResponse (Maybe Text)
getAssetResponse_sourceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAssetResponse' {Maybe Text
sourceId :: Maybe Text
$sel:sourceId:GetAssetResponse' :: GetAssetResponse -> Maybe Text
sourceId} -> Maybe Text
sourceId) (\s :: GetAssetResponse
s@GetAssetResponse' {} Maybe Text
a -> GetAssetResponse
s {$sel:sourceId:GetAssetResponse' :: Maybe Text
sourceId = Maybe Text
a} :: GetAssetResponse)

-- | The date and time that the asset was last updated, in ISO 8601 format.
getAssetResponse_updatedAt :: Lens.Lens' GetAssetResponse (Prelude.Maybe Prelude.UTCTime)
getAssetResponse_updatedAt :: Lens' GetAssetResponse (Maybe UTCTime)
getAssetResponse_updatedAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAssetResponse' {Maybe ISO8601
updatedAt :: Maybe ISO8601
$sel:updatedAt:GetAssetResponse' :: GetAssetResponse -> Maybe ISO8601
updatedAt} -> Maybe ISO8601
updatedAt) (\s :: GetAssetResponse
s@GetAssetResponse' {} Maybe ISO8601
a -> GetAssetResponse
s {$sel:updatedAt:GetAssetResponse' :: Maybe ISO8601
updatedAt = Maybe ISO8601
a} :: GetAssetResponse) 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.
getAssetResponse_httpStatus :: Lens.Lens' GetAssetResponse Prelude.Int
getAssetResponse_httpStatus :: Lens' GetAssetResponse Int
getAssetResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAssetResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetAssetResponse' :: GetAssetResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetAssetResponse
s@GetAssetResponse' {} Int
a -> GetAssetResponse
s {$sel:httpStatus:GetAssetResponse' :: Int
httpStatus = Int
a} :: GetAssetResponse)

instance Prelude.NFData GetAssetResponse where
  rnf :: GetAssetResponse -> ()
rnf GetAssetResponse' {Int
Maybe Text
Maybe ISO8601
Maybe AssetType
Maybe AssetDetails
httpStatus :: Int
updatedAt :: Maybe ISO8601
sourceId :: Maybe Text
revisionId :: Maybe Text
name :: Maybe Text
id :: Maybe Text
dataSetId :: Maybe Text
createdAt :: Maybe ISO8601
assetType :: Maybe AssetType
assetDetails :: Maybe AssetDetails
arn :: Maybe Text
$sel:httpStatus:GetAssetResponse' :: GetAssetResponse -> Int
$sel:updatedAt:GetAssetResponse' :: GetAssetResponse -> Maybe ISO8601
$sel:sourceId:GetAssetResponse' :: GetAssetResponse -> Maybe Text
$sel:revisionId:GetAssetResponse' :: GetAssetResponse -> Maybe Text
$sel:name:GetAssetResponse' :: GetAssetResponse -> Maybe Text
$sel:id:GetAssetResponse' :: GetAssetResponse -> Maybe Text
$sel:dataSetId:GetAssetResponse' :: GetAssetResponse -> Maybe Text
$sel:createdAt:GetAssetResponse' :: GetAssetResponse -> Maybe ISO8601
$sel:assetType:GetAssetResponse' :: GetAssetResponse -> Maybe AssetType
$sel:assetDetails:GetAssetResponse' :: GetAssetResponse -> Maybe AssetDetails
$sel:arn:GetAssetResponse' :: GetAssetResponse -> 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 AssetDetails
assetDetails
      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
dataSetId
      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 Text
revisionId
      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 ISO8601
updatedAt
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus