{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.WorkSpaces.Types.PendingCreateStandbyWorkspacesRequest
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.WorkSpaces.Types.PendingCreateStandbyWorkspacesRequest 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.WorkspaceState

-- | Information about the Standby WorkSpace.
--
-- /See:/ 'newPendingCreateStandbyWorkspacesRequest' smart constructor.
data PendingCreateStandbyWorkspacesRequest = PendingCreateStandbyWorkspacesRequest'
  { -- | The identifier of the directory for the Standby WorkSpace.
    PendingCreateStandbyWorkspacesRequest -> Maybe Text
directoryId :: Prelude.Maybe Prelude.Text,
    -- | The operational state of the Standby WorkSpace.
    PendingCreateStandbyWorkspacesRequest -> Maybe WorkspaceState
state :: Prelude.Maybe WorkspaceState,
    -- | Describes the Standby WorkSpace that was created.
    --
    -- Because this operation is asynchronous, the identifier returned is not
    -- immediately available for use with other operations. For example, if you
    -- call
    -- <https://docs.aws.amazon.com/workspaces/latest/api/API_DescribeWorkspaces.html DescribeWorkspaces>
    -- before the WorkSpace is created, the information returned can be
    -- incomplete.
    PendingCreateStandbyWorkspacesRequest -> Maybe Text
userName :: Prelude.Maybe Prelude.Text,
    -- | The identifier of the Standby WorkSpace.
    PendingCreateStandbyWorkspacesRequest -> Maybe Text
workspaceId :: Prelude.Maybe Prelude.Text
  }
  deriving (PendingCreateStandbyWorkspacesRequest
-> PendingCreateStandbyWorkspacesRequest -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PendingCreateStandbyWorkspacesRequest
-> PendingCreateStandbyWorkspacesRequest -> Bool
$c/= :: PendingCreateStandbyWorkspacesRequest
-> PendingCreateStandbyWorkspacesRequest -> Bool
== :: PendingCreateStandbyWorkspacesRequest
-> PendingCreateStandbyWorkspacesRequest -> Bool
$c== :: PendingCreateStandbyWorkspacesRequest
-> PendingCreateStandbyWorkspacesRequest -> Bool
Prelude.Eq, ReadPrec [PendingCreateStandbyWorkspacesRequest]
ReadPrec PendingCreateStandbyWorkspacesRequest
Int -> ReadS PendingCreateStandbyWorkspacesRequest
ReadS [PendingCreateStandbyWorkspacesRequest]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PendingCreateStandbyWorkspacesRequest]
$creadListPrec :: ReadPrec [PendingCreateStandbyWorkspacesRequest]
readPrec :: ReadPrec PendingCreateStandbyWorkspacesRequest
$creadPrec :: ReadPrec PendingCreateStandbyWorkspacesRequest
readList :: ReadS [PendingCreateStandbyWorkspacesRequest]
$creadList :: ReadS [PendingCreateStandbyWorkspacesRequest]
readsPrec :: Int -> ReadS PendingCreateStandbyWorkspacesRequest
$creadsPrec :: Int -> ReadS PendingCreateStandbyWorkspacesRequest
Prelude.Read, Int -> PendingCreateStandbyWorkspacesRequest -> ShowS
[PendingCreateStandbyWorkspacesRequest] -> ShowS
PendingCreateStandbyWorkspacesRequest -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PendingCreateStandbyWorkspacesRequest] -> ShowS
$cshowList :: [PendingCreateStandbyWorkspacesRequest] -> ShowS
show :: PendingCreateStandbyWorkspacesRequest -> String
$cshow :: PendingCreateStandbyWorkspacesRequest -> String
showsPrec :: Int -> PendingCreateStandbyWorkspacesRequest -> ShowS
$cshowsPrec :: Int -> PendingCreateStandbyWorkspacesRequest -> ShowS
Prelude.Show, forall x.
Rep PendingCreateStandbyWorkspacesRequest x
-> PendingCreateStandbyWorkspacesRequest
forall x.
PendingCreateStandbyWorkspacesRequest
-> Rep PendingCreateStandbyWorkspacesRequest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PendingCreateStandbyWorkspacesRequest x
-> PendingCreateStandbyWorkspacesRequest
$cfrom :: forall x.
PendingCreateStandbyWorkspacesRequest
-> Rep PendingCreateStandbyWorkspacesRequest x
Prelude.Generic)

-- |
-- Create a value of 'PendingCreateStandbyWorkspacesRequest' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'directoryId', 'pendingCreateStandbyWorkspacesRequest_directoryId' - The identifier of the directory for the Standby WorkSpace.
--
-- 'state', 'pendingCreateStandbyWorkspacesRequest_state' - The operational state of the Standby WorkSpace.
--
-- 'userName', 'pendingCreateStandbyWorkspacesRequest_userName' - Describes the Standby WorkSpace that was created.
--
-- Because this operation is asynchronous, the identifier returned is not
-- immediately available for use with other operations. For example, if you
-- call
-- <https://docs.aws.amazon.com/workspaces/latest/api/API_DescribeWorkspaces.html DescribeWorkspaces>
-- before the WorkSpace is created, the information returned can be
-- incomplete.
--
-- 'workspaceId', 'pendingCreateStandbyWorkspacesRequest_workspaceId' - The identifier of the Standby WorkSpace.
newPendingCreateStandbyWorkspacesRequest ::
  PendingCreateStandbyWorkspacesRequest
newPendingCreateStandbyWorkspacesRequest :: PendingCreateStandbyWorkspacesRequest
newPendingCreateStandbyWorkspacesRequest =
  PendingCreateStandbyWorkspacesRequest'
    { $sel:directoryId:PendingCreateStandbyWorkspacesRequest' :: Maybe Text
directoryId =
        forall a. Maybe a
Prelude.Nothing,
      $sel:state:PendingCreateStandbyWorkspacesRequest' :: Maybe WorkspaceState
state = forall a. Maybe a
Prelude.Nothing,
      $sel:userName:PendingCreateStandbyWorkspacesRequest' :: Maybe Text
userName = forall a. Maybe a
Prelude.Nothing,
      $sel:workspaceId:PendingCreateStandbyWorkspacesRequest' :: Maybe Text
workspaceId = forall a. Maybe a
Prelude.Nothing
    }

-- | The identifier of the directory for the Standby WorkSpace.
pendingCreateStandbyWorkspacesRequest_directoryId :: Lens.Lens' PendingCreateStandbyWorkspacesRequest (Prelude.Maybe Prelude.Text)
pendingCreateStandbyWorkspacesRequest_directoryId :: Lens' PendingCreateStandbyWorkspacesRequest (Maybe Text)
pendingCreateStandbyWorkspacesRequest_directoryId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PendingCreateStandbyWorkspacesRequest' {Maybe Text
directoryId :: Maybe Text
$sel:directoryId:PendingCreateStandbyWorkspacesRequest' :: PendingCreateStandbyWorkspacesRequest -> Maybe Text
directoryId} -> Maybe Text
directoryId) (\s :: PendingCreateStandbyWorkspacesRequest
s@PendingCreateStandbyWorkspacesRequest' {} Maybe Text
a -> PendingCreateStandbyWorkspacesRequest
s {$sel:directoryId:PendingCreateStandbyWorkspacesRequest' :: Maybe Text
directoryId = Maybe Text
a} :: PendingCreateStandbyWorkspacesRequest)

-- | The operational state of the Standby WorkSpace.
pendingCreateStandbyWorkspacesRequest_state :: Lens.Lens' PendingCreateStandbyWorkspacesRequest (Prelude.Maybe WorkspaceState)
pendingCreateStandbyWorkspacesRequest_state :: Lens' PendingCreateStandbyWorkspacesRequest (Maybe WorkspaceState)
pendingCreateStandbyWorkspacesRequest_state = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PendingCreateStandbyWorkspacesRequest' {Maybe WorkspaceState
state :: Maybe WorkspaceState
$sel:state:PendingCreateStandbyWorkspacesRequest' :: PendingCreateStandbyWorkspacesRequest -> Maybe WorkspaceState
state} -> Maybe WorkspaceState
state) (\s :: PendingCreateStandbyWorkspacesRequest
s@PendingCreateStandbyWorkspacesRequest' {} Maybe WorkspaceState
a -> PendingCreateStandbyWorkspacesRequest
s {$sel:state:PendingCreateStandbyWorkspacesRequest' :: Maybe WorkspaceState
state = Maybe WorkspaceState
a} :: PendingCreateStandbyWorkspacesRequest)

-- | Describes the Standby WorkSpace that was created.
--
-- Because this operation is asynchronous, the identifier returned is not
-- immediately available for use with other operations. For example, if you
-- call
-- <https://docs.aws.amazon.com/workspaces/latest/api/API_DescribeWorkspaces.html DescribeWorkspaces>
-- before the WorkSpace is created, the information returned can be
-- incomplete.
pendingCreateStandbyWorkspacesRequest_userName :: Lens.Lens' PendingCreateStandbyWorkspacesRequest (Prelude.Maybe Prelude.Text)
pendingCreateStandbyWorkspacesRequest_userName :: Lens' PendingCreateStandbyWorkspacesRequest (Maybe Text)
pendingCreateStandbyWorkspacesRequest_userName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PendingCreateStandbyWorkspacesRequest' {Maybe Text
userName :: Maybe Text
$sel:userName:PendingCreateStandbyWorkspacesRequest' :: PendingCreateStandbyWorkspacesRequest -> Maybe Text
userName} -> Maybe Text
userName) (\s :: PendingCreateStandbyWorkspacesRequest
s@PendingCreateStandbyWorkspacesRequest' {} Maybe Text
a -> PendingCreateStandbyWorkspacesRequest
s {$sel:userName:PendingCreateStandbyWorkspacesRequest' :: Maybe Text
userName = Maybe Text
a} :: PendingCreateStandbyWorkspacesRequest)

-- | The identifier of the Standby WorkSpace.
pendingCreateStandbyWorkspacesRequest_workspaceId :: Lens.Lens' PendingCreateStandbyWorkspacesRequest (Prelude.Maybe Prelude.Text)
pendingCreateStandbyWorkspacesRequest_workspaceId :: Lens' PendingCreateStandbyWorkspacesRequest (Maybe Text)
pendingCreateStandbyWorkspacesRequest_workspaceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PendingCreateStandbyWorkspacesRequest' {Maybe Text
workspaceId :: Maybe Text
$sel:workspaceId:PendingCreateStandbyWorkspacesRequest' :: PendingCreateStandbyWorkspacesRequest -> Maybe Text
workspaceId} -> Maybe Text
workspaceId) (\s :: PendingCreateStandbyWorkspacesRequest
s@PendingCreateStandbyWorkspacesRequest' {} Maybe Text
a -> PendingCreateStandbyWorkspacesRequest
s {$sel:workspaceId:PendingCreateStandbyWorkspacesRequest' :: Maybe Text
workspaceId = Maybe Text
a} :: PendingCreateStandbyWorkspacesRequest)

instance
  Data.FromJSON
    PendingCreateStandbyWorkspacesRequest
  where
  parseJSON :: Value -> Parser PendingCreateStandbyWorkspacesRequest
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"PendingCreateStandbyWorkspacesRequest"
      ( \Object
x ->
          Maybe Text
-> Maybe WorkspaceState
-> Maybe Text
-> Maybe Text
-> PendingCreateStandbyWorkspacesRequest
PendingCreateStandbyWorkspacesRequest'
            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
"DirectoryId")
            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
"UserName")
            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
    PendingCreateStandbyWorkspacesRequest
  where
  hashWithSalt :: Int -> PendingCreateStandbyWorkspacesRequest -> Int
hashWithSalt
    Int
_salt
    PendingCreateStandbyWorkspacesRequest' {Maybe Text
Maybe WorkspaceState
workspaceId :: Maybe Text
userName :: Maybe Text
state :: Maybe WorkspaceState
directoryId :: Maybe Text
$sel:workspaceId:PendingCreateStandbyWorkspacesRequest' :: PendingCreateStandbyWorkspacesRequest -> Maybe Text
$sel:userName:PendingCreateStandbyWorkspacesRequest' :: PendingCreateStandbyWorkspacesRequest -> Maybe Text
$sel:state:PendingCreateStandbyWorkspacesRequest' :: PendingCreateStandbyWorkspacesRequest -> Maybe WorkspaceState
$sel:directoryId:PendingCreateStandbyWorkspacesRequest' :: PendingCreateStandbyWorkspacesRequest -> Maybe Text
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
directoryId
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe WorkspaceState
state
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
userName
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
workspaceId

instance
  Prelude.NFData
    PendingCreateStandbyWorkspacesRequest
  where
  rnf :: PendingCreateStandbyWorkspacesRequest -> ()
rnf PendingCreateStandbyWorkspacesRequest' {Maybe Text
Maybe WorkspaceState
workspaceId :: Maybe Text
userName :: Maybe Text
state :: Maybe WorkspaceState
directoryId :: Maybe Text
$sel:workspaceId:PendingCreateStandbyWorkspacesRequest' :: PendingCreateStandbyWorkspacesRequest -> Maybe Text
$sel:userName:PendingCreateStandbyWorkspacesRequest' :: PendingCreateStandbyWorkspacesRequest -> Maybe Text
$sel:state:PendingCreateStandbyWorkspacesRequest' :: PendingCreateStandbyWorkspacesRequest -> Maybe WorkspaceState
$sel:directoryId:PendingCreateStandbyWorkspacesRequest' :: PendingCreateStandbyWorkspacesRequest -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
directoryId
      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 Text
userName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
workspaceId