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

    -- * Request Lenses
    updateAsset_assetId,
    updateAsset_dataSetId,
    updateAsset_name,
    updateAsset_revisionId,

    -- * Destructuring the Response
    UpdateAssetResponse (..),
    newUpdateAssetResponse,

    -- * Response Lenses
    updateAssetResponse_arn,
    updateAssetResponse_assetDetails,
    updateAssetResponse_assetType,
    updateAssetResponse_createdAt,
    updateAssetResponse_dataSetId,
    updateAssetResponse_id,
    updateAssetResponse_name,
    updateAssetResponse_revisionId,
    updateAssetResponse_sourceId,
    updateAssetResponse_updatedAt,
    updateAssetResponse_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:/ 'newUpdateAsset' smart constructor.
data UpdateAsset = UpdateAsset'
  { -- | The unique identifier for an asset.
    UpdateAsset -> Text
assetId :: Prelude.Text,
    -- | The unique identifier for a data set.
    UpdateAsset -> Text
dataSetId :: 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 LF-tag policy\" are used as the name.
    UpdateAsset -> Text
name :: Prelude.Text,
    -- | The unique identifier for a revision.
    UpdateAsset -> Text
revisionId :: Prelude.Text
  }
  deriving (UpdateAsset -> UpdateAsset -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateAsset -> UpdateAsset -> Bool
$c/= :: UpdateAsset -> UpdateAsset -> Bool
== :: UpdateAsset -> UpdateAsset -> Bool
$c== :: UpdateAsset -> UpdateAsset -> Bool
Prelude.Eq, ReadPrec [UpdateAsset]
ReadPrec UpdateAsset
Int -> ReadS UpdateAsset
ReadS [UpdateAsset]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateAsset]
$creadListPrec :: ReadPrec [UpdateAsset]
readPrec :: ReadPrec UpdateAsset
$creadPrec :: ReadPrec UpdateAsset
readList :: ReadS [UpdateAsset]
$creadList :: ReadS [UpdateAsset]
readsPrec :: Int -> ReadS UpdateAsset
$creadsPrec :: Int -> ReadS UpdateAsset
Prelude.Read, Int -> UpdateAsset -> ShowS
[UpdateAsset] -> ShowS
UpdateAsset -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateAsset] -> ShowS
$cshowList :: [UpdateAsset] -> ShowS
show :: UpdateAsset -> String
$cshow :: UpdateAsset -> String
showsPrec :: Int -> UpdateAsset -> ShowS
$cshowsPrec :: Int -> UpdateAsset -> ShowS
Prelude.Show, forall x. Rep UpdateAsset x -> UpdateAsset
forall x. UpdateAsset -> Rep UpdateAsset x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateAsset x -> UpdateAsset
$cfrom :: forall x. UpdateAsset -> Rep UpdateAsset x
Prelude.Generic)

-- |
-- Create a value of 'UpdateAsset' 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', 'updateAsset_assetId' - The unique identifier for an asset.
--
-- 'dataSetId', 'updateAsset_dataSetId' - The unique identifier for a data set.
--
-- 'name', 'updateAsset_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 LF-tag policy\" are used as the name.
--
-- 'revisionId', 'updateAsset_revisionId' - The unique identifier for a revision.
newUpdateAsset ::
  -- | 'assetId'
  Prelude.Text ->
  -- | 'dataSetId'
  Prelude.Text ->
  -- | 'name'
  Prelude.Text ->
  -- | 'revisionId'
  Prelude.Text ->
  UpdateAsset
newUpdateAsset :: Text -> Text -> Text -> Text -> UpdateAsset
newUpdateAsset
  Text
pAssetId_
  Text
pDataSetId_
  Text
pName_
  Text
pRevisionId_ =
    UpdateAsset'
      { $sel:assetId:UpdateAsset' :: Text
assetId = Text
pAssetId_,
        $sel:dataSetId:UpdateAsset' :: Text
dataSetId = Text
pDataSetId_,
        $sel:name:UpdateAsset' :: Text
name = Text
pName_,
        $sel:revisionId:UpdateAsset' :: Text
revisionId = Text
pRevisionId_
      }

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

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

-- | 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 LF-tag policy\" are used as the name.
updateAsset_name :: Lens.Lens' UpdateAsset Prelude.Text
updateAsset_name :: Lens' UpdateAsset Text
updateAsset_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAsset' {Text
name :: Text
$sel:name:UpdateAsset' :: UpdateAsset -> Text
name} -> Text
name) (\s :: UpdateAsset
s@UpdateAsset' {} Text
a -> UpdateAsset
s {$sel:name:UpdateAsset' :: Text
name = Text
a} :: UpdateAsset)

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

instance Core.AWSRequest UpdateAsset where
  type AWSResponse UpdateAsset = UpdateAssetResponse
  request :: (Service -> Service) -> UpdateAsset -> Request UpdateAsset
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.patchJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy UpdateAsset
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateAsset)))
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
-> UpdateAssetResponse
UpdateAssetResponse'
            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 UpdateAsset where
  hashWithSalt :: Int -> UpdateAsset -> Int
hashWithSalt Int
_salt UpdateAsset' {Text
revisionId :: Text
name :: Text
dataSetId :: Text
assetId :: Text
$sel:revisionId:UpdateAsset' :: UpdateAsset -> Text
$sel:name:UpdateAsset' :: UpdateAsset -> Text
$sel:dataSetId:UpdateAsset' :: UpdateAsset -> Text
$sel:assetId:UpdateAsset' :: UpdateAsset -> 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
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
revisionId

instance Prelude.NFData UpdateAsset where
  rnf :: UpdateAsset -> ()
rnf UpdateAsset' {Text
revisionId :: Text
name :: Text
dataSetId :: Text
assetId :: Text
$sel:revisionId:UpdateAsset' :: UpdateAsset -> Text
$sel:name:UpdateAsset' :: UpdateAsset -> Text
$sel:dataSetId:UpdateAsset' :: UpdateAsset -> Text
$sel:assetId:UpdateAsset' :: UpdateAsset -> 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
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
revisionId

instance Data.ToHeaders UpdateAsset where
  toHeaders :: UpdateAsset -> 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.ToJSON UpdateAsset where
  toJSON :: UpdateAsset -> Value
toJSON UpdateAsset' {Text
revisionId :: Text
name :: Text
dataSetId :: Text
assetId :: Text
$sel:revisionId:UpdateAsset' :: UpdateAsset -> Text
$sel:name:UpdateAsset' :: UpdateAsset -> Text
$sel:dataSetId:UpdateAsset' :: UpdateAsset -> Text
$sel:assetId:UpdateAsset' :: UpdateAsset -> Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [forall a. a -> Maybe a
Prelude.Just (Key
"Name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
name)]
      )

instance Data.ToPath UpdateAsset where
  toPath :: UpdateAsset -> ByteString
toPath UpdateAsset' {Text
revisionId :: Text
name :: Text
dataSetId :: Text
assetId :: Text
$sel:revisionId:UpdateAsset' :: UpdateAsset -> Text
$sel:name:UpdateAsset' :: UpdateAsset -> Text
$sel:dataSetId:UpdateAsset' :: UpdateAsset -> Text
$sel:assetId:UpdateAsset' :: UpdateAsset -> 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 UpdateAsset where
  toQuery :: UpdateAsset -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newUpdateAssetResponse' smart constructor.
data UpdateAssetResponse = UpdateAssetResponse'
  { -- | The ARN for the asset.
    UpdateAssetResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | Details about the asset.
    UpdateAssetResponse -> Maybe AssetDetails
assetDetails :: Prelude.Maybe AssetDetails,
    -- | The type of asset that is added to a data set.
    UpdateAssetResponse -> Maybe AssetType
assetType :: Prelude.Maybe AssetType,
    -- | The date and time that the asset was created, in ISO 8601 format.
    UpdateAssetResponse -> Maybe ISO8601
createdAt :: Prelude.Maybe Data.ISO8601,
    -- | The unique identifier for the data set associated with this asset.
    UpdateAssetResponse -> Maybe Text
dataSetId :: Prelude.Maybe Prelude.Text,
    -- | The unique identifier for the asset.
    UpdateAssetResponse -> 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 LF-tag policy\" are used as the asset name.
    UpdateAssetResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The unique identifier for the revision associated with this asset.
    UpdateAssetResponse -> 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.
    UpdateAssetResponse -> Maybe Text
sourceId :: Prelude.Maybe Prelude.Text,
    -- | The date and time that the asset was last updated, in ISO 8601 format.
    UpdateAssetResponse -> Maybe ISO8601
updatedAt :: Prelude.Maybe Data.ISO8601,
    -- | The response's http status code.
    UpdateAssetResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateAssetResponse -> UpdateAssetResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateAssetResponse -> UpdateAssetResponse -> Bool
$c/= :: UpdateAssetResponse -> UpdateAssetResponse -> Bool
== :: UpdateAssetResponse -> UpdateAssetResponse -> Bool
$c== :: UpdateAssetResponse -> UpdateAssetResponse -> Bool
Prelude.Eq, ReadPrec [UpdateAssetResponse]
ReadPrec UpdateAssetResponse
Int -> ReadS UpdateAssetResponse
ReadS [UpdateAssetResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateAssetResponse]
$creadListPrec :: ReadPrec [UpdateAssetResponse]
readPrec :: ReadPrec UpdateAssetResponse
$creadPrec :: ReadPrec UpdateAssetResponse
readList :: ReadS [UpdateAssetResponse]
$creadList :: ReadS [UpdateAssetResponse]
readsPrec :: Int -> ReadS UpdateAssetResponse
$creadsPrec :: Int -> ReadS UpdateAssetResponse
Prelude.Read, Int -> UpdateAssetResponse -> ShowS
[UpdateAssetResponse] -> ShowS
UpdateAssetResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateAssetResponse] -> ShowS
$cshowList :: [UpdateAssetResponse] -> ShowS
show :: UpdateAssetResponse -> String
$cshow :: UpdateAssetResponse -> String
showsPrec :: Int -> UpdateAssetResponse -> ShowS
$cshowsPrec :: Int -> UpdateAssetResponse -> ShowS
Prelude.Show, forall x. Rep UpdateAssetResponse x -> UpdateAssetResponse
forall x. UpdateAssetResponse -> Rep UpdateAssetResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateAssetResponse x -> UpdateAssetResponse
$cfrom :: forall x. UpdateAssetResponse -> Rep UpdateAssetResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateAssetResponse' 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', 'updateAssetResponse_arn' - The ARN for the asset.
--
-- 'assetDetails', 'updateAssetResponse_assetDetails' - Details about the asset.
--
-- 'assetType', 'updateAssetResponse_assetType' - The type of asset that is added to a data set.
--
-- 'createdAt', 'updateAssetResponse_createdAt' - The date and time that the asset was created, in ISO 8601 format.
--
-- 'dataSetId', 'updateAssetResponse_dataSetId' - The unique identifier for the data set associated with this asset.
--
-- 'id', 'updateAssetResponse_id' - The unique identifier for the asset.
--
-- 'name', 'updateAssetResponse_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 LF-tag policy\" are used as the asset name.
--
-- 'revisionId', 'updateAssetResponse_revisionId' - The unique identifier for the revision associated with this asset.
--
-- 'sourceId', 'updateAssetResponse_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', 'updateAssetResponse_updatedAt' - The date and time that the asset was last updated, in ISO 8601 format.
--
-- 'httpStatus', 'updateAssetResponse_httpStatus' - The response's http status code.
newUpdateAssetResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateAssetResponse
newUpdateAssetResponse :: Int -> UpdateAssetResponse
newUpdateAssetResponse Int
pHttpStatus_ =
  UpdateAssetResponse'
    { $sel:arn:UpdateAssetResponse' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
      $sel:assetDetails:UpdateAssetResponse' :: Maybe AssetDetails
assetDetails = forall a. Maybe a
Prelude.Nothing,
      $sel:assetType:UpdateAssetResponse' :: Maybe AssetType
assetType = forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:UpdateAssetResponse' :: Maybe ISO8601
createdAt = forall a. Maybe a
Prelude.Nothing,
      $sel:dataSetId:UpdateAssetResponse' :: Maybe Text
dataSetId = forall a. Maybe a
Prelude.Nothing,
      $sel:id:UpdateAssetResponse' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
      $sel:name:UpdateAssetResponse' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
      $sel:revisionId:UpdateAssetResponse' :: Maybe Text
revisionId = forall a. Maybe a
Prelude.Nothing,
      $sel:sourceId:UpdateAssetResponse' :: Maybe Text
sourceId = forall a. Maybe a
Prelude.Nothing,
      $sel:updatedAt:UpdateAssetResponse' :: Maybe ISO8601
updatedAt = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateAssetResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

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

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

-- | The date and time that the asset was created, in ISO 8601 format.
updateAssetResponse_createdAt :: Lens.Lens' UpdateAssetResponse (Prelude.Maybe Prelude.UTCTime)
updateAssetResponse_createdAt :: Lens' UpdateAssetResponse (Maybe UTCTime)
updateAssetResponse_createdAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAssetResponse' {Maybe ISO8601
createdAt :: Maybe ISO8601
$sel:createdAt:UpdateAssetResponse' :: UpdateAssetResponse -> Maybe ISO8601
createdAt} -> Maybe ISO8601
createdAt) (\s :: UpdateAssetResponse
s@UpdateAssetResponse' {} Maybe ISO8601
a -> UpdateAssetResponse
s {$sel:createdAt:UpdateAssetResponse' :: Maybe ISO8601
createdAt = Maybe ISO8601
a} :: UpdateAssetResponse) 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.
updateAssetResponse_dataSetId :: Lens.Lens' UpdateAssetResponse (Prelude.Maybe Prelude.Text)
updateAssetResponse_dataSetId :: Lens' UpdateAssetResponse (Maybe Text)
updateAssetResponse_dataSetId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAssetResponse' {Maybe Text
dataSetId :: Maybe Text
$sel:dataSetId:UpdateAssetResponse' :: UpdateAssetResponse -> Maybe Text
dataSetId} -> Maybe Text
dataSetId) (\s :: UpdateAssetResponse
s@UpdateAssetResponse' {} Maybe Text
a -> UpdateAssetResponse
s {$sel:dataSetId:UpdateAssetResponse' :: Maybe Text
dataSetId = Maybe Text
a} :: UpdateAssetResponse)

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

-- | 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 LF-tag policy\" are used as the asset name.
updateAssetResponse_name :: Lens.Lens' UpdateAssetResponse (Prelude.Maybe Prelude.Text)
updateAssetResponse_name :: Lens' UpdateAssetResponse (Maybe Text)
updateAssetResponse_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAssetResponse' {Maybe Text
name :: Maybe Text
$sel:name:UpdateAssetResponse' :: UpdateAssetResponse -> Maybe Text
name} -> Maybe Text
name) (\s :: UpdateAssetResponse
s@UpdateAssetResponse' {} Maybe Text
a -> UpdateAssetResponse
s {$sel:name:UpdateAssetResponse' :: Maybe Text
name = Maybe Text
a} :: UpdateAssetResponse)

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

-- | 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.
updateAssetResponse_sourceId :: Lens.Lens' UpdateAssetResponse (Prelude.Maybe Prelude.Text)
updateAssetResponse_sourceId :: Lens' UpdateAssetResponse (Maybe Text)
updateAssetResponse_sourceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAssetResponse' {Maybe Text
sourceId :: Maybe Text
$sel:sourceId:UpdateAssetResponse' :: UpdateAssetResponse -> Maybe Text
sourceId} -> Maybe Text
sourceId) (\s :: UpdateAssetResponse
s@UpdateAssetResponse' {} Maybe Text
a -> UpdateAssetResponse
s {$sel:sourceId:UpdateAssetResponse' :: Maybe Text
sourceId = Maybe Text
a} :: UpdateAssetResponse)

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

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