{-# 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.BatchUpdateDevicePosition
-- 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)
--
-- Uploads position update data for one or more devices to a tracker
-- resource. Amazon Location uses the data when it reports the last known
-- device position and position history. Amazon Location retains location
-- data for 30 days.
--
-- Position updates are handled based on the @PositionFiltering@ property
-- of the tracker. When @PositionFiltering@ is set to @TimeBased@, updates
-- are evaluated against linked geofence collections, and location data is
-- stored at a maximum of one position per 30 second interval. If your
-- update frequency is more often than every 30 seconds, only one update
-- per 30 seconds is stored for each unique device ID. When
-- @PositionFiltering@ is set to @DistanceBased@ filtering, location data
-- is stored and evaluated against linked geofence collections only if the
-- device has moved more than 30 m (98.4 ft).
module Amazonka.Location.BatchUpdateDevicePosition
  ( -- * Creating a Request
    BatchUpdateDevicePosition (..),
    newBatchUpdateDevicePosition,

    -- * Request Lenses
    batchUpdateDevicePosition_trackerName,
    batchUpdateDevicePosition_updates,

    -- * Destructuring the Response
    BatchUpdateDevicePositionResponse (..),
    newBatchUpdateDevicePositionResponse,

    -- * Response Lenses
    batchUpdateDevicePositionResponse_httpStatus,
    batchUpdateDevicePositionResponse_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:/ 'newBatchUpdateDevicePosition' smart constructor.
data BatchUpdateDevicePosition = BatchUpdateDevicePosition'
  { -- | The name of the tracker resource to update.
    BatchUpdateDevicePosition -> Text
trackerName :: Prelude.Text,
    -- | Contains the position update details for each device.
    BatchUpdateDevicePosition -> NonEmpty DevicePositionUpdate
updates :: Prelude.NonEmpty DevicePositionUpdate
  }
  deriving (BatchUpdateDevicePosition -> BatchUpdateDevicePosition -> Bool
(BatchUpdateDevicePosition -> BatchUpdateDevicePosition -> Bool)
-> (BatchUpdateDevicePosition -> BatchUpdateDevicePosition -> Bool)
-> Eq BatchUpdateDevicePosition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchUpdateDevicePosition -> BatchUpdateDevicePosition -> Bool
$c/= :: BatchUpdateDevicePosition -> BatchUpdateDevicePosition -> Bool
== :: BatchUpdateDevicePosition -> BatchUpdateDevicePosition -> Bool
$c== :: BatchUpdateDevicePosition -> BatchUpdateDevicePosition -> Bool
Prelude.Eq, Int -> BatchUpdateDevicePosition -> ShowS
[BatchUpdateDevicePosition] -> ShowS
BatchUpdateDevicePosition -> String
(Int -> BatchUpdateDevicePosition -> ShowS)
-> (BatchUpdateDevicePosition -> String)
-> ([BatchUpdateDevicePosition] -> ShowS)
-> Show BatchUpdateDevicePosition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchUpdateDevicePosition] -> ShowS
$cshowList :: [BatchUpdateDevicePosition] -> ShowS
show :: BatchUpdateDevicePosition -> String
$cshow :: BatchUpdateDevicePosition -> String
showsPrec :: Int -> BatchUpdateDevicePosition -> ShowS
$cshowsPrec :: Int -> BatchUpdateDevicePosition -> ShowS
Prelude.Show, (forall x.
 BatchUpdateDevicePosition -> Rep BatchUpdateDevicePosition x)
-> (forall x.
    Rep BatchUpdateDevicePosition x -> BatchUpdateDevicePosition)
-> Generic BatchUpdateDevicePosition
forall x.
Rep BatchUpdateDevicePosition x -> BatchUpdateDevicePosition
forall x.
BatchUpdateDevicePosition -> Rep BatchUpdateDevicePosition x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchUpdateDevicePosition x -> BatchUpdateDevicePosition
$cfrom :: forall x.
BatchUpdateDevicePosition -> Rep BatchUpdateDevicePosition x
Prelude.Generic)

-- |
-- Create a value of 'BatchUpdateDevicePosition' 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:
--
-- 'trackerName', 'batchUpdateDevicePosition_trackerName' - The name of the tracker resource to update.
--
-- 'updates', 'batchUpdateDevicePosition_updates' - Contains the position update details for each device.
newBatchUpdateDevicePosition ::
  -- | 'trackerName'
  Prelude.Text ->
  -- | 'updates'
  Prelude.NonEmpty DevicePositionUpdate ->
  BatchUpdateDevicePosition
newBatchUpdateDevicePosition :: Text -> NonEmpty DevicePositionUpdate -> BatchUpdateDevicePosition
newBatchUpdateDevicePosition Text
pTrackerName_ NonEmpty DevicePositionUpdate
pUpdates_ =
  BatchUpdateDevicePosition' :: Text -> NonEmpty DevicePositionUpdate -> BatchUpdateDevicePosition
BatchUpdateDevicePosition'
    { $sel:trackerName:BatchUpdateDevicePosition' :: Text
trackerName =
        Text
pTrackerName_,
      $sel:updates:BatchUpdateDevicePosition' :: NonEmpty DevicePositionUpdate
updates = Tagged
  (NonEmpty DevicePositionUpdate)
  (Identity (NonEmpty DevicePositionUpdate))
-> Tagged
     (NonEmpty DevicePositionUpdate)
     (Identity (NonEmpty DevicePositionUpdate))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced (Tagged
   (NonEmpty DevicePositionUpdate)
   (Identity (NonEmpty DevicePositionUpdate))
 -> Tagged
      (NonEmpty DevicePositionUpdate)
      (Identity (NonEmpty DevicePositionUpdate)))
-> NonEmpty DevicePositionUpdate -> NonEmpty DevicePositionUpdate
forall t b. AReview t b -> b -> t
Lens.# NonEmpty DevicePositionUpdate
pUpdates_
    }

-- | The name of the tracker resource to update.
batchUpdateDevicePosition_trackerName :: Lens.Lens' BatchUpdateDevicePosition Prelude.Text
batchUpdateDevicePosition_trackerName :: (Text -> f Text)
-> BatchUpdateDevicePosition -> f BatchUpdateDevicePosition
batchUpdateDevicePosition_trackerName = (BatchUpdateDevicePosition -> Text)
-> (BatchUpdateDevicePosition -> Text -> BatchUpdateDevicePosition)
-> Lens
     BatchUpdateDevicePosition BatchUpdateDevicePosition Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchUpdateDevicePosition' {Text
trackerName :: Text
$sel:trackerName:BatchUpdateDevicePosition' :: BatchUpdateDevicePosition -> Text
trackerName} -> Text
trackerName) (\s :: BatchUpdateDevicePosition
s@BatchUpdateDevicePosition' {} Text
a -> BatchUpdateDevicePosition
s {$sel:trackerName:BatchUpdateDevicePosition' :: Text
trackerName = Text
a} :: BatchUpdateDevicePosition)

-- | Contains the position update details for each device.
batchUpdateDevicePosition_updates :: Lens.Lens' BatchUpdateDevicePosition (Prelude.NonEmpty DevicePositionUpdate)
batchUpdateDevicePosition_updates :: (NonEmpty DevicePositionUpdate
 -> f (NonEmpty DevicePositionUpdate))
-> BatchUpdateDevicePosition -> f BatchUpdateDevicePosition
batchUpdateDevicePosition_updates = (BatchUpdateDevicePosition -> NonEmpty DevicePositionUpdate)
-> (BatchUpdateDevicePosition
    -> NonEmpty DevicePositionUpdate -> BatchUpdateDevicePosition)
-> Lens
     BatchUpdateDevicePosition
     BatchUpdateDevicePosition
     (NonEmpty DevicePositionUpdate)
     (NonEmpty DevicePositionUpdate)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchUpdateDevicePosition' {NonEmpty DevicePositionUpdate
updates :: NonEmpty DevicePositionUpdate
$sel:updates:BatchUpdateDevicePosition' :: BatchUpdateDevicePosition -> NonEmpty DevicePositionUpdate
updates} -> NonEmpty DevicePositionUpdate
updates) (\s :: BatchUpdateDevicePosition
s@BatchUpdateDevicePosition' {} NonEmpty DevicePositionUpdate
a -> BatchUpdateDevicePosition
s {$sel:updates:BatchUpdateDevicePosition' :: NonEmpty DevicePositionUpdate
updates = NonEmpty DevicePositionUpdate
a} :: BatchUpdateDevicePosition) ((NonEmpty DevicePositionUpdate
  -> f (NonEmpty DevicePositionUpdate))
 -> BatchUpdateDevicePosition -> f BatchUpdateDevicePosition)
-> ((NonEmpty DevicePositionUpdate
     -> f (NonEmpty DevicePositionUpdate))
    -> NonEmpty DevicePositionUpdate
    -> f (NonEmpty DevicePositionUpdate))
-> (NonEmpty DevicePositionUpdate
    -> f (NonEmpty DevicePositionUpdate))
-> BatchUpdateDevicePosition
-> f BatchUpdateDevicePosition
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (NonEmpty DevicePositionUpdate
 -> f (NonEmpty DevicePositionUpdate))
-> NonEmpty DevicePositionUpdate
-> f (NonEmpty DevicePositionUpdate)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.AWSRequest BatchUpdateDevicePosition where
  type
    AWSResponse BatchUpdateDevicePosition =
      BatchUpdateDevicePositionResponse
  request :: BatchUpdateDevicePosition -> Request BatchUpdateDevicePosition
request = Service
-> BatchUpdateDevicePosition -> Request BatchUpdateDevicePosition
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy BatchUpdateDevicePosition
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse BatchUpdateDevicePosition)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse BatchUpdateDevicePosition))
-> Logger
-> Service
-> Proxy BatchUpdateDevicePosition
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse BatchUpdateDevicePosition)))
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
-> [BatchUpdateDevicePositionError]
-> BatchUpdateDevicePositionResponse
BatchUpdateDevicePositionResponse'
            (Int
 -> [BatchUpdateDevicePositionError]
 -> BatchUpdateDevicePositionResponse)
-> Either String Int
-> Either
     String
     ([BatchUpdateDevicePositionError]
      -> BatchUpdateDevicePositionResponse)
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
  ([BatchUpdateDevicePositionError]
   -> BatchUpdateDevicePositionResponse)
-> Either String [BatchUpdateDevicePositionError]
-> Either String BatchUpdateDevicePositionResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Either String (Maybe [BatchUpdateDevicePositionError])
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Errors" Either String (Maybe [BatchUpdateDevicePositionError])
-> [BatchUpdateDevicePositionError]
-> Either String [BatchUpdateDevicePositionError]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [BatchUpdateDevicePositionError]
forall a. Monoid a => a
Prelude.mempty)
      )

instance Prelude.Hashable BatchUpdateDevicePosition

instance Prelude.NFData BatchUpdateDevicePosition

instance Core.ToHeaders BatchUpdateDevicePosition where
  toHeaders :: BatchUpdateDevicePosition -> ResponseHeaders
toHeaders =
    ResponseHeaders -> BatchUpdateDevicePosition -> 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 BatchUpdateDevicePosition where
  toJSON :: BatchUpdateDevicePosition -> Value
toJSON BatchUpdateDevicePosition' {NonEmpty DevicePositionUpdate
Text
updates :: NonEmpty DevicePositionUpdate
trackerName :: Text
$sel:updates:BatchUpdateDevicePosition' :: BatchUpdateDevicePosition -> NonEmpty DevicePositionUpdate
$sel:trackerName:BatchUpdateDevicePosition' :: BatchUpdateDevicePosition -> 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
"Updates" Text -> NonEmpty DevicePositionUpdate -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= NonEmpty DevicePositionUpdate
updates)]
      )

instance Core.ToPath BatchUpdateDevicePosition where
  toPath :: BatchUpdateDevicePosition -> ByteString
toPath BatchUpdateDevicePosition' {NonEmpty DevicePositionUpdate
Text
updates :: NonEmpty DevicePositionUpdate
trackerName :: Text
$sel:updates:BatchUpdateDevicePosition' :: BatchUpdateDevicePosition -> NonEmpty DevicePositionUpdate
$sel:trackerName:BatchUpdateDevicePosition' :: BatchUpdateDevicePosition -> 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
"/positions"
      ]

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

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

-- |
-- Create a value of 'BatchUpdateDevicePositionResponse' 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', 'batchUpdateDevicePositionResponse_httpStatus' - The response's http status code.
--
-- 'errors', 'batchUpdateDevicePositionResponse_errors' - Contains error details for each device that failed to update its
-- position.
newBatchUpdateDevicePositionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  BatchUpdateDevicePositionResponse
newBatchUpdateDevicePositionResponse :: Int -> BatchUpdateDevicePositionResponse
newBatchUpdateDevicePositionResponse Int
pHttpStatus_ =
  BatchUpdateDevicePositionResponse' :: Int
-> [BatchUpdateDevicePositionError]
-> BatchUpdateDevicePositionResponse
BatchUpdateDevicePositionResponse'
    { $sel:httpStatus:BatchUpdateDevicePositionResponse' :: Int
httpStatus =
        Int
pHttpStatus_,
      $sel:errors:BatchUpdateDevicePositionResponse' :: [BatchUpdateDevicePositionError]
errors = [BatchUpdateDevicePositionError]
forall a. Monoid a => a
Prelude.mempty
    }

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

-- | Contains error details for each device that failed to update its
-- position.
batchUpdateDevicePositionResponse_errors :: Lens.Lens' BatchUpdateDevicePositionResponse [BatchUpdateDevicePositionError]
batchUpdateDevicePositionResponse_errors :: ([BatchUpdateDevicePositionError]
 -> f [BatchUpdateDevicePositionError])
-> BatchUpdateDevicePositionResponse
-> f BatchUpdateDevicePositionResponse
batchUpdateDevicePositionResponse_errors = (BatchUpdateDevicePositionResponse
 -> [BatchUpdateDevicePositionError])
-> (BatchUpdateDevicePositionResponse
    -> [BatchUpdateDevicePositionError]
    -> BatchUpdateDevicePositionResponse)
-> Lens
     BatchUpdateDevicePositionResponse
     BatchUpdateDevicePositionResponse
     [BatchUpdateDevicePositionError]
     [BatchUpdateDevicePositionError]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchUpdateDevicePositionResponse' {[BatchUpdateDevicePositionError]
errors :: [BatchUpdateDevicePositionError]
$sel:errors:BatchUpdateDevicePositionResponse' :: BatchUpdateDevicePositionResponse
-> [BatchUpdateDevicePositionError]
errors} -> [BatchUpdateDevicePositionError]
errors) (\s :: BatchUpdateDevicePositionResponse
s@BatchUpdateDevicePositionResponse' {} [BatchUpdateDevicePositionError]
a -> BatchUpdateDevicePositionResponse
s {$sel:errors:BatchUpdateDevicePositionResponse' :: [BatchUpdateDevicePositionError]
errors = [BatchUpdateDevicePositionError]
a} :: BatchUpdateDevicePositionResponse) (([BatchUpdateDevicePositionError]
  -> f [BatchUpdateDevicePositionError])
 -> BatchUpdateDevicePositionResponse
 -> f BatchUpdateDevicePositionResponse)
-> (([BatchUpdateDevicePositionError]
     -> f [BatchUpdateDevicePositionError])
    -> [BatchUpdateDevicePositionError]
    -> f [BatchUpdateDevicePositionError])
-> ([BatchUpdateDevicePositionError]
    -> f [BatchUpdateDevicePositionError])
-> BatchUpdateDevicePositionResponse
-> f BatchUpdateDevicePositionResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([BatchUpdateDevicePositionError]
 -> f [BatchUpdateDevicePositionError])
-> [BatchUpdateDevicePositionError]
-> f [BatchUpdateDevicePositionError]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance
  Prelude.NFData
    BatchUpdateDevicePositionResponse