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