{-# 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.AutoScaling.Types.CapacityForecast -- 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.AutoScaling.Types.CapacityForecast where import qualified Amazonka.Core as Core import qualified Amazonka.Core.Lens.Internal as Lens import qualified Amazonka.Data as Data import qualified Amazonka.Prelude as Prelude -- | A @GetPredictiveScalingForecast@ call returns the capacity forecast for -- a predictive scaling policy. This structure includes the data points for -- that capacity forecast, along with the timestamps of those data points. -- -- /See:/ 'newCapacityForecast' smart constructor. data CapacityForecast = CapacityForecast' { -- | The timestamps for the data points, in UTC format. timestamps :: [Data.ISO8601], -- | The values of the data points. values :: [Prelude.Double] } deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic) -- | -- Create a value of 'CapacityForecast' 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: -- -- 'timestamps', 'capacityForecast_timestamps' - The timestamps for the data points, in UTC format. -- -- 'values', 'capacityForecast_values' - The values of the data points. newCapacityForecast :: CapacityForecast newCapacityForecast = CapacityForecast' { timestamps = Prelude.mempty, values = Prelude.mempty } -- | The timestamps for the data points, in UTC format. capacityForecast_timestamps :: Lens.Lens' CapacityForecast [Prelude.UTCTime] capacityForecast_timestamps = Lens.lens (\CapacityForecast' {timestamps} -> timestamps) (\s@CapacityForecast' {} a -> s {timestamps = a} :: CapacityForecast) Prelude.. Lens.coerced -- | The values of the data points. capacityForecast_values :: Lens.Lens' CapacityForecast [Prelude.Double] capacityForecast_values = Lens.lens (\CapacityForecast' {values} -> values) (\s@CapacityForecast' {} a -> s {values = a} :: CapacityForecast) Prelude.. Lens.coerced instance Data.FromXML CapacityForecast where parseXML x = CapacityForecast' Prelude.<$> ( x Data..@? "Timestamps" Core..!@ Prelude.mempty Prelude.>>= Data.parseXMLList "member" ) Prelude.<*> ( x Data..@? "Values" Core..!@ Prelude.mempty Prelude.>>= Data.parseXMLList "member" ) instance Prelude.Hashable CapacityForecast where hashWithSalt _salt CapacityForecast' {..} = _salt `Prelude.hashWithSalt` timestamps `Prelude.hashWithSalt` values instance Prelude.NFData CapacityForecast where rnf CapacityForecast' {..} = Prelude.rnf timestamps `Prelude.seq` Prelude.rnf values