{-# 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.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data BulkDeploymentMetrics = BulkDeploymentMetrics'
{
BulkDeploymentMetrics -> Maybe Int
recordsProcessed :: Prelude.Maybe Prelude.Int,
BulkDeploymentMetrics -> Maybe Int
retryAttempts :: Prelude.Maybe Prelude.Int,
BulkDeploymentMetrics -> Maybe Int
invalidInputRecords :: Prelude.Maybe Prelude.Int
}
deriving (BulkDeploymentMetrics -> BulkDeploymentMetrics -> Bool
(BulkDeploymentMetrics -> BulkDeploymentMetrics -> Bool)
-> (BulkDeploymentMetrics -> BulkDeploymentMetrics -> Bool)
-> Eq BulkDeploymentMetrics
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]
(Int -> ReadS BulkDeploymentMetrics)
-> ReadS [BulkDeploymentMetrics]
-> ReadPrec BulkDeploymentMetrics
-> ReadPrec [BulkDeploymentMetrics]
-> Read 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
(Int -> BulkDeploymentMetrics -> ShowS)
-> (BulkDeploymentMetrics -> String)
-> ([BulkDeploymentMetrics] -> ShowS)
-> Show BulkDeploymentMetrics
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. BulkDeploymentMetrics -> Rep BulkDeploymentMetrics x)
-> (forall x. Rep BulkDeploymentMetrics x -> BulkDeploymentMetrics)
-> Generic BulkDeploymentMetrics
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' :: Maybe Int -> Maybe Int -> Maybe Int -> BulkDeploymentMetrics
BulkDeploymentMetrics'
{ $sel:recordsProcessed:BulkDeploymentMetrics' :: Maybe Int
recordsProcessed =
Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:retryAttempts:BulkDeploymentMetrics' :: Maybe Int
retryAttempts = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:invalidInputRecords:BulkDeploymentMetrics' :: Maybe Int
invalidInputRecords = Maybe Int
forall a. Maybe a
Prelude.Nothing
}
bulkDeploymentMetrics_recordsProcessed :: Lens.Lens' BulkDeploymentMetrics (Prelude.Maybe Prelude.Int)
bulkDeploymentMetrics_recordsProcessed :: (Maybe Int -> f (Maybe Int))
-> BulkDeploymentMetrics -> f BulkDeploymentMetrics
bulkDeploymentMetrics_recordsProcessed = (BulkDeploymentMetrics -> Maybe Int)
-> (BulkDeploymentMetrics -> Maybe Int -> BulkDeploymentMetrics)
-> Lens
BulkDeploymentMetrics BulkDeploymentMetrics (Maybe Int) (Maybe Int)
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 :: (Maybe Int -> f (Maybe Int))
-> BulkDeploymentMetrics -> f BulkDeploymentMetrics
bulkDeploymentMetrics_retryAttempts = (BulkDeploymentMetrics -> Maybe Int)
-> (BulkDeploymentMetrics -> Maybe Int -> BulkDeploymentMetrics)
-> Lens
BulkDeploymentMetrics BulkDeploymentMetrics (Maybe Int) (Maybe Int)
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)
bulkDeploymentMetrics_invalidInputRecords :: Lens.Lens' BulkDeploymentMetrics (Prelude.Maybe Prelude.Int)
bulkDeploymentMetrics_invalidInputRecords :: (Maybe Int -> f (Maybe Int))
-> BulkDeploymentMetrics -> f BulkDeploymentMetrics
bulkDeploymentMetrics_invalidInputRecords = (BulkDeploymentMetrics -> Maybe Int)
-> (BulkDeploymentMetrics -> Maybe Int -> BulkDeploymentMetrics)
-> Lens
BulkDeploymentMetrics BulkDeploymentMetrics (Maybe Int) (Maybe Int)
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)
instance Core.FromJSON BulkDeploymentMetrics where
parseJSON :: Value -> Parser BulkDeploymentMetrics
parseJSON =
String
-> (Object -> Parser BulkDeploymentMetrics)
-> Value
-> Parser BulkDeploymentMetrics
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"BulkDeploymentMetrics"
( \Object
x ->
Maybe Int -> Maybe Int -> Maybe Int -> BulkDeploymentMetrics
BulkDeploymentMetrics'
(Maybe Int -> Maybe Int -> Maybe Int -> BulkDeploymentMetrics)
-> Parser (Maybe Int)
-> Parser (Maybe Int -> Maybe Int -> BulkDeploymentMetrics)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RecordsProcessed")
Parser (Maybe Int -> Maybe Int -> BulkDeploymentMetrics)
-> Parser (Maybe Int)
-> Parser (Maybe Int -> BulkDeploymentMetrics)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RetryAttempts")
Parser (Maybe Int -> BulkDeploymentMetrics)
-> Parser (Maybe Int) -> Parser BulkDeploymentMetrics
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"InvalidInputRecords")
)
instance Prelude.Hashable BulkDeploymentMetrics
instance Prelude.NFData BulkDeploymentMetrics