{-# 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.LookoutVision.Types.DatasetImageStats where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DatasetImageStats = DatasetImageStats'
{
DatasetImageStats -> Maybe Int
normal :: Prelude.Maybe Prelude.Int,
DatasetImageStats -> Maybe Int
anomaly :: Prelude.Maybe Prelude.Int,
DatasetImageStats -> Maybe Int
labeled :: Prelude.Maybe Prelude.Int,
DatasetImageStats -> Maybe Int
total :: Prelude.Maybe Prelude.Int
}
deriving (DatasetImageStats -> DatasetImageStats -> Bool
(DatasetImageStats -> DatasetImageStats -> Bool)
-> (DatasetImageStats -> DatasetImageStats -> Bool)
-> Eq DatasetImageStats
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DatasetImageStats -> DatasetImageStats -> Bool
$c/= :: DatasetImageStats -> DatasetImageStats -> Bool
== :: DatasetImageStats -> DatasetImageStats -> Bool
$c== :: DatasetImageStats -> DatasetImageStats -> Bool
Prelude.Eq, ReadPrec [DatasetImageStats]
ReadPrec DatasetImageStats
Int -> ReadS DatasetImageStats
ReadS [DatasetImageStats]
(Int -> ReadS DatasetImageStats)
-> ReadS [DatasetImageStats]
-> ReadPrec DatasetImageStats
-> ReadPrec [DatasetImageStats]
-> Read DatasetImageStats
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DatasetImageStats]
$creadListPrec :: ReadPrec [DatasetImageStats]
readPrec :: ReadPrec DatasetImageStats
$creadPrec :: ReadPrec DatasetImageStats
readList :: ReadS [DatasetImageStats]
$creadList :: ReadS [DatasetImageStats]
readsPrec :: Int -> ReadS DatasetImageStats
$creadsPrec :: Int -> ReadS DatasetImageStats
Prelude.Read, Int -> DatasetImageStats -> ShowS
[DatasetImageStats] -> ShowS
DatasetImageStats -> String
(Int -> DatasetImageStats -> ShowS)
-> (DatasetImageStats -> String)
-> ([DatasetImageStats] -> ShowS)
-> Show DatasetImageStats
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DatasetImageStats] -> ShowS
$cshowList :: [DatasetImageStats] -> ShowS
show :: DatasetImageStats -> String
$cshow :: DatasetImageStats -> String
showsPrec :: Int -> DatasetImageStats -> ShowS
$cshowsPrec :: Int -> DatasetImageStats -> ShowS
Prelude.Show, (forall x. DatasetImageStats -> Rep DatasetImageStats x)
-> (forall x. Rep DatasetImageStats x -> DatasetImageStats)
-> Generic DatasetImageStats
forall x. Rep DatasetImageStats x -> DatasetImageStats
forall x. DatasetImageStats -> Rep DatasetImageStats x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DatasetImageStats x -> DatasetImageStats
$cfrom :: forall x. DatasetImageStats -> Rep DatasetImageStats x
Prelude.Generic)
newDatasetImageStats ::
DatasetImageStats
newDatasetImageStats :: DatasetImageStats
newDatasetImageStats =
DatasetImageStats' :: Maybe Int
-> Maybe Int -> Maybe Int -> Maybe Int -> DatasetImageStats
DatasetImageStats'
{ $sel:normal:DatasetImageStats' :: Maybe Int
normal = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:anomaly:DatasetImageStats' :: Maybe Int
anomaly = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:labeled:DatasetImageStats' :: Maybe Int
labeled = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:total:DatasetImageStats' :: Maybe Int
total = Maybe Int
forall a. Maybe a
Prelude.Nothing
}
datasetImageStats_normal :: Lens.Lens' DatasetImageStats (Prelude.Maybe Prelude.Int)
datasetImageStats_normal :: (Maybe Int -> f (Maybe Int))
-> DatasetImageStats -> f DatasetImageStats
datasetImageStats_normal = (DatasetImageStats -> Maybe Int)
-> (DatasetImageStats -> Maybe Int -> DatasetImageStats)
-> Lens DatasetImageStats DatasetImageStats (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DatasetImageStats' {Maybe Int
normal :: Maybe Int
$sel:normal:DatasetImageStats' :: DatasetImageStats -> Maybe Int
normal} -> Maybe Int
normal) (\s :: DatasetImageStats
s@DatasetImageStats' {} Maybe Int
a -> DatasetImageStats
s {$sel:normal:DatasetImageStats' :: Maybe Int
normal = Maybe Int
a} :: DatasetImageStats)
datasetImageStats_anomaly :: Lens.Lens' DatasetImageStats (Prelude.Maybe Prelude.Int)
datasetImageStats_anomaly :: (Maybe Int -> f (Maybe Int))
-> DatasetImageStats -> f DatasetImageStats
datasetImageStats_anomaly = (DatasetImageStats -> Maybe Int)
-> (DatasetImageStats -> Maybe Int -> DatasetImageStats)
-> Lens DatasetImageStats DatasetImageStats (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DatasetImageStats' {Maybe Int
anomaly :: Maybe Int
$sel:anomaly:DatasetImageStats' :: DatasetImageStats -> Maybe Int
anomaly} -> Maybe Int
anomaly) (\s :: DatasetImageStats
s@DatasetImageStats' {} Maybe Int
a -> DatasetImageStats
s {$sel:anomaly:DatasetImageStats' :: Maybe Int
anomaly = Maybe Int
a} :: DatasetImageStats)
datasetImageStats_labeled :: Lens.Lens' DatasetImageStats (Prelude.Maybe Prelude.Int)
datasetImageStats_labeled :: (Maybe Int -> f (Maybe Int))
-> DatasetImageStats -> f DatasetImageStats
datasetImageStats_labeled = (DatasetImageStats -> Maybe Int)
-> (DatasetImageStats -> Maybe Int -> DatasetImageStats)
-> Lens DatasetImageStats DatasetImageStats (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DatasetImageStats' {Maybe Int
labeled :: Maybe Int
$sel:labeled:DatasetImageStats' :: DatasetImageStats -> Maybe Int
labeled} -> Maybe Int
labeled) (\s :: DatasetImageStats
s@DatasetImageStats' {} Maybe Int
a -> DatasetImageStats
s {$sel:labeled:DatasetImageStats' :: Maybe Int
labeled = Maybe Int
a} :: DatasetImageStats)
datasetImageStats_total :: Lens.Lens' DatasetImageStats (Prelude.Maybe Prelude.Int)
datasetImageStats_total :: (Maybe Int -> f (Maybe Int))
-> DatasetImageStats -> f DatasetImageStats
datasetImageStats_total = (DatasetImageStats -> Maybe Int)
-> (DatasetImageStats -> Maybe Int -> DatasetImageStats)
-> Lens DatasetImageStats DatasetImageStats (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DatasetImageStats' {Maybe Int
total :: Maybe Int
$sel:total:DatasetImageStats' :: DatasetImageStats -> Maybe Int
total} -> Maybe Int
total) (\s :: DatasetImageStats
s@DatasetImageStats' {} Maybe Int
a -> DatasetImageStats
s {$sel:total:DatasetImageStats' :: Maybe Int
total = Maybe Int
a} :: DatasetImageStats)
instance Core.FromJSON DatasetImageStats where
parseJSON :: Value -> Parser DatasetImageStats
parseJSON =
String
-> (Object -> Parser DatasetImageStats)
-> Value
-> Parser DatasetImageStats
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DatasetImageStats"
( \Object
x ->
Maybe Int
-> Maybe Int -> Maybe Int -> Maybe Int -> DatasetImageStats
DatasetImageStats'
(Maybe Int
-> Maybe Int -> Maybe Int -> Maybe Int -> DatasetImageStats)
-> Parser (Maybe Int)
-> Parser
(Maybe Int -> Maybe Int -> Maybe Int -> DatasetImageStats)
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
"Normal")
Parser (Maybe Int -> Maybe Int -> Maybe Int -> DatasetImageStats)
-> Parser (Maybe Int)
-> Parser (Maybe Int -> Maybe Int -> DatasetImageStats)
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
"Anomaly")
Parser (Maybe Int -> Maybe Int -> DatasetImageStats)
-> Parser (Maybe Int) -> Parser (Maybe Int -> DatasetImageStats)
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
"Labeled")
Parser (Maybe Int -> DatasetImageStats)
-> Parser (Maybe Int) -> Parser DatasetImageStats
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
"Total")
)
instance Prelude.Hashable DatasetImageStats
instance Prelude.NFData DatasetImageStats