{-# 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.GreengrassV2.Types.InstalledComponent where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.GreengrassV2.Types.InstalledComponentLifecycleState
import qualified Amazonka.Prelude as Prelude
data InstalledComponent = InstalledComponent'
{
InstalledComponent -> Maybe Text
componentName :: Prelude.Maybe Prelude.Text,
InstalledComponent -> Maybe Text
componentVersion :: Prelude.Maybe Prelude.Text,
InstalledComponent -> Maybe Bool
isRoot :: Prelude.Maybe Prelude.Bool,
InstalledComponent -> Maybe Text
lastInstallationSource :: Prelude.Maybe Prelude.Text,
InstalledComponent -> Maybe POSIX
lastReportedTimestamp :: Prelude.Maybe Data.POSIX,
InstalledComponent -> Maybe POSIX
lastStatusChangeTimestamp :: Prelude.Maybe Data.POSIX,
InstalledComponent -> Maybe InstalledComponentLifecycleState
lifecycleState :: Prelude.Maybe InstalledComponentLifecycleState,
InstalledComponent -> Maybe Text
lifecycleStateDetails :: Prelude.Maybe Prelude.Text,
InstalledComponent -> Maybe [Text]
lifecycleStatusCodes :: Prelude.Maybe [Prelude.Text]
}
deriving (InstalledComponent -> InstalledComponent -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InstalledComponent -> InstalledComponent -> Bool
$c/= :: InstalledComponent -> InstalledComponent -> Bool
== :: InstalledComponent -> InstalledComponent -> Bool
$c== :: InstalledComponent -> InstalledComponent -> Bool
Prelude.Eq, ReadPrec [InstalledComponent]
ReadPrec InstalledComponent
Int -> ReadS InstalledComponent
ReadS [InstalledComponent]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [InstalledComponent]
$creadListPrec :: ReadPrec [InstalledComponent]
readPrec :: ReadPrec InstalledComponent
$creadPrec :: ReadPrec InstalledComponent
readList :: ReadS [InstalledComponent]
$creadList :: ReadS [InstalledComponent]
readsPrec :: Int -> ReadS InstalledComponent
$creadsPrec :: Int -> ReadS InstalledComponent
Prelude.Read, Int -> InstalledComponent -> ShowS
[InstalledComponent] -> ShowS
InstalledComponent -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InstalledComponent] -> ShowS
$cshowList :: [InstalledComponent] -> ShowS
show :: InstalledComponent -> String
$cshow :: InstalledComponent -> String
showsPrec :: Int -> InstalledComponent -> ShowS
$cshowsPrec :: Int -> InstalledComponent -> ShowS
Prelude.Show, forall x. Rep InstalledComponent x -> InstalledComponent
forall x. InstalledComponent -> Rep InstalledComponent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep InstalledComponent x -> InstalledComponent
$cfrom :: forall x. InstalledComponent -> Rep InstalledComponent x
Prelude.Generic)
newInstalledComponent ::
InstalledComponent
newInstalledComponent :: InstalledComponent
newInstalledComponent =
InstalledComponent'
{ $sel:componentName:InstalledComponent' :: Maybe Text
componentName =
forall a. Maybe a
Prelude.Nothing,
$sel:componentVersion:InstalledComponent' :: Maybe Text
componentVersion = forall a. Maybe a
Prelude.Nothing,
$sel:isRoot:InstalledComponent' :: Maybe Bool
isRoot = forall a. Maybe a
Prelude.Nothing,
$sel:lastInstallationSource:InstalledComponent' :: Maybe Text
lastInstallationSource = forall a. Maybe a
Prelude.Nothing,
$sel:lastReportedTimestamp:InstalledComponent' :: Maybe POSIX
lastReportedTimestamp = forall a. Maybe a
Prelude.Nothing,
$sel:lastStatusChangeTimestamp:InstalledComponent' :: Maybe POSIX
lastStatusChangeTimestamp = forall a. Maybe a
Prelude.Nothing,
$sel:lifecycleState:InstalledComponent' :: Maybe InstalledComponentLifecycleState
lifecycleState = forall a. Maybe a
Prelude.Nothing,
$sel:lifecycleStateDetails:InstalledComponent' :: Maybe Text
lifecycleStateDetails = forall a. Maybe a
Prelude.Nothing,
$sel:lifecycleStatusCodes:InstalledComponent' :: Maybe [Text]
lifecycleStatusCodes = forall a. Maybe a
Prelude.Nothing
}
installedComponent_componentName :: Lens.Lens' InstalledComponent (Prelude.Maybe Prelude.Text)
installedComponent_componentName :: Lens' InstalledComponent (Maybe Text)
installedComponent_componentName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstalledComponent' {Maybe Text
componentName :: Maybe Text
$sel:componentName:InstalledComponent' :: InstalledComponent -> Maybe Text
componentName} -> Maybe Text
componentName) (\s :: InstalledComponent
s@InstalledComponent' {} Maybe Text
a -> InstalledComponent
s {$sel:componentName:InstalledComponent' :: Maybe Text
componentName = Maybe Text
a} :: InstalledComponent)
installedComponent_componentVersion :: Lens.Lens' InstalledComponent (Prelude.Maybe Prelude.Text)
installedComponent_componentVersion :: Lens' InstalledComponent (Maybe Text)
installedComponent_componentVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstalledComponent' {Maybe Text
componentVersion :: Maybe Text
$sel:componentVersion:InstalledComponent' :: InstalledComponent -> Maybe Text
componentVersion} -> Maybe Text
componentVersion) (\s :: InstalledComponent
s@InstalledComponent' {} Maybe Text
a -> InstalledComponent
s {$sel:componentVersion:InstalledComponent' :: Maybe Text
componentVersion = Maybe Text
a} :: InstalledComponent)
installedComponent_isRoot :: Lens.Lens' InstalledComponent (Prelude.Maybe Prelude.Bool)
installedComponent_isRoot :: Lens' InstalledComponent (Maybe Bool)
installedComponent_isRoot = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstalledComponent' {Maybe Bool
isRoot :: Maybe Bool
$sel:isRoot:InstalledComponent' :: InstalledComponent -> Maybe Bool
isRoot} -> Maybe Bool
isRoot) (\s :: InstalledComponent
s@InstalledComponent' {} Maybe Bool
a -> InstalledComponent
s {$sel:isRoot:InstalledComponent' :: Maybe Bool
isRoot = Maybe Bool
a} :: InstalledComponent)
installedComponent_lastInstallationSource :: Lens.Lens' InstalledComponent (Prelude.Maybe Prelude.Text)
installedComponent_lastInstallationSource :: Lens' InstalledComponent (Maybe Text)
installedComponent_lastInstallationSource = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstalledComponent' {Maybe Text
lastInstallationSource :: Maybe Text
$sel:lastInstallationSource:InstalledComponent' :: InstalledComponent -> Maybe Text
lastInstallationSource} -> Maybe Text
lastInstallationSource) (\s :: InstalledComponent
s@InstalledComponent' {} Maybe Text
a -> InstalledComponent
s {$sel:lastInstallationSource:InstalledComponent' :: Maybe Text
lastInstallationSource = Maybe Text
a} :: InstalledComponent)
installedComponent_lastReportedTimestamp :: Lens.Lens' InstalledComponent (Prelude.Maybe Prelude.UTCTime)
installedComponent_lastReportedTimestamp :: Lens' InstalledComponent (Maybe UTCTime)
installedComponent_lastReportedTimestamp = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstalledComponent' {Maybe POSIX
lastReportedTimestamp :: Maybe POSIX
$sel:lastReportedTimestamp:InstalledComponent' :: InstalledComponent -> Maybe POSIX
lastReportedTimestamp} -> Maybe POSIX
lastReportedTimestamp) (\s :: InstalledComponent
s@InstalledComponent' {} Maybe POSIX
a -> InstalledComponent
s {$sel:lastReportedTimestamp:InstalledComponent' :: Maybe POSIX
lastReportedTimestamp = Maybe POSIX
a} :: InstalledComponent) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time
installedComponent_lastStatusChangeTimestamp :: Lens.Lens' InstalledComponent (Prelude.Maybe Prelude.UTCTime)
installedComponent_lastStatusChangeTimestamp :: Lens' InstalledComponent (Maybe UTCTime)
installedComponent_lastStatusChangeTimestamp = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstalledComponent' {Maybe POSIX
lastStatusChangeTimestamp :: Maybe POSIX
$sel:lastStatusChangeTimestamp:InstalledComponent' :: InstalledComponent -> Maybe POSIX
lastStatusChangeTimestamp} -> Maybe POSIX
lastStatusChangeTimestamp) (\s :: InstalledComponent
s@InstalledComponent' {} Maybe POSIX
a -> InstalledComponent
s {$sel:lastStatusChangeTimestamp:InstalledComponent' :: Maybe POSIX
lastStatusChangeTimestamp = Maybe POSIX
a} :: InstalledComponent) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time
installedComponent_lifecycleState :: Lens.Lens' InstalledComponent (Prelude.Maybe InstalledComponentLifecycleState)
installedComponent_lifecycleState :: Lens' InstalledComponent (Maybe InstalledComponentLifecycleState)
installedComponent_lifecycleState = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstalledComponent' {Maybe InstalledComponentLifecycleState
lifecycleState :: Maybe InstalledComponentLifecycleState
$sel:lifecycleState:InstalledComponent' :: InstalledComponent -> Maybe InstalledComponentLifecycleState
lifecycleState} -> Maybe InstalledComponentLifecycleState
lifecycleState) (\s :: InstalledComponent
s@InstalledComponent' {} Maybe InstalledComponentLifecycleState
a -> InstalledComponent
s {$sel:lifecycleState:InstalledComponent' :: Maybe InstalledComponentLifecycleState
lifecycleState = Maybe InstalledComponentLifecycleState
a} :: InstalledComponent)
installedComponent_lifecycleStateDetails :: Lens.Lens' InstalledComponent (Prelude.Maybe Prelude.Text)
installedComponent_lifecycleStateDetails :: Lens' InstalledComponent (Maybe Text)
installedComponent_lifecycleStateDetails = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstalledComponent' {Maybe Text
lifecycleStateDetails :: Maybe Text
$sel:lifecycleStateDetails:InstalledComponent' :: InstalledComponent -> Maybe Text
lifecycleStateDetails} -> Maybe Text
lifecycleStateDetails) (\s :: InstalledComponent
s@InstalledComponent' {} Maybe Text
a -> InstalledComponent
s {$sel:lifecycleStateDetails:InstalledComponent' :: Maybe Text
lifecycleStateDetails = Maybe Text
a} :: InstalledComponent)
installedComponent_lifecycleStatusCodes :: Lens.Lens' InstalledComponent (Prelude.Maybe [Prelude.Text])
installedComponent_lifecycleStatusCodes :: Lens' InstalledComponent (Maybe [Text])
installedComponent_lifecycleStatusCodes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstalledComponent' {Maybe [Text]
lifecycleStatusCodes :: Maybe [Text]
$sel:lifecycleStatusCodes:InstalledComponent' :: InstalledComponent -> Maybe [Text]
lifecycleStatusCodes} -> Maybe [Text]
lifecycleStatusCodes) (\s :: InstalledComponent
s@InstalledComponent' {} Maybe [Text]
a -> InstalledComponent
s {$sel:lifecycleStatusCodes:InstalledComponent' :: Maybe [Text]
lifecycleStatusCodes = Maybe [Text]
a} :: InstalledComponent) 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 InstalledComponent where
parseJSON :: Value -> Parser InstalledComponent
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"InstalledComponent"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe InstalledComponentLifecycleState
-> Maybe Text
-> Maybe [Text]
-> InstalledComponent
InstalledComponent'
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
"componentName")
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
"componentVersion")
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
"isRoot")
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
"lastInstallationSource")
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
"lastReportedTimestamp")
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
"lastStatusChangeTimestamp")
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
"lifecycleState")
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
"lifecycleStateDetails")
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
"lifecycleStatusCodes"
forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
)
)
instance Prelude.Hashable InstalledComponent where
hashWithSalt :: Int -> InstalledComponent -> Int
hashWithSalt Int
_salt InstalledComponent' {Maybe Bool
Maybe [Text]
Maybe Text
Maybe POSIX
Maybe InstalledComponentLifecycleState
lifecycleStatusCodes :: Maybe [Text]
lifecycleStateDetails :: Maybe Text
lifecycleState :: Maybe InstalledComponentLifecycleState
lastStatusChangeTimestamp :: Maybe POSIX
lastReportedTimestamp :: Maybe POSIX
lastInstallationSource :: Maybe Text
isRoot :: Maybe Bool
componentVersion :: Maybe Text
componentName :: Maybe Text
$sel:lifecycleStatusCodes:InstalledComponent' :: InstalledComponent -> Maybe [Text]
$sel:lifecycleStateDetails:InstalledComponent' :: InstalledComponent -> Maybe Text
$sel:lifecycleState:InstalledComponent' :: InstalledComponent -> Maybe InstalledComponentLifecycleState
$sel:lastStatusChangeTimestamp:InstalledComponent' :: InstalledComponent -> Maybe POSIX
$sel:lastReportedTimestamp:InstalledComponent' :: InstalledComponent -> Maybe POSIX
$sel:lastInstallationSource:InstalledComponent' :: InstalledComponent -> Maybe Text
$sel:isRoot:InstalledComponent' :: InstalledComponent -> Maybe Bool
$sel:componentVersion:InstalledComponent' :: InstalledComponent -> Maybe Text
$sel:componentName:InstalledComponent' :: InstalledComponent -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
componentName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
componentVersion
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
isRoot
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
lastInstallationSource
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
lastReportedTimestamp
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
lastStatusChangeTimestamp
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe InstalledComponentLifecycleState
lifecycleState
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
lifecycleStateDetails
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
lifecycleStatusCodes
instance Prelude.NFData InstalledComponent where
rnf :: InstalledComponent -> ()
rnf InstalledComponent' {Maybe Bool
Maybe [Text]
Maybe Text
Maybe POSIX
Maybe InstalledComponentLifecycleState
lifecycleStatusCodes :: Maybe [Text]
lifecycleStateDetails :: Maybe Text
lifecycleState :: Maybe InstalledComponentLifecycleState
lastStatusChangeTimestamp :: Maybe POSIX
lastReportedTimestamp :: Maybe POSIX
lastInstallationSource :: Maybe Text
isRoot :: Maybe Bool
componentVersion :: Maybe Text
componentName :: Maybe Text
$sel:lifecycleStatusCodes:InstalledComponent' :: InstalledComponent -> Maybe [Text]
$sel:lifecycleStateDetails:InstalledComponent' :: InstalledComponent -> Maybe Text
$sel:lifecycleState:InstalledComponent' :: InstalledComponent -> Maybe InstalledComponentLifecycleState
$sel:lastStatusChangeTimestamp:InstalledComponent' :: InstalledComponent -> Maybe POSIX
$sel:lastReportedTimestamp:InstalledComponent' :: InstalledComponent -> Maybe POSIX
$sel:lastInstallationSource:InstalledComponent' :: InstalledComponent -> Maybe Text
$sel:isRoot:InstalledComponent' :: InstalledComponent -> Maybe Bool
$sel:componentVersion:InstalledComponent' :: InstalledComponent -> Maybe Text
$sel:componentName:InstalledComponent' :: InstalledComponent -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
componentName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
componentVersion
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
isRoot
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
lastInstallationSource
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastReportedTimestamp
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastStatusChangeTimestamp
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe InstalledComponentLifecycleState
lifecycleState
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
lifecycleStateDetails
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
lifecycleStatusCodes