{-# 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.CodeCoverageReportSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data CodeCoverageReportSummary = CodeCoverageReportSummary'
{
CodeCoverageReportSummary -> Maybe Natural
branchesMissed :: Prelude.Maybe Prelude.Natural,
CodeCoverageReportSummary -> Maybe Natural
linesMissed :: Prelude.Maybe Prelude.Natural,
CodeCoverageReportSummary -> Maybe Natural
branchesCovered :: Prelude.Maybe Prelude.Natural,
CodeCoverageReportSummary -> Maybe Natural
linesCovered :: Prelude.Maybe Prelude.Natural,
CodeCoverageReportSummary -> Maybe Double
branchCoveragePercentage :: Prelude.Maybe Prelude.Double,
CodeCoverageReportSummary -> Maybe Double
lineCoveragePercentage :: Prelude.Maybe Prelude.Double
}
deriving (CodeCoverageReportSummary -> CodeCoverageReportSummary -> Bool
(CodeCoverageReportSummary -> CodeCoverageReportSummary -> Bool)
-> (CodeCoverageReportSummary -> CodeCoverageReportSummary -> Bool)
-> Eq CodeCoverageReportSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CodeCoverageReportSummary -> CodeCoverageReportSummary -> Bool
$c/= :: CodeCoverageReportSummary -> CodeCoverageReportSummary -> Bool
== :: CodeCoverageReportSummary -> CodeCoverageReportSummary -> Bool
$c== :: CodeCoverageReportSummary -> CodeCoverageReportSummary -> Bool
Prelude.Eq, ReadPrec [CodeCoverageReportSummary]
ReadPrec CodeCoverageReportSummary
Int -> ReadS CodeCoverageReportSummary
ReadS [CodeCoverageReportSummary]
(Int -> ReadS CodeCoverageReportSummary)
-> ReadS [CodeCoverageReportSummary]
-> ReadPrec CodeCoverageReportSummary
-> ReadPrec [CodeCoverageReportSummary]
-> Read CodeCoverageReportSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CodeCoverageReportSummary]
$creadListPrec :: ReadPrec [CodeCoverageReportSummary]
readPrec :: ReadPrec CodeCoverageReportSummary
$creadPrec :: ReadPrec CodeCoverageReportSummary
readList :: ReadS [CodeCoverageReportSummary]
$creadList :: ReadS [CodeCoverageReportSummary]
readsPrec :: Int -> ReadS CodeCoverageReportSummary
$creadsPrec :: Int -> ReadS CodeCoverageReportSummary
Prelude.Read, Int -> CodeCoverageReportSummary -> ShowS
[CodeCoverageReportSummary] -> ShowS
CodeCoverageReportSummary -> String
(Int -> CodeCoverageReportSummary -> ShowS)
-> (CodeCoverageReportSummary -> String)
-> ([CodeCoverageReportSummary] -> ShowS)
-> Show CodeCoverageReportSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CodeCoverageReportSummary] -> ShowS
$cshowList :: [CodeCoverageReportSummary] -> ShowS
show :: CodeCoverageReportSummary -> String
$cshow :: CodeCoverageReportSummary -> String
showsPrec :: Int -> CodeCoverageReportSummary -> ShowS
$cshowsPrec :: Int -> CodeCoverageReportSummary -> ShowS
Prelude.Show, (forall x.
CodeCoverageReportSummary -> Rep CodeCoverageReportSummary x)
-> (forall x.
Rep CodeCoverageReportSummary x -> CodeCoverageReportSummary)
-> Generic CodeCoverageReportSummary
forall x.
Rep CodeCoverageReportSummary x -> CodeCoverageReportSummary
forall x.
CodeCoverageReportSummary -> Rep CodeCoverageReportSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CodeCoverageReportSummary x -> CodeCoverageReportSummary
$cfrom :: forall x.
CodeCoverageReportSummary -> Rep CodeCoverageReportSummary x
Prelude.Generic)
newCodeCoverageReportSummary ::
CodeCoverageReportSummary
newCodeCoverageReportSummary :: CodeCoverageReportSummary
newCodeCoverageReportSummary =
CodeCoverageReportSummary' :: Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Double
-> Maybe Double
-> CodeCoverageReportSummary
CodeCoverageReportSummary'
{ $sel:branchesMissed:CodeCoverageReportSummary' :: Maybe Natural
branchesMissed =
Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:linesMissed:CodeCoverageReportSummary' :: Maybe Natural
linesMissed = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:branchesCovered:CodeCoverageReportSummary' :: Maybe Natural
branchesCovered = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:linesCovered:CodeCoverageReportSummary' :: Maybe Natural
linesCovered = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:branchCoveragePercentage:CodeCoverageReportSummary' :: Maybe Double
branchCoveragePercentage = Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:lineCoveragePercentage:CodeCoverageReportSummary' :: Maybe Double
lineCoveragePercentage = Maybe Double
forall a. Maybe a
Prelude.Nothing
}
codeCoverageReportSummary_branchesMissed :: Lens.Lens' CodeCoverageReportSummary (Prelude.Maybe Prelude.Natural)
codeCoverageReportSummary_branchesMissed :: (Maybe Natural -> f (Maybe Natural))
-> CodeCoverageReportSummary -> f CodeCoverageReportSummary
codeCoverageReportSummary_branchesMissed = (CodeCoverageReportSummary -> Maybe Natural)
-> (CodeCoverageReportSummary
-> Maybe Natural -> CodeCoverageReportSummary)
-> Lens
CodeCoverageReportSummary
CodeCoverageReportSummary
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeCoverageReportSummary' {Maybe Natural
branchesMissed :: Maybe Natural
$sel:branchesMissed:CodeCoverageReportSummary' :: CodeCoverageReportSummary -> Maybe Natural
branchesMissed} -> Maybe Natural
branchesMissed) (\s :: CodeCoverageReportSummary
s@CodeCoverageReportSummary' {} Maybe Natural
a -> CodeCoverageReportSummary
s {$sel:branchesMissed:CodeCoverageReportSummary' :: Maybe Natural
branchesMissed = Maybe Natural
a} :: CodeCoverageReportSummary)
codeCoverageReportSummary_linesMissed :: Lens.Lens' CodeCoverageReportSummary (Prelude.Maybe Prelude.Natural)
codeCoverageReportSummary_linesMissed :: (Maybe Natural -> f (Maybe Natural))
-> CodeCoverageReportSummary -> f CodeCoverageReportSummary
codeCoverageReportSummary_linesMissed = (CodeCoverageReportSummary -> Maybe Natural)
-> (CodeCoverageReportSummary
-> Maybe Natural -> CodeCoverageReportSummary)
-> Lens
CodeCoverageReportSummary
CodeCoverageReportSummary
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeCoverageReportSummary' {Maybe Natural
linesMissed :: Maybe Natural
$sel:linesMissed:CodeCoverageReportSummary' :: CodeCoverageReportSummary -> Maybe Natural
linesMissed} -> Maybe Natural
linesMissed) (\s :: CodeCoverageReportSummary
s@CodeCoverageReportSummary' {} Maybe Natural
a -> CodeCoverageReportSummary
s {$sel:linesMissed:CodeCoverageReportSummary' :: Maybe Natural
linesMissed = Maybe Natural
a} :: CodeCoverageReportSummary)
codeCoverageReportSummary_branchesCovered :: Lens.Lens' CodeCoverageReportSummary (Prelude.Maybe Prelude.Natural)
codeCoverageReportSummary_branchesCovered :: (Maybe Natural -> f (Maybe Natural))
-> CodeCoverageReportSummary -> f CodeCoverageReportSummary
codeCoverageReportSummary_branchesCovered = (CodeCoverageReportSummary -> Maybe Natural)
-> (CodeCoverageReportSummary
-> Maybe Natural -> CodeCoverageReportSummary)
-> Lens
CodeCoverageReportSummary
CodeCoverageReportSummary
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeCoverageReportSummary' {Maybe Natural
branchesCovered :: Maybe Natural
$sel:branchesCovered:CodeCoverageReportSummary' :: CodeCoverageReportSummary -> Maybe Natural
branchesCovered} -> Maybe Natural
branchesCovered) (\s :: CodeCoverageReportSummary
s@CodeCoverageReportSummary' {} Maybe Natural
a -> CodeCoverageReportSummary
s {$sel:branchesCovered:CodeCoverageReportSummary' :: Maybe Natural
branchesCovered = Maybe Natural
a} :: CodeCoverageReportSummary)
codeCoverageReportSummary_linesCovered :: Lens.Lens' CodeCoverageReportSummary (Prelude.Maybe Prelude.Natural)
codeCoverageReportSummary_linesCovered :: (Maybe Natural -> f (Maybe Natural))
-> CodeCoverageReportSummary -> f CodeCoverageReportSummary
codeCoverageReportSummary_linesCovered = (CodeCoverageReportSummary -> Maybe Natural)
-> (CodeCoverageReportSummary
-> Maybe Natural -> CodeCoverageReportSummary)
-> Lens
CodeCoverageReportSummary
CodeCoverageReportSummary
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeCoverageReportSummary' {Maybe Natural
linesCovered :: Maybe Natural
$sel:linesCovered:CodeCoverageReportSummary' :: CodeCoverageReportSummary -> Maybe Natural
linesCovered} -> Maybe Natural
linesCovered) (\s :: CodeCoverageReportSummary
s@CodeCoverageReportSummary' {} Maybe Natural
a -> CodeCoverageReportSummary
s {$sel:linesCovered:CodeCoverageReportSummary' :: Maybe Natural
linesCovered = Maybe Natural
a} :: CodeCoverageReportSummary)
codeCoverageReportSummary_branchCoveragePercentage :: Lens.Lens' CodeCoverageReportSummary (Prelude.Maybe Prelude.Double)
codeCoverageReportSummary_branchCoveragePercentage :: (Maybe Double -> f (Maybe Double))
-> CodeCoverageReportSummary -> f CodeCoverageReportSummary
codeCoverageReportSummary_branchCoveragePercentage = (CodeCoverageReportSummary -> Maybe Double)
-> (CodeCoverageReportSummary
-> Maybe Double -> CodeCoverageReportSummary)
-> Lens
CodeCoverageReportSummary
CodeCoverageReportSummary
(Maybe Double)
(Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeCoverageReportSummary' {Maybe Double
branchCoveragePercentage :: Maybe Double
$sel:branchCoveragePercentage:CodeCoverageReportSummary' :: CodeCoverageReportSummary -> Maybe Double
branchCoveragePercentage} -> Maybe Double
branchCoveragePercentage) (\s :: CodeCoverageReportSummary
s@CodeCoverageReportSummary' {} Maybe Double
a -> CodeCoverageReportSummary
s {$sel:branchCoveragePercentage:CodeCoverageReportSummary' :: Maybe Double
branchCoveragePercentage = Maybe Double
a} :: CodeCoverageReportSummary)
codeCoverageReportSummary_lineCoveragePercentage :: Lens.Lens' CodeCoverageReportSummary (Prelude.Maybe Prelude.Double)
codeCoverageReportSummary_lineCoveragePercentage :: (Maybe Double -> f (Maybe Double))
-> CodeCoverageReportSummary -> f CodeCoverageReportSummary
codeCoverageReportSummary_lineCoveragePercentage = (CodeCoverageReportSummary -> Maybe Double)
-> (CodeCoverageReportSummary
-> Maybe Double -> CodeCoverageReportSummary)
-> Lens
CodeCoverageReportSummary
CodeCoverageReportSummary
(Maybe Double)
(Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeCoverageReportSummary' {Maybe Double
lineCoveragePercentage :: Maybe Double
$sel:lineCoveragePercentage:CodeCoverageReportSummary' :: CodeCoverageReportSummary -> Maybe Double
lineCoveragePercentage} -> Maybe Double
lineCoveragePercentage) (\s :: CodeCoverageReportSummary
s@CodeCoverageReportSummary' {} Maybe Double
a -> CodeCoverageReportSummary
s {$sel:lineCoveragePercentage:CodeCoverageReportSummary' :: Maybe Double
lineCoveragePercentage = Maybe Double
a} :: CodeCoverageReportSummary)
instance Core.FromJSON CodeCoverageReportSummary where
parseJSON :: Value -> Parser CodeCoverageReportSummary
parseJSON =
String
-> (Object -> Parser CodeCoverageReportSummary)
-> Value
-> Parser CodeCoverageReportSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"CodeCoverageReportSummary"
( \Object
x ->
Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Double
-> Maybe Double
-> CodeCoverageReportSummary
CodeCoverageReportSummary'
(Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Double
-> Maybe Double
-> CodeCoverageReportSummary)
-> Parser (Maybe Natural)
-> Parser
(Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Double
-> Maybe Double
-> CodeCoverageReportSummary)
forall (f :: * -> *) a b. Functor 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 Natural
-> Maybe Natural
-> Maybe Double
-> Maybe Double
-> CodeCoverageReportSummary)
-> Parser (Maybe Natural)
-> Parser
(Maybe Natural
-> Maybe Natural
-> Maybe Double
-> Maybe Double
-> CodeCoverageReportSummary)
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 Natural
-> Maybe Natural
-> Maybe Double
-> Maybe Double
-> CodeCoverageReportSummary)
-> Parser (Maybe Natural)
-> Parser
(Maybe Natural
-> Maybe Double -> Maybe Double -> CodeCoverageReportSummary)
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 Double -> CodeCoverageReportSummary)
-> Parser (Maybe Natural)
-> Parser
(Maybe Double -> Maybe Double -> CodeCoverageReportSummary)
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 Double -> CodeCoverageReportSummary)
-> Parser (Maybe Double)
-> Parser (Maybe Double -> CodeCoverageReportSummary)
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 Double -> CodeCoverageReportSummary)
-> Parser (Maybe Double) -> Parser CodeCoverageReportSummary
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")
)
instance Prelude.Hashable CodeCoverageReportSummary
instance Prelude.NFData CodeCoverageReportSummary