{-# 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.Location.BatchDeleteDevicePositionHistory
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Deletes the position history of one or more devices from a tracker
-- resource.
module Amazonka.Location.BatchDeleteDevicePositionHistory
  ( -- * Creating a Request
    BatchDeleteDevicePositionHistory (..),
    newBatchDeleteDevicePositionHistory,

    -- * Request Lenses
    batchDeleteDevicePositionHistory_deviceIds,
    batchDeleteDevicePositionHistory_trackerName,

    -- * Destructuring the Response
    BatchDeleteDevicePositionHistoryResponse (..),
    newBatchDeleteDevicePositionHistoryResponse,

    -- * Response Lenses
    batchDeleteDevicePositionHistoryResponse_httpStatus,
    batchDeleteDevicePositionHistoryResponse_errors,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Location.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newBatchDeleteDevicePositionHistory' smart constructor.
data BatchDeleteDevicePositionHistory = BatchDeleteDevicePositionHistory'
  { -- | Devices whose position history you want to delete.
    --
    -- -   For example, for two devices: @“DeviceIds” : [DeviceId1,DeviceId2]@
    BatchDeleteDevicePositionHistory -> NonEmpty Text
deviceIds :: Prelude.NonEmpty Prelude.Text,
    -- | The name of the tracker resource to delete the device position history
    -- from.
    BatchDeleteDevicePositionHistory -> Text
trackerName :: Prelude.Text
  }
  deriving (BatchDeleteDevicePositionHistory
-> BatchDeleteDevicePositionHistory -> Bool
(BatchDeleteDevicePositionHistory
 -> BatchDeleteDevicePositionHistory -> Bool)
-> (BatchDeleteDevicePositionHistory
    -> BatchDeleteDevicePositionHistory -> Bool)
-> Eq BatchDeleteDevicePositionHistory
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchDeleteDevicePositionHistory
-> BatchDeleteDevicePositionHistory -> Bool
$c/= :: BatchDeleteDevicePositionHistory
-> BatchDeleteDevicePositionHistory -> Bool
== :: BatchDeleteDevicePositionHistory
-> BatchDeleteDevicePositionHistory -> Bool
$c== :: BatchDeleteDevicePositionHistory
-> BatchDeleteDevicePositionHistory -> Bool
Prelude.Eq, ReadPrec [BatchDeleteDevicePositionHistory]
ReadPrec BatchDeleteDevicePositionHistory
Int -> ReadS BatchDeleteDevicePositionHistory
ReadS [BatchDeleteDevicePositionHistory]
(Int -> ReadS BatchDeleteDevicePositionHistory)
-> ReadS [BatchDeleteDevicePositionHistory]
-> ReadPrec BatchDeleteDevicePositionHistory
-> ReadPrec [BatchDeleteDevicePositionHistory]
-> Read BatchDeleteDevicePositionHistory
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchDeleteDevicePositionHistory]
$creadListPrec :: ReadPrec [BatchDeleteDevicePositionHistory]
readPrec :: ReadPrec BatchDeleteDevicePositionHistory
$creadPrec :: ReadPrec BatchDeleteDevicePositionHistory
readList :: ReadS [BatchDeleteDevicePositionHistory]
$creadList :: ReadS [BatchDeleteDevicePositionHistory]
readsPrec :: Int -> ReadS BatchDeleteDevicePositionHistory
$creadsPrec :: Int -> ReadS BatchDeleteDevicePositionHistory
Prelude.Read, Int -> BatchDeleteDevicePositionHistory -> ShowS
[BatchDeleteDevicePositionHistory] -> ShowS
BatchDeleteDevicePositionHistory -> String
(Int -> BatchDeleteDevicePositionHistory -> ShowS)
-> (BatchDeleteDevicePositionHistory -> String)
-> ([BatchDeleteDevicePositionHistory] -> ShowS)
-> Show BatchDeleteDevicePositionHistory
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchDeleteDevicePositionHistory] -> ShowS
$cshowList :: [BatchDeleteDevicePositionHistory] -> ShowS
show :: BatchDeleteDevicePositionHistory -> String
$cshow :: BatchDeleteDevicePositionHistory -> String
showsPrec :: Int -> BatchDeleteDevicePositionHistory -> ShowS
$cshowsPrec :: Int -> BatchDeleteDevicePositionHistory -> ShowS
Prelude.Show, (forall x.
 BatchDeleteDevicePositionHistory
 -> Rep BatchDeleteDevicePositionHistory x)
-> (forall x.
    Rep BatchDeleteDevicePositionHistory x
    -> BatchDeleteDevicePositionHistory)
-> Generic BatchDeleteDevicePositionHistory
forall x.
Rep BatchDeleteDevicePositionHistory x
-> BatchDeleteDevicePositionHistory
forall x.
BatchDeleteDevicePositionHistory
-> Rep BatchDeleteDevicePositionHistory x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchDeleteDevicePositionHistory x
-> BatchDeleteDevicePositionHistory
$cfrom :: forall x.
BatchDeleteDevicePositionHistory
-> Rep BatchDeleteDevicePositionHistory x
Prelude.Generic)

-- |
-- Create a value of 'BatchDeleteDevicePositionHistory' 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:
--
-- 'deviceIds', 'batchDeleteDevicePositionHistory_deviceIds' - Devices whose position history you want to delete.
--
-- -   For example, for two devices: @“DeviceIds” : [DeviceId1,DeviceId2]@
--
-- 'trackerName', 'batchDeleteDevicePositionHistory_trackerName' - The name of the tracker resource to delete the device position history
-- from.
newBatchDeleteDevicePositionHistory ::
  -- | 'deviceIds'
  Prelude.NonEmpty Prelude.Text ->
  -- | 'trackerName'
  Prelude.Text ->
  BatchDeleteDevicePositionHistory
newBatchDeleteDevicePositionHistory :: NonEmpty Text -> Text -> BatchDeleteDevicePositionHistory
newBatchDeleteDevicePositionHistory
  NonEmpty Text
pDeviceIds_
  Text
pTrackerName_ =
    BatchDeleteDevicePositionHistory' :: NonEmpty Text -> Text -> BatchDeleteDevicePositionHistory
BatchDeleteDevicePositionHistory'
      { $sel:deviceIds:BatchDeleteDevicePositionHistory' :: NonEmpty Text
deviceIds =
          Tagged (NonEmpty Text) (Identity (NonEmpty Text))
-> Tagged (NonEmpty Text) (Identity (NonEmpty Text))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced (Tagged (NonEmpty Text) (Identity (NonEmpty Text))
 -> Tagged (NonEmpty Text) (Identity (NonEmpty Text)))
-> NonEmpty Text -> NonEmpty Text
forall t b. AReview t b -> b -> t
Lens.# NonEmpty Text
pDeviceIds_,
        $sel:trackerName:BatchDeleteDevicePositionHistory' :: Text
trackerName = Text
pTrackerName_
      }

-- | Devices whose position history you want to delete.
--
-- -   For example, for two devices: @“DeviceIds” : [DeviceId1,DeviceId2]@
batchDeleteDevicePositionHistory_deviceIds :: Lens.Lens' BatchDeleteDevicePositionHistory (Prelude.NonEmpty Prelude.Text)
batchDeleteDevicePositionHistory_deviceIds :: (NonEmpty Text -> f (NonEmpty Text))
-> BatchDeleteDevicePositionHistory
-> f BatchDeleteDevicePositionHistory
batchDeleteDevicePositionHistory_deviceIds = (BatchDeleteDevicePositionHistory -> NonEmpty Text)
-> (BatchDeleteDevicePositionHistory
    -> NonEmpty Text -> BatchDeleteDevicePositionHistory)
-> Lens
     BatchDeleteDevicePositionHistory
     BatchDeleteDevicePositionHistory
     (NonEmpty Text)
     (NonEmpty Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchDeleteDevicePositionHistory' {NonEmpty Text
deviceIds :: NonEmpty Text
$sel:deviceIds:BatchDeleteDevicePositionHistory' :: BatchDeleteDevicePositionHistory -> NonEmpty Text
deviceIds} -> NonEmpty Text
deviceIds) (\s :: BatchDeleteDevicePositionHistory
s@BatchDeleteDevicePositionHistory' {} NonEmpty Text
a -> BatchDeleteDevicePositionHistory
s {$sel:deviceIds:BatchDeleteDevicePositionHistory' :: NonEmpty Text
deviceIds = NonEmpty Text
a} :: BatchDeleteDevicePositionHistory) ((NonEmpty Text -> f (NonEmpty Text))
 -> BatchDeleteDevicePositionHistory
 -> f BatchDeleteDevicePositionHistory)
-> ((NonEmpty Text -> f (NonEmpty Text))
    -> NonEmpty Text -> f (NonEmpty Text))
-> (NonEmpty Text -> f (NonEmpty Text))
-> BatchDeleteDevicePositionHistory
-> f BatchDeleteDevicePositionHistory
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (NonEmpty Text -> f (NonEmpty Text))
-> NonEmpty Text -> f (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of the tracker resource to delete the device position history
-- from.
batchDeleteDevicePositionHistory_trackerName :: Lens.Lens' BatchDeleteDevicePositionHistory Prelude.Text
batchDeleteDevicePositionHistory_trackerName :: (Text -> f Text)
-> BatchDeleteDevicePositionHistory
-> f BatchDeleteDevicePositionHistory
batchDeleteDevicePositionHistory_trackerName = (BatchDeleteDevicePositionHistory -> Text)
-> (BatchDeleteDevicePositionHistory
    -> Text -> BatchDeleteDevicePositionHistory)
-> Lens
     BatchDeleteDevicePositionHistory
     BatchDeleteDevicePositionHistory
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchDeleteDevicePositionHistory' {Text
trackerName :: Text
$sel:trackerName:BatchDeleteDevicePositionHistory' :: BatchDeleteDevicePositionHistory -> Text
trackerName} -> Text
trackerName) (\s :: BatchDeleteDevicePositionHistory
s@BatchDeleteDevicePositionHistory' {} Text
a -> BatchDeleteDevicePositionHistory
s {$sel:trackerName:BatchDeleteDevicePositionHistory' :: Text
trackerName = Text
a} :: BatchDeleteDevicePositionHistory)

instance
  Core.AWSRequest
    BatchDeleteDevicePositionHistory
  where
  type
    AWSResponse BatchDeleteDevicePositionHistory =
      BatchDeleteDevicePositionHistoryResponse
  request :: BatchDeleteDevicePositionHistory
-> Request BatchDeleteDevicePositionHistory
request = Service
-> BatchDeleteDevicePositionHistory
-> Request BatchDeleteDevicePositionHistory
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy BatchDeleteDevicePositionHistory
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse BatchDeleteDevicePositionHistory)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse BatchDeleteDevicePositionHistory))
-> Logger
-> Service
-> Proxy BatchDeleteDevicePositionHistory
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse BatchDeleteDevicePositionHistory)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Int
-> [BatchDeleteDevicePositionHistoryError]
-> BatchDeleteDevicePositionHistoryResponse
BatchDeleteDevicePositionHistoryResponse'
            (Int
 -> [BatchDeleteDevicePositionHistoryError]
 -> BatchDeleteDevicePositionHistoryResponse)
-> Either String Int
-> Either
     String
     ([BatchDeleteDevicePositionHistoryError]
      -> BatchDeleteDevicePositionHistoryResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
            Either
  String
  ([BatchDeleteDevicePositionHistoryError]
   -> BatchDeleteDevicePositionHistoryResponse)
-> Either String [BatchDeleteDevicePositionHistoryError]
-> Either String BatchDeleteDevicePositionHistoryResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text
-> Either String (Maybe [BatchDeleteDevicePositionHistoryError])
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Errors" Either String (Maybe [BatchDeleteDevicePositionHistoryError])
-> [BatchDeleteDevicePositionHistoryError]
-> Either String [BatchDeleteDevicePositionHistoryError]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [BatchDeleteDevicePositionHistoryError]
forall a. Monoid a => a
Prelude.mempty)
      )

instance
  Prelude.Hashable
    BatchDeleteDevicePositionHistory

instance
  Prelude.NFData
    BatchDeleteDevicePositionHistory

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

instance Core.ToJSON BatchDeleteDevicePositionHistory where
  toJSON :: BatchDeleteDevicePositionHistory -> Value
toJSON BatchDeleteDevicePositionHistory' {NonEmpty Text
Text
trackerName :: Text
deviceIds :: NonEmpty Text
$sel:trackerName:BatchDeleteDevicePositionHistory' :: BatchDeleteDevicePositionHistory -> Text
$sel:deviceIds:BatchDeleteDevicePositionHistory' :: BatchDeleteDevicePositionHistory -> NonEmpty Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"DeviceIds" Text -> NonEmpty Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= NonEmpty Text
deviceIds)]
      )

instance Core.ToPath BatchDeleteDevicePositionHistory where
  toPath :: BatchDeleteDevicePositionHistory -> ByteString
toPath BatchDeleteDevicePositionHistory' {NonEmpty Text
Text
trackerName :: Text
deviceIds :: NonEmpty Text
$sel:trackerName:BatchDeleteDevicePositionHistory' :: BatchDeleteDevicePositionHistory -> Text
$sel:deviceIds:BatchDeleteDevicePositionHistory' :: BatchDeleteDevicePositionHistory -> NonEmpty Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/tracking/v0/trackers/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
trackerName,
        ByteString
"/delete-positions"
      ]

instance
  Core.ToQuery
    BatchDeleteDevicePositionHistory
  where
  toQuery :: BatchDeleteDevicePositionHistory -> QueryString
toQuery = QueryString -> BatchDeleteDevicePositionHistory -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newBatchDeleteDevicePositionHistoryResponse' smart constructor.
data BatchDeleteDevicePositionHistoryResponse = BatchDeleteDevicePositionHistoryResponse'
  { -- | The response's http status code.
    BatchDeleteDevicePositionHistoryResponse -> Int
httpStatus :: Prelude.Int,
    -- | Contains error details for each device history that failed to delete.
    BatchDeleteDevicePositionHistoryResponse
-> [BatchDeleteDevicePositionHistoryError]
errors :: [BatchDeleteDevicePositionHistoryError]
  }
  deriving (BatchDeleteDevicePositionHistoryResponse
-> BatchDeleteDevicePositionHistoryResponse -> Bool
(BatchDeleteDevicePositionHistoryResponse
 -> BatchDeleteDevicePositionHistoryResponse -> Bool)
-> (BatchDeleteDevicePositionHistoryResponse
    -> BatchDeleteDevicePositionHistoryResponse -> Bool)
-> Eq BatchDeleteDevicePositionHistoryResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchDeleteDevicePositionHistoryResponse
-> BatchDeleteDevicePositionHistoryResponse -> Bool
$c/= :: BatchDeleteDevicePositionHistoryResponse
-> BatchDeleteDevicePositionHistoryResponse -> Bool
== :: BatchDeleteDevicePositionHistoryResponse
-> BatchDeleteDevicePositionHistoryResponse -> Bool
$c== :: BatchDeleteDevicePositionHistoryResponse
-> BatchDeleteDevicePositionHistoryResponse -> Bool
Prelude.Eq, ReadPrec [BatchDeleteDevicePositionHistoryResponse]
ReadPrec BatchDeleteDevicePositionHistoryResponse
Int -> ReadS BatchDeleteDevicePositionHistoryResponse
ReadS [BatchDeleteDevicePositionHistoryResponse]
(Int -> ReadS BatchDeleteDevicePositionHistoryResponse)
-> ReadS [BatchDeleteDevicePositionHistoryResponse]
-> ReadPrec BatchDeleteDevicePositionHistoryResponse
-> ReadPrec [BatchDeleteDevicePositionHistoryResponse]
-> Read BatchDeleteDevicePositionHistoryResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchDeleteDevicePositionHistoryResponse]
$creadListPrec :: ReadPrec [BatchDeleteDevicePositionHistoryResponse]
readPrec :: ReadPrec BatchDeleteDevicePositionHistoryResponse
$creadPrec :: ReadPrec BatchDeleteDevicePositionHistoryResponse
readList :: ReadS [BatchDeleteDevicePositionHistoryResponse]
$creadList :: ReadS [BatchDeleteDevicePositionHistoryResponse]
readsPrec :: Int -> ReadS BatchDeleteDevicePositionHistoryResponse
$creadsPrec :: Int -> ReadS BatchDeleteDevicePositionHistoryResponse
Prelude.Read, Int -> BatchDeleteDevicePositionHistoryResponse -> ShowS
[BatchDeleteDevicePositionHistoryResponse] -> ShowS
BatchDeleteDevicePositionHistoryResponse -> String
(Int -> BatchDeleteDevicePositionHistoryResponse -> ShowS)
-> (BatchDeleteDevicePositionHistoryResponse -> String)
-> ([BatchDeleteDevicePositionHistoryResponse] -> ShowS)
-> Show BatchDeleteDevicePositionHistoryResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchDeleteDevicePositionHistoryResponse] -> ShowS
$cshowList :: [BatchDeleteDevicePositionHistoryResponse] -> ShowS
show :: BatchDeleteDevicePositionHistoryResponse -> String
$cshow :: BatchDeleteDevicePositionHistoryResponse -> String
showsPrec :: Int -> BatchDeleteDevicePositionHistoryResponse -> ShowS
$cshowsPrec :: Int -> BatchDeleteDevicePositionHistoryResponse -> ShowS
Prelude.Show, (forall x.
 BatchDeleteDevicePositionHistoryResponse
 -> Rep BatchDeleteDevicePositionHistoryResponse x)
-> (forall x.
    Rep BatchDeleteDevicePositionHistoryResponse x
    -> BatchDeleteDevicePositionHistoryResponse)
-> Generic BatchDeleteDevicePositionHistoryResponse
forall x.
Rep BatchDeleteDevicePositionHistoryResponse x
-> BatchDeleteDevicePositionHistoryResponse
forall x.
BatchDeleteDevicePositionHistoryResponse
-> Rep BatchDeleteDevicePositionHistoryResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchDeleteDevicePositionHistoryResponse x
-> BatchDeleteDevicePositionHistoryResponse
$cfrom :: forall x.
BatchDeleteDevicePositionHistoryResponse
-> Rep BatchDeleteDevicePositionHistoryResponse x
Prelude.Generic)

-- |
-- Create a value of 'BatchDeleteDevicePositionHistoryResponse' 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:
--
-- 'httpStatus', 'batchDeleteDevicePositionHistoryResponse_httpStatus' - The response's http status code.
--
-- 'errors', 'batchDeleteDevicePositionHistoryResponse_errors' - Contains error details for each device history that failed to delete.
newBatchDeleteDevicePositionHistoryResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  BatchDeleteDevicePositionHistoryResponse
newBatchDeleteDevicePositionHistoryResponse :: Int -> BatchDeleteDevicePositionHistoryResponse
newBatchDeleteDevicePositionHistoryResponse
  Int
pHttpStatus_ =
    BatchDeleteDevicePositionHistoryResponse' :: Int
-> [BatchDeleteDevicePositionHistoryError]
-> BatchDeleteDevicePositionHistoryResponse
BatchDeleteDevicePositionHistoryResponse'
      { $sel:httpStatus:BatchDeleteDevicePositionHistoryResponse' :: Int
httpStatus =
          Int
pHttpStatus_,
        $sel:errors:BatchDeleteDevicePositionHistoryResponse' :: [BatchDeleteDevicePositionHistoryError]
errors = [BatchDeleteDevicePositionHistoryError]
forall a. Monoid a => a
Prelude.mempty
      }

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

-- | Contains error details for each device history that failed to delete.
batchDeleteDevicePositionHistoryResponse_errors :: Lens.Lens' BatchDeleteDevicePositionHistoryResponse [BatchDeleteDevicePositionHistoryError]
batchDeleteDevicePositionHistoryResponse_errors :: ([BatchDeleteDevicePositionHistoryError]
 -> f [BatchDeleteDevicePositionHistoryError])
-> BatchDeleteDevicePositionHistoryResponse
-> f BatchDeleteDevicePositionHistoryResponse
batchDeleteDevicePositionHistoryResponse_errors = (BatchDeleteDevicePositionHistoryResponse
 -> [BatchDeleteDevicePositionHistoryError])
-> (BatchDeleteDevicePositionHistoryResponse
    -> [BatchDeleteDevicePositionHistoryError]
    -> BatchDeleteDevicePositionHistoryResponse)
-> Lens
     BatchDeleteDevicePositionHistoryResponse
     BatchDeleteDevicePositionHistoryResponse
     [BatchDeleteDevicePositionHistoryError]
     [BatchDeleteDevicePositionHistoryError]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchDeleteDevicePositionHistoryResponse' {[BatchDeleteDevicePositionHistoryError]
errors :: [BatchDeleteDevicePositionHistoryError]
$sel:errors:BatchDeleteDevicePositionHistoryResponse' :: BatchDeleteDevicePositionHistoryResponse
-> [BatchDeleteDevicePositionHistoryError]
errors} -> [BatchDeleteDevicePositionHistoryError]
errors) (\s :: BatchDeleteDevicePositionHistoryResponse
s@BatchDeleteDevicePositionHistoryResponse' {} [BatchDeleteDevicePositionHistoryError]
a -> BatchDeleteDevicePositionHistoryResponse
s {$sel:errors:BatchDeleteDevicePositionHistoryResponse' :: [BatchDeleteDevicePositionHistoryError]
errors = [BatchDeleteDevicePositionHistoryError]
a} :: BatchDeleteDevicePositionHistoryResponse) (([BatchDeleteDevicePositionHistoryError]
  -> f [BatchDeleteDevicePositionHistoryError])
 -> BatchDeleteDevicePositionHistoryResponse
 -> f BatchDeleteDevicePositionHistoryResponse)
-> (([BatchDeleteDevicePositionHistoryError]
     -> f [BatchDeleteDevicePositionHistoryError])
    -> [BatchDeleteDevicePositionHistoryError]
    -> f [BatchDeleteDevicePositionHistoryError])
-> ([BatchDeleteDevicePositionHistoryError]
    -> f [BatchDeleteDevicePositionHistoryError])
-> BatchDeleteDevicePositionHistoryResponse
-> f BatchDeleteDevicePositionHistoryResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([BatchDeleteDevicePositionHistoryError]
 -> f [BatchDeleteDevicePositionHistoryError])
-> [BatchDeleteDevicePositionHistoryError]
-> f [BatchDeleteDevicePositionHistoryError]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance
  Prelude.NFData
    BatchDeleteDevicePositionHistoryResponse