{-# 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.Panorama.Types.LatestDeviceJob where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Panorama.Types.JobType
import Amazonka.Panorama.Types.UpdateProgress
import qualified Amazonka.Prelude as Prelude
data LatestDeviceJob = LatestDeviceJob'
{
LatestDeviceJob -> Maybe Text
imageVersion :: Prelude.Maybe Prelude.Text,
LatestDeviceJob -> Maybe JobType
jobType :: Prelude.Maybe JobType,
LatestDeviceJob -> Maybe UpdateProgress
status :: Prelude.Maybe UpdateProgress
}
deriving (LatestDeviceJob -> LatestDeviceJob -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LatestDeviceJob -> LatestDeviceJob -> Bool
$c/= :: LatestDeviceJob -> LatestDeviceJob -> Bool
== :: LatestDeviceJob -> LatestDeviceJob -> Bool
$c== :: LatestDeviceJob -> LatestDeviceJob -> Bool
Prelude.Eq, ReadPrec [LatestDeviceJob]
ReadPrec LatestDeviceJob
Int -> ReadS LatestDeviceJob
ReadS [LatestDeviceJob]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LatestDeviceJob]
$creadListPrec :: ReadPrec [LatestDeviceJob]
readPrec :: ReadPrec LatestDeviceJob
$creadPrec :: ReadPrec LatestDeviceJob
readList :: ReadS [LatestDeviceJob]
$creadList :: ReadS [LatestDeviceJob]
readsPrec :: Int -> ReadS LatestDeviceJob
$creadsPrec :: Int -> ReadS LatestDeviceJob
Prelude.Read, Int -> LatestDeviceJob -> ShowS
[LatestDeviceJob] -> ShowS
LatestDeviceJob -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LatestDeviceJob] -> ShowS
$cshowList :: [LatestDeviceJob] -> ShowS
show :: LatestDeviceJob -> String
$cshow :: LatestDeviceJob -> String
showsPrec :: Int -> LatestDeviceJob -> ShowS
$cshowsPrec :: Int -> LatestDeviceJob -> ShowS
Prelude.Show, forall x. Rep LatestDeviceJob x -> LatestDeviceJob
forall x. LatestDeviceJob -> Rep LatestDeviceJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LatestDeviceJob x -> LatestDeviceJob
$cfrom :: forall x. LatestDeviceJob -> Rep LatestDeviceJob x
Prelude.Generic)
newLatestDeviceJob ::
LatestDeviceJob
newLatestDeviceJob :: LatestDeviceJob
newLatestDeviceJob =
LatestDeviceJob'
{ $sel:imageVersion:LatestDeviceJob' :: Maybe Text
imageVersion = forall a. Maybe a
Prelude.Nothing,
$sel:jobType:LatestDeviceJob' :: Maybe JobType
jobType = forall a. Maybe a
Prelude.Nothing,
$sel:status:LatestDeviceJob' :: Maybe UpdateProgress
status = forall a. Maybe a
Prelude.Nothing
}
latestDeviceJob_imageVersion :: Lens.Lens' LatestDeviceJob (Prelude.Maybe Prelude.Text)
latestDeviceJob_imageVersion :: Lens' LatestDeviceJob (Maybe Text)
latestDeviceJob_imageVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LatestDeviceJob' {Maybe Text
imageVersion :: Maybe Text
$sel:imageVersion:LatestDeviceJob' :: LatestDeviceJob -> Maybe Text
imageVersion} -> Maybe Text
imageVersion) (\s :: LatestDeviceJob
s@LatestDeviceJob' {} Maybe Text
a -> LatestDeviceJob
s {$sel:imageVersion:LatestDeviceJob' :: Maybe Text
imageVersion = Maybe Text
a} :: LatestDeviceJob)
latestDeviceJob_jobType :: Lens.Lens' LatestDeviceJob (Prelude.Maybe JobType)
latestDeviceJob_jobType :: Lens' LatestDeviceJob (Maybe JobType)
latestDeviceJob_jobType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LatestDeviceJob' {Maybe JobType
jobType :: Maybe JobType
$sel:jobType:LatestDeviceJob' :: LatestDeviceJob -> Maybe JobType
jobType} -> Maybe JobType
jobType) (\s :: LatestDeviceJob
s@LatestDeviceJob' {} Maybe JobType
a -> LatestDeviceJob
s {$sel:jobType:LatestDeviceJob' :: Maybe JobType
jobType = Maybe JobType
a} :: LatestDeviceJob)
latestDeviceJob_status :: Lens.Lens' LatestDeviceJob (Prelude.Maybe UpdateProgress)
latestDeviceJob_status :: Lens' LatestDeviceJob (Maybe UpdateProgress)
latestDeviceJob_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LatestDeviceJob' {Maybe UpdateProgress
status :: Maybe UpdateProgress
$sel:status:LatestDeviceJob' :: LatestDeviceJob -> Maybe UpdateProgress
status} -> Maybe UpdateProgress
status) (\s :: LatestDeviceJob
s@LatestDeviceJob' {} Maybe UpdateProgress
a -> LatestDeviceJob
s {$sel:status:LatestDeviceJob' :: Maybe UpdateProgress
status = Maybe UpdateProgress
a} :: LatestDeviceJob)
instance Data.FromJSON LatestDeviceJob where
parseJSON :: Value -> Parser LatestDeviceJob
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"LatestDeviceJob"
( \Object
x ->
Maybe Text
-> Maybe JobType -> Maybe UpdateProgress -> LatestDeviceJob
LatestDeviceJob'
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
"ImageVersion")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"JobType")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Status")
)
instance Prelude.Hashable LatestDeviceJob where
hashWithSalt :: Int -> LatestDeviceJob -> Int
hashWithSalt Int
_salt LatestDeviceJob' {Maybe Text
Maybe JobType
Maybe UpdateProgress
status :: Maybe UpdateProgress
jobType :: Maybe JobType
imageVersion :: Maybe Text
$sel:status:LatestDeviceJob' :: LatestDeviceJob -> Maybe UpdateProgress
$sel:jobType:LatestDeviceJob' :: LatestDeviceJob -> Maybe JobType
$sel:imageVersion:LatestDeviceJob' :: LatestDeviceJob -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
imageVersion
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe JobType
jobType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe UpdateProgress
status
instance Prelude.NFData LatestDeviceJob where
rnf :: LatestDeviceJob -> ()
rnf LatestDeviceJob' {Maybe Text
Maybe JobType
Maybe UpdateProgress
status :: Maybe UpdateProgress
jobType :: Maybe JobType
imageVersion :: Maybe Text
$sel:status:LatestDeviceJob' :: LatestDeviceJob -> Maybe UpdateProgress
$sel:jobType:LatestDeviceJob' :: LatestDeviceJob -> Maybe JobType
$sel:imageVersion:LatestDeviceJob' :: LatestDeviceJob -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
imageVersion
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe JobType
jobType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe UpdateProgress
status