{-# 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.LargeTimestampGaps 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.StatisticalIssueStatus
import qualified Amazonka.Prelude as Prelude
data LargeTimestampGaps = LargeTimestampGaps'
{
LargeTimestampGaps -> Maybe Int
maxTimestampGapInDays :: Prelude.Maybe Prelude.Int,
LargeTimestampGaps -> Maybe Int
numberOfLargeTimestampGaps :: Prelude.Maybe Prelude.Int,
LargeTimestampGaps -> StatisticalIssueStatus
status :: StatisticalIssueStatus
}
deriving (LargeTimestampGaps -> LargeTimestampGaps -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LargeTimestampGaps -> LargeTimestampGaps -> Bool
$c/= :: LargeTimestampGaps -> LargeTimestampGaps -> Bool
== :: LargeTimestampGaps -> LargeTimestampGaps -> Bool
$c== :: LargeTimestampGaps -> LargeTimestampGaps -> Bool
Prelude.Eq, ReadPrec [LargeTimestampGaps]
ReadPrec LargeTimestampGaps
Int -> ReadS LargeTimestampGaps
ReadS [LargeTimestampGaps]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LargeTimestampGaps]
$creadListPrec :: ReadPrec [LargeTimestampGaps]
readPrec :: ReadPrec LargeTimestampGaps
$creadPrec :: ReadPrec LargeTimestampGaps
readList :: ReadS [LargeTimestampGaps]
$creadList :: ReadS [LargeTimestampGaps]
readsPrec :: Int -> ReadS LargeTimestampGaps
$creadsPrec :: Int -> ReadS LargeTimestampGaps
Prelude.Read, Int -> LargeTimestampGaps -> ShowS
[LargeTimestampGaps] -> ShowS
LargeTimestampGaps -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LargeTimestampGaps] -> ShowS
$cshowList :: [LargeTimestampGaps] -> ShowS
show :: LargeTimestampGaps -> String
$cshow :: LargeTimestampGaps -> String
showsPrec :: Int -> LargeTimestampGaps -> ShowS
$cshowsPrec :: Int -> LargeTimestampGaps -> ShowS
Prelude.Show, forall x. Rep LargeTimestampGaps x -> LargeTimestampGaps
forall x. LargeTimestampGaps -> Rep LargeTimestampGaps x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LargeTimestampGaps x -> LargeTimestampGaps
$cfrom :: forall x. LargeTimestampGaps -> Rep LargeTimestampGaps x
Prelude.Generic)
newLargeTimestampGaps ::
StatisticalIssueStatus ->
LargeTimestampGaps
newLargeTimestampGaps :: StatisticalIssueStatus -> LargeTimestampGaps
newLargeTimestampGaps StatisticalIssueStatus
pStatus_ =
LargeTimestampGaps'
{ $sel:maxTimestampGapInDays:LargeTimestampGaps' :: Maybe Int
maxTimestampGapInDays =
forall a. Maybe a
Prelude.Nothing,
$sel:numberOfLargeTimestampGaps:LargeTimestampGaps' :: Maybe Int
numberOfLargeTimestampGaps = forall a. Maybe a
Prelude.Nothing,
$sel:status:LargeTimestampGaps' :: StatisticalIssueStatus
status = StatisticalIssueStatus
pStatus_
}
largeTimestampGaps_maxTimestampGapInDays :: Lens.Lens' LargeTimestampGaps (Prelude.Maybe Prelude.Int)
largeTimestampGaps_maxTimestampGapInDays :: Lens' LargeTimestampGaps (Maybe Int)
largeTimestampGaps_maxTimestampGapInDays = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LargeTimestampGaps' {Maybe Int
maxTimestampGapInDays :: Maybe Int
$sel:maxTimestampGapInDays:LargeTimestampGaps' :: LargeTimestampGaps -> Maybe Int
maxTimestampGapInDays} -> Maybe Int
maxTimestampGapInDays) (\s :: LargeTimestampGaps
s@LargeTimestampGaps' {} Maybe Int
a -> LargeTimestampGaps
s {$sel:maxTimestampGapInDays:LargeTimestampGaps' :: Maybe Int
maxTimestampGapInDays = Maybe Int
a} :: LargeTimestampGaps)
largeTimestampGaps_numberOfLargeTimestampGaps :: Lens.Lens' LargeTimestampGaps (Prelude.Maybe Prelude.Int)
largeTimestampGaps_numberOfLargeTimestampGaps :: Lens' LargeTimestampGaps (Maybe Int)
largeTimestampGaps_numberOfLargeTimestampGaps = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LargeTimestampGaps' {Maybe Int
numberOfLargeTimestampGaps :: Maybe Int
$sel:numberOfLargeTimestampGaps:LargeTimestampGaps' :: LargeTimestampGaps -> Maybe Int
numberOfLargeTimestampGaps} -> Maybe Int
numberOfLargeTimestampGaps) (\s :: LargeTimestampGaps
s@LargeTimestampGaps' {} Maybe Int
a -> LargeTimestampGaps
s {$sel:numberOfLargeTimestampGaps:LargeTimestampGaps' :: Maybe Int
numberOfLargeTimestampGaps = Maybe Int
a} :: LargeTimestampGaps)
largeTimestampGaps_status :: Lens.Lens' LargeTimestampGaps StatisticalIssueStatus
largeTimestampGaps_status :: Lens' LargeTimestampGaps StatisticalIssueStatus
largeTimestampGaps_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LargeTimestampGaps' {StatisticalIssueStatus
status :: StatisticalIssueStatus
$sel:status:LargeTimestampGaps' :: LargeTimestampGaps -> StatisticalIssueStatus
status} -> StatisticalIssueStatus
status) (\s :: LargeTimestampGaps
s@LargeTimestampGaps' {} StatisticalIssueStatus
a -> LargeTimestampGaps
s {$sel:status:LargeTimestampGaps' :: StatisticalIssueStatus
status = StatisticalIssueStatus
a} :: LargeTimestampGaps)
instance Data.FromJSON LargeTimestampGaps where
parseJSON :: Value -> Parser LargeTimestampGaps
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"LargeTimestampGaps"
( \Object
x ->
Maybe Int
-> Maybe Int -> StatisticalIssueStatus -> LargeTimestampGaps
LargeTimestampGaps'
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
"MaxTimestampGapInDays")
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
"NumberOfLargeTimestampGaps")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"Status")
)
instance Prelude.Hashable LargeTimestampGaps where
hashWithSalt :: Int -> LargeTimestampGaps -> Int
hashWithSalt Int
_salt LargeTimestampGaps' {Maybe Int
StatisticalIssueStatus
status :: StatisticalIssueStatus
numberOfLargeTimestampGaps :: Maybe Int
maxTimestampGapInDays :: Maybe Int
$sel:status:LargeTimestampGaps' :: LargeTimestampGaps -> StatisticalIssueStatus
$sel:numberOfLargeTimestampGaps:LargeTimestampGaps' :: LargeTimestampGaps -> Maybe Int
$sel:maxTimestampGapInDays:LargeTimestampGaps' :: LargeTimestampGaps -> Maybe Int
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
maxTimestampGapInDays
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
numberOfLargeTimestampGaps
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` StatisticalIssueStatus
status
instance Prelude.NFData LargeTimestampGaps where
rnf :: LargeTimestampGaps -> ()
rnf LargeTimestampGaps' {Maybe Int
StatisticalIssueStatus
status :: StatisticalIssueStatus
numberOfLargeTimestampGaps :: Maybe Int
maxTimestampGapInDays :: Maybe Int
$sel:status:LargeTimestampGaps' :: LargeTimestampGaps -> StatisticalIssueStatus
$sel:numberOfLargeTimestampGaps:LargeTimestampGaps' :: LargeTimestampGaps -> Maybe Int
$sel:maxTimestampGapInDays:LargeTimestampGaps' :: LargeTimestampGaps -> Maybe Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
maxTimestampGapInDays
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
numberOfLargeTimestampGaps
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf StatisticalIssueStatus
status