{-# 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 #-}
module Amazonka.Location.CreatePlaceIndex
(
CreatePlaceIndex (..),
newCreatePlaceIndex,
createPlaceIndex_dataSourceConfiguration,
createPlaceIndex_description,
createPlaceIndex_tags,
createPlaceIndex_dataSource,
createPlaceIndex_indexName,
createPlaceIndex_pricingPlan,
CreatePlaceIndexResponse (..),
newCreatePlaceIndexResponse,
createPlaceIndexResponse_httpStatus,
createPlaceIndexResponse_createTime,
createPlaceIndexResponse_indexArn,
createPlaceIndexResponse_indexName,
)
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
data CreatePlaceIndex = CreatePlaceIndex'
{
CreatePlaceIndex -> Maybe DataSourceConfiguration
dataSourceConfiguration :: Prelude.Maybe DataSourceConfiguration,
CreatePlaceIndex -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
CreatePlaceIndex -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
CreatePlaceIndex -> Text
dataSource :: Prelude.Text,
CreatePlaceIndex -> Text
indexName :: Prelude.Text,
CreatePlaceIndex -> PricingPlan
pricingPlan :: PricingPlan
}
deriving (CreatePlaceIndex -> CreatePlaceIndex -> Bool
(CreatePlaceIndex -> CreatePlaceIndex -> Bool)
-> (CreatePlaceIndex -> CreatePlaceIndex -> Bool)
-> Eq CreatePlaceIndex
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreatePlaceIndex -> CreatePlaceIndex -> Bool
$c/= :: CreatePlaceIndex -> CreatePlaceIndex -> Bool
== :: CreatePlaceIndex -> CreatePlaceIndex -> Bool
$c== :: CreatePlaceIndex -> CreatePlaceIndex -> Bool
Prelude.Eq, ReadPrec [CreatePlaceIndex]
ReadPrec CreatePlaceIndex
Int -> ReadS CreatePlaceIndex
ReadS [CreatePlaceIndex]
(Int -> ReadS CreatePlaceIndex)
-> ReadS [CreatePlaceIndex]
-> ReadPrec CreatePlaceIndex
-> ReadPrec [CreatePlaceIndex]
-> Read CreatePlaceIndex
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreatePlaceIndex]
$creadListPrec :: ReadPrec [CreatePlaceIndex]
readPrec :: ReadPrec CreatePlaceIndex
$creadPrec :: ReadPrec CreatePlaceIndex
readList :: ReadS [CreatePlaceIndex]
$creadList :: ReadS [CreatePlaceIndex]
readsPrec :: Int -> ReadS CreatePlaceIndex
$creadsPrec :: Int -> ReadS CreatePlaceIndex
Prelude.Read, Int -> CreatePlaceIndex -> ShowS
[CreatePlaceIndex] -> ShowS
CreatePlaceIndex -> String
(Int -> CreatePlaceIndex -> ShowS)
-> (CreatePlaceIndex -> String)
-> ([CreatePlaceIndex] -> ShowS)
-> Show CreatePlaceIndex
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreatePlaceIndex] -> ShowS
$cshowList :: [CreatePlaceIndex] -> ShowS
show :: CreatePlaceIndex -> String
$cshow :: CreatePlaceIndex -> String
showsPrec :: Int -> CreatePlaceIndex -> ShowS
$cshowsPrec :: Int -> CreatePlaceIndex -> ShowS
Prelude.Show, (forall x. CreatePlaceIndex -> Rep CreatePlaceIndex x)
-> (forall x. Rep CreatePlaceIndex x -> CreatePlaceIndex)
-> Generic CreatePlaceIndex
forall x. Rep CreatePlaceIndex x -> CreatePlaceIndex
forall x. CreatePlaceIndex -> Rep CreatePlaceIndex x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreatePlaceIndex x -> CreatePlaceIndex
$cfrom :: forall x. CreatePlaceIndex -> Rep CreatePlaceIndex x
Prelude.Generic)
newCreatePlaceIndex ::
Prelude.Text ->
Prelude.Text ->
PricingPlan ->
CreatePlaceIndex
newCreatePlaceIndex :: Text -> Text -> PricingPlan -> CreatePlaceIndex
newCreatePlaceIndex
Text
pDataSource_
Text
pIndexName_
PricingPlan
pPricingPlan_ =
CreatePlaceIndex' :: Maybe DataSourceConfiguration
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> PricingPlan
-> CreatePlaceIndex
CreatePlaceIndex'
{ $sel:dataSourceConfiguration:CreatePlaceIndex' :: Maybe DataSourceConfiguration
dataSourceConfiguration =
Maybe DataSourceConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:description:CreatePlaceIndex' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreatePlaceIndex' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:dataSource:CreatePlaceIndex' :: Text
dataSource = Text
pDataSource_,
$sel:indexName:CreatePlaceIndex' :: Text
indexName = Text
pIndexName_,
$sel:pricingPlan:CreatePlaceIndex' :: PricingPlan
pricingPlan = PricingPlan
pPricingPlan_
}
createPlaceIndex_dataSourceConfiguration :: Lens.Lens' CreatePlaceIndex (Prelude.Maybe DataSourceConfiguration)
createPlaceIndex_dataSourceConfiguration :: (Maybe DataSourceConfiguration
-> f (Maybe DataSourceConfiguration))
-> CreatePlaceIndex -> f CreatePlaceIndex
createPlaceIndex_dataSourceConfiguration = (CreatePlaceIndex -> Maybe DataSourceConfiguration)
-> (CreatePlaceIndex
-> Maybe DataSourceConfiguration -> CreatePlaceIndex)
-> Lens
CreatePlaceIndex
CreatePlaceIndex
(Maybe DataSourceConfiguration)
(Maybe DataSourceConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePlaceIndex' {Maybe DataSourceConfiguration
dataSourceConfiguration :: Maybe DataSourceConfiguration
$sel:dataSourceConfiguration:CreatePlaceIndex' :: CreatePlaceIndex -> Maybe DataSourceConfiguration
dataSourceConfiguration} -> Maybe DataSourceConfiguration
dataSourceConfiguration) (\s :: CreatePlaceIndex
s@CreatePlaceIndex' {} Maybe DataSourceConfiguration
a -> CreatePlaceIndex
s {$sel:dataSourceConfiguration:CreatePlaceIndex' :: Maybe DataSourceConfiguration
dataSourceConfiguration = Maybe DataSourceConfiguration
a} :: CreatePlaceIndex)
createPlaceIndex_description :: Lens.Lens' CreatePlaceIndex (Prelude.Maybe Prelude.Text)
createPlaceIndex_description :: (Maybe Text -> f (Maybe Text))
-> CreatePlaceIndex -> f CreatePlaceIndex
createPlaceIndex_description = (CreatePlaceIndex -> Maybe Text)
-> (CreatePlaceIndex -> Maybe Text -> CreatePlaceIndex)
-> Lens CreatePlaceIndex CreatePlaceIndex (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePlaceIndex' {Maybe Text
description :: Maybe Text
$sel:description:CreatePlaceIndex' :: CreatePlaceIndex -> Maybe Text
description} -> Maybe Text
description) (\s :: CreatePlaceIndex
s@CreatePlaceIndex' {} Maybe Text
a -> CreatePlaceIndex
s {$sel:description:CreatePlaceIndex' :: Maybe Text
description = Maybe Text
a} :: CreatePlaceIndex)
createPlaceIndex_tags :: Lens.Lens' CreatePlaceIndex (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createPlaceIndex_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreatePlaceIndex -> f CreatePlaceIndex
createPlaceIndex_tags = (CreatePlaceIndex -> Maybe (HashMap Text Text))
-> (CreatePlaceIndex
-> Maybe (HashMap Text Text) -> CreatePlaceIndex)
-> Lens
CreatePlaceIndex
CreatePlaceIndex
(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 (\CreatePlaceIndex' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreatePlaceIndex' :: CreatePlaceIndex -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreatePlaceIndex
s@CreatePlaceIndex' {} Maybe (HashMap Text Text)
a -> CreatePlaceIndex
s {$sel:tags:CreatePlaceIndex' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreatePlaceIndex) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreatePlaceIndex -> f CreatePlaceIndex)
-> ((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)))
-> CreatePlaceIndex
-> f CreatePlaceIndex
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
createPlaceIndex_dataSource :: Lens.Lens' CreatePlaceIndex Prelude.Text
createPlaceIndex_dataSource :: (Text -> f Text) -> CreatePlaceIndex -> f CreatePlaceIndex
createPlaceIndex_dataSource = (CreatePlaceIndex -> Text)
-> (CreatePlaceIndex -> Text -> CreatePlaceIndex)
-> Lens CreatePlaceIndex CreatePlaceIndex Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePlaceIndex' {Text
dataSource :: Text
$sel:dataSource:CreatePlaceIndex' :: CreatePlaceIndex -> Text
dataSource} -> Text
dataSource) (\s :: CreatePlaceIndex
s@CreatePlaceIndex' {} Text
a -> CreatePlaceIndex
s {$sel:dataSource:CreatePlaceIndex' :: Text
dataSource = Text
a} :: CreatePlaceIndex)
createPlaceIndex_indexName :: Lens.Lens' CreatePlaceIndex Prelude.Text
createPlaceIndex_indexName :: (Text -> f Text) -> CreatePlaceIndex -> f CreatePlaceIndex
createPlaceIndex_indexName = (CreatePlaceIndex -> Text)
-> (CreatePlaceIndex -> Text -> CreatePlaceIndex)
-> Lens CreatePlaceIndex CreatePlaceIndex Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePlaceIndex' {Text
indexName :: Text
$sel:indexName:CreatePlaceIndex' :: CreatePlaceIndex -> Text
indexName} -> Text
indexName) (\s :: CreatePlaceIndex
s@CreatePlaceIndex' {} Text
a -> CreatePlaceIndex
s {$sel:indexName:CreatePlaceIndex' :: Text
indexName = Text
a} :: CreatePlaceIndex)
createPlaceIndex_pricingPlan :: Lens.Lens' CreatePlaceIndex PricingPlan
createPlaceIndex_pricingPlan :: (PricingPlan -> f PricingPlan)
-> CreatePlaceIndex -> f CreatePlaceIndex
createPlaceIndex_pricingPlan = (CreatePlaceIndex -> PricingPlan)
-> (CreatePlaceIndex -> PricingPlan -> CreatePlaceIndex)
-> Lens CreatePlaceIndex CreatePlaceIndex PricingPlan PricingPlan
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePlaceIndex' {PricingPlan
pricingPlan :: PricingPlan
$sel:pricingPlan:CreatePlaceIndex' :: CreatePlaceIndex -> PricingPlan
pricingPlan} -> PricingPlan
pricingPlan) (\s :: CreatePlaceIndex
s@CreatePlaceIndex' {} PricingPlan
a -> CreatePlaceIndex
s {$sel:pricingPlan:CreatePlaceIndex' :: PricingPlan
pricingPlan = PricingPlan
a} :: CreatePlaceIndex)
instance Core.AWSRequest CreatePlaceIndex where
type
AWSResponse CreatePlaceIndex =
CreatePlaceIndexResponse
request :: CreatePlaceIndex -> Request CreatePlaceIndex
request = Service -> CreatePlaceIndex -> Request CreatePlaceIndex
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreatePlaceIndex
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreatePlaceIndex)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreatePlaceIndex))
-> Logger
-> Service
-> Proxy CreatePlaceIndex
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreatePlaceIndex)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Int -> POSIX -> Text -> Text -> CreatePlaceIndexResponse
CreatePlaceIndexResponse'
(Int -> POSIX -> Text -> Text -> CreatePlaceIndexResponse)
-> Either String Int
-> Either
String (POSIX -> Text -> Text -> CreatePlaceIndexResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
Either String (POSIX -> Text -> Text -> CreatePlaceIndexResponse)
-> Either String POSIX
-> Either String (Text -> Text -> CreatePlaceIndexResponse)
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 -> Text -> CreatePlaceIndexResponse)
-> Either String Text
-> Either String (Text -> CreatePlaceIndexResponse)
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 -> CreatePlaceIndexResponse)
-> Either String Text -> Either String CreatePlaceIndexResponse
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")
)
instance Prelude.Hashable CreatePlaceIndex
instance Prelude.NFData CreatePlaceIndex
instance Core.ToHeaders CreatePlaceIndex where
toHeaders :: CreatePlaceIndex -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreatePlaceIndex -> 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 CreatePlaceIndex where
toJSON :: CreatePlaceIndex -> Value
toJSON CreatePlaceIndex' {Maybe Text
Maybe (HashMap Text Text)
Maybe DataSourceConfiguration
Text
PricingPlan
pricingPlan :: PricingPlan
indexName :: Text
dataSource :: Text
tags :: Maybe (HashMap Text Text)
description :: Maybe Text
dataSourceConfiguration :: Maybe DataSourceConfiguration
$sel:pricingPlan:CreatePlaceIndex' :: CreatePlaceIndex -> PricingPlan
$sel:indexName:CreatePlaceIndex' :: CreatePlaceIndex -> Text
$sel:dataSource:CreatePlaceIndex' :: CreatePlaceIndex -> Text
$sel:tags:CreatePlaceIndex' :: CreatePlaceIndex -> Maybe (HashMap Text Text)
$sel:description:CreatePlaceIndex' :: CreatePlaceIndex -> Maybe Text
$sel:dataSourceConfiguration:CreatePlaceIndex' :: CreatePlaceIndex -> Maybe DataSourceConfiguration
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (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,
(Text
"Tags" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"DataSource" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
dataSource),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"IndexName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
indexName),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"PricingPlan" Text -> PricingPlan -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= PricingPlan
pricingPlan)
]
)
instance Core.ToPath CreatePlaceIndex where
toPath :: CreatePlaceIndex -> ByteString
toPath = ByteString -> CreatePlaceIndex -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/places/v0/indexes"
instance Core.ToQuery CreatePlaceIndex where
toQuery :: CreatePlaceIndex -> QueryString
toQuery = QueryString -> CreatePlaceIndex -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreatePlaceIndexResponse = CreatePlaceIndexResponse'
{
CreatePlaceIndexResponse -> Int
httpStatus :: Prelude.Int,
CreatePlaceIndexResponse -> POSIX
createTime :: Core.POSIX,
CreatePlaceIndexResponse -> Text
indexArn :: Prelude.Text,
CreatePlaceIndexResponse -> Text
indexName :: Prelude.Text
}
deriving (CreatePlaceIndexResponse -> CreatePlaceIndexResponse -> Bool
(CreatePlaceIndexResponse -> CreatePlaceIndexResponse -> Bool)
-> (CreatePlaceIndexResponse -> CreatePlaceIndexResponse -> Bool)
-> Eq CreatePlaceIndexResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreatePlaceIndexResponse -> CreatePlaceIndexResponse -> Bool
$c/= :: CreatePlaceIndexResponse -> CreatePlaceIndexResponse -> Bool
== :: CreatePlaceIndexResponse -> CreatePlaceIndexResponse -> Bool
$c== :: CreatePlaceIndexResponse -> CreatePlaceIndexResponse -> Bool
Prelude.Eq, ReadPrec [CreatePlaceIndexResponse]
ReadPrec CreatePlaceIndexResponse
Int -> ReadS CreatePlaceIndexResponse
ReadS [CreatePlaceIndexResponse]
(Int -> ReadS CreatePlaceIndexResponse)
-> ReadS [CreatePlaceIndexResponse]
-> ReadPrec CreatePlaceIndexResponse
-> ReadPrec [CreatePlaceIndexResponse]
-> Read CreatePlaceIndexResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreatePlaceIndexResponse]
$creadListPrec :: ReadPrec [CreatePlaceIndexResponse]
readPrec :: ReadPrec CreatePlaceIndexResponse
$creadPrec :: ReadPrec CreatePlaceIndexResponse
readList :: ReadS [CreatePlaceIndexResponse]
$creadList :: ReadS [CreatePlaceIndexResponse]
readsPrec :: Int -> ReadS CreatePlaceIndexResponse
$creadsPrec :: Int -> ReadS CreatePlaceIndexResponse
Prelude.Read, Int -> CreatePlaceIndexResponse -> ShowS
[CreatePlaceIndexResponse] -> ShowS
CreatePlaceIndexResponse -> String
(Int -> CreatePlaceIndexResponse -> ShowS)
-> (CreatePlaceIndexResponse -> String)
-> ([CreatePlaceIndexResponse] -> ShowS)
-> Show CreatePlaceIndexResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreatePlaceIndexResponse] -> ShowS
$cshowList :: [CreatePlaceIndexResponse] -> ShowS
show :: CreatePlaceIndexResponse -> String
$cshow :: CreatePlaceIndexResponse -> String
showsPrec :: Int -> CreatePlaceIndexResponse -> ShowS
$cshowsPrec :: Int -> CreatePlaceIndexResponse -> ShowS
Prelude.Show, (forall x.
CreatePlaceIndexResponse -> Rep CreatePlaceIndexResponse x)
-> (forall x.
Rep CreatePlaceIndexResponse x -> CreatePlaceIndexResponse)
-> Generic CreatePlaceIndexResponse
forall x.
Rep CreatePlaceIndexResponse x -> CreatePlaceIndexResponse
forall x.
CreatePlaceIndexResponse -> Rep CreatePlaceIndexResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreatePlaceIndexResponse x -> CreatePlaceIndexResponse
$cfrom :: forall x.
CreatePlaceIndexResponse -> Rep CreatePlaceIndexResponse x
Prelude.Generic)
newCreatePlaceIndexResponse ::
Prelude.Int ->
Prelude.UTCTime ->
Prelude.Text ->
Prelude.Text ->
CreatePlaceIndexResponse
newCreatePlaceIndexResponse :: Int -> UTCTime -> Text -> Text -> CreatePlaceIndexResponse
newCreatePlaceIndexResponse
Int
pHttpStatus_
UTCTime
pCreateTime_
Text
pIndexArn_
Text
pIndexName_ =
CreatePlaceIndexResponse' :: Int -> POSIX -> Text -> Text -> CreatePlaceIndexResponse
CreatePlaceIndexResponse'
{ $sel:httpStatus:CreatePlaceIndexResponse' :: Int
httpStatus =
Int
pHttpStatus_,
$sel:createTime:CreatePlaceIndexResponse' :: 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:indexArn:CreatePlaceIndexResponse' :: Text
indexArn = Text
pIndexArn_,
$sel:indexName:CreatePlaceIndexResponse' :: Text
indexName = Text
pIndexName_
}
createPlaceIndexResponse_httpStatus :: Lens.Lens' CreatePlaceIndexResponse Prelude.Int
createPlaceIndexResponse_httpStatus :: (Int -> f Int)
-> CreatePlaceIndexResponse -> f CreatePlaceIndexResponse
createPlaceIndexResponse_httpStatus = (CreatePlaceIndexResponse -> Int)
-> (CreatePlaceIndexResponse -> Int -> CreatePlaceIndexResponse)
-> Lens CreatePlaceIndexResponse CreatePlaceIndexResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePlaceIndexResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreatePlaceIndexResponse' :: CreatePlaceIndexResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreatePlaceIndexResponse
s@CreatePlaceIndexResponse' {} Int
a -> CreatePlaceIndexResponse
s {$sel:httpStatus:CreatePlaceIndexResponse' :: Int
httpStatus = Int
a} :: CreatePlaceIndexResponse)
createPlaceIndexResponse_createTime :: Lens.Lens' CreatePlaceIndexResponse Prelude.UTCTime
createPlaceIndexResponse_createTime :: (UTCTime -> f UTCTime)
-> CreatePlaceIndexResponse -> f CreatePlaceIndexResponse
createPlaceIndexResponse_createTime = (CreatePlaceIndexResponse -> POSIX)
-> (CreatePlaceIndexResponse -> POSIX -> CreatePlaceIndexResponse)
-> Lens
CreatePlaceIndexResponse CreatePlaceIndexResponse POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePlaceIndexResponse' {POSIX
createTime :: POSIX
$sel:createTime:CreatePlaceIndexResponse' :: CreatePlaceIndexResponse -> POSIX
createTime} -> POSIX
createTime) (\s :: CreatePlaceIndexResponse
s@CreatePlaceIndexResponse' {} POSIX
a -> CreatePlaceIndexResponse
s {$sel:createTime:CreatePlaceIndexResponse' :: POSIX
createTime = POSIX
a} :: CreatePlaceIndexResponse) ((POSIX -> f POSIX)
-> CreatePlaceIndexResponse -> f CreatePlaceIndexResponse)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> CreatePlaceIndexResponse
-> f CreatePlaceIndexResponse
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
createPlaceIndexResponse_indexArn :: Lens.Lens' CreatePlaceIndexResponse Prelude.Text
createPlaceIndexResponse_indexArn :: (Text -> f Text)
-> CreatePlaceIndexResponse -> f CreatePlaceIndexResponse
createPlaceIndexResponse_indexArn = (CreatePlaceIndexResponse -> Text)
-> (CreatePlaceIndexResponse -> Text -> CreatePlaceIndexResponse)
-> Lens CreatePlaceIndexResponse CreatePlaceIndexResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePlaceIndexResponse' {Text
indexArn :: Text
$sel:indexArn:CreatePlaceIndexResponse' :: CreatePlaceIndexResponse -> Text
indexArn} -> Text
indexArn) (\s :: CreatePlaceIndexResponse
s@CreatePlaceIndexResponse' {} Text
a -> CreatePlaceIndexResponse
s {$sel:indexArn:CreatePlaceIndexResponse' :: Text
indexArn = Text
a} :: CreatePlaceIndexResponse)
createPlaceIndexResponse_indexName :: Lens.Lens' CreatePlaceIndexResponse Prelude.Text
createPlaceIndexResponse_indexName :: (Text -> f Text)
-> CreatePlaceIndexResponse -> f CreatePlaceIndexResponse
createPlaceIndexResponse_indexName = (CreatePlaceIndexResponse -> Text)
-> (CreatePlaceIndexResponse -> Text -> CreatePlaceIndexResponse)
-> Lens CreatePlaceIndexResponse CreatePlaceIndexResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePlaceIndexResponse' {Text
indexName :: Text
$sel:indexName:CreatePlaceIndexResponse' :: CreatePlaceIndexResponse -> Text
indexName} -> Text
indexName) (\s :: CreatePlaceIndexResponse
s@CreatePlaceIndexResponse' {} Text
a -> CreatePlaceIndexResponse
s {$sel:indexName:CreatePlaceIndexResponse' :: Text
indexName = Text
a} :: CreatePlaceIndexResponse)
instance Prelude.NFData CreatePlaceIndexResponse