{-# 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.BatchGetAssetPropertyValueHistorySkippedEntry
-- 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.BatchGetAssetPropertyValueHistorySkippedEntry 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.BatchEntryCompletionStatus
import Amazonka.IoTSiteWise.Types.BatchGetAssetPropertyValueHistoryErrorInfo
import qualified Amazonka.Prelude as Prelude

-- | Contains information for an entry that has been processed by the
-- previous
-- <https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_BatchGetAssetPropertyValue.html BatchGetAssetPropertyValueHistory>
-- request.
--
-- /See:/ 'newBatchGetAssetPropertyValueHistorySkippedEntry' smart constructor.
data BatchGetAssetPropertyValueHistorySkippedEntry = BatchGetAssetPropertyValueHistorySkippedEntry'
  { -- | The error information, such as the error code and the timestamp.
    BatchGetAssetPropertyValueHistorySkippedEntry
-> Maybe BatchGetAssetPropertyValueHistoryErrorInfo
errorInfo :: Prelude.Maybe BatchGetAssetPropertyValueHistoryErrorInfo,
    -- | The ID of the entry.
    BatchGetAssetPropertyValueHistorySkippedEntry -> Text
entryId :: Prelude.Text,
    -- | The completion status of each entry that is associated with the
    -- <https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_BatchGetAssetPropertyValueHistory.html BatchGetAssetPropertyValueHistory>
    -- API.
    BatchGetAssetPropertyValueHistorySkippedEntry
-> BatchEntryCompletionStatus
completionStatus :: BatchEntryCompletionStatus
  }
  deriving (BatchGetAssetPropertyValueHistorySkippedEntry
-> BatchGetAssetPropertyValueHistorySkippedEntry -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchGetAssetPropertyValueHistorySkippedEntry
-> BatchGetAssetPropertyValueHistorySkippedEntry -> Bool
$c/= :: BatchGetAssetPropertyValueHistorySkippedEntry
-> BatchGetAssetPropertyValueHistorySkippedEntry -> Bool
== :: BatchGetAssetPropertyValueHistorySkippedEntry
-> BatchGetAssetPropertyValueHistorySkippedEntry -> Bool
$c== :: BatchGetAssetPropertyValueHistorySkippedEntry
-> BatchGetAssetPropertyValueHistorySkippedEntry -> Bool
Prelude.Eq, ReadPrec [BatchGetAssetPropertyValueHistorySkippedEntry]
ReadPrec BatchGetAssetPropertyValueHistorySkippedEntry
Int -> ReadS BatchGetAssetPropertyValueHistorySkippedEntry
ReadS [BatchGetAssetPropertyValueHistorySkippedEntry]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchGetAssetPropertyValueHistorySkippedEntry]
$creadListPrec :: ReadPrec [BatchGetAssetPropertyValueHistorySkippedEntry]
readPrec :: ReadPrec BatchGetAssetPropertyValueHistorySkippedEntry
$creadPrec :: ReadPrec BatchGetAssetPropertyValueHistorySkippedEntry
readList :: ReadS [BatchGetAssetPropertyValueHistorySkippedEntry]
$creadList :: ReadS [BatchGetAssetPropertyValueHistorySkippedEntry]
readsPrec :: Int -> ReadS BatchGetAssetPropertyValueHistorySkippedEntry
$creadsPrec :: Int -> ReadS BatchGetAssetPropertyValueHistorySkippedEntry
Prelude.Read, Int -> BatchGetAssetPropertyValueHistorySkippedEntry -> ShowS
[BatchGetAssetPropertyValueHistorySkippedEntry] -> ShowS
BatchGetAssetPropertyValueHistorySkippedEntry -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchGetAssetPropertyValueHistorySkippedEntry] -> ShowS
$cshowList :: [BatchGetAssetPropertyValueHistorySkippedEntry] -> ShowS
show :: BatchGetAssetPropertyValueHistorySkippedEntry -> String
$cshow :: BatchGetAssetPropertyValueHistorySkippedEntry -> String
showsPrec :: Int -> BatchGetAssetPropertyValueHistorySkippedEntry -> ShowS
$cshowsPrec :: Int -> BatchGetAssetPropertyValueHistorySkippedEntry -> ShowS
Prelude.Show, forall x.
Rep BatchGetAssetPropertyValueHistorySkippedEntry x
-> BatchGetAssetPropertyValueHistorySkippedEntry
forall x.
BatchGetAssetPropertyValueHistorySkippedEntry
-> Rep BatchGetAssetPropertyValueHistorySkippedEntry x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchGetAssetPropertyValueHistorySkippedEntry x
-> BatchGetAssetPropertyValueHistorySkippedEntry
$cfrom :: forall x.
BatchGetAssetPropertyValueHistorySkippedEntry
-> Rep BatchGetAssetPropertyValueHistorySkippedEntry x
Prelude.Generic)

-- |
-- Create a value of 'BatchGetAssetPropertyValueHistorySkippedEntry' 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:
--
-- 'errorInfo', 'batchGetAssetPropertyValueHistorySkippedEntry_errorInfo' - The error information, such as the error code and the timestamp.
--
-- 'entryId', 'batchGetAssetPropertyValueHistorySkippedEntry_entryId' - The ID of the entry.
--
-- 'completionStatus', 'batchGetAssetPropertyValueHistorySkippedEntry_completionStatus' - The completion status of each entry that is associated with the
-- <https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_BatchGetAssetPropertyValueHistory.html BatchGetAssetPropertyValueHistory>
-- API.
newBatchGetAssetPropertyValueHistorySkippedEntry ::
  -- | 'entryId'
  Prelude.Text ->
  -- | 'completionStatus'
  BatchEntryCompletionStatus ->
  BatchGetAssetPropertyValueHistorySkippedEntry
newBatchGetAssetPropertyValueHistorySkippedEntry :: Text
-> BatchEntryCompletionStatus
-> BatchGetAssetPropertyValueHistorySkippedEntry
newBatchGetAssetPropertyValueHistorySkippedEntry
  Text
pEntryId_
  BatchEntryCompletionStatus
pCompletionStatus_ =
    BatchGetAssetPropertyValueHistorySkippedEntry'
      { $sel:errorInfo:BatchGetAssetPropertyValueHistorySkippedEntry' :: Maybe BatchGetAssetPropertyValueHistoryErrorInfo
errorInfo =
          forall a. Maybe a
Prelude.Nothing,
        $sel:entryId:BatchGetAssetPropertyValueHistorySkippedEntry' :: Text
entryId = Text
pEntryId_,
        $sel:completionStatus:BatchGetAssetPropertyValueHistorySkippedEntry' :: BatchEntryCompletionStatus
completionStatus =
          BatchEntryCompletionStatus
pCompletionStatus_
      }

-- | The error information, such as the error code and the timestamp.
batchGetAssetPropertyValueHistorySkippedEntry_errorInfo :: Lens.Lens' BatchGetAssetPropertyValueHistorySkippedEntry (Prelude.Maybe BatchGetAssetPropertyValueHistoryErrorInfo)
batchGetAssetPropertyValueHistorySkippedEntry_errorInfo :: Lens'
  BatchGetAssetPropertyValueHistorySkippedEntry
  (Maybe BatchGetAssetPropertyValueHistoryErrorInfo)
batchGetAssetPropertyValueHistorySkippedEntry_errorInfo = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetAssetPropertyValueHistorySkippedEntry' {Maybe BatchGetAssetPropertyValueHistoryErrorInfo
errorInfo :: Maybe BatchGetAssetPropertyValueHistoryErrorInfo
$sel:errorInfo:BatchGetAssetPropertyValueHistorySkippedEntry' :: BatchGetAssetPropertyValueHistorySkippedEntry
-> Maybe BatchGetAssetPropertyValueHistoryErrorInfo
errorInfo} -> Maybe BatchGetAssetPropertyValueHistoryErrorInfo
errorInfo) (\s :: BatchGetAssetPropertyValueHistorySkippedEntry
s@BatchGetAssetPropertyValueHistorySkippedEntry' {} Maybe BatchGetAssetPropertyValueHistoryErrorInfo
a -> BatchGetAssetPropertyValueHistorySkippedEntry
s {$sel:errorInfo:BatchGetAssetPropertyValueHistorySkippedEntry' :: Maybe BatchGetAssetPropertyValueHistoryErrorInfo
errorInfo = Maybe BatchGetAssetPropertyValueHistoryErrorInfo
a} :: BatchGetAssetPropertyValueHistorySkippedEntry)

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

-- | The completion status of each entry that is associated with the
-- <https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_BatchGetAssetPropertyValueHistory.html BatchGetAssetPropertyValueHistory>
-- API.
batchGetAssetPropertyValueHistorySkippedEntry_completionStatus :: Lens.Lens' BatchGetAssetPropertyValueHistorySkippedEntry BatchEntryCompletionStatus
batchGetAssetPropertyValueHistorySkippedEntry_completionStatus :: Lens'
  BatchGetAssetPropertyValueHistorySkippedEntry
  BatchEntryCompletionStatus
batchGetAssetPropertyValueHistorySkippedEntry_completionStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetAssetPropertyValueHistorySkippedEntry' {BatchEntryCompletionStatus
completionStatus :: BatchEntryCompletionStatus
$sel:completionStatus:BatchGetAssetPropertyValueHistorySkippedEntry' :: BatchGetAssetPropertyValueHistorySkippedEntry
-> BatchEntryCompletionStatus
completionStatus} -> BatchEntryCompletionStatus
completionStatus) (\s :: BatchGetAssetPropertyValueHistorySkippedEntry
s@BatchGetAssetPropertyValueHistorySkippedEntry' {} BatchEntryCompletionStatus
a -> BatchGetAssetPropertyValueHistorySkippedEntry
s {$sel:completionStatus:BatchGetAssetPropertyValueHistorySkippedEntry' :: BatchEntryCompletionStatus
completionStatus = BatchEntryCompletionStatus
a} :: BatchGetAssetPropertyValueHistorySkippedEntry)

instance
  Data.FromJSON
    BatchGetAssetPropertyValueHistorySkippedEntry
  where
  parseJSON :: Value -> Parser BatchGetAssetPropertyValueHistorySkippedEntry
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"BatchGetAssetPropertyValueHistorySkippedEntry"
      ( \Object
x ->
          Maybe BatchGetAssetPropertyValueHistoryErrorInfo
-> Text
-> BatchEntryCompletionStatus
-> BatchGetAssetPropertyValueHistorySkippedEntry
BatchGetAssetPropertyValueHistorySkippedEntry'
            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
"errorInfo")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"entryId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"completionStatus")
      )

instance
  Prelude.Hashable
    BatchGetAssetPropertyValueHistorySkippedEntry
  where
  hashWithSalt :: Int -> BatchGetAssetPropertyValueHistorySkippedEntry -> Int
hashWithSalt
    Int
_salt
    BatchGetAssetPropertyValueHistorySkippedEntry' {Maybe BatchGetAssetPropertyValueHistoryErrorInfo
Text
BatchEntryCompletionStatus
completionStatus :: BatchEntryCompletionStatus
entryId :: Text
errorInfo :: Maybe BatchGetAssetPropertyValueHistoryErrorInfo
$sel:completionStatus:BatchGetAssetPropertyValueHistorySkippedEntry' :: BatchGetAssetPropertyValueHistorySkippedEntry
-> BatchEntryCompletionStatus
$sel:entryId:BatchGetAssetPropertyValueHistorySkippedEntry' :: BatchGetAssetPropertyValueHistorySkippedEntry -> Text
$sel:errorInfo:BatchGetAssetPropertyValueHistorySkippedEntry' :: BatchGetAssetPropertyValueHistorySkippedEntry
-> Maybe BatchGetAssetPropertyValueHistoryErrorInfo
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe BatchGetAssetPropertyValueHistoryErrorInfo
errorInfo
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
entryId
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` BatchEntryCompletionStatus
completionStatus

instance
  Prelude.NFData
    BatchGetAssetPropertyValueHistorySkippedEntry
  where
  rnf :: BatchGetAssetPropertyValueHistorySkippedEntry -> ()
rnf
    BatchGetAssetPropertyValueHistorySkippedEntry' {Maybe BatchGetAssetPropertyValueHistoryErrorInfo
Text
BatchEntryCompletionStatus
completionStatus :: BatchEntryCompletionStatus
entryId :: Text
errorInfo :: Maybe BatchGetAssetPropertyValueHistoryErrorInfo
$sel:completionStatus:BatchGetAssetPropertyValueHistorySkippedEntry' :: BatchGetAssetPropertyValueHistorySkippedEntry
-> BatchEntryCompletionStatus
$sel:entryId:BatchGetAssetPropertyValueHistorySkippedEntry' :: BatchGetAssetPropertyValueHistorySkippedEntry -> Text
$sel:errorInfo:BatchGetAssetPropertyValueHistorySkippedEntry' :: BatchGetAssetPropertyValueHistorySkippedEntry
-> Maybe BatchGetAssetPropertyValueHistoryErrorInfo
..} =
      forall a. NFData a => a -> ()
Prelude.rnf Maybe BatchGetAssetPropertyValueHistoryErrorInfo
errorInfo
        seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
entryId
        seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf BatchEntryCompletionStatus
completionStatus