{-# 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.CalculateRouteMatrixSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Location.Types.DistanceUnit
import qualified Amazonka.Prelude as Prelude
data CalculateRouteMatrixSummary = CalculateRouteMatrixSummary'
{
CalculateRouteMatrixSummary -> Text
dataSource :: Prelude.Text,
CalculateRouteMatrixSummary -> DistanceUnit
distanceUnit :: DistanceUnit,
CalculateRouteMatrixSummary -> Natural
errorCount :: Prelude.Natural,
CalculateRouteMatrixSummary -> Natural
routeCount :: Prelude.Natural
}
deriving (CalculateRouteMatrixSummary -> CalculateRouteMatrixSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CalculateRouteMatrixSummary -> CalculateRouteMatrixSummary -> Bool
$c/= :: CalculateRouteMatrixSummary -> CalculateRouteMatrixSummary -> Bool
== :: CalculateRouteMatrixSummary -> CalculateRouteMatrixSummary -> Bool
$c== :: CalculateRouteMatrixSummary -> CalculateRouteMatrixSummary -> Bool
Prelude.Eq, ReadPrec [CalculateRouteMatrixSummary]
ReadPrec CalculateRouteMatrixSummary
Int -> ReadS CalculateRouteMatrixSummary
ReadS [CalculateRouteMatrixSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CalculateRouteMatrixSummary]
$creadListPrec :: ReadPrec [CalculateRouteMatrixSummary]
readPrec :: ReadPrec CalculateRouteMatrixSummary
$creadPrec :: ReadPrec CalculateRouteMatrixSummary
readList :: ReadS [CalculateRouteMatrixSummary]
$creadList :: ReadS [CalculateRouteMatrixSummary]
readsPrec :: Int -> ReadS CalculateRouteMatrixSummary
$creadsPrec :: Int -> ReadS CalculateRouteMatrixSummary
Prelude.Read, Int -> CalculateRouteMatrixSummary -> ShowS
[CalculateRouteMatrixSummary] -> ShowS
CalculateRouteMatrixSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CalculateRouteMatrixSummary] -> ShowS
$cshowList :: [CalculateRouteMatrixSummary] -> ShowS
show :: CalculateRouteMatrixSummary -> String
$cshow :: CalculateRouteMatrixSummary -> String
showsPrec :: Int -> CalculateRouteMatrixSummary -> ShowS
$cshowsPrec :: Int -> CalculateRouteMatrixSummary -> ShowS
Prelude.Show, forall x.
Rep CalculateRouteMatrixSummary x -> CalculateRouteMatrixSummary
forall x.
CalculateRouteMatrixSummary -> Rep CalculateRouteMatrixSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CalculateRouteMatrixSummary x -> CalculateRouteMatrixSummary
$cfrom :: forall x.
CalculateRouteMatrixSummary -> Rep CalculateRouteMatrixSummary x
Prelude.Generic)
newCalculateRouteMatrixSummary ::
Prelude.Text ->
DistanceUnit ->
Prelude.Natural ->
Prelude.Natural ->
CalculateRouteMatrixSummary
newCalculateRouteMatrixSummary :: Text
-> DistanceUnit
-> Natural
-> Natural
-> CalculateRouteMatrixSummary
newCalculateRouteMatrixSummary
Text
pDataSource_
DistanceUnit
pDistanceUnit_
Natural
pErrorCount_
Natural
pRouteCount_ =
CalculateRouteMatrixSummary'
{ $sel:dataSource:CalculateRouteMatrixSummary' :: Text
dataSource =
Text
pDataSource_,
$sel:distanceUnit:CalculateRouteMatrixSummary' :: DistanceUnit
distanceUnit = DistanceUnit
pDistanceUnit_,
$sel:errorCount:CalculateRouteMatrixSummary' :: Natural
errorCount = Natural
pErrorCount_,
$sel:routeCount:CalculateRouteMatrixSummary' :: Natural
routeCount = Natural
pRouteCount_
}
calculateRouteMatrixSummary_dataSource :: Lens.Lens' CalculateRouteMatrixSummary Prelude.Text
calculateRouteMatrixSummary_dataSource :: Lens' CalculateRouteMatrixSummary Text
calculateRouteMatrixSummary_dataSource = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CalculateRouteMatrixSummary' {Text
dataSource :: Text
$sel:dataSource:CalculateRouteMatrixSummary' :: CalculateRouteMatrixSummary -> Text
dataSource} -> Text
dataSource) (\s :: CalculateRouteMatrixSummary
s@CalculateRouteMatrixSummary' {} Text
a -> CalculateRouteMatrixSummary
s {$sel:dataSource:CalculateRouteMatrixSummary' :: Text
dataSource = Text
a} :: CalculateRouteMatrixSummary)
calculateRouteMatrixSummary_distanceUnit :: Lens.Lens' CalculateRouteMatrixSummary DistanceUnit
calculateRouteMatrixSummary_distanceUnit :: Lens' CalculateRouteMatrixSummary DistanceUnit
calculateRouteMatrixSummary_distanceUnit = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CalculateRouteMatrixSummary' {DistanceUnit
distanceUnit :: DistanceUnit
$sel:distanceUnit:CalculateRouteMatrixSummary' :: CalculateRouteMatrixSummary -> DistanceUnit
distanceUnit} -> DistanceUnit
distanceUnit) (\s :: CalculateRouteMatrixSummary
s@CalculateRouteMatrixSummary' {} DistanceUnit
a -> CalculateRouteMatrixSummary
s {$sel:distanceUnit:CalculateRouteMatrixSummary' :: DistanceUnit
distanceUnit = DistanceUnit
a} :: CalculateRouteMatrixSummary)
calculateRouteMatrixSummary_errorCount :: Lens.Lens' CalculateRouteMatrixSummary Prelude.Natural
calculateRouteMatrixSummary_errorCount :: Lens' CalculateRouteMatrixSummary Natural
calculateRouteMatrixSummary_errorCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CalculateRouteMatrixSummary' {Natural
errorCount :: Natural
$sel:errorCount:CalculateRouteMatrixSummary' :: CalculateRouteMatrixSummary -> Natural
errorCount} -> Natural
errorCount) (\s :: CalculateRouteMatrixSummary
s@CalculateRouteMatrixSummary' {} Natural
a -> CalculateRouteMatrixSummary
s {$sel:errorCount:CalculateRouteMatrixSummary' :: Natural
errorCount = Natural
a} :: CalculateRouteMatrixSummary)
calculateRouteMatrixSummary_routeCount :: Lens.Lens' CalculateRouteMatrixSummary Prelude.Natural
calculateRouteMatrixSummary_routeCount :: Lens' CalculateRouteMatrixSummary Natural
calculateRouteMatrixSummary_routeCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CalculateRouteMatrixSummary' {Natural
routeCount :: Natural
$sel:routeCount:CalculateRouteMatrixSummary' :: CalculateRouteMatrixSummary -> Natural
routeCount} -> Natural
routeCount) (\s :: CalculateRouteMatrixSummary
s@CalculateRouteMatrixSummary' {} Natural
a -> CalculateRouteMatrixSummary
s {$sel:routeCount:CalculateRouteMatrixSummary' :: Natural
routeCount = Natural
a} :: CalculateRouteMatrixSummary)
instance Data.FromJSON CalculateRouteMatrixSummary where
parseJSON :: Value -> Parser CalculateRouteMatrixSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"CalculateRouteMatrixSummary"
( \Object
x ->
Text
-> DistanceUnit
-> Natural
-> Natural
-> CalculateRouteMatrixSummary
CalculateRouteMatrixSummary'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"DataSource")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"DistanceUnit")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"ErrorCount")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"RouteCount")
)
instance Prelude.Hashable CalculateRouteMatrixSummary where
hashWithSalt :: Int -> CalculateRouteMatrixSummary -> Int
hashWithSalt Int
_salt CalculateRouteMatrixSummary' {Natural
Text
DistanceUnit
routeCount :: Natural
errorCount :: Natural
distanceUnit :: DistanceUnit
dataSource :: Text
$sel:routeCount:CalculateRouteMatrixSummary' :: CalculateRouteMatrixSummary -> Natural
$sel:errorCount:CalculateRouteMatrixSummary' :: CalculateRouteMatrixSummary -> Natural
$sel:distanceUnit:CalculateRouteMatrixSummary' :: CalculateRouteMatrixSummary -> DistanceUnit
$sel:dataSource:CalculateRouteMatrixSummary' :: CalculateRouteMatrixSummary -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
dataSource
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` DistanceUnit
distanceUnit
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Natural
errorCount
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Natural
routeCount
instance Prelude.NFData CalculateRouteMatrixSummary where
rnf :: CalculateRouteMatrixSummary -> ()
rnf CalculateRouteMatrixSummary' {Natural
Text
DistanceUnit
routeCount :: Natural
errorCount :: Natural
distanceUnit :: DistanceUnit
dataSource :: Text
$sel:routeCount:CalculateRouteMatrixSummary' :: CalculateRouteMatrixSummary -> Natural
$sel:errorCount:CalculateRouteMatrixSummary' :: CalculateRouteMatrixSummary -> Natural
$sel:distanceUnit:CalculateRouteMatrixSummary' :: CalculateRouteMatrixSummary -> DistanceUnit
$sel:dataSource:CalculateRouteMatrixSummary' :: CalculateRouteMatrixSummary -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
dataSource
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf DistanceUnit
distanceUnit
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Natural
errorCount
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Natural
routeCount