{-# 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.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data CodeCoverage = CodeCoverage'
{
CodeCoverage -> Maybe POSIX
expired :: Prelude.Maybe Core.POSIX,
CodeCoverage -> Maybe Natural
branchesMissed :: Prelude.Maybe Prelude.Natural,
CodeCoverage -> Maybe Natural
linesMissed :: Prelude.Maybe Prelude.Natural,
CodeCoverage -> Maybe Text
filePath :: Prelude.Maybe Prelude.Text,
CodeCoverage -> Maybe Natural
branchesCovered :: Prelude.Maybe Prelude.Natural,
CodeCoverage -> Maybe Natural
linesCovered :: Prelude.Maybe Prelude.Natural,
CodeCoverage -> Maybe Double
branchCoveragePercentage :: Prelude.Maybe Prelude.Double,
CodeCoverage -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
CodeCoverage -> Maybe Double
lineCoveragePercentage :: Prelude.Maybe Prelude.Double,
CodeCoverage -> Maybe Text
reportARN :: Prelude.Maybe Prelude.Text
}
deriving (CodeCoverage -> CodeCoverage -> Bool
(CodeCoverage -> CodeCoverage -> Bool)
-> (CodeCoverage -> CodeCoverage -> Bool) -> Eq CodeCoverage
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]
(Int -> ReadS CodeCoverage)
-> ReadS [CodeCoverage]
-> ReadPrec CodeCoverage
-> ReadPrec [CodeCoverage]
-> Read 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
(Int -> CodeCoverage -> ShowS)
-> (CodeCoverage -> String)
-> ([CodeCoverage] -> ShowS)
-> Show CodeCoverage
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. CodeCoverage -> Rep CodeCoverage x)
-> (forall x. Rep CodeCoverage x -> CodeCoverage)
-> Generic CodeCoverage
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' :: Maybe POSIX
-> Maybe Natural
-> Maybe Natural
-> Maybe Text
-> Maybe Natural
-> Maybe Natural
-> Maybe Double
-> Maybe Text
-> Maybe Double
-> Maybe Text
-> CodeCoverage
CodeCoverage'
{ $sel:expired:CodeCoverage' :: Maybe POSIX
expired = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:branchesMissed:CodeCoverage' :: Maybe Natural
branchesMissed = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:linesMissed:CodeCoverage' :: Maybe Natural
linesMissed = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:filePath:CodeCoverage' :: Maybe Text
filePath = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:branchesCovered:CodeCoverage' :: Maybe Natural
branchesCovered = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:linesCovered:CodeCoverage' :: Maybe Natural
linesCovered = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:branchCoveragePercentage:CodeCoverage' :: Maybe Double
branchCoveragePercentage = Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:id:CodeCoverage' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lineCoveragePercentage:CodeCoverage' :: Maybe Double
lineCoveragePercentage = Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:reportARN:CodeCoverage' :: Maybe Text
reportARN = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
codeCoverage_expired :: Lens.Lens' CodeCoverage (Prelude.Maybe Prelude.UTCTime)
codeCoverage_expired :: (Maybe UTCTime -> f (Maybe UTCTime))
-> CodeCoverage -> f CodeCoverage
codeCoverage_expired = (CodeCoverage -> Maybe POSIX)
-> (CodeCoverage -> Maybe POSIX -> CodeCoverage)
-> Lens CodeCoverage CodeCoverage (Maybe POSIX) (Maybe POSIX)
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) ((Maybe POSIX -> f (Maybe POSIX))
-> CodeCoverage -> f CodeCoverage)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CodeCoverage
-> f CodeCoverage
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
codeCoverage_branchesMissed :: Lens.Lens' CodeCoverage (Prelude.Maybe Prelude.Natural)
codeCoverage_branchesMissed :: (Maybe Natural -> f (Maybe Natural))
-> CodeCoverage -> f CodeCoverage
codeCoverage_branchesMissed = (CodeCoverage -> Maybe Natural)
-> (CodeCoverage -> Maybe Natural -> CodeCoverage)
-> Lens CodeCoverage CodeCoverage (Maybe Natural) (Maybe Natural)
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_linesMissed :: Lens.Lens' CodeCoverage (Prelude.Maybe Prelude.Natural)
codeCoverage_linesMissed :: (Maybe Natural -> f (Maybe Natural))
-> CodeCoverage -> f CodeCoverage
codeCoverage_linesMissed = (CodeCoverage -> Maybe Natural)
-> (CodeCoverage -> Maybe Natural -> CodeCoverage)
-> Lens CodeCoverage CodeCoverage (Maybe Natural) (Maybe Natural)
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_filePath :: Lens.Lens' CodeCoverage (Prelude.Maybe Prelude.Text)
codeCoverage_filePath :: (Maybe Text -> f (Maybe Text)) -> CodeCoverage -> f CodeCoverage
codeCoverage_filePath = (CodeCoverage -> Maybe Text)
-> (CodeCoverage -> Maybe Text -> CodeCoverage)
-> Lens CodeCoverage CodeCoverage (Maybe Text) (Maybe Text)
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_branchesCovered :: Lens.Lens' CodeCoverage (Prelude.Maybe Prelude.Natural)
codeCoverage_branchesCovered :: (Maybe Natural -> f (Maybe Natural))
-> CodeCoverage -> f CodeCoverage
codeCoverage_branchesCovered = (CodeCoverage -> Maybe Natural)
-> (CodeCoverage -> Maybe Natural -> CodeCoverage)
-> Lens CodeCoverage CodeCoverage (Maybe Natural) (Maybe Natural)
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_linesCovered :: Lens.Lens' CodeCoverage (Prelude.Maybe Prelude.Natural)
codeCoverage_linesCovered :: (Maybe Natural -> f (Maybe Natural))
-> CodeCoverage -> f CodeCoverage
codeCoverage_linesCovered = (CodeCoverage -> Maybe Natural)
-> (CodeCoverage -> Maybe Natural -> CodeCoverage)
-> Lens CodeCoverage CodeCoverage (Maybe Natural) (Maybe Natural)
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_branchCoveragePercentage :: Lens.Lens' CodeCoverage (Prelude.Maybe Prelude.Double)
codeCoverage_branchCoveragePercentage :: (Maybe Double -> f (Maybe Double))
-> CodeCoverage -> f CodeCoverage
codeCoverage_branchCoveragePercentage = (CodeCoverage -> Maybe Double)
-> (CodeCoverage -> Maybe Double -> CodeCoverage)
-> Lens CodeCoverage CodeCoverage (Maybe Double) (Maybe Double)
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_id :: Lens.Lens' CodeCoverage (Prelude.Maybe Prelude.Text)
codeCoverage_id :: (Maybe Text -> f (Maybe Text)) -> CodeCoverage -> f CodeCoverage
codeCoverage_id = (CodeCoverage -> Maybe Text)
-> (CodeCoverage -> Maybe Text -> CodeCoverage)
-> Lens CodeCoverage CodeCoverage (Maybe Text) (Maybe Text)
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 :: (Maybe Double -> f (Maybe Double))
-> CodeCoverage -> f CodeCoverage
codeCoverage_lineCoveragePercentage = (CodeCoverage -> Maybe Double)
-> (CodeCoverage -> Maybe Double -> CodeCoverage)
-> Lens CodeCoverage CodeCoverage (Maybe Double) (Maybe Double)
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_reportARN :: Lens.Lens' CodeCoverage (Prelude.Maybe Prelude.Text)
codeCoverage_reportARN :: (Maybe Text -> f (Maybe Text)) -> CodeCoverage -> f CodeCoverage
codeCoverage_reportARN = (CodeCoverage -> Maybe Text)
-> (CodeCoverage -> Maybe Text -> CodeCoverage)
-> Lens CodeCoverage CodeCoverage (Maybe Text) (Maybe Text)
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 Core.FromJSON CodeCoverage where
parseJSON :: Value -> Parser CodeCoverage
parseJSON =
String
-> (Object -> Parser CodeCoverage) -> Value -> Parser CodeCoverage
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"CodeCoverage"
( \Object
x ->
Maybe POSIX
-> Maybe Natural
-> Maybe Natural
-> Maybe Text
-> Maybe Natural
-> Maybe Natural
-> Maybe Double
-> Maybe Text
-> Maybe Double
-> Maybe Text
-> CodeCoverage
CodeCoverage'
(Maybe POSIX
-> Maybe Natural
-> Maybe Natural
-> Maybe Text
-> Maybe Natural
-> Maybe Natural
-> Maybe Double
-> Maybe Text
-> Maybe Double
-> Maybe Text
-> CodeCoverage)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Natural
-> Maybe Natural
-> Maybe Text
-> Maybe Natural
-> Maybe Natural
-> Maybe Double
-> Maybe Text
-> Maybe Double
-> Maybe Text
-> CodeCoverage)
forall (f :: * -> *) a b. Functor 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 Natural
-> Maybe Natural
-> Maybe Text
-> Maybe Natural
-> Maybe Natural
-> Maybe Double
-> Maybe Text
-> Maybe Double
-> Maybe Text
-> CodeCoverage)
-> Parser (Maybe Natural)
-> Parser
(Maybe Natural
-> Maybe Text
-> Maybe Natural
-> Maybe Natural
-> Maybe Double
-> Maybe Text
-> Maybe Double
-> Maybe Text
-> CodeCoverage)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"branchesMissed")
Parser
(Maybe Natural
-> Maybe Text
-> Maybe Natural
-> Maybe Natural
-> Maybe Double
-> Maybe Text
-> Maybe Double
-> Maybe Text
-> CodeCoverage)
-> Parser (Maybe Natural)
-> Parser
(Maybe Text
-> Maybe Natural
-> Maybe Natural
-> Maybe Double
-> Maybe Text
-> Maybe Double
-> Maybe Text
-> CodeCoverage)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"linesMissed")
Parser
(Maybe Text
-> Maybe Natural
-> Maybe Natural
-> Maybe Double
-> Maybe Text
-> Maybe Double
-> Maybe Text
-> CodeCoverage)
-> Parser (Maybe Text)
-> Parser
(Maybe Natural
-> Maybe Natural
-> Maybe Double
-> Maybe Text
-> Maybe Double
-> Maybe Text
-> CodeCoverage)
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
"filePath")
Parser
(Maybe Natural
-> Maybe Natural
-> Maybe Double
-> Maybe Text
-> Maybe Double
-> Maybe Text
-> CodeCoverage)
-> Parser (Maybe Natural)
-> Parser
(Maybe Natural
-> Maybe Double
-> Maybe Text
-> Maybe Double
-> Maybe Text
-> CodeCoverage)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"branchesCovered")
Parser
(Maybe Natural
-> Maybe Double
-> Maybe Text
-> Maybe Double
-> Maybe Text
-> CodeCoverage)
-> Parser (Maybe Natural)
-> Parser
(Maybe Double
-> Maybe Text -> Maybe Double -> Maybe Text -> CodeCoverage)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"linesCovered")
Parser
(Maybe Double
-> Maybe Text -> Maybe Double -> Maybe Text -> CodeCoverage)
-> Parser (Maybe Double)
-> Parser
(Maybe Text -> Maybe Double -> Maybe Text -> CodeCoverage)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Double)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"branchCoveragePercentage")
Parser (Maybe Text -> Maybe Double -> Maybe Text -> CodeCoverage)
-> Parser (Maybe Text)
-> Parser (Maybe Double -> Maybe Text -> CodeCoverage)
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
"id")
Parser (Maybe Double -> Maybe Text -> CodeCoverage)
-> Parser (Maybe Double) -> Parser (Maybe Text -> CodeCoverage)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Double)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"lineCoveragePercentage")
Parser (Maybe Text -> CodeCoverage)
-> Parser (Maybe Text) -> Parser CodeCoverage
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 CodeCoverage
instance Prelude.NFData CodeCoverage