{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data LegGeometry = LegGeometry'
{
LegGeometry -> Maybe (NonEmpty (Sensitive (NonEmpty Double)))
lineString :: Prelude.Maybe (Prelude.NonEmpty (Data.Sensitive (Prelude.NonEmpty Prelude.Double)))
}
deriving (LegGeometry -> LegGeometry -> Bool
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
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. 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' {$sel:lineString:LegGeometry' :: Maybe (NonEmpty (Sensitive (NonEmpty Double)))
lineString = forall a. Maybe a
Prelude.Nothing}
legGeometry_lineString :: Lens.Lens' LegGeometry (Prelude.Maybe (Prelude.NonEmpty (Prelude.NonEmpty Prelude.Double)))
legGeometry_lineString :: Lens' LegGeometry (Maybe (NonEmpty (NonEmpty Double)))
legGeometry_lineString = 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) 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 s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Data.FromJSON LegGeometry where
parseJSON :: Value -> Parser LegGeometry
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"LegGeometry"
( \Object
x ->
Maybe (NonEmpty (Sensitive (NonEmpty Double))) -> LegGeometry
LegGeometry' 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
"LineString")
)
instance Prelude.Hashable LegGeometry where
hashWithSalt :: Int -> LegGeometry -> Int
hashWithSalt Int
_salt LegGeometry' {Maybe (NonEmpty (Sensitive (NonEmpty Double)))
lineString :: Maybe (NonEmpty (Sensitive (NonEmpty Double)))
$sel:lineString:LegGeometry' :: LegGeometry -> Maybe (NonEmpty (Sensitive (NonEmpty Double)))
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty (Sensitive (NonEmpty Double)))
lineString
instance Prelude.NFData LegGeometry where
rnf :: LegGeometry -> ()
rnf LegGeometry' {Maybe (NonEmpty (Sensitive (NonEmpty Double)))
lineString :: Maybe (NonEmpty (Sensitive (NonEmpty Double)))
$sel:lineString:LegGeometry' :: LegGeometry -> Maybe (NonEmpty (Sensitive (NonEmpty Double)))
..} = forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty (Sensitive (NonEmpty Double)))
lineString