{-# 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.ImportAssetFromSignedUrlJobErrorDetails
-- 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.ImportAssetFromSignedUrlJobErrorDetails where

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

-- | Information about the job error.
--
-- /See:/ 'newImportAssetFromSignedUrlJobErrorDetails' smart constructor.
data ImportAssetFromSignedUrlJobErrorDetails = ImportAssetFromSignedUrlJobErrorDetails'
  { -- | Information about the job error.
    ImportAssetFromSignedUrlJobErrorDetails -> Text
assetName :: Prelude.Text
  }
  deriving (ImportAssetFromSignedUrlJobErrorDetails
-> ImportAssetFromSignedUrlJobErrorDetails -> Bool
(ImportAssetFromSignedUrlJobErrorDetails
 -> ImportAssetFromSignedUrlJobErrorDetails -> Bool)
-> (ImportAssetFromSignedUrlJobErrorDetails
    -> ImportAssetFromSignedUrlJobErrorDetails -> Bool)
-> Eq ImportAssetFromSignedUrlJobErrorDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ImportAssetFromSignedUrlJobErrorDetails
-> ImportAssetFromSignedUrlJobErrorDetails -> Bool
$c/= :: ImportAssetFromSignedUrlJobErrorDetails
-> ImportAssetFromSignedUrlJobErrorDetails -> Bool
== :: ImportAssetFromSignedUrlJobErrorDetails
-> ImportAssetFromSignedUrlJobErrorDetails -> Bool
$c== :: ImportAssetFromSignedUrlJobErrorDetails
-> ImportAssetFromSignedUrlJobErrorDetails -> Bool
Prelude.Eq, ReadPrec [ImportAssetFromSignedUrlJobErrorDetails]
ReadPrec ImportAssetFromSignedUrlJobErrorDetails
Int -> ReadS ImportAssetFromSignedUrlJobErrorDetails
ReadS [ImportAssetFromSignedUrlJobErrorDetails]
(Int -> ReadS ImportAssetFromSignedUrlJobErrorDetails)
-> ReadS [ImportAssetFromSignedUrlJobErrorDetails]
-> ReadPrec ImportAssetFromSignedUrlJobErrorDetails
-> ReadPrec [ImportAssetFromSignedUrlJobErrorDetails]
-> Read ImportAssetFromSignedUrlJobErrorDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ImportAssetFromSignedUrlJobErrorDetails]
$creadListPrec :: ReadPrec [ImportAssetFromSignedUrlJobErrorDetails]
readPrec :: ReadPrec ImportAssetFromSignedUrlJobErrorDetails
$creadPrec :: ReadPrec ImportAssetFromSignedUrlJobErrorDetails
readList :: ReadS [ImportAssetFromSignedUrlJobErrorDetails]
$creadList :: ReadS [ImportAssetFromSignedUrlJobErrorDetails]
readsPrec :: Int -> ReadS ImportAssetFromSignedUrlJobErrorDetails
$creadsPrec :: Int -> ReadS ImportAssetFromSignedUrlJobErrorDetails
Prelude.Read, Int -> ImportAssetFromSignedUrlJobErrorDetails -> ShowS
[ImportAssetFromSignedUrlJobErrorDetails] -> ShowS
ImportAssetFromSignedUrlJobErrorDetails -> String
(Int -> ImportAssetFromSignedUrlJobErrorDetails -> ShowS)
-> (ImportAssetFromSignedUrlJobErrorDetails -> String)
-> ([ImportAssetFromSignedUrlJobErrorDetails] -> ShowS)
-> Show ImportAssetFromSignedUrlJobErrorDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ImportAssetFromSignedUrlJobErrorDetails] -> ShowS
$cshowList :: [ImportAssetFromSignedUrlJobErrorDetails] -> ShowS
show :: ImportAssetFromSignedUrlJobErrorDetails -> String
$cshow :: ImportAssetFromSignedUrlJobErrorDetails -> String
showsPrec :: Int -> ImportAssetFromSignedUrlJobErrorDetails -> ShowS
$cshowsPrec :: Int -> ImportAssetFromSignedUrlJobErrorDetails -> ShowS
Prelude.Show, (forall x.
 ImportAssetFromSignedUrlJobErrorDetails
 -> Rep ImportAssetFromSignedUrlJobErrorDetails x)
-> (forall x.
    Rep ImportAssetFromSignedUrlJobErrorDetails x
    -> ImportAssetFromSignedUrlJobErrorDetails)
-> Generic ImportAssetFromSignedUrlJobErrorDetails
forall x.
Rep ImportAssetFromSignedUrlJobErrorDetails x
-> ImportAssetFromSignedUrlJobErrorDetails
forall x.
ImportAssetFromSignedUrlJobErrorDetails
-> Rep ImportAssetFromSignedUrlJobErrorDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ImportAssetFromSignedUrlJobErrorDetails x
-> ImportAssetFromSignedUrlJobErrorDetails
$cfrom :: forall x.
ImportAssetFromSignedUrlJobErrorDetails
-> Rep ImportAssetFromSignedUrlJobErrorDetails x
Prelude.Generic)

-- |
-- Create a value of 'ImportAssetFromSignedUrlJobErrorDetails' 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:
--
-- 'assetName', 'importAssetFromSignedUrlJobErrorDetails_assetName' - Information about the job error.
newImportAssetFromSignedUrlJobErrorDetails ::
  -- | 'assetName'
  Prelude.Text ->
  ImportAssetFromSignedUrlJobErrorDetails
newImportAssetFromSignedUrlJobErrorDetails :: Text -> ImportAssetFromSignedUrlJobErrorDetails
newImportAssetFromSignedUrlJobErrorDetails
  Text
pAssetName_ =
    ImportAssetFromSignedUrlJobErrorDetails' :: Text -> ImportAssetFromSignedUrlJobErrorDetails
ImportAssetFromSignedUrlJobErrorDetails'
      { $sel:assetName:ImportAssetFromSignedUrlJobErrorDetails' :: Text
assetName =
          Text
pAssetName_
      }

-- | Information about the job error.
importAssetFromSignedUrlJobErrorDetails_assetName :: Lens.Lens' ImportAssetFromSignedUrlJobErrorDetails Prelude.Text
importAssetFromSignedUrlJobErrorDetails_assetName :: (Text -> f Text)
-> ImportAssetFromSignedUrlJobErrorDetails
-> f ImportAssetFromSignedUrlJobErrorDetails
importAssetFromSignedUrlJobErrorDetails_assetName = (ImportAssetFromSignedUrlJobErrorDetails -> Text)
-> (ImportAssetFromSignedUrlJobErrorDetails
    -> Text -> ImportAssetFromSignedUrlJobErrorDetails)
-> Lens
     ImportAssetFromSignedUrlJobErrorDetails
     ImportAssetFromSignedUrlJobErrorDetails
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportAssetFromSignedUrlJobErrorDetails' {Text
assetName :: Text
$sel:assetName:ImportAssetFromSignedUrlJobErrorDetails' :: ImportAssetFromSignedUrlJobErrorDetails -> Text
assetName} -> Text
assetName) (\s :: ImportAssetFromSignedUrlJobErrorDetails
s@ImportAssetFromSignedUrlJobErrorDetails' {} Text
a -> ImportAssetFromSignedUrlJobErrorDetails
s {$sel:assetName:ImportAssetFromSignedUrlJobErrorDetails' :: Text
assetName = Text
a} :: ImportAssetFromSignedUrlJobErrorDetails)

instance
  Core.FromJSON
    ImportAssetFromSignedUrlJobErrorDetails
  where
  parseJSON :: Value -> Parser ImportAssetFromSignedUrlJobErrorDetails
parseJSON =
    String
-> (Object -> Parser ImportAssetFromSignedUrlJobErrorDetails)
-> Value
-> Parser ImportAssetFromSignedUrlJobErrorDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ImportAssetFromSignedUrlJobErrorDetails"
      ( \Object
x ->
          Text -> ImportAssetFromSignedUrlJobErrorDetails
ImportAssetFromSignedUrlJobErrorDetails'
            (Text -> ImportAssetFromSignedUrlJobErrorDetails)
-> Parser Text -> Parser ImportAssetFromSignedUrlJobErrorDetails
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"AssetName")
      )

instance
  Prelude.Hashable
    ImportAssetFromSignedUrlJobErrorDetails

instance
  Prelude.NFData
    ImportAssetFromSignedUrlJobErrorDetails