{-# 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.ListPlaceIndexesResponseEntry
-- 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.ListPlaceIndexesResponseEntry 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

-- | A place index resource listed in your AWS account.
--
-- /See:/ 'newListPlaceIndexesResponseEntry' smart constructor.
data ListPlaceIndexesResponseEntry = ListPlaceIndexesResponseEntry'
  { -- | No longer used. Always returns @RequestBasedUsage@.
    ListPlaceIndexesResponseEntry -> Maybe PricingPlan
pricingPlan :: Prelude.Maybe PricingPlan,
    -- | The timestamp for when the place index resource was created in
    -- <https://www.iso.org/iso-8601-date-and-time-format.html ISO 8601>
    -- format: @YYYY-MM-DDThh:mm:ss.sssZ@.
    ListPlaceIndexesResponseEntry -> ISO8601
createTime :: Data.ISO8601,
    -- | The data provider of geospatial data. Values can be one of the
    -- following:
    --
    -- -   @Esri@
    --
    -- -   @Here@
    --
    -- For more information about data providers, see
    -- <https://docs.aws.amazon.com/location/latest/developerguide/what-is-data-provider.html Amazon Location Service data providers>.
    ListPlaceIndexesResponseEntry -> Text
dataSource :: Prelude.Text,
    -- | The optional description for the place index resource.
    ListPlaceIndexesResponseEntry -> Text
description :: Prelude.Text,
    -- | The name of the place index resource.
    ListPlaceIndexesResponseEntry -> Text
indexName :: Prelude.Text,
    -- | The timestamp for when the place index 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@.
    ListPlaceIndexesResponseEntry -> ISO8601
updateTime :: Data.ISO8601
  }
  deriving (ListPlaceIndexesResponseEntry
-> ListPlaceIndexesResponseEntry -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListPlaceIndexesResponseEntry
-> ListPlaceIndexesResponseEntry -> Bool
$c/= :: ListPlaceIndexesResponseEntry
-> ListPlaceIndexesResponseEntry -> Bool
== :: ListPlaceIndexesResponseEntry
-> ListPlaceIndexesResponseEntry -> Bool
$c== :: ListPlaceIndexesResponseEntry
-> ListPlaceIndexesResponseEntry -> Bool
Prelude.Eq, ReadPrec [ListPlaceIndexesResponseEntry]
ReadPrec ListPlaceIndexesResponseEntry
Int -> ReadS ListPlaceIndexesResponseEntry
ReadS [ListPlaceIndexesResponseEntry]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListPlaceIndexesResponseEntry]
$creadListPrec :: ReadPrec [ListPlaceIndexesResponseEntry]
readPrec :: ReadPrec ListPlaceIndexesResponseEntry
$creadPrec :: ReadPrec ListPlaceIndexesResponseEntry
readList :: ReadS [ListPlaceIndexesResponseEntry]
$creadList :: ReadS [ListPlaceIndexesResponseEntry]
readsPrec :: Int -> ReadS ListPlaceIndexesResponseEntry
$creadsPrec :: Int -> ReadS ListPlaceIndexesResponseEntry
Prelude.Read, Int -> ListPlaceIndexesResponseEntry -> ShowS
[ListPlaceIndexesResponseEntry] -> ShowS
ListPlaceIndexesResponseEntry -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListPlaceIndexesResponseEntry] -> ShowS
$cshowList :: [ListPlaceIndexesResponseEntry] -> ShowS
show :: ListPlaceIndexesResponseEntry -> String
$cshow :: ListPlaceIndexesResponseEntry -> String
showsPrec :: Int -> ListPlaceIndexesResponseEntry -> ShowS
$cshowsPrec :: Int -> ListPlaceIndexesResponseEntry -> ShowS
Prelude.Show, forall x.
Rep ListPlaceIndexesResponseEntry x
-> ListPlaceIndexesResponseEntry
forall x.
ListPlaceIndexesResponseEntry
-> Rep ListPlaceIndexesResponseEntry x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListPlaceIndexesResponseEntry x
-> ListPlaceIndexesResponseEntry
$cfrom :: forall x.
ListPlaceIndexesResponseEntry
-> Rep ListPlaceIndexesResponseEntry x
Prelude.Generic)

-- |
-- Create a value of 'ListPlaceIndexesResponseEntry' 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', 'listPlaceIndexesResponseEntry_pricingPlan' - No longer used. Always returns @RequestBasedUsage@.
--
-- 'createTime', 'listPlaceIndexesResponseEntry_createTime' - The timestamp for when the place index resource was created in
-- <https://www.iso.org/iso-8601-date-and-time-format.html ISO 8601>
-- format: @YYYY-MM-DDThh:mm:ss.sssZ@.
--
-- 'dataSource', 'listPlaceIndexesResponseEntry_dataSource' - The data provider of geospatial data. Values can be one of the
-- following:
--
-- -   @Esri@
--
-- -   @Here@
--
-- For more information about data providers, see
-- <https://docs.aws.amazon.com/location/latest/developerguide/what-is-data-provider.html Amazon Location Service data providers>.
--
-- 'description', 'listPlaceIndexesResponseEntry_description' - The optional description for the place index resource.
--
-- 'indexName', 'listPlaceIndexesResponseEntry_indexName' - The name of the place index resource.
--
-- 'updateTime', 'listPlaceIndexesResponseEntry_updateTime' - The timestamp for when the place index 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@.
newListPlaceIndexesResponseEntry ::
  -- | 'createTime'
  Prelude.UTCTime ->
  -- | 'dataSource'
  Prelude.Text ->
  -- | 'description'
  Prelude.Text ->
  -- | 'indexName'
  Prelude.Text ->
  -- | 'updateTime'
  Prelude.UTCTime ->
  ListPlaceIndexesResponseEntry
newListPlaceIndexesResponseEntry :: UTCTime
-> Text -> Text -> Text -> UTCTime -> ListPlaceIndexesResponseEntry
newListPlaceIndexesResponseEntry
  UTCTime
pCreateTime_
  Text
pDataSource_
  Text
pDescription_
  Text
pIndexName_
  UTCTime
pUpdateTime_ =
    ListPlaceIndexesResponseEntry'
      { $sel:pricingPlan:ListPlaceIndexesResponseEntry' :: Maybe PricingPlan
pricingPlan =
          forall a. Maybe a
Prelude.Nothing,
        $sel:createTime:ListPlaceIndexesResponseEntry' :: ISO8601
createTime = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreateTime_,
        $sel:dataSource:ListPlaceIndexesResponseEntry' :: Text
dataSource = Text
pDataSource_,
        $sel:description:ListPlaceIndexesResponseEntry' :: Text
description = Text
pDescription_,
        $sel:indexName:ListPlaceIndexesResponseEntry' :: Text
indexName = Text
pIndexName_,
        $sel:updateTime:ListPlaceIndexesResponseEntry' :: 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@.
listPlaceIndexesResponseEntry_pricingPlan :: Lens.Lens' ListPlaceIndexesResponseEntry (Prelude.Maybe PricingPlan)
listPlaceIndexesResponseEntry_pricingPlan :: Lens' ListPlaceIndexesResponseEntry (Maybe PricingPlan)
listPlaceIndexesResponseEntry_pricingPlan = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPlaceIndexesResponseEntry' {Maybe PricingPlan
pricingPlan :: Maybe PricingPlan
$sel:pricingPlan:ListPlaceIndexesResponseEntry' :: ListPlaceIndexesResponseEntry -> Maybe PricingPlan
pricingPlan} -> Maybe PricingPlan
pricingPlan) (\s :: ListPlaceIndexesResponseEntry
s@ListPlaceIndexesResponseEntry' {} Maybe PricingPlan
a -> ListPlaceIndexesResponseEntry
s {$sel:pricingPlan:ListPlaceIndexesResponseEntry' :: Maybe PricingPlan
pricingPlan = Maybe PricingPlan
a} :: ListPlaceIndexesResponseEntry)

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

-- | The data provider of geospatial data. Values can be one of the
-- following:
--
-- -   @Esri@
--
-- -   @Here@
--
-- For more information about data providers, see
-- <https://docs.aws.amazon.com/location/latest/developerguide/what-is-data-provider.html Amazon Location Service data providers>.
listPlaceIndexesResponseEntry_dataSource :: Lens.Lens' ListPlaceIndexesResponseEntry Prelude.Text
listPlaceIndexesResponseEntry_dataSource :: Lens' ListPlaceIndexesResponseEntry Text
listPlaceIndexesResponseEntry_dataSource = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPlaceIndexesResponseEntry' {Text
dataSource :: Text
$sel:dataSource:ListPlaceIndexesResponseEntry' :: ListPlaceIndexesResponseEntry -> Text
dataSource} -> Text
dataSource) (\s :: ListPlaceIndexesResponseEntry
s@ListPlaceIndexesResponseEntry' {} Text
a -> ListPlaceIndexesResponseEntry
s {$sel:dataSource:ListPlaceIndexesResponseEntry' :: Text
dataSource = Text
a} :: ListPlaceIndexesResponseEntry)

-- | The optional description for the place index resource.
listPlaceIndexesResponseEntry_description :: Lens.Lens' ListPlaceIndexesResponseEntry Prelude.Text
listPlaceIndexesResponseEntry_description :: Lens' ListPlaceIndexesResponseEntry Text
listPlaceIndexesResponseEntry_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPlaceIndexesResponseEntry' {Text
description :: Text
$sel:description:ListPlaceIndexesResponseEntry' :: ListPlaceIndexesResponseEntry -> Text
description} -> Text
description) (\s :: ListPlaceIndexesResponseEntry
s@ListPlaceIndexesResponseEntry' {} Text
a -> ListPlaceIndexesResponseEntry
s {$sel:description:ListPlaceIndexesResponseEntry' :: Text
description = Text
a} :: ListPlaceIndexesResponseEntry)

-- | The name of the place index resource.
listPlaceIndexesResponseEntry_indexName :: Lens.Lens' ListPlaceIndexesResponseEntry Prelude.Text
listPlaceIndexesResponseEntry_indexName :: Lens' ListPlaceIndexesResponseEntry Text
listPlaceIndexesResponseEntry_indexName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPlaceIndexesResponseEntry' {Text
indexName :: Text
$sel:indexName:ListPlaceIndexesResponseEntry' :: ListPlaceIndexesResponseEntry -> Text
indexName} -> Text
indexName) (\s :: ListPlaceIndexesResponseEntry
s@ListPlaceIndexesResponseEntry' {} Text
a -> ListPlaceIndexesResponseEntry
s {$sel:indexName:ListPlaceIndexesResponseEntry' :: Text
indexName = Text
a} :: ListPlaceIndexesResponseEntry)

-- | The timestamp for when the place index 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@.
listPlaceIndexesResponseEntry_updateTime :: Lens.Lens' ListPlaceIndexesResponseEntry Prelude.UTCTime
listPlaceIndexesResponseEntry_updateTime :: Lens' ListPlaceIndexesResponseEntry UTCTime
listPlaceIndexesResponseEntry_updateTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPlaceIndexesResponseEntry' {ISO8601
updateTime :: ISO8601
$sel:updateTime:ListPlaceIndexesResponseEntry' :: ListPlaceIndexesResponseEntry -> ISO8601
updateTime} -> ISO8601
updateTime) (\s :: ListPlaceIndexesResponseEntry
s@ListPlaceIndexesResponseEntry' {} ISO8601
a -> ListPlaceIndexesResponseEntry
s {$sel:updateTime:ListPlaceIndexesResponseEntry' :: ISO8601
updateTime = ISO8601
a} :: ListPlaceIndexesResponseEntry) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

instance Data.FromJSON ListPlaceIndexesResponseEntry where
  parseJSON :: Value -> Parser ListPlaceIndexesResponseEntry
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"ListPlaceIndexesResponseEntry"
      ( \Object
x ->
          Maybe PricingPlan
-> ISO8601
-> Text
-> Text
-> Text
-> ISO8601
-> ListPlaceIndexesResponseEntry
ListPlaceIndexesResponseEntry'
            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 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
"DataSource")
            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
"IndexName")
            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
    ListPlaceIndexesResponseEntry
  where
  hashWithSalt :: Int -> ListPlaceIndexesResponseEntry -> Int
hashWithSalt Int
_salt ListPlaceIndexesResponseEntry' {Maybe PricingPlan
Text
ISO8601
updateTime :: ISO8601
indexName :: Text
description :: Text
dataSource :: Text
createTime :: ISO8601
pricingPlan :: Maybe PricingPlan
$sel:updateTime:ListPlaceIndexesResponseEntry' :: ListPlaceIndexesResponseEntry -> ISO8601
$sel:indexName:ListPlaceIndexesResponseEntry' :: ListPlaceIndexesResponseEntry -> Text
$sel:description:ListPlaceIndexesResponseEntry' :: ListPlaceIndexesResponseEntry -> Text
$sel:dataSource:ListPlaceIndexesResponseEntry' :: ListPlaceIndexesResponseEntry -> Text
$sel:createTime:ListPlaceIndexesResponseEntry' :: ListPlaceIndexesResponseEntry -> ISO8601
$sel:pricingPlan:ListPlaceIndexesResponseEntry' :: ListPlaceIndexesResponseEntry -> 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` ISO8601
createTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
dataSource
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
description
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
indexName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ISO8601
updateTime

instance Prelude.NFData ListPlaceIndexesResponseEntry where
  rnf :: ListPlaceIndexesResponseEntry -> ()
rnf ListPlaceIndexesResponseEntry' {Maybe PricingPlan
Text
ISO8601
updateTime :: ISO8601
indexName :: Text
description :: Text
dataSource :: Text
createTime :: ISO8601
pricingPlan :: Maybe PricingPlan
$sel:updateTime:ListPlaceIndexesResponseEntry' :: ListPlaceIndexesResponseEntry -> ISO8601
$sel:indexName:ListPlaceIndexesResponseEntry' :: ListPlaceIndexesResponseEntry -> Text
$sel:description:ListPlaceIndexesResponseEntry' :: ListPlaceIndexesResponseEntry -> Text
$sel:dataSource:ListPlaceIndexesResponseEntry' :: ListPlaceIndexesResponseEntry -> Text
$sel:createTime:ListPlaceIndexesResponseEntry' :: ListPlaceIndexesResponseEntry -> ISO8601
$sel:pricingPlan:ListPlaceIndexesResponseEntry' :: ListPlaceIndexesResponseEntry -> 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 ISO8601
createTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
dataSource
      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 Text
indexName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ISO8601
updateTime