{-# 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.XRay.Types.UnprocessedStatistics where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data UnprocessedStatistics = UnprocessedStatistics'
{
UnprocessedStatistics -> Maybe Text
ruleName :: Prelude.Maybe Prelude.Text,
UnprocessedStatistics -> Maybe Text
errorCode :: Prelude.Maybe Prelude.Text,
UnprocessedStatistics -> Maybe Text
message :: Prelude.Maybe Prelude.Text
}
deriving (UnprocessedStatistics -> UnprocessedStatistics -> Bool
(UnprocessedStatistics -> UnprocessedStatistics -> Bool)
-> (UnprocessedStatistics -> UnprocessedStatistics -> Bool)
-> Eq UnprocessedStatistics
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UnprocessedStatistics -> UnprocessedStatistics -> Bool
$c/= :: UnprocessedStatistics -> UnprocessedStatistics -> Bool
== :: UnprocessedStatistics -> UnprocessedStatistics -> Bool
$c== :: UnprocessedStatistics -> UnprocessedStatistics -> Bool
Prelude.Eq, ReadPrec [UnprocessedStatistics]
ReadPrec UnprocessedStatistics
Int -> ReadS UnprocessedStatistics
ReadS [UnprocessedStatistics]
(Int -> ReadS UnprocessedStatistics)
-> ReadS [UnprocessedStatistics]
-> ReadPrec UnprocessedStatistics
-> ReadPrec [UnprocessedStatistics]
-> Read UnprocessedStatistics
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UnprocessedStatistics]
$creadListPrec :: ReadPrec [UnprocessedStatistics]
readPrec :: ReadPrec UnprocessedStatistics
$creadPrec :: ReadPrec UnprocessedStatistics
readList :: ReadS [UnprocessedStatistics]
$creadList :: ReadS [UnprocessedStatistics]
readsPrec :: Int -> ReadS UnprocessedStatistics
$creadsPrec :: Int -> ReadS UnprocessedStatistics
Prelude.Read, Int -> UnprocessedStatistics -> ShowS
[UnprocessedStatistics] -> ShowS
UnprocessedStatistics -> String
(Int -> UnprocessedStatistics -> ShowS)
-> (UnprocessedStatistics -> String)
-> ([UnprocessedStatistics] -> ShowS)
-> Show UnprocessedStatistics
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UnprocessedStatistics] -> ShowS
$cshowList :: [UnprocessedStatistics] -> ShowS
show :: UnprocessedStatistics -> String
$cshow :: UnprocessedStatistics -> String
showsPrec :: Int -> UnprocessedStatistics -> ShowS
$cshowsPrec :: Int -> UnprocessedStatistics -> ShowS
Prelude.Show, (forall x. UnprocessedStatistics -> Rep UnprocessedStatistics x)
-> (forall x. Rep UnprocessedStatistics x -> UnprocessedStatistics)
-> Generic UnprocessedStatistics
forall x. Rep UnprocessedStatistics x -> UnprocessedStatistics
forall x. UnprocessedStatistics -> Rep UnprocessedStatistics x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UnprocessedStatistics x -> UnprocessedStatistics
$cfrom :: forall x. UnprocessedStatistics -> Rep UnprocessedStatistics x
Prelude.Generic)
newUnprocessedStatistics ::
UnprocessedStatistics
newUnprocessedStatistics :: UnprocessedStatistics
newUnprocessedStatistics =
UnprocessedStatistics' :: Maybe Text -> Maybe Text -> Maybe Text -> UnprocessedStatistics
UnprocessedStatistics'
{ $sel:ruleName:UnprocessedStatistics' :: Maybe Text
ruleName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:errorCode:UnprocessedStatistics' :: Maybe Text
errorCode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:message:UnprocessedStatistics' :: Maybe Text
message = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
unprocessedStatistics_ruleName :: Lens.Lens' UnprocessedStatistics (Prelude.Maybe Prelude.Text)
unprocessedStatistics_ruleName :: (Maybe Text -> f (Maybe Text))
-> UnprocessedStatistics -> f UnprocessedStatistics
unprocessedStatistics_ruleName = (UnprocessedStatistics -> Maybe Text)
-> (UnprocessedStatistics -> Maybe Text -> UnprocessedStatistics)
-> Lens
UnprocessedStatistics
UnprocessedStatistics
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UnprocessedStatistics' {Maybe Text
ruleName :: Maybe Text
$sel:ruleName:UnprocessedStatistics' :: UnprocessedStatistics -> Maybe Text
ruleName} -> Maybe Text
ruleName) (\s :: UnprocessedStatistics
s@UnprocessedStatistics' {} Maybe Text
a -> UnprocessedStatistics
s {$sel:ruleName:UnprocessedStatistics' :: Maybe Text
ruleName = Maybe Text
a} :: UnprocessedStatistics)
unprocessedStatistics_errorCode :: Lens.Lens' UnprocessedStatistics (Prelude.Maybe Prelude.Text)
unprocessedStatistics_errorCode :: (Maybe Text -> f (Maybe Text))
-> UnprocessedStatistics -> f UnprocessedStatistics
unprocessedStatistics_errorCode = (UnprocessedStatistics -> Maybe Text)
-> (UnprocessedStatistics -> Maybe Text -> UnprocessedStatistics)
-> Lens
UnprocessedStatistics
UnprocessedStatistics
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UnprocessedStatistics' {Maybe Text
errorCode :: Maybe Text
$sel:errorCode:UnprocessedStatistics' :: UnprocessedStatistics -> Maybe Text
errorCode} -> Maybe Text
errorCode) (\s :: UnprocessedStatistics
s@UnprocessedStatistics' {} Maybe Text
a -> UnprocessedStatistics
s {$sel:errorCode:UnprocessedStatistics' :: Maybe Text
errorCode = Maybe Text
a} :: UnprocessedStatistics)
unprocessedStatistics_message :: Lens.Lens' UnprocessedStatistics (Prelude.Maybe Prelude.Text)
unprocessedStatistics_message :: (Maybe Text -> f (Maybe Text))
-> UnprocessedStatistics -> f UnprocessedStatistics
unprocessedStatistics_message = (UnprocessedStatistics -> Maybe Text)
-> (UnprocessedStatistics -> Maybe Text -> UnprocessedStatistics)
-> Lens
UnprocessedStatistics
UnprocessedStatistics
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UnprocessedStatistics' {Maybe Text
message :: Maybe Text
$sel:message:UnprocessedStatistics' :: UnprocessedStatistics -> Maybe Text
message} -> Maybe Text
message) (\s :: UnprocessedStatistics
s@UnprocessedStatistics' {} Maybe Text
a -> UnprocessedStatistics
s {$sel:message:UnprocessedStatistics' :: Maybe Text
message = Maybe Text
a} :: UnprocessedStatistics)
instance Core.FromJSON UnprocessedStatistics where
parseJSON :: Value -> Parser UnprocessedStatistics
parseJSON =
String
-> (Object -> Parser UnprocessedStatistics)
-> Value
-> Parser UnprocessedStatistics
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"UnprocessedStatistics"
( \Object
x ->
Maybe Text -> Maybe Text -> Maybe Text -> UnprocessedStatistics
UnprocessedStatistics'
(Maybe Text -> Maybe Text -> Maybe Text -> UnprocessedStatistics)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> UnprocessedStatistics)
forall (f :: * -> *) a b. Functor 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
"RuleName")
Parser (Maybe Text -> Maybe Text -> UnprocessedStatistics)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> UnprocessedStatistics)
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
"ErrorCode")
Parser (Maybe Text -> UnprocessedStatistics)
-> Parser (Maybe Text) -> Parser UnprocessedStatistics
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
"Message")
)
instance Prelude.Hashable UnprocessedStatistics
instance Prelude.NFData UnprocessedStatistics