{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# 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.Types.ListGeofenceCollectionsResponseEntry
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Location.Types.ListGeofenceCollectionsResponseEntry where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Location.Types.PricingPlan
import qualified Amazonka.Prelude as Prelude

-- | Contains the geofence collection details.
--
-- /See:/ 'newListGeofenceCollectionsResponseEntry' smart constructor.
data ListGeofenceCollectionsResponseEntry = ListGeofenceCollectionsResponseEntry'
  { -- | No longer used. Always returns @RequestBasedUsage@.
    ListGeofenceCollectionsResponseEntry -> Maybe PricingPlan
pricingPlan :: Prelude.Maybe PricingPlan,
    -- | No longer used. Always returns an empty string.
    ListGeofenceCollectionsResponseEntry -> Maybe Text
pricingPlanDataSource :: Prelude.Maybe Prelude.Text,
    -- | The name of the geofence collection.
    ListGeofenceCollectionsResponseEntry -> Text
collectionName :: Prelude.Text,
    -- | 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@
    ListGeofenceCollectionsResponseEntry -> ISO8601
createTime :: Data.ISO8601,
    -- | The description for the geofence collection
    ListGeofenceCollectionsResponseEntry -> Text
description :: Prelude.Text,
    -- | Specifies a timestamp for when the resource was last updated in
    -- <https://www.iso.org/iso-8601-date-and-time-format.html ISO 8601>
    -- format: @YYYY-MM-DDThh:mm:ss.sssZ@
    ListGeofenceCollectionsResponseEntry -> ISO8601
updateTime :: Data.ISO8601
  }
  deriving (ListGeofenceCollectionsResponseEntry
-> ListGeofenceCollectionsResponseEntry -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListGeofenceCollectionsResponseEntry
-> ListGeofenceCollectionsResponseEntry -> Bool
$c/= :: ListGeofenceCollectionsResponseEntry
-> ListGeofenceCollectionsResponseEntry -> Bool
== :: ListGeofenceCollectionsResponseEntry
-> ListGeofenceCollectionsResponseEntry -> Bool
$c== :: ListGeofenceCollectionsResponseEntry
-> ListGeofenceCollectionsResponseEntry -> Bool
Prelude.Eq, ReadPrec [ListGeofenceCollectionsResponseEntry]
ReadPrec ListGeofenceCollectionsResponseEntry
Int -> ReadS ListGeofenceCollectionsResponseEntry
ReadS [ListGeofenceCollectionsResponseEntry]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListGeofenceCollectionsResponseEntry]
$creadListPrec :: ReadPrec [ListGeofenceCollectionsResponseEntry]
readPrec :: ReadPrec ListGeofenceCollectionsResponseEntry
$creadPrec :: ReadPrec ListGeofenceCollectionsResponseEntry
readList :: ReadS [ListGeofenceCollectionsResponseEntry]
$creadList :: ReadS [ListGeofenceCollectionsResponseEntry]
readsPrec :: Int -> ReadS ListGeofenceCollectionsResponseEntry
$creadsPrec :: Int -> ReadS ListGeofenceCollectionsResponseEntry
Prelude.Read, Int -> ListGeofenceCollectionsResponseEntry -> ShowS
[ListGeofenceCollectionsResponseEntry] -> ShowS
ListGeofenceCollectionsResponseEntry -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListGeofenceCollectionsResponseEntry] -> ShowS
$cshowList :: [ListGeofenceCollectionsResponseEntry] -> ShowS
show :: ListGeofenceCollectionsResponseEntry -> String
$cshow :: ListGeofenceCollectionsResponseEntry -> String
showsPrec :: Int -> ListGeofenceCollectionsResponseEntry -> ShowS
$cshowsPrec :: Int -> ListGeofenceCollectionsResponseEntry -> ShowS
Prelude.Show, forall x.
Rep ListGeofenceCollectionsResponseEntry x
-> ListGeofenceCollectionsResponseEntry
forall x.
ListGeofenceCollectionsResponseEntry
-> Rep ListGeofenceCollectionsResponseEntry x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListGeofenceCollectionsResponseEntry x
-> ListGeofenceCollectionsResponseEntry
$cfrom :: forall x.
ListGeofenceCollectionsResponseEntry
-> Rep ListGeofenceCollectionsResponseEntry x
Prelude.Generic)

-- |
-- Create a value of 'ListGeofenceCollectionsResponseEntry' 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:
--
-- 'pricingPlan', 'listGeofenceCollectionsResponseEntry_pricingPlan' - No longer used. Always returns @RequestBasedUsage@.
--
-- 'pricingPlanDataSource', 'listGeofenceCollectionsResponseEntry_pricingPlanDataSource' - No longer used. Always returns an empty string.
--
-- 'collectionName', 'listGeofenceCollectionsResponseEntry_collectionName' - The name of the geofence collection.
--
-- 'createTime', 'listGeofenceCollectionsResponseEntry_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@
--
-- 'description', 'listGeofenceCollectionsResponseEntry_description' - The description for the geofence collection
--
-- 'updateTime', 'listGeofenceCollectionsResponseEntry_updateTime' - Specifies a timestamp for when the resource was last updated in
-- <https://www.iso.org/iso-8601-date-and-time-format.html ISO 8601>
-- format: @YYYY-MM-DDThh:mm:ss.sssZ@
newListGeofenceCollectionsResponseEntry ::
  -- | 'collectionName'
  Prelude.Text ->
  -- | 'createTime'
  Prelude.UTCTime ->
  -- | 'description'
  Prelude.Text ->
  -- | 'updateTime'
  Prelude.UTCTime ->
  ListGeofenceCollectionsResponseEntry
newListGeofenceCollectionsResponseEntry :: Text
-> UTCTime
-> Text
-> UTCTime
-> ListGeofenceCollectionsResponseEntry
newListGeofenceCollectionsResponseEntry
  Text
pCollectionName_
  UTCTime
pCreateTime_
  Text
pDescription_
  UTCTime
pUpdateTime_ =
    ListGeofenceCollectionsResponseEntry'
      { $sel:pricingPlan:ListGeofenceCollectionsResponseEntry' :: Maybe PricingPlan
pricingPlan =
          forall a. Maybe a
Prelude.Nothing,
        $sel:pricingPlanDataSource:ListGeofenceCollectionsResponseEntry' :: Maybe Text
pricingPlanDataSource =
          forall a. Maybe a
Prelude.Nothing,
        $sel:collectionName:ListGeofenceCollectionsResponseEntry' :: Text
collectionName = Text
pCollectionName_,
        $sel:createTime:ListGeofenceCollectionsResponseEntry' :: ISO8601
createTime =
          forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreateTime_,
        $sel:description:ListGeofenceCollectionsResponseEntry' :: Text
description = Text
pDescription_,
        $sel:updateTime:ListGeofenceCollectionsResponseEntry' :: ISO8601
updateTime =
          forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pUpdateTime_
      }

-- | No longer used. Always returns @RequestBasedUsage@.
listGeofenceCollectionsResponseEntry_pricingPlan :: Lens.Lens' ListGeofenceCollectionsResponseEntry (Prelude.Maybe PricingPlan)
listGeofenceCollectionsResponseEntry_pricingPlan :: Lens' ListGeofenceCollectionsResponseEntry (Maybe PricingPlan)
listGeofenceCollectionsResponseEntry_pricingPlan = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListGeofenceCollectionsResponseEntry' {Maybe PricingPlan
pricingPlan :: Maybe PricingPlan
$sel:pricingPlan:ListGeofenceCollectionsResponseEntry' :: ListGeofenceCollectionsResponseEntry -> Maybe PricingPlan
pricingPlan} -> Maybe PricingPlan
pricingPlan) (\s :: ListGeofenceCollectionsResponseEntry
s@ListGeofenceCollectionsResponseEntry' {} Maybe PricingPlan
a -> ListGeofenceCollectionsResponseEntry
s {$sel:pricingPlan:ListGeofenceCollectionsResponseEntry' :: Maybe PricingPlan
pricingPlan = Maybe PricingPlan
a} :: ListGeofenceCollectionsResponseEntry)

-- | No longer used. Always returns an empty string.
listGeofenceCollectionsResponseEntry_pricingPlanDataSource :: Lens.Lens' ListGeofenceCollectionsResponseEntry (Prelude.Maybe Prelude.Text)
listGeofenceCollectionsResponseEntry_pricingPlanDataSource :: Lens' ListGeofenceCollectionsResponseEntry (Maybe Text)
listGeofenceCollectionsResponseEntry_pricingPlanDataSource = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListGeofenceCollectionsResponseEntry' {Maybe Text
pricingPlanDataSource :: Maybe Text
$sel:pricingPlanDataSource:ListGeofenceCollectionsResponseEntry' :: ListGeofenceCollectionsResponseEntry -> Maybe Text
pricingPlanDataSource} -> Maybe Text
pricingPlanDataSource) (\s :: ListGeofenceCollectionsResponseEntry
s@ListGeofenceCollectionsResponseEntry' {} Maybe Text
a -> ListGeofenceCollectionsResponseEntry
s {$sel:pricingPlanDataSource:ListGeofenceCollectionsResponseEntry' :: Maybe Text
pricingPlanDataSource = Maybe Text
a} :: ListGeofenceCollectionsResponseEntry)

-- | The name of the geofence collection.
listGeofenceCollectionsResponseEntry_collectionName :: Lens.Lens' ListGeofenceCollectionsResponseEntry Prelude.Text
listGeofenceCollectionsResponseEntry_collectionName :: Lens' ListGeofenceCollectionsResponseEntry Text
listGeofenceCollectionsResponseEntry_collectionName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListGeofenceCollectionsResponseEntry' {Text
collectionName :: Text
$sel:collectionName:ListGeofenceCollectionsResponseEntry' :: ListGeofenceCollectionsResponseEntry -> Text
collectionName} -> Text
collectionName) (\s :: ListGeofenceCollectionsResponseEntry
s@ListGeofenceCollectionsResponseEntry' {} Text
a -> ListGeofenceCollectionsResponseEntry
s {$sel:collectionName:ListGeofenceCollectionsResponseEntry' :: Text
collectionName = Text
a} :: ListGeofenceCollectionsResponseEntry)

-- | 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@
listGeofenceCollectionsResponseEntry_createTime :: Lens.Lens' ListGeofenceCollectionsResponseEntry Prelude.UTCTime
listGeofenceCollectionsResponseEntry_createTime :: Lens' ListGeofenceCollectionsResponseEntry UTCTime
listGeofenceCollectionsResponseEntry_createTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListGeofenceCollectionsResponseEntry' {ISO8601
createTime :: ISO8601
$sel:createTime:ListGeofenceCollectionsResponseEntry' :: ListGeofenceCollectionsResponseEntry -> ISO8601
createTime} -> ISO8601
createTime) (\s :: ListGeofenceCollectionsResponseEntry
s@ListGeofenceCollectionsResponseEntry' {} ISO8601
a -> ListGeofenceCollectionsResponseEntry
s {$sel:createTime:ListGeofenceCollectionsResponseEntry' :: ISO8601
createTime = ISO8601
a} :: ListGeofenceCollectionsResponseEntry) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The description for the geofence collection
listGeofenceCollectionsResponseEntry_description :: Lens.Lens' ListGeofenceCollectionsResponseEntry Prelude.Text
listGeofenceCollectionsResponseEntry_description :: Lens' ListGeofenceCollectionsResponseEntry Text
listGeofenceCollectionsResponseEntry_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListGeofenceCollectionsResponseEntry' {Text
description :: Text
$sel:description:ListGeofenceCollectionsResponseEntry' :: ListGeofenceCollectionsResponseEntry -> Text
description} -> Text
description) (\s :: ListGeofenceCollectionsResponseEntry
s@ListGeofenceCollectionsResponseEntry' {} Text
a -> ListGeofenceCollectionsResponseEntry
s {$sel:description:ListGeofenceCollectionsResponseEntry' :: Text
description = Text
a} :: ListGeofenceCollectionsResponseEntry)

-- | Specifies a timestamp for when the resource was last updated in
-- <https://www.iso.org/iso-8601-date-and-time-format.html ISO 8601>
-- format: @YYYY-MM-DDThh:mm:ss.sssZ@
listGeofenceCollectionsResponseEntry_updateTime :: Lens.Lens' ListGeofenceCollectionsResponseEntry Prelude.UTCTime
listGeofenceCollectionsResponseEntry_updateTime :: Lens' ListGeofenceCollectionsResponseEntry UTCTime
listGeofenceCollectionsResponseEntry_updateTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListGeofenceCollectionsResponseEntry' {ISO8601
updateTime :: ISO8601
$sel:updateTime:ListGeofenceCollectionsResponseEntry' :: ListGeofenceCollectionsResponseEntry -> ISO8601
updateTime} -> ISO8601
updateTime) (\s :: ListGeofenceCollectionsResponseEntry
s@ListGeofenceCollectionsResponseEntry' {} ISO8601
a -> ListGeofenceCollectionsResponseEntry
s {$sel:updateTime:ListGeofenceCollectionsResponseEntry' :: ISO8601
updateTime = ISO8601
a} :: ListGeofenceCollectionsResponseEntry) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

instance
  Data.FromJSON
    ListGeofenceCollectionsResponseEntry
  where
  parseJSON :: Value -> Parser ListGeofenceCollectionsResponseEntry
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"ListGeofenceCollectionsResponseEntry"
      ( \Object
x ->
          Maybe PricingPlan
-> Maybe Text
-> Text
-> ISO8601
-> Text
-> ISO8601
-> ListGeofenceCollectionsResponseEntry
ListGeofenceCollectionsResponseEntry'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"PricingPlan")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"PricingPlanDataSource")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"CollectionName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"CreateTime")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"Description")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"UpdateTime")
      )

instance
  Prelude.Hashable
    ListGeofenceCollectionsResponseEntry
  where
  hashWithSalt :: Int -> ListGeofenceCollectionsResponseEntry -> Int
hashWithSalt
    Int
_salt
    ListGeofenceCollectionsResponseEntry' {Maybe Text
Maybe PricingPlan
Text
ISO8601
updateTime :: ISO8601
description :: Text
createTime :: ISO8601
collectionName :: Text
pricingPlanDataSource :: Maybe Text
pricingPlan :: Maybe PricingPlan
$sel:updateTime:ListGeofenceCollectionsResponseEntry' :: ListGeofenceCollectionsResponseEntry -> ISO8601
$sel:description:ListGeofenceCollectionsResponseEntry' :: ListGeofenceCollectionsResponseEntry -> Text
$sel:createTime:ListGeofenceCollectionsResponseEntry' :: ListGeofenceCollectionsResponseEntry -> ISO8601
$sel:collectionName:ListGeofenceCollectionsResponseEntry' :: ListGeofenceCollectionsResponseEntry -> Text
$sel:pricingPlanDataSource:ListGeofenceCollectionsResponseEntry' :: ListGeofenceCollectionsResponseEntry -> Maybe Text
$sel:pricingPlan:ListGeofenceCollectionsResponseEntry' :: ListGeofenceCollectionsResponseEntry -> Maybe PricingPlan
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe PricingPlan
pricingPlan
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
pricingPlanDataSource
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
collectionName
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ISO8601
createTime
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
description
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ISO8601
updateTime

instance
  Prelude.NFData
    ListGeofenceCollectionsResponseEntry
  where
  rnf :: ListGeofenceCollectionsResponseEntry -> ()
rnf ListGeofenceCollectionsResponseEntry' {Maybe Text
Maybe PricingPlan
Text
ISO8601
updateTime :: ISO8601
description :: Text
createTime :: ISO8601
collectionName :: Text
pricingPlanDataSource :: Maybe Text
pricingPlan :: Maybe PricingPlan
$sel:updateTime:ListGeofenceCollectionsResponseEntry' :: ListGeofenceCollectionsResponseEntry -> ISO8601
$sel:description:ListGeofenceCollectionsResponseEntry' :: ListGeofenceCollectionsResponseEntry -> Text
$sel:createTime:ListGeofenceCollectionsResponseEntry' :: ListGeofenceCollectionsResponseEntry -> ISO8601
$sel:collectionName:ListGeofenceCollectionsResponseEntry' :: ListGeofenceCollectionsResponseEntry -> Text
$sel:pricingPlanDataSource:ListGeofenceCollectionsResponseEntry' :: ListGeofenceCollectionsResponseEntry -> Maybe Text
$sel:pricingPlan:ListGeofenceCollectionsResponseEntry' :: ListGeofenceCollectionsResponseEntry -> Maybe PricingPlan
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe PricingPlan
pricingPlan
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
pricingPlanDataSource
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
collectionName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ISO8601
createTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
description
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ISO8601
updateTime