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