{-# 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 #-}
module Amazonka.Location.GetDevicePosition
(
GetDevicePosition (..),
newGetDevicePosition,
getDevicePosition_deviceId,
getDevicePosition_trackerName,
GetDevicePositionResponse (..),
newGetDevicePositionResponse,
getDevicePositionResponse_deviceId,
getDevicePositionResponse_httpStatus,
getDevicePositionResponse_position,
getDevicePositionResponse_receivedTime,
getDevicePositionResponse_sampleTime,
)
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
data GetDevicePosition = GetDevicePosition'
{
GetDevicePosition -> Text
deviceId :: Prelude.Text,
GetDevicePosition -> Text
trackerName :: Prelude.Text
}
deriving (GetDevicePosition -> GetDevicePosition -> Bool
(GetDevicePosition -> GetDevicePosition -> Bool)
-> (GetDevicePosition -> GetDevicePosition -> Bool)
-> Eq GetDevicePosition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetDevicePosition -> GetDevicePosition -> Bool
$c/= :: GetDevicePosition -> GetDevicePosition -> Bool
== :: GetDevicePosition -> GetDevicePosition -> Bool
$c== :: GetDevicePosition -> GetDevicePosition -> Bool
Prelude.Eq, ReadPrec [GetDevicePosition]
ReadPrec GetDevicePosition
Int -> ReadS GetDevicePosition
ReadS [GetDevicePosition]
(Int -> ReadS GetDevicePosition)
-> ReadS [GetDevicePosition]
-> ReadPrec GetDevicePosition
-> ReadPrec [GetDevicePosition]
-> Read GetDevicePosition
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetDevicePosition]
$creadListPrec :: ReadPrec [GetDevicePosition]
readPrec :: ReadPrec GetDevicePosition
$creadPrec :: ReadPrec GetDevicePosition
readList :: ReadS [GetDevicePosition]
$creadList :: ReadS [GetDevicePosition]
readsPrec :: Int -> ReadS GetDevicePosition
$creadsPrec :: Int -> ReadS GetDevicePosition
Prelude.Read, Int -> GetDevicePosition -> ShowS
[GetDevicePosition] -> ShowS
GetDevicePosition -> String
(Int -> GetDevicePosition -> ShowS)
-> (GetDevicePosition -> String)
-> ([GetDevicePosition] -> ShowS)
-> Show GetDevicePosition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetDevicePosition] -> ShowS
$cshowList :: [GetDevicePosition] -> ShowS
show :: GetDevicePosition -> String
$cshow :: GetDevicePosition -> String
showsPrec :: Int -> GetDevicePosition -> ShowS
$cshowsPrec :: Int -> GetDevicePosition -> ShowS
Prelude.Show, (forall x. GetDevicePosition -> Rep GetDevicePosition x)
-> (forall x. Rep GetDevicePosition x -> GetDevicePosition)
-> Generic GetDevicePosition
forall x. Rep GetDevicePosition x -> GetDevicePosition
forall x. GetDevicePosition -> Rep GetDevicePosition x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetDevicePosition x -> GetDevicePosition
$cfrom :: forall x. GetDevicePosition -> Rep GetDevicePosition x
Prelude.Generic)
newGetDevicePosition ::
Prelude.Text ->
Prelude.Text ->
GetDevicePosition
newGetDevicePosition :: Text -> Text -> GetDevicePosition
newGetDevicePosition Text
pDeviceId_ Text
pTrackerName_ =
GetDevicePosition' :: Text -> Text -> GetDevicePosition
GetDevicePosition'
{ $sel:deviceId:GetDevicePosition' :: Text
deviceId = Text
pDeviceId_,
$sel:trackerName:GetDevicePosition' :: Text
trackerName = Text
pTrackerName_
}
getDevicePosition_deviceId :: Lens.Lens' GetDevicePosition Prelude.Text
getDevicePosition_deviceId :: (Text -> f Text) -> GetDevicePosition -> f GetDevicePosition
getDevicePosition_deviceId = (GetDevicePosition -> Text)
-> (GetDevicePosition -> Text -> GetDevicePosition)
-> Lens GetDevicePosition GetDevicePosition Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDevicePosition' {Text
deviceId :: Text
$sel:deviceId:GetDevicePosition' :: GetDevicePosition -> Text
deviceId} -> Text
deviceId) (\s :: GetDevicePosition
s@GetDevicePosition' {} Text
a -> GetDevicePosition
s {$sel:deviceId:GetDevicePosition' :: Text
deviceId = Text
a} :: GetDevicePosition)
getDevicePosition_trackerName :: Lens.Lens' GetDevicePosition Prelude.Text
getDevicePosition_trackerName :: (Text -> f Text) -> GetDevicePosition -> f GetDevicePosition
getDevicePosition_trackerName = (GetDevicePosition -> Text)
-> (GetDevicePosition -> Text -> GetDevicePosition)
-> Lens GetDevicePosition GetDevicePosition Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDevicePosition' {Text
trackerName :: Text
$sel:trackerName:GetDevicePosition' :: GetDevicePosition -> Text
trackerName} -> Text
trackerName) (\s :: GetDevicePosition
s@GetDevicePosition' {} Text
a -> GetDevicePosition
s {$sel:trackerName:GetDevicePosition' :: Text
trackerName = Text
a} :: GetDevicePosition)
instance Core.AWSRequest GetDevicePosition where
type
AWSResponse GetDevicePosition =
GetDevicePositionResponse
request :: GetDevicePosition -> Request GetDevicePosition
request = Service -> GetDevicePosition -> Request GetDevicePosition
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
response :: Logger
-> Service
-> Proxy GetDevicePosition
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetDevicePosition)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse GetDevicePosition))
-> Logger
-> Service
-> Proxy GetDevicePosition
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetDevicePosition)))
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 ->
Maybe Text
-> Int
-> Sensitive (NonEmpty Double)
-> POSIX
-> POSIX
-> GetDevicePositionResponse
GetDevicePositionResponse'
(Maybe Text
-> Int
-> Sensitive (NonEmpty Double)
-> POSIX
-> POSIX
-> GetDevicePositionResponse)
-> Either String (Maybe Text)
-> Either
String
(Int
-> Sensitive (NonEmpty Double)
-> POSIX
-> POSIX
-> GetDevicePositionResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"DeviceId")
Either
String
(Int
-> Sensitive (NonEmpty Double)
-> POSIX
-> POSIX
-> GetDevicePositionResponse)
-> Either String Int
-> Either
String
(Sensitive (NonEmpty Double)
-> POSIX -> POSIX -> GetDevicePositionResponse)
forall (f :: * -> *) a b. Applicative f => 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
(Sensitive (NonEmpty Double)
-> POSIX -> POSIX -> GetDevicePositionResponse)
-> Either String (Sensitive (NonEmpty Double))
-> Either String (POSIX -> POSIX -> GetDevicePositionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Sensitive (NonEmpty Double))
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"Position")
Either String (POSIX -> POSIX -> GetDevicePositionResponse)
-> Either String POSIX
-> Either String (POSIX -> GetDevicePositionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String POSIX
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"ReceivedTime")
Either String (POSIX -> GetDevicePositionResponse)
-> Either String POSIX -> Either String GetDevicePositionResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String POSIX
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"SampleTime")
)
instance Prelude.Hashable GetDevicePosition
instance Prelude.NFData GetDevicePosition
instance Core.ToHeaders GetDevicePosition where
toHeaders :: GetDevicePosition -> ResponseHeaders
toHeaders =
ResponseHeaders -> GetDevicePosition -> 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.ToPath GetDevicePosition where
toPath :: GetDevicePosition -> ByteString
toPath GetDevicePosition' {Text
trackerName :: Text
deviceId :: Text
$sel:trackerName:GetDevicePosition' :: GetDevicePosition -> Text
$sel:deviceId:GetDevicePosition' :: GetDevicePosition -> 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
"/devices/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
deviceId,
ByteString
"/positions/latest"
]
instance Core.ToQuery GetDevicePosition where
toQuery :: GetDevicePosition -> QueryString
toQuery = QueryString -> GetDevicePosition -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data GetDevicePositionResponse = GetDevicePositionResponse'
{
GetDevicePositionResponse -> Maybe Text
deviceId :: Prelude.Maybe Prelude.Text,
GetDevicePositionResponse -> Int
httpStatus :: Prelude.Int,
GetDevicePositionResponse -> Sensitive (NonEmpty Double)
position :: Core.Sensitive (Prelude.NonEmpty Prelude.Double),
GetDevicePositionResponse -> POSIX
receivedTime :: Core.POSIX,
GetDevicePositionResponse -> POSIX
sampleTime :: Core.POSIX
}
deriving (GetDevicePositionResponse -> GetDevicePositionResponse -> Bool
(GetDevicePositionResponse -> GetDevicePositionResponse -> Bool)
-> (GetDevicePositionResponse -> GetDevicePositionResponse -> Bool)
-> Eq GetDevicePositionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetDevicePositionResponse -> GetDevicePositionResponse -> Bool
$c/= :: GetDevicePositionResponse -> GetDevicePositionResponse -> Bool
== :: GetDevicePositionResponse -> GetDevicePositionResponse -> Bool
$c== :: GetDevicePositionResponse -> GetDevicePositionResponse -> Bool
Prelude.Eq, Int -> GetDevicePositionResponse -> ShowS
[GetDevicePositionResponse] -> ShowS
GetDevicePositionResponse -> String
(Int -> GetDevicePositionResponse -> ShowS)
-> (GetDevicePositionResponse -> String)
-> ([GetDevicePositionResponse] -> ShowS)
-> Show GetDevicePositionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetDevicePositionResponse] -> ShowS
$cshowList :: [GetDevicePositionResponse] -> ShowS
show :: GetDevicePositionResponse -> String
$cshow :: GetDevicePositionResponse -> String
showsPrec :: Int -> GetDevicePositionResponse -> ShowS
$cshowsPrec :: Int -> GetDevicePositionResponse -> ShowS
Prelude.Show, (forall x.
GetDevicePositionResponse -> Rep GetDevicePositionResponse x)
-> (forall x.
Rep GetDevicePositionResponse x -> GetDevicePositionResponse)
-> Generic GetDevicePositionResponse
forall x.
Rep GetDevicePositionResponse x -> GetDevicePositionResponse
forall x.
GetDevicePositionResponse -> Rep GetDevicePositionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetDevicePositionResponse x -> GetDevicePositionResponse
$cfrom :: forall x.
GetDevicePositionResponse -> Rep GetDevicePositionResponse x
Prelude.Generic)
newGetDevicePositionResponse ::
Prelude.Int ->
Prelude.NonEmpty Prelude.Double ->
Prelude.UTCTime ->
Prelude.UTCTime ->
GetDevicePositionResponse
newGetDevicePositionResponse :: Int
-> NonEmpty Double
-> UTCTime
-> UTCTime
-> GetDevicePositionResponse
newGetDevicePositionResponse
Int
pHttpStatus_
NonEmpty Double
pPosition_
UTCTime
pReceivedTime_
UTCTime
pSampleTime_ =
GetDevicePositionResponse' :: Maybe Text
-> Int
-> Sensitive (NonEmpty Double)
-> POSIX
-> POSIX
-> GetDevicePositionResponse
GetDevicePositionResponse'
{ $sel:deviceId:GetDevicePositionResponse' :: Maybe Text
deviceId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetDevicePositionResponse' :: Int
httpStatus = Int
pHttpStatus_,
$sel:position:GetDevicePositionResponse' :: Sensitive (NonEmpty Double)
position =
Tagged (NonEmpty Double) (Identity (NonEmpty Double))
-> Tagged
(Sensitive (NonEmpty Double))
(Identity (Sensitive (NonEmpty Double)))
forall a. Iso' (Sensitive a) a
Core._Sensitive (Tagged (NonEmpty Double) (Identity (NonEmpty Double))
-> Tagged
(Sensitive (NonEmpty Double))
(Identity (Sensitive (NonEmpty Double))))
-> (Tagged (NonEmpty Double) (Identity (NonEmpty Double))
-> Tagged (NonEmpty Double) (Identity (NonEmpty Double)))
-> Tagged (NonEmpty Double) (Identity (NonEmpty Double))
-> Tagged
(Sensitive (NonEmpty Double))
(Identity (Sensitive (NonEmpty Double)))
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Tagged (NonEmpty Double) (Identity (NonEmpty Double))
-> Tagged (NonEmpty Double) (Identity (NonEmpty Double))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
(Tagged (NonEmpty Double) (Identity (NonEmpty Double))
-> Tagged
(Sensitive (NonEmpty Double))
(Identity (Sensitive (NonEmpty Double))))
-> NonEmpty Double -> Sensitive (NonEmpty Double)
forall t b. AReview t b -> b -> t
Lens.# NonEmpty Double
pPosition_,
$sel:receivedTime:GetDevicePositionResponse' :: POSIX
receivedTime = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
-> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pReceivedTime_,
$sel:sampleTime:GetDevicePositionResponse' :: POSIX
sampleTime = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
-> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pSampleTime_
}
getDevicePositionResponse_deviceId :: Lens.Lens' GetDevicePositionResponse (Prelude.Maybe Prelude.Text)
getDevicePositionResponse_deviceId :: (Maybe Text -> f (Maybe Text))
-> GetDevicePositionResponse -> f GetDevicePositionResponse
getDevicePositionResponse_deviceId = (GetDevicePositionResponse -> Maybe Text)
-> (GetDevicePositionResponse
-> Maybe Text -> GetDevicePositionResponse)
-> Lens
GetDevicePositionResponse
GetDevicePositionResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDevicePositionResponse' {Maybe Text
deviceId :: Maybe Text
$sel:deviceId:GetDevicePositionResponse' :: GetDevicePositionResponse -> Maybe Text
deviceId} -> Maybe Text
deviceId) (\s :: GetDevicePositionResponse
s@GetDevicePositionResponse' {} Maybe Text
a -> GetDevicePositionResponse
s {$sel:deviceId:GetDevicePositionResponse' :: Maybe Text
deviceId = Maybe Text
a} :: GetDevicePositionResponse)
getDevicePositionResponse_httpStatus :: Lens.Lens' GetDevicePositionResponse Prelude.Int
getDevicePositionResponse_httpStatus :: (Int -> f Int)
-> GetDevicePositionResponse -> f GetDevicePositionResponse
getDevicePositionResponse_httpStatus = (GetDevicePositionResponse -> Int)
-> (GetDevicePositionResponse -> Int -> GetDevicePositionResponse)
-> Lens GetDevicePositionResponse GetDevicePositionResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDevicePositionResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetDevicePositionResponse' :: GetDevicePositionResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetDevicePositionResponse
s@GetDevicePositionResponse' {} Int
a -> GetDevicePositionResponse
s {$sel:httpStatus:GetDevicePositionResponse' :: Int
httpStatus = Int
a} :: GetDevicePositionResponse)
getDevicePositionResponse_position :: Lens.Lens' GetDevicePositionResponse (Prelude.NonEmpty Prelude.Double)
getDevicePositionResponse_position :: (NonEmpty Double -> f (NonEmpty Double))
-> GetDevicePositionResponse -> f GetDevicePositionResponse
getDevicePositionResponse_position = (GetDevicePositionResponse -> Sensitive (NonEmpty Double))
-> (GetDevicePositionResponse
-> Sensitive (NonEmpty Double) -> GetDevicePositionResponse)
-> Lens
GetDevicePositionResponse
GetDevicePositionResponse
(Sensitive (NonEmpty Double))
(Sensitive (NonEmpty Double))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDevicePositionResponse' {Sensitive (NonEmpty Double)
position :: Sensitive (NonEmpty Double)
$sel:position:GetDevicePositionResponse' :: GetDevicePositionResponse -> Sensitive (NonEmpty Double)
position} -> Sensitive (NonEmpty Double)
position) (\s :: GetDevicePositionResponse
s@GetDevicePositionResponse' {} Sensitive (NonEmpty Double)
a -> GetDevicePositionResponse
s {$sel:position:GetDevicePositionResponse' :: Sensitive (NonEmpty Double)
position = Sensitive (NonEmpty Double)
a} :: GetDevicePositionResponse) ((Sensitive (NonEmpty Double) -> f (Sensitive (NonEmpty Double)))
-> GetDevicePositionResponse -> f GetDevicePositionResponse)
-> ((NonEmpty Double -> f (NonEmpty Double))
-> Sensitive (NonEmpty Double) -> f (Sensitive (NonEmpty Double)))
-> (NonEmpty Double -> f (NonEmpty Double))
-> GetDevicePositionResponse
-> f GetDevicePositionResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (NonEmpty Double -> f (NonEmpty Double))
-> Sensitive (NonEmpty Double) -> f (Sensitive (NonEmpty Double))
forall a. Iso' (Sensitive a) a
Core._Sensitive ((NonEmpty Double -> f (NonEmpty Double))
-> Sensitive (NonEmpty Double) -> f (Sensitive (NonEmpty Double)))
-> ((NonEmpty Double -> f (NonEmpty Double))
-> NonEmpty Double -> f (NonEmpty Double))
-> (NonEmpty Double -> f (NonEmpty Double))
-> Sensitive (NonEmpty Double)
-> f (Sensitive (NonEmpty Double))
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (NonEmpty Double -> f (NonEmpty Double))
-> NonEmpty Double -> f (NonEmpty Double)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
getDevicePositionResponse_receivedTime :: Lens.Lens' GetDevicePositionResponse Prelude.UTCTime
getDevicePositionResponse_receivedTime :: (UTCTime -> f UTCTime)
-> GetDevicePositionResponse -> f GetDevicePositionResponse
getDevicePositionResponse_receivedTime = (GetDevicePositionResponse -> POSIX)
-> (GetDevicePositionResponse
-> POSIX -> GetDevicePositionResponse)
-> Lens
GetDevicePositionResponse GetDevicePositionResponse POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDevicePositionResponse' {POSIX
receivedTime :: POSIX
$sel:receivedTime:GetDevicePositionResponse' :: GetDevicePositionResponse -> POSIX
receivedTime} -> POSIX
receivedTime) (\s :: GetDevicePositionResponse
s@GetDevicePositionResponse' {} POSIX
a -> GetDevicePositionResponse
s {$sel:receivedTime:GetDevicePositionResponse' :: POSIX
receivedTime = POSIX
a} :: GetDevicePositionResponse) ((POSIX -> f POSIX)
-> GetDevicePositionResponse -> f GetDevicePositionResponse)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> GetDevicePositionResponse
-> f GetDevicePositionResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
getDevicePositionResponse_sampleTime :: Lens.Lens' GetDevicePositionResponse Prelude.UTCTime
getDevicePositionResponse_sampleTime :: (UTCTime -> f UTCTime)
-> GetDevicePositionResponse -> f GetDevicePositionResponse
getDevicePositionResponse_sampleTime = (GetDevicePositionResponse -> POSIX)
-> (GetDevicePositionResponse
-> POSIX -> GetDevicePositionResponse)
-> Lens
GetDevicePositionResponse GetDevicePositionResponse POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDevicePositionResponse' {POSIX
sampleTime :: POSIX
$sel:sampleTime:GetDevicePositionResponse' :: GetDevicePositionResponse -> POSIX
sampleTime} -> POSIX
sampleTime) (\s :: GetDevicePositionResponse
s@GetDevicePositionResponse' {} POSIX
a -> GetDevicePositionResponse
s {$sel:sampleTime:GetDevicePositionResponse' :: POSIX
sampleTime = POSIX
a} :: GetDevicePositionResponse) ((POSIX -> f POSIX)
-> GetDevicePositionResponse -> f GetDevicePositionResponse)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> GetDevicePositionResponse
-> f GetDevicePositionResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
instance Prelude.NFData GetDevicePositionResponse