{-# 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.Omics.Types.AnnotationImportItemDetail
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Omics.Types.AnnotationImportItemDetail where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Omics.Types.JobStatus
import qualified Amazonka.Prelude as Prelude

-- | Details about an imported annotation item.
--
-- /See:/ 'newAnnotationImportItemDetail' smart constructor.
data AnnotationImportItemDetail = AnnotationImportItemDetail'
  { -- | The item\'s job status.
    AnnotationImportItemDetail -> JobStatus
jobStatus :: JobStatus,
    -- | The source file\'s location in Amazon S3.
    AnnotationImportItemDetail -> Text
source :: Prelude.Text
  }
  deriving (AnnotationImportItemDetail -> AnnotationImportItemDetail -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AnnotationImportItemDetail -> AnnotationImportItemDetail -> Bool
$c/= :: AnnotationImportItemDetail -> AnnotationImportItemDetail -> Bool
== :: AnnotationImportItemDetail -> AnnotationImportItemDetail -> Bool
$c== :: AnnotationImportItemDetail -> AnnotationImportItemDetail -> Bool
Prelude.Eq, ReadPrec [AnnotationImportItemDetail]
ReadPrec AnnotationImportItemDetail
Int -> ReadS AnnotationImportItemDetail
ReadS [AnnotationImportItemDetail]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AnnotationImportItemDetail]
$creadListPrec :: ReadPrec [AnnotationImportItemDetail]
readPrec :: ReadPrec AnnotationImportItemDetail
$creadPrec :: ReadPrec AnnotationImportItemDetail
readList :: ReadS [AnnotationImportItemDetail]
$creadList :: ReadS [AnnotationImportItemDetail]
readsPrec :: Int -> ReadS AnnotationImportItemDetail
$creadsPrec :: Int -> ReadS AnnotationImportItemDetail
Prelude.Read, Int -> AnnotationImportItemDetail -> ShowS
[AnnotationImportItemDetail] -> ShowS
AnnotationImportItemDetail -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AnnotationImportItemDetail] -> ShowS
$cshowList :: [AnnotationImportItemDetail] -> ShowS
show :: AnnotationImportItemDetail -> String
$cshow :: AnnotationImportItemDetail -> String
showsPrec :: Int -> AnnotationImportItemDetail -> ShowS
$cshowsPrec :: Int -> AnnotationImportItemDetail -> ShowS
Prelude.Show, forall x.
Rep AnnotationImportItemDetail x -> AnnotationImportItemDetail
forall x.
AnnotationImportItemDetail -> Rep AnnotationImportItemDetail x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AnnotationImportItemDetail x -> AnnotationImportItemDetail
$cfrom :: forall x.
AnnotationImportItemDetail -> Rep AnnotationImportItemDetail x
Prelude.Generic)

-- |
-- Create a value of 'AnnotationImportItemDetail' 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:
--
-- 'jobStatus', 'annotationImportItemDetail_jobStatus' - The item\'s job status.
--
-- 'source', 'annotationImportItemDetail_source' - The source file\'s location in Amazon S3.
newAnnotationImportItemDetail ::
  -- | 'jobStatus'
  JobStatus ->
  -- | 'source'
  Prelude.Text ->
  AnnotationImportItemDetail
newAnnotationImportItemDetail :: JobStatus -> Text -> AnnotationImportItemDetail
newAnnotationImportItemDetail JobStatus
pJobStatus_ Text
pSource_ =
  AnnotationImportItemDetail'
    { $sel:jobStatus:AnnotationImportItemDetail' :: JobStatus
jobStatus =
        JobStatus
pJobStatus_,
      $sel:source:AnnotationImportItemDetail' :: Text
source = Text
pSource_
    }

-- | The item\'s job status.
annotationImportItemDetail_jobStatus :: Lens.Lens' AnnotationImportItemDetail JobStatus
annotationImportItemDetail_jobStatus :: Lens' AnnotationImportItemDetail JobStatus
annotationImportItemDetail_jobStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AnnotationImportItemDetail' {JobStatus
jobStatus :: JobStatus
$sel:jobStatus:AnnotationImportItemDetail' :: AnnotationImportItemDetail -> JobStatus
jobStatus} -> JobStatus
jobStatus) (\s :: AnnotationImportItemDetail
s@AnnotationImportItemDetail' {} JobStatus
a -> AnnotationImportItemDetail
s {$sel:jobStatus:AnnotationImportItemDetail' :: JobStatus
jobStatus = JobStatus
a} :: AnnotationImportItemDetail)

-- | The source file\'s location in Amazon S3.
annotationImportItemDetail_source :: Lens.Lens' AnnotationImportItemDetail Prelude.Text
annotationImportItemDetail_source :: Lens' AnnotationImportItemDetail Text
annotationImportItemDetail_source = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AnnotationImportItemDetail' {Text
source :: Text
$sel:source:AnnotationImportItemDetail' :: AnnotationImportItemDetail -> Text
source} -> Text
source) (\s :: AnnotationImportItemDetail
s@AnnotationImportItemDetail' {} Text
a -> AnnotationImportItemDetail
s {$sel:source:AnnotationImportItemDetail' :: Text
source = Text
a} :: AnnotationImportItemDetail)

instance Data.FromJSON AnnotationImportItemDetail where
  parseJSON :: Value -> Parser AnnotationImportItemDetail
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"AnnotationImportItemDetail"
      ( \Object
x ->
          JobStatus -> Text -> AnnotationImportItemDetail
AnnotationImportItemDetail'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"jobStatus")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"source")
      )

instance Prelude.Hashable AnnotationImportItemDetail where
  hashWithSalt :: Int -> AnnotationImportItemDetail -> Int
hashWithSalt Int
_salt AnnotationImportItemDetail' {Text
JobStatus
source :: Text
jobStatus :: JobStatus
$sel:source:AnnotationImportItemDetail' :: AnnotationImportItemDetail -> Text
$sel:jobStatus:AnnotationImportItemDetail' :: AnnotationImportItemDetail -> JobStatus
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` JobStatus
jobStatus
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
source

instance Prelude.NFData AnnotationImportItemDetail where
  rnf :: AnnotationImportItemDetail -> ()
rnf AnnotationImportItemDetail' {Text
JobStatus
source :: Text
jobStatus :: JobStatus
$sel:source:AnnotationImportItemDetail' :: AnnotationImportItemDetail -> Text
$sel:jobStatus:AnnotationImportItemDetail' :: AnnotationImportItemDetail -> JobStatus
..} =
    forall a. NFData a => a -> ()
Prelude.rnf JobStatus
jobStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
source