{-# 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.SearchForPositionResult 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 SearchForPositionResult = SearchForPositionResult'
{
SearchForPositionResult -> Place
place :: Place
}
deriving (SearchForPositionResult -> SearchForPositionResult -> Bool
(SearchForPositionResult -> SearchForPositionResult -> Bool)
-> (SearchForPositionResult -> SearchForPositionResult -> Bool)
-> Eq SearchForPositionResult
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SearchForPositionResult -> SearchForPositionResult -> Bool
$c/= :: SearchForPositionResult -> SearchForPositionResult -> Bool
== :: SearchForPositionResult -> SearchForPositionResult -> Bool
$c== :: SearchForPositionResult -> SearchForPositionResult -> Bool
Prelude.Eq, Int -> SearchForPositionResult -> ShowS
[SearchForPositionResult] -> ShowS
SearchForPositionResult -> String
(Int -> SearchForPositionResult -> ShowS)
-> (SearchForPositionResult -> String)
-> ([SearchForPositionResult] -> ShowS)
-> Show SearchForPositionResult
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SearchForPositionResult] -> ShowS
$cshowList :: [SearchForPositionResult] -> ShowS
show :: SearchForPositionResult -> String
$cshow :: SearchForPositionResult -> String
showsPrec :: Int -> SearchForPositionResult -> ShowS
$cshowsPrec :: Int -> SearchForPositionResult -> ShowS
Prelude.Show, (forall x.
SearchForPositionResult -> Rep SearchForPositionResult x)
-> (forall x.
Rep SearchForPositionResult x -> SearchForPositionResult)
-> Generic SearchForPositionResult
forall x. Rep SearchForPositionResult x -> SearchForPositionResult
forall x. SearchForPositionResult -> Rep SearchForPositionResult x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SearchForPositionResult x -> SearchForPositionResult
$cfrom :: forall x. SearchForPositionResult -> Rep SearchForPositionResult x
Prelude.Generic)
newSearchForPositionResult ::
Place ->
SearchForPositionResult
newSearchForPositionResult :: Place -> SearchForPositionResult
newSearchForPositionResult Place
pPlace_ =
SearchForPositionResult' :: Place -> SearchForPositionResult
SearchForPositionResult' {$sel:place:SearchForPositionResult' :: Place
place = Place
pPlace_}
searchForPositionResult_place :: Lens.Lens' SearchForPositionResult Place
searchForPositionResult_place :: (Place -> f Place)
-> SearchForPositionResult -> f SearchForPositionResult
searchForPositionResult_place = (SearchForPositionResult -> Place)
-> (SearchForPositionResult -> Place -> SearchForPositionResult)
-> Lens SearchForPositionResult SearchForPositionResult Place Place
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchForPositionResult' {Place
place :: Place
$sel:place:SearchForPositionResult' :: SearchForPositionResult -> Place
place} -> Place
place) (\s :: SearchForPositionResult
s@SearchForPositionResult' {} Place
a -> SearchForPositionResult
s {$sel:place:SearchForPositionResult' :: Place
place = Place
a} :: SearchForPositionResult)
instance Core.FromJSON SearchForPositionResult where
parseJSON :: Value -> Parser SearchForPositionResult
parseJSON =
String
-> (Object -> Parser SearchForPositionResult)
-> Value
-> Parser SearchForPositionResult
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"SearchForPositionResult"
( \Object
x ->
Place -> SearchForPositionResult
SearchForPositionResult'
(Place -> SearchForPositionResult)
-> Parser Place -> Parser SearchForPositionResult
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 SearchForPositionResult
instance Prelude.NFData SearchForPositionResult