{-# 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.CodeCoverage 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 CodeCoverage = CodeCoverage'
{
CodeCoverage -> Maybe Double
branchCoveragePercentage :: Prelude.Maybe Prelude.Double,
CodeCoverage -> Maybe Natural
branchesCovered :: Prelude.Maybe Prelude.Natural,
CodeCoverage -> Maybe Natural
branchesMissed :: Prelude.Maybe Prelude.Natural,
CodeCoverage -> Maybe POSIX
expired :: Prelude.Maybe Data.POSIX,
CodeCoverage -> Maybe Text
filePath :: Prelude.Maybe Prelude.Text,
CodeCoverage -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
CodeCoverage -> Maybe Double
lineCoveragePercentage :: Prelude.Maybe Prelude.Double,
CodeCoverage -> Maybe Natural
linesCovered :: Prelude.Maybe Prelude.Natural,
CodeCoverage -> Maybe Natural
linesMissed :: Prelude.Maybe Prelude.Natural,
CodeCoverage -> Maybe Text
reportARN :: Prelude.Maybe Prelude.Text
}
deriving (CodeCoverage -> CodeCoverage -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CodeCoverage -> CodeCoverage -> Bool
$c/= :: CodeCoverage -> CodeCoverage -> Bool
== :: CodeCoverage -> CodeCoverage -> Bool
$c== :: CodeCoverage -> CodeCoverage -> Bool
Prelude.Eq, ReadPrec [CodeCoverage]
ReadPrec CodeCoverage
Int -> ReadS CodeCoverage
ReadS [CodeCoverage]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CodeCoverage]
$creadListPrec :: ReadPrec [CodeCoverage]
readPrec :: ReadPrec CodeCoverage
$creadPrec :: ReadPrec CodeCoverage
readList :: ReadS [CodeCoverage]
$creadList :: ReadS [CodeCoverage]
readsPrec :: Int -> ReadS CodeCoverage
$creadsPrec :: Int -> ReadS CodeCoverage
Prelude.Read, Int -> CodeCoverage -> ShowS
[CodeCoverage] -> ShowS
CodeCoverage -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CodeCoverage] -> ShowS
$cshowList :: [CodeCoverage] -> ShowS
show :: CodeCoverage -> String
$cshow :: CodeCoverage -> String
showsPrec :: Int -> CodeCoverage -> ShowS
$cshowsPrec :: Int -> CodeCoverage -> ShowS
Prelude.Show, forall x. Rep CodeCoverage x -> CodeCoverage
forall x. CodeCoverage -> Rep CodeCoverage x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CodeCoverage x -> CodeCoverage
$cfrom :: forall x. CodeCoverage -> Rep CodeCoverage x
Prelude.Generic)
newCodeCoverage ::
CodeCoverage
newCodeCoverage :: CodeCoverage
newCodeCoverage =
CodeCoverage'
{ $sel:branchCoveragePercentage:CodeCoverage' :: Maybe Double
branchCoveragePercentage =
forall a. Maybe a
Prelude.Nothing,
$sel:branchesCovered:CodeCoverage' :: Maybe Natural
branchesCovered = forall a. Maybe a
Prelude.Nothing,
$sel:branchesMissed:CodeCoverage' :: Maybe Natural
branchesMissed = forall a. Maybe a
Prelude.Nothing,
$sel:expired:CodeCoverage' :: Maybe POSIX
expired = forall a. Maybe a
Prelude.Nothing,
$sel:filePath:CodeCoverage' :: Maybe Text
filePath = forall a. Maybe a
Prelude.Nothing,
$sel:id:CodeCoverage' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
$sel:lineCoveragePercentage:CodeCoverage' :: Maybe Double
lineCoveragePercentage = forall a. Maybe a
Prelude.Nothing,
$sel:linesCovered:CodeCoverage' :: Maybe Natural
linesCovered = forall a. Maybe a
Prelude.Nothing,
$sel:linesMissed:CodeCoverage' :: Maybe Natural
linesMissed = forall a. Maybe a
Prelude.Nothing,
$sel:reportARN:CodeCoverage' :: Maybe Text
reportARN = forall a. Maybe a
Prelude.Nothing
}
codeCoverage_branchCoveragePercentage :: Lens.Lens' CodeCoverage (Prelude.Maybe Prelude.Double)
codeCoverage_branchCoveragePercentage :: Lens' CodeCoverage (Maybe Double)
codeCoverage_branchCoveragePercentage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeCoverage' {Maybe Double
branchCoveragePercentage :: Maybe Double
$sel:branchCoveragePercentage:CodeCoverage' :: CodeCoverage -> Maybe Double
branchCoveragePercentage} -> Maybe Double
branchCoveragePercentage) (\s :: CodeCoverage
s@CodeCoverage' {} Maybe Double
a -> CodeCoverage
s {$sel:branchCoveragePercentage:CodeCoverage' :: Maybe Double
branchCoveragePercentage = Maybe Double
a} :: CodeCoverage)
codeCoverage_branchesCovered :: Lens.Lens' CodeCoverage (Prelude.Maybe Prelude.Natural)
codeCoverage_branchesCovered :: Lens' CodeCoverage (Maybe Natural)
codeCoverage_branchesCovered = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeCoverage' {Maybe Natural
branchesCovered :: Maybe Natural
$sel:branchesCovered:CodeCoverage' :: CodeCoverage -> Maybe Natural
branchesCovered} -> Maybe Natural
branchesCovered) (\s :: CodeCoverage
s@CodeCoverage' {} Maybe Natural
a -> CodeCoverage
s {$sel:branchesCovered:CodeCoverage' :: Maybe Natural
branchesCovered = Maybe Natural
a} :: CodeCoverage)
codeCoverage_branchesMissed :: Lens.Lens' CodeCoverage (Prelude.Maybe Prelude.Natural)
codeCoverage_branchesMissed :: Lens' CodeCoverage (Maybe Natural)
codeCoverage_branchesMissed = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeCoverage' {Maybe Natural
branchesMissed :: Maybe Natural
$sel:branchesMissed:CodeCoverage' :: CodeCoverage -> Maybe Natural
branchesMissed} -> Maybe Natural
branchesMissed) (\s :: CodeCoverage
s@CodeCoverage' {} Maybe Natural
a -> CodeCoverage
s {$sel:branchesMissed:CodeCoverage' :: Maybe Natural
branchesMissed = Maybe Natural
a} :: CodeCoverage)
codeCoverage_expired :: Lens.Lens' CodeCoverage (Prelude.Maybe Prelude.UTCTime)
codeCoverage_expired :: Lens' CodeCoverage (Maybe UTCTime)
codeCoverage_expired = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeCoverage' {Maybe POSIX
expired :: Maybe POSIX
$sel:expired:CodeCoverage' :: CodeCoverage -> Maybe POSIX
expired} -> Maybe POSIX
expired) (\s :: CodeCoverage
s@CodeCoverage' {} Maybe POSIX
a -> CodeCoverage
s {$sel:expired:CodeCoverage' :: Maybe POSIX
expired = Maybe POSIX
a} :: CodeCoverage) 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
codeCoverage_filePath :: Lens.Lens' CodeCoverage (Prelude.Maybe Prelude.Text)
codeCoverage_filePath :: Lens' CodeCoverage (Maybe Text)
codeCoverage_filePath = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeCoverage' {Maybe Text
filePath :: Maybe Text
$sel:filePath:CodeCoverage' :: CodeCoverage -> Maybe Text
filePath} -> Maybe Text
filePath) (\s :: CodeCoverage
s@CodeCoverage' {} Maybe Text
a -> CodeCoverage
s {$sel:filePath:CodeCoverage' :: Maybe Text
filePath = Maybe Text
a} :: CodeCoverage)
codeCoverage_id :: Lens.Lens' CodeCoverage (Prelude.Maybe Prelude.Text)
codeCoverage_id :: Lens' CodeCoverage (Maybe Text)
codeCoverage_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeCoverage' {Maybe Text
id :: Maybe Text
$sel:id:CodeCoverage' :: CodeCoverage -> Maybe Text
id} -> Maybe Text
id) (\s :: CodeCoverage
s@CodeCoverage' {} Maybe Text
a -> CodeCoverage
s {$sel:id:CodeCoverage' :: Maybe Text
id = Maybe Text
a} :: CodeCoverage)
codeCoverage_lineCoveragePercentage :: Lens.Lens' CodeCoverage (Prelude.Maybe Prelude.Double)
codeCoverage_lineCoveragePercentage :: Lens' CodeCoverage (Maybe Double)
codeCoverage_lineCoveragePercentage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeCoverage' {Maybe Double
lineCoveragePercentage :: Maybe Double
$sel:lineCoveragePercentage:CodeCoverage' :: CodeCoverage -> Maybe Double
lineCoveragePercentage} -> Maybe Double
lineCoveragePercentage) (\s :: CodeCoverage
s@CodeCoverage' {} Maybe Double
a -> CodeCoverage
s {$sel:lineCoveragePercentage:CodeCoverage' :: Maybe Double
lineCoveragePercentage = Maybe Double
a} :: CodeCoverage)
codeCoverage_linesCovered :: Lens.Lens' CodeCoverage (Prelude.Maybe Prelude.Natural)
codeCoverage_linesCovered :: Lens' CodeCoverage (Maybe Natural)
codeCoverage_linesCovered = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeCoverage' {Maybe Natural
linesCovered :: Maybe Natural
$sel:linesCovered:CodeCoverage' :: CodeCoverage -> Maybe Natural
linesCovered} -> Maybe Natural
linesCovered) (\s :: CodeCoverage
s@CodeCoverage' {} Maybe Natural
a -> CodeCoverage
s {$sel:linesCovered:CodeCoverage' :: Maybe Natural
linesCovered = Maybe Natural
a} :: CodeCoverage)
codeCoverage_linesMissed :: Lens.Lens' CodeCoverage (Prelude.Maybe Prelude.Natural)
codeCoverage_linesMissed :: Lens' CodeCoverage (Maybe Natural)
codeCoverage_linesMissed = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeCoverage' {Maybe Natural
linesMissed :: Maybe Natural
$sel:linesMissed:CodeCoverage' :: CodeCoverage -> Maybe Natural
linesMissed} -> Maybe Natural
linesMissed) (\s :: CodeCoverage
s@CodeCoverage' {} Maybe Natural
a -> CodeCoverage
s {$sel:linesMissed:CodeCoverage' :: Maybe Natural
linesMissed = Maybe Natural
a} :: CodeCoverage)
codeCoverage_reportARN :: Lens.Lens' CodeCoverage (Prelude.Maybe Prelude.Text)
codeCoverage_reportARN :: Lens' CodeCoverage (Maybe Text)
codeCoverage_reportARN = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeCoverage' {Maybe Text
reportARN :: Maybe Text
$sel:reportARN:CodeCoverage' :: CodeCoverage -> Maybe Text
reportARN} -> Maybe Text
reportARN) (\s :: CodeCoverage
s@CodeCoverage' {} Maybe Text
a -> CodeCoverage
s {$sel:reportARN:CodeCoverage' :: Maybe Text
reportARN = Maybe Text
a} :: CodeCoverage)
instance Data.FromJSON CodeCoverage where
parseJSON :: Value -> Parser CodeCoverage
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"CodeCoverage"
( \Object
x ->
Maybe Double
-> Maybe Natural
-> Maybe Natural
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Double
-> Maybe Natural
-> Maybe Natural
-> Maybe Text
-> CodeCoverage
CodeCoverage'
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
"branchCoveragePercentage")
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
"branchesCovered")
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
"branchesMissed")
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
"filePath")
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
"lineCoveragePercentage")
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
"linesCovered")
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
"linesMissed")
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")
)
instance Prelude.Hashable CodeCoverage where
hashWithSalt :: Int -> CodeCoverage -> Int
hashWithSalt Int
_salt CodeCoverage' {Maybe Double
Maybe Natural
Maybe Text
Maybe POSIX
reportARN :: Maybe Text
linesMissed :: Maybe Natural
linesCovered :: Maybe Natural
lineCoveragePercentage :: Maybe Double
id :: Maybe Text
filePath :: Maybe Text
expired :: Maybe POSIX
branchesMissed :: Maybe Natural
branchesCovered :: Maybe Natural
branchCoveragePercentage :: Maybe Double
$sel:reportARN:CodeCoverage' :: CodeCoverage -> Maybe Text
$sel:linesMissed:CodeCoverage' :: CodeCoverage -> Maybe Natural
$sel:linesCovered:CodeCoverage' :: CodeCoverage -> Maybe Natural
$sel:lineCoveragePercentage:CodeCoverage' :: CodeCoverage -> Maybe Double
$sel:id:CodeCoverage' :: CodeCoverage -> Maybe Text
$sel:filePath:CodeCoverage' :: CodeCoverage -> Maybe Text
$sel:expired:CodeCoverage' :: CodeCoverage -> Maybe POSIX
$sel:branchesMissed:CodeCoverage' :: CodeCoverage -> Maybe Natural
$sel:branchesCovered:CodeCoverage' :: CodeCoverage -> Maybe Natural
$sel:branchCoveragePercentage:CodeCoverage' :: CodeCoverage -> Maybe Double
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
branchCoveragePercentage
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
branchesCovered
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
branchesMissed
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
expired
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
filePath
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
id
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
lineCoveragePercentage
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
linesCovered
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
linesMissed
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
reportARN
instance Prelude.NFData CodeCoverage where
rnf :: CodeCoverage -> ()
rnf CodeCoverage' {Maybe Double
Maybe Natural
Maybe Text
Maybe POSIX
reportARN :: Maybe Text
linesMissed :: Maybe Natural
linesCovered :: Maybe Natural
lineCoveragePercentage :: Maybe Double
id :: Maybe Text
filePath :: Maybe Text
expired :: Maybe POSIX
branchesMissed :: Maybe Natural
branchesCovered :: Maybe Natural
branchCoveragePercentage :: Maybe Double
$sel:reportARN:CodeCoverage' :: CodeCoverage -> Maybe Text
$sel:linesMissed:CodeCoverage' :: CodeCoverage -> Maybe Natural
$sel:linesCovered:CodeCoverage' :: CodeCoverage -> Maybe Natural
$sel:lineCoveragePercentage:CodeCoverage' :: CodeCoverage -> Maybe Double
$sel:id:CodeCoverage' :: CodeCoverage -> Maybe Text
$sel:filePath:CodeCoverage' :: CodeCoverage -> Maybe Text
$sel:expired:CodeCoverage' :: CodeCoverage -> Maybe POSIX
$sel:branchesMissed:CodeCoverage' :: CodeCoverage -> Maybe Natural
$sel:branchesCovered:CodeCoverage' :: CodeCoverage -> Maybe Natural
$sel:branchCoveragePercentage:CodeCoverage' :: CodeCoverage -> Maybe Double
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Double
branchCoveragePercentage
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
branchesCovered
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
branchesMissed
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
filePath
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 Double
lineCoveragePercentage
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
linesCovered
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
linesMissed
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
reportARN