{-# 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.PutGeofence
-- 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)
--
-- Stores a geofence geometry in a given geofence collection, or updates
-- the geometry of an existing geofence if a geofence ID is included in the
-- request.
module Amazonka.Location.PutGeofence
  ( -- * Creating a Request
    PutGeofence (..),
    newPutGeofence,

    -- * Request Lenses
    putGeofence_collectionName,
    putGeofence_geofenceId,
    putGeofence_geometry,

    -- * Destructuring the Response
    PutGeofenceResponse (..),
    newPutGeofenceResponse,

    -- * Response Lenses
    putGeofenceResponse_httpStatus,
    putGeofenceResponse_createTime,
    putGeofenceResponse_geofenceId,
    putGeofenceResponse_updateTime,
  )
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:/ 'newPutGeofence' smart constructor.
data PutGeofence = PutGeofence'
  { -- | The geofence collection to store the geofence in.
    PutGeofence -> Text
collectionName :: Prelude.Text,
    -- | An identifier for the geofence. For example, @ExampleGeofence-1@.
    PutGeofence -> Text
geofenceId :: Prelude.Text,
    -- | Contains the polygon details to specify the position of the geofence.
    --
    -- Each
    -- <https://docs.aws.amazon.com/location-geofences/latest/APIReference/API_GeofenceGeometry.html geofence polygon>
    -- can have a maximum of 1,000 vertices.
    PutGeofence -> GeofenceGeometry
geometry :: GeofenceGeometry
  }
  deriving (PutGeofence -> PutGeofence -> Bool
(PutGeofence -> PutGeofence -> Bool)
-> (PutGeofence -> PutGeofence -> Bool) -> Eq PutGeofence
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutGeofence -> PutGeofence -> Bool
$c/= :: PutGeofence -> PutGeofence -> Bool
== :: PutGeofence -> PutGeofence -> Bool
$c== :: PutGeofence -> PutGeofence -> Bool
Prelude.Eq, Int -> PutGeofence -> ShowS
[PutGeofence] -> ShowS
PutGeofence -> String
(Int -> PutGeofence -> ShowS)
-> (PutGeofence -> String)
-> ([PutGeofence] -> ShowS)
-> Show PutGeofence
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutGeofence] -> ShowS
$cshowList :: [PutGeofence] -> ShowS
show :: PutGeofence -> String
$cshow :: PutGeofence -> String
showsPrec :: Int -> PutGeofence -> ShowS
$cshowsPrec :: Int -> PutGeofence -> ShowS
Prelude.Show, (forall x. PutGeofence -> Rep PutGeofence x)
-> (forall x. Rep PutGeofence x -> PutGeofence)
-> Generic PutGeofence
forall x. Rep PutGeofence x -> PutGeofence
forall x. PutGeofence -> Rep PutGeofence x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PutGeofence x -> PutGeofence
$cfrom :: forall x. PutGeofence -> Rep PutGeofence x
Prelude.Generic)

-- |
-- Create a value of 'PutGeofence' 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:
--
-- 'collectionName', 'putGeofence_collectionName' - The geofence collection to store the geofence in.
--
-- 'geofenceId', 'putGeofence_geofenceId' - An identifier for the geofence. For example, @ExampleGeofence-1@.
--
-- 'geometry', 'putGeofence_geometry' - Contains the polygon details to specify the position of the geofence.
--
-- Each
-- <https://docs.aws.amazon.com/location-geofences/latest/APIReference/API_GeofenceGeometry.html geofence polygon>
-- can have a maximum of 1,000 vertices.
newPutGeofence ::
  -- | 'collectionName'
  Prelude.Text ->
  -- | 'geofenceId'
  Prelude.Text ->
  -- | 'geometry'
  GeofenceGeometry ->
  PutGeofence
newPutGeofence :: Text -> Text -> GeofenceGeometry -> PutGeofence
newPutGeofence
  Text
pCollectionName_
  Text
pGeofenceId_
  GeofenceGeometry
pGeometry_ =
    PutGeofence' :: Text -> Text -> GeofenceGeometry -> PutGeofence
PutGeofence'
      { $sel:collectionName:PutGeofence' :: Text
collectionName = Text
pCollectionName_,
        $sel:geofenceId:PutGeofence' :: Text
geofenceId = Text
pGeofenceId_,
        $sel:geometry:PutGeofence' :: GeofenceGeometry
geometry = GeofenceGeometry
pGeometry_
      }

-- | The geofence collection to store the geofence in.
putGeofence_collectionName :: Lens.Lens' PutGeofence Prelude.Text
putGeofence_collectionName :: (Text -> f Text) -> PutGeofence -> f PutGeofence
putGeofence_collectionName = (PutGeofence -> Text)
-> (PutGeofence -> Text -> PutGeofence)
-> Lens PutGeofence PutGeofence Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutGeofence' {Text
collectionName :: Text
$sel:collectionName:PutGeofence' :: PutGeofence -> Text
collectionName} -> Text
collectionName) (\s :: PutGeofence
s@PutGeofence' {} Text
a -> PutGeofence
s {$sel:collectionName:PutGeofence' :: Text
collectionName = Text
a} :: PutGeofence)

-- | An identifier for the geofence. For example, @ExampleGeofence-1@.
putGeofence_geofenceId :: Lens.Lens' PutGeofence Prelude.Text
putGeofence_geofenceId :: (Text -> f Text) -> PutGeofence -> f PutGeofence
putGeofence_geofenceId = (PutGeofence -> Text)
-> (PutGeofence -> Text -> PutGeofence)
-> Lens PutGeofence PutGeofence Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutGeofence' {Text
geofenceId :: Text
$sel:geofenceId:PutGeofence' :: PutGeofence -> Text
geofenceId} -> Text
geofenceId) (\s :: PutGeofence
s@PutGeofence' {} Text
a -> PutGeofence
s {$sel:geofenceId:PutGeofence' :: Text
geofenceId = Text
a} :: PutGeofence)

-- | Contains the polygon details to specify the position of the geofence.
--
-- Each
-- <https://docs.aws.amazon.com/location-geofences/latest/APIReference/API_GeofenceGeometry.html geofence polygon>
-- can have a maximum of 1,000 vertices.
putGeofence_geometry :: Lens.Lens' PutGeofence GeofenceGeometry
putGeofence_geometry :: (GeofenceGeometry -> f GeofenceGeometry)
-> PutGeofence -> f PutGeofence
putGeofence_geometry = (PutGeofence -> GeofenceGeometry)
-> (PutGeofence -> GeofenceGeometry -> PutGeofence)
-> Lens PutGeofence PutGeofence GeofenceGeometry GeofenceGeometry
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutGeofence' {GeofenceGeometry
geometry :: GeofenceGeometry
$sel:geometry:PutGeofence' :: PutGeofence -> GeofenceGeometry
geometry} -> GeofenceGeometry
geometry) (\s :: PutGeofence
s@PutGeofence' {} GeofenceGeometry
a -> PutGeofence
s {$sel:geometry:PutGeofence' :: GeofenceGeometry
geometry = GeofenceGeometry
a} :: PutGeofence)

instance Core.AWSRequest PutGeofence where
  type AWSResponse PutGeofence = PutGeofenceResponse
  request :: PutGeofence -> Request PutGeofence
request = Service -> PutGeofence -> Request PutGeofence
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy PutGeofence
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse PutGeofence)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse PutGeofence))
-> Logger
-> Service
-> Proxy PutGeofence
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse PutGeofence)))
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 -> POSIX -> Text -> POSIX -> PutGeofenceResponse
PutGeofenceResponse'
            (Int -> POSIX -> Text -> POSIX -> PutGeofenceResponse)
-> Either String Int
-> Either String (POSIX -> Text -> POSIX -> PutGeofenceResponse)
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 (POSIX -> Text -> POSIX -> PutGeofenceResponse)
-> Either String POSIX
-> Either String (Text -> POSIX -> PutGeofenceResponse)
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
"CreateTime")
            Either String (Text -> POSIX -> PutGeofenceResponse)
-> Either String Text
-> Either String (POSIX -> PutGeofenceResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"GeofenceId")
            Either String (POSIX -> PutGeofenceResponse)
-> Either String POSIX -> Either String PutGeofenceResponse
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
"UpdateTime")
      )

instance Prelude.Hashable PutGeofence

instance Prelude.NFData PutGeofence

instance Core.ToHeaders PutGeofence where
  toHeaders :: PutGeofence -> ResponseHeaders
toHeaders =
    ResponseHeaders -> PutGeofence -> 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 PutGeofence where
  toJSON :: PutGeofence -> Value
toJSON PutGeofence' {Text
GeofenceGeometry
geometry :: GeofenceGeometry
geofenceId :: Text
collectionName :: Text
$sel:geometry:PutGeofence' :: PutGeofence -> GeofenceGeometry
$sel:geofenceId:PutGeofence' :: PutGeofence -> Text
$sel:collectionName:PutGeofence' :: PutGeofence -> 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
"Geometry" Text -> GeofenceGeometry -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= GeofenceGeometry
geometry)]
      )

instance Core.ToPath PutGeofence where
  toPath :: PutGeofence -> ByteString
toPath PutGeofence' {Text
GeofenceGeometry
geometry :: GeofenceGeometry
geofenceId :: Text
collectionName :: Text
$sel:geometry:PutGeofence' :: PutGeofence -> GeofenceGeometry
$sel:geofenceId:PutGeofence' :: PutGeofence -> Text
$sel:collectionName:PutGeofence' :: PutGeofence -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/geofencing/v0/collections/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
collectionName,
        ByteString
"/geofences/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
geofenceId
      ]

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

-- | /See:/ 'newPutGeofenceResponse' smart constructor.
data PutGeofenceResponse = PutGeofenceResponse'
  { -- | The response's http status code.
    PutGeofenceResponse -> Int
httpStatus :: Prelude.Int,
    -- | The timestamp for when the geofence was created in
    -- <https://www.iso.org/iso-8601-date-and-time-format.html ISO 8601>
    -- format: @YYYY-MM-DDThh:mm:ss.sssZ@
    PutGeofenceResponse -> POSIX
createTime :: Core.POSIX,
    -- | The geofence identifier entered in the request.
    PutGeofenceResponse -> Text
geofenceId :: Prelude.Text,
    -- | The timestamp for when the geofence was last updated in
    -- <https://www.iso.org/iso-8601-date-and-time-format.html ISO 8601>
    -- format: @YYYY-MM-DDThh:mm:ss.sssZ@
    PutGeofenceResponse -> POSIX
updateTime :: Core.POSIX
  }
  deriving (PutGeofenceResponse -> PutGeofenceResponse -> Bool
(PutGeofenceResponse -> PutGeofenceResponse -> Bool)
-> (PutGeofenceResponse -> PutGeofenceResponse -> Bool)
-> Eq PutGeofenceResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutGeofenceResponse -> PutGeofenceResponse -> Bool
$c/= :: PutGeofenceResponse -> PutGeofenceResponse -> Bool
== :: PutGeofenceResponse -> PutGeofenceResponse -> Bool
$c== :: PutGeofenceResponse -> PutGeofenceResponse -> Bool
Prelude.Eq, ReadPrec [PutGeofenceResponse]
ReadPrec PutGeofenceResponse
Int -> ReadS PutGeofenceResponse
ReadS [PutGeofenceResponse]
(Int -> ReadS PutGeofenceResponse)
-> ReadS [PutGeofenceResponse]
-> ReadPrec PutGeofenceResponse
-> ReadPrec [PutGeofenceResponse]
-> Read PutGeofenceResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutGeofenceResponse]
$creadListPrec :: ReadPrec [PutGeofenceResponse]
readPrec :: ReadPrec PutGeofenceResponse
$creadPrec :: ReadPrec PutGeofenceResponse
readList :: ReadS [PutGeofenceResponse]
$creadList :: ReadS [PutGeofenceResponse]
readsPrec :: Int -> ReadS PutGeofenceResponse
$creadsPrec :: Int -> ReadS PutGeofenceResponse
Prelude.Read, Int -> PutGeofenceResponse -> ShowS
[PutGeofenceResponse] -> ShowS
PutGeofenceResponse -> String
(Int -> PutGeofenceResponse -> ShowS)
-> (PutGeofenceResponse -> String)
-> ([PutGeofenceResponse] -> ShowS)
-> Show PutGeofenceResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutGeofenceResponse] -> ShowS
$cshowList :: [PutGeofenceResponse] -> ShowS
show :: PutGeofenceResponse -> String
$cshow :: PutGeofenceResponse -> String
showsPrec :: Int -> PutGeofenceResponse -> ShowS
$cshowsPrec :: Int -> PutGeofenceResponse -> ShowS
Prelude.Show, (forall x. PutGeofenceResponse -> Rep PutGeofenceResponse x)
-> (forall x. Rep PutGeofenceResponse x -> PutGeofenceResponse)
-> Generic PutGeofenceResponse
forall x. Rep PutGeofenceResponse x -> PutGeofenceResponse
forall x. PutGeofenceResponse -> Rep PutGeofenceResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PutGeofenceResponse x -> PutGeofenceResponse
$cfrom :: forall x. PutGeofenceResponse -> Rep PutGeofenceResponse x
Prelude.Generic)

-- |
-- Create a value of 'PutGeofenceResponse' 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', 'putGeofenceResponse_httpStatus' - The response's http status code.
--
-- 'createTime', 'putGeofenceResponse_createTime' - The timestamp for when the geofence was created in
-- <https://www.iso.org/iso-8601-date-and-time-format.html ISO 8601>
-- format: @YYYY-MM-DDThh:mm:ss.sssZ@
--
-- 'geofenceId', 'putGeofenceResponse_geofenceId' - The geofence identifier entered in the request.
--
-- 'updateTime', 'putGeofenceResponse_updateTime' - The timestamp for when the geofence was last updated in
-- <https://www.iso.org/iso-8601-date-and-time-format.html ISO 8601>
-- format: @YYYY-MM-DDThh:mm:ss.sssZ@
newPutGeofenceResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'createTime'
  Prelude.UTCTime ->
  -- | 'geofenceId'
  Prelude.Text ->
  -- | 'updateTime'
  Prelude.UTCTime ->
  PutGeofenceResponse
newPutGeofenceResponse :: Int -> UTCTime -> Text -> UTCTime -> PutGeofenceResponse
newPutGeofenceResponse
  Int
pHttpStatus_
  UTCTime
pCreateTime_
  Text
pGeofenceId_
  UTCTime
pUpdateTime_ =
    PutGeofenceResponse' :: Int -> POSIX -> Text -> POSIX -> PutGeofenceResponse
PutGeofenceResponse'
      { $sel:httpStatus:PutGeofenceResponse' :: Int
httpStatus = Int
pHttpStatus_,
        $sel:createTime:PutGeofenceResponse' :: POSIX
createTime = 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
pCreateTime_,
        $sel:geofenceId:PutGeofenceResponse' :: Text
geofenceId = Text
pGeofenceId_,
        $sel:updateTime:PutGeofenceResponse' :: POSIX
updateTime = 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
pUpdateTime_
      }

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

-- | The timestamp for when the geofence was created in
-- <https://www.iso.org/iso-8601-date-and-time-format.html ISO 8601>
-- format: @YYYY-MM-DDThh:mm:ss.sssZ@
putGeofenceResponse_createTime :: Lens.Lens' PutGeofenceResponse Prelude.UTCTime
putGeofenceResponse_createTime :: (UTCTime -> f UTCTime)
-> PutGeofenceResponse -> f PutGeofenceResponse
putGeofenceResponse_createTime = (PutGeofenceResponse -> POSIX)
-> (PutGeofenceResponse -> POSIX -> PutGeofenceResponse)
-> Lens PutGeofenceResponse PutGeofenceResponse POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutGeofenceResponse' {POSIX
createTime :: POSIX
$sel:createTime:PutGeofenceResponse' :: PutGeofenceResponse -> POSIX
createTime} -> POSIX
createTime) (\s :: PutGeofenceResponse
s@PutGeofenceResponse' {} POSIX
a -> PutGeofenceResponse
s {$sel:createTime:PutGeofenceResponse' :: POSIX
createTime = POSIX
a} :: PutGeofenceResponse) ((POSIX -> f POSIX)
 -> PutGeofenceResponse -> f PutGeofenceResponse)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> PutGeofenceResponse
-> f PutGeofenceResponse
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

-- | The geofence identifier entered in the request.
putGeofenceResponse_geofenceId :: Lens.Lens' PutGeofenceResponse Prelude.Text
putGeofenceResponse_geofenceId :: (Text -> f Text) -> PutGeofenceResponse -> f PutGeofenceResponse
putGeofenceResponse_geofenceId = (PutGeofenceResponse -> Text)
-> (PutGeofenceResponse -> Text -> PutGeofenceResponse)
-> Lens PutGeofenceResponse PutGeofenceResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutGeofenceResponse' {Text
geofenceId :: Text
$sel:geofenceId:PutGeofenceResponse' :: PutGeofenceResponse -> Text
geofenceId} -> Text
geofenceId) (\s :: PutGeofenceResponse
s@PutGeofenceResponse' {} Text
a -> PutGeofenceResponse
s {$sel:geofenceId:PutGeofenceResponse' :: Text
geofenceId = Text
a} :: PutGeofenceResponse)

-- | The timestamp for when the geofence was last updated in
-- <https://www.iso.org/iso-8601-date-and-time-format.html ISO 8601>
-- format: @YYYY-MM-DDThh:mm:ss.sssZ@
putGeofenceResponse_updateTime :: Lens.Lens' PutGeofenceResponse Prelude.UTCTime
putGeofenceResponse_updateTime :: (UTCTime -> f UTCTime)
-> PutGeofenceResponse -> f PutGeofenceResponse
putGeofenceResponse_updateTime = (PutGeofenceResponse -> POSIX)
-> (PutGeofenceResponse -> POSIX -> PutGeofenceResponse)
-> Lens PutGeofenceResponse PutGeofenceResponse POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutGeofenceResponse' {POSIX
updateTime :: POSIX
$sel:updateTime:PutGeofenceResponse' :: PutGeofenceResponse -> POSIX
updateTime} -> POSIX
updateTime) (\s :: PutGeofenceResponse
s@PutGeofenceResponse' {} POSIX
a -> PutGeofenceResponse
s {$sel:updateTime:PutGeofenceResponse' :: POSIX
updateTime = POSIX
a} :: PutGeofenceResponse) ((POSIX -> f POSIX)
 -> PutGeofenceResponse -> f PutGeofenceResponse)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> PutGeofenceResponse
-> f PutGeofenceResponse
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 PutGeofenceResponse