{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data TestCase = TestCase'
{
TestCase -> Maybe Integer
durationInNanoSeconds :: Prelude.Maybe Prelude.Integer,
TestCase -> Maybe POSIX
expired :: Prelude.Maybe Data.POSIX,
TestCase -> Maybe Text
message :: Prelude.Maybe Prelude.Text,
TestCase -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
TestCase -> Maybe Text
prefix :: Prelude.Maybe Prelude.Text,
TestCase -> Maybe Text
reportArn :: Prelude.Maybe Prelude.Text,
TestCase -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
TestCase -> Maybe Text
testRawDataPath :: Prelude.Maybe Prelude.Text
}
deriving (TestCase -> TestCase -> Bool
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]
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
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. 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'
{ $sel:durationInNanoSeconds:TestCase' :: Maybe Integer
durationInNanoSeconds = forall a. Maybe a
Prelude.Nothing,
$sel:expired:TestCase' :: Maybe POSIX
expired = forall a. Maybe a
Prelude.Nothing,
$sel:message:TestCase' :: Maybe Text
message = forall a. Maybe a
Prelude.Nothing,
$sel:name:TestCase' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:prefix:TestCase' :: Maybe Text
prefix = forall a. Maybe a
Prelude.Nothing,
$sel:reportArn:TestCase' :: Maybe Text
reportArn = forall a. Maybe a
Prelude.Nothing,
$sel:status:TestCase' :: Maybe Text
status = forall a. Maybe a
Prelude.Nothing,
$sel:testRawDataPath:TestCase' :: Maybe Text
testRawDataPath = forall a. Maybe a
Prelude.Nothing
}
testCase_durationInNanoSeconds :: Lens.Lens' TestCase (Prelude.Maybe Prelude.Integer)
testCase_durationInNanoSeconds :: Lens' TestCase (Maybe Integer)
testCase_durationInNanoSeconds = 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_expired :: Lens.Lens' TestCase (Prelude.Maybe Prelude.UTCTime)
testCase_expired :: Lens' TestCase (Maybe UTCTime)
testCase_expired = 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) 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
testCase_message :: Lens.Lens' TestCase (Prelude.Maybe Prelude.Text)
testCase_message :: Lens' TestCase (Maybe Text)
testCase_message = 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_name :: Lens.Lens' TestCase (Prelude.Maybe Prelude.Text)
testCase_name :: Lens' TestCase (Maybe Text)
testCase_name = 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_prefix :: Lens.Lens' TestCase (Prelude.Maybe Prelude.Text)
testCase_prefix :: Lens' TestCase (Maybe Text)
testCase_prefix = 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_reportArn :: Lens.Lens' TestCase (Prelude.Maybe Prelude.Text)
testCase_reportArn :: Lens' TestCase (Maybe Text)
testCase_reportArn = 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)
testCase_status :: Lens.Lens' TestCase (Prelude.Maybe Prelude.Text)
testCase_status :: Lens' TestCase (Maybe Text)
testCase_status = 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_testRawDataPath :: Lens.Lens' TestCase (Prelude.Maybe Prelude.Text)
testCase_testRawDataPath :: Lens' TestCase (Maybe Text)
testCase_testRawDataPath = 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)
instance Data.FromJSON TestCase where
parseJSON :: Value -> Parser TestCase
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"TestCase"
( \Object
x ->
Maybe Integer
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> TestCase
TestCase'
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
"durationInNanoSeconds")
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
"expired")
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
"message")
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
"prefix")
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
"reportArn")
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
"testRawDataPath")
)
instance Prelude.Hashable TestCase where
hashWithSalt :: Int -> TestCase -> Int
hashWithSalt Int
_salt TestCase' {Maybe Integer
Maybe Text
Maybe POSIX
testRawDataPath :: Maybe Text
status :: Maybe Text
reportArn :: Maybe Text
prefix :: Maybe Text
name :: Maybe Text
message :: Maybe Text
expired :: Maybe POSIX
durationInNanoSeconds :: Maybe Integer
$sel:testRawDataPath:TestCase' :: TestCase -> Maybe Text
$sel:status:TestCase' :: TestCase -> Maybe Text
$sel:reportArn:TestCase' :: TestCase -> Maybe Text
$sel:prefix:TestCase' :: TestCase -> Maybe Text
$sel:name:TestCase' :: TestCase -> Maybe Text
$sel:message:TestCase' :: TestCase -> Maybe Text
$sel:expired:TestCase' :: TestCase -> Maybe POSIX
$sel:durationInNanoSeconds:TestCase' :: TestCase -> Maybe Integer
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
durationInNanoSeconds
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
expired
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
message
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
prefix
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
reportArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
status
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
testRawDataPath
instance Prelude.NFData TestCase where
rnf :: TestCase -> ()
rnf TestCase' {Maybe Integer
Maybe Text
Maybe POSIX
testRawDataPath :: Maybe Text
status :: Maybe Text
reportArn :: Maybe Text
prefix :: Maybe Text
name :: Maybe Text
message :: Maybe Text
expired :: Maybe POSIX
durationInNanoSeconds :: Maybe Integer
$sel:testRawDataPath:TestCase' :: TestCase -> Maybe Text
$sel:status:TestCase' :: TestCase -> Maybe Text
$sel:reportArn:TestCase' :: TestCase -> Maybe Text
$sel:prefix:TestCase' :: TestCase -> Maybe Text
$sel:name:TestCase' :: TestCase -> Maybe Text
$sel:message:TestCase' :: TestCase -> Maybe Text
$sel:expired:TestCase' :: TestCase -> Maybe POSIX
$sel:durationInNanoSeconds:TestCase' :: TestCase -> Maybe Integer
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
durationInNanoSeconds
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
expired
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
message
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 Text
prefix
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
reportArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
status
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
testRawDataPath