{-# 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.IoTFleetWise.Types.VehicleSummary 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 VehicleSummary = VehicleSummary'
{
VehicleSummary -> Text
vehicleName :: Prelude.Text,
VehicleSummary -> Text
arn :: Prelude.Text,
VehicleSummary -> Text
modelManifestArn :: Prelude.Text,
VehicleSummary -> Text
decoderManifestArn :: Prelude.Text,
VehicleSummary -> POSIX
creationTime :: Data.POSIX,
VehicleSummary -> POSIX
lastModificationTime :: Data.POSIX
}
deriving (VehicleSummary -> VehicleSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VehicleSummary -> VehicleSummary -> Bool
$c/= :: VehicleSummary -> VehicleSummary -> Bool
== :: VehicleSummary -> VehicleSummary -> Bool
$c== :: VehicleSummary -> VehicleSummary -> Bool
Prelude.Eq, ReadPrec [VehicleSummary]
ReadPrec VehicleSummary
Int -> ReadS VehicleSummary
ReadS [VehicleSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VehicleSummary]
$creadListPrec :: ReadPrec [VehicleSummary]
readPrec :: ReadPrec VehicleSummary
$creadPrec :: ReadPrec VehicleSummary
readList :: ReadS [VehicleSummary]
$creadList :: ReadS [VehicleSummary]
readsPrec :: Int -> ReadS VehicleSummary
$creadsPrec :: Int -> ReadS VehicleSummary
Prelude.Read, Int -> VehicleSummary -> ShowS
[VehicleSummary] -> ShowS
VehicleSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VehicleSummary] -> ShowS
$cshowList :: [VehicleSummary] -> ShowS
show :: VehicleSummary -> String
$cshow :: VehicleSummary -> String
showsPrec :: Int -> VehicleSummary -> ShowS
$cshowsPrec :: Int -> VehicleSummary -> ShowS
Prelude.Show, forall x. Rep VehicleSummary x -> VehicleSummary
forall x. VehicleSummary -> Rep VehicleSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep VehicleSummary x -> VehicleSummary
$cfrom :: forall x. VehicleSummary -> Rep VehicleSummary x
Prelude.Generic)
newVehicleSummary ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.UTCTime ->
Prelude.UTCTime ->
VehicleSummary
newVehicleSummary :: Text
-> Text -> Text -> Text -> UTCTime -> UTCTime -> VehicleSummary
newVehicleSummary
Text
pVehicleName_
Text
pArn_
Text
pModelManifestArn_
Text
pDecoderManifestArn_
UTCTime
pCreationTime_
UTCTime
pLastModificationTime_ =
VehicleSummary'
{ $sel:vehicleName:VehicleSummary' :: Text
vehicleName = Text
pVehicleName_,
$sel:arn:VehicleSummary' :: Text
arn = Text
pArn_,
$sel:modelManifestArn:VehicleSummary' :: Text
modelManifestArn = Text
pModelManifestArn_,
$sel:decoderManifestArn:VehicleSummary' :: Text
decoderManifestArn = Text
pDecoderManifestArn_,
$sel:creationTime:VehicleSummary' :: POSIX
creationTime = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreationTime_,
$sel:lastModificationTime:VehicleSummary' :: POSIX
lastModificationTime =
forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pLastModificationTime_
}
vehicleSummary_vehicleName :: Lens.Lens' VehicleSummary Prelude.Text
vehicleSummary_vehicleName :: Lens' VehicleSummary Text
vehicleSummary_vehicleName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VehicleSummary' {Text
vehicleName :: Text
$sel:vehicleName:VehicleSummary' :: VehicleSummary -> Text
vehicleName} -> Text
vehicleName) (\s :: VehicleSummary
s@VehicleSummary' {} Text
a -> VehicleSummary
s {$sel:vehicleName:VehicleSummary' :: Text
vehicleName = Text
a} :: VehicleSummary)
vehicleSummary_arn :: Lens.Lens' VehicleSummary Prelude.Text
vehicleSummary_arn :: Lens' VehicleSummary Text
vehicleSummary_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VehicleSummary' {Text
arn :: Text
$sel:arn:VehicleSummary' :: VehicleSummary -> Text
arn} -> Text
arn) (\s :: VehicleSummary
s@VehicleSummary' {} Text
a -> VehicleSummary
s {$sel:arn:VehicleSummary' :: Text
arn = Text
a} :: VehicleSummary)
vehicleSummary_modelManifestArn :: Lens.Lens' VehicleSummary Prelude.Text
vehicleSummary_modelManifestArn :: Lens' VehicleSummary Text
vehicleSummary_modelManifestArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VehicleSummary' {Text
modelManifestArn :: Text
$sel:modelManifestArn:VehicleSummary' :: VehicleSummary -> Text
modelManifestArn} -> Text
modelManifestArn) (\s :: VehicleSummary
s@VehicleSummary' {} Text
a -> VehicleSummary
s {$sel:modelManifestArn:VehicleSummary' :: Text
modelManifestArn = Text
a} :: VehicleSummary)
vehicleSummary_decoderManifestArn :: Lens.Lens' VehicleSummary Prelude.Text
vehicleSummary_decoderManifestArn :: Lens' VehicleSummary Text
vehicleSummary_decoderManifestArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VehicleSummary' {Text
decoderManifestArn :: Text
$sel:decoderManifestArn:VehicleSummary' :: VehicleSummary -> Text
decoderManifestArn} -> Text
decoderManifestArn) (\s :: VehicleSummary
s@VehicleSummary' {} Text
a -> VehicleSummary
s {$sel:decoderManifestArn:VehicleSummary' :: Text
decoderManifestArn = Text
a} :: VehicleSummary)
vehicleSummary_creationTime :: Lens.Lens' VehicleSummary Prelude.UTCTime
vehicleSummary_creationTime :: Lens' VehicleSummary UTCTime
vehicleSummary_creationTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VehicleSummary' {POSIX
creationTime :: POSIX
$sel:creationTime:VehicleSummary' :: VehicleSummary -> POSIX
creationTime} -> POSIX
creationTime) (\s :: VehicleSummary
s@VehicleSummary' {} POSIX
a -> VehicleSummary
s {$sel:creationTime:VehicleSummary' :: POSIX
creationTime = POSIX
a} :: VehicleSummary) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
vehicleSummary_lastModificationTime :: Lens.Lens' VehicleSummary Prelude.UTCTime
vehicleSummary_lastModificationTime :: Lens' VehicleSummary UTCTime
vehicleSummary_lastModificationTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VehicleSummary' {POSIX
lastModificationTime :: POSIX
$sel:lastModificationTime:VehicleSummary' :: VehicleSummary -> POSIX
lastModificationTime} -> POSIX
lastModificationTime) (\s :: VehicleSummary
s@VehicleSummary' {} POSIX
a -> VehicleSummary
s {$sel:lastModificationTime:VehicleSummary' :: POSIX
lastModificationTime = POSIX
a} :: VehicleSummary) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
instance Data.FromJSON VehicleSummary where
parseJSON :: Value -> Parser VehicleSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"VehicleSummary"
( \Object
x ->
Text -> Text -> Text -> Text -> POSIX -> POSIX -> VehicleSummary
VehicleSummary'
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
"vehicleName")
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
"arn")
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
"modelManifestArn")
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
"decoderManifestArn")
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
"creationTime")
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
"lastModificationTime")
)
instance Prelude.Hashable VehicleSummary where
hashWithSalt :: Int -> VehicleSummary -> Int
hashWithSalt Int
_salt VehicleSummary' {Text
POSIX
lastModificationTime :: POSIX
creationTime :: POSIX
decoderManifestArn :: Text
modelManifestArn :: Text
arn :: Text
vehicleName :: Text
$sel:lastModificationTime:VehicleSummary' :: VehicleSummary -> POSIX
$sel:creationTime:VehicleSummary' :: VehicleSummary -> POSIX
$sel:decoderManifestArn:VehicleSummary' :: VehicleSummary -> Text
$sel:modelManifestArn:VehicleSummary' :: VehicleSummary -> Text
$sel:arn:VehicleSummary' :: VehicleSummary -> Text
$sel:vehicleName:VehicleSummary' :: VehicleSummary -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
vehicleName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
arn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
modelManifestArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
decoderManifestArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
creationTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
lastModificationTime
instance Prelude.NFData VehicleSummary where
rnf :: VehicleSummary -> ()
rnf VehicleSummary' {Text
POSIX
lastModificationTime :: POSIX
creationTime :: POSIX
decoderManifestArn :: Text
modelManifestArn :: Text
arn :: Text
vehicleName :: Text
$sel:lastModificationTime:VehicleSummary' :: VehicleSummary -> POSIX
$sel:creationTime:VehicleSummary' :: VehicleSummary -> POSIX
$sel:decoderManifestArn:VehicleSummary' :: VehicleSummary -> Text
$sel:modelManifestArn:VehicleSummary' :: VehicleSummary -> Text
$sel:arn:VehicleSummary' :: VehicleSummary -> Text
$sel:vehicleName:VehicleSummary' :: VehicleSummary -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
vehicleName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
arn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
modelManifestArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
decoderManifestArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
creationTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
lastModificationTime