{-# 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.AnnotationImportJobItem
-- 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.AnnotationImportJobItem 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

-- | An annotation import job.
--
-- /See:/ 'newAnnotationImportJobItem' smart constructor.
data AnnotationImportJobItem = AnnotationImportJobItem'
  { -- | When the job completed.
    AnnotationImportJobItem -> Maybe ISO8601
completionTime :: Prelude.Maybe Data.ISO8601,
    -- | The job\'s left normalization setting.
    AnnotationImportJobItem -> Maybe Bool
runLeftNormalization :: Prelude.Maybe Prelude.Bool,
    -- | When the job was created.
    AnnotationImportJobItem -> ISO8601
creationTime :: Data.ISO8601,
    -- | The job\'s destination annotation store.
    AnnotationImportJobItem -> Text
destinationName :: Prelude.Text,
    -- | The job\'s ID.
    AnnotationImportJobItem -> Text
id :: Prelude.Text,
    -- | The job\'s service role ARN.
    AnnotationImportJobItem -> Text
roleArn :: Prelude.Text,
    -- | The job\'s status.
    AnnotationImportJobItem -> JobStatus
status :: JobStatus,
    -- | When the job was updated.
    AnnotationImportJobItem -> ISO8601
updateTime :: Data.ISO8601
  }
  deriving (AnnotationImportJobItem -> AnnotationImportJobItem -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AnnotationImportJobItem -> AnnotationImportJobItem -> Bool
$c/= :: AnnotationImportJobItem -> AnnotationImportJobItem -> Bool
== :: AnnotationImportJobItem -> AnnotationImportJobItem -> Bool
$c== :: AnnotationImportJobItem -> AnnotationImportJobItem -> Bool
Prelude.Eq, ReadPrec [AnnotationImportJobItem]
ReadPrec AnnotationImportJobItem
Int -> ReadS AnnotationImportJobItem
ReadS [AnnotationImportJobItem]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AnnotationImportJobItem]
$creadListPrec :: ReadPrec [AnnotationImportJobItem]
readPrec :: ReadPrec AnnotationImportJobItem
$creadPrec :: ReadPrec AnnotationImportJobItem
readList :: ReadS [AnnotationImportJobItem]
$creadList :: ReadS [AnnotationImportJobItem]
readsPrec :: Int -> ReadS AnnotationImportJobItem
$creadsPrec :: Int -> ReadS AnnotationImportJobItem
Prelude.Read, Int -> AnnotationImportJobItem -> ShowS
[AnnotationImportJobItem] -> ShowS
AnnotationImportJobItem -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AnnotationImportJobItem] -> ShowS
$cshowList :: [AnnotationImportJobItem] -> ShowS
show :: AnnotationImportJobItem -> String
$cshow :: AnnotationImportJobItem -> String
showsPrec :: Int -> AnnotationImportJobItem -> ShowS
$cshowsPrec :: Int -> AnnotationImportJobItem -> ShowS
Prelude.Show, forall x. Rep AnnotationImportJobItem x -> AnnotationImportJobItem
forall x. AnnotationImportJobItem -> Rep AnnotationImportJobItem x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AnnotationImportJobItem x -> AnnotationImportJobItem
$cfrom :: forall x. AnnotationImportJobItem -> Rep AnnotationImportJobItem x
Prelude.Generic)

-- |
-- Create a value of 'AnnotationImportJobItem' 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:
--
-- 'completionTime', 'annotationImportJobItem_completionTime' - When the job completed.
--
-- 'runLeftNormalization', 'annotationImportJobItem_runLeftNormalization' - The job\'s left normalization setting.
--
-- 'creationTime', 'annotationImportJobItem_creationTime' - When the job was created.
--
-- 'destinationName', 'annotationImportJobItem_destinationName' - The job\'s destination annotation store.
--
-- 'id', 'annotationImportJobItem_id' - The job\'s ID.
--
-- 'roleArn', 'annotationImportJobItem_roleArn' - The job\'s service role ARN.
--
-- 'status', 'annotationImportJobItem_status' - The job\'s status.
--
-- 'updateTime', 'annotationImportJobItem_updateTime' - When the job was updated.
newAnnotationImportJobItem ::
  -- | 'creationTime'
  Prelude.UTCTime ->
  -- | 'destinationName'
  Prelude.Text ->
  -- | 'id'
  Prelude.Text ->
  -- | 'roleArn'
  Prelude.Text ->
  -- | 'status'
  JobStatus ->
  -- | 'updateTime'
  Prelude.UTCTime ->
  AnnotationImportJobItem
newAnnotationImportJobItem :: UTCTime
-> Text
-> Text
-> Text
-> JobStatus
-> UTCTime
-> AnnotationImportJobItem
newAnnotationImportJobItem
  UTCTime
pCreationTime_
  Text
pDestinationName_
  Text
pId_
  Text
pRoleArn_
  JobStatus
pStatus_
  UTCTime
pUpdateTime_ =
    AnnotationImportJobItem'
      { $sel:completionTime:AnnotationImportJobItem' :: Maybe ISO8601
completionTime =
          forall a. Maybe a
Prelude.Nothing,
        $sel:runLeftNormalization:AnnotationImportJobItem' :: Maybe Bool
runLeftNormalization = forall a. Maybe a
Prelude.Nothing,
        $sel:creationTime:AnnotationImportJobItem' :: ISO8601
creationTime = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreationTime_,
        $sel:destinationName:AnnotationImportJobItem' :: Text
destinationName = Text
pDestinationName_,
        $sel:id:AnnotationImportJobItem' :: Text
id = Text
pId_,
        $sel:roleArn:AnnotationImportJobItem' :: Text
roleArn = Text
pRoleArn_,
        $sel:status:AnnotationImportJobItem' :: JobStatus
status = JobStatus
pStatus_,
        $sel:updateTime:AnnotationImportJobItem' :: ISO8601
updateTime = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pUpdateTime_
      }

-- | When the job completed.
annotationImportJobItem_completionTime :: Lens.Lens' AnnotationImportJobItem (Prelude.Maybe Prelude.UTCTime)
annotationImportJobItem_completionTime :: Lens' AnnotationImportJobItem (Maybe UTCTime)
annotationImportJobItem_completionTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AnnotationImportJobItem' {Maybe ISO8601
completionTime :: Maybe ISO8601
$sel:completionTime:AnnotationImportJobItem' :: AnnotationImportJobItem -> Maybe ISO8601
completionTime} -> Maybe ISO8601
completionTime) (\s :: AnnotationImportJobItem
s@AnnotationImportJobItem' {} Maybe ISO8601
a -> AnnotationImportJobItem
s {$sel:completionTime:AnnotationImportJobItem' :: Maybe ISO8601
completionTime = Maybe ISO8601
a} :: AnnotationImportJobItem) 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 job\'s left normalization setting.
annotationImportJobItem_runLeftNormalization :: Lens.Lens' AnnotationImportJobItem (Prelude.Maybe Prelude.Bool)
annotationImportJobItem_runLeftNormalization :: Lens' AnnotationImportJobItem (Maybe Bool)
annotationImportJobItem_runLeftNormalization = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AnnotationImportJobItem' {Maybe Bool
runLeftNormalization :: Maybe Bool
$sel:runLeftNormalization:AnnotationImportJobItem' :: AnnotationImportJobItem -> Maybe Bool
runLeftNormalization} -> Maybe Bool
runLeftNormalization) (\s :: AnnotationImportJobItem
s@AnnotationImportJobItem' {} Maybe Bool
a -> AnnotationImportJobItem
s {$sel:runLeftNormalization:AnnotationImportJobItem' :: Maybe Bool
runLeftNormalization = Maybe Bool
a} :: AnnotationImportJobItem)

-- | When the job was created.
annotationImportJobItem_creationTime :: Lens.Lens' AnnotationImportJobItem Prelude.UTCTime
annotationImportJobItem_creationTime :: Lens' AnnotationImportJobItem UTCTime
annotationImportJobItem_creationTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AnnotationImportJobItem' {ISO8601
creationTime :: ISO8601
$sel:creationTime:AnnotationImportJobItem' :: AnnotationImportJobItem -> ISO8601
creationTime} -> ISO8601
creationTime) (\s :: AnnotationImportJobItem
s@AnnotationImportJobItem' {} ISO8601
a -> AnnotationImportJobItem
s {$sel:creationTime:AnnotationImportJobItem' :: ISO8601
creationTime = ISO8601
a} :: AnnotationImportJobItem) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The job\'s destination annotation store.
annotationImportJobItem_destinationName :: Lens.Lens' AnnotationImportJobItem Prelude.Text
annotationImportJobItem_destinationName :: Lens' AnnotationImportJobItem Text
annotationImportJobItem_destinationName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AnnotationImportJobItem' {Text
destinationName :: Text
$sel:destinationName:AnnotationImportJobItem' :: AnnotationImportJobItem -> Text
destinationName} -> Text
destinationName) (\s :: AnnotationImportJobItem
s@AnnotationImportJobItem' {} Text
a -> AnnotationImportJobItem
s {$sel:destinationName:AnnotationImportJobItem' :: Text
destinationName = Text
a} :: AnnotationImportJobItem)

-- | The job\'s ID.
annotationImportJobItem_id :: Lens.Lens' AnnotationImportJobItem Prelude.Text
annotationImportJobItem_id :: Lens' AnnotationImportJobItem Text
annotationImportJobItem_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AnnotationImportJobItem' {Text
id :: Text
$sel:id:AnnotationImportJobItem' :: AnnotationImportJobItem -> Text
id} -> Text
id) (\s :: AnnotationImportJobItem
s@AnnotationImportJobItem' {} Text
a -> AnnotationImportJobItem
s {$sel:id:AnnotationImportJobItem' :: Text
id = Text
a} :: AnnotationImportJobItem)

-- | The job\'s service role ARN.
annotationImportJobItem_roleArn :: Lens.Lens' AnnotationImportJobItem Prelude.Text
annotationImportJobItem_roleArn :: Lens' AnnotationImportJobItem Text
annotationImportJobItem_roleArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AnnotationImportJobItem' {Text
roleArn :: Text
$sel:roleArn:AnnotationImportJobItem' :: AnnotationImportJobItem -> Text
roleArn} -> Text
roleArn) (\s :: AnnotationImportJobItem
s@AnnotationImportJobItem' {} Text
a -> AnnotationImportJobItem
s {$sel:roleArn:AnnotationImportJobItem' :: Text
roleArn = Text
a} :: AnnotationImportJobItem)

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

-- | When the job was updated.
annotationImportJobItem_updateTime :: Lens.Lens' AnnotationImportJobItem Prelude.UTCTime
annotationImportJobItem_updateTime :: Lens' AnnotationImportJobItem UTCTime
annotationImportJobItem_updateTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AnnotationImportJobItem' {ISO8601
updateTime :: ISO8601
$sel:updateTime:AnnotationImportJobItem' :: AnnotationImportJobItem -> ISO8601
updateTime} -> ISO8601
updateTime) (\s :: AnnotationImportJobItem
s@AnnotationImportJobItem' {} ISO8601
a -> AnnotationImportJobItem
s {$sel:updateTime:AnnotationImportJobItem' :: ISO8601
updateTime = ISO8601
a} :: AnnotationImportJobItem) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

instance Data.FromJSON AnnotationImportJobItem where
  parseJSON :: Value -> Parser AnnotationImportJobItem
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"AnnotationImportJobItem"
      ( \Object
x ->
          Maybe ISO8601
-> Maybe Bool
-> ISO8601
-> Text
-> Text
-> Text
-> JobStatus
-> ISO8601
-> AnnotationImportJobItem
AnnotationImportJobItem'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"completionTime")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"runLeftNormalization")
            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
"creationTime")
            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
"destinationName")
            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
"id")
            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
"roleArn")
            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
"status")
            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
"updateTime")
      )

instance Prelude.Hashable AnnotationImportJobItem where
  hashWithSalt :: Int -> AnnotationImportJobItem -> Int
hashWithSalt Int
_salt AnnotationImportJobItem' {Maybe Bool
Maybe ISO8601
Text
ISO8601
JobStatus
updateTime :: ISO8601
status :: JobStatus
roleArn :: Text
id :: Text
destinationName :: Text
creationTime :: ISO8601
runLeftNormalization :: Maybe Bool
completionTime :: Maybe ISO8601
$sel:updateTime:AnnotationImportJobItem' :: AnnotationImportJobItem -> ISO8601
$sel:status:AnnotationImportJobItem' :: AnnotationImportJobItem -> JobStatus
$sel:roleArn:AnnotationImportJobItem' :: AnnotationImportJobItem -> Text
$sel:id:AnnotationImportJobItem' :: AnnotationImportJobItem -> Text
$sel:destinationName:AnnotationImportJobItem' :: AnnotationImportJobItem -> Text
$sel:creationTime:AnnotationImportJobItem' :: AnnotationImportJobItem -> ISO8601
$sel:runLeftNormalization:AnnotationImportJobItem' :: AnnotationImportJobItem -> Maybe Bool
$sel:completionTime:AnnotationImportJobItem' :: AnnotationImportJobItem -> Maybe ISO8601
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
completionTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
runLeftNormalization
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ISO8601
creationTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
destinationName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
id
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
roleArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` JobStatus
status
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ISO8601
updateTime

instance Prelude.NFData AnnotationImportJobItem where
  rnf :: AnnotationImportJobItem -> ()
rnf AnnotationImportJobItem' {Maybe Bool
Maybe ISO8601
Text
ISO8601
JobStatus
updateTime :: ISO8601
status :: JobStatus
roleArn :: Text
id :: Text
destinationName :: Text
creationTime :: ISO8601
runLeftNormalization :: Maybe Bool
completionTime :: Maybe ISO8601
$sel:updateTime:AnnotationImportJobItem' :: AnnotationImportJobItem -> ISO8601
$sel:status:AnnotationImportJobItem' :: AnnotationImportJobItem -> JobStatus
$sel:roleArn:AnnotationImportJobItem' :: AnnotationImportJobItem -> Text
$sel:id:AnnotationImportJobItem' :: AnnotationImportJobItem -> Text
$sel:destinationName:AnnotationImportJobItem' :: AnnotationImportJobItem -> Text
$sel:creationTime:AnnotationImportJobItem' :: AnnotationImportJobItem -> ISO8601
$sel:runLeftNormalization:AnnotationImportJobItem' :: AnnotationImportJobItem -> Maybe Bool
$sel:completionTime:AnnotationImportJobItem' :: AnnotationImportJobItem -> Maybe ISO8601
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
completionTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
runLeftNormalization
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ISO8601
creationTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
destinationName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
id
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
roleArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf JobStatus
status
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ISO8601
updateTime