{-# 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.LookoutEquipment.Types.LabelSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.LookoutEquipment.Types.LabelRating
import qualified Amazonka.Prelude as Prelude
data LabelSummary = LabelSummary'
{
LabelSummary -> Maybe POSIX
createdAt :: Prelude.Maybe Data.POSIX,
LabelSummary -> Maybe POSIX
endTime :: Prelude.Maybe Data.POSIX,
LabelSummary -> Maybe Text
equipment :: Prelude.Maybe Prelude.Text,
LabelSummary -> Maybe Text
faultCode :: Prelude.Maybe Prelude.Text,
LabelSummary -> Maybe Text
labelGroupArn :: Prelude.Maybe Prelude.Text,
LabelSummary -> Maybe Text
labelGroupName :: Prelude.Maybe Prelude.Text,
LabelSummary -> Maybe Text
labelId :: Prelude.Maybe Prelude.Text,
LabelSummary -> Maybe LabelRating
rating :: Prelude.Maybe LabelRating,
LabelSummary -> Maybe POSIX
startTime :: Prelude.Maybe Data.POSIX
}
deriving (LabelSummary -> LabelSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LabelSummary -> LabelSummary -> Bool
$c/= :: LabelSummary -> LabelSummary -> Bool
== :: LabelSummary -> LabelSummary -> Bool
$c== :: LabelSummary -> LabelSummary -> Bool
Prelude.Eq, ReadPrec [LabelSummary]
ReadPrec LabelSummary
Int -> ReadS LabelSummary
ReadS [LabelSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LabelSummary]
$creadListPrec :: ReadPrec [LabelSummary]
readPrec :: ReadPrec LabelSummary
$creadPrec :: ReadPrec LabelSummary
readList :: ReadS [LabelSummary]
$creadList :: ReadS [LabelSummary]
readsPrec :: Int -> ReadS LabelSummary
$creadsPrec :: Int -> ReadS LabelSummary
Prelude.Read, Int -> LabelSummary -> ShowS
[LabelSummary] -> ShowS
LabelSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LabelSummary] -> ShowS
$cshowList :: [LabelSummary] -> ShowS
show :: LabelSummary -> String
$cshow :: LabelSummary -> String
showsPrec :: Int -> LabelSummary -> ShowS
$cshowsPrec :: Int -> LabelSummary -> ShowS
Prelude.Show, forall x. Rep LabelSummary x -> LabelSummary
forall x. LabelSummary -> Rep LabelSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LabelSummary x -> LabelSummary
$cfrom :: forall x. LabelSummary -> Rep LabelSummary x
Prelude.Generic)
newLabelSummary ::
LabelSummary
newLabelSummary :: LabelSummary
newLabelSummary =
LabelSummary'
{ $sel:createdAt:LabelSummary' :: Maybe POSIX
createdAt = forall a. Maybe a
Prelude.Nothing,
$sel:endTime:LabelSummary' :: Maybe POSIX
endTime = forall a. Maybe a
Prelude.Nothing,
$sel:equipment:LabelSummary' :: Maybe Text
equipment = forall a. Maybe a
Prelude.Nothing,
$sel:faultCode:LabelSummary' :: Maybe Text
faultCode = forall a. Maybe a
Prelude.Nothing,
$sel:labelGroupArn:LabelSummary' :: Maybe Text
labelGroupArn = forall a. Maybe a
Prelude.Nothing,
$sel:labelGroupName:LabelSummary' :: Maybe Text
labelGroupName = forall a. Maybe a
Prelude.Nothing,
$sel:labelId:LabelSummary' :: Maybe Text
labelId = forall a. Maybe a
Prelude.Nothing,
$sel:rating:LabelSummary' :: Maybe LabelRating
rating = forall a. Maybe a
Prelude.Nothing,
$sel:startTime:LabelSummary' :: Maybe POSIX
startTime = forall a. Maybe a
Prelude.Nothing
}
labelSummary_createdAt :: Lens.Lens' LabelSummary (Prelude.Maybe Prelude.UTCTime)
labelSummary_createdAt :: Lens' LabelSummary (Maybe UTCTime)
labelSummary_createdAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LabelSummary' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:LabelSummary' :: LabelSummary -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: LabelSummary
s@LabelSummary' {} Maybe POSIX
a -> LabelSummary
s {$sel:createdAt:LabelSummary' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: LabelSummary) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
labelSummary_endTime :: Lens.Lens' LabelSummary (Prelude.Maybe Prelude.UTCTime)
labelSummary_endTime :: Lens' LabelSummary (Maybe UTCTime)
labelSummary_endTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LabelSummary' {Maybe POSIX
endTime :: Maybe POSIX
$sel:endTime:LabelSummary' :: LabelSummary -> Maybe POSIX
endTime} -> Maybe POSIX
endTime) (\s :: LabelSummary
s@LabelSummary' {} Maybe POSIX
a -> LabelSummary
s {$sel:endTime:LabelSummary' :: Maybe POSIX
endTime = Maybe POSIX
a} :: LabelSummary) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
labelSummary_equipment :: Lens.Lens' LabelSummary (Prelude.Maybe Prelude.Text)
labelSummary_equipment :: Lens' LabelSummary (Maybe Text)
labelSummary_equipment = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LabelSummary' {Maybe Text
equipment :: Maybe Text
$sel:equipment:LabelSummary' :: LabelSummary -> Maybe Text
equipment} -> Maybe Text
equipment) (\s :: LabelSummary
s@LabelSummary' {} Maybe Text
a -> LabelSummary
s {$sel:equipment:LabelSummary' :: Maybe Text
equipment = Maybe Text
a} :: LabelSummary)
labelSummary_faultCode :: Lens.Lens' LabelSummary (Prelude.Maybe Prelude.Text)
labelSummary_faultCode :: Lens' LabelSummary (Maybe Text)
labelSummary_faultCode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LabelSummary' {Maybe Text
faultCode :: Maybe Text
$sel:faultCode:LabelSummary' :: LabelSummary -> Maybe Text
faultCode} -> Maybe Text
faultCode) (\s :: LabelSummary
s@LabelSummary' {} Maybe Text
a -> LabelSummary
s {$sel:faultCode:LabelSummary' :: Maybe Text
faultCode = Maybe Text
a} :: LabelSummary)
labelSummary_labelGroupArn :: Lens.Lens' LabelSummary (Prelude.Maybe Prelude.Text)
labelSummary_labelGroupArn :: Lens' LabelSummary (Maybe Text)
labelSummary_labelGroupArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LabelSummary' {Maybe Text
labelGroupArn :: Maybe Text
$sel:labelGroupArn:LabelSummary' :: LabelSummary -> Maybe Text
labelGroupArn} -> Maybe Text
labelGroupArn) (\s :: LabelSummary
s@LabelSummary' {} Maybe Text
a -> LabelSummary
s {$sel:labelGroupArn:LabelSummary' :: Maybe Text
labelGroupArn = Maybe Text
a} :: LabelSummary)
labelSummary_labelGroupName :: Lens.Lens' LabelSummary (Prelude.Maybe Prelude.Text)
labelSummary_labelGroupName :: Lens' LabelSummary (Maybe Text)
labelSummary_labelGroupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LabelSummary' {Maybe Text
labelGroupName :: Maybe Text
$sel:labelGroupName:LabelSummary' :: LabelSummary -> Maybe Text
labelGroupName} -> Maybe Text
labelGroupName) (\s :: LabelSummary
s@LabelSummary' {} Maybe Text
a -> LabelSummary
s {$sel:labelGroupName:LabelSummary' :: Maybe Text
labelGroupName = Maybe Text
a} :: LabelSummary)
labelSummary_labelId :: Lens.Lens' LabelSummary (Prelude.Maybe Prelude.Text)
labelSummary_labelId :: Lens' LabelSummary (Maybe Text)
labelSummary_labelId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LabelSummary' {Maybe Text
labelId :: Maybe Text
$sel:labelId:LabelSummary' :: LabelSummary -> Maybe Text
labelId} -> Maybe Text
labelId) (\s :: LabelSummary
s@LabelSummary' {} Maybe Text
a -> LabelSummary
s {$sel:labelId:LabelSummary' :: Maybe Text
labelId = Maybe Text
a} :: LabelSummary)
labelSummary_rating :: Lens.Lens' LabelSummary (Prelude.Maybe LabelRating)
labelSummary_rating :: Lens' LabelSummary (Maybe LabelRating)
labelSummary_rating = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LabelSummary' {Maybe LabelRating
rating :: Maybe LabelRating
$sel:rating:LabelSummary' :: LabelSummary -> Maybe LabelRating
rating} -> Maybe LabelRating
rating) (\s :: LabelSummary
s@LabelSummary' {} Maybe LabelRating
a -> LabelSummary
s {$sel:rating:LabelSummary' :: Maybe LabelRating
rating = Maybe LabelRating
a} :: LabelSummary)
labelSummary_startTime :: Lens.Lens' LabelSummary (Prelude.Maybe Prelude.UTCTime)
labelSummary_startTime :: Lens' LabelSummary (Maybe UTCTime)
labelSummary_startTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LabelSummary' {Maybe POSIX
startTime :: Maybe POSIX
$sel:startTime:LabelSummary' :: LabelSummary -> Maybe POSIX
startTime} -> Maybe POSIX
startTime) (\s :: LabelSummary
s@LabelSummary' {} Maybe POSIX
a -> LabelSummary
s {$sel:startTime:LabelSummary' :: Maybe POSIX
startTime = Maybe POSIX
a} :: LabelSummary) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
instance Data.FromJSON LabelSummary where
parseJSON :: Value -> Parser LabelSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"LabelSummary"
( \Object
x ->
Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe LabelRating
-> Maybe POSIX
-> LabelSummary
LabelSummary'
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
"CreatedAt")
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
"EndTime")
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
"Equipment")
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
"FaultCode")
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
"LabelGroupArn")
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
"LabelGroupName")
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
"LabelId")
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
"Rating")
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
"StartTime")
)
instance Prelude.Hashable LabelSummary where
hashWithSalt :: Int -> LabelSummary -> Int
hashWithSalt Int
_salt LabelSummary' {Maybe Text
Maybe POSIX
Maybe LabelRating
startTime :: Maybe POSIX
rating :: Maybe LabelRating
labelId :: Maybe Text
labelGroupName :: Maybe Text
labelGroupArn :: Maybe Text
faultCode :: Maybe Text
equipment :: Maybe Text
endTime :: Maybe POSIX
createdAt :: Maybe POSIX
$sel:startTime:LabelSummary' :: LabelSummary -> Maybe POSIX
$sel:rating:LabelSummary' :: LabelSummary -> Maybe LabelRating
$sel:labelId:LabelSummary' :: LabelSummary -> Maybe Text
$sel:labelGroupName:LabelSummary' :: LabelSummary -> Maybe Text
$sel:labelGroupArn:LabelSummary' :: LabelSummary -> Maybe Text
$sel:faultCode:LabelSummary' :: LabelSummary -> Maybe Text
$sel:equipment:LabelSummary' :: LabelSummary -> Maybe Text
$sel:endTime:LabelSummary' :: LabelSummary -> Maybe POSIX
$sel:createdAt:LabelSummary' :: LabelSummary -> Maybe POSIX
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
createdAt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
endTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
equipment
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
faultCode
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
labelGroupArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
labelGroupName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
labelId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe LabelRating
rating
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
startTime
instance Prelude.NFData LabelSummary where
rnf :: LabelSummary -> ()
rnf LabelSummary' {Maybe Text
Maybe POSIX
Maybe LabelRating
startTime :: Maybe POSIX
rating :: Maybe LabelRating
labelId :: Maybe Text
labelGroupName :: Maybe Text
labelGroupArn :: Maybe Text
faultCode :: Maybe Text
equipment :: Maybe Text
endTime :: Maybe POSIX
createdAt :: Maybe POSIX
$sel:startTime:LabelSummary' :: LabelSummary -> Maybe POSIX
$sel:rating:LabelSummary' :: LabelSummary -> Maybe LabelRating
$sel:labelId:LabelSummary' :: LabelSummary -> Maybe Text
$sel:labelGroupName:LabelSummary' :: LabelSummary -> Maybe Text
$sel:labelGroupArn:LabelSummary' :: LabelSummary -> Maybe Text
$sel:faultCode:LabelSummary' :: LabelSummary -> Maybe Text
$sel:equipment:LabelSummary' :: LabelSummary -> Maybe Text
$sel:endTime:LabelSummary' :: LabelSummary -> Maybe POSIX
$sel:createdAt:LabelSummary' :: LabelSummary -> Maybe POSIX
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
createdAt
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
endTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
equipment
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
faultCode
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
labelGroupArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
labelGroupName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
labelId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe LabelRating
rating
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
startTime