{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# 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.Types.ExportAssetToSignedUrlRequestDetails
-- 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)
module Amazonka.DataExchange.Types.ExportAssetToSignedUrlRequestDetails where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Details of the operation to be performed by the job.
--
-- /See:/ 'newExportAssetToSignedUrlRequestDetails' smart constructor.
data ExportAssetToSignedUrlRequestDetails = ExportAssetToSignedUrlRequestDetails'
  { -- | The unique identifier for the data set associated with this export job.
    ExportAssetToSignedUrlRequestDetails -> Text
dataSetId :: Prelude.Text,
    -- | The unique identifier for the asset that is exported to a signed URL.
    ExportAssetToSignedUrlRequestDetails -> Text
assetId :: Prelude.Text,
    -- | The unique identifier for the revision associated with this export
    -- request.
    ExportAssetToSignedUrlRequestDetails -> Text
revisionId :: Prelude.Text
  }
  deriving (ExportAssetToSignedUrlRequestDetails
-> ExportAssetToSignedUrlRequestDetails -> Bool
(ExportAssetToSignedUrlRequestDetails
 -> ExportAssetToSignedUrlRequestDetails -> Bool)
-> (ExportAssetToSignedUrlRequestDetails
    -> ExportAssetToSignedUrlRequestDetails -> Bool)
-> Eq ExportAssetToSignedUrlRequestDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExportAssetToSignedUrlRequestDetails
-> ExportAssetToSignedUrlRequestDetails -> Bool
$c/= :: ExportAssetToSignedUrlRequestDetails
-> ExportAssetToSignedUrlRequestDetails -> Bool
== :: ExportAssetToSignedUrlRequestDetails
-> ExportAssetToSignedUrlRequestDetails -> Bool
$c== :: ExportAssetToSignedUrlRequestDetails
-> ExportAssetToSignedUrlRequestDetails -> Bool
Prelude.Eq, ReadPrec [ExportAssetToSignedUrlRequestDetails]
ReadPrec ExportAssetToSignedUrlRequestDetails
Int -> ReadS ExportAssetToSignedUrlRequestDetails
ReadS [ExportAssetToSignedUrlRequestDetails]
(Int -> ReadS ExportAssetToSignedUrlRequestDetails)
-> ReadS [ExportAssetToSignedUrlRequestDetails]
-> ReadPrec ExportAssetToSignedUrlRequestDetails
-> ReadPrec [ExportAssetToSignedUrlRequestDetails]
-> Read ExportAssetToSignedUrlRequestDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ExportAssetToSignedUrlRequestDetails]
$creadListPrec :: ReadPrec [ExportAssetToSignedUrlRequestDetails]
readPrec :: ReadPrec ExportAssetToSignedUrlRequestDetails
$creadPrec :: ReadPrec ExportAssetToSignedUrlRequestDetails
readList :: ReadS [ExportAssetToSignedUrlRequestDetails]
$creadList :: ReadS [ExportAssetToSignedUrlRequestDetails]
readsPrec :: Int -> ReadS ExportAssetToSignedUrlRequestDetails
$creadsPrec :: Int -> ReadS ExportAssetToSignedUrlRequestDetails
Prelude.Read, Int -> ExportAssetToSignedUrlRequestDetails -> ShowS
[ExportAssetToSignedUrlRequestDetails] -> ShowS
ExportAssetToSignedUrlRequestDetails -> String
(Int -> ExportAssetToSignedUrlRequestDetails -> ShowS)
-> (ExportAssetToSignedUrlRequestDetails -> String)
-> ([ExportAssetToSignedUrlRequestDetails] -> ShowS)
-> Show ExportAssetToSignedUrlRequestDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ExportAssetToSignedUrlRequestDetails] -> ShowS
$cshowList :: [ExportAssetToSignedUrlRequestDetails] -> ShowS
show :: ExportAssetToSignedUrlRequestDetails -> String
$cshow :: ExportAssetToSignedUrlRequestDetails -> String
showsPrec :: Int -> ExportAssetToSignedUrlRequestDetails -> ShowS
$cshowsPrec :: Int -> ExportAssetToSignedUrlRequestDetails -> ShowS
Prelude.Show, (forall x.
 ExportAssetToSignedUrlRequestDetails
 -> Rep ExportAssetToSignedUrlRequestDetails x)
-> (forall x.
    Rep ExportAssetToSignedUrlRequestDetails x
    -> ExportAssetToSignedUrlRequestDetails)
-> Generic ExportAssetToSignedUrlRequestDetails
forall x.
Rep ExportAssetToSignedUrlRequestDetails x
-> ExportAssetToSignedUrlRequestDetails
forall x.
ExportAssetToSignedUrlRequestDetails
-> Rep ExportAssetToSignedUrlRequestDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ExportAssetToSignedUrlRequestDetails x
-> ExportAssetToSignedUrlRequestDetails
$cfrom :: forall x.
ExportAssetToSignedUrlRequestDetails
-> Rep ExportAssetToSignedUrlRequestDetails x
Prelude.Generic)

-- |
-- Create a value of 'ExportAssetToSignedUrlRequestDetails' 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', 'exportAssetToSignedUrlRequestDetails_dataSetId' - The unique identifier for the data set associated with this export job.
--
-- 'assetId', 'exportAssetToSignedUrlRequestDetails_assetId' - The unique identifier for the asset that is exported to a signed URL.
--
-- 'revisionId', 'exportAssetToSignedUrlRequestDetails_revisionId' - The unique identifier for the revision associated with this export
-- request.
newExportAssetToSignedUrlRequestDetails ::
  -- | 'dataSetId'
  Prelude.Text ->
  -- | 'assetId'
  Prelude.Text ->
  -- | 'revisionId'
  Prelude.Text ->
  ExportAssetToSignedUrlRequestDetails
newExportAssetToSignedUrlRequestDetails :: Text -> Text -> Text -> ExportAssetToSignedUrlRequestDetails
newExportAssetToSignedUrlRequestDetails
  Text
pDataSetId_
  Text
pAssetId_
  Text
pRevisionId_ =
    ExportAssetToSignedUrlRequestDetails' :: Text -> Text -> Text -> ExportAssetToSignedUrlRequestDetails
ExportAssetToSignedUrlRequestDetails'
      { $sel:dataSetId:ExportAssetToSignedUrlRequestDetails' :: Text
dataSetId =
          Text
pDataSetId_,
        $sel:assetId:ExportAssetToSignedUrlRequestDetails' :: Text
assetId = Text
pAssetId_,
        $sel:revisionId:ExportAssetToSignedUrlRequestDetails' :: Text
revisionId = Text
pRevisionId_
      }

-- | The unique identifier for the data set associated with this export job.
exportAssetToSignedUrlRequestDetails_dataSetId :: Lens.Lens' ExportAssetToSignedUrlRequestDetails Prelude.Text
exportAssetToSignedUrlRequestDetails_dataSetId :: (Text -> f Text)
-> ExportAssetToSignedUrlRequestDetails
-> f ExportAssetToSignedUrlRequestDetails
exportAssetToSignedUrlRequestDetails_dataSetId = (ExportAssetToSignedUrlRequestDetails -> Text)
-> (ExportAssetToSignedUrlRequestDetails
    -> Text -> ExportAssetToSignedUrlRequestDetails)
-> Lens
     ExportAssetToSignedUrlRequestDetails
     ExportAssetToSignedUrlRequestDetails
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportAssetToSignedUrlRequestDetails' {Text
dataSetId :: Text
$sel:dataSetId:ExportAssetToSignedUrlRequestDetails' :: ExportAssetToSignedUrlRequestDetails -> Text
dataSetId} -> Text
dataSetId) (\s :: ExportAssetToSignedUrlRequestDetails
s@ExportAssetToSignedUrlRequestDetails' {} Text
a -> ExportAssetToSignedUrlRequestDetails
s {$sel:dataSetId:ExportAssetToSignedUrlRequestDetails' :: Text
dataSetId = Text
a} :: ExportAssetToSignedUrlRequestDetails)

-- | The unique identifier for the asset that is exported to a signed URL.
exportAssetToSignedUrlRequestDetails_assetId :: Lens.Lens' ExportAssetToSignedUrlRequestDetails Prelude.Text
exportAssetToSignedUrlRequestDetails_assetId :: (Text -> f Text)
-> ExportAssetToSignedUrlRequestDetails
-> f ExportAssetToSignedUrlRequestDetails
exportAssetToSignedUrlRequestDetails_assetId = (ExportAssetToSignedUrlRequestDetails -> Text)
-> (ExportAssetToSignedUrlRequestDetails
    -> Text -> ExportAssetToSignedUrlRequestDetails)
-> Lens
     ExportAssetToSignedUrlRequestDetails
     ExportAssetToSignedUrlRequestDetails
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportAssetToSignedUrlRequestDetails' {Text
assetId :: Text
$sel:assetId:ExportAssetToSignedUrlRequestDetails' :: ExportAssetToSignedUrlRequestDetails -> Text
assetId} -> Text
assetId) (\s :: ExportAssetToSignedUrlRequestDetails
s@ExportAssetToSignedUrlRequestDetails' {} Text
a -> ExportAssetToSignedUrlRequestDetails
s {$sel:assetId:ExportAssetToSignedUrlRequestDetails' :: Text
assetId = Text
a} :: ExportAssetToSignedUrlRequestDetails)

-- | The unique identifier for the revision associated with this export
-- request.
exportAssetToSignedUrlRequestDetails_revisionId :: Lens.Lens' ExportAssetToSignedUrlRequestDetails Prelude.Text
exportAssetToSignedUrlRequestDetails_revisionId :: (Text -> f Text)
-> ExportAssetToSignedUrlRequestDetails
-> f ExportAssetToSignedUrlRequestDetails
exportAssetToSignedUrlRequestDetails_revisionId = (ExportAssetToSignedUrlRequestDetails -> Text)
-> (ExportAssetToSignedUrlRequestDetails
    -> Text -> ExportAssetToSignedUrlRequestDetails)
-> Lens
     ExportAssetToSignedUrlRequestDetails
     ExportAssetToSignedUrlRequestDetails
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportAssetToSignedUrlRequestDetails' {Text
revisionId :: Text
$sel:revisionId:ExportAssetToSignedUrlRequestDetails' :: ExportAssetToSignedUrlRequestDetails -> Text
revisionId} -> Text
revisionId) (\s :: ExportAssetToSignedUrlRequestDetails
s@ExportAssetToSignedUrlRequestDetails' {} Text
a -> ExportAssetToSignedUrlRequestDetails
s {$sel:revisionId:ExportAssetToSignedUrlRequestDetails' :: Text
revisionId = Text
a} :: ExportAssetToSignedUrlRequestDetails)

instance
  Prelude.Hashable
    ExportAssetToSignedUrlRequestDetails

instance
  Prelude.NFData
    ExportAssetToSignedUrlRequestDetails

instance
  Core.ToJSON
    ExportAssetToSignedUrlRequestDetails
  where
  toJSON :: ExportAssetToSignedUrlRequestDetails -> Value
toJSON ExportAssetToSignedUrlRequestDetails' {Text
revisionId :: Text
assetId :: Text
dataSetId :: Text
$sel:revisionId:ExportAssetToSignedUrlRequestDetails' :: ExportAssetToSignedUrlRequestDetails -> Text
$sel:assetId:ExportAssetToSignedUrlRequestDetails' :: ExportAssetToSignedUrlRequestDetails -> Text
$sel:dataSetId:ExportAssetToSignedUrlRequestDetails' :: ExportAssetToSignedUrlRequestDetails -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"DataSetId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
dataSetId),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"AssetId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
assetId),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"RevisionId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
revisionId)
          ]
      )