{-# 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 #-}
module Amazonka.CodeBuild.Types.TestCase where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data TestCase = TestCase'
{
TestCase -> Maybe Integer
durationInNanoSeconds :: Prelude.Maybe Prelude.Integer,
TestCase -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
TestCase -> Maybe POSIX
expired :: Prelude.Maybe Core.POSIX,
TestCase -> Maybe Text
prefix :: Prelude.Maybe Prelude.Text,
TestCase -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
TestCase -> Maybe Text
testRawDataPath :: Prelude.Maybe Prelude.Text,
TestCase -> Maybe Text
message :: Prelude.Maybe Prelude.Text,
TestCase -> Maybe Text
reportArn :: Prelude.Maybe Prelude.Text
}
deriving (TestCase -> TestCase -> Bool
(TestCase -> TestCase -> Bool)
-> (TestCase -> TestCase -> Bool) -> Eq TestCase
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TestCase -> TestCase -> Bool
$c/= :: TestCase -> TestCase -> Bool
== :: TestCase -> TestCase -> Bool
$c== :: TestCase -> TestCase -> Bool
Prelude.Eq, ReadPrec [TestCase]
ReadPrec TestCase
Int -> ReadS TestCase
ReadS [TestCase]
(Int -> ReadS TestCase)
-> ReadS [TestCase]
-> ReadPrec TestCase
-> ReadPrec [TestCase]
-> Read TestCase
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TestCase]
$creadListPrec :: ReadPrec [TestCase]
readPrec :: ReadPrec TestCase
$creadPrec :: ReadPrec TestCase
readList :: ReadS [TestCase]
$creadList :: ReadS [TestCase]
readsPrec :: Int -> ReadS TestCase
$creadsPrec :: Int -> ReadS TestCase
Prelude.Read, Int -> TestCase -> ShowS
[TestCase] -> ShowS
TestCase -> String
(Int -> TestCase -> ShowS)
-> (TestCase -> String) -> ([TestCase] -> ShowS) -> Show TestCase
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TestCase] -> ShowS
$cshowList :: [TestCase] -> ShowS
show :: TestCase -> String
$cshow :: TestCase -> String
showsPrec :: Int -> TestCase -> ShowS
$cshowsPrec :: Int -> TestCase -> ShowS
Prelude.Show, (forall x. TestCase -> Rep TestCase x)
-> (forall x. Rep TestCase x -> TestCase) -> Generic TestCase
forall x. Rep TestCase x -> TestCase
forall x. TestCase -> Rep TestCase x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TestCase x -> TestCase
$cfrom :: forall x. TestCase -> Rep TestCase x
Prelude.Generic)
newTestCase ::
TestCase
newTestCase :: TestCase
newTestCase =
TestCase' :: Maybe Integer
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> TestCase
TestCase'
{ $sel:durationInNanoSeconds:TestCase' :: Maybe Integer
durationInNanoSeconds = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:status:TestCase' :: Maybe Text
status = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:expired:TestCase' :: Maybe POSIX
expired = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:prefix:TestCase' :: Maybe Text
prefix = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:TestCase' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:testRawDataPath:TestCase' :: Maybe Text
testRawDataPath = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:message:TestCase' :: Maybe Text
message = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:reportArn:TestCase' :: Maybe Text
reportArn = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
testCase_durationInNanoSeconds :: Lens.Lens' TestCase (Prelude.Maybe Prelude.Integer)
testCase_durationInNanoSeconds :: (Maybe Integer -> f (Maybe Integer)) -> TestCase -> f TestCase
testCase_durationInNanoSeconds = (TestCase -> Maybe Integer)
-> (TestCase -> Maybe Integer -> TestCase)
-> Lens TestCase TestCase (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TestCase' {Maybe Integer
durationInNanoSeconds :: Maybe Integer
$sel:durationInNanoSeconds:TestCase' :: TestCase -> Maybe Integer
durationInNanoSeconds} -> Maybe Integer
durationInNanoSeconds) (\s :: TestCase
s@TestCase' {} Maybe Integer
a -> TestCase
s {$sel:durationInNanoSeconds:TestCase' :: Maybe Integer
durationInNanoSeconds = Maybe Integer
a} :: TestCase)
testCase_status :: Lens.Lens' TestCase (Prelude.Maybe Prelude.Text)
testCase_status :: (Maybe Text -> f (Maybe Text)) -> TestCase -> f TestCase
testCase_status = (TestCase -> Maybe Text)
-> (TestCase -> Maybe Text -> TestCase)
-> Lens TestCase TestCase (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TestCase' {Maybe Text
status :: Maybe Text
$sel:status:TestCase' :: TestCase -> Maybe Text
status} -> Maybe Text
status) (\s :: TestCase
s@TestCase' {} Maybe Text
a -> TestCase
s {$sel:status:TestCase' :: Maybe Text
status = Maybe Text
a} :: TestCase)
testCase_expired :: Lens.Lens' TestCase (Prelude.Maybe Prelude.UTCTime)
testCase_expired :: (Maybe UTCTime -> f (Maybe UTCTime)) -> TestCase -> f TestCase
testCase_expired = (TestCase -> Maybe POSIX)
-> (TestCase -> Maybe POSIX -> TestCase)
-> Lens TestCase TestCase (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TestCase' {Maybe POSIX
expired :: Maybe POSIX
$sel:expired:TestCase' :: TestCase -> Maybe POSIX
expired} -> Maybe POSIX
expired) (\s :: TestCase
s@TestCase' {} Maybe POSIX
a -> TestCase
s {$sel:expired:TestCase' :: Maybe POSIX
expired = Maybe POSIX
a} :: TestCase) ((Maybe POSIX -> f (Maybe POSIX)) -> TestCase -> f TestCase)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> TestCase
-> f TestCase
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
testCase_prefix :: Lens.Lens' TestCase (Prelude.Maybe Prelude.Text)
testCase_prefix :: (Maybe Text -> f (Maybe Text)) -> TestCase -> f TestCase
testCase_prefix = (TestCase -> Maybe Text)
-> (TestCase -> Maybe Text -> TestCase)
-> Lens TestCase TestCase (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TestCase' {Maybe Text
prefix :: Maybe Text
$sel:prefix:TestCase' :: TestCase -> Maybe Text
prefix} -> Maybe Text
prefix) (\s :: TestCase
s@TestCase' {} Maybe Text
a -> TestCase
s {$sel:prefix:TestCase' :: Maybe Text
prefix = Maybe Text
a} :: TestCase)
testCase_name :: Lens.Lens' TestCase (Prelude.Maybe Prelude.Text)
testCase_name :: (Maybe Text -> f (Maybe Text)) -> TestCase -> f TestCase
testCase_name = (TestCase -> Maybe Text)
-> (TestCase -> Maybe Text -> TestCase)
-> Lens TestCase TestCase (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TestCase' {Maybe Text
name :: Maybe Text
$sel:name:TestCase' :: TestCase -> Maybe Text
name} -> Maybe Text
name) (\s :: TestCase
s@TestCase' {} Maybe Text
a -> TestCase
s {$sel:name:TestCase' :: Maybe Text
name = Maybe Text
a} :: TestCase)
testCase_testRawDataPath :: Lens.Lens' TestCase (Prelude.Maybe Prelude.Text)
testCase_testRawDataPath :: (Maybe Text -> f (Maybe Text)) -> TestCase -> f TestCase
testCase_testRawDataPath = (TestCase -> Maybe Text)
-> (TestCase -> Maybe Text -> TestCase)
-> Lens TestCase TestCase (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TestCase' {Maybe Text
testRawDataPath :: Maybe Text
$sel:testRawDataPath:TestCase' :: TestCase -> Maybe Text
testRawDataPath} -> Maybe Text
testRawDataPath) (\s :: TestCase
s@TestCase' {} Maybe Text
a -> TestCase
s {$sel:testRawDataPath:TestCase' :: Maybe Text
testRawDataPath = Maybe Text
a} :: TestCase)
testCase_message :: Lens.Lens' TestCase (Prelude.Maybe Prelude.Text)
testCase_message :: (Maybe Text -> f (Maybe Text)) -> TestCase -> f TestCase
testCase_message = (TestCase -> Maybe Text)
-> (TestCase -> Maybe Text -> TestCase)
-> Lens TestCase TestCase (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TestCase' {Maybe Text
message :: Maybe Text
$sel:message:TestCase' :: TestCase -> Maybe Text
message} -> Maybe Text
message) (\s :: TestCase
s@TestCase' {} Maybe Text
a -> TestCase
s {$sel:message:TestCase' :: Maybe Text
message = Maybe Text
a} :: TestCase)
testCase_reportArn :: Lens.Lens' TestCase (Prelude.Maybe Prelude.Text)
testCase_reportArn :: (Maybe Text -> f (Maybe Text)) -> TestCase -> f TestCase
testCase_reportArn = (TestCase -> Maybe Text)
-> (TestCase -> Maybe Text -> TestCase)
-> Lens TestCase TestCase (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TestCase' {Maybe Text
reportArn :: Maybe Text
$sel:reportArn:TestCase' :: TestCase -> Maybe Text
reportArn} -> Maybe Text
reportArn) (\s :: TestCase
s@TestCase' {} Maybe Text
a -> TestCase
s {$sel:reportArn:TestCase' :: Maybe Text
reportArn = Maybe Text
a} :: TestCase)
instance Core.FromJSON TestCase where
parseJSON :: Value -> Parser TestCase
parseJSON =
String -> (Object -> Parser TestCase) -> Value -> Parser TestCase
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"TestCase"
( \Object
x ->
Maybe Integer
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> TestCase
TestCase'
(Maybe Integer
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> TestCase)
-> Parser (Maybe Integer)
-> Parser
(Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> TestCase)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"durationInNanoSeconds")
Parser
(Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> TestCase)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> TestCase)
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
"status")
Parser
(Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> TestCase)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> TestCase)
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
"expired")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> TestCase)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> TestCase)
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
"prefix")
Parser
(Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> TestCase)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> Maybe Text -> TestCase)
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 Text -> Maybe Text -> Maybe Text -> TestCase)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> TestCase)
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
"testRawDataPath")
Parser (Maybe Text -> Maybe Text -> TestCase)
-> Parser (Maybe Text) -> Parser (Maybe Text -> TestCase)
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 Text -> TestCase)
-> Parser (Maybe Text) -> Parser TestCase
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
"reportArn")
)
instance Prelude.Hashable TestCase
instance Prelude.NFData TestCase