{-# 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.GetGeofence
-- 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)
--
-- Retrieves the geofence details from a geofence collection.
module Amazonka.Location.GetGeofence
  ( -- * Creating a Request
    GetGeofence (..),
    newGetGeofence,

    -- * Request Lenses
    getGeofence_collectionName,
    getGeofence_geofenceId,

    -- * Destructuring the Response
    GetGeofenceResponse (..),
    newGetGeofenceResponse,

    -- * Response Lenses
    getGeofenceResponse_httpStatus,
    getGeofenceResponse_createTime,
    getGeofenceResponse_geofenceId,
    getGeofenceResponse_geometry,
    getGeofenceResponse_status,
    getGeofenceResponse_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:/ 'newGetGeofence' smart constructor.
data GetGeofence = GetGeofence'
  { -- | The geofence collection storing the target geofence.
    GetGeofence -> Text
collectionName :: Prelude.Text,
    -- | The geofence you\'re retrieving details for.
    GetGeofence -> Text
geofenceId :: Prelude.Text
  }
  deriving (GetGeofence -> GetGeofence -> Bool
(GetGeofence -> GetGeofence -> Bool)
-> (GetGeofence -> GetGeofence -> Bool) -> Eq GetGeofence
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetGeofence -> GetGeofence -> Bool
$c/= :: GetGeofence -> GetGeofence -> Bool
== :: GetGeofence -> GetGeofence -> Bool
$c== :: GetGeofence -> GetGeofence -> Bool
Prelude.Eq, ReadPrec [GetGeofence]
ReadPrec GetGeofence
Int -> ReadS GetGeofence
ReadS [GetGeofence]
(Int -> ReadS GetGeofence)
-> ReadS [GetGeofence]
-> ReadPrec GetGeofence
-> ReadPrec [GetGeofence]
-> Read GetGeofence
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetGeofence]
$creadListPrec :: ReadPrec [GetGeofence]
readPrec :: ReadPrec GetGeofence
$creadPrec :: ReadPrec GetGeofence
readList :: ReadS [GetGeofence]
$creadList :: ReadS [GetGeofence]
readsPrec :: Int -> ReadS GetGeofence
$creadsPrec :: Int -> ReadS GetGeofence
Prelude.Read, Int -> GetGeofence -> ShowS
[GetGeofence] -> ShowS
GetGeofence -> String
(Int -> GetGeofence -> ShowS)
-> (GetGeofence -> String)
-> ([GetGeofence] -> ShowS)
-> Show GetGeofence
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetGeofence] -> ShowS
$cshowList :: [GetGeofence] -> ShowS
show :: GetGeofence -> String
$cshow :: GetGeofence -> String
showsPrec :: Int -> GetGeofence -> ShowS
$cshowsPrec :: Int -> GetGeofence -> ShowS
Prelude.Show, (forall x. GetGeofence -> Rep GetGeofence x)
-> (forall x. Rep GetGeofence x -> GetGeofence)
-> Generic GetGeofence
forall x. Rep GetGeofence x -> GetGeofence
forall x. GetGeofence -> Rep GetGeofence x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetGeofence x -> GetGeofence
$cfrom :: forall x. GetGeofence -> Rep GetGeofence x
Prelude.Generic)

-- |
-- Create a value of 'GetGeofence' 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', 'getGeofence_collectionName' - The geofence collection storing the target geofence.
--
-- 'geofenceId', 'getGeofence_geofenceId' - The geofence you\'re retrieving details for.
newGetGeofence ::
  -- | 'collectionName'
  Prelude.Text ->
  -- | 'geofenceId'
  Prelude.Text ->
  GetGeofence
newGetGeofence :: Text -> Text -> GetGeofence
newGetGeofence Text
pCollectionName_ Text
pGeofenceId_ =
  GetGeofence' :: Text -> Text -> GetGeofence
GetGeofence'
    { $sel:collectionName:GetGeofence' :: Text
collectionName = Text
pCollectionName_,
      $sel:geofenceId:GetGeofence' :: Text
geofenceId = Text
pGeofenceId_
    }

-- | The geofence collection storing the target geofence.
getGeofence_collectionName :: Lens.Lens' GetGeofence Prelude.Text
getGeofence_collectionName :: (Text -> f Text) -> GetGeofence -> f GetGeofence
getGeofence_collectionName = (GetGeofence -> Text)
-> (GetGeofence -> Text -> GetGeofence)
-> Lens GetGeofence GetGeofence Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetGeofence' {Text
collectionName :: Text
$sel:collectionName:GetGeofence' :: GetGeofence -> Text
collectionName} -> Text
collectionName) (\s :: GetGeofence
s@GetGeofence' {} Text
a -> GetGeofence
s {$sel:collectionName:GetGeofence' :: Text
collectionName = Text
a} :: GetGeofence)

-- | The geofence you\'re retrieving details for.
getGeofence_geofenceId :: Lens.Lens' GetGeofence Prelude.Text
getGeofence_geofenceId :: (Text -> f Text) -> GetGeofence -> f GetGeofence
getGeofence_geofenceId = (GetGeofence -> Text)
-> (GetGeofence -> Text -> GetGeofence)
-> Lens GetGeofence GetGeofence Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetGeofence' {Text
geofenceId :: Text
$sel:geofenceId:GetGeofence' :: GetGeofence -> Text
geofenceId} -> Text
geofenceId) (\s :: GetGeofence
s@GetGeofence' {} Text
a -> GetGeofence
s {$sel:geofenceId:GetGeofence' :: Text
geofenceId = Text
a} :: GetGeofence)

instance Core.AWSRequest GetGeofence where
  type AWSResponse GetGeofence = GetGeofenceResponse
  request :: GetGeofence -> Request GetGeofence
request = Service -> GetGeofence -> Request GetGeofence
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy GetGeofence
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetGeofence)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetGeofence))
-> Logger
-> Service
-> Proxy GetGeofence
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetGeofence)))
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
-> GeofenceGeometry
-> Text
-> POSIX
-> GetGeofenceResponse
GetGeofenceResponse'
            (Int
 -> POSIX
 -> Text
 -> GeofenceGeometry
 -> Text
 -> POSIX
 -> GetGeofenceResponse)
-> Either String Int
-> Either
     String
     (POSIX
      -> Text
      -> GeofenceGeometry
      -> Text
      -> POSIX
      -> GetGeofenceResponse)
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
   -> GeofenceGeometry
   -> Text
   -> POSIX
   -> GetGeofenceResponse)
-> Either String POSIX
-> Either
     String
     (Text -> GeofenceGeometry -> Text -> POSIX -> GetGeofenceResponse)
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 -> GeofenceGeometry -> Text -> POSIX -> GetGeofenceResponse)
-> Either String Text
-> Either
     String (GeofenceGeometry -> Text -> POSIX -> GetGeofenceResponse)
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 (GeofenceGeometry -> Text -> POSIX -> GetGeofenceResponse)
-> Either String GeofenceGeometry
-> Either String (Text -> POSIX -> GetGeofenceResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String GeofenceGeometry
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"Geometry")
            Either String (Text -> POSIX -> GetGeofenceResponse)
-> Either String Text
-> Either String (POSIX -> GetGeofenceResponse)
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
"Status")
            Either String (POSIX -> GetGeofenceResponse)
-> Either String POSIX -> Either String GetGeofenceResponse
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 GetGeofence

instance Prelude.NFData GetGeofence

instance Core.ToHeaders GetGeofence where
  toHeaders :: GetGeofence -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetGeofence -> 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 GetGeofence where
  toPath :: GetGeofence -> ByteString
toPath GetGeofence' {Text
geofenceId :: Text
collectionName :: Text
$sel:geofenceId:GetGeofence' :: GetGeofence -> Text
$sel:collectionName:GetGeofence' :: GetGeofence -> 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 GetGeofence where
  toQuery :: GetGeofence -> QueryString
toQuery = QueryString -> GetGeofence -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newGetGeofenceResponse' smart constructor.
data GetGeofenceResponse = GetGeofenceResponse'
  { -- | The response's http status code.
    GetGeofenceResponse -> Int
httpStatus :: Prelude.Int,
    -- | The timestamp for when the geofence collection was created in
    -- <https://www.iso.org/iso-8601-date-and-time-format.html ISO 8601>
    -- format: @YYYY-MM-DDThh:mm:ss.sssZ@
    GetGeofenceResponse -> POSIX
createTime :: Core.POSIX,
    -- | The geofence identifier.
    GetGeofenceResponse -> Text
geofenceId :: Prelude.Text,
    -- | Contains the geofence geometry details describing a polygon.
    GetGeofenceResponse -> GeofenceGeometry
geometry :: GeofenceGeometry,
    -- | Identifies the state of the geofence. A geofence will hold one of the
    -- following states:
    --
    -- -   @ACTIVE@ — The geofence has been indexed by the system.
    --
    -- -   @PENDING@ — The geofence is being processed by the system.
    --
    -- -   @FAILED@ — The geofence failed to be indexed by the system.
    --
    -- -   @DELETED@ — The geofence has been deleted from the system index.
    --
    -- -   @DELETING@ — The geofence is being deleted from the system index.
    GetGeofenceResponse -> Text
status :: Prelude.Text,
    -- | The timestamp for when the geofence collection was last updated in
    -- <https://www.iso.org/iso-8601-date-and-time-format.html ISO 8601>
    -- format: @YYYY-MM-DDThh:mm:ss.sssZ@
    GetGeofenceResponse -> POSIX
updateTime :: Core.POSIX
  }
  deriving (GetGeofenceResponse -> GetGeofenceResponse -> Bool
(GetGeofenceResponse -> GetGeofenceResponse -> Bool)
-> (GetGeofenceResponse -> GetGeofenceResponse -> Bool)
-> Eq GetGeofenceResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetGeofenceResponse -> GetGeofenceResponse -> Bool
$c/= :: GetGeofenceResponse -> GetGeofenceResponse -> Bool
== :: GetGeofenceResponse -> GetGeofenceResponse -> Bool
$c== :: GetGeofenceResponse -> GetGeofenceResponse -> Bool
Prelude.Eq, Int -> GetGeofenceResponse -> ShowS
[GetGeofenceResponse] -> ShowS
GetGeofenceResponse -> String
(Int -> GetGeofenceResponse -> ShowS)
-> (GetGeofenceResponse -> String)
-> ([GetGeofenceResponse] -> ShowS)
-> Show GetGeofenceResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetGeofenceResponse] -> ShowS
$cshowList :: [GetGeofenceResponse] -> ShowS
show :: GetGeofenceResponse -> String
$cshow :: GetGeofenceResponse -> String
showsPrec :: Int -> GetGeofenceResponse -> ShowS
$cshowsPrec :: Int -> GetGeofenceResponse -> ShowS
Prelude.Show, (forall x. GetGeofenceResponse -> Rep GetGeofenceResponse x)
-> (forall x. Rep GetGeofenceResponse x -> GetGeofenceResponse)
-> Generic GetGeofenceResponse
forall x. Rep GetGeofenceResponse x -> GetGeofenceResponse
forall x. GetGeofenceResponse -> Rep GetGeofenceResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetGeofenceResponse x -> GetGeofenceResponse
$cfrom :: forall x. GetGeofenceResponse -> Rep GetGeofenceResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetGeofenceResponse' 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', 'getGeofenceResponse_httpStatus' - The response's http status code.
--
-- 'createTime', 'getGeofenceResponse_createTime' - The timestamp for when the geofence collection was created in
-- <https://www.iso.org/iso-8601-date-and-time-format.html ISO 8601>
-- format: @YYYY-MM-DDThh:mm:ss.sssZ@
--
-- 'geofenceId', 'getGeofenceResponse_geofenceId' - The geofence identifier.
--
-- 'geometry', 'getGeofenceResponse_geometry' - Contains the geofence geometry details describing a polygon.
--
-- 'status', 'getGeofenceResponse_status' - Identifies the state of the geofence. A geofence will hold one of the
-- following states:
--
-- -   @ACTIVE@ — The geofence has been indexed by the system.
--
-- -   @PENDING@ — The geofence is being processed by the system.
--
-- -   @FAILED@ — The geofence failed to be indexed by the system.
--
-- -   @DELETED@ — The geofence has been deleted from the system index.
--
-- -   @DELETING@ — The geofence is being deleted from the system index.
--
-- 'updateTime', 'getGeofenceResponse_updateTime' - The timestamp for when the geofence collection was last updated in
-- <https://www.iso.org/iso-8601-date-and-time-format.html ISO 8601>
-- format: @YYYY-MM-DDThh:mm:ss.sssZ@
newGetGeofenceResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'createTime'
  Prelude.UTCTime ->
  -- | 'geofenceId'
  Prelude.Text ->
  -- | 'geometry'
  GeofenceGeometry ->
  -- | 'status'
  Prelude.Text ->
  -- | 'updateTime'
  Prelude.UTCTime ->
  GetGeofenceResponse
newGetGeofenceResponse :: Int
-> UTCTime
-> Text
-> GeofenceGeometry
-> Text
-> UTCTime
-> GetGeofenceResponse
newGetGeofenceResponse
  Int
pHttpStatus_
  UTCTime
pCreateTime_
  Text
pGeofenceId_
  GeofenceGeometry
pGeometry_
  Text
pStatus_
  UTCTime
pUpdateTime_ =
    GetGeofenceResponse' :: Int
-> POSIX
-> Text
-> GeofenceGeometry
-> Text
-> POSIX
-> GetGeofenceResponse
GetGeofenceResponse'
      { $sel:httpStatus:GetGeofenceResponse' :: Int
httpStatus = Int
pHttpStatus_,
        $sel:createTime:GetGeofenceResponse' :: 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:GetGeofenceResponse' :: Text
geofenceId = Text
pGeofenceId_,
        $sel:geometry:GetGeofenceResponse' :: GeofenceGeometry
geometry = GeofenceGeometry
pGeometry_,
        $sel:status:GetGeofenceResponse' :: Text
status = Text
pStatus_,
        $sel:updateTime:GetGeofenceResponse' :: 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.
getGeofenceResponse_httpStatus :: Lens.Lens' GetGeofenceResponse Prelude.Int
getGeofenceResponse_httpStatus :: (Int -> f Int) -> GetGeofenceResponse -> f GetGeofenceResponse
getGeofenceResponse_httpStatus = (GetGeofenceResponse -> Int)
-> (GetGeofenceResponse -> Int -> GetGeofenceResponse)
-> Lens GetGeofenceResponse GetGeofenceResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetGeofenceResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetGeofenceResponse' :: GetGeofenceResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetGeofenceResponse
s@GetGeofenceResponse' {} Int
a -> GetGeofenceResponse
s {$sel:httpStatus:GetGeofenceResponse' :: Int
httpStatus = Int
a} :: GetGeofenceResponse)

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

-- | Contains the geofence geometry details describing a polygon.
getGeofenceResponse_geometry :: Lens.Lens' GetGeofenceResponse GeofenceGeometry
getGeofenceResponse_geometry :: (GeofenceGeometry -> f GeofenceGeometry)
-> GetGeofenceResponse -> f GetGeofenceResponse
getGeofenceResponse_geometry = (GetGeofenceResponse -> GeofenceGeometry)
-> (GetGeofenceResponse -> GeofenceGeometry -> GetGeofenceResponse)
-> Lens
     GetGeofenceResponse
     GetGeofenceResponse
     GeofenceGeometry
     GeofenceGeometry
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetGeofenceResponse' {GeofenceGeometry
geometry :: GeofenceGeometry
$sel:geometry:GetGeofenceResponse' :: GetGeofenceResponse -> GeofenceGeometry
geometry} -> GeofenceGeometry
geometry) (\s :: GetGeofenceResponse
s@GetGeofenceResponse' {} GeofenceGeometry
a -> GetGeofenceResponse
s {$sel:geometry:GetGeofenceResponse' :: GeofenceGeometry
geometry = GeofenceGeometry
a} :: GetGeofenceResponse)

-- | Identifies the state of the geofence. A geofence will hold one of the
-- following states:
--
-- -   @ACTIVE@ — The geofence has been indexed by the system.
--
-- -   @PENDING@ — The geofence is being processed by the system.
--
-- -   @FAILED@ — The geofence failed to be indexed by the system.
--
-- -   @DELETED@ — The geofence has been deleted from the system index.
--
-- -   @DELETING@ — The geofence is being deleted from the system index.
getGeofenceResponse_status :: Lens.Lens' GetGeofenceResponse Prelude.Text
getGeofenceResponse_status :: (Text -> f Text) -> GetGeofenceResponse -> f GetGeofenceResponse
getGeofenceResponse_status = (GetGeofenceResponse -> Text)
-> (GetGeofenceResponse -> Text -> GetGeofenceResponse)
-> Lens GetGeofenceResponse GetGeofenceResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetGeofenceResponse' {Text
status :: Text
$sel:status:GetGeofenceResponse' :: GetGeofenceResponse -> Text
status} -> Text
status) (\s :: GetGeofenceResponse
s@GetGeofenceResponse' {} Text
a -> GetGeofenceResponse
s {$sel:status:GetGeofenceResponse' :: Text
status = Text
a} :: GetGeofenceResponse)

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