{-# 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.Greengrass.Types.BulkDeploymentMetrics 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 BulkDeploymentMetrics = BulkDeploymentMetrics'
{
BulkDeploymentMetrics -> Maybe Int
invalidInputRecords :: Prelude.Maybe Prelude.Int,
BulkDeploymentMetrics -> Maybe Int
recordsProcessed :: Prelude.Maybe Prelude.Int,
BulkDeploymentMetrics -> Maybe Int
retryAttempts :: Prelude.Maybe Prelude.Int
}
deriving (BulkDeploymentMetrics -> BulkDeploymentMetrics -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BulkDeploymentMetrics -> BulkDeploymentMetrics -> Bool
$c/= :: BulkDeploymentMetrics -> BulkDeploymentMetrics -> Bool
== :: BulkDeploymentMetrics -> BulkDeploymentMetrics -> Bool
$c== :: BulkDeploymentMetrics -> BulkDeploymentMetrics -> Bool
Prelude.Eq, ReadPrec [BulkDeploymentMetrics]
ReadPrec BulkDeploymentMetrics
Int -> ReadS BulkDeploymentMetrics
ReadS [BulkDeploymentMetrics]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BulkDeploymentMetrics]
$creadListPrec :: ReadPrec [BulkDeploymentMetrics]
readPrec :: ReadPrec BulkDeploymentMetrics
$creadPrec :: ReadPrec BulkDeploymentMetrics
readList :: ReadS [BulkDeploymentMetrics]
$creadList :: ReadS [BulkDeploymentMetrics]
readsPrec :: Int -> ReadS BulkDeploymentMetrics
$creadsPrec :: Int -> ReadS BulkDeploymentMetrics
Prelude.Read, Int -> BulkDeploymentMetrics -> ShowS
[BulkDeploymentMetrics] -> ShowS
BulkDeploymentMetrics -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BulkDeploymentMetrics] -> ShowS
$cshowList :: [BulkDeploymentMetrics] -> ShowS
show :: BulkDeploymentMetrics -> String
$cshow :: BulkDeploymentMetrics -> String
showsPrec :: Int -> BulkDeploymentMetrics -> ShowS
$cshowsPrec :: Int -> BulkDeploymentMetrics -> ShowS
Prelude.Show, forall x. Rep BulkDeploymentMetrics x -> BulkDeploymentMetrics
forall x. BulkDeploymentMetrics -> Rep BulkDeploymentMetrics x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BulkDeploymentMetrics x -> BulkDeploymentMetrics
$cfrom :: forall x. BulkDeploymentMetrics -> Rep BulkDeploymentMetrics x
Prelude.Generic)
newBulkDeploymentMetrics ::
BulkDeploymentMetrics
newBulkDeploymentMetrics :: BulkDeploymentMetrics
newBulkDeploymentMetrics =
BulkDeploymentMetrics'
{ $sel:invalidInputRecords:BulkDeploymentMetrics' :: Maybe Int
invalidInputRecords =
forall a. Maybe a
Prelude.Nothing,
$sel:recordsProcessed:BulkDeploymentMetrics' :: Maybe Int
recordsProcessed = forall a. Maybe a
Prelude.Nothing,
$sel:retryAttempts:BulkDeploymentMetrics' :: Maybe Int
retryAttempts = forall a. Maybe a
Prelude.Nothing
}
bulkDeploymentMetrics_invalidInputRecords :: Lens.Lens' BulkDeploymentMetrics (Prelude.Maybe Prelude.Int)
bulkDeploymentMetrics_invalidInputRecords :: Lens' BulkDeploymentMetrics (Maybe Int)
bulkDeploymentMetrics_invalidInputRecords = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BulkDeploymentMetrics' {Maybe Int
invalidInputRecords :: Maybe Int
$sel:invalidInputRecords:BulkDeploymentMetrics' :: BulkDeploymentMetrics -> Maybe Int
invalidInputRecords} -> Maybe Int
invalidInputRecords) (\s :: BulkDeploymentMetrics
s@BulkDeploymentMetrics' {} Maybe Int
a -> BulkDeploymentMetrics
s {$sel:invalidInputRecords:BulkDeploymentMetrics' :: Maybe Int
invalidInputRecords = Maybe Int
a} :: BulkDeploymentMetrics)
bulkDeploymentMetrics_recordsProcessed :: Lens.Lens' BulkDeploymentMetrics (Prelude.Maybe Prelude.Int)
bulkDeploymentMetrics_recordsProcessed :: Lens' BulkDeploymentMetrics (Maybe Int)
bulkDeploymentMetrics_recordsProcessed = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BulkDeploymentMetrics' {Maybe Int
recordsProcessed :: Maybe Int
$sel:recordsProcessed:BulkDeploymentMetrics' :: BulkDeploymentMetrics -> Maybe Int
recordsProcessed} -> Maybe Int
recordsProcessed) (\s :: BulkDeploymentMetrics
s@BulkDeploymentMetrics' {} Maybe Int
a -> BulkDeploymentMetrics
s {$sel:recordsProcessed:BulkDeploymentMetrics' :: Maybe Int
recordsProcessed = Maybe Int
a} :: BulkDeploymentMetrics)
bulkDeploymentMetrics_retryAttempts :: Lens.Lens' BulkDeploymentMetrics (Prelude.Maybe Prelude.Int)
bulkDeploymentMetrics_retryAttempts :: Lens' BulkDeploymentMetrics (Maybe Int)
bulkDeploymentMetrics_retryAttempts = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BulkDeploymentMetrics' {Maybe Int
retryAttempts :: Maybe Int
$sel:retryAttempts:BulkDeploymentMetrics' :: BulkDeploymentMetrics -> Maybe Int
retryAttempts} -> Maybe Int
retryAttempts) (\s :: BulkDeploymentMetrics
s@BulkDeploymentMetrics' {} Maybe Int
a -> BulkDeploymentMetrics
s {$sel:retryAttempts:BulkDeploymentMetrics' :: Maybe Int
retryAttempts = Maybe Int
a} :: BulkDeploymentMetrics)
instance Data.FromJSON BulkDeploymentMetrics where
parseJSON :: Value -> Parser BulkDeploymentMetrics
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"BulkDeploymentMetrics"
( \Object
x ->
Maybe Int -> Maybe Int -> Maybe Int -> BulkDeploymentMetrics
BulkDeploymentMetrics'
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
"InvalidInputRecords")
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
"RecordsProcessed")
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
"RetryAttempts")
)
instance Prelude.Hashable BulkDeploymentMetrics where
hashWithSalt :: Int -> BulkDeploymentMetrics -> Int
hashWithSalt Int
_salt BulkDeploymentMetrics' {Maybe Int
retryAttempts :: Maybe Int
recordsProcessed :: Maybe Int
invalidInputRecords :: Maybe Int
$sel:retryAttempts:BulkDeploymentMetrics' :: BulkDeploymentMetrics -> Maybe Int
$sel:recordsProcessed:BulkDeploymentMetrics' :: BulkDeploymentMetrics -> Maybe Int
$sel:invalidInputRecords:BulkDeploymentMetrics' :: BulkDeploymentMetrics -> Maybe Int
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
invalidInputRecords
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
recordsProcessed
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
retryAttempts
instance Prelude.NFData BulkDeploymentMetrics where
rnf :: BulkDeploymentMetrics -> ()
rnf BulkDeploymentMetrics' {Maybe Int
retryAttempts :: Maybe Int
recordsProcessed :: Maybe Int
invalidInputRecords :: Maybe Int
$sel:retryAttempts:BulkDeploymentMetrics' :: BulkDeploymentMetrics -> Maybe Int
$sel:recordsProcessed:BulkDeploymentMetrics' :: BulkDeploymentMetrics -> Maybe Int
$sel:invalidInputRecords:BulkDeploymentMetrics' :: BulkDeploymentMetrics -> Maybe Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
invalidInputRecords
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
recordsProcessed
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
retryAttempts