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