{-# 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.SnowDeviceManagement.Types.SoftwareInformation where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data SoftwareInformation = SoftwareInformation'
{
SoftwareInformation -> Maybe Text
installedVersion :: Prelude.Maybe Prelude.Text,
SoftwareInformation -> Maybe Text
installState :: Prelude.Maybe Prelude.Text,
SoftwareInformation -> Maybe Text
installingVersion :: Prelude.Maybe Prelude.Text
}
deriving (SoftwareInformation -> SoftwareInformation -> Bool
(SoftwareInformation -> SoftwareInformation -> Bool)
-> (SoftwareInformation -> SoftwareInformation -> Bool)
-> Eq SoftwareInformation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SoftwareInformation -> SoftwareInformation -> Bool
$c/= :: SoftwareInformation -> SoftwareInformation -> Bool
== :: SoftwareInformation -> SoftwareInformation -> Bool
$c== :: SoftwareInformation -> SoftwareInformation -> Bool
Prelude.Eq, ReadPrec [SoftwareInformation]
ReadPrec SoftwareInformation
Int -> ReadS SoftwareInformation
ReadS [SoftwareInformation]
(Int -> ReadS SoftwareInformation)
-> ReadS [SoftwareInformation]
-> ReadPrec SoftwareInformation
-> ReadPrec [SoftwareInformation]
-> Read SoftwareInformation
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SoftwareInformation]
$creadListPrec :: ReadPrec [SoftwareInformation]
readPrec :: ReadPrec SoftwareInformation
$creadPrec :: ReadPrec SoftwareInformation
readList :: ReadS [SoftwareInformation]
$creadList :: ReadS [SoftwareInformation]
readsPrec :: Int -> ReadS SoftwareInformation
$creadsPrec :: Int -> ReadS SoftwareInformation
Prelude.Read, Int -> SoftwareInformation -> ShowS
[SoftwareInformation] -> ShowS
SoftwareInformation -> String
(Int -> SoftwareInformation -> ShowS)
-> (SoftwareInformation -> String)
-> ([SoftwareInformation] -> ShowS)
-> Show SoftwareInformation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SoftwareInformation] -> ShowS
$cshowList :: [SoftwareInformation] -> ShowS
show :: SoftwareInformation -> String
$cshow :: SoftwareInformation -> String
showsPrec :: Int -> SoftwareInformation -> ShowS
$cshowsPrec :: Int -> SoftwareInformation -> ShowS
Prelude.Show, (forall x. SoftwareInformation -> Rep SoftwareInformation x)
-> (forall x. Rep SoftwareInformation x -> SoftwareInformation)
-> Generic SoftwareInformation
forall x. Rep SoftwareInformation x -> SoftwareInformation
forall x. SoftwareInformation -> Rep SoftwareInformation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SoftwareInformation x -> SoftwareInformation
$cfrom :: forall x. SoftwareInformation -> Rep SoftwareInformation x
Prelude.Generic)
newSoftwareInformation ::
SoftwareInformation
newSoftwareInformation :: SoftwareInformation
newSoftwareInformation =
SoftwareInformation' :: Maybe Text -> Maybe Text -> Maybe Text -> SoftwareInformation
SoftwareInformation'
{ $sel:installedVersion:SoftwareInformation' :: Maybe Text
installedVersion =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:installState:SoftwareInformation' :: Maybe Text
installState = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:installingVersion:SoftwareInformation' :: Maybe Text
installingVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
softwareInformation_installedVersion :: Lens.Lens' SoftwareInformation (Prelude.Maybe Prelude.Text)
softwareInformation_installedVersion :: (Maybe Text -> f (Maybe Text))
-> SoftwareInformation -> f SoftwareInformation
softwareInformation_installedVersion = (SoftwareInformation -> Maybe Text)
-> (SoftwareInformation -> Maybe Text -> SoftwareInformation)
-> Lens
SoftwareInformation SoftwareInformation (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SoftwareInformation' {Maybe Text
installedVersion :: Maybe Text
$sel:installedVersion:SoftwareInformation' :: SoftwareInformation -> Maybe Text
installedVersion} -> Maybe Text
installedVersion) (\s :: SoftwareInformation
s@SoftwareInformation' {} Maybe Text
a -> SoftwareInformation
s {$sel:installedVersion:SoftwareInformation' :: Maybe Text
installedVersion = Maybe Text
a} :: SoftwareInformation)
softwareInformation_installState :: Lens.Lens' SoftwareInformation (Prelude.Maybe Prelude.Text)
softwareInformation_installState :: (Maybe Text -> f (Maybe Text))
-> SoftwareInformation -> f SoftwareInformation
softwareInformation_installState = (SoftwareInformation -> Maybe Text)
-> (SoftwareInformation -> Maybe Text -> SoftwareInformation)
-> Lens
SoftwareInformation SoftwareInformation (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SoftwareInformation' {Maybe Text
installState :: Maybe Text
$sel:installState:SoftwareInformation' :: SoftwareInformation -> Maybe Text
installState} -> Maybe Text
installState) (\s :: SoftwareInformation
s@SoftwareInformation' {} Maybe Text
a -> SoftwareInformation
s {$sel:installState:SoftwareInformation' :: Maybe Text
installState = Maybe Text
a} :: SoftwareInformation)
softwareInformation_installingVersion :: Lens.Lens' SoftwareInformation (Prelude.Maybe Prelude.Text)
softwareInformation_installingVersion :: (Maybe Text -> f (Maybe Text))
-> SoftwareInformation -> f SoftwareInformation
softwareInformation_installingVersion = (SoftwareInformation -> Maybe Text)
-> (SoftwareInformation -> Maybe Text -> SoftwareInformation)
-> Lens
SoftwareInformation SoftwareInformation (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SoftwareInformation' {Maybe Text
installingVersion :: Maybe Text
$sel:installingVersion:SoftwareInformation' :: SoftwareInformation -> Maybe Text
installingVersion} -> Maybe Text
installingVersion) (\s :: SoftwareInformation
s@SoftwareInformation' {} Maybe Text
a -> SoftwareInformation
s {$sel:installingVersion:SoftwareInformation' :: Maybe Text
installingVersion = Maybe Text
a} :: SoftwareInformation)
instance Core.FromJSON SoftwareInformation where
parseJSON :: Value -> Parser SoftwareInformation
parseJSON =
String
-> (Object -> Parser SoftwareInformation)
-> Value
-> Parser SoftwareInformation
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"SoftwareInformation"
( \Object
x ->
Maybe Text -> Maybe Text -> Maybe Text -> SoftwareInformation
SoftwareInformation'
(Maybe Text -> Maybe Text -> Maybe Text -> SoftwareInformation)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> SoftwareInformation)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"installedVersion")
Parser (Maybe Text -> Maybe Text -> SoftwareInformation)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> SoftwareInformation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"installState")
Parser (Maybe Text -> SoftwareInformation)
-> Parser (Maybe Text) -> Parser SoftwareInformation
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"installingVersion")
)
instance Prelude.Hashable SoftwareInformation
instance Prelude.NFData SoftwareInformation