{-# 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.CodeGuruReviewer.Types.MetricsSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data MetricsSummary = MetricsSummary'
{
MetricsSummary -> Maybe Integer
findingsCount :: Prelude.Maybe Prelude.Integer,
MetricsSummary -> Maybe Integer
meteredLinesOfCodeCount :: Prelude.Maybe Prelude.Integer
}
deriving (MetricsSummary -> MetricsSummary -> Bool
(MetricsSummary -> MetricsSummary -> Bool)
-> (MetricsSummary -> MetricsSummary -> Bool) -> Eq MetricsSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MetricsSummary -> MetricsSummary -> Bool
$c/= :: MetricsSummary -> MetricsSummary -> Bool
== :: MetricsSummary -> MetricsSummary -> Bool
$c== :: MetricsSummary -> MetricsSummary -> Bool
Prelude.Eq, ReadPrec [MetricsSummary]
ReadPrec MetricsSummary
Int -> ReadS MetricsSummary
ReadS [MetricsSummary]
(Int -> ReadS MetricsSummary)
-> ReadS [MetricsSummary]
-> ReadPrec MetricsSummary
-> ReadPrec [MetricsSummary]
-> Read MetricsSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MetricsSummary]
$creadListPrec :: ReadPrec [MetricsSummary]
readPrec :: ReadPrec MetricsSummary
$creadPrec :: ReadPrec MetricsSummary
readList :: ReadS [MetricsSummary]
$creadList :: ReadS [MetricsSummary]
readsPrec :: Int -> ReadS MetricsSummary
$creadsPrec :: Int -> ReadS MetricsSummary
Prelude.Read, Int -> MetricsSummary -> ShowS
[MetricsSummary] -> ShowS
MetricsSummary -> String
(Int -> MetricsSummary -> ShowS)
-> (MetricsSummary -> String)
-> ([MetricsSummary] -> ShowS)
-> Show MetricsSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MetricsSummary] -> ShowS
$cshowList :: [MetricsSummary] -> ShowS
show :: MetricsSummary -> String
$cshow :: MetricsSummary -> String
showsPrec :: Int -> MetricsSummary -> ShowS
$cshowsPrec :: Int -> MetricsSummary -> ShowS
Prelude.Show, (forall x. MetricsSummary -> Rep MetricsSummary x)
-> (forall x. Rep MetricsSummary x -> MetricsSummary)
-> Generic MetricsSummary
forall x. Rep MetricsSummary x -> MetricsSummary
forall x. MetricsSummary -> Rep MetricsSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MetricsSummary x -> MetricsSummary
$cfrom :: forall x. MetricsSummary -> Rep MetricsSummary x
Prelude.Generic)
newMetricsSummary ::
MetricsSummary
newMetricsSummary :: MetricsSummary
newMetricsSummary =
MetricsSummary' :: Maybe Integer -> Maybe Integer -> MetricsSummary
MetricsSummary'
{ $sel:findingsCount:MetricsSummary' :: Maybe Integer
findingsCount = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:meteredLinesOfCodeCount:MetricsSummary' :: Maybe Integer
meteredLinesOfCodeCount = Maybe Integer
forall a. Maybe a
Prelude.Nothing
}
metricsSummary_findingsCount :: Lens.Lens' MetricsSummary (Prelude.Maybe Prelude.Integer)
metricsSummary_findingsCount :: (Maybe Integer -> f (Maybe Integer))
-> MetricsSummary -> f MetricsSummary
metricsSummary_findingsCount = (MetricsSummary -> Maybe Integer)
-> (MetricsSummary -> Maybe Integer -> MetricsSummary)
-> Lens
MetricsSummary MetricsSummary (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MetricsSummary' {Maybe Integer
findingsCount :: Maybe Integer
$sel:findingsCount:MetricsSummary' :: MetricsSummary -> Maybe Integer
findingsCount} -> Maybe Integer
findingsCount) (\s :: MetricsSummary
s@MetricsSummary' {} Maybe Integer
a -> MetricsSummary
s {$sel:findingsCount:MetricsSummary' :: Maybe Integer
findingsCount = Maybe Integer
a} :: MetricsSummary)
metricsSummary_meteredLinesOfCodeCount :: Lens.Lens' MetricsSummary (Prelude.Maybe Prelude.Integer)
metricsSummary_meteredLinesOfCodeCount :: (Maybe Integer -> f (Maybe Integer))
-> MetricsSummary -> f MetricsSummary
metricsSummary_meteredLinesOfCodeCount = (MetricsSummary -> Maybe Integer)
-> (MetricsSummary -> Maybe Integer -> MetricsSummary)
-> Lens
MetricsSummary MetricsSummary (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MetricsSummary' {Maybe Integer
meteredLinesOfCodeCount :: Maybe Integer
$sel:meteredLinesOfCodeCount:MetricsSummary' :: MetricsSummary -> Maybe Integer
meteredLinesOfCodeCount} -> Maybe Integer
meteredLinesOfCodeCount) (\s :: MetricsSummary
s@MetricsSummary' {} Maybe Integer
a -> MetricsSummary
s {$sel:meteredLinesOfCodeCount:MetricsSummary' :: Maybe Integer
meteredLinesOfCodeCount = Maybe Integer
a} :: MetricsSummary)
instance Core.FromJSON MetricsSummary where
parseJSON :: Value -> Parser MetricsSummary
parseJSON =
String
-> (Object -> Parser MetricsSummary)
-> Value
-> Parser MetricsSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"MetricsSummary"
( \Object
x ->
Maybe Integer -> Maybe Integer -> MetricsSummary
MetricsSummary'
(Maybe Integer -> Maybe Integer -> MetricsSummary)
-> Parser (Maybe Integer)
-> Parser (Maybe Integer -> MetricsSummary)
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
"FindingsCount")
Parser (Maybe Integer -> MetricsSummary)
-> Parser (Maybe Integer) -> Parser MetricsSummary
forall (f :: * -> *) a b. Applicative f => 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
"MeteredLinesOfCodeCount")
)
instance Prelude.Hashable MetricsSummary
instance Prelude.NFData MetricsSummary