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

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

-- | A run group.
--
-- /See:/ 'newRunGroupListItem' smart constructor.
data RunGroupListItem = RunGroupListItem'
  { -- | The group\'s ARN.
    RunGroupListItem -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | When the group was created.
    RunGroupListItem -> Maybe ISO8601
creationTime :: Prelude.Maybe Data.ISO8601,
    -- | The group\'s ID.
    RunGroupListItem -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | The group\'s maximum CPU count setting.
    RunGroupListItem -> Maybe Natural
maxCpus :: Prelude.Maybe Prelude.Natural,
    -- | The group\'s maximum duration setting.
    RunGroupListItem -> Maybe Natural
maxDuration :: Prelude.Maybe Prelude.Natural,
    -- | The group\'s maximum concurrent run setting.
    RunGroupListItem -> Maybe Natural
maxRuns :: Prelude.Maybe Prelude.Natural,
    -- | The group\'s name.
    RunGroupListItem -> Maybe Text
name :: Prelude.Maybe Prelude.Text
  }
  deriving (RunGroupListItem -> RunGroupListItem -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RunGroupListItem -> RunGroupListItem -> Bool
$c/= :: RunGroupListItem -> RunGroupListItem -> Bool
== :: RunGroupListItem -> RunGroupListItem -> Bool
$c== :: RunGroupListItem -> RunGroupListItem -> Bool
Prelude.Eq, ReadPrec [RunGroupListItem]
ReadPrec RunGroupListItem
Int -> ReadS RunGroupListItem
ReadS [RunGroupListItem]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RunGroupListItem]
$creadListPrec :: ReadPrec [RunGroupListItem]
readPrec :: ReadPrec RunGroupListItem
$creadPrec :: ReadPrec RunGroupListItem
readList :: ReadS [RunGroupListItem]
$creadList :: ReadS [RunGroupListItem]
readsPrec :: Int -> ReadS RunGroupListItem
$creadsPrec :: Int -> ReadS RunGroupListItem
Prelude.Read, Int -> RunGroupListItem -> ShowS
[RunGroupListItem] -> ShowS
RunGroupListItem -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RunGroupListItem] -> ShowS
$cshowList :: [RunGroupListItem] -> ShowS
show :: RunGroupListItem -> String
$cshow :: RunGroupListItem -> String
showsPrec :: Int -> RunGroupListItem -> ShowS
$cshowsPrec :: Int -> RunGroupListItem -> ShowS
Prelude.Show, forall x. Rep RunGroupListItem x -> RunGroupListItem
forall x. RunGroupListItem -> Rep RunGroupListItem x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RunGroupListItem x -> RunGroupListItem
$cfrom :: forall x. RunGroupListItem -> Rep RunGroupListItem x
Prelude.Generic)

-- |
-- Create a value of 'RunGroupListItem' 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', 'runGroupListItem_arn' - The group\'s ARN.
--
-- 'creationTime', 'runGroupListItem_creationTime' - When the group was created.
--
-- 'id', 'runGroupListItem_id' - The group\'s ID.
--
-- 'maxCpus', 'runGroupListItem_maxCpus' - The group\'s maximum CPU count setting.
--
-- 'maxDuration', 'runGroupListItem_maxDuration' - The group\'s maximum duration setting.
--
-- 'maxRuns', 'runGroupListItem_maxRuns' - The group\'s maximum concurrent run setting.
--
-- 'name', 'runGroupListItem_name' - The group\'s name.
newRunGroupListItem ::
  RunGroupListItem
newRunGroupListItem :: RunGroupListItem
newRunGroupListItem =
  RunGroupListItem'
    { $sel:arn:RunGroupListItem' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
      $sel:creationTime:RunGroupListItem' :: Maybe ISO8601
creationTime = forall a. Maybe a
Prelude.Nothing,
      $sel:id:RunGroupListItem' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
      $sel:maxCpus:RunGroupListItem' :: Maybe Natural
maxCpus = forall a. Maybe a
Prelude.Nothing,
      $sel:maxDuration:RunGroupListItem' :: Maybe Natural
maxDuration = forall a. Maybe a
Prelude.Nothing,
      $sel:maxRuns:RunGroupListItem' :: Maybe Natural
maxRuns = forall a. Maybe a
Prelude.Nothing,
      $sel:name:RunGroupListItem' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing
    }

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

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

-- | The group\'s maximum CPU count setting.
runGroupListItem_maxCpus :: Lens.Lens' RunGroupListItem (Prelude.Maybe Prelude.Natural)
runGroupListItem_maxCpus :: Lens' RunGroupListItem (Maybe Natural)
runGroupListItem_maxCpus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunGroupListItem' {Maybe Natural
maxCpus :: Maybe Natural
$sel:maxCpus:RunGroupListItem' :: RunGroupListItem -> Maybe Natural
maxCpus} -> Maybe Natural
maxCpus) (\s :: RunGroupListItem
s@RunGroupListItem' {} Maybe Natural
a -> RunGroupListItem
s {$sel:maxCpus:RunGroupListItem' :: Maybe Natural
maxCpus = Maybe Natural
a} :: RunGroupListItem)

-- | The group\'s maximum duration setting.
runGroupListItem_maxDuration :: Lens.Lens' RunGroupListItem (Prelude.Maybe Prelude.Natural)
runGroupListItem_maxDuration :: Lens' RunGroupListItem (Maybe Natural)
runGroupListItem_maxDuration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunGroupListItem' {Maybe Natural
maxDuration :: Maybe Natural
$sel:maxDuration:RunGroupListItem' :: RunGroupListItem -> Maybe Natural
maxDuration} -> Maybe Natural
maxDuration) (\s :: RunGroupListItem
s@RunGroupListItem' {} Maybe Natural
a -> RunGroupListItem
s {$sel:maxDuration:RunGroupListItem' :: Maybe Natural
maxDuration = Maybe Natural
a} :: RunGroupListItem)

-- | The group\'s maximum concurrent run setting.
runGroupListItem_maxRuns :: Lens.Lens' RunGroupListItem (Prelude.Maybe Prelude.Natural)
runGroupListItem_maxRuns :: Lens' RunGroupListItem (Maybe Natural)
runGroupListItem_maxRuns = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunGroupListItem' {Maybe Natural
maxRuns :: Maybe Natural
$sel:maxRuns:RunGroupListItem' :: RunGroupListItem -> Maybe Natural
maxRuns} -> Maybe Natural
maxRuns) (\s :: RunGroupListItem
s@RunGroupListItem' {} Maybe Natural
a -> RunGroupListItem
s {$sel:maxRuns:RunGroupListItem' :: Maybe Natural
maxRuns = Maybe Natural
a} :: RunGroupListItem)

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

instance Data.FromJSON RunGroupListItem where
  parseJSON :: Value -> Parser RunGroupListItem
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"RunGroupListItem"
      ( \Object
x ->
          Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Text
-> RunGroupListItem
RunGroupListItem'
            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
"maxCpus")
            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
"maxDuration")
            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
"maxRuns")
            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")
      )

instance Prelude.Hashable RunGroupListItem where
  hashWithSalt :: Int -> RunGroupListItem -> Int
hashWithSalt Int
_salt RunGroupListItem' {Maybe Natural
Maybe Text
Maybe ISO8601
name :: Maybe Text
maxRuns :: Maybe Natural
maxDuration :: Maybe Natural
maxCpus :: Maybe Natural
id :: Maybe Text
creationTime :: Maybe ISO8601
arn :: Maybe Text
$sel:name:RunGroupListItem' :: RunGroupListItem -> Maybe Text
$sel:maxRuns:RunGroupListItem' :: RunGroupListItem -> Maybe Natural
$sel:maxDuration:RunGroupListItem' :: RunGroupListItem -> Maybe Natural
$sel:maxCpus:RunGroupListItem' :: RunGroupListItem -> Maybe Natural
$sel:id:RunGroupListItem' :: RunGroupListItem -> Maybe Text
$sel:creationTime:RunGroupListItem' :: RunGroupListItem -> Maybe ISO8601
$sel:arn:RunGroupListItem' :: RunGroupListItem -> 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 Natural
maxCpus
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxDuration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxRuns
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name

instance Prelude.NFData RunGroupListItem where
  rnf :: RunGroupListItem -> ()
rnf RunGroupListItem' {Maybe Natural
Maybe Text
Maybe ISO8601
name :: Maybe Text
maxRuns :: Maybe Natural
maxDuration :: Maybe Natural
maxCpus :: Maybe Natural
id :: Maybe Text
creationTime :: Maybe ISO8601
arn :: Maybe Text
$sel:name:RunGroupListItem' :: RunGroupListItem -> Maybe Text
$sel:maxRuns:RunGroupListItem' :: RunGroupListItem -> Maybe Natural
$sel:maxDuration:RunGroupListItem' :: RunGroupListItem -> Maybe Natural
$sel:maxCpus:RunGroupListItem' :: RunGroupListItem -> Maybe Natural
$sel:id:RunGroupListItem' :: RunGroupListItem -> Maybe Text
$sel:creationTime:RunGroupListItem' :: RunGroupListItem -> Maybe ISO8601
$sel:arn:RunGroupListItem' :: RunGroupListItem -> 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 Natural
maxCpus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxDuration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxRuns
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name