{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.LookoutEquipment.Types.SensorStatisticsSummary
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.LookoutEquipment.Types.SensorStatisticsSummary 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.CategoricalValues
import Amazonka.LookoutEquipment.Types.CountPercent
import Amazonka.LookoutEquipment.Types.LargeTimestampGaps
import Amazonka.LookoutEquipment.Types.MonotonicValues
import Amazonka.LookoutEquipment.Types.MultipleOperatingModes
import qualified Amazonka.Prelude as Prelude

-- | Summary of ingestion statistics like whether data exists, number of
-- missing values, number of invalid values and so on related to the
-- particular sensor.
--
-- /See:/ 'newSensorStatisticsSummary' smart constructor.
data SensorStatisticsSummary = SensorStatisticsSummary'
  { -- | Parameter that describes potential risk about whether data associated
    -- with the sensor is categorical.
    SensorStatisticsSummary -> Maybe CategoricalValues
categoricalValues :: Prelude.Maybe CategoricalValues,
    -- | Name of the component to which the particular sensor belongs for which
    -- the statistics belong to.
    SensorStatisticsSummary -> Maybe Text
componentName :: Prelude.Maybe Prelude.Text,
    -- | Indicates the time reference to indicate the end of valid data
    -- associated with the sensor that the statistics belong to.
    SensorStatisticsSummary -> Maybe POSIX
dataEndTime :: Prelude.Maybe Data.POSIX,
    -- | Parameter that indicates whether data exists for the sensor that the
    -- statistics belong to.
    SensorStatisticsSummary -> Maybe Bool
dataExists :: Prelude.Maybe Prelude.Bool,
    -- | Indicates the time reference to indicate the beginning of valid data
    -- associated with the sensor that the statistics belong to.
    SensorStatisticsSummary -> Maybe POSIX
dataStartTime :: Prelude.Maybe Data.POSIX,
    -- | Parameter that describes the total number of duplicate timestamp records
    -- associated with the sensor that the statistics belong to.
    SensorStatisticsSummary -> Maybe CountPercent
duplicateTimestamps :: Prelude.Maybe CountPercent,
    -- | Parameter that describes the total number of invalid date entries
    -- associated with the sensor that the statistics belong to.
    SensorStatisticsSummary -> Maybe CountPercent
invalidDateEntries :: Prelude.Maybe CountPercent,
    -- | Parameter that describes the total number of, and percentage of, values
    -- that are invalid for the sensor that the statistics belong to.
    SensorStatisticsSummary -> Maybe CountPercent
invalidValues :: Prelude.Maybe CountPercent,
    -- | Parameter that describes potential risk about whether data associated
    -- with the sensor contains one or more large gaps between consecutive
    -- timestamps.
    SensorStatisticsSummary -> Maybe LargeTimestampGaps
largeTimestampGaps :: Prelude.Maybe LargeTimestampGaps,
    -- | Parameter that describes the total number of, and percentage of, values
    -- that are missing for the sensor that the statistics belong to.
    SensorStatisticsSummary -> Maybe CountPercent
missingValues :: Prelude.Maybe CountPercent,
    -- | Parameter that describes potential risk about whether data associated
    -- with the sensor is mostly monotonic.
    SensorStatisticsSummary -> Maybe MonotonicValues
monotonicValues :: Prelude.Maybe MonotonicValues,
    -- | Parameter that describes potential risk about whether data associated
    -- with the sensor has more than one operating mode.
    SensorStatisticsSummary -> Maybe MultipleOperatingModes
multipleOperatingModes :: Prelude.Maybe MultipleOperatingModes,
    -- | Name of the sensor that the statistics belong to.
    SensorStatisticsSummary -> Maybe Text
sensorName :: Prelude.Maybe Prelude.Text
  }
  deriving (SensorStatisticsSummary -> SensorStatisticsSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SensorStatisticsSummary -> SensorStatisticsSummary -> Bool
$c/= :: SensorStatisticsSummary -> SensorStatisticsSummary -> Bool
== :: SensorStatisticsSummary -> SensorStatisticsSummary -> Bool
$c== :: SensorStatisticsSummary -> SensorStatisticsSummary -> Bool
Prelude.Eq, ReadPrec [SensorStatisticsSummary]
ReadPrec SensorStatisticsSummary
Int -> ReadS SensorStatisticsSummary
ReadS [SensorStatisticsSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SensorStatisticsSummary]
$creadListPrec :: ReadPrec [SensorStatisticsSummary]
readPrec :: ReadPrec SensorStatisticsSummary
$creadPrec :: ReadPrec SensorStatisticsSummary
readList :: ReadS [SensorStatisticsSummary]
$creadList :: ReadS [SensorStatisticsSummary]
readsPrec :: Int -> ReadS SensorStatisticsSummary
$creadsPrec :: Int -> ReadS SensorStatisticsSummary
Prelude.Read, Int -> SensorStatisticsSummary -> ShowS
[SensorStatisticsSummary] -> ShowS
SensorStatisticsSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SensorStatisticsSummary] -> ShowS
$cshowList :: [SensorStatisticsSummary] -> ShowS
show :: SensorStatisticsSummary -> String
$cshow :: SensorStatisticsSummary -> String
showsPrec :: Int -> SensorStatisticsSummary -> ShowS
$cshowsPrec :: Int -> SensorStatisticsSummary -> ShowS
Prelude.Show, forall x. Rep SensorStatisticsSummary x -> SensorStatisticsSummary
forall x. SensorStatisticsSummary -> Rep SensorStatisticsSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SensorStatisticsSummary x -> SensorStatisticsSummary
$cfrom :: forall x. SensorStatisticsSummary -> Rep SensorStatisticsSummary x
Prelude.Generic)

-- |
-- Create a value of 'SensorStatisticsSummary' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'categoricalValues', 'sensorStatisticsSummary_categoricalValues' - Parameter that describes potential risk about whether data associated
-- with the sensor is categorical.
--
-- 'componentName', 'sensorStatisticsSummary_componentName' - Name of the component to which the particular sensor belongs for which
-- the statistics belong to.
--
-- 'dataEndTime', 'sensorStatisticsSummary_dataEndTime' - Indicates the time reference to indicate the end of valid data
-- associated with the sensor that the statistics belong to.
--
-- 'dataExists', 'sensorStatisticsSummary_dataExists' - Parameter that indicates whether data exists for the sensor that the
-- statistics belong to.
--
-- 'dataStartTime', 'sensorStatisticsSummary_dataStartTime' - Indicates the time reference to indicate the beginning of valid data
-- associated with the sensor that the statistics belong to.
--
-- 'duplicateTimestamps', 'sensorStatisticsSummary_duplicateTimestamps' - Parameter that describes the total number of duplicate timestamp records
-- associated with the sensor that the statistics belong to.
--
-- 'invalidDateEntries', 'sensorStatisticsSummary_invalidDateEntries' - Parameter that describes the total number of invalid date entries
-- associated with the sensor that the statistics belong to.
--
-- 'invalidValues', 'sensorStatisticsSummary_invalidValues' - Parameter that describes the total number of, and percentage of, values
-- that are invalid for the sensor that the statistics belong to.
--
-- 'largeTimestampGaps', 'sensorStatisticsSummary_largeTimestampGaps' - Parameter that describes potential risk about whether data associated
-- with the sensor contains one or more large gaps between consecutive
-- timestamps.
--
-- 'missingValues', 'sensorStatisticsSummary_missingValues' - Parameter that describes the total number of, and percentage of, values
-- that are missing for the sensor that the statistics belong to.
--
-- 'monotonicValues', 'sensorStatisticsSummary_monotonicValues' - Parameter that describes potential risk about whether data associated
-- with the sensor is mostly monotonic.
--
-- 'multipleOperatingModes', 'sensorStatisticsSummary_multipleOperatingModes' - Parameter that describes potential risk about whether data associated
-- with the sensor has more than one operating mode.
--
-- 'sensorName', 'sensorStatisticsSummary_sensorName' - Name of the sensor that the statistics belong to.
newSensorStatisticsSummary ::
  SensorStatisticsSummary
newSensorStatisticsSummary :: SensorStatisticsSummary
newSensorStatisticsSummary =
  SensorStatisticsSummary'
    { $sel:categoricalValues:SensorStatisticsSummary' :: Maybe CategoricalValues
categoricalValues =
        forall a. Maybe a
Prelude.Nothing,
      $sel:componentName:SensorStatisticsSummary' :: Maybe Text
componentName = forall a. Maybe a
Prelude.Nothing,
      $sel:dataEndTime:SensorStatisticsSummary' :: Maybe POSIX
dataEndTime = forall a. Maybe a
Prelude.Nothing,
      $sel:dataExists:SensorStatisticsSummary' :: Maybe Bool
dataExists = forall a. Maybe a
Prelude.Nothing,
      $sel:dataStartTime:SensorStatisticsSummary' :: Maybe POSIX
dataStartTime = forall a. Maybe a
Prelude.Nothing,
      $sel:duplicateTimestamps:SensorStatisticsSummary' :: Maybe CountPercent
duplicateTimestamps = forall a. Maybe a
Prelude.Nothing,
      $sel:invalidDateEntries:SensorStatisticsSummary' :: Maybe CountPercent
invalidDateEntries = forall a. Maybe a
Prelude.Nothing,
      $sel:invalidValues:SensorStatisticsSummary' :: Maybe CountPercent
invalidValues = forall a. Maybe a
Prelude.Nothing,
      $sel:largeTimestampGaps:SensorStatisticsSummary' :: Maybe LargeTimestampGaps
largeTimestampGaps = forall a. Maybe a
Prelude.Nothing,
      $sel:missingValues:SensorStatisticsSummary' :: Maybe CountPercent
missingValues = forall a. Maybe a
Prelude.Nothing,
      $sel:monotonicValues:SensorStatisticsSummary' :: Maybe MonotonicValues
monotonicValues = forall a. Maybe a
Prelude.Nothing,
      $sel:multipleOperatingModes:SensorStatisticsSummary' :: Maybe MultipleOperatingModes
multipleOperatingModes = forall a. Maybe a
Prelude.Nothing,
      $sel:sensorName:SensorStatisticsSummary' :: Maybe Text
sensorName = forall a. Maybe a
Prelude.Nothing
    }

-- | Parameter that describes potential risk about whether data associated
-- with the sensor is categorical.
sensorStatisticsSummary_categoricalValues :: Lens.Lens' SensorStatisticsSummary (Prelude.Maybe CategoricalValues)
sensorStatisticsSummary_categoricalValues :: Lens' SensorStatisticsSummary (Maybe CategoricalValues)
sensorStatisticsSummary_categoricalValues = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SensorStatisticsSummary' {Maybe CategoricalValues
categoricalValues :: Maybe CategoricalValues
$sel:categoricalValues:SensorStatisticsSummary' :: SensorStatisticsSummary -> Maybe CategoricalValues
categoricalValues} -> Maybe CategoricalValues
categoricalValues) (\s :: SensorStatisticsSummary
s@SensorStatisticsSummary' {} Maybe CategoricalValues
a -> SensorStatisticsSummary
s {$sel:categoricalValues:SensorStatisticsSummary' :: Maybe CategoricalValues
categoricalValues = Maybe CategoricalValues
a} :: SensorStatisticsSummary)

-- | Name of the component to which the particular sensor belongs for which
-- the statistics belong to.
sensorStatisticsSummary_componentName :: Lens.Lens' SensorStatisticsSummary (Prelude.Maybe Prelude.Text)
sensorStatisticsSummary_componentName :: Lens' SensorStatisticsSummary (Maybe Text)
sensorStatisticsSummary_componentName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SensorStatisticsSummary' {Maybe Text
componentName :: Maybe Text
$sel:componentName:SensorStatisticsSummary' :: SensorStatisticsSummary -> Maybe Text
componentName} -> Maybe Text
componentName) (\s :: SensorStatisticsSummary
s@SensorStatisticsSummary' {} Maybe Text
a -> SensorStatisticsSummary
s {$sel:componentName:SensorStatisticsSummary' :: Maybe Text
componentName = Maybe Text
a} :: SensorStatisticsSummary)

-- | Indicates the time reference to indicate the end of valid data
-- associated with the sensor that the statistics belong to.
sensorStatisticsSummary_dataEndTime :: Lens.Lens' SensorStatisticsSummary (Prelude.Maybe Prelude.UTCTime)
sensorStatisticsSummary_dataEndTime :: Lens' SensorStatisticsSummary (Maybe UTCTime)
sensorStatisticsSummary_dataEndTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SensorStatisticsSummary' {Maybe POSIX
dataEndTime :: Maybe POSIX
$sel:dataEndTime:SensorStatisticsSummary' :: SensorStatisticsSummary -> Maybe POSIX
dataEndTime} -> Maybe POSIX
dataEndTime) (\s :: SensorStatisticsSummary
s@SensorStatisticsSummary' {} Maybe POSIX
a -> SensorStatisticsSummary
s {$sel:dataEndTime:SensorStatisticsSummary' :: Maybe POSIX
dataEndTime = Maybe POSIX
a} :: SensorStatisticsSummary) 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

-- | Parameter that indicates whether data exists for the sensor that the
-- statistics belong to.
sensorStatisticsSummary_dataExists :: Lens.Lens' SensorStatisticsSummary (Prelude.Maybe Prelude.Bool)
sensorStatisticsSummary_dataExists :: Lens' SensorStatisticsSummary (Maybe Bool)
sensorStatisticsSummary_dataExists = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SensorStatisticsSummary' {Maybe Bool
dataExists :: Maybe Bool
$sel:dataExists:SensorStatisticsSummary' :: SensorStatisticsSummary -> Maybe Bool
dataExists} -> Maybe Bool
dataExists) (\s :: SensorStatisticsSummary
s@SensorStatisticsSummary' {} Maybe Bool
a -> SensorStatisticsSummary
s {$sel:dataExists:SensorStatisticsSummary' :: Maybe Bool
dataExists = Maybe Bool
a} :: SensorStatisticsSummary)

-- | Indicates the time reference to indicate the beginning of valid data
-- associated with the sensor that the statistics belong to.
sensorStatisticsSummary_dataStartTime :: Lens.Lens' SensorStatisticsSummary (Prelude.Maybe Prelude.UTCTime)
sensorStatisticsSummary_dataStartTime :: Lens' SensorStatisticsSummary (Maybe UTCTime)
sensorStatisticsSummary_dataStartTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SensorStatisticsSummary' {Maybe POSIX
dataStartTime :: Maybe POSIX
$sel:dataStartTime:SensorStatisticsSummary' :: SensorStatisticsSummary -> Maybe POSIX
dataStartTime} -> Maybe POSIX
dataStartTime) (\s :: SensorStatisticsSummary
s@SensorStatisticsSummary' {} Maybe POSIX
a -> SensorStatisticsSummary
s {$sel:dataStartTime:SensorStatisticsSummary' :: Maybe POSIX
dataStartTime = Maybe POSIX
a} :: SensorStatisticsSummary) 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

-- | Parameter that describes the total number of duplicate timestamp records
-- associated with the sensor that the statistics belong to.
sensorStatisticsSummary_duplicateTimestamps :: Lens.Lens' SensorStatisticsSummary (Prelude.Maybe CountPercent)
sensorStatisticsSummary_duplicateTimestamps :: Lens' SensorStatisticsSummary (Maybe CountPercent)
sensorStatisticsSummary_duplicateTimestamps = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SensorStatisticsSummary' {Maybe CountPercent
duplicateTimestamps :: Maybe CountPercent
$sel:duplicateTimestamps:SensorStatisticsSummary' :: SensorStatisticsSummary -> Maybe CountPercent
duplicateTimestamps} -> Maybe CountPercent
duplicateTimestamps) (\s :: SensorStatisticsSummary
s@SensorStatisticsSummary' {} Maybe CountPercent
a -> SensorStatisticsSummary
s {$sel:duplicateTimestamps:SensorStatisticsSummary' :: Maybe CountPercent
duplicateTimestamps = Maybe CountPercent
a} :: SensorStatisticsSummary)

-- | Parameter that describes the total number of invalid date entries
-- associated with the sensor that the statistics belong to.
sensorStatisticsSummary_invalidDateEntries :: Lens.Lens' SensorStatisticsSummary (Prelude.Maybe CountPercent)
sensorStatisticsSummary_invalidDateEntries :: Lens' SensorStatisticsSummary (Maybe CountPercent)
sensorStatisticsSummary_invalidDateEntries = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SensorStatisticsSummary' {Maybe CountPercent
invalidDateEntries :: Maybe CountPercent
$sel:invalidDateEntries:SensorStatisticsSummary' :: SensorStatisticsSummary -> Maybe CountPercent
invalidDateEntries} -> Maybe CountPercent
invalidDateEntries) (\s :: SensorStatisticsSummary
s@SensorStatisticsSummary' {} Maybe CountPercent
a -> SensorStatisticsSummary
s {$sel:invalidDateEntries:SensorStatisticsSummary' :: Maybe CountPercent
invalidDateEntries = Maybe CountPercent
a} :: SensorStatisticsSummary)

-- | Parameter that describes the total number of, and percentage of, values
-- that are invalid for the sensor that the statistics belong to.
sensorStatisticsSummary_invalidValues :: Lens.Lens' SensorStatisticsSummary (Prelude.Maybe CountPercent)
sensorStatisticsSummary_invalidValues :: Lens' SensorStatisticsSummary (Maybe CountPercent)
sensorStatisticsSummary_invalidValues = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SensorStatisticsSummary' {Maybe CountPercent
invalidValues :: Maybe CountPercent
$sel:invalidValues:SensorStatisticsSummary' :: SensorStatisticsSummary -> Maybe CountPercent
invalidValues} -> Maybe CountPercent
invalidValues) (\s :: SensorStatisticsSummary
s@SensorStatisticsSummary' {} Maybe CountPercent
a -> SensorStatisticsSummary
s {$sel:invalidValues:SensorStatisticsSummary' :: Maybe CountPercent
invalidValues = Maybe CountPercent
a} :: SensorStatisticsSummary)

-- | Parameter that describes potential risk about whether data associated
-- with the sensor contains one or more large gaps between consecutive
-- timestamps.
sensorStatisticsSummary_largeTimestampGaps :: Lens.Lens' SensorStatisticsSummary (Prelude.Maybe LargeTimestampGaps)
sensorStatisticsSummary_largeTimestampGaps :: Lens' SensorStatisticsSummary (Maybe LargeTimestampGaps)
sensorStatisticsSummary_largeTimestampGaps = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SensorStatisticsSummary' {Maybe LargeTimestampGaps
largeTimestampGaps :: Maybe LargeTimestampGaps
$sel:largeTimestampGaps:SensorStatisticsSummary' :: SensorStatisticsSummary -> Maybe LargeTimestampGaps
largeTimestampGaps} -> Maybe LargeTimestampGaps
largeTimestampGaps) (\s :: SensorStatisticsSummary
s@SensorStatisticsSummary' {} Maybe LargeTimestampGaps
a -> SensorStatisticsSummary
s {$sel:largeTimestampGaps:SensorStatisticsSummary' :: Maybe LargeTimestampGaps
largeTimestampGaps = Maybe LargeTimestampGaps
a} :: SensorStatisticsSummary)

-- | Parameter that describes the total number of, and percentage of, values
-- that are missing for the sensor that the statistics belong to.
sensorStatisticsSummary_missingValues :: Lens.Lens' SensorStatisticsSummary (Prelude.Maybe CountPercent)
sensorStatisticsSummary_missingValues :: Lens' SensorStatisticsSummary (Maybe CountPercent)
sensorStatisticsSummary_missingValues = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SensorStatisticsSummary' {Maybe CountPercent
missingValues :: Maybe CountPercent
$sel:missingValues:SensorStatisticsSummary' :: SensorStatisticsSummary -> Maybe CountPercent
missingValues} -> Maybe CountPercent
missingValues) (\s :: SensorStatisticsSummary
s@SensorStatisticsSummary' {} Maybe CountPercent
a -> SensorStatisticsSummary
s {$sel:missingValues:SensorStatisticsSummary' :: Maybe CountPercent
missingValues = Maybe CountPercent
a} :: SensorStatisticsSummary)

-- | Parameter that describes potential risk about whether data associated
-- with the sensor is mostly monotonic.
sensorStatisticsSummary_monotonicValues :: Lens.Lens' SensorStatisticsSummary (Prelude.Maybe MonotonicValues)
sensorStatisticsSummary_monotonicValues :: Lens' SensorStatisticsSummary (Maybe MonotonicValues)
sensorStatisticsSummary_monotonicValues = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SensorStatisticsSummary' {Maybe MonotonicValues
monotonicValues :: Maybe MonotonicValues
$sel:monotonicValues:SensorStatisticsSummary' :: SensorStatisticsSummary -> Maybe MonotonicValues
monotonicValues} -> Maybe MonotonicValues
monotonicValues) (\s :: SensorStatisticsSummary
s@SensorStatisticsSummary' {} Maybe MonotonicValues
a -> SensorStatisticsSummary
s {$sel:monotonicValues:SensorStatisticsSummary' :: Maybe MonotonicValues
monotonicValues = Maybe MonotonicValues
a} :: SensorStatisticsSummary)

-- | Parameter that describes potential risk about whether data associated
-- with the sensor has more than one operating mode.
sensorStatisticsSummary_multipleOperatingModes :: Lens.Lens' SensorStatisticsSummary (Prelude.Maybe MultipleOperatingModes)
sensorStatisticsSummary_multipleOperatingModes :: Lens' SensorStatisticsSummary (Maybe MultipleOperatingModes)
sensorStatisticsSummary_multipleOperatingModes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SensorStatisticsSummary' {Maybe MultipleOperatingModes
multipleOperatingModes :: Maybe MultipleOperatingModes
$sel:multipleOperatingModes:SensorStatisticsSummary' :: SensorStatisticsSummary -> Maybe MultipleOperatingModes
multipleOperatingModes} -> Maybe MultipleOperatingModes
multipleOperatingModes) (\s :: SensorStatisticsSummary
s@SensorStatisticsSummary' {} Maybe MultipleOperatingModes
a -> SensorStatisticsSummary
s {$sel:multipleOperatingModes:SensorStatisticsSummary' :: Maybe MultipleOperatingModes
multipleOperatingModes = Maybe MultipleOperatingModes
a} :: SensorStatisticsSummary)

-- | Name of the sensor that the statistics belong to.
sensorStatisticsSummary_sensorName :: Lens.Lens' SensorStatisticsSummary (Prelude.Maybe Prelude.Text)
sensorStatisticsSummary_sensorName :: Lens' SensorStatisticsSummary (Maybe Text)
sensorStatisticsSummary_sensorName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SensorStatisticsSummary' {Maybe Text
sensorName :: Maybe Text
$sel:sensorName:SensorStatisticsSummary' :: SensorStatisticsSummary -> Maybe Text
sensorName} -> Maybe Text
sensorName) (\s :: SensorStatisticsSummary
s@SensorStatisticsSummary' {} Maybe Text
a -> SensorStatisticsSummary
s {$sel:sensorName:SensorStatisticsSummary' :: Maybe Text
sensorName = Maybe Text
a} :: SensorStatisticsSummary)

instance Data.FromJSON SensorStatisticsSummary where
  parseJSON :: Value -> Parser SensorStatisticsSummary
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"SensorStatisticsSummary"
      ( \Object
x ->
          Maybe CategoricalValues
-> Maybe Text
-> Maybe POSIX
-> Maybe Bool
-> Maybe POSIX
-> Maybe CountPercent
-> Maybe CountPercent
-> Maybe CountPercent
-> Maybe LargeTimestampGaps
-> Maybe CountPercent
-> Maybe MonotonicValues
-> Maybe MultipleOperatingModes
-> Maybe Text
-> SensorStatisticsSummary
SensorStatisticsSummary'
            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
"CategoricalValues")
            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
"ComponentName")
            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
"DataEndTime")
            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
"DataExists")
            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
"DataStartTime")
            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
"DuplicateTimestamps")
            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
"InvalidDateEntries")
            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
"InvalidValues")
            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
"LargeTimestampGaps")
            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
"MissingValues")
            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
"MonotonicValues")
            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
"MultipleOperatingModes")
            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
"SensorName")
      )

instance Prelude.Hashable SensorStatisticsSummary where
  hashWithSalt :: Int -> SensorStatisticsSummary -> Int
hashWithSalt Int
_salt SensorStatisticsSummary' {Maybe Bool
Maybe Text
Maybe POSIX
Maybe CountPercent
Maybe MultipleOperatingModes
Maybe MonotonicValues
Maybe LargeTimestampGaps
Maybe CategoricalValues
sensorName :: Maybe Text
multipleOperatingModes :: Maybe MultipleOperatingModes
monotonicValues :: Maybe MonotonicValues
missingValues :: Maybe CountPercent
largeTimestampGaps :: Maybe LargeTimestampGaps
invalidValues :: Maybe CountPercent
invalidDateEntries :: Maybe CountPercent
duplicateTimestamps :: Maybe CountPercent
dataStartTime :: Maybe POSIX
dataExists :: Maybe Bool
dataEndTime :: Maybe POSIX
componentName :: Maybe Text
categoricalValues :: Maybe CategoricalValues
$sel:sensorName:SensorStatisticsSummary' :: SensorStatisticsSummary -> Maybe Text
$sel:multipleOperatingModes:SensorStatisticsSummary' :: SensorStatisticsSummary -> Maybe MultipleOperatingModes
$sel:monotonicValues:SensorStatisticsSummary' :: SensorStatisticsSummary -> Maybe MonotonicValues
$sel:missingValues:SensorStatisticsSummary' :: SensorStatisticsSummary -> Maybe CountPercent
$sel:largeTimestampGaps:SensorStatisticsSummary' :: SensorStatisticsSummary -> Maybe LargeTimestampGaps
$sel:invalidValues:SensorStatisticsSummary' :: SensorStatisticsSummary -> Maybe CountPercent
$sel:invalidDateEntries:SensorStatisticsSummary' :: SensorStatisticsSummary -> Maybe CountPercent
$sel:duplicateTimestamps:SensorStatisticsSummary' :: SensorStatisticsSummary -> Maybe CountPercent
$sel:dataStartTime:SensorStatisticsSummary' :: SensorStatisticsSummary -> Maybe POSIX
$sel:dataExists:SensorStatisticsSummary' :: SensorStatisticsSummary -> Maybe Bool
$sel:dataEndTime:SensorStatisticsSummary' :: SensorStatisticsSummary -> Maybe POSIX
$sel:componentName:SensorStatisticsSummary' :: SensorStatisticsSummary -> Maybe Text
$sel:categoricalValues:SensorStatisticsSummary' :: SensorStatisticsSummary -> Maybe CategoricalValues
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CategoricalValues
categoricalValues
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
componentName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
dataEndTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
dataExists
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
dataStartTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CountPercent
duplicateTimestamps
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CountPercent
invalidDateEntries
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CountPercent
invalidValues
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe LargeTimestampGaps
largeTimestampGaps
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CountPercent
missingValues
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe MonotonicValues
monotonicValues
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe MultipleOperatingModes
multipleOperatingModes
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
sensorName

instance Prelude.NFData SensorStatisticsSummary where
  rnf :: SensorStatisticsSummary -> ()
rnf SensorStatisticsSummary' {Maybe Bool
Maybe Text
Maybe POSIX
Maybe CountPercent
Maybe MultipleOperatingModes
Maybe MonotonicValues
Maybe LargeTimestampGaps
Maybe CategoricalValues
sensorName :: Maybe Text
multipleOperatingModes :: Maybe MultipleOperatingModes
monotonicValues :: Maybe MonotonicValues
missingValues :: Maybe CountPercent
largeTimestampGaps :: Maybe LargeTimestampGaps
invalidValues :: Maybe CountPercent
invalidDateEntries :: Maybe CountPercent
duplicateTimestamps :: Maybe CountPercent
dataStartTime :: Maybe POSIX
dataExists :: Maybe Bool
dataEndTime :: Maybe POSIX
componentName :: Maybe Text
categoricalValues :: Maybe CategoricalValues
$sel:sensorName:SensorStatisticsSummary' :: SensorStatisticsSummary -> Maybe Text
$sel:multipleOperatingModes:SensorStatisticsSummary' :: SensorStatisticsSummary -> Maybe MultipleOperatingModes
$sel:monotonicValues:SensorStatisticsSummary' :: SensorStatisticsSummary -> Maybe MonotonicValues
$sel:missingValues:SensorStatisticsSummary' :: SensorStatisticsSummary -> Maybe CountPercent
$sel:largeTimestampGaps:SensorStatisticsSummary' :: SensorStatisticsSummary -> Maybe LargeTimestampGaps
$sel:invalidValues:SensorStatisticsSummary' :: SensorStatisticsSummary -> Maybe CountPercent
$sel:invalidDateEntries:SensorStatisticsSummary' :: SensorStatisticsSummary -> Maybe CountPercent
$sel:duplicateTimestamps:SensorStatisticsSummary' :: SensorStatisticsSummary -> Maybe CountPercent
$sel:dataStartTime:SensorStatisticsSummary' :: SensorStatisticsSummary -> Maybe POSIX
$sel:dataExists:SensorStatisticsSummary' :: SensorStatisticsSummary -> Maybe Bool
$sel:dataEndTime:SensorStatisticsSummary' :: SensorStatisticsSummary -> Maybe POSIX
$sel:componentName:SensorStatisticsSummary' :: SensorStatisticsSummary -> Maybe Text
$sel:categoricalValues:SensorStatisticsSummary' :: SensorStatisticsSummary -> Maybe CategoricalValues
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe CategoricalValues
categoricalValues
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
componentName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
dataEndTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
dataExists
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
dataStartTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe CountPercent
duplicateTimestamps
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe CountPercent
invalidDateEntries
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe CountPercent
invalidValues
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe LargeTimestampGaps
largeTimestampGaps
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe CountPercent
missingValues
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe MonotonicValues
monotonicValues
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe MultipleOperatingModes
multipleOperatingModes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
sensorName