{-# 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.LookoutMetrics.Types.AnomalyDetectorConfig -- 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.LookoutMetrics.Types.AnomalyDetectorConfig where import qualified Amazonka.Core as Core import qualified Amazonka.Core.Lens.Internal as Lens import qualified Amazonka.Data as Data import Amazonka.LookoutMetrics.Types.Frequency import qualified Amazonka.Prelude as Prelude -- | Contains information about a detector\'s configuration. -- -- /See:/ 'newAnomalyDetectorConfig' smart constructor. data AnomalyDetectorConfig = AnomalyDetectorConfig' { -- | The frequency at which the detector analyzes its source data. anomalyDetectorFrequency :: Prelude.Maybe Frequency } deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic) -- | -- Create a value of 'AnomalyDetectorConfig' with all optional fields omitted. -- -- Use or to modify other optional fields. -- -- The following record fields are available, with the corresponding lenses provided -- for backwards compatibility: -- -- 'anomalyDetectorFrequency', 'anomalyDetectorConfig_anomalyDetectorFrequency' - The frequency at which the detector analyzes its source data. newAnomalyDetectorConfig :: AnomalyDetectorConfig newAnomalyDetectorConfig = AnomalyDetectorConfig' { anomalyDetectorFrequency = Prelude.Nothing } -- | The frequency at which the detector analyzes its source data. anomalyDetectorConfig_anomalyDetectorFrequency :: Lens.Lens' AnomalyDetectorConfig (Prelude.Maybe Frequency) anomalyDetectorConfig_anomalyDetectorFrequency = Lens.lens (\AnomalyDetectorConfig' {anomalyDetectorFrequency} -> anomalyDetectorFrequency) (\s@AnomalyDetectorConfig' {} a -> s {anomalyDetectorFrequency = a} :: AnomalyDetectorConfig) instance Prelude.Hashable AnomalyDetectorConfig where hashWithSalt _salt AnomalyDetectorConfig' {..} = _salt `Prelude.hashWithSalt` anomalyDetectorFrequency instance Prelude.NFData AnomalyDetectorConfig where rnf AnomalyDetectorConfig' {..} = Prelude.rnf anomalyDetectorFrequency instance Data.ToJSON AnomalyDetectorConfig where toJSON AnomalyDetectorConfig' {..} = Data.object ( Prelude.catMaybes [ ("AnomalyDetectorFrequency" Data..=) Prelude.<$> anomalyDetectorFrequency ] )