{-# 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.IoTSiteWise.Types.BatchGetAssetPropertyValueHistoryEntry
-- 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.IoTSiteWise.Types.BatchGetAssetPropertyValueHistoryEntry 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.Quality
import Amazonka.IoTSiteWise.Types.TimeOrdering
import qualified Amazonka.Prelude as Prelude

-- | Contains information for an asset property historical value entry that
-- is associated with the
-- <https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_BatchGetAssetPropertyValue.html BatchGetAssetPropertyValueHistory>
-- API.
--
-- 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>.
--
-- /See:/ 'newBatchGetAssetPropertyValueHistoryEntry' smart constructor.
data BatchGetAssetPropertyValueHistoryEntry = BatchGetAssetPropertyValueHistoryEntry'
  { -- | The ID of the asset in which the asset property was created.
    BatchGetAssetPropertyValueHistoryEntry -> Maybe Text
assetId :: Prelude.Maybe Prelude.Text,
    -- | The inclusive end of the range from which to query historical data,
    -- expressed in seconds in Unix epoch time.
    BatchGetAssetPropertyValueHistoryEntry -> Maybe POSIX
endDate :: Prelude.Maybe Data.POSIX,
    -- | 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/.
    BatchGetAssetPropertyValueHistoryEntry -> Maybe Text
propertyAlias :: Prelude.Maybe Prelude.Text,
    -- | The ID of the asset property.
    BatchGetAssetPropertyValueHistoryEntry -> Maybe Text
propertyId :: Prelude.Maybe Prelude.Text,
    -- | The quality by which to filter asset data.
    BatchGetAssetPropertyValueHistoryEntry -> Maybe (NonEmpty Quality)
qualities :: Prelude.Maybe (Prelude.NonEmpty Quality),
    -- | The exclusive start of the range from which to query historical data,
    -- expressed in seconds in Unix epoch time.
    BatchGetAssetPropertyValueHistoryEntry -> Maybe POSIX
startDate :: Prelude.Maybe Data.POSIX,
    -- | The chronological sorting order of the requested information.
    --
    -- Default: @ASCENDING@
    BatchGetAssetPropertyValueHistoryEntry -> Maybe TimeOrdering
timeOrdering :: Prelude.Maybe TimeOrdering,
    -- | The ID of the entry.
    BatchGetAssetPropertyValueHistoryEntry -> Text
entryId :: Prelude.Text
  }
  deriving (BatchGetAssetPropertyValueHistoryEntry
-> BatchGetAssetPropertyValueHistoryEntry -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchGetAssetPropertyValueHistoryEntry
-> BatchGetAssetPropertyValueHistoryEntry -> Bool
$c/= :: BatchGetAssetPropertyValueHistoryEntry
-> BatchGetAssetPropertyValueHistoryEntry -> Bool
== :: BatchGetAssetPropertyValueHistoryEntry
-> BatchGetAssetPropertyValueHistoryEntry -> Bool
$c== :: BatchGetAssetPropertyValueHistoryEntry
-> BatchGetAssetPropertyValueHistoryEntry -> Bool
Prelude.Eq, ReadPrec [BatchGetAssetPropertyValueHistoryEntry]
ReadPrec BatchGetAssetPropertyValueHistoryEntry
Int -> ReadS BatchGetAssetPropertyValueHistoryEntry
ReadS [BatchGetAssetPropertyValueHistoryEntry]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchGetAssetPropertyValueHistoryEntry]
$creadListPrec :: ReadPrec [BatchGetAssetPropertyValueHistoryEntry]
readPrec :: ReadPrec BatchGetAssetPropertyValueHistoryEntry
$creadPrec :: ReadPrec BatchGetAssetPropertyValueHistoryEntry
readList :: ReadS [BatchGetAssetPropertyValueHistoryEntry]
$creadList :: ReadS [BatchGetAssetPropertyValueHistoryEntry]
readsPrec :: Int -> ReadS BatchGetAssetPropertyValueHistoryEntry
$creadsPrec :: Int -> ReadS BatchGetAssetPropertyValueHistoryEntry
Prelude.Read, Int -> BatchGetAssetPropertyValueHistoryEntry -> ShowS
[BatchGetAssetPropertyValueHistoryEntry] -> ShowS
BatchGetAssetPropertyValueHistoryEntry -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchGetAssetPropertyValueHistoryEntry] -> ShowS
$cshowList :: [BatchGetAssetPropertyValueHistoryEntry] -> ShowS
show :: BatchGetAssetPropertyValueHistoryEntry -> String
$cshow :: BatchGetAssetPropertyValueHistoryEntry -> String
showsPrec :: Int -> BatchGetAssetPropertyValueHistoryEntry -> ShowS
$cshowsPrec :: Int -> BatchGetAssetPropertyValueHistoryEntry -> ShowS
Prelude.Show, forall x.
Rep BatchGetAssetPropertyValueHistoryEntry x
-> BatchGetAssetPropertyValueHistoryEntry
forall x.
BatchGetAssetPropertyValueHistoryEntry
-> Rep BatchGetAssetPropertyValueHistoryEntry x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchGetAssetPropertyValueHistoryEntry x
-> BatchGetAssetPropertyValueHistoryEntry
$cfrom :: forall x.
BatchGetAssetPropertyValueHistoryEntry
-> Rep BatchGetAssetPropertyValueHistoryEntry x
Prelude.Generic)

-- |
-- Create a value of 'BatchGetAssetPropertyValueHistoryEntry' 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', 'batchGetAssetPropertyValueHistoryEntry_assetId' - The ID of the asset in which the asset property was created.
--
-- 'endDate', 'batchGetAssetPropertyValueHistoryEntry_endDate' - The inclusive end of the range from which to query historical data,
-- expressed in seconds in Unix epoch time.
--
-- 'propertyAlias', 'batchGetAssetPropertyValueHistoryEntry_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', 'batchGetAssetPropertyValueHistoryEntry_propertyId' - The ID of the asset property.
--
-- 'qualities', 'batchGetAssetPropertyValueHistoryEntry_qualities' - The quality by which to filter asset data.
--
-- 'startDate', 'batchGetAssetPropertyValueHistoryEntry_startDate' - The exclusive start of the range from which to query historical data,
-- expressed in seconds in Unix epoch time.
--
-- 'timeOrdering', 'batchGetAssetPropertyValueHistoryEntry_timeOrdering' - The chronological sorting order of the requested information.
--
-- Default: @ASCENDING@
--
-- 'entryId', 'batchGetAssetPropertyValueHistoryEntry_entryId' - The ID of the entry.
newBatchGetAssetPropertyValueHistoryEntry ::
  -- | 'entryId'
  Prelude.Text ->
  BatchGetAssetPropertyValueHistoryEntry
newBatchGetAssetPropertyValueHistoryEntry :: Text -> BatchGetAssetPropertyValueHistoryEntry
newBatchGetAssetPropertyValueHistoryEntry Text
pEntryId_ =
  BatchGetAssetPropertyValueHistoryEntry'
    { $sel:assetId:BatchGetAssetPropertyValueHistoryEntry' :: Maybe Text
assetId =
        forall a. Maybe a
Prelude.Nothing,
      $sel:endDate:BatchGetAssetPropertyValueHistoryEntry' :: Maybe POSIX
endDate = forall a. Maybe a
Prelude.Nothing,
      $sel:propertyAlias:BatchGetAssetPropertyValueHistoryEntry' :: Maybe Text
propertyAlias = forall a. Maybe a
Prelude.Nothing,
      $sel:propertyId:BatchGetAssetPropertyValueHistoryEntry' :: Maybe Text
propertyId = forall a. Maybe a
Prelude.Nothing,
      $sel:qualities:BatchGetAssetPropertyValueHistoryEntry' :: Maybe (NonEmpty Quality)
qualities = forall a. Maybe a
Prelude.Nothing,
      $sel:startDate:BatchGetAssetPropertyValueHistoryEntry' :: Maybe POSIX
startDate = forall a. Maybe a
Prelude.Nothing,
      $sel:timeOrdering:BatchGetAssetPropertyValueHistoryEntry' :: Maybe TimeOrdering
timeOrdering = forall a. Maybe a
Prelude.Nothing,
      $sel:entryId:BatchGetAssetPropertyValueHistoryEntry' :: Text
entryId = Text
pEntryId_
    }

-- | The ID of the asset in which the asset property was created.
batchGetAssetPropertyValueHistoryEntry_assetId :: Lens.Lens' BatchGetAssetPropertyValueHistoryEntry (Prelude.Maybe Prelude.Text)
batchGetAssetPropertyValueHistoryEntry_assetId :: Lens' BatchGetAssetPropertyValueHistoryEntry (Maybe Text)
batchGetAssetPropertyValueHistoryEntry_assetId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetAssetPropertyValueHistoryEntry' {Maybe Text
assetId :: Maybe Text
$sel:assetId:BatchGetAssetPropertyValueHistoryEntry' :: BatchGetAssetPropertyValueHistoryEntry -> Maybe Text
assetId} -> Maybe Text
assetId) (\s :: BatchGetAssetPropertyValueHistoryEntry
s@BatchGetAssetPropertyValueHistoryEntry' {} Maybe Text
a -> BatchGetAssetPropertyValueHistoryEntry
s {$sel:assetId:BatchGetAssetPropertyValueHistoryEntry' :: Maybe Text
assetId = Maybe Text
a} :: BatchGetAssetPropertyValueHistoryEntry)

-- | The inclusive end of the range from which to query historical data,
-- expressed in seconds in Unix epoch time.
batchGetAssetPropertyValueHistoryEntry_endDate :: Lens.Lens' BatchGetAssetPropertyValueHistoryEntry (Prelude.Maybe Prelude.UTCTime)
batchGetAssetPropertyValueHistoryEntry_endDate :: Lens' BatchGetAssetPropertyValueHistoryEntry (Maybe UTCTime)
batchGetAssetPropertyValueHistoryEntry_endDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetAssetPropertyValueHistoryEntry' {Maybe POSIX
endDate :: Maybe POSIX
$sel:endDate:BatchGetAssetPropertyValueHistoryEntry' :: BatchGetAssetPropertyValueHistoryEntry -> Maybe POSIX
endDate} -> Maybe POSIX
endDate) (\s :: BatchGetAssetPropertyValueHistoryEntry
s@BatchGetAssetPropertyValueHistoryEntry' {} Maybe POSIX
a -> BatchGetAssetPropertyValueHistoryEntry
s {$sel:endDate:BatchGetAssetPropertyValueHistoryEntry' :: Maybe POSIX
endDate = Maybe POSIX
a} :: BatchGetAssetPropertyValueHistoryEntry) 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

-- | 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/.
batchGetAssetPropertyValueHistoryEntry_propertyAlias :: Lens.Lens' BatchGetAssetPropertyValueHistoryEntry (Prelude.Maybe Prelude.Text)
batchGetAssetPropertyValueHistoryEntry_propertyAlias :: Lens' BatchGetAssetPropertyValueHistoryEntry (Maybe Text)
batchGetAssetPropertyValueHistoryEntry_propertyAlias = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetAssetPropertyValueHistoryEntry' {Maybe Text
propertyAlias :: Maybe Text
$sel:propertyAlias:BatchGetAssetPropertyValueHistoryEntry' :: BatchGetAssetPropertyValueHistoryEntry -> Maybe Text
propertyAlias} -> Maybe Text
propertyAlias) (\s :: BatchGetAssetPropertyValueHistoryEntry
s@BatchGetAssetPropertyValueHistoryEntry' {} Maybe Text
a -> BatchGetAssetPropertyValueHistoryEntry
s {$sel:propertyAlias:BatchGetAssetPropertyValueHistoryEntry' :: Maybe Text
propertyAlias = Maybe Text
a} :: BatchGetAssetPropertyValueHistoryEntry)

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

-- | The quality by which to filter asset data.
batchGetAssetPropertyValueHistoryEntry_qualities :: Lens.Lens' BatchGetAssetPropertyValueHistoryEntry (Prelude.Maybe (Prelude.NonEmpty Quality))
batchGetAssetPropertyValueHistoryEntry_qualities :: Lens'
  BatchGetAssetPropertyValueHistoryEntry (Maybe (NonEmpty Quality))
batchGetAssetPropertyValueHistoryEntry_qualities = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetAssetPropertyValueHistoryEntry' {Maybe (NonEmpty Quality)
qualities :: Maybe (NonEmpty Quality)
$sel:qualities:BatchGetAssetPropertyValueHistoryEntry' :: BatchGetAssetPropertyValueHistoryEntry -> Maybe (NonEmpty Quality)
qualities} -> Maybe (NonEmpty Quality)
qualities) (\s :: BatchGetAssetPropertyValueHistoryEntry
s@BatchGetAssetPropertyValueHistoryEntry' {} Maybe (NonEmpty Quality)
a -> BatchGetAssetPropertyValueHistoryEntry
s {$sel:qualities:BatchGetAssetPropertyValueHistoryEntry' :: Maybe (NonEmpty Quality)
qualities = Maybe (NonEmpty Quality)
a} :: BatchGetAssetPropertyValueHistoryEntry) 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 exclusive start of the range from which to query historical data,
-- expressed in seconds in Unix epoch time.
batchGetAssetPropertyValueHistoryEntry_startDate :: Lens.Lens' BatchGetAssetPropertyValueHistoryEntry (Prelude.Maybe Prelude.UTCTime)
batchGetAssetPropertyValueHistoryEntry_startDate :: Lens' BatchGetAssetPropertyValueHistoryEntry (Maybe UTCTime)
batchGetAssetPropertyValueHistoryEntry_startDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetAssetPropertyValueHistoryEntry' {Maybe POSIX
startDate :: Maybe POSIX
$sel:startDate:BatchGetAssetPropertyValueHistoryEntry' :: BatchGetAssetPropertyValueHistoryEntry -> Maybe POSIX
startDate} -> Maybe POSIX
startDate) (\s :: BatchGetAssetPropertyValueHistoryEntry
s@BatchGetAssetPropertyValueHistoryEntry' {} Maybe POSIX
a -> BatchGetAssetPropertyValueHistoryEntry
s {$sel:startDate:BatchGetAssetPropertyValueHistoryEntry' :: Maybe POSIX
startDate = Maybe POSIX
a} :: BatchGetAssetPropertyValueHistoryEntry) 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

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

-- | The ID of the entry.
batchGetAssetPropertyValueHistoryEntry_entryId :: Lens.Lens' BatchGetAssetPropertyValueHistoryEntry Prelude.Text
batchGetAssetPropertyValueHistoryEntry_entryId :: Lens' BatchGetAssetPropertyValueHistoryEntry Text
batchGetAssetPropertyValueHistoryEntry_entryId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetAssetPropertyValueHistoryEntry' {Text
entryId :: Text
$sel:entryId:BatchGetAssetPropertyValueHistoryEntry' :: BatchGetAssetPropertyValueHistoryEntry -> Text
entryId} -> Text
entryId) (\s :: BatchGetAssetPropertyValueHistoryEntry
s@BatchGetAssetPropertyValueHistoryEntry' {} Text
a -> BatchGetAssetPropertyValueHistoryEntry
s {$sel:entryId:BatchGetAssetPropertyValueHistoryEntry' :: Text
entryId = Text
a} :: BatchGetAssetPropertyValueHistoryEntry)

instance
  Prelude.Hashable
    BatchGetAssetPropertyValueHistoryEntry
  where
  hashWithSalt :: Int -> BatchGetAssetPropertyValueHistoryEntry -> Int
hashWithSalt
    Int
_salt
    BatchGetAssetPropertyValueHistoryEntry' {Maybe (NonEmpty Quality)
Maybe Text
Maybe POSIX
Maybe TimeOrdering
Text
entryId :: Text
timeOrdering :: Maybe TimeOrdering
startDate :: Maybe POSIX
qualities :: Maybe (NonEmpty Quality)
propertyId :: Maybe Text
propertyAlias :: Maybe Text
endDate :: Maybe POSIX
assetId :: Maybe Text
$sel:entryId:BatchGetAssetPropertyValueHistoryEntry' :: BatchGetAssetPropertyValueHistoryEntry -> Text
$sel:timeOrdering:BatchGetAssetPropertyValueHistoryEntry' :: BatchGetAssetPropertyValueHistoryEntry -> Maybe TimeOrdering
$sel:startDate:BatchGetAssetPropertyValueHistoryEntry' :: BatchGetAssetPropertyValueHistoryEntry -> Maybe POSIX
$sel:qualities:BatchGetAssetPropertyValueHistoryEntry' :: BatchGetAssetPropertyValueHistoryEntry -> Maybe (NonEmpty Quality)
$sel:propertyId:BatchGetAssetPropertyValueHistoryEntry' :: BatchGetAssetPropertyValueHistoryEntry -> Maybe Text
$sel:propertyAlias:BatchGetAssetPropertyValueHistoryEntry' :: BatchGetAssetPropertyValueHistoryEntry -> Maybe Text
$sel:endDate:BatchGetAssetPropertyValueHistoryEntry' :: BatchGetAssetPropertyValueHistoryEntry -> Maybe POSIX
$sel:assetId:BatchGetAssetPropertyValueHistoryEntry' :: BatchGetAssetPropertyValueHistoryEntry -> 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 POSIX
endDate
        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 POSIX
startDate
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe TimeOrdering
timeOrdering
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
entryId

instance
  Prelude.NFData
    BatchGetAssetPropertyValueHistoryEntry
  where
  rnf :: BatchGetAssetPropertyValueHistoryEntry -> ()
rnf BatchGetAssetPropertyValueHistoryEntry' {Maybe (NonEmpty Quality)
Maybe Text
Maybe POSIX
Maybe TimeOrdering
Text
entryId :: Text
timeOrdering :: Maybe TimeOrdering
startDate :: Maybe POSIX
qualities :: Maybe (NonEmpty Quality)
propertyId :: Maybe Text
propertyAlias :: Maybe Text
endDate :: Maybe POSIX
assetId :: Maybe Text
$sel:entryId:BatchGetAssetPropertyValueHistoryEntry' :: BatchGetAssetPropertyValueHistoryEntry -> Text
$sel:timeOrdering:BatchGetAssetPropertyValueHistoryEntry' :: BatchGetAssetPropertyValueHistoryEntry -> Maybe TimeOrdering
$sel:startDate:BatchGetAssetPropertyValueHistoryEntry' :: BatchGetAssetPropertyValueHistoryEntry -> Maybe POSIX
$sel:qualities:BatchGetAssetPropertyValueHistoryEntry' :: BatchGetAssetPropertyValueHistoryEntry -> Maybe (NonEmpty Quality)
$sel:propertyId:BatchGetAssetPropertyValueHistoryEntry' :: BatchGetAssetPropertyValueHistoryEntry -> Maybe Text
$sel:propertyAlias:BatchGetAssetPropertyValueHistoryEntry' :: BatchGetAssetPropertyValueHistoryEntry -> Maybe Text
$sel:endDate:BatchGetAssetPropertyValueHistoryEntry' :: BatchGetAssetPropertyValueHistoryEntry -> Maybe POSIX
$sel:assetId:BatchGetAssetPropertyValueHistoryEntry' :: BatchGetAssetPropertyValueHistoryEntry -> 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 POSIX
endDate
      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 POSIX
startDate
      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 Text
entryId

instance
  Data.ToJSON
    BatchGetAssetPropertyValueHistoryEntry
  where
  toJSON :: BatchGetAssetPropertyValueHistoryEntry -> Value
toJSON BatchGetAssetPropertyValueHistoryEntry' {Maybe (NonEmpty Quality)
Maybe Text
Maybe POSIX
Maybe TimeOrdering
Text
entryId :: Text
timeOrdering :: Maybe TimeOrdering
startDate :: Maybe POSIX
qualities :: Maybe (NonEmpty Quality)
propertyId :: Maybe Text
propertyAlias :: Maybe Text
endDate :: Maybe POSIX
assetId :: Maybe Text
$sel:entryId:BatchGetAssetPropertyValueHistoryEntry' :: BatchGetAssetPropertyValueHistoryEntry -> Text
$sel:timeOrdering:BatchGetAssetPropertyValueHistoryEntry' :: BatchGetAssetPropertyValueHistoryEntry -> Maybe TimeOrdering
$sel:startDate:BatchGetAssetPropertyValueHistoryEntry' :: BatchGetAssetPropertyValueHistoryEntry -> Maybe POSIX
$sel:qualities:BatchGetAssetPropertyValueHistoryEntry' :: BatchGetAssetPropertyValueHistoryEntry -> Maybe (NonEmpty Quality)
$sel:propertyId:BatchGetAssetPropertyValueHistoryEntry' :: BatchGetAssetPropertyValueHistoryEntry -> Maybe Text
$sel:propertyAlias:BatchGetAssetPropertyValueHistoryEntry' :: BatchGetAssetPropertyValueHistoryEntry -> Maybe Text
$sel:endDate:BatchGetAssetPropertyValueHistoryEntry' :: BatchGetAssetPropertyValueHistoryEntry -> Maybe POSIX
$sel:assetId:BatchGetAssetPropertyValueHistoryEntry' :: BatchGetAssetPropertyValueHistoryEntry -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"assetId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
assetId,
            (Key
"endDate" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe POSIX
endDate,
            (Key
"propertyAlias" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
propertyAlias,
            (Key
"propertyId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
propertyId,
            (Key
"qualities" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Quality)
qualities,
            (Key
"startDate" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe POSIX
startDate,
            (Key
"timeOrdering" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TimeOrdering
timeOrdering,
            forall a. a -> Maybe a
Prelude.Just (Key
"entryId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
entryId)
          ]
      )