{-# 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.Location.Types.BatchDeleteDevicePositionHistoryError
-- 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.Location.Types.BatchDeleteDevicePositionHistoryError where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Location.Types.BatchItemError
import qualified Amazonka.Prelude as Prelude

-- | Contains the tracker resource details.
--
-- /See:/ 'newBatchDeleteDevicePositionHistoryError' smart constructor.
data BatchDeleteDevicePositionHistoryError = BatchDeleteDevicePositionHistoryError'
  { -- | The ID of the device for this position.
    BatchDeleteDevicePositionHistoryError -> Text
deviceId :: Prelude.Text,
    BatchDeleteDevicePositionHistoryError -> BatchItemError
error :: BatchItemError
  }
  deriving (BatchDeleteDevicePositionHistoryError
-> BatchDeleteDevicePositionHistoryError -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchDeleteDevicePositionHistoryError
-> BatchDeleteDevicePositionHistoryError -> Bool
$c/= :: BatchDeleteDevicePositionHistoryError
-> BatchDeleteDevicePositionHistoryError -> Bool
== :: BatchDeleteDevicePositionHistoryError
-> BatchDeleteDevicePositionHistoryError -> Bool
$c== :: BatchDeleteDevicePositionHistoryError
-> BatchDeleteDevicePositionHistoryError -> Bool
Prelude.Eq, ReadPrec [BatchDeleteDevicePositionHistoryError]
ReadPrec BatchDeleteDevicePositionHistoryError
Int -> ReadS BatchDeleteDevicePositionHistoryError
ReadS [BatchDeleteDevicePositionHistoryError]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchDeleteDevicePositionHistoryError]
$creadListPrec :: ReadPrec [BatchDeleteDevicePositionHistoryError]
readPrec :: ReadPrec BatchDeleteDevicePositionHistoryError
$creadPrec :: ReadPrec BatchDeleteDevicePositionHistoryError
readList :: ReadS [BatchDeleteDevicePositionHistoryError]
$creadList :: ReadS [BatchDeleteDevicePositionHistoryError]
readsPrec :: Int -> ReadS BatchDeleteDevicePositionHistoryError
$creadsPrec :: Int -> ReadS BatchDeleteDevicePositionHistoryError
Prelude.Read, Int -> BatchDeleteDevicePositionHistoryError -> ShowS
[BatchDeleteDevicePositionHistoryError] -> ShowS
BatchDeleteDevicePositionHistoryError -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchDeleteDevicePositionHistoryError] -> ShowS
$cshowList :: [BatchDeleteDevicePositionHistoryError] -> ShowS
show :: BatchDeleteDevicePositionHistoryError -> String
$cshow :: BatchDeleteDevicePositionHistoryError -> String
showsPrec :: Int -> BatchDeleteDevicePositionHistoryError -> ShowS
$cshowsPrec :: Int -> BatchDeleteDevicePositionHistoryError -> ShowS
Prelude.Show, forall x.
Rep BatchDeleteDevicePositionHistoryError x
-> BatchDeleteDevicePositionHistoryError
forall x.
BatchDeleteDevicePositionHistoryError
-> Rep BatchDeleteDevicePositionHistoryError x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchDeleteDevicePositionHistoryError x
-> BatchDeleteDevicePositionHistoryError
$cfrom :: forall x.
BatchDeleteDevicePositionHistoryError
-> Rep BatchDeleteDevicePositionHistoryError x
Prelude.Generic)

-- |
-- Create a value of 'BatchDeleteDevicePositionHistoryError' 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:
--
-- 'deviceId', 'batchDeleteDevicePositionHistoryError_deviceId' - The ID of the device for this position.
--
-- 'error', 'batchDeleteDevicePositionHistoryError_error' - Undocumented member.
newBatchDeleteDevicePositionHistoryError ::
  -- | 'deviceId'
  Prelude.Text ->
  -- | 'error'
  BatchItemError ->
  BatchDeleteDevicePositionHistoryError
newBatchDeleteDevicePositionHistoryError :: Text -> BatchItemError -> BatchDeleteDevicePositionHistoryError
newBatchDeleteDevicePositionHistoryError
  Text
pDeviceId_
  BatchItemError
pError_ =
    BatchDeleteDevicePositionHistoryError'
      { $sel:deviceId:BatchDeleteDevicePositionHistoryError' :: Text
deviceId =
          Text
pDeviceId_,
        $sel:error:BatchDeleteDevicePositionHistoryError' :: BatchItemError
error = BatchItemError
pError_
      }

-- | The ID of the device for this position.
batchDeleteDevicePositionHistoryError_deviceId :: Lens.Lens' BatchDeleteDevicePositionHistoryError Prelude.Text
batchDeleteDevicePositionHistoryError_deviceId :: Lens' BatchDeleteDevicePositionHistoryError Text
batchDeleteDevicePositionHistoryError_deviceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchDeleteDevicePositionHistoryError' {Text
deviceId :: Text
$sel:deviceId:BatchDeleteDevicePositionHistoryError' :: BatchDeleteDevicePositionHistoryError -> Text
deviceId} -> Text
deviceId) (\s :: BatchDeleteDevicePositionHistoryError
s@BatchDeleteDevicePositionHistoryError' {} Text
a -> BatchDeleteDevicePositionHistoryError
s {$sel:deviceId:BatchDeleteDevicePositionHistoryError' :: Text
deviceId = Text
a} :: BatchDeleteDevicePositionHistoryError)

-- | Undocumented member.
batchDeleteDevicePositionHistoryError_error :: Lens.Lens' BatchDeleteDevicePositionHistoryError BatchItemError
batchDeleteDevicePositionHistoryError_error :: Lens' BatchDeleteDevicePositionHistoryError BatchItemError
batchDeleteDevicePositionHistoryError_error = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchDeleteDevicePositionHistoryError' {BatchItemError
error :: BatchItemError
$sel:error:BatchDeleteDevicePositionHistoryError' :: BatchDeleteDevicePositionHistoryError -> BatchItemError
error} -> BatchItemError
error) (\s :: BatchDeleteDevicePositionHistoryError
s@BatchDeleteDevicePositionHistoryError' {} BatchItemError
a -> BatchDeleteDevicePositionHistoryError
s {$sel:error:BatchDeleteDevicePositionHistoryError' :: BatchItemError
error = BatchItemError
a} :: BatchDeleteDevicePositionHistoryError)

instance
  Data.FromJSON
    BatchDeleteDevicePositionHistoryError
  where
  parseJSON :: Value -> Parser BatchDeleteDevicePositionHistoryError
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"BatchDeleteDevicePositionHistoryError"
      ( \Object
x ->
          Text -> BatchItemError -> BatchDeleteDevicePositionHistoryError
BatchDeleteDevicePositionHistoryError'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"DeviceId")
            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
"Error")
      )

instance
  Prelude.Hashable
    BatchDeleteDevicePositionHistoryError
  where
  hashWithSalt :: Int -> BatchDeleteDevicePositionHistoryError -> Int
hashWithSalt
    Int
_salt
    BatchDeleteDevicePositionHistoryError' {Text
BatchItemError
error :: BatchItemError
deviceId :: Text
$sel:error:BatchDeleteDevicePositionHistoryError' :: BatchDeleteDevicePositionHistoryError -> BatchItemError
$sel:deviceId:BatchDeleteDevicePositionHistoryError' :: BatchDeleteDevicePositionHistoryError -> Text
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
deviceId
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` BatchItemError
error

instance
  Prelude.NFData
    BatchDeleteDevicePositionHistoryError
  where
  rnf :: BatchDeleteDevicePositionHistoryError -> ()
rnf BatchDeleteDevicePositionHistoryError' {Text
BatchItemError
error :: BatchItemError
deviceId :: Text
$sel:error:BatchDeleteDevicePositionHistoryError' :: BatchDeleteDevicePositionHistoryError -> BatchItemError
$sel:deviceId:BatchDeleteDevicePositionHistoryError' :: BatchDeleteDevicePositionHistoryError -> Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Text
deviceId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf BatchItemError
error