{-# 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.RelatedWorkspaceProperties where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import Amazonka.WorkSpaces.Types.StandbyWorkspaceRelationshipType
import Amazonka.WorkSpaces.Types.WorkspaceState
data RelatedWorkspaceProperties = RelatedWorkspaceProperties'
{
RelatedWorkspaceProperties -> Maybe Text
region :: Prelude.Maybe Prelude.Text,
RelatedWorkspaceProperties -> Maybe WorkspaceState
state :: Prelude.Maybe WorkspaceState,
RelatedWorkspaceProperties
-> Maybe StandbyWorkspaceRelationshipType
type' :: Prelude.Maybe StandbyWorkspaceRelationshipType,
RelatedWorkspaceProperties -> Maybe Text
workspaceId :: Prelude.Maybe Prelude.Text
}
deriving (RelatedWorkspaceProperties -> RelatedWorkspaceProperties -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RelatedWorkspaceProperties -> RelatedWorkspaceProperties -> Bool
$c/= :: RelatedWorkspaceProperties -> RelatedWorkspaceProperties -> Bool
== :: RelatedWorkspaceProperties -> RelatedWorkspaceProperties -> Bool
$c== :: RelatedWorkspaceProperties -> RelatedWorkspaceProperties -> Bool
Prelude.Eq, ReadPrec [RelatedWorkspaceProperties]
ReadPrec RelatedWorkspaceProperties
Int -> ReadS RelatedWorkspaceProperties
ReadS [RelatedWorkspaceProperties]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RelatedWorkspaceProperties]
$creadListPrec :: ReadPrec [RelatedWorkspaceProperties]
readPrec :: ReadPrec RelatedWorkspaceProperties
$creadPrec :: ReadPrec RelatedWorkspaceProperties
readList :: ReadS [RelatedWorkspaceProperties]
$creadList :: ReadS [RelatedWorkspaceProperties]
readsPrec :: Int -> ReadS RelatedWorkspaceProperties
$creadsPrec :: Int -> ReadS RelatedWorkspaceProperties
Prelude.Read, Int -> RelatedWorkspaceProperties -> ShowS
[RelatedWorkspaceProperties] -> ShowS
RelatedWorkspaceProperties -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RelatedWorkspaceProperties] -> ShowS
$cshowList :: [RelatedWorkspaceProperties] -> ShowS
show :: RelatedWorkspaceProperties -> String
$cshow :: RelatedWorkspaceProperties -> String
showsPrec :: Int -> RelatedWorkspaceProperties -> ShowS
$cshowsPrec :: Int -> RelatedWorkspaceProperties -> ShowS
Prelude.Show, forall x.
Rep RelatedWorkspaceProperties x -> RelatedWorkspaceProperties
forall x.
RelatedWorkspaceProperties -> Rep RelatedWorkspaceProperties x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RelatedWorkspaceProperties x -> RelatedWorkspaceProperties
$cfrom :: forall x.
RelatedWorkspaceProperties -> Rep RelatedWorkspaceProperties x
Prelude.Generic)
newRelatedWorkspaceProperties ::
RelatedWorkspaceProperties
newRelatedWorkspaceProperties :: RelatedWorkspaceProperties
newRelatedWorkspaceProperties =
RelatedWorkspaceProperties'
{ $sel:region:RelatedWorkspaceProperties' :: Maybe Text
region =
forall a. Maybe a
Prelude.Nothing,
$sel:state:RelatedWorkspaceProperties' :: Maybe WorkspaceState
state = forall a. Maybe a
Prelude.Nothing,
$sel:type':RelatedWorkspaceProperties' :: Maybe StandbyWorkspaceRelationshipType
type' = forall a. Maybe a
Prelude.Nothing,
$sel:workspaceId:RelatedWorkspaceProperties' :: Maybe Text
workspaceId = forall a. Maybe a
Prelude.Nothing
}
relatedWorkspaceProperties_region :: Lens.Lens' RelatedWorkspaceProperties (Prelude.Maybe Prelude.Text)
relatedWorkspaceProperties_region :: Lens' RelatedWorkspaceProperties (Maybe Text)
relatedWorkspaceProperties_region = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RelatedWorkspaceProperties' {Maybe Text
region :: Maybe Text
$sel:region:RelatedWorkspaceProperties' :: RelatedWorkspaceProperties -> Maybe Text
region} -> Maybe Text
region) (\s :: RelatedWorkspaceProperties
s@RelatedWorkspaceProperties' {} Maybe Text
a -> RelatedWorkspaceProperties
s {$sel:region:RelatedWorkspaceProperties' :: Maybe Text
region = Maybe Text
a} :: RelatedWorkspaceProperties)
relatedWorkspaceProperties_state :: Lens.Lens' RelatedWorkspaceProperties (Prelude.Maybe WorkspaceState)
relatedWorkspaceProperties_state :: Lens' RelatedWorkspaceProperties (Maybe WorkspaceState)
relatedWorkspaceProperties_state = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RelatedWorkspaceProperties' {Maybe WorkspaceState
state :: Maybe WorkspaceState
$sel:state:RelatedWorkspaceProperties' :: RelatedWorkspaceProperties -> Maybe WorkspaceState
state} -> Maybe WorkspaceState
state) (\s :: RelatedWorkspaceProperties
s@RelatedWorkspaceProperties' {} Maybe WorkspaceState
a -> RelatedWorkspaceProperties
s {$sel:state:RelatedWorkspaceProperties' :: Maybe WorkspaceState
state = Maybe WorkspaceState
a} :: RelatedWorkspaceProperties)
relatedWorkspaceProperties_type :: Lens.Lens' RelatedWorkspaceProperties (Prelude.Maybe StandbyWorkspaceRelationshipType)
relatedWorkspaceProperties_type :: Lens'
RelatedWorkspaceProperties (Maybe StandbyWorkspaceRelationshipType)
relatedWorkspaceProperties_type = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RelatedWorkspaceProperties' {Maybe StandbyWorkspaceRelationshipType
type' :: Maybe StandbyWorkspaceRelationshipType
$sel:type':RelatedWorkspaceProperties' :: RelatedWorkspaceProperties
-> Maybe StandbyWorkspaceRelationshipType
type'} -> Maybe StandbyWorkspaceRelationshipType
type') (\s :: RelatedWorkspaceProperties
s@RelatedWorkspaceProperties' {} Maybe StandbyWorkspaceRelationshipType
a -> RelatedWorkspaceProperties
s {$sel:type':RelatedWorkspaceProperties' :: Maybe StandbyWorkspaceRelationshipType
type' = Maybe StandbyWorkspaceRelationshipType
a} :: RelatedWorkspaceProperties)
relatedWorkspaceProperties_workspaceId :: Lens.Lens' RelatedWorkspaceProperties (Prelude.Maybe Prelude.Text)
relatedWorkspaceProperties_workspaceId :: Lens' RelatedWorkspaceProperties (Maybe Text)
relatedWorkspaceProperties_workspaceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RelatedWorkspaceProperties' {Maybe Text
workspaceId :: Maybe Text
$sel:workspaceId:RelatedWorkspaceProperties' :: RelatedWorkspaceProperties -> Maybe Text
workspaceId} -> Maybe Text
workspaceId) (\s :: RelatedWorkspaceProperties
s@RelatedWorkspaceProperties' {} Maybe Text
a -> RelatedWorkspaceProperties
s {$sel:workspaceId:RelatedWorkspaceProperties' :: Maybe Text
workspaceId = Maybe Text
a} :: RelatedWorkspaceProperties)
instance Data.FromJSON RelatedWorkspaceProperties where
parseJSON :: Value -> Parser RelatedWorkspaceProperties
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"RelatedWorkspaceProperties"
( \Object
x ->
Maybe Text
-> Maybe WorkspaceState
-> Maybe StandbyWorkspaceRelationshipType
-> Maybe Text
-> RelatedWorkspaceProperties
RelatedWorkspaceProperties'
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
"Region")
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
"State")
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
"Type")
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
"WorkspaceId")
)
instance Prelude.Hashable RelatedWorkspaceProperties where
hashWithSalt :: Int -> RelatedWorkspaceProperties -> Int
hashWithSalt Int
_salt RelatedWorkspaceProperties' {Maybe Text
Maybe StandbyWorkspaceRelationshipType
Maybe WorkspaceState
workspaceId :: Maybe Text
type' :: Maybe StandbyWorkspaceRelationshipType
state :: Maybe WorkspaceState
region :: Maybe Text
$sel:workspaceId:RelatedWorkspaceProperties' :: RelatedWorkspaceProperties -> Maybe Text
$sel:type':RelatedWorkspaceProperties' :: RelatedWorkspaceProperties
-> Maybe StandbyWorkspaceRelationshipType
$sel:state:RelatedWorkspaceProperties' :: RelatedWorkspaceProperties -> Maybe WorkspaceState
$sel:region:RelatedWorkspaceProperties' :: RelatedWorkspaceProperties -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
region
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe WorkspaceState
state
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe StandbyWorkspaceRelationshipType
type'
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
workspaceId
instance Prelude.NFData RelatedWorkspaceProperties where
rnf :: RelatedWorkspaceProperties -> ()
rnf RelatedWorkspaceProperties' {Maybe Text
Maybe StandbyWorkspaceRelationshipType
Maybe WorkspaceState
workspaceId :: Maybe Text
type' :: Maybe StandbyWorkspaceRelationshipType
state :: Maybe WorkspaceState
region :: Maybe Text
$sel:workspaceId:RelatedWorkspaceProperties' :: RelatedWorkspaceProperties -> Maybe Text
$sel:type':RelatedWorkspaceProperties' :: RelatedWorkspaceProperties
-> Maybe StandbyWorkspaceRelationshipType
$sel:state:RelatedWorkspaceProperties' :: RelatedWorkspaceProperties -> Maybe WorkspaceState
$sel:region:RelatedWorkspaceProperties' :: RelatedWorkspaceProperties -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
region
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe WorkspaceState
state
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe StandbyWorkspaceRelationshipType
type'
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
workspaceId