{-# 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.DescribePlaceIndex
-- 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 place index resource details.
module Amazonka.Location.DescribePlaceIndex
  ( -- * Creating a Request
    DescribePlaceIndex (..),
    newDescribePlaceIndex,

    -- * Request Lenses
    describePlaceIndex_indexName,

    -- * Destructuring the Response
    DescribePlaceIndexResponse (..),
    newDescribePlaceIndexResponse,

    -- * Response Lenses
    describePlaceIndexResponse_tags,
    describePlaceIndexResponse_httpStatus,
    describePlaceIndexResponse_createTime,
    describePlaceIndexResponse_dataSource,
    describePlaceIndexResponse_dataSourceConfiguration,
    describePlaceIndexResponse_description,
    describePlaceIndexResponse_indexArn,
    describePlaceIndexResponse_indexName,
    describePlaceIndexResponse_pricingPlan,
    describePlaceIndexResponse_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:/ 'newDescribePlaceIndex' smart constructor.
data DescribePlaceIndex = DescribePlaceIndex'
  { -- | The name of the place index resource.
    DescribePlaceIndex -> Text
indexName :: Prelude.Text
  }
  deriving (DescribePlaceIndex -> DescribePlaceIndex -> Bool
(DescribePlaceIndex -> DescribePlaceIndex -> Bool)
-> (DescribePlaceIndex -> DescribePlaceIndex -> Bool)
-> Eq DescribePlaceIndex
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribePlaceIndex -> DescribePlaceIndex -> Bool
$c/= :: DescribePlaceIndex -> DescribePlaceIndex -> Bool
== :: DescribePlaceIndex -> DescribePlaceIndex -> Bool
$c== :: DescribePlaceIndex -> DescribePlaceIndex -> Bool
Prelude.Eq, ReadPrec [DescribePlaceIndex]
ReadPrec DescribePlaceIndex
Int -> ReadS DescribePlaceIndex
ReadS [DescribePlaceIndex]
(Int -> ReadS DescribePlaceIndex)
-> ReadS [DescribePlaceIndex]
-> ReadPrec DescribePlaceIndex
-> ReadPrec [DescribePlaceIndex]
-> Read DescribePlaceIndex
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribePlaceIndex]
$creadListPrec :: ReadPrec [DescribePlaceIndex]
readPrec :: ReadPrec DescribePlaceIndex
$creadPrec :: ReadPrec DescribePlaceIndex
readList :: ReadS [DescribePlaceIndex]
$creadList :: ReadS [DescribePlaceIndex]
readsPrec :: Int -> ReadS DescribePlaceIndex
$creadsPrec :: Int -> ReadS DescribePlaceIndex
Prelude.Read, Int -> DescribePlaceIndex -> ShowS
[DescribePlaceIndex] -> ShowS
DescribePlaceIndex -> String
(Int -> DescribePlaceIndex -> ShowS)
-> (DescribePlaceIndex -> String)
-> ([DescribePlaceIndex] -> ShowS)
-> Show DescribePlaceIndex
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribePlaceIndex] -> ShowS
$cshowList :: [DescribePlaceIndex] -> ShowS
show :: DescribePlaceIndex -> String
$cshow :: DescribePlaceIndex -> String
showsPrec :: Int -> DescribePlaceIndex -> ShowS
$cshowsPrec :: Int -> DescribePlaceIndex -> ShowS
Prelude.Show, (forall x. DescribePlaceIndex -> Rep DescribePlaceIndex x)
-> (forall x. Rep DescribePlaceIndex x -> DescribePlaceIndex)
-> Generic DescribePlaceIndex
forall x. Rep DescribePlaceIndex x -> DescribePlaceIndex
forall x. DescribePlaceIndex -> Rep DescribePlaceIndex x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribePlaceIndex x -> DescribePlaceIndex
$cfrom :: forall x. DescribePlaceIndex -> Rep DescribePlaceIndex x
Prelude.Generic)

-- |
-- Create a value of 'DescribePlaceIndex' 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:
--
-- 'indexName', 'describePlaceIndex_indexName' - The name of the place index resource.
newDescribePlaceIndex ::
  -- | 'indexName'
  Prelude.Text ->
  DescribePlaceIndex
newDescribePlaceIndex :: Text -> DescribePlaceIndex
newDescribePlaceIndex Text
pIndexName_ =
  DescribePlaceIndex' :: Text -> DescribePlaceIndex
DescribePlaceIndex' {$sel:indexName:DescribePlaceIndex' :: Text
indexName = Text
pIndexName_}

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

instance Core.AWSRequest DescribePlaceIndex where
  type
    AWSResponse DescribePlaceIndex =
      DescribePlaceIndexResponse
  request :: DescribePlaceIndex -> Request DescribePlaceIndex
request = Service -> DescribePlaceIndex -> Request DescribePlaceIndex
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribePlaceIndex
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribePlaceIndex)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribePlaceIndex))
-> Logger
-> Service
-> Proxy DescribePlaceIndex
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribePlaceIndex)))
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 (HashMap Text Text)
-> Int
-> POSIX
-> Text
-> DataSourceConfiguration
-> Text
-> Text
-> Text
-> PricingPlan
-> POSIX
-> DescribePlaceIndexResponse
DescribePlaceIndexResponse'
            (Maybe (HashMap Text Text)
 -> Int
 -> POSIX
 -> Text
 -> DataSourceConfiguration
 -> Text
 -> Text
 -> Text
 -> PricingPlan
 -> POSIX
 -> DescribePlaceIndexResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either
     String
     (Int
      -> POSIX
      -> Text
      -> DataSourceConfiguration
      -> Text
      -> Text
      -> Text
      -> PricingPlan
      -> POSIX
      -> DescribePlaceIndexResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Tags" Either String (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text)
-> Either String (Maybe (HashMap Text Text))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Int
   -> POSIX
   -> Text
   -> DataSourceConfiguration
   -> Text
   -> Text
   -> Text
   -> PricingPlan
   -> POSIX
   -> DescribePlaceIndexResponse)
-> Either String Int
-> Either
     String
     (POSIX
      -> Text
      -> DataSourceConfiguration
      -> Text
      -> Text
      -> Text
      -> PricingPlan
      -> POSIX
      -> DescribePlaceIndexResponse)
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
  (POSIX
   -> Text
   -> DataSourceConfiguration
   -> Text
   -> Text
   -> Text
   -> PricingPlan
   -> POSIX
   -> DescribePlaceIndexResponse)
-> Either String POSIX
-> Either
     String
     (Text
      -> DataSourceConfiguration
      -> Text
      -> Text
      -> Text
      -> PricingPlan
      -> POSIX
      -> DescribePlaceIndexResponse)
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
   -> DataSourceConfiguration
   -> Text
   -> Text
   -> Text
   -> PricingPlan
   -> POSIX
   -> DescribePlaceIndexResponse)
-> Either String Text
-> Either
     String
     (DataSourceConfiguration
      -> Text
      -> Text
      -> Text
      -> PricingPlan
      -> POSIX
      -> DescribePlaceIndexResponse)
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
"DataSource")
            Either
  String
  (DataSourceConfiguration
   -> Text
   -> Text
   -> Text
   -> PricingPlan
   -> POSIX
   -> DescribePlaceIndexResponse)
-> Either String DataSourceConfiguration
-> Either
     String
     (Text
      -> Text
      -> Text
      -> PricingPlan
      -> POSIX
      -> DescribePlaceIndexResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String DataSourceConfiguration
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"DataSourceConfiguration")
            Either
  String
  (Text
   -> Text
   -> Text
   -> PricingPlan
   -> POSIX
   -> DescribePlaceIndexResponse)
-> Either String Text
-> Either
     String
     (Text
      -> Text -> PricingPlan -> POSIX -> DescribePlaceIndexResponse)
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
"Description")
            Either
  String
  (Text
   -> Text -> PricingPlan -> POSIX -> DescribePlaceIndexResponse)
-> Either String Text
-> Either
     String (Text -> PricingPlan -> POSIX -> DescribePlaceIndexResponse)
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
"IndexArn")
            Either
  String (Text -> PricingPlan -> POSIX -> DescribePlaceIndexResponse)
-> Either String Text
-> Either
     String (PricingPlan -> POSIX -> DescribePlaceIndexResponse)
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
"IndexName")
            Either String (PricingPlan -> POSIX -> DescribePlaceIndexResponse)
-> Either String PricingPlan
-> Either String (POSIX -> DescribePlaceIndexResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String PricingPlan
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"PricingPlan")
            Either String (POSIX -> DescribePlaceIndexResponse)
-> Either String POSIX -> Either String DescribePlaceIndexResponse
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 DescribePlaceIndex

instance Prelude.NFData DescribePlaceIndex

instance Core.ToHeaders DescribePlaceIndex where
  toHeaders :: DescribePlaceIndex -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribePlaceIndex -> 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 DescribePlaceIndex where
  toPath :: DescribePlaceIndex -> ByteString
toPath DescribePlaceIndex' {Text
indexName :: Text
$sel:indexName:DescribePlaceIndex' :: DescribePlaceIndex -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/places/v0/indexes/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
indexName]

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

-- | /See:/ 'newDescribePlaceIndexResponse' smart constructor.
data DescribePlaceIndexResponse = DescribePlaceIndexResponse'
  { -- | Tags associated with place index resource.
    DescribePlaceIndexResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The response's http status code.
    DescribePlaceIndexResponse -> Int
httpStatus :: Prelude.Int,
    -- | 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@.
    DescribePlaceIndexResponse -> POSIX
createTime :: Core.POSIX,
    -- | The data provider of geospatial data. Indicates one of the available
    -- providers:
    --
    -- -   @Esri@
    --
    -- -   @Here@
    --
    -- For additional details on data providers, see
    -- <https://docs.aws.amazon.com/location/latest/developerguide/what-is-data-provider.html Amazon Location Service data providers>.
    DescribePlaceIndexResponse -> Text
dataSource :: Prelude.Text,
    -- | The specified data storage option for requesting Places.
    DescribePlaceIndexResponse -> DataSourceConfiguration
dataSourceConfiguration :: DataSourceConfiguration,
    -- | The optional description for the place index resource.
    DescribePlaceIndexResponse -> Text
description :: Prelude.Text,
    -- | The Amazon Resource Name (ARN) for the place index resource. Used to
    -- specify a resource across AWS.
    --
    -- -   Format example:
    --     @arn:aws:geo:region:account-id:place-index\/ExamplePlaceIndex@
    DescribePlaceIndexResponse -> Text
indexArn :: Prelude.Text,
    -- | The name of the place index resource being described.
    DescribePlaceIndexResponse -> Text
indexName :: Prelude.Text,
    -- | The pricing plan selected for the specified place index resource.
    --
    -- For additional details and restrictions on each pricing plan option, see
    -- <https://aws.amazon.com/location/pricing/ Amazon Location Service pricing>.
    DescribePlaceIndexResponse -> PricingPlan
pricingPlan :: PricingPlan,
    -- | 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@.
    DescribePlaceIndexResponse -> POSIX
updateTime :: Core.POSIX
  }
  deriving (DescribePlaceIndexResponse -> DescribePlaceIndexResponse -> Bool
(DescribePlaceIndexResponse -> DescribePlaceIndexResponse -> Bool)
-> (DescribePlaceIndexResponse
    -> DescribePlaceIndexResponse -> Bool)
-> Eq DescribePlaceIndexResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribePlaceIndexResponse -> DescribePlaceIndexResponse -> Bool
$c/= :: DescribePlaceIndexResponse -> DescribePlaceIndexResponse -> Bool
== :: DescribePlaceIndexResponse -> DescribePlaceIndexResponse -> Bool
$c== :: DescribePlaceIndexResponse -> DescribePlaceIndexResponse -> Bool
Prelude.Eq, ReadPrec [DescribePlaceIndexResponse]
ReadPrec DescribePlaceIndexResponse
Int -> ReadS DescribePlaceIndexResponse
ReadS [DescribePlaceIndexResponse]
(Int -> ReadS DescribePlaceIndexResponse)
-> ReadS [DescribePlaceIndexResponse]
-> ReadPrec DescribePlaceIndexResponse
-> ReadPrec [DescribePlaceIndexResponse]
-> Read DescribePlaceIndexResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribePlaceIndexResponse]
$creadListPrec :: ReadPrec [DescribePlaceIndexResponse]
readPrec :: ReadPrec DescribePlaceIndexResponse
$creadPrec :: ReadPrec DescribePlaceIndexResponse
readList :: ReadS [DescribePlaceIndexResponse]
$creadList :: ReadS [DescribePlaceIndexResponse]
readsPrec :: Int -> ReadS DescribePlaceIndexResponse
$creadsPrec :: Int -> ReadS DescribePlaceIndexResponse
Prelude.Read, Int -> DescribePlaceIndexResponse -> ShowS
[DescribePlaceIndexResponse] -> ShowS
DescribePlaceIndexResponse -> String
(Int -> DescribePlaceIndexResponse -> ShowS)
-> (DescribePlaceIndexResponse -> String)
-> ([DescribePlaceIndexResponse] -> ShowS)
-> Show DescribePlaceIndexResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribePlaceIndexResponse] -> ShowS
$cshowList :: [DescribePlaceIndexResponse] -> ShowS
show :: DescribePlaceIndexResponse -> String
$cshow :: DescribePlaceIndexResponse -> String
showsPrec :: Int -> DescribePlaceIndexResponse -> ShowS
$cshowsPrec :: Int -> DescribePlaceIndexResponse -> ShowS
Prelude.Show, (forall x.
 DescribePlaceIndexResponse -> Rep DescribePlaceIndexResponse x)
-> (forall x.
    Rep DescribePlaceIndexResponse x -> DescribePlaceIndexResponse)
-> Generic DescribePlaceIndexResponse
forall x.
Rep DescribePlaceIndexResponse x -> DescribePlaceIndexResponse
forall x.
DescribePlaceIndexResponse -> Rep DescribePlaceIndexResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribePlaceIndexResponse x -> DescribePlaceIndexResponse
$cfrom :: forall x.
DescribePlaceIndexResponse -> Rep DescribePlaceIndexResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribePlaceIndexResponse' 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:
--
-- 'tags', 'describePlaceIndexResponse_tags' - Tags associated with place index resource.
--
-- 'httpStatus', 'describePlaceIndexResponse_httpStatus' - The response's http status code.
--
-- 'createTime', 'describePlaceIndexResponse_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', 'describePlaceIndexResponse_dataSource' - The data provider of geospatial data. Indicates one of the available
-- providers:
--
-- -   @Esri@
--
-- -   @Here@
--
-- For additional details on data providers, see
-- <https://docs.aws.amazon.com/location/latest/developerguide/what-is-data-provider.html Amazon Location Service data providers>.
--
-- 'dataSourceConfiguration', 'describePlaceIndexResponse_dataSourceConfiguration' - The specified data storage option for requesting Places.
--
-- 'description', 'describePlaceIndexResponse_description' - The optional description for the place index resource.
--
-- 'indexArn', 'describePlaceIndexResponse_indexArn' - The Amazon Resource Name (ARN) for the place index resource. Used to
-- specify a resource across AWS.
--
-- -   Format example:
--     @arn:aws:geo:region:account-id:place-index\/ExamplePlaceIndex@
--
-- 'indexName', 'describePlaceIndexResponse_indexName' - The name of the place index resource being described.
--
-- 'pricingPlan', 'describePlaceIndexResponse_pricingPlan' - The pricing plan selected for the specified place index resource.
--
-- For additional details and restrictions on each pricing plan option, see
-- <https://aws.amazon.com/location/pricing/ Amazon Location Service pricing>.
--
-- 'updateTime', 'describePlaceIndexResponse_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@.
newDescribePlaceIndexResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'createTime'
  Prelude.UTCTime ->
  -- | 'dataSource'
  Prelude.Text ->
  -- | 'dataSourceConfiguration'
  DataSourceConfiguration ->
  -- | 'description'
  Prelude.Text ->
  -- | 'indexArn'
  Prelude.Text ->
  -- | 'indexName'
  Prelude.Text ->
  -- | 'pricingPlan'
  PricingPlan ->
  -- | 'updateTime'
  Prelude.UTCTime ->
  DescribePlaceIndexResponse
newDescribePlaceIndexResponse :: Int
-> UTCTime
-> Text
-> DataSourceConfiguration
-> Text
-> Text
-> Text
-> PricingPlan
-> UTCTime
-> DescribePlaceIndexResponse
newDescribePlaceIndexResponse
  Int
pHttpStatus_
  UTCTime
pCreateTime_
  Text
pDataSource_
  DataSourceConfiguration
pDataSourceConfiguration_
  Text
pDescription_
  Text
pIndexArn_
  Text
pIndexName_
  PricingPlan
pPricingPlan_
  UTCTime
pUpdateTime_ =
    DescribePlaceIndexResponse' :: Maybe (HashMap Text Text)
-> Int
-> POSIX
-> Text
-> DataSourceConfiguration
-> Text
-> Text
-> Text
-> PricingPlan
-> POSIX
-> DescribePlaceIndexResponse
DescribePlaceIndexResponse'
      { $sel:tags:DescribePlaceIndexResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DescribePlaceIndexResponse' :: Int
httpStatus = Int
pHttpStatus_,
        $sel:createTime:DescribePlaceIndexResponse' :: 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:dataSource:DescribePlaceIndexResponse' :: Text
dataSource = Text
pDataSource_,
        $sel:dataSourceConfiguration:DescribePlaceIndexResponse' :: DataSourceConfiguration
dataSourceConfiguration =
          DataSourceConfiguration
pDataSourceConfiguration_,
        $sel:description:DescribePlaceIndexResponse' :: Text
description = Text
pDescription_,
        $sel:indexArn:DescribePlaceIndexResponse' :: Text
indexArn = Text
pIndexArn_,
        $sel:indexName:DescribePlaceIndexResponse' :: Text
indexName = Text
pIndexName_,
        $sel:pricingPlan:DescribePlaceIndexResponse' :: PricingPlan
pricingPlan = PricingPlan
pPricingPlan_,
        $sel:updateTime:DescribePlaceIndexResponse' :: 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_
      }

-- | Tags associated with place index resource.
describePlaceIndexResponse_tags :: Lens.Lens' DescribePlaceIndexResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
describePlaceIndexResponse_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> DescribePlaceIndexResponse -> f DescribePlaceIndexResponse
describePlaceIndexResponse_tags = (DescribePlaceIndexResponse -> Maybe (HashMap Text Text))
-> (DescribePlaceIndexResponse
    -> Maybe (HashMap Text Text) -> DescribePlaceIndexResponse)
-> Lens
     DescribePlaceIndexResponse
     DescribePlaceIndexResponse
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePlaceIndexResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:DescribePlaceIndexResponse' :: DescribePlaceIndexResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: DescribePlaceIndexResponse
s@DescribePlaceIndexResponse' {} Maybe (HashMap Text Text)
a -> DescribePlaceIndexResponse
s {$sel:tags:DescribePlaceIndexResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: DescribePlaceIndexResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> DescribePlaceIndexResponse -> f DescribePlaceIndexResponse)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> DescribePlaceIndexResponse
-> f DescribePlaceIndexResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

-- | 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@.
describePlaceIndexResponse_createTime :: Lens.Lens' DescribePlaceIndexResponse Prelude.UTCTime
describePlaceIndexResponse_createTime :: (UTCTime -> f UTCTime)
-> DescribePlaceIndexResponse -> f DescribePlaceIndexResponse
describePlaceIndexResponse_createTime = (DescribePlaceIndexResponse -> POSIX)
-> (DescribePlaceIndexResponse
    -> POSIX -> DescribePlaceIndexResponse)
-> Lens
     DescribePlaceIndexResponse DescribePlaceIndexResponse POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePlaceIndexResponse' {POSIX
createTime :: POSIX
$sel:createTime:DescribePlaceIndexResponse' :: DescribePlaceIndexResponse -> POSIX
createTime} -> POSIX
createTime) (\s :: DescribePlaceIndexResponse
s@DescribePlaceIndexResponse' {} POSIX
a -> DescribePlaceIndexResponse
s {$sel:createTime:DescribePlaceIndexResponse' :: POSIX
createTime = POSIX
a} :: DescribePlaceIndexResponse) ((POSIX -> f POSIX)
 -> DescribePlaceIndexResponse -> f DescribePlaceIndexResponse)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> DescribePlaceIndexResponse
-> f DescribePlaceIndexResponse
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 data provider of geospatial data. Indicates one of the available
-- providers:
--
-- -   @Esri@
--
-- -   @Here@
--
-- For additional details on data providers, see
-- <https://docs.aws.amazon.com/location/latest/developerguide/what-is-data-provider.html Amazon Location Service data providers>.
describePlaceIndexResponse_dataSource :: Lens.Lens' DescribePlaceIndexResponse Prelude.Text
describePlaceIndexResponse_dataSource :: (Text -> f Text)
-> DescribePlaceIndexResponse -> f DescribePlaceIndexResponse
describePlaceIndexResponse_dataSource = (DescribePlaceIndexResponse -> Text)
-> (DescribePlaceIndexResponse
    -> Text -> DescribePlaceIndexResponse)
-> Lens
     DescribePlaceIndexResponse DescribePlaceIndexResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePlaceIndexResponse' {Text
dataSource :: Text
$sel:dataSource:DescribePlaceIndexResponse' :: DescribePlaceIndexResponse -> Text
dataSource} -> Text
dataSource) (\s :: DescribePlaceIndexResponse
s@DescribePlaceIndexResponse' {} Text
a -> DescribePlaceIndexResponse
s {$sel:dataSource:DescribePlaceIndexResponse' :: Text
dataSource = Text
a} :: DescribePlaceIndexResponse)

-- | The specified data storage option for requesting Places.
describePlaceIndexResponse_dataSourceConfiguration :: Lens.Lens' DescribePlaceIndexResponse DataSourceConfiguration
describePlaceIndexResponse_dataSourceConfiguration :: (DataSourceConfiguration -> f DataSourceConfiguration)
-> DescribePlaceIndexResponse -> f DescribePlaceIndexResponse
describePlaceIndexResponse_dataSourceConfiguration = (DescribePlaceIndexResponse -> DataSourceConfiguration)
-> (DescribePlaceIndexResponse
    -> DataSourceConfiguration -> DescribePlaceIndexResponse)
-> Lens
     DescribePlaceIndexResponse
     DescribePlaceIndexResponse
     DataSourceConfiguration
     DataSourceConfiguration
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePlaceIndexResponse' {DataSourceConfiguration
dataSourceConfiguration :: DataSourceConfiguration
$sel:dataSourceConfiguration:DescribePlaceIndexResponse' :: DescribePlaceIndexResponse -> DataSourceConfiguration
dataSourceConfiguration} -> DataSourceConfiguration
dataSourceConfiguration) (\s :: DescribePlaceIndexResponse
s@DescribePlaceIndexResponse' {} DataSourceConfiguration
a -> DescribePlaceIndexResponse
s {$sel:dataSourceConfiguration:DescribePlaceIndexResponse' :: DataSourceConfiguration
dataSourceConfiguration = DataSourceConfiguration
a} :: DescribePlaceIndexResponse)

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

-- | The Amazon Resource Name (ARN) for the place index resource. Used to
-- specify a resource across AWS.
--
-- -   Format example:
--     @arn:aws:geo:region:account-id:place-index\/ExamplePlaceIndex@
describePlaceIndexResponse_indexArn :: Lens.Lens' DescribePlaceIndexResponse Prelude.Text
describePlaceIndexResponse_indexArn :: (Text -> f Text)
-> DescribePlaceIndexResponse -> f DescribePlaceIndexResponse
describePlaceIndexResponse_indexArn = (DescribePlaceIndexResponse -> Text)
-> (DescribePlaceIndexResponse
    -> Text -> DescribePlaceIndexResponse)
-> Lens
     DescribePlaceIndexResponse DescribePlaceIndexResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePlaceIndexResponse' {Text
indexArn :: Text
$sel:indexArn:DescribePlaceIndexResponse' :: DescribePlaceIndexResponse -> Text
indexArn} -> Text
indexArn) (\s :: DescribePlaceIndexResponse
s@DescribePlaceIndexResponse' {} Text
a -> DescribePlaceIndexResponse
s {$sel:indexArn:DescribePlaceIndexResponse' :: Text
indexArn = Text
a} :: DescribePlaceIndexResponse)

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

-- | The pricing plan selected for the specified place index resource.
--
-- For additional details and restrictions on each pricing plan option, see
-- <https://aws.amazon.com/location/pricing/ Amazon Location Service pricing>.
describePlaceIndexResponse_pricingPlan :: Lens.Lens' DescribePlaceIndexResponse PricingPlan
describePlaceIndexResponse_pricingPlan :: (PricingPlan -> f PricingPlan)
-> DescribePlaceIndexResponse -> f DescribePlaceIndexResponse
describePlaceIndexResponse_pricingPlan = (DescribePlaceIndexResponse -> PricingPlan)
-> (DescribePlaceIndexResponse
    -> PricingPlan -> DescribePlaceIndexResponse)
-> Lens
     DescribePlaceIndexResponse
     DescribePlaceIndexResponse
     PricingPlan
     PricingPlan
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePlaceIndexResponse' {PricingPlan
pricingPlan :: PricingPlan
$sel:pricingPlan:DescribePlaceIndexResponse' :: DescribePlaceIndexResponse -> PricingPlan
pricingPlan} -> PricingPlan
pricingPlan) (\s :: DescribePlaceIndexResponse
s@DescribePlaceIndexResponse' {} PricingPlan
a -> DescribePlaceIndexResponse
s {$sel:pricingPlan:DescribePlaceIndexResponse' :: PricingPlan
pricingPlan = PricingPlan
a} :: DescribePlaceIndexResponse)

-- | 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@.
describePlaceIndexResponse_updateTime :: Lens.Lens' DescribePlaceIndexResponse Prelude.UTCTime
describePlaceIndexResponse_updateTime :: (UTCTime -> f UTCTime)
-> DescribePlaceIndexResponse -> f DescribePlaceIndexResponse
describePlaceIndexResponse_updateTime = (DescribePlaceIndexResponse -> POSIX)
-> (DescribePlaceIndexResponse
    -> POSIX -> DescribePlaceIndexResponse)
-> Lens
     DescribePlaceIndexResponse DescribePlaceIndexResponse POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePlaceIndexResponse' {POSIX
updateTime :: POSIX
$sel:updateTime:DescribePlaceIndexResponse' :: DescribePlaceIndexResponse -> POSIX
updateTime} -> POSIX
updateTime) (\s :: DescribePlaceIndexResponse
s@DescribePlaceIndexResponse' {} POSIX
a -> DescribePlaceIndexResponse
s {$sel:updateTime:DescribePlaceIndexResponse' :: POSIX
updateTime = POSIX
a} :: DescribePlaceIndexResponse) ((POSIX -> f POSIX)
 -> DescribePlaceIndexResponse -> f DescribePlaceIndexResponse)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> DescribePlaceIndexResponse
-> f DescribePlaceIndexResponse
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 DescribePlaceIndexResponse