{-# 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.PlaceGeometry where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data PlaceGeometry = PlaceGeometry'
{
PlaceGeometry -> Maybe (Sensitive (NonEmpty Double))
point :: Prelude.Maybe (Data.Sensitive (Prelude.NonEmpty Prelude.Double))
}
deriving (PlaceGeometry -> PlaceGeometry -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PlaceGeometry -> PlaceGeometry -> Bool
$c/= :: PlaceGeometry -> PlaceGeometry -> Bool
== :: PlaceGeometry -> PlaceGeometry -> Bool
$c== :: PlaceGeometry -> PlaceGeometry -> Bool
Prelude.Eq, Int -> PlaceGeometry -> ShowS
[PlaceGeometry] -> ShowS
PlaceGeometry -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PlaceGeometry] -> ShowS
$cshowList :: [PlaceGeometry] -> ShowS
show :: PlaceGeometry -> String
$cshow :: PlaceGeometry -> String
showsPrec :: Int -> PlaceGeometry -> ShowS
$cshowsPrec :: Int -> PlaceGeometry -> ShowS
Prelude.Show, forall x. Rep PlaceGeometry x -> PlaceGeometry
forall x. PlaceGeometry -> Rep PlaceGeometry x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PlaceGeometry x -> PlaceGeometry
$cfrom :: forall x. PlaceGeometry -> Rep PlaceGeometry x
Prelude.Generic)
newPlaceGeometry ::
PlaceGeometry
newPlaceGeometry :: PlaceGeometry
newPlaceGeometry =
PlaceGeometry' {$sel:point:PlaceGeometry' :: Maybe (Sensitive (NonEmpty Double))
point = forall a. Maybe a
Prelude.Nothing}
placeGeometry_point :: Lens.Lens' PlaceGeometry (Prelude.Maybe (Prelude.NonEmpty Prelude.Double))
placeGeometry_point :: Lens' PlaceGeometry (Maybe (NonEmpty Double))
placeGeometry_point = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PlaceGeometry' {Maybe (Sensitive (NonEmpty Double))
point :: Maybe (Sensitive (NonEmpty Double))
$sel:point:PlaceGeometry' :: PlaceGeometry -> Maybe (Sensitive (NonEmpty Double))
point} -> Maybe (Sensitive (NonEmpty Double))
point) (\s :: PlaceGeometry
s@PlaceGeometry' {} Maybe (Sensitive (NonEmpty Double))
a -> PlaceGeometry
s {$sel:point:PlaceGeometry' :: Maybe (Sensitive (NonEmpty Double))
point = Maybe (Sensitive (NonEmpty Double))
a} :: PlaceGeometry) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 (forall a. Iso' (Sensitive a) a
Data._Sensitive forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced)
instance Data.FromJSON PlaceGeometry where
parseJSON :: Value -> Parser PlaceGeometry
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"PlaceGeometry"
( \Object
x ->
Maybe (Sensitive (NonEmpty Double)) -> PlaceGeometry
PlaceGeometry' forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Point")
)
instance Prelude.Hashable PlaceGeometry where
hashWithSalt :: Int -> PlaceGeometry -> Int
hashWithSalt Int
_salt PlaceGeometry' {Maybe (Sensitive (NonEmpty Double))
point :: Maybe (Sensitive (NonEmpty Double))
$sel:point:PlaceGeometry' :: PlaceGeometry -> Maybe (Sensitive (NonEmpty Double))
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive (NonEmpty Double))
point
instance Prelude.NFData PlaceGeometry where
rnf :: PlaceGeometry -> ()
rnf PlaceGeometry' {Maybe (Sensitive (NonEmpty Double))
point :: Maybe (Sensitive (NonEmpty Double))
$sel:point:PlaceGeometry' :: PlaceGeometry -> Maybe (Sensitive (NonEmpty Double))
..} = forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive (NonEmpty Double))
point