{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

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

-- |
-- Module      : Amazonka.IoTSiteWise.GetAssetPropertyAggregates
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Gets aggregated values for an asset property. For more information, see
-- <https://docs.aws.amazon.com/iot-sitewise/latest/userguide/query-industrial-data.html#aggregates Querying aggregates>
-- in the /IoT SiteWise User Guide/.
--
-- To identify an asset property, you must specify one of the following:
--
-- -   The @assetId@ and @propertyId@ of an asset property.
--
-- -   A @propertyAlias@, which is a data stream alias (for example,
--     @\/company\/windfarm\/3\/turbine\/7\/temperature@). To define an
--     asset property\'s alias, see
--     <https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_UpdateAssetProperty.html UpdateAssetProperty>.
--
-- This operation returns paginated results.
module Amazonka.IoTSiteWise.GetAssetPropertyAggregates
  ( -- * Creating a Request
    GetAssetPropertyAggregates (..),
    newGetAssetPropertyAggregates,

    -- * Request Lenses
    getAssetPropertyAggregates_assetId,
    getAssetPropertyAggregates_maxResults,
    getAssetPropertyAggregates_nextToken,
    getAssetPropertyAggregates_propertyAlias,
    getAssetPropertyAggregates_propertyId,
    getAssetPropertyAggregates_qualities,
    getAssetPropertyAggregates_timeOrdering,
    getAssetPropertyAggregates_aggregateTypes,
    getAssetPropertyAggregates_resolution,
    getAssetPropertyAggregates_startDate,
    getAssetPropertyAggregates_endDate,

    -- * Destructuring the Response
    GetAssetPropertyAggregatesResponse (..),
    newGetAssetPropertyAggregatesResponse,

    -- * Response Lenses
    getAssetPropertyAggregatesResponse_nextToken,
    getAssetPropertyAggregatesResponse_httpStatus,
    getAssetPropertyAggregatesResponse_aggregatedValues,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.IoTSiteWise.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newGetAssetPropertyAggregates' smart constructor.
data GetAssetPropertyAggregates = GetAssetPropertyAggregates'
  { -- | The ID of the asset.
    GetAssetPropertyAggregates -> Maybe Text
assetId :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results to return for each paginated request.
    --
    -- Default: 100
    GetAssetPropertyAggregates -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The token to be used for the next set of paginated results.
    GetAssetPropertyAggregates -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The alias that identifies the property, such as an OPC-UA server data
    -- stream path (for example,
    -- @\/company\/windfarm\/3\/turbine\/7\/temperature@). For more
    -- information, see
    -- <https://docs.aws.amazon.com/iot-sitewise/latest/userguide/connect-data-streams.html Mapping industrial data streams to asset properties>
    -- in the /IoT SiteWise User Guide/.
    GetAssetPropertyAggregates -> Maybe Text
propertyAlias :: Prelude.Maybe Prelude.Text,
    -- | The ID of the asset property.
    GetAssetPropertyAggregates -> Maybe Text
propertyId :: Prelude.Maybe Prelude.Text,
    -- | The quality by which to filter asset data.
    GetAssetPropertyAggregates -> Maybe (NonEmpty Quality)
qualities :: Prelude.Maybe (Prelude.NonEmpty Quality),
    -- | The chronological sorting order of the requested information.
    --
    -- Default: @ASCENDING@
    GetAssetPropertyAggregates -> Maybe TimeOrdering
timeOrdering :: Prelude.Maybe TimeOrdering,
    -- | The data aggregating function.
    GetAssetPropertyAggregates -> NonEmpty AggregateType
aggregateTypes :: Prelude.NonEmpty AggregateType,
    -- | The time interval over which to aggregate data.
    GetAssetPropertyAggregates -> Text
resolution :: Prelude.Text,
    -- | The exclusive start of the range from which to query historical data,
    -- expressed in seconds in Unix epoch time.
    GetAssetPropertyAggregates -> POSIX
startDate :: Data.POSIX,
    -- | The inclusive end of the range from which to query historical data,
    -- expressed in seconds in Unix epoch time.
    GetAssetPropertyAggregates -> POSIX
endDate :: Data.POSIX
  }
  deriving (GetAssetPropertyAggregates -> GetAssetPropertyAggregates -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetAssetPropertyAggregates -> GetAssetPropertyAggregates -> Bool
$c/= :: GetAssetPropertyAggregates -> GetAssetPropertyAggregates -> Bool
== :: GetAssetPropertyAggregates -> GetAssetPropertyAggregates -> Bool
$c== :: GetAssetPropertyAggregates -> GetAssetPropertyAggregates -> Bool
Prelude.Eq, ReadPrec [GetAssetPropertyAggregates]
ReadPrec GetAssetPropertyAggregates
Int -> ReadS GetAssetPropertyAggregates
ReadS [GetAssetPropertyAggregates]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetAssetPropertyAggregates]
$creadListPrec :: ReadPrec [GetAssetPropertyAggregates]
readPrec :: ReadPrec GetAssetPropertyAggregates
$creadPrec :: ReadPrec GetAssetPropertyAggregates
readList :: ReadS [GetAssetPropertyAggregates]
$creadList :: ReadS [GetAssetPropertyAggregates]
readsPrec :: Int -> ReadS GetAssetPropertyAggregates
$creadsPrec :: Int -> ReadS GetAssetPropertyAggregates
Prelude.Read, Int -> GetAssetPropertyAggregates -> ShowS
[GetAssetPropertyAggregates] -> ShowS
GetAssetPropertyAggregates -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetAssetPropertyAggregates] -> ShowS
$cshowList :: [GetAssetPropertyAggregates] -> ShowS
show :: GetAssetPropertyAggregates -> String
$cshow :: GetAssetPropertyAggregates -> String
showsPrec :: Int -> GetAssetPropertyAggregates -> ShowS
$cshowsPrec :: Int -> GetAssetPropertyAggregates -> ShowS
Prelude.Show, forall x.
Rep GetAssetPropertyAggregates x -> GetAssetPropertyAggregates
forall x.
GetAssetPropertyAggregates -> Rep GetAssetPropertyAggregates x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetAssetPropertyAggregates x -> GetAssetPropertyAggregates
$cfrom :: forall x.
GetAssetPropertyAggregates -> Rep GetAssetPropertyAggregates x
Prelude.Generic)

-- |
-- Create a value of 'GetAssetPropertyAggregates' 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:
--
-- 'assetId', 'getAssetPropertyAggregates_assetId' - The ID of the asset.
--
-- 'maxResults', 'getAssetPropertyAggregates_maxResults' - The maximum number of results to return for each paginated request.
--
-- Default: 100
--
-- 'nextToken', 'getAssetPropertyAggregates_nextToken' - The token to be used for the next set of paginated results.
--
-- 'propertyAlias', 'getAssetPropertyAggregates_propertyAlias' - The alias that identifies the property, such as an OPC-UA server data
-- stream path (for example,
-- @\/company\/windfarm\/3\/turbine\/7\/temperature@). For more
-- information, see
-- <https://docs.aws.amazon.com/iot-sitewise/latest/userguide/connect-data-streams.html Mapping industrial data streams to asset properties>
-- in the /IoT SiteWise User Guide/.
--
-- 'propertyId', 'getAssetPropertyAggregates_propertyId' - The ID of the asset property.
--
-- 'qualities', 'getAssetPropertyAggregates_qualities' - The quality by which to filter asset data.
--
-- 'timeOrdering', 'getAssetPropertyAggregates_timeOrdering' - The chronological sorting order of the requested information.
--
-- Default: @ASCENDING@
--
-- 'aggregateTypes', 'getAssetPropertyAggregates_aggregateTypes' - The data aggregating function.
--
-- 'resolution', 'getAssetPropertyAggregates_resolution' - The time interval over which to aggregate data.
--
-- 'startDate', 'getAssetPropertyAggregates_startDate' - The exclusive start of the range from which to query historical data,
-- expressed in seconds in Unix epoch time.
--
-- 'endDate', 'getAssetPropertyAggregates_endDate' - The inclusive end of the range from which to query historical data,
-- expressed in seconds in Unix epoch time.
newGetAssetPropertyAggregates ::
  -- | 'aggregateTypes'
  Prelude.NonEmpty AggregateType ->
  -- | 'resolution'
  Prelude.Text ->
  -- | 'startDate'
  Prelude.UTCTime ->
  -- | 'endDate'
  Prelude.UTCTime ->
  GetAssetPropertyAggregates
newGetAssetPropertyAggregates :: NonEmpty AggregateType
-> Text -> UTCTime -> UTCTime -> GetAssetPropertyAggregates
newGetAssetPropertyAggregates
  NonEmpty AggregateType
pAggregateTypes_
  Text
pResolution_
  UTCTime
pStartDate_
  UTCTime
pEndDate_ =
    GetAssetPropertyAggregates'
      { $sel:assetId:GetAssetPropertyAggregates' :: Maybe Text
assetId =
          forall a. Maybe a
Prelude.Nothing,
        $sel:maxResults:GetAssetPropertyAggregates' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
        $sel:nextToken:GetAssetPropertyAggregates' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
        $sel:propertyAlias:GetAssetPropertyAggregates' :: Maybe Text
propertyAlias = forall a. Maybe a
Prelude.Nothing,
        $sel:propertyId:GetAssetPropertyAggregates' :: Maybe Text
propertyId = forall a. Maybe a
Prelude.Nothing,
        $sel:qualities:GetAssetPropertyAggregates' :: Maybe (NonEmpty Quality)
qualities = forall a. Maybe a
Prelude.Nothing,
        $sel:timeOrdering:GetAssetPropertyAggregates' :: Maybe TimeOrdering
timeOrdering = forall a. Maybe a
Prelude.Nothing,
        $sel:aggregateTypes:GetAssetPropertyAggregates' :: NonEmpty AggregateType
aggregateTypes =
          forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced forall t b. AReview t b -> b -> t
Lens.# NonEmpty AggregateType
pAggregateTypes_,
        $sel:resolution:GetAssetPropertyAggregates' :: Text
resolution = Text
pResolution_,
        $sel:startDate:GetAssetPropertyAggregates' :: POSIX
startDate = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pStartDate_,
        $sel:endDate:GetAssetPropertyAggregates' :: POSIX
endDate = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pEndDate_
      }

-- | The ID of the asset.
getAssetPropertyAggregates_assetId :: Lens.Lens' GetAssetPropertyAggregates (Prelude.Maybe Prelude.Text)
getAssetPropertyAggregates_assetId :: Lens' GetAssetPropertyAggregates (Maybe Text)
getAssetPropertyAggregates_assetId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAssetPropertyAggregates' {Maybe Text
assetId :: Maybe Text
$sel:assetId:GetAssetPropertyAggregates' :: GetAssetPropertyAggregates -> Maybe Text
assetId} -> Maybe Text
assetId) (\s :: GetAssetPropertyAggregates
s@GetAssetPropertyAggregates' {} Maybe Text
a -> GetAssetPropertyAggregates
s {$sel:assetId:GetAssetPropertyAggregates' :: Maybe Text
assetId = Maybe Text
a} :: GetAssetPropertyAggregates)

-- | The maximum number of results to return for each paginated request.
--
-- Default: 100
getAssetPropertyAggregates_maxResults :: Lens.Lens' GetAssetPropertyAggregates (Prelude.Maybe Prelude.Natural)
getAssetPropertyAggregates_maxResults :: Lens' GetAssetPropertyAggregates (Maybe Natural)
getAssetPropertyAggregates_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAssetPropertyAggregates' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:GetAssetPropertyAggregates' :: GetAssetPropertyAggregates -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: GetAssetPropertyAggregates
s@GetAssetPropertyAggregates' {} Maybe Natural
a -> GetAssetPropertyAggregates
s {$sel:maxResults:GetAssetPropertyAggregates' :: Maybe Natural
maxResults = Maybe Natural
a} :: GetAssetPropertyAggregates)

-- | The token to be used for the next set of paginated results.
getAssetPropertyAggregates_nextToken :: Lens.Lens' GetAssetPropertyAggregates (Prelude.Maybe Prelude.Text)
getAssetPropertyAggregates_nextToken :: Lens' GetAssetPropertyAggregates (Maybe Text)
getAssetPropertyAggregates_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAssetPropertyAggregates' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetAssetPropertyAggregates' :: GetAssetPropertyAggregates -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetAssetPropertyAggregates
s@GetAssetPropertyAggregates' {} Maybe Text
a -> GetAssetPropertyAggregates
s {$sel:nextToken:GetAssetPropertyAggregates' :: Maybe Text
nextToken = Maybe Text
a} :: GetAssetPropertyAggregates)

-- | The alias that identifies the property, such as an OPC-UA server data
-- stream path (for example,
-- @\/company\/windfarm\/3\/turbine\/7\/temperature@). For more
-- information, see
-- <https://docs.aws.amazon.com/iot-sitewise/latest/userguide/connect-data-streams.html Mapping industrial data streams to asset properties>
-- in the /IoT SiteWise User Guide/.
getAssetPropertyAggregates_propertyAlias :: Lens.Lens' GetAssetPropertyAggregates (Prelude.Maybe Prelude.Text)
getAssetPropertyAggregates_propertyAlias :: Lens' GetAssetPropertyAggregates (Maybe Text)
getAssetPropertyAggregates_propertyAlias = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAssetPropertyAggregates' {Maybe Text
propertyAlias :: Maybe Text
$sel:propertyAlias:GetAssetPropertyAggregates' :: GetAssetPropertyAggregates -> Maybe Text
propertyAlias} -> Maybe Text
propertyAlias) (\s :: GetAssetPropertyAggregates
s@GetAssetPropertyAggregates' {} Maybe Text
a -> GetAssetPropertyAggregates
s {$sel:propertyAlias:GetAssetPropertyAggregates' :: Maybe Text
propertyAlias = Maybe Text
a} :: GetAssetPropertyAggregates)

-- | The ID of the asset property.
getAssetPropertyAggregates_propertyId :: Lens.Lens' GetAssetPropertyAggregates (Prelude.Maybe Prelude.Text)
getAssetPropertyAggregates_propertyId :: Lens' GetAssetPropertyAggregates (Maybe Text)
getAssetPropertyAggregates_propertyId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAssetPropertyAggregates' {Maybe Text
propertyId :: Maybe Text
$sel:propertyId:GetAssetPropertyAggregates' :: GetAssetPropertyAggregates -> Maybe Text
propertyId} -> Maybe Text
propertyId) (\s :: GetAssetPropertyAggregates
s@GetAssetPropertyAggregates' {} Maybe Text
a -> GetAssetPropertyAggregates
s {$sel:propertyId:GetAssetPropertyAggregates' :: Maybe Text
propertyId = Maybe Text
a} :: GetAssetPropertyAggregates)

-- | The quality by which to filter asset data.
getAssetPropertyAggregates_qualities :: Lens.Lens' GetAssetPropertyAggregates (Prelude.Maybe (Prelude.NonEmpty Quality))
getAssetPropertyAggregates_qualities :: Lens' GetAssetPropertyAggregates (Maybe (NonEmpty Quality))
getAssetPropertyAggregates_qualities = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAssetPropertyAggregates' {Maybe (NonEmpty Quality)
qualities :: Maybe (NonEmpty Quality)
$sel:qualities:GetAssetPropertyAggregates' :: GetAssetPropertyAggregates -> Maybe (NonEmpty Quality)
qualities} -> Maybe (NonEmpty Quality)
qualities) (\s :: GetAssetPropertyAggregates
s@GetAssetPropertyAggregates' {} Maybe (NonEmpty Quality)
a -> GetAssetPropertyAggregates
s {$sel:qualities:GetAssetPropertyAggregates' :: Maybe (NonEmpty Quality)
qualities = Maybe (NonEmpty Quality)
a} :: GetAssetPropertyAggregates) 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 s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The chronological sorting order of the requested information.
--
-- Default: @ASCENDING@
getAssetPropertyAggregates_timeOrdering :: Lens.Lens' GetAssetPropertyAggregates (Prelude.Maybe TimeOrdering)
getAssetPropertyAggregates_timeOrdering :: Lens' GetAssetPropertyAggregates (Maybe TimeOrdering)
getAssetPropertyAggregates_timeOrdering = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAssetPropertyAggregates' {Maybe TimeOrdering
timeOrdering :: Maybe TimeOrdering
$sel:timeOrdering:GetAssetPropertyAggregates' :: GetAssetPropertyAggregates -> Maybe TimeOrdering
timeOrdering} -> Maybe TimeOrdering
timeOrdering) (\s :: GetAssetPropertyAggregates
s@GetAssetPropertyAggregates' {} Maybe TimeOrdering
a -> GetAssetPropertyAggregates
s {$sel:timeOrdering:GetAssetPropertyAggregates' :: Maybe TimeOrdering
timeOrdering = Maybe TimeOrdering
a} :: GetAssetPropertyAggregates)

-- | The data aggregating function.
getAssetPropertyAggregates_aggregateTypes :: Lens.Lens' GetAssetPropertyAggregates (Prelude.NonEmpty AggregateType)
getAssetPropertyAggregates_aggregateTypes :: Lens' GetAssetPropertyAggregates (NonEmpty AggregateType)
getAssetPropertyAggregates_aggregateTypes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAssetPropertyAggregates' {NonEmpty AggregateType
aggregateTypes :: NonEmpty AggregateType
$sel:aggregateTypes:GetAssetPropertyAggregates' :: GetAssetPropertyAggregates -> NonEmpty AggregateType
aggregateTypes} -> NonEmpty AggregateType
aggregateTypes) (\s :: GetAssetPropertyAggregates
s@GetAssetPropertyAggregates' {} NonEmpty AggregateType
a -> GetAssetPropertyAggregates
s {$sel:aggregateTypes:GetAssetPropertyAggregates' :: NonEmpty AggregateType
aggregateTypes = NonEmpty AggregateType
a} :: GetAssetPropertyAggregates) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The time interval over which to aggregate data.
getAssetPropertyAggregates_resolution :: Lens.Lens' GetAssetPropertyAggregates Prelude.Text
getAssetPropertyAggregates_resolution :: Lens' GetAssetPropertyAggregates Text
getAssetPropertyAggregates_resolution = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAssetPropertyAggregates' {Text
resolution :: Text
$sel:resolution:GetAssetPropertyAggregates' :: GetAssetPropertyAggregates -> Text
resolution} -> Text
resolution) (\s :: GetAssetPropertyAggregates
s@GetAssetPropertyAggregates' {} Text
a -> GetAssetPropertyAggregates
s {$sel:resolution:GetAssetPropertyAggregates' :: Text
resolution = Text
a} :: GetAssetPropertyAggregates)

-- | The exclusive start of the range from which to query historical data,
-- expressed in seconds in Unix epoch time.
getAssetPropertyAggregates_startDate :: Lens.Lens' GetAssetPropertyAggregates Prelude.UTCTime
getAssetPropertyAggregates_startDate :: Lens' GetAssetPropertyAggregates UTCTime
getAssetPropertyAggregates_startDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAssetPropertyAggregates' {POSIX
startDate :: POSIX
$sel:startDate:GetAssetPropertyAggregates' :: GetAssetPropertyAggregates -> POSIX
startDate} -> POSIX
startDate) (\s :: GetAssetPropertyAggregates
s@GetAssetPropertyAggregates' {} POSIX
a -> GetAssetPropertyAggregates
s {$sel:startDate:GetAssetPropertyAggregates' :: POSIX
startDate = POSIX
a} :: GetAssetPropertyAggregates) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The inclusive end of the range from which to query historical data,
-- expressed in seconds in Unix epoch time.
getAssetPropertyAggregates_endDate :: Lens.Lens' GetAssetPropertyAggregates Prelude.UTCTime
getAssetPropertyAggregates_endDate :: Lens' GetAssetPropertyAggregates UTCTime
getAssetPropertyAggregates_endDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAssetPropertyAggregates' {POSIX
endDate :: POSIX
$sel:endDate:GetAssetPropertyAggregates' :: GetAssetPropertyAggregates -> POSIX
endDate} -> POSIX
endDate) (\s :: GetAssetPropertyAggregates
s@GetAssetPropertyAggregates' {} POSIX
a -> GetAssetPropertyAggregates
s {$sel:endDate:GetAssetPropertyAggregates' :: POSIX
endDate = POSIX
a} :: GetAssetPropertyAggregates) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

instance Core.AWSPager GetAssetPropertyAggregates where
  page :: GetAssetPropertyAggregates
-> AWSResponse GetAssetPropertyAggregates
-> Maybe GetAssetPropertyAggregates
page GetAssetPropertyAggregates
rq AWSResponse GetAssetPropertyAggregates
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse GetAssetPropertyAggregates
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' GetAssetPropertyAggregatesResponse (Maybe Text)
getAssetPropertyAggregatesResponse_nextToken
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse GetAssetPropertyAggregates
rs
            forall s a. s -> Getting a s a -> a
Lens.^. Lens' GetAssetPropertyAggregatesResponse [AggregatedValue]
getAssetPropertyAggregatesResponse_aggregatedValues
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ GetAssetPropertyAggregates
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' GetAssetPropertyAggregates (Maybe Text)
getAssetPropertyAggregates_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse GetAssetPropertyAggregates
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' GetAssetPropertyAggregatesResponse (Maybe Text)
getAssetPropertyAggregatesResponse_nextToken
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest GetAssetPropertyAggregates where
  type
    AWSResponse GetAssetPropertyAggregates =
      GetAssetPropertyAggregatesResponse
  request :: (Service -> Service)
-> GetAssetPropertyAggregates -> Request GetAssetPropertyAggregates
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy GetAssetPropertyAggregates
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetAssetPropertyAggregates)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Int -> [AggregatedValue] -> GetAssetPropertyAggregatesResponse
GetAssetPropertyAggregatesResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"nextToken")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"aggregatedValues"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                        )
      )

instance Prelude.Hashable GetAssetPropertyAggregates where
  hashWithSalt :: Int -> GetAssetPropertyAggregates -> Int
hashWithSalt Int
_salt GetAssetPropertyAggregates' {Maybe Natural
Maybe (NonEmpty Quality)
Maybe Text
Maybe TimeOrdering
NonEmpty AggregateType
Text
POSIX
endDate :: POSIX
startDate :: POSIX
resolution :: Text
aggregateTypes :: NonEmpty AggregateType
timeOrdering :: Maybe TimeOrdering
qualities :: Maybe (NonEmpty Quality)
propertyId :: Maybe Text
propertyAlias :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
assetId :: Maybe Text
$sel:endDate:GetAssetPropertyAggregates' :: GetAssetPropertyAggregates -> POSIX
$sel:startDate:GetAssetPropertyAggregates' :: GetAssetPropertyAggregates -> POSIX
$sel:resolution:GetAssetPropertyAggregates' :: GetAssetPropertyAggregates -> Text
$sel:aggregateTypes:GetAssetPropertyAggregates' :: GetAssetPropertyAggregates -> NonEmpty AggregateType
$sel:timeOrdering:GetAssetPropertyAggregates' :: GetAssetPropertyAggregates -> Maybe TimeOrdering
$sel:qualities:GetAssetPropertyAggregates' :: GetAssetPropertyAggregates -> Maybe (NonEmpty Quality)
$sel:propertyId:GetAssetPropertyAggregates' :: GetAssetPropertyAggregates -> Maybe Text
$sel:propertyAlias:GetAssetPropertyAggregates' :: GetAssetPropertyAggregates -> Maybe Text
$sel:nextToken:GetAssetPropertyAggregates' :: GetAssetPropertyAggregates -> Maybe Text
$sel:maxResults:GetAssetPropertyAggregates' :: GetAssetPropertyAggregates -> Maybe Natural
$sel:assetId:GetAssetPropertyAggregates' :: GetAssetPropertyAggregates -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
assetId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
propertyAlias
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
propertyId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty Quality)
qualities
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe TimeOrdering
timeOrdering
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` NonEmpty AggregateType
aggregateTypes
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
resolution
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
startDate
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
endDate

instance Prelude.NFData GetAssetPropertyAggregates where
  rnf :: GetAssetPropertyAggregates -> ()
rnf GetAssetPropertyAggregates' {Maybe Natural
Maybe (NonEmpty Quality)
Maybe Text
Maybe TimeOrdering
NonEmpty AggregateType
Text
POSIX
endDate :: POSIX
startDate :: POSIX
resolution :: Text
aggregateTypes :: NonEmpty AggregateType
timeOrdering :: Maybe TimeOrdering
qualities :: Maybe (NonEmpty Quality)
propertyId :: Maybe Text
propertyAlias :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
assetId :: Maybe Text
$sel:endDate:GetAssetPropertyAggregates' :: GetAssetPropertyAggregates -> POSIX
$sel:startDate:GetAssetPropertyAggregates' :: GetAssetPropertyAggregates -> POSIX
$sel:resolution:GetAssetPropertyAggregates' :: GetAssetPropertyAggregates -> Text
$sel:aggregateTypes:GetAssetPropertyAggregates' :: GetAssetPropertyAggregates -> NonEmpty AggregateType
$sel:timeOrdering:GetAssetPropertyAggregates' :: GetAssetPropertyAggregates -> Maybe TimeOrdering
$sel:qualities:GetAssetPropertyAggregates' :: GetAssetPropertyAggregates -> Maybe (NonEmpty Quality)
$sel:propertyId:GetAssetPropertyAggregates' :: GetAssetPropertyAggregates -> Maybe Text
$sel:propertyAlias:GetAssetPropertyAggregates' :: GetAssetPropertyAggregates -> Maybe Text
$sel:nextToken:GetAssetPropertyAggregates' :: GetAssetPropertyAggregates -> Maybe Text
$sel:maxResults:GetAssetPropertyAggregates' :: GetAssetPropertyAggregates -> Maybe Natural
$sel:assetId:GetAssetPropertyAggregates' :: GetAssetPropertyAggregates -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
assetId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
propertyAlias
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
propertyId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty Quality)
qualities
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe TimeOrdering
timeOrdering
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf NonEmpty AggregateType
aggregateTypes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
resolution
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
startDate
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
endDate

instance Data.ToHeaders GetAssetPropertyAggregates where
  toHeaders :: GetAssetPropertyAggregates -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToPath GetAssetPropertyAggregates where
  toPath :: GetAssetPropertyAggregates -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/properties/aggregates"

instance Data.ToQuery GetAssetPropertyAggregates where
  toQuery :: GetAssetPropertyAggregates -> QueryString
toQuery GetAssetPropertyAggregates' {Maybe Natural
Maybe (NonEmpty Quality)
Maybe Text
Maybe TimeOrdering
NonEmpty AggregateType
Text
POSIX
endDate :: POSIX
startDate :: POSIX
resolution :: Text
aggregateTypes :: NonEmpty AggregateType
timeOrdering :: Maybe TimeOrdering
qualities :: Maybe (NonEmpty Quality)
propertyId :: Maybe Text
propertyAlias :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
assetId :: Maybe Text
$sel:endDate:GetAssetPropertyAggregates' :: GetAssetPropertyAggregates -> POSIX
$sel:startDate:GetAssetPropertyAggregates' :: GetAssetPropertyAggregates -> POSIX
$sel:resolution:GetAssetPropertyAggregates' :: GetAssetPropertyAggregates -> Text
$sel:aggregateTypes:GetAssetPropertyAggregates' :: GetAssetPropertyAggregates -> NonEmpty AggregateType
$sel:timeOrdering:GetAssetPropertyAggregates' :: GetAssetPropertyAggregates -> Maybe TimeOrdering
$sel:qualities:GetAssetPropertyAggregates' :: GetAssetPropertyAggregates -> Maybe (NonEmpty Quality)
$sel:propertyId:GetAssetPropertyAggregates' :: GetAssetPropertyAggregates -> Maybe Text
$sel:propertyAlias:GetAssetPropertyAggregates' :: GetAssetPropertyAggregates -> Maybe Text
$sel:nextToken:GetAssetPropertyAggregates' :: GetAssetPropertyAggregates -> Maybe Text
$sel:maxResults:GetAssetPropertyAggregates' :: GetAssetPropertyAggregates -> Maybe Natural
$sel:assetId:GetAssetPropertyAggregates' :: GetAssetPropertyAggregates -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"assetId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
assetId,
        ByteString
"maxResults" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
maxResults,
        ByteString
"nextToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
nextToken,
        ByteString
"propertyAlias" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
propertyAlias,
        ByteString
"propertyId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
propertyId,
        ByteString
"qualities"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            (forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"member" forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Quality)
qualities),
        ByteString
"timeOrdering" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe TimeOrdering
timeOrdering,
        ByteString
"aggregateTypes"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"member" NonEmpty AggregateType
aggregateTypes,
        ByteString
"resolution" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
resolution,
        ByteString
"startDate" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: POSIX
startDate,
        ByteString
"endDate" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: POSIX
endDate
      ]

-- | /See:/ 'newGetAssetPropertyAggregatesResponse' smart constructor.
data GetAssetPropertyAggregatesResponse = GetAssetPropertyAggregatesResponse'
  { -- | The token for the next set of results, or null if there are no
    -- additional results.
    GetAssetPropertyAggregatesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    GetAssetPropertyAggregatesResponse -> Int
httpStatus :: Prelude.Int,
    -- | The requested aggregated values.
    GetAssetPropertyAggregatesResponse -> [AggregatedValue]
aggregatedValues :: [AggregatedValue]
  }
  deriving (GetAssetPropertyAggregatesResponse
-> GetAssetPropertyAggregatesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetAssetPropertyAggregatesResponse
-> GetAssetPropertyAggregatesResponse -> Bool
$c/= :: GetAssetPropertyAggregatesResponse
-> GetAssetPropertyAggregatesResponse -> Bool
== :: GetAssetPropertyAggregatesResponse
-> GetAssetPropertyAggregatesResponse -> Bool
$c== :: GetAssetPropertyAggregatesResponse
-> GetAssetPropertyAggregatesResponse -> Bool
Prelude.Eq, ReadPrec [GetAssetPropertyAggregatesResponse]
ReadPrec GetAssetPropertyAggregatesResponse
Int -> ReadS GetAssetPropertyAggregatesResponse
ReadS [GetAssetPropertyAggregatesResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetAssetPropertyAggregatesResponse]
$creadListPrec :: ReadPrec [GetAssetPropertyAggregatesResponse]
readPrec :: ReadPrec GetAssetPropertyAggregatesResponse
$creadPrec :: ReadPrec GetAssetPropertyAggregatesResponse
readList :: ReadS [GetAssetPropertyAggregatesResponse]
$creadList :: ReadS [GetAssetPropertyAggregatesResponse]
readsPrec :: Int -> ReadS GetAssetPropertyAggregatesResponse
$creadsPrec :: Int -> ReadS GetAssetPropertyAggregatesResponse
Prelude.Read, Int -> GetAssetPropertyAggregatesResponse -> ShowS
[GetAssetPropertyAggregatesResponse] -> ShowS
GetAssetPropertyAggregatesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetAssetPropertyAggregatesResponse] -> ShowS
$cshowList :: [GetAssetPropertyAggregatesResponse] -> ShowS
show :: GetAssetPropertyAggregatesResponse -> String
$cshow :: GetAssetPropertyAggregatesResponse -> String
showsPrec :: Int -> GetAssetPropertyAggregatesResponse -> ShowS
$cshowsPrec :: Int -> GetAssetPropertyAggregatesResponse -> ShowS
Prelude.Show, forall x.
Rep GetAssetPropertyAggregatesResponse x
-> GetAssetPropertyAggregatesResponse
forall x.
GetAssetPropertyAggregatesResponse
-> Rep GetAssetPropertyAggregatesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetAssetPropertyAggregatesResponse x
-> GetAssetPropertyAggregatesResponse
$cfrom :: forall x.
GetAssetPropertyAggregatesResponse
-> Rep GetAssetPropertyAggregatesResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetAssetPropertyAggregatesResponse' 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:
--
-- 'nextToken', 'getAssetPropertyAggregatesResponse_nextToken' - The token for the next set of results, or null if there are no
-- additional results.
--
-- 'httpStatus', 'getAssetPropertyAggregatesResponse_httpStatus' - The response's http status code.
--
-- 'aggregatedValues', 'getAssetPropertyAggregatesResponse_aggregatedValues' - The requested aggregated values.
newGetAssetPropertyAggregatesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetAssetPropertyAggregatesResponse
newGetAssetPropertyAggregatesResponse :: Int -> GetAssetPropertyAggregatesResponse
newGetAssetPropertyAggregatesResponse Int
pHttpStatus_ =
  GetAssetPropertyAggregatesResponse'
    { $sel:nextToken:GetAssetPropertyAggregatesResponse' :: Maybe Text
nextToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetAssetPropertyAggregatesResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:aggregatedValues:GetAssetPropertyAggregatesResponse' :: [AggregatedValue]
aggregatedValues = forall a. Monoid a => a
Prelude.mempty
    }

-- | The token for the next set of results, or null if there are no
-- additional results.
getAssetPropertyAggregatesResponse_nextToken :: Lens.Lens' GetAssetPropertyAggregatesResponse (Prelude.Maybe Prelude.Text)
getAssetPropertyAggregatesResponse_nextToken :: Lens' GetAssetPropertyAggregatesResponse (Maybe Text)
getAssetPropertyAggregatesResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAssetPropertyAggregatesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetAssetPropertyAggregatesResponse' :: GetAssetPropertyAggregatesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetAssetPropertyAggregatesResponse
s@GetAssetPropertyAggregatesResponse' {} Maybe Text
a -> GetAssetPropertyAggregatesResponse
s {$sel:nextToken:GetAssetPropertyAggregatesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: GetAssetPropertyAggregatesResponse)

-- | The response's http status code.
getAssetPropertyAggregatesResponse_httpStatus :: Lens.Lens' GetAssetPropertyAggregatesResponse Prelude.Int
getAssetPropertyAggregatesResponse_httpStatus :: Lens' GetAssetPropertyAggregatesResponse Int
getAssetPropertyAggregatesResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAssetPropertyAggregatesResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetAssetPropertyAggregatesResponse' :: GetAssetPropertyAggregatesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetAssetPropertyAggregatesResponse
s@GetAssetPropertyAggregatesResponse' {} Int
a -> GetAssetPropertyAggregatesResponse
s {$sel:httpStatus:GetAssetPropertyAggregatesResponse' :: Int
httpStatus = Int
a} :: GetAssetPropertyAggregatesResponse)

-- | The requested aggregated values.
getAssetPropertyAggregatesResponse_aggregatedValues :: Lens.Lens' GetAssetPropertyAggregatesResponse [AggregatedValue]
getAssetPropertyAggregatesResponse_aggregatedValues :: Lens' GetAssetPropertyAggregatesResponse [AggregatedValue]
getAssetPropertyAggregatesResponse_aggregatedValues = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAssetPropertyAggregatesResponse' {[AggregatedValue]
aggregatedValues :: [AggregatedValue]
$sel:aggregatedValues:GetAssetPropertyAggregatesResponse' :: GetAssetPropertyAggregatesResponse -> [AggregatedValue]
aggregatedValues} -> [AggregatedValue]
aggregatedValues) (\s :: GetAssetPropertyAggregatesResponse
s@GetAssetPropertyAggregatesResponse' {} [AggregatedValue]
a -> GetAssetPropertyAggregatesResponse
s {$sel:aggregatedValues:GetAssetPropertyAggregatesResponse' :: [AggregatedValue]
aggregatedValues = [AggregatedValue]
a} :: GetAssetPropertyAggregatesResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance
  Prelude.NFData
    GetAssetPropertyAggregatesResponse
  where
  rnf :: GetAssetPropertyAggregatesResponse -> ()
rnf GetAssetPropertyAggregatesResponse' {Int
[AggregatedValue]
Maybe Text
aggregatedValues :: [AggregatedValue]
httpStatus :: Int
nextToken :: Maybe Text
$sel:aggregatedValues:GetAssetPropertyAggregatesResponse' :: GetAssetPropertyAggregatesResponse -> [AggregatedValue]
$sel:httpStatus:GetAssetPropertyAggregatesResponse' :: GetAssetPropertyAggregatesResponse -> Int
$sel:nextToken:GetAssetPropertyAggregatesResponse' :: GetAssetPropertyAggregatesResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [AggregatedValue]
aggregatedValues