{-# 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.DeviceFarm.Types.Suite
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.DeviceFarm.Types.Suite where

import qualified Amazonka.Core as Core
import Amazonka.DeviceFarm.Types.Counters
import Amazonka.DeviceFarm.Types.DeviceMinutes
import Amazonka.DeviceFarm.Types.ExecutionResult
import Amazonka.DeviceFarm.Types.ExecutionStatus
import Amazonka.DeviceFarm.Types.TestType
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Represents a collection of one or more tests.
--
-- /See:/ 'newSuite' smart constructor.
data Suite = Suite'
  { -- | The suite\'s status.
    --
    -- Allowed values include:
    --
    -- -   PENDING
    --
    -- -   PENDING_CONCURRENCY
    --
    -- -   PENDING_DEVICE
    --
    -- -   PROCESSING
    --
    -- -   SCHEDULING
    --
    -- -   PREPARING
    --
    -- -   RUNNING
    --
    -- -   COMPLETED
    --
    -- -   STOPPING
    Suite -> Maybe ExecutionStatus
status :: Prelude.Maybe ExecutionStatus,
    -- | The suite\'s result counters.
    Suite -> Maybe Counters
counters :: Prelude.Maybe Counters,
    -- | The suite\'s ARN.
    Suite -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | When the suite was created.
    Suite -> Maybe POSIX
created :: Prelude.Maybe Core.POSIX,
    -- | The suite\'s stop time.
    Suite -> Maybe POSIX
stopped :: Prelude.Maybe Core.POSIX,
    -- | The suite\'s result.
    --
    -- Allowed values include:
    --
    -- -   PENDING
    --
    -- -   PASSED
    --
    -- -   WARNED
    --
    -- -   FAILED
    --
    -- -   SKIPPED
    --
    -- -   ERRORED
    --
    -- -   STOPPED
    Suite -> Maybe ExecutionResult
result :: Prelude.Maybe ExecutionResult,
    -- | The suite\'s name.
    Suite -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | Represents the total (metered or unmetered) minutes used by the test
    -- suite.
    Suite -> Maybe DeviceMinutes
deviceMinutes :: Prelude.Maybe DeviceMinutes,
    -- | The suite\'s type.
    --
    -- Must be one of the following values:
    --
    -- -   BUILTIN_FUZZ
    --
    -- -   BUILTIN_EXPLORER
    --
    --     Only available for Android; an app explorer that traverses an
    --     Android app, interacting with it and capturing screenshots at the
    --     same time.
    --
    -- -   APPIUM_JAVA_JUNIT
    --
    -- -   APPIUM_JAVA_TESTNG
    --
    -- -   APPIUM_PYTHON
    --
    -- -   APPIUM_NODE
    --
    -- -   APPIUM_RUBY
    --
    -- -   APPIUM_WEB_JAVA_JUNIT
    --
    -- -   APPIUM_WEB_JAVA_TESTNG
    --
    -- -   APPIUM_WEB_PYTHON
    --
    -- -   APPIUM_WEB_NODE
    --
    -- -   APPIUM_WEB_RUBY
    --
    -- -   CALABASH
    --
    -- -   INSTRUMENTATION
    --
    -- -   UIAUTOMATION
    --
    -- -   UIAUTOMATOR
    --
    -- -   XCTEST
    --
    -- -   XCTEST_UI
    Suite -> Maybe TestType
type' :: Prelude.Maybe TestType,
    -- | A message about the suite\'s result.
    Suite -> Maybe Text
message :: Prelude.Maybe Prelude.Text,
    -- | The suite\'s start time.
    Suite -> Maybe POSIX
started :: Prelude.Maybe Core.POSIX
  }
  deriving (Suite -> Suite -> Bool
(Suite -> Suite -> Bool) -> (Suite -> Suite -> Bool) -> Eq Suite
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Suite -> Suite -> Bool
$c/= :: Suite -> Suite -> Bool
== :: Suite -> Suite -> Bool
$c== :: Suite -> Suite -> Bool
Prelude.Eq, ReadPrec [Suite]
ReadPrec Suite
Int -> ReadS Suite
ReadS [Suite]
(Int -> ReadS Suite)
-> ReadS [Suite]
-> ReadPrec Suite
-> ReadPrec [Suite]
-> Read Suite
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Suite]
$creadListPrec :: ReadPrec [Suite]
readPrec :: ReadPrec Suite
$creadPrec :: ReadPrec Suite
readList :: ReadS [Suite]
$creadList :: ReadS [Suite]
readsPrec :: Int -> ReadS Suite
$creadsPrec :: Int -> ReadS Suite
Prelude.Read, Int -> Suite -> ShowS
[Suite] -> ShowS
Suite -> String
(Int -> Suite -> ShowS)
-> (Suite -> String) -> ([Suite] -> ShowS) -> Show Suite
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Suite] -> ShowS
$cshowList :: [Suite] -> ShowS
show :: Suite -> String
$cshow :: Suite -> String
showsPrec :: Int -> Suite -> ShowS
$cshowsPrec :: Int -> Suite -> ShowS
Prelude.Show, (forall x. Suite -> Rep Suite x)
-> (forall x. Rep Suite x -> Suite) -> Generic Suite
forall x. Rep Suite x -> Suite
forall x. Suite -> Rep Suite x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Suite x -> Suite
$cfrom :: forall x. Suite -> Rep Suite x
Prelude.Generic)

-- |
-- Create a value of 'Suite' 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:
--
-- 'status', 'suite_status' - The suite\'s status.
--
-- Allowed values include:
--
-- -   PENDING
--
-- -   PENDING_CONCURRENCY
--
-- -   PENDING_DEVICE
--
-- -   PROCESSING
--
-- -   SCHEDULING
--
-- -   PREPARING
--
-- -   RUNNING
--
-- -   COMPLETED
--
-- -   STOPPING
--
-- 'counters', 'suite_counters' - The suite\'s result counters.
--
-- 'arn', 'suite_arn' - The suite\'s ARN.
--
-- 'created', 'suite_created' - When the suite was created.
--
-- 'stopped', 'suite_stopped' - The suite\'s stop time.
--
-- 'result', 'suite_result' - The suite\'s result.
--
-- Allowed values include:
--
-- -   PENDING
--
-- -   PASSED
--
-- -   WARNED
--
-- -   FAILED
--
-- -   SKIPPED
--
-- -   ERRORED
--
-- -   STOPPED
--
-- 'name', 'suite_name' - The suite\'s name.
--
-- 'deviceMinutes', 'suite_deviceMinutes' - Represents the total (metered or unmetered) minutes used by the test
-- suite.
--
-- 'type'', 'suite_type' - The suite\'s type.
--
-- Must be one of the following values:
--
-- -   BUILTIN_FUZZ
--
-- -   BUILTIN_EXPLORER
--
--     Only available for Android; an app explorer that traverses an
--     Android app, interacting with it and capturing screenshots at the
--     same time.
--
-- -   APPIUM_JAVA_JUNIT
--
-- -   APPIUM_JAVA_TESTNG
--
-- -   APPIUM_PYTHON
--
-- -   APPIUM_NODE
--
-- -   APPIUM_RUBY
--
-- -   APPIUM_WEB_JAVA_JUNIT
--
-- -   APPIUM_WEB_JAVA_TESTNG
--
-- -   APPIUM_WEB_PYTHON
--
-- -   APPIUM_WEB_NODE
--
-- -   APPIUM_WEB_RUBY
--
-- -   CALABASH
--
-- -   INSTRUMENTATION
--
-- -   UIAUTOMATION
--
-- -   UIAUTOMATOR
--
-- -   XCTEST
--
-- -   XCTEST_UI
--
-- 'message', 'suite_message' - A message about the suite\'s result.
--
-- 'started', 'suite_started' - The suite\'s start time.
newSuite ::
  Suite
newSuite :: Suite
newSuite =
  Suite' :: Maybe ExecutionStatus
-> Maybe Counters
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe ExecutionResult
-> Maybe Text
-> Maybe DeviceMinutes
-> Maybe TestType
-> Maybe Text
-> Maybe POSIX
-> Suite
Suite'
    { $sel:status:Suite' :: Maybe ExecutionStatus
status = Maybe ExecutionStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:counters:Suite' :: Maybe Counters
counters = Maybe Counters
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:Suite' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:created:Suite' :: Maybe POSIX
created = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:stopped:Suite' :: Maybe POSIX
stopped = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:result:Suite' :: Maybe ExecutionResult
result = Maybe ExecutionResult
forall a. Maybe a
Prelude.Nothing,
      $sel:name:Suite' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:deviceMinutes:Suite' :: Maybe DeviceMinutes
deviceMinutes = Maybe DeviceMinutes
forall a. Maybe a
Prelude.Nothing,
      $sel:type':Suite' :: Maybe TestType
type' = Maybe TestType
forall a. Maybe a
Prelude.Nothing,
      $sel:message:Suite' :: Maybe Text
message = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:started:Suite' :: Maybe POSIX
started = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
    }

-- | The suite\'s status.
--
-- Allowed values include:
--
-- -   PENDING
--
-- -   PENDING_CONCURRENCY
--
-- -   PENDING_DEVICE
--
-- -   PROCESSING
--
-- -   SCHEDULING
--
-- -   PREPARING
--
-- -   RUNNING
--
-- -   COMPLETED
--
-- -   STOPPING
suite_status :: Lens.Lens' Suite (Prelude.Maybe ExecutionStatus)
suite_status :: (Maybe ExecutionStatus -> f (Maybe ExecutionStatus))
-> Suite -> f Suite
suite_status = (Suite -> Maybe ExecutionStatus)
-> (Suite -> Maybe ExecutionStatus -> Suite)
-> Lens Suite Suite (Maybe ExecutionStatus) (Maybe ExecutionStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Suite' {Maybe ExecutionStatus
status :: Maybe ExecutionStatus
$sel:status:Suite' :: Suite -> Maybe ExecutionStatus
status} -> Maybe ExecutionStatus
status) (\s :: Suite
s@Suite' {} Maybe ExecutionStatus
a -> Suite
s {$sel:status:Suite' :: Maybe ExecutionStatus
status = Maybe ExecutionStatus
a} :: Suite)

-- | The suite\'s result counters.
suite_counters :: Lens.Lens' Suite (Prelude.Maybe Counters)
suite_counters :: (Maybe Counters -> f (Maybe Counters)) -> Suite -> f Suite
suite_counters = (Suite -> Maybe Counters)
-> (Suite -> Maybe Counters -> Suite)
-> Lens Suite Suite (Maybe Counters) (Maybe Counters)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Suite' {Maybe Counters
counters :: Maybe Counters
$sel:counters:Suite' :: Suite -> Maybe Counters
counters} -> Maybe Counters
counters) (\s :: Suite
s@Suite' {} Maybe Counters
a -> Suite
s {$sel:counters:Suite' :: Maybe Counters
counters = Maybe Counters
a} :: Suite)

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

-- | When the suite was created.
suite_created :: Lens.Lens' Suite (Prelude.Maybe Prelude.UTCTime)
suite_created :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Suite -> f Suite
suite_created = (Suite -> Maybe POSIX)
-> (Suite -> Maybe POSIX -> Suite)
-> Lens Suite Suite (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Suite' {Maybe POSIX
created :: Maybe POSIX
$sel:created:Suite' :: Suite -> Maybe POSIX
created} -> Maybe POSIX
created) (\s :: Suite
s@Suite' {} Maybe POSIX
a -> Suite
s {$sel:created:Suite' :: Maybe POSIX
created = Maybe POSIX
a} :: Suite) ((Maybe POSIX -> f (Maybe POSIX)) -> Suite -> f Suite)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Suite
-> f Suite
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The suite\'s stop time.
suite_stopped :: Lens.Lens' Suite (Prelude.Maybe Prelude.UTCTime)
suite_stopped :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Suite -> f Suite
suite_stopped = (Suite -> Maybe POSIX)
-> (Suite -> Maybe POSIX -> Suite)
-> Lens Suite Suite (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Suite' {Maybe POSIX
stopped :: Maybe POSIX
$sel:stopped:Suite' :: Suite -> Maybe POSIX
stopped} -> Maybe POSIX
stopped) (\s :: Suite
s@Suite' {} Maybe POSIX
a -> Suite
s {$sel:stopped:Suite' :: Maybe POSIX
stopped = Maybe POSIX
a} :: Suite) ((Maybe POSIX -> f (Maybe POSIX)) -> Suite -> f Suite)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Suite
-> f Suite
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The suite\'s result.
--
-- Allowed values include:
--
-- -   PENDING
--
-- -   PASSED
--
-- -   WARNED
--
-- -   FAILED
--
-- -   SKIPPED
--
-- -   ERRORED
--
-- -   STOPPED
suite_result :: Lens.Lens' Suite (Prelude.Maybe ExecutionResult)
suite_result :: (Maybe ExecutionResult -> f (Maybe ExecutionResult))
-> Suite -> f Suite
suite_result = (Suite -> Maybe ExecutionResult)
-> (Suite -> Maybe ExecutionResult -> Suite)
-> Lens Suite Suite (Maybe ExecutionResult) (Maybe ExecutionResult)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Suite' {Maybe ExecutionResult
result :: Maybe ExecutionResult
$sel:result:Suite' :: Suite -> Maybe ExecutionResult
result} -> Maybe ExecutionResult
result) (\s :: Suite
s@Suite' {} Maybe ExecutionResult
a -> Suite
s {$sel:result:Suite' :: Maybe ExecutionResult
result = Maybe ExecutionResult
a} :: Suite)

-- | The suite\'s name.
suite_name :: Lens.Lens' Suite (Prelude.Maybe Prelude.Text)
suite_name :: (Maybe Text -> f (Maybe Text)) -> Suite -> f Suite
suite_name = (Suite -> Maybe Text)
-> (Suite -> Maybe Text -> Suite)
-> Lens Suite Suite (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Suite' {Maybe Text
name :: Maybe Text
$sel:name:Suite' :: Suite -> Maybe Text
name} -> Maybe Text
name) (\s :: Suite
s@Suite' {} Maybe Text
a -> Suite
s {$sel:name:Suite' :: Maybe Text
name = Maybe Text
a} :: Suite)

-- | Represents the total (metered or unmetered) minutes used by the test
-- suite.
suite_deviceMinutes :: Lens.Lens' Suite (Prelude.Maybe DeviceMinutes)
suite_deviceMinutes :: (Maybe DeviceMinutes -> f (Maybe DeviceMinutes))
-> Suite -> f Suite
suite_deviceMinutes = (Suite -> Maybe DeviceMinutes)
-> (Suite -> Maybe DeviceMinutes -> Suite)
-> Lens Suite Suite (Maybe DeviceMinutes) (Maybe DeviceMinutes)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Suite' {Maybe DeviceMinutes
deviceMinutes :: Maybe DeviceMinutes
$sel:deviceMinutes:Suite' :: Suite -> Maybe DeviceMinutes
deviceMinutes} -> Maybe DeviceMinutes
deviceMinutes) (\s :: Suite
s@Suite' {} Maybe DeviceMinutes
a -> Suite
s {$sel:deviceMinutes:Suite' :: Maybe DeviceMinutes
deviceMinutes = Maybe DeviceMinutes
a} :: Suite)

-- | The suite\'s type.
--
-- Must be one of the following values:
--
-- -   BUILTIN_FUZZ
--
-- -   BUILTIN_EXPLORER
--
--     Only available for Android; an app explorer that traverses an
--     Android app, interacting with it and capturing screenshots at the
--     same time.
--
-- -   APPIUM_JAVA_JUNIT
--
-- -   APPIUM_JAVA_TESTNG
--
-- -   APPIUM_PYTHON
--
-- -   APPIUM_NODE
--
-- -   APPIUM_RUBY
--
-- -   APPIUM_WEB_JAVA_JUNIT
--
-- -   APPIUM_WEB_JAVA_TESTNG
--
-- -   APPIUM_WEB_PYTHON
--
-- -   APPIUM_WEB_NODE
--
-- -   APPIUM_WEB_RUBY
--
-- -   CALABASH
--
-- -   INSTRUMENTATION
--
-- -   UIAUTOMATION
--
-- -   UIAUTOMATOR
--
-- -   XCTEST
--
-- -   XCTEST_UI
suite_type :: Lens.Lens' Suite (Prelude.Maybe TestType)
suite_type :: (Maybe TestType -> f (Maybe TestType)) -> Suite -> f Suite
suite_type = (Suite -> Maybe TestType)
-> (Suite -> Maybe TestType -> Suite)
-> Lens Suite Suite (Maybe TestType) (Maybe TestType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Suite' {Maybe TestType
type' :: Maybe TestType
$sel:type':Suite' :: Suite -> Maybe TestType
type'} -> Maybe TestType
type') (\s :: Suite
s@Suite' {} Maybe TestType
a -> Suite
s {$sel:type':Suite' :: Maybe TestType
type' = Maybe TestType
a} :: Suite)

-- | A message about the suite\'s result.
suite_message :: Lens.Lens' Suite (Prelude.Maybe Prelude.Text)
suite_message :: (Maybe Text -> f (Maybe Text)) -> Suite -> f Suite
suite_message = (Suite -> Maybe Text)
-> (Suite -> Maybe Text -> Suite)
-> Lens Suite Suite (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Suite' {Maybe Text
message :: Maybe Text
$sel:message:Suite' :: Suite -> Maybe Text
message} -> Maybe Text
message) (\s :: Suite
s@Suite' {} Maybe Text
a -> Suite
s {$sel:message:Suite' :: Maybe Text
message = Maybe Text
a} :: Suite)

-- | The suite\'s start time.
suite_started :: Lens.Lens' Suite (Prelude.Maybe Prelude.UTCTime)
suite_started :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Suite -> f Suite
suite_started = (Suite -> Maybe POSIX)
-> (Suite -> Maybe POSIX -> Suite)
-> Lens Suite Suite (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Suite' {Maybe POSIX
started :: Maybe POSIX
$sel:started:Suite' :: Suite -> Maybe POSIX
started} -> Maybe POSIX
started) (\s :: Suite
s@Suite' {} Maybe POSIX
a -> Suite
s {$sel:started:Suite' :: Maybe POSIX
started = Maybe POSIX
a} :: Suite) ((Maybe POSIX -> f (Maybe POSIX)) -> Suite -> f Suite)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Suite
-> f Suite
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

instance Core.FromJSON Suite where
  parseJSON :: Value -> Parser Suite
parseJSON =
    String -> (Object -> Parser Suite) -> Value -> Parser Suite
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Suite"
      ( \Object
x ->
          Maybe ExecutionStatus
-> Maybe Counters
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe ExecutionResult
-> Maybe Text
-> Maybe DeviceMinutes
-> Maybe TestType
-> Maybe Text
-> Maybe POSIX
-> Suite
Suite'
            (Maybe ExecutionStatus
 -> Maybe Counters
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe POSIX
 -> Maybe ExecutionResult
 -> Maybe Text
 -> Maybe DeviceMinutes
 -> Maybe TestType
 -> Maybe Text
 -> Maybe POSIX
 -> Suite)
-> Parser (Maybe ExecutionStatus)
-> Parser
     (Maybe Counters
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe ExecutionResult
      -> Maybe Text
      -> Maybe DeviceMinutes
      -> Maybe TestType
      -> Maybe Text
      -> Maybe POSIX
      -> Suite)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ExecutionStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"status")
            Parser
  (Maybe Counters
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe ExecutionResult
   -> Maybe Text
   -> Maybe DeviceMinutes
   -> Maybe TestType
   -> Maybe Text
   -> Maybe POSIX
   -> Suite)
-> Parser (Maybe Counters)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe ExecutionResult
      -> Maybe Text
      -> Maybe DeviceMinutes
      -> Maybe TestType
      -> Maybe Text
      -> Maybe POSIX
      -> Suite)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Counters)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"counters")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe ExecutionResult
   -> Maybe Text
   -> Maybe DeviceMinutes
   -> Maybe TestType
   -> Maybe Text
   -> Maybe POSIX
   -> Suite)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe POSIX
      -> Maybe ExecutionResult
      -> Maybe Text
      -> Maybe DeviceMinutes
      -> Maybe TestType
      -> Maybe Text
      -> Maybe POSIX
      -> Suite)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"arn")
            Parser
  (Maybe POSIX
   -> Maybe POSIX
   -> Maybe ExecutionResult
   -> Maybe Text
   -> Maybe DeviceMinutes
   -> Maybe TestType
   -> Maybe Text
   -> Maybe POSIX
   -> Suite)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe POSIX
      -> Maybe ExecutionResult
      -> Maybe Text
      -> Maybe DeviceMinutes
      -> Maybe TestType
      -> Maybe Text
      -> Maybe POSIX
      -> Suite)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"created")
            Parser
  (Maybe POSIX
   -> Maybe ExecutionResult
   -> Maybe Text
   -> Maybe DeviceMinutes
   -> Maybe TestType
   -> Maybe Text
   -> Maybe POSIX
   -> Suite)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe ExecutionResult
      -> Maybe Text
      -> Maybe DeviceMinutes
      -> Maybe TestType
      -> Maybe Text
      -> Maybe POSIX
      -> Suite)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"stopped")
            Parser
  (Maybe ExecutionResult
   -> Maybe Text
   -> Maybe DeviceMinutes
   -> Maybe TestType
   -> Maybe Text
   -> Maybe POSIX
   -> Suite)
-> Parser (Maybe ExecutionResult)
-> Parser
     (Maybe Text
      -> Maybe DeviceMinutes
      -> Maybe TestType
      -> Maybe Text
      -> Maybe POSIX
      -> Suite)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ExecutionResult)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"result")
            Parser
  (Maybe Text
   -> Maybe DeviceMinutes
   -> Maybe TestType
   -> Maybe Text
   -> Maybe POSIX
   -> Suite)
-> Parser (Maybe Text)
-> Parser
     (Maybe DeviceMinutes
      -> Maybe TestType -> Maybe Text -> Maybe POSIX -> Suite)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"name")
            Parser
  (Maybe DeviceMinutes
   -> Maybe TestType -> Maybe Text -> Maybe POSIX -> Suite)
-> Parser (Maybe DeviceMinutes)
-> Parser (Maybe TestType -> Maybe Text -> Maybe POSIX -> Suite)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DeviceMinutes)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"deviceMinutes")
            Parser (Maybe TestType -> Maybe Text -> Maybe POSIX -> Suite)
-> Parser (Maybe TestType)
-> Parser (Maybe Text -> Maybe POSIX -> Suite)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe TestType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"type")
            Parser (Maybe Text -> Maybe POSIX -> Suite)
-> Parser (Maybe Text) -> Parser (Maybe POSIX -> Suite)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"message")
            Parser (Maybe POSIX -> Suite)
-> Parser (Maybe POSIX) -> Parser Suite
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"started")
      )

instance Prelude.Hashable Suite

instance Prelude.NFData Suite