{-# 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 #-}
module Amazonka.Location.Types.SearchForTextResult where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Location.Types.Place
import qualified Amazonka.Prelude as Prelude
data SearchForTextResult = SearchForTextResult'
{
SearchForTextResult -> Place
place :: Place
}
deriving (SearchForTextResult -> SearchForTextResult -> Bool
(SearchForTextResult -> SearchForTextResult -> Bool)
-> (SearchForTextResult -> SearchForTextResult -> Bool)
-> Eq SearchForTextResult
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SearchForTextResult -> SearchForTextResult -> Bool
$c/= :: SearchForTextResult -> SearchForTextResult -> Bool
== :: SearchForTextResult -> SearchForTextResult -> Bool
$c== :: SearchForTextResult -> SearchForTextResult -> Bool
Prelude.Eq, Int -> SearchForTextResult -> ShowS
[SearchForTextResult] -> ShowS
SearchForTextResult -> String
(Int -> SearchForTextResult -> ShowS)
-> (SearchForTextResult -> String)
-> ([SearchForTextResult] -> ShowS)
-> Show SearchForTextResult
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SearchForTextResult] -> ShowS
$cshowList :: [SearchForTextResult] -> ShowS
show :: SearchForTextResult -> String
$cshow :: SearchForTextResult -> String
showsPrec :: Int -> SearchForTextResult -> ShowS
$cshowsPrec :: Int -> SearchForTextResult -> ShowS
Prelude.Show, (forall x. SearchForTextResult -> Rep SearchForTextResult x)
-> (forall x. Rep SearchForTextResult x -> SearchForTextResult)
-> Generic SearchForTextResult
forall x. Rep SearchForTextResult x -> SearchForTextResult
forall x. SearchForTextResult -> Rep SearchForTextResult x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SearchForTextResult x -> SearchForTextResult
$cfrom :: forall x. SearchForTextResult -> Rep SearchForTextResult x
Prelude.Generic)
newSearchForTextResult ::
Place ->
SearchForTextResult
newSearchForTextResult :: Place -> SearchForTextResult
newSearchForTextResult Place
pPlace_ =
SearchForTextResult' :: Place -> SearchForTextResult
SearchForTextResult' {$sel:place:SearchForTextResult' :: Place
place = Place
pPlace_}
searchForTextResult_place :: Lens.Lens' SearchForTextResult Place
searchForTextResult_place :: (Place -> f Place) -> SearchForTextResult -> f SearchForTextResult
searchForTextResult_place = (SearchForTextResult -> Place)
-> (SearchForTextResult -> Place -> SearchForTextResult)
-> Lens SearchForTextResult SearchForTextResult Place Place
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchForTextResult' {Place
place :: Place
$sel:place:SearchForTextResult' :: SearchForTextResult -> Place
place} -> Place
place) (\s :: SearchForTextResult
s@SearchForTextResult' {} Place
a -> SearchForTextResult
s {$sel:place:SearchForTextResult' :: Place
place = Place
a} :: SearchForTextResult)
instance Core.FromJSON SearchForTextResult where
parseJSON :: Value -> Parser SearchForTextResult
parseJSON =
String
-> (Object -> Parser SearchForTextResult)
-> Value
-> Parser SearchForTextResult
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"SearchForTextResult"
( \Object
x ->
Place -> SearchForTextResult
SearchForTextResult' (Place -> SearchForTextResult)
-> Parser Place -> Parser SearchForTextResult
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Place
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Place")
)
instance Prelude.Hashable SearchForTextResult
instance Prelude.NFData SearchForTextResult