{-# 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.UpdatePlaceIndex
-- 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)
--
-- Updates the specified properties of a given place index resource.
module Amazonka.Location.UpdatePlaceIndex
  ( -- * Creating a Request
    UpdatePlaceIndex (..),
    newUpdatePlaceIndex,

    -- * Request Lenses
    updatePlaceIndex_pricingPlan,
    updatePlaceIndex_dataSourceConfiguration,
    updatePlaceIndex_description,
    updatePlaceIndex_indexName,

    -- * Destructuring the Response
    UpdatePlaceIndexResponse (..),
    newUpdatePlaceIndexResponse,

    -- * Response Lenses
    updatePlaceIndexResponse_httpStatus,
    updatePlaceIndexResponse_indexArn,
    updatePlaceIndexResponse_indexName,
    updatePlaceIndexResponse_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:/ 'newUpdatePlaceIndex' smart constructor.
data UpdatePlaceIndex = UpdatePlaceIndex'
  { -- | Updates the pricing plan for the place index resource.
    --
    -- For more information about each pricing plan option restrictions, see
    -- <https://aws.amazon.com/location/pricing/ Amazon Location Service pricing>.
    UpdatePlaceIndex -> Maybe PricingPlan
pricingPlan :: Prelude.Maybe PricingPlan,
    -- | Updates the data storage option for the place index resource.
    UpdatePlaceIndex -> Maybe DataSourceConfiguration
dataSourceConfiguration :: Prelude.Maybe DataSourceConfiguration,
    -- | Updates the description for the place index resource.
    UpdatePlaceIndex -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The name of the place index resource to update.
    UpdatePlaceIndex -> Text
indexName :: Prelude.Text
  }
  deriving (UpdatePlaceIndex -> UpdatePlaceIndex -> Bool
(UpdatePlaceIndex -> UpdatePlaceIndex -> Bool)
-> (UpdatePlaceIndex -> UpdatePlaceIndex -> Bool)
-> Eq UpdatePlaceIndex
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdatePlaceIndex -> UpdatePlaceIndex -> Bool
$c/= :: UpdatePlaceIndex -> UpdatePlaceIndex -> Bool
== :: UpdatePlaceIndex -> UpdatePlaceIndex -> Bool
$c== :: UpdatePlaceIndex -> UpdatePlaceIndex -> Bool
Prelude.Eq, ReadPrec [UpdatePlaceIndex]
ReadPrec UpdatePlaceIndex
Int -> ReadS UpdatePlaceIndex
ReadS [UpdatePlaceIndex]
(Int -> ReadS UpdatePlaceIndex)
-> ReadS [UpdatePlaceIndex]
-> ReadPrec UpdatePlaceIndex
-> ReadPrec [UpdatePlaceIndex]
-> Read UpdatePlaceIndex
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdatePlaceIndex]
$creadListPrec :: ReadPrec [UpdatePlaceIndex]
readPrec :: ReadPrec UpdatePlaceIndex
$creadPrec :: ReadPrec UpdatePlaceIndex
readList :: ReadS [UpdatePlaceIndex]
$creadList :: ReadS [UpdatePlaceIndex]
readsPrec :: Int -> ReadS UpdatePlaceIndex
$creadsPrec :: Int -> ReadS UpdatePlaceIndex
Prelude.Read, Int -> UpdatePlaceIndex -> ShowS
[UpdatePlaceIndex] -> ShowS
UpdatePlaceIndex -> String
(Int -> UpdatePlaceIndex -> ShowS)
-> (UpdatePlaceIndex -> String)
-> ([UpdatePlaceIndex] -> ShowS)
-> Show UpdatePlaceIndex
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdatePlaceIndex] -> ShowS
$cshowList :: [UpdatePlaceIndex] -> ShowS
show :: UpdatePlaceIndex -> String
$cshow :: UpdatePlaceIndex -> String
showsPrec :: Int -> UpdatePlaceIndex -> ShowS
$cshowsPrec :: Int -> UpdatePlaceIndex -> ShowS
Prelude.Show, (forall x. UpdatePlaceIndex -> Rep UpdatePlaceIndex x)
-> (forall x. Rep UpdatePlaceIndex x -> UpdatePlaceIndex)
-> Generic UpdatePlaceIndex
forall x. Rep UpdatePlaceIndex x -> UpdatePlaceIndex
forall x. UpdatePlaceIndex -> Rep UpdatePlaceIndex x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdatePlaceIndex x -> UpdatePlaceIndex
$cfrom :: forall x. UpdatePlaceIndex -> Rep UpdatePlaceIndex x
Prelude.Generic)

-- |
-- Create a value of 'UpdatePlaceIndex' 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', 'updatePlaceIndex_pricingPlan' - Updates the pricing plan for the place index resource.
--
-- For more information about each pricing plan option restrictions, see
-- <https://aws.amazon.com/location/pricing/ Amazon Location Service pricing>.
--
-- 'dataSourceConfiguration', 'updatePlaceIndex_dataSourceConfiguration' - Updates the data storage option for the place index resource.
--
-- 'description', 'updatePlaceIndex_description' - Updates the description for the place index resource.
--
-- 'indexName', 'updatePlaceIndex_indexName' - The name of the place index resource to update.
newUpdatePlaceIndex ::
  -- | 'indexName'
  Prelude.Text ->
  UpdatePlaceIndex
newUpdatePlaceIndex :: Text -> UpdatePlaceIndex
newUpdatePlaceIndex Text
pIndexName_ =
  UpdatePlaceIndex' :: Maybe PricingPlan
-> Maybe DataSourceConfiguration
-> Maybe Text
-> Text
-> UpdatePlaceIndex
UpdatePlaceIndex'
    { $sel:pricingPlan:UpdatePlaceIndex' :: Maybe PricingPlan
pricingPlan = Maybe PricingPlan
forall a. Maybe a
Prelude.Nothing,
      $sel:dataSourceConfiguration:UpdatePlaceIndex' :: Maybe DataSourceConfiguration
dataSourceConfiguration = Maybe DataSourceConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:description:UpdatePlaceIndex' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:indexName:UpdatePlaceIndex' :: Text
indexName = Text
pIndexName_
    }

-- | Updates the pricing plan for the place index resource.
--
-- For more information about each pricing plan option restrictions, see
-- <https://aws.amazon.com/location/pricing/ Amazon Location Service pricing>.
updatePlaceIndex_pricingPlan :: Lens.Lens' UpdatePlaceIndex (Prelude.Maybe PricingPlan)
updatePlaceIndex_pricingPlan :: (Maybe PricingPlan -> f (Maybe PricingPlan))
-> UpdatePlaceIndex -> f UpdatePlaceIndex
updatePlaceIndex_pricingPlan = (UpdatePlaceIndex -> Maybe PricingPlan)
-> (UpdatePlaceIndex -> Maybe PricingPlan -> UpdatePlaceIndex)
-> Lens
     UpdatePlaceIndex
     UpdatePlaceIndex
     (Maybe PricingPlan)
     (Maybe PricingPlan)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdatePlaceIndex' {Maybe PricingPlan
pricingPlan :: Maybe PricingPlan
$sel:pricingPlan:UpdatePlaceIndex' :: UpdatePlaceIndex -> Maybe PricingPlan
pricingPlan} -> Maybe PricingPlan
pricingPlan) (\s :: UpdatePlaceIndex
s@UpdatePlaceIndex' {} Maybe PricingPlan
a -> UpdatePlaceIndex
s {$sel:pricingPlan:UpdatePlaceIndex' :: Maybe PricingPlan
pricingPlan = Maybe PricingPlan
a} :: UpdatePlaceIndex)

-- | Updates the data storage option for the place index resource.
updatePlaceIndex_dataSourceConfiguration :: Lens.Lens' UpdatePlaceIndex (Prelude.Maybe DataSourceConfiguration)
updatePlaceIndex_dataSourceConfiguration :: (Maybe DataSourceConfiguration
 -> f (Maybe DataSourceConfiguration))
-> UpdatePlaceIndex -> f UpdatePlaceIndex
updatePlaceIndex_dataSourceConfiguration = (UpdatePlaceIndex -> Maybe DataSourceConfiguration)
-> (UpdatePlaceIndex
    -> Maybe DataSourceConfiguration -> UpdatePlaceIndex)
-> Lens
     UpdatePlaceIndex
     UpdatePlaceIndex
     (Maybe DataSourceConfiguration)
     (Maybe DataSourceConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdatePlaceIndex' {Maybe DataSourceConfiguration
dataSourceConfiguration :: Maybe DataSourceConfiguration
$sel:dataSourceConfiguration:UpdatePlaceIndex' :: UpdatePlaceIndex -> Maybe DataSourceConfiguration
dataSourceConfiguration} -> Maybe DataSourceConfiguration
dataSourceConfiguration) (\s :: UpdatePlaceIndex
s@UpdatePlaceIndex' {} Maybe DataSourceConfiguration
a -> UpdatePlaceIndex
s {$sel:dataSourceConfiguration:UpdatePlaceIndex' :: Maybe DataSourceConfiguration
dataSourceConfiguration = Maybe DataSourceConfiguration
a} :: UpdatePlaceIndex)

-- | Updates the description for the place index resource.
updatePlaceIndex_description :: Lens.Lens' UpdatePlaceIndex (Prelude.Maybe Prelude.Text)
updatePlaceIndex_description :: (Maybe Text -> f (Maybe Text))
-> UpdatePlaceIndex -> f UpdatePlaceIndex
updatePlaceIndex_description = (UpdatePlaceIndex -> Maybe Text)
-> (UpdatePlaceIndex -> Maybe Text -> UpdatePlaceIndex)
-> Lens UpdatePlaceIndex UpdatePlaceIndex (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdatePlaceIndex' {Maybe Text
description :: Maybe Text
$sel:description:UpdatePlaceIndex' :: UpdatePlaceIndex -> Maybe Text
description} -> Maybe Text
description) (\s :: UpdatePlaceIndex
s@UpdatePlaceIndex' {} Maybe Text
a -> UpdatePlaceIndex
s {$sel:description:UpdatePlaceIndex' :: Maybe Text
description = Maybe Text
a} :: UpdatePlaceIndex)

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

instance Core.AWSRequest UpdatePlaceIndex where
  type
    AWSResponse UpdatePlaceIndex =
      UpdatePlaceIndexResponse
  request :: UpdatePlaceIndex -> Request UpdatePlaceIndex
request = Service -> UpdatePlaceIndex -> Request UpdatePlaceIndex
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.patchJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdatePlaceIndex
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdatePlaceIndex)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdatePlaceIndex))
-> Logger
-> Service
-> Proxy UpdatePlaceIndex
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdatePlaceIndex)))
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 -> Text -> Text -> POSIX -> UpdatePlaceIndexResponse
UpdatePlaceIndexResponse'
            (Int -> Text -> Text -> POSIX -> UpdatePlaceIndexResponse)
-> Either String Int
-> Either
     String (Text -> Text -> POSIX -> UpdatePlaceIndexResponse)
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 (Text -> Text -> POSIX -> UpdatePlaceIndexResponse)
-> Either String Text
-> Either String (Text -> POSIX -> UpdatePlaceIndexResponse)
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 -> POSIX -> UpdatePlaceIndexResponse)
-> Either String Text
-> Either String (POSIX -> UpdatePlaceIndexResponse)
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 (POSIX -> UpdatePlaceIndexResponse)
-> Either String POSIX -> Either String UpdatePlaceIndexResponse
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 UpdatePlaceIndex

instance Prelude.NFData UpdatePlaceIndex

instance Core.ToHeaders UpdatePlaceIndex where
  toHeaders :: UpdatePlaceIndex -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdatePlaceIndex -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON UpdatePlaceIndex where
  toJSON :: UpdatePlaceIndex -> Value
toJSON UpdatePlaceIndex' {Maybe Text
Maybe DataSourceConfiguration
Maybe PricingPlan
Text
indexName :: Text
description :: Maybe Text
dataSourceConfiguration :: Maybe DataSourceConfiguration
pricingPlan :: Maybe PricingPlan
$sel:indexName:UpdatePlaceIndex' :: UpdatePlaceIndex -> Text
$sel:description:UpdatePlaceIndex' :: UpdatePlaceIndex -> Maybe Text
$sel:dataSourceConfiguration:UpdatePlaceIndex' :: UpdatePlaceIndex -> Maybe DataSourceConfiguration
$sel:pricingPlan:UpdatePlaceIndex' :: UpdatePlaceIndex -> Maybe PricingPlan
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"PricingPlan" Text -> PricingPlan -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (PricingPlan -> Pair) -> Maybe PricingPlan -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PricingPlan
pricingPlan,
            (Text
"DataSourceConfiguration" Text -> DataSourceConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (DataSourceConfiguration -> Pair)
-> Maybe DataSourceConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DataSourceConfiguration
dataSourceConfiguration,
            (Text
"Description" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
description
          ]
      )

instance Core.ToPath UpdatePlaceIndex where
  toPath :: UpdatePlaceIndex -> ByteString
toPath UpdatePlaceIndex' {Maybe Text
Maybe DataSourceConfiguration
Maybe PricingPlan
Text
indexName :: Text
description :: Maybe Text
dataSourceConfiguration :: Maybe DataSourceConfiguration
pricingPlan :: Maybe PricingPlan
$sel:indexName:UpdatePlaceIndex' :: UpdatePlaceIndex -> Text
$sel:description:UpdatePlaceIndex' :: UpdatePlaceIndex -> Maybe Text
$sel:dataSourceConfiguration:UpdatePlaceIndex' :: UpdatePlaceIndex -> Maybe DataSourceConfiguration
$sel:pricingPlan:UpdatePlaceIndex' :: UpdatePlaceIndex -> Maybe PricingPlan
..} =
    [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 UpdatePlaceIndex where
  toQuery :: UpdatePlaceIndex -> QueryString
toQuery = QueryString -> UpdatePlaceIndex -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newUpdatePlaceIndexResponse' smart constructor.
data UpdatePlaceIndexResponse = UpdatePlaceIndexResponse'
  { -- | The response's http status code.
    UpdatePlaceIndexResponse -> Int
httpStatus :: Prelude.Int,
    -- | The Amazon Resource Name (ARN) of the upated place index resource. Used
    -- to specify a resource across AWS.
    --
    -- -   Format example:
    --     @arn:aws:geo:region:account-id:place- index\/ExamplePlaceIndex@
    UpdatePlaceIndexResponse -> Text
indexArn :: Prelude.Text,
    -- | The name of the updated place index resource.
    UpdatePlaceIndexResponse -> 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@.
    UpdatePlaceIndexResponse -> POSIX
updateTime :: Core.POSIX
  }
  deriving (UpdatePlaceIndexResponse -> UpdatePlaceIndexResponse -> Bool
(UpdatePlaceIndexResponse -> UpdatePlaceIndexResponse -> Bool)
-> (UpdatePlaceIndexResponse -> UpdatePlaceIndexResponse -> Bool)
-> Eq UpdatePlaceIndexResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdatePlaceIndexResponse -> UpdatePlaceIndexResponse -> Bool
$c/= :: UpdatePlaceIndexResponse -> UpdatePlaceIndexResponse -> Bool
== :: UpdatePlaceIndexResponse -> UpdatePlaceIndexResponse -> Bool
$c== :: UpdatePlaceIndexResponse -> UpdatePlaceIndexResponse -> Bool
Prelude.Eq, ReadPrec [UpdatePlaceIndexResponse]
ReadPrec UpdatePlaceIndexResponse
Int -> ReadS UpdatePlaceIndexResponse
ReadS [UpdatePlaceIndexResponse]
(Int -> ReadS UpdatePlaceIndexResponse)
-> ReadS [UpdatePlaceIndexResponse]
-> ReadPrec UpdatePlaceIndexResponse
-> ReadPrec [UpdatePlaceIndexResponse]
-> Read UpdatePlaceIndexResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdatePlaceIndexResponse]
$creadListPrec :: ReadPrec [UpdatePlaceIndexResponse]
readPrec :: ReadPrec UpdatePlaceIndexResponse
$creadPrec :: ReadPrec UpdatePlaceIndexResponse
readList :: ReadS [UpdatePlaceIndexResponse]
$creadList :: ReadS [UpdatePlaceIndexResponse]
readsPrec :: Int -> ReadS UpdatePlaceIndexResponse
$creadsPrec :: Int -> ReadS UpdatePlaceIndexResponse
Prelude.Read, Int -> UpdatePlaceIndexResponse -> ShowS
[UpdatePlaceIndexResponse] -> ShowS
UpdatePlaceIndexResponse -> String
(Int -> UpdatePlaceIndexResponse -> ShowS)
-> (UpdatePlaceIndexResponse -> String)
-> ([UpdatePlaceIndexResponse] -> ShowS)
-> Show UpdatePlaceIndexResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdatePlaceIndexResponse] -> ShowS
$cshowList :: [UpdatePlaceIndexResponse] -> ShowS
show :: UpdatePlaceIndexResponse -> String
$cshow :: UpdatePlaceIndexResponse -> String
showsPrec :: Int -> UpdatePlaceIndexResponse -> ShowS
$cshowsPrec :: Int -> UpdatePlaceIndexResponse -> ShowS
Prelude.Show, (forall x.
 UpdatePlaceIndexResponse -> Rep UpdatePlaceIndexResponse x)
-> (forall x.
    Rep UpdatePlaceIndexResponse x -> UpdatePlaceIndexResponse)
-> Generic UpdatePlaceIndexResponse
forall x.
Rep UpdatePlaceIndexResponse x -> UpdatePlaceIndexResponse
forall x.
UpdatePlaceIndexResponse -> Rep UpdatePlaceIndexResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdatePlaceIndexResponse x -> UpdatePlaceIndexResponse
$cfrom :: forall x.
UpdatePlaceIndexResponse -> Rep UpdatePlaceIndexResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdatePlaceIndexResponse' 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', 'updatePlaceIndexResponse_httpStatus' - The response's http status code.
--
-- 'indexArn', 'updatePlaceIndexResponse_indexArn' - The Amazon Resource Name (ARN) of the upated place index resource. Used
-- to specify a resource across AWS.
--
-- -   Format example:
--     @arn:aws:geo:region:account-id:place- index\/ExamplePlaceIndex@
--
-- 'indexName', 'updatePlaceIndexResponse_indexName' - The name of the updated place index resource.
--
-- 'updateTime', 'updatePlaceIndexResponse_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@.
newUpdatePlaceIndexResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'indexArn'
  Prelude.Text ->
  -- | 'indexName'
  Prelude.Text ->
  -- | 'updateTime'
  Prelude.UTCTime ->
  UpdatePlaceIndexResponse
newUpdatePlaceIndexResponse :: Int -> Text -> Text -> UTCTime -> UpdatePlaceIndexResponse
newUpdatePlaceIndexResponse
  Int
pHttpStatus_
  Text
pIndexArn_
  Text
pIndexName_
  UTCTime
pUpdateTime_ =
    UpdatePlaceIndexResponse' :: Int -> Text -> Text -> POSIX -> UpdatePlaceIndexResponse
UpdatePlaceIndexResponse'
      { $sel:httpStatus:UpdatePlaceIndexResponse' :: Int
httpStatus =
          Int
pHttpStatus_,
        $sel:indexArn:UpdatePlaceIndexResponse' :: Text
indexArn = Text
pIndexArn_,
        $sel:indexName:UpdatePlaceIndexResponse' :: Text
indexName = Text
pIndexName_,
        $sel:updateTime:UpdatePlaceIndexResponse' :: 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.
updatePlaceIndexResponse_httpStatus :: Lens.Lens' UpdatePlaceIndexResponse Prelude.Int
updatePlaceIndexResponse_httpStatus :: (Int -> f Int)
-> UpdatePlaceIndexResponse -> f UpdatePlaceIndexResponse
updatePlaceIndexResponse_httpStatus = (UpdatePlaceIndexResponse -> Int)
-> (UpdatePlaceIndexResponse -> Int -> UpdatePlaceIndexResponse)
-> Lens UpdatePlaceIndexResponse UpdatePlaceIndexResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdatePlaceIndexResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdatePlaceIndexResponse' :: UpdatePlaceIndexResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdatePlaceIndexResponse
s@UpdatePlaceIndexResponse' {} Int
a -> UpdatePlaceIndexResponse
s {$sel:httpStatus:UpdatePlaceIndexResponse' :: Int
httpStatus = Int
a} :: UpdatePlaceIndexResponse)

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

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

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