{-# 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.Test
-- 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.Test 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 condition that is evaluated.
--
-- /See:/ 'newTest' smart constructor.
data Test = Test'
  { -- | The test\'s status.
    --
    -- Allowed values include:
    --
    -- -   PENDING
    --
    -- -   PENDING_CONCURRENCY
    --
    -- -   PENDING_DEVICE
    --
    -- -   PROCESSING
    --
    -- -   SCHEDULING
    --
    -- -   PREPARING
    --
    -- -   RUNNING
    --
    -- -   COMPLETED
    --
    -- -   STOPPING
    Test -> Maybe ExecutionStatus
status :: Prelude.Maybe ExecutionStatus,
    -- | The test\'s result counters.
    Test -> Maybe Counters
counters :: Prelude.Maybe Counters,
    -- | The test\'s ARN.
    Test -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | When the test was created.
    Test -> Maybe POSIX
created :: Prelude.Maybe Core.POSIX,
    -- | The test\'s stop time.
    Test -> Maybe POSIX
stopped :: Prelude.Maybe Core.POSIX,
    -- | The test\'s result.
    --
    -- Allowed values include:
    --
    -- -   PENDING
    --
    -- -   PASSED
    --
    -- -   WARNED
    --
    -- -   FAILED
    --
    -- -   SKIPPED
    --
    -- -   ERRORED
    --
    -- -   STOPPED
    Test -> Maybe ExecutionResult
result :: Prelude.Maybe ExecutionResult,
    -- | The test\'s name.
    Test -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | Represents the total (metered or unmetered) minutes used by the test.
    Test -> Maybe DeviceMinutes
deviceMinutes :: Prelude.Maybe DeviceMinutes,
    -- | The test\'s type.
    --
    -- Must be one of the following values:
    --
    -- -   BUILTIN_FUZZ
    --
    -- -   BUILTIN_EXPLORER
    --
    --     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
    Test -> Maybe TestType
type' :: Prelude.Maybe TestType,
    -- | A message about the test\'s result.
    Test -> Maybe Text
message :: Prelude.Maybe Prelude.Text,
    -- | The test\'s start time.
    Test -> Maybe POSIX
started :: Prelude.Maybe Core.POSIX
  }
  deriving (Test -> Test -> Bool
(Test -> Test -> Bool) -> (Test -> Test -> Bool) -> Eq Test
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Test -> Test -> Bool
$c/= :: Test -> Test -> Bool
== :: Test -> Test -> Bool
$c== :: Test -> Test -> Bool
Prelude.Eq, ReadPrec [Test]
ReadPrec Test
Int -> ReadS Test
ReadS [Test]
(Int -> ReadS Test)
-> ReadS [Test] -> ReadPrec Test -> ReadPrec [Test] -> Read Test
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Test]
$creadListPrec :: ReadPrec [Test]
readPrec :: ReadPrec Test
$creadPrec :: ReadPrec Test
readList :: ReadS [Test]
$creadList :: ReadS [Test]
readsPrec :: Int -> ReadS Test
$creadsPrec :: Int -> ReadS Test
Prelude.Read, Int -> Test -> ShowS
[Test] -> ShowS
Test -> String
(Int -> Test -> ShowS)
-> (Test -> String) -> ([Test] -> ShowS) -> Show Test
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Test] -> ShowS
$cshowList :: [Test] -> ShowS
show :: Test -> String
$cshow :: Test -> String
showsPrec :: Int -> Test -> ShowS
$cshowsPrec :: Int -> Test -> ShowS
Prelude.Show, (forall x. Test -> Rep Test x)
-> (forall x. Rep Test x -> Test) -> Generic Test
forall x. Rep Test x -> Test
forall x. Test -> Rep Test x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Test x -> Test
$cfrom :: forall x. Test -> Rep Test x
Prelude.Generic)

-- |
-- Create a value of 'Test' 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', 'test_status' - The test\'s status.
--
-- Allowed values include:
--
-- -   PENDING
--
-- -   PENDING_CONCURRENCY
--
-- -   PENDING_DEVICE
--
-- -   PROCESSING
--
-- -   SCHEDULING
--
-- -   PREPARING
--
-- -   RUNNING
--
-- -   COMPLETED
--
-- -   STOPPING
--
-- 'counters', 'test_counters' - The test\'s result counters.
--
-- 'arn', 'test_arn' - The test\'s ARN.
--
-- 'created', 'test_created' - When the test was created.
--
-- 'stopped', 'test_stopped' - The test\'s stop time.
--
-- 'result', 'test_result' - The test\'s result.
--
-- Allowed values include:
--
-- -   PENDING
--
-- -   PASSED
--
-- -   WARNED
--
-- -   FAILED
--
-- -   SKIPPED
--
-- -   ERRORED
--
-- -   STOPPED
--
-- 'name', 'test_name' - The test\'s name.
--
-- 'deviceMinutes', 'test_deviceMinutes' - Represents the total (metered or unmetered) minutes used by the test.
--
-- 'type'', 'test_type' - The test\'s type.
--
-- Must be one of the following values:
--
-- -   BUILTIN_FUZZ
--
-- -   BUILTIN_EXPLORER
--
--     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', 'test_message' - A message about the test\'s result.
--
-- 'started', 'test_started' - The test\'s start time.
newTest ::
  Test
newTest :: Test
newTest =
  Test' :: Maybe ExecutionStatus
-> Maybe Counters
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe ExecutionResult
-> Maybe Text
-> Maybe DeviceMinutes
-> Maybe TestType
-> Maybe Text
-> Maybe POSIX
-> Test
Test'
    { $sel:status:Test' :: Maybe ExecutionStatus
status = Maybe ExecutionStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:counters:Test' :: Maybe Counters
counters = Maybe Counters
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:Test' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:created:Test' :: Maybe POSIX
created = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:stopped:Test' :: Maybe POSIX
stopped = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:result:Test' :: Maybe ExecutionResult
result = Maybe ExecutionResult
forall a. Maybe a
Prelude.Nothing,
      $sel:name:Test' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:deviceMinutes:Test' :: Maybe DeviceMinutes
deviceMinutes = Maybe DeviceMinutes
forall a. Maybe a
Prelude.Nothing,
      $sel:type':Test' :: Maybe TestType
type' = Maybe TestType
forall a. Maybe a
Prelude.Nothing,
      $sel:message:Test' :: Maybe Text
message = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:started:Test' :: Maybe POSIX
started = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
    }

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

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

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

-- | When the test was created.
test_created :: Lens.Lens' Test (Prelude.Maybe Prelude.UTCTime)
test_created :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Test -> f Test
test_created = (Test -> Maybe POSIX)
-> (Test -> Maybe POSIX -> Test)
-> Lens Test Test (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Test' {Maybe POSIX
created :: Maybe POSIX
$sel:created:Test' :: Test -> Maybe POSIX
created} -> Maybe POSIX
created) (\s :: Test
s@Test' {} Maybe POSIX
a -> Test
s {$sel:created:Test' :: Maybe POSIX
created = Maybe POSIX
a} :: Test) ((Maybe POSIX -> f (Maybe POSIX)) -> Test -> f Test)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Test
-> f Test
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 test\'s stop time.
test_stopped :: Lens.Lens' Test (Prelude.Maybe Prelude.UTCTime)
test_stopped :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Test -> f Test
test_stopped = (Test -> Maybe POSIX)
-> (Test -> Maybe POSIX -> Test)
-> Lens Test Test (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Test' {Maybe POSIX
stopped :: Maybe POSIX
$sel:stopped:Test' :: Test -> Maybe POSIX
stopped} -> Maybe POSIX
stopped) (\s :: Test
s@Test' {} Maybe POSIX
a -> Test
s {$sel:stopped:Test' :: Maybe POSIX
stopped = Maybe POSIX
a} :: Test) ((Maybe POSIX -> f (Maybe POSIX)) -> Test -> f Test)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Test
-> f Test
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 test\'s result.
--
-- Allowed values include:
--
-- -   PENDING
--
-- -   PASSED
--
-- -   WARNED
--
-- -   FAILED
--
-- -   SKIPPED
--
-- -   ERRORED
--
-- -   STOPPED
test_result :: Lens.Lens' Test (Prelude.Maybe ExecutionResult)
test_result :: (Maybe ExecutionResult -> f (Maybe ExecutionResult))
-> Test -> f Test
test_result = (Test -> Maybe ExecutionResult)
-> (Test -> Maybe ExecutionResult -> Test)
-> Lens Test Test (Maybe ExecutionResult) (Maybe ExecutionResult)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Test' {Maybe ExecutionResult
result :: Maybe ExecutionResult
$sel:result:Test' :: Test -> Maybe ExecutionResult
result} -> Maybe ExecutionResult
result) (\s :: Test
s@Test' {} Maybe ExecutionResult
a -> Test
s {$sel:result:Test' :: Maybe ExecutionResult
result = Maybe ExecutionResult
a} :: Test)

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

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

-- | The test\'s type.
--
-- Must be one of the following values:
--
-- -   BUILTIN_FUZZ
--
-- -   BUILTIN_EXPLORER
--
--     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
test_type :: Lens.Lens' Test (Prelude.Maybe TestType)
test_type :: (Maybe TestType -> f (Maybe TestType)) -> Test -> f Test
test_type = (Test -> Maybe TestType)
-> (Test -> Maybe TestType -> Test)
-> Lens Test Test (Maybe TestType) (Maybe TestType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Test' {Maybe TestType
type' :: Maybe TestType
$sel:type':Test' :: Test -> Maybe TestType
type'} -> Maybe TestType
type') (\s :: Test
s@Test' {} Maybe TestType
a -> Test
s {$sel:type':Test' :: Maybe TestType
type' = Maybe TestType
a} :: Test)

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

-- | The test\'s start time.
test_started :: Lens.Lens' Test (Prelude.Maybe Prelude.UTCTime)
test_started :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Test -> f Test
test_started = (Test -> Maybe POSIX)
-> (Test -> Maybe POSIX -> Test)
-> Lens Test Test (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Test' {Maybe POSIX
started :: Maybe POSIX
$sel:started:Test' :: Test -> Maybe POSIX
started} -> Maybe POSIX
started) (\s :: Test
s@Test' {} Maybe POSIX
a -> Test
s {$sel:started:Test' :: Maybe POSIX
started = Maybe POSIX
a} :: Test) ((Maybe POSIX -> f (Maybe POSIX)) -> Test -> f Test)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Test
-> f Test
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 Test where
  parseJSON :: Value -> Parser Test
parseJSON =
    String -> (Object -> Parser Test) -> Value -> Parser Test
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Test"
      ( \Object
x ->
          Maybe ExecutionStatus
-> Maybe Counters
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe ExecutionResult
-> Maybe Text
-> Maybe DeviceMinutes
-> Maybe TestType
-> Maybe Text
-> Maybe POSIX
-> Test
Test'
            (Maybe ExecutionStatus
 -> Maybe Counters
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe POSIX
 -> Maybe ExecutionResult
 -> Maybe Text
 -> Maybe DeviceMinutes
 -> Maybe TestType
 -> Maybe Text
 -> Maybe POSIX
 -> Test)
-> Parser (Maybe ExecutionStatus)
-> Parser
     (Maybe Counters
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe ExecutionResult
      -> Maybe Text
      -> Maybe DeviceMinutes
      -> Maybe TestType
      -> Maybe Text
      -> Maybe POSIX
      -> Test)
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
   -> Test)
-> Parser (Maybe Counters)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe ExecutionResult
      -> Maybe Text
      -> Maybe DeviceMinutes
      -> Maybe TestType
      -> Maybe Text
      -> Maybe POSIX
      -> Test)
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
   -> Test)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe POSIX
      -> Maybe ExecutionResult
      -> Maybe Text
      -> Maybe DeviceMinutes
      -> Maybe TestType
      -> Maybe Text
      -> Maybe POSIX
      -> Test)
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
   -> Test)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe POSIX
      -> Maybe ExecutionResult
      -> Maybe Text
      -> Maybe DeviceMinutes
      -> Maybe TestType
      -> Maybe Text
      -> Maybe POSIX
      -> Test)
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
   -> Test)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe ExecutionResult
      -> Maybe Text
      -> Maybe DeviceMinutes
      -> Maybe TestType
      -> Maybe Text
      -> Maybe POSIX
      -> Test)
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
   -> Test)
-> Parser (Maybe ExecutionResult)
-> Parser
     (Maybe Text
      -> Maybe DeviceMinutes
      -> Maybe TestType
      -> Maybe Text
      -> Maybe POSIX
      -> Test)
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
   -> Test)
-> Parser (Maybe Text)
-> Parser
     (Maybe DeviceMinutes
      -> Maybe TestType -> Maybe Text -> Maybe POSIX -> Test)
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 -> Test)
-> Parser (Maybe DeviceMinutes)
-> Parser (Maybe TestType -> Maybe Text -> Maybe POSIX -> Test)
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 -> Test)
-> Parser (Maybe TestType)
-> Parser (Maybe Text -> Maybe POSIX -> Test)
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 -> Test)
-> Parser (Maybe Text) -> Parser (Maybe POSIX -> Test)
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 -> Test) -> Parser (Maybe POSIX) -> Parser Test
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 Test

instance Prelude.NFData Test