{-# 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.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data PlaceGeometry = PlaceGeometry'
{
PlaceGeometry -> Maybe (Sensitive (NonEmpty Double))
point :: Prelude.Maybe (Core.Sensitive (Prelude.NonEmpty Prelude.Double))
}
deriving (PlaceGeometry -> PlaceGeometry -> Bool
(PlaceGeometry -> PlaceGeometry -> Bool)
-> (PlaceGeometry -> PlaceGeometry -> Bool) -> Eq PlaceGeometry
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
(Int -> PlaceGeometry -> ShowS)
-> (PlaceGeometry -> String)
-> ([PlaceGeometry] -> ShowS)
-> Show PlaceGeometry
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. PlaceGeometry -> Rep PlaceGeometry x)
-> (forall x. Rep PlaceGeometry x -> PlaceGeometry)
-> Generic PlaceGeometry
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' :: Maybe (Sensitive (NonEmpty Double)) -> PlaceGeometry
PlaceGeometry' {$sel:point:PlaceGeometry' :: Maybe (Sensitive (NonEmpty Double))
point = Maybe (Sensitive (NonEmpty Double))
forall a. Maybe a
Prelude.Nothing}
placeGeometry_point :: Lens.Lens' PlaceGeometry (Prelude.Maybe (Prelude.NonEmpty Prelude.Double))
placeGeometry_point :: (Maybe (NonEmpty Double) -> f (Maybe (NonEmpty Double)))
-> PlaceGeometry -> f PlaceGeometry
placeGeometry_point = (PlaceGeometry -> Maybe (Sensitive (NonEmpty Double)))
-> (PlaceGeometry
-> Maybe (Sensitive (NonEmpty Double)) -> PlaceGeometry)
-> Lens
PlaceGeometry
PlaceGeometry
(Maybe (Sensitive (NonEmpty Double)))
(Maybe (Sensitive (NonEmpty Double)))
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) ((Maybe (Sensitive (NonEmpty Double))
-> f (Maybe (Sensitive (NonEmpty Double))))
-> PlaceGeometry -> f PlaceGeometry)
-> ((Maybe (NonEmpty Double) -> f (Maybe (NonEmpty Double)))
-> Maybe (Sensitive (NonEmpty Double))
-> f (Maybe (Sensitive (NonEmpty Double))))
-> (Maybe (NonEmpty Double) -> f (Maybe (NonEmpty Double)))
-> PlaceGeometry
-> f PlaceGeometry
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(Sensitive (NonEmpty Double))
(Sensitive (NonEmpty Double))
(NonEmpty Double)
(NonEmpty Double)
-> Iso
(Maybe (Sensitive (NonEmpty Double)))
(Maybe (Sensitive (NonEmpty Double)))
(Maybe (NonEmpty Double))
(Maybe (NonEmpty Double))
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
(Sensitive (NonEmpty Double))
(Sensitive (NonEmpty Double))
(NonEmpty Double)
(NonEmpty Double)
forall a. Iso' (Sensitive a) a
Core._Sensitive AnIso
(Sensitive (NonEmpty Double))
(Sensitive (NonEmpty Double))
(NonEmpty Double)
(NonEmpty Double)
-> (Exchange
(NonEmpty Double)
(NonEmpty Double)
(NonEmpty Double)
(Identity (NonEmpty Double))
-> Exchange
(NonEmpty Double)
(NonEmpty Double)
(NonEmpty Double)
(Identity (NonEmpty Double)))
-> AnIso
(Sensitive (NonEmpty Double))
(Sensitive (NonEmpty Double))
(NonEmpty Double)
(NonEmpty Double)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Exchange
(NonEmpty Double)
(NonEmpty Double)
(NonEmpty Double)
(Identity (NonEmpty Double))
-> Exchange
(NonEmpty Double)
(NonEmpty Double)
(NonEmpty Double)
(Identity (NonEmpty Double))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced)
instance Core.FromJSON PlaceGeometry where
parseJSON :: Value -> Parser PlaceGeometry
parseJSON =
String
-> (Object -> Parser PlaceGeometry)
-> Value
-> Parser PlaceGeometry
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"PlaceGeometry"
( \Object
x ->
Maybe (Sensitive (NonEmpty Double)) -> PlaceGeometry
PlaceGeometry' (Maybe (Sensitive (NonEmpty Double)) -> PlaceGeometry)
-> Parser (Maybe (Sensitive (NonEmpty Double)))
-> Parser PlaceGeometry
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe (Sensitive (NonEmpty Double)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Point")
)
instance Prelude.Hashable PlaceGeometry
instance Prelude.NFData PlaceGeometry