{-# 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.RunListItem
-- 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.RunListItem 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.RunStatus
import qualified Amazonka.Prelude as Prelude

-- | A workflow run.
--
-- /See:/ 'newRunListItem' smart constructor.
data RunListItem = RunListItem'
  { -- | The run\'s ARN.
    RunListItem -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | When the run was created.
    RunListItem -> Maybe ISO8601
creationTime :: Prelude.Maybe Data.ISO8601,
    -- | The run\'s ID.
    RunListItem -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | The run\'s name.
    RunListItem -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The run\'s priority.
    RunListItem -> Maybe Natural
priority :: Prelude.Maybe Prelude.Natural,
    -- | When the run started.
    RunListItem -> Maybe ISO8601
startTime :: Prelude.Maybe Data.ISO8601,
    -- | The run\'s status.
    RunListItem -> Maybe RunStatus
status :: Prelude.Maybe RunStatus,
    -- | When the run stopped.
    RunListItem -> Maybe ISO8601
stopTime :: Prelude.Maybe Data.ISO8601,
    -- | The run\'s storage capacity.
    RunListItem -> Maybe Natural
storageCapacity :: Prelude.Maybe Prelude.Natural,
    -- | The run\'s workflow ID.
    RunListItem -> Maybe Text
workflowId :: Prelude.Maybe Prelude.Text
  }
  deriving (RunListItem -> RunListItem -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RunListItem -> RunListItem -> Bool
$c/= :: RunListItem -> RunListItem -> Bool
== :: RunListItem -> RunListItem -> Bool
$c== :: RunListItem -> RunListItem -> Bool
Prelude.Eq, ReadPrec [RunListItem]
ReadPrec RunListItem
Int -> ReadS RunListItem
ReadS [RunListItem]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RunListItem]
$creadListPrec :: ReadPrec [RunListItem]
readPrec :: ReadPrec RunListItem
$creadPrec :: ReadPrec RunListItem
readList :: ReadS [RunListItem]
$creadList :: ReadS [RunListItem]
readsPrec :: Int -> ReadS RunListItem
$creadsPrec :: Int -> ReadS RunListItem
Prelude.Read, Int -> RunListItem -> ShowS
[RunListItem] -> ShowS
RunListItem -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RunListItem] -> ShowS
$cshowList :: [RunListItem] -> ShowS
show :: RunListItem -> String
$cshow :: RunListItem -> String
showsPrec :: Int -> RunListItem -> ShowS
$cshowsPrec :: Int -> RunListItem -> ShowS
Prelude.Show, forall x. Rep RunListItem x -> RunListItem
forall x. RunListItem -> Rep RunListItem x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RunListItem x -> RunListItem
$cfrom :: forall x. RunListItem -> Rep RunListItem x
Prelude.Generic)

-- |
-- Create a value of 'RunListItem' 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:
--
-- 'arn', 'runListItem_arn' - The run\'s ARN.
--
-- 'creationTime', 'runListItem_creationTime' - When the run was created.
--
-- 'id', 'runListItem_id' - The run\'s ID.
--
-- 'name', 'runListItem_name' - The run\'s name.
--
-- 'priority', 'runListItem_priority' - The run\'s priority.
--
-- 'startTime', 'runListItem_startTime' - When the run started.
--
-- 'status', 'runListItem_status' - The run\'s status.
--
-- 'stopTime', 'runListItem_stopTime' - When the run stopped.
--
-- 'storageCapacity', 'runListItem_storageCapacity' - The run\'s storage capacity.
--
-- 'workflowId', 'runListItem_workflowId' - The run\'s workflow ID.
newRunListItem ::
  RunListItem
newRunListItem :: RunListItem
newRunListItem =
  RunListItem'
    { $sel:arn:RunListItem' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
      $sel:creationTime:RunListItem' :: Maybe ISO8601
creationTime = forall a. Maybe a
Prelude.Nothing,
      $sel:id:RunListItem' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
      $sel:name:RunListItem' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
      $sel:priority:RunListItem' :: Maybe Natural
priority = forall a. Maybe a
Prelude.Nothing,
      $sel:startTime:RunListItem' :: Maybe ISO8601
startTime = forall a. Maybe a
Prelude.Nothing,
      $sel:status:RunListItem' :: Maybe RunStatus
status = forall a. Maybe a
Prelude.Nothing,
      $sel:stopTime:RunListItem' :: Maybe ISO8601
stopTime = forall a. Maybe a
Prelude.Nothing,
      $sel:storageCapacity:RunListItem' :: Maybe Natural
storageCapacity = forall a. Maybe a
Prelude.Nothing,
      $sel:workflowId:RunListItem' :: Maybe Text
workflowId = forall a. Maybe a
Prelude.Nothing
    }

-- | The run\'s ARN.
runListItem_arn :: Lens.Lens' RunListItem (Prelude.Maybe Prelude.Text)
runListItem_arn :: Lens' RunListItem (Maybe Text)
runListItem_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunListItem' {Maybe Text
arn :: Maybe Text
$sel:arn:RunListItem' :: RunListItem -> Maybe Text
arn} -> Maybe Text
arn) (\s :: RunListItem
s@RunListItem' {} Maybe Text
a -> RunListItem
s {$sel:arn:RunListItem' :: Maybe Text
arn = Maybe Text
a} :: RunListItem)

-- | When the run was created.
runListItem_creationTime :: Lens.Lens' RunListItem (Prelude.Maybe Prelude.UTCTime)
runListItem_creationTime :: Lens' RunListItem (Maybe UTCTime)
runListItem_creationTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunListItem' {Maybe ISO8601
creationTime :: Maybe ISO8601
$sel:creationTime:RunListItem' :: RunListItem -> Maybe ISO8601
creationTime} -> Maybe ISO8601
creationTime) (\s :: RunListItem
s@RunListItem' {} Maybe ISO8601
a -> RunListItem
s {$sel:creationTime:RunListItem' :: Maybe ISO8601
creationTime = Maybe ISO8601
a} :: RunListItem) 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 run\'s ID.
runListItem_id :: Lens.Lens' RunListItem (Prelude.Maybe Prelude.Text)
runListItem_id :: Lens' RunListItem (Maybe Text)
runListItem_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunListItem' {Maybe Text
id :: Maybe Text
$sel:id:RunListItem' :: RunListItem -> Maybe Text
id} -> Maybe Text
id) (\s :: RunListItem
s@RunListItem' {} Maybe Text
a -> RunListItem
s {$sel:id:RunListItem' :: Maybe Text
id = Maybe Text
a} :: RunListItem)

-- | The run\'s name.
runListItem_name :: Lens.Lens' RunListItem (Prelude.Maybe Prelude.Text)
runListItem_name :: Lens' RunListItem (Maybe Text)
runListItem_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunListItem' {Maybe Text
name :: Maybe Text
$sel:name:RunListItem' :: RunListItem -> Maybe Text
name} -> Maybe Text
name) (\s :: RunListItem
s@RunListItem' {} Maybe Text
a -> RunListItem
s {$sel:name:RunListItem' :: Maybe Text
name = Maybe Text
a} :: RunListItem)

-- | The run\'s priority.
runListItem_priority :: Lens.Lens' RunListItem (Prelude.Maybe Prelude.Natural)
runListItem_priority :: Lens' RunListItem (Maybe Natural)
runListItem_priority = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunListItem' {Maybe Natural
priority :: Maybe Natural
$sel:priority:RunListItem' :: RunListItem -> Maybe Natural
priority} -> Maybe Natural
priority) (\s :: RunListItem
s@RunListItem' {} Maybe Natural
a -> RunListItem
s {$sel:priority:RunListItem' :: Maybe Natural
priority = Maybe Natural
a} :: RunListItem)

-- | When the run started.
runListItem_startTime :: Lens.Lens' RunListItem (Prelude.Maybe Prelude.UTCTime)
runListItem_startTime :: Lens' RunListItem (Maybe UTCTime)
runListItem_startTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunListItem' {Maybe ISO8601
startTime :: Maybe ISO8601
$sel:startTime:RunListItem' :: RunListItem -> Maybe ISO8601
startTime} -> Maybe ISO8601
startTime) (\s :: RunListItem
s@RunListItem' {} Maybe ISO8601
a -> RunListItem
s {$sel:startTime:RunListItem' :: Maybe ISO8601
startTime = Maybe ISO8601
a} :: RunListItem) 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 run\'s status.
runListItem_status :: Lens.Lens' RunListItem (Prelude.Maybe RunStatus)
runListItem_status :: Lens' RunListItem (Maybe RunStatus)
runListItem_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunListItem' {Maybe RunStatus
status :: Maybe RunStatus
$sel:status:RunListItem' :: RunListItem -> Maybe RunStatus
status} -> Maybe RunStatus
status) (\s :: RunListItem
s@RunListItem' {} Maybe RunStatus
a -> RunListItem
s {$sel:status:RunListItem' :: Maybe RunStatus
status = Maybe RunStatus
a} :: RunListItem)

-- | When the run stopped.
runListItem_stopTime :: Lens.Lens' RunListItem (Prelude.Maybe Prelude.UTCTime)
runListItem_stopTime :: Lens' RunListItem (Maybe UTCTime)
runListItem_stopTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunListItem' {Maybe ISO8601
stopTime :: Maybe ISO8601
$sel:stopTime:RunListItem' :: RunListItem -> Maybe ISO8601
stopTime} -> Maybe ISO8601
stopTime) (\s :: RunListItem
s@RunListItem' {} Maybe ISO8601
a -> RunListItem
s {$sel:stopTime:RunListItem' :: Maybe ISO8601
stopTime = Maybe ISO8601
a} :: RunListItem) 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 run\'s storage capacity.
runListItem_storageCapacity :: Lens.Lens' RunListItem (Prelude.Maybe Prelude.Natural)
runListItem_storageCapacity :: Lens' RunListItem (Maybe Natural)
runListItem_storageCapacity = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunListItem' {Maybe Natural
storageCapacity :: Maybe Natural
$sel:storageCapacity:RunListItem' :: RunListItem -> Maybe Natural
storageCapacity} -> Maybe Natural
storageCapacity) (\s :: RunListItem
s@RunListItem' {} Maybe Natural
a -> RunListItem
s {$sel:storageCapacity:RunListItem' :: Maybe Natural
storageCapacity = Maybe Natural
a} :: RunListItem)

-- | The run\'s workflow ID.
runListItem_workflowId :: Lens.Lens' RunListItem (Prelude.Maybe Prelude.Text)
runListItem_workflowId :: Lens' RunListItem (Maybe Text)
runListItem_workflowId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunListItem' {Maybe Text
workflowId :: Maybe Text
$sel:workflowId:RunListItem' :: RunListItem -> Maybe Text
workflowId} -> Maybe Text
workflowId) (\s :: RunListItem
s@RunListItem' {} Maybe Text
a -> RunListItem
s {$sel:workflowId:RunListItem' :: Maybe Text
workflowId = Maybe Text
a} :: RunListItem)

instance Data.FromJSON RunListItem where
  parseJSON :: Value -> Parser RunListItem
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"RunListItem"
      ( \Object
x ->
          Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe ISO8601
-> Maybe RunStatus
-> Maybe ISO8601
-> Maybe Natural
-> Maybe Text
-> RunListItem
RunListItem'
            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
"arn")
            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
"creationTime")
            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
"id")
            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
"name")
            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
"priority")
            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
"startTime")
            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
"status")
            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
"stopTime")
            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
"storageCapacity")
            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
"workflowId")
      )

instance Prelude.Hashable RunListItem where
  hashWithSalt :: Int -> RunListItem -> Int
hashWithSalt Int
_salt RunListItem' {Maybe Natural
Maybe Text
Maybe ISO8601
Maybe RunStatus
workflowId :: Maybe Text
storageCapacity :: Maybe Natural
stopTime :: Maybe ISO8601
status :: Maybe RunStatus
startTime :: Maybe ISO8601
priority :: Maybe Natural
name :: Maybe Text
id :: Maybe Text
creationTime :: Maybe ISO8601
arn :: Maybe Text
$sel:workflowId:RunListItem' :: RunListItem -> Maybe Text
$sel:storageCapacity:RunListItem' :: RunListItem -> Maybe Natural
$sel:stopTime:RunListItem' :: RunListItem -> Maybe ISO8601
$sel:status:RunListItem' :: RunListItem -> Maybe RunStatus
$sel:startTime:RunListItem' :: RunListItem -> Maybe ISO8601
$sel:priority:RunListItem' :: RunListItem -> Maybe Natural
$sel:name:RunListItem' :: RunListItem -> Maybe Text
$sel:id:RunListItem' :: RunListItem -> Maybe Text
$sel:creationTime:RunListItem' :: RunListItem -> Maybe ISO8601
$sel:arn:RunListItem' :: RunListItem -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
creationTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
id
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
priority
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
startTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RunStatus
status
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
stopTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
storageCapacity
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
workflowId

instance Prelude.NFData RunListItem where
  rnf :: RunListItem -> ()
rnf RunListItem' {Maybe Natural
Maybe Text
Maybe ISO8601
Maybe RunStatus
workflowId :: Maybe Text
storageCapacity :: Maybe Natural
stopTime :: Maybe ISO8601
status :: Maybe RunStatus
startTime :: Maybe ISO8601
priority :: Maybe Natural
name :: Maybe Text
id :: Maybe Text
creationTime :: Maybe ISO8601
arn :: Maybe Text
$sel:workflowId:RunListItem' :: RunListItem -> Maybe Text
$sel:storageCapacity:RunListItem' :: RunListItem -> Maybe Natural
$sel:stopTime:RunListItem' :: RunListItem -> Maybe ISO8601
$sel:status:RunListItem' :: RunListItem -> Maybe RunStatus
$sel:startTime:RunListItem' :: RunListItem -> Maybe ISO8601
$sel:priority:RunListItem' :: RunListItem -> Maybe Natural
$sel:name:RunListItem' :: RunListItem -> Maybe Text
$sel:id:RunListItem' :: RunListItem -> Maybe Text
$sel:creationTime:RunListItem' :: RunListItem -> Maybe ISO8601
$sel:arn:RunListItem' :: RunListItem -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
creationTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
id
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
priority
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
startTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RunStatus
status
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
stopTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
storageCapacity
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
workflowId