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

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

-- |
-- Create a value of 'VariantImportJobItem' 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', 'variantImportJobItem_completionTime' - When the job completed.
--
-- 'runLeftNormalization', 'variantImportJobItem_runLeftNormalization' - The job\'s left normalization setting.
--
-- 'creationTime', 'variantImportJobItem_creationTime' - When the job was created.
--
-- 'destinationName', 'variantImportJobItem_destinationName' - The job\'s destination variant store.
--
-- 'id', 'variantImportJobItem_id' - The job\'s ID.
--
-- 'roleArn', 'variantImportJobItem_roleArn' - The job\'s service role ARN.
--
-- 'status', 'variantImportJobItem_status' - The job\'s status.
--
-- 'updateTime', 'variantImportJobItem_updateTime' - When the job was updated.
newVariantImportJobItem ::
  -- | 'creationTime'
  Prelude.UTCTime ->
  -- | 'destinationName'
  Prelude.Text ->
  -- | 'id'
  Prelude.Text ->
  -- | 'roleArn'
  Prelude.Text ->
  -- | 'status'
  JobStatus ->
  -- | 'updateTime'
  Prelude.UTCTime ->
  VariantImportJobItem
newVariantImportJobItem :: UTCTime
-> Text
-> Text
-> Text
-> JobStatus
-> UTCTime
-> VariantImportJobItem
newVariantImportJobItem
  UTCTime
pCreationTime_
  Text
pDestinationName_
  Text
pId_
  Text
pRoleArn_
  JobStatus
pStatus_
  UTCTime
pUpdateTime_ =
    VariantImportJobItem'
      { $sel:completionTime:VariantImportJobItem' :: Maybe ISO8601
completionTime =
          forall a. Maybe a
Prelude.Nothing,
        $sel:runLeftNormalization:VariantImportJobItem' :: Maybe Bool
runLeftNormalization = forall a. Maybe a
Prelude.Nothing,
        $sel:creationTime:VariantImportJobItem' :: ISO8601
creationTime = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreationTime_,
        $sel:destinationName:VariantImportJobItem' :: Text
destinationName = Text
pDestinationName_,
        $sel:id:VariantImportJobItem' :: Text
id = Text
pId_,
        $sel:roleArn:VariantImportJobItem' :: Text
roleArn = Text
pRoleArn_,
        $sel:status:VariantImportJobItem' :: JobStatus
status = JobStatus
pStatus_,
        $sel:updateTime:VariantImportJobItem' :: 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.
variantImportJobItem_completionTime :: Lens.Lens' VariantImportJobItem (Prelude.Maybe Prelude.UTCTime)
variantImportJobItem_completionTime :: Lens' VariantImportJobItem (Maybe UTCTime)
variantImportJobItem_completionTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VariantImportJobItem' {Maybe ISO8601
completionTime :: Maybe ISO8601
$sel:completionTime:VariantImportJobItem' :: VariantImportJobItem -> Maybe ISO8601
completionTime} -> Maybe ISO8601
completionTime) (\s :: VariantImportJobItem
s@VariantImportJobItem' {} Maybe ISO8601
a -> VariantImportJobItem
s {$sel:completionTime:VariantImportJobItem' :: Maybe ISO8601
completionTime = Maybe ISO8601
a} :: VariantImportJobItem) 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.
variantImportJobItem_runLeftNormalization :: Lens.Lens' VariantImportJobItem (Prelude.Maybe Prelude.Bool)
variantImportJobItem_runLeftNormalization :: Lens' VariantImportJobItem (Maybe Bool)
variantImportJobItem_runLeftNormalization = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VariantImportJobItem' {Maybe Bool
runLeftNormalization :: Maybe Bool
$sel:runLeftNormalization:VariantImportJobItem' :: VariantImportJobItem -> Maybe Bool
runLeftNormalization} -> Maybe Bool
runLeftNormalization) (\s :: VariantImportJobItem
s@VariantImportJobItem' {} Maybe Bool
a -> VariantImportJobItem
s {$sel:runLeftNormalization:VariantImportJobItem' :: Maybe Bool
runLeftNormalization = Maybe Bool
a} :: VariantImportJobItem)

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

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

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

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

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

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

instance Data.FromJSON VariantImportJobItem where
  parseJSON :: Value -> Parser VariantImportJobItem
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"VariantImportJobItem"
      ( \Object
x ->
          Maybe ISO8601
-> Maybe Bool
-> ISO8601
-> Text
-> Text
-> Text
-> JobStatus
-> ISO8601
-> VariantImportJobItem
VariantImportJobItem'
            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 VariantImportJobItem where
  hashWithSalt :: Int -> VariantImportJobItem -> Int
hashWithSalt Int
_salt VariantImportJobItem' {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:VariantImportJobItem' :: VariantImportJobItem -> ISO8601
$sel:status:VariantImportJobItem' :: VariantImportJobItem -> JobStatus
$sel:roleArn:VariantImportJobItem' :: VariantImportJobItem -> Text
$sel:id:VariantImportJobItem' :: VariantImportJobItem -> Text
$sel:destinationName:VariantImportJobItem' :: VariantImportJobItem -> Text
$sel:creationTime:VariantImportJobItem' :: VariantImportJobItem -> ISO8601
$sel:runLeftNormalization:VariantImportJobItem' :: VariantImportJobItem -> Maybe Bool
$sel:completionTime:VariantImportJobItem' :: VariantImportJobItem -> 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 VariantImportJobItem where
  rnf :: VariantImportJobItem -> ()
rnf VariantImportJobItem' {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:VariantImportJobItem' :: VariantImportJobItem -> ISO8601
$sel:status:VariantImportJobItem' :: VariantImportJobItem -> JobStatus
$sel:roleArn:VariantImportJobItem' :: VariantImportJobItem -> Text
$sel:id:VariantImportJobItem' :: VariantImportJobItem -> Text
$sel:destinationName:VariantImportJobItem' :: VariantImportJobItem -> Text
$sel:creationTime:VariantImportJobItem' :: VariantImportJobItem -> ISO8601
$sel:runLeftNormalization:VariantImportJobItem' :: VariantImportJobItem -> Maybe Bool
$sel:completionTime:VariantImportJobItem' :: VariantImportJobItem -> 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