{-# 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.FailedCreateStandbyWorkspacesRequest
-- 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.FailedCreateStandbyWorkspacesRequest 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.StandbyWorkspace

-- | Describes the Standby WorkSpace that could not be created.
--
-- /See:/ 'newFailedCreateStandbyWorkspacesRequest' smart constructor.
data FailedCreateStandbyWorkspacesRequest = FailedCreateStandbyWorkspacesRequest'
  { -- | The error code that is returned if the Standby WorkSpace could not be
    -- created.
    FailedCreateStandbyWorkspacesRequest -> Maybe Text
errorCode :: Prelude.Maybe Prelude.Text,
    -- | The text of the error message that is returned if the Standby WorkSpace
    -- could not be created.
    FailedCreateStandbyWorkspacesRequest -> Maybe Text
errorMessage :: Prelude.Maybe Prelude.Text,
    -- | Information about the Standby WorkSpace that could not be created.
    FailedCreateStandbyWorkspacesRequest -> Maybe StandbyWorkspace
standbyWorkspaceRequest :: Prelude.Maybe StandbyWorkspace
  }
  deriving (FailedCreateStandbyWorkspacesRequest
-> FailedCreateStandbyWorkspacesRequest -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FailedCreateStandbyWorkspacesRequest
-> FailedCreateStandbyWorkspacesRequest -> Bool
$c/= :: FailedCreateStandbyWorkspacesRequest
-> FailedCreateStandbyWorkspacesRequest -> Bool
== :: FailedCreateStandbyWorkspacesRequest
-> FailedCreateStandbyWorkspacesRequest -> Bool
$c== :: FailedCreateStandbyWorkspacesRequest
-> FailedCreateStandbyWorkspacesRequest -> Bool
Prelude.Eq, ReadPrec [FailedCreateStandbyWorkspacesRequest]
ReadPrec FailedCreateStandbyWorkspacesRequest
Int -> ReadS FailedCreateStandbyWorkspacesRequest
ReadS [FailedCreateStandbyWorkspacesRequest]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FailedCreateStandbyWorkspacesRequest]
$creadListPrec :: ReadPrec [FailedCreateStandbyWorkspacesRequest]
readPrec :: ReadPrec FailedCreateStandbyWorkspacesRequest
$creadPrec :: ReadPrec FailedCreateStandbyWorkspacesRequest
readList :: ReadS [FailedCreateStandbyWorkspacesRequest]
$creadList :: ReadS [FailedCreateStandbyWorkspacesRequest]
readsPrec :: Int -> ReadS FailedCreateStandbyWorkspacesRequest
$creadsPrec :: Int -> ReadS FailedCreateStandbyWorkspacesRequest
Prelude.Read, Int -> FailedCreateStandbyWorkspacesRequest -> ShowS
[FailedCreateStandbyWorkspacesRequest] -> ShowS
FailedCreateStandbyWorkspacesRequest -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FailedCreateStandbyWorkspacesRequest] -> ShowS
$cshowList :: [FailedCreateStandbyWorkspacesRequest] -> ShowS
show :: FailedCreateStandbyWorkspacesRequest -> String
$cshow :: FailedCreateStandbyWorkspacesRequest -> String
showsPrec :: Int -> FailedCreateStandbyWorkspacesRequest -> ShowS
$cshowsPrec :: Int -> FailedCreateStandbyWorkspacesRequest -> ShowS
Prelude.Show, forall x.
Rep FailedCreateStandbyWorkspacesRequest x
-> FailedCreateStandbyWorkspacesRequest
forall x.
FailedCreateStandbyWorkspacesRequest
-> Rep FailedCreateStandbyWorkspacesRequest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep FailedCreateStandbyWorkspacesRequest x
-> FailedCreateStandbyWorkspacesRequest
$cfrom :: forall x.
FailedCreateStandbyWorkspacesRequest
-> Rep FailedCreateStandbyWorkspacesRequest x
Prelude.Generic)

-- |
-- Create a value of 'FailedCreateStandbyWorkspacesRequest' 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:
--
-- 'errorCode', 'failedCreateStandbyWorkspacesRequest_errorCode' - The error code that is returned if the Standby WorkSpace could not be
-- created.
--
-- 'errorMessage', 'failedCreateStandbyWorkspacesRequest_errorMessage' - The text of the error message that is returned if the Standby WorkSpace
-- could not be created.
--
-- 'standbyWorkspaceRequest', 'failedCreateStandbyWorkspacesRequest_standbyWorkspaceRequest' - Information about the Standby WorkSpace that could not be created.
newFailedCreateStandbyWorkspacesRequest ::
  FailedCreateStandbyWorkspacesRequest
newFailedCreateStandbyWorkspacesRequest :: FailedCreateStandbyWorkspacesRequest
newFailedCreateStandbyWorkspacesRequest =
  FailedCreateStandbyWorkspacesRequest'
    { $sel:errorCode:FailedCreateStandbyWorkspacesRequest' :: Maybe Text
errorCode =
        forall a. Maybe a
Prelude.Nothing,
      $sel:errorMessage:FailedCreateStandbyWorkspacesRequest' :: Maybe Text
errorMessage = forall a. Maybe a
Prelude.Nothing,
      $sel:standbyWorkspaceRequest:FailedCreateStandbyWorkspacesRequest' :: Maybe StandbyWorkspace
standbyWorkspaceRequest =
        forall a. Maybe a
Prelude.Nothing
    }

-- | The error code that is returned if the Standby WorkSpace could not be
-- created.
failedCreateStandbyWorkspacesRequest_errorCode :: Lens.Lens' FailedCreateStandbyWorkspacesRequest (Prelude.Maybe Prelude.Text)
failedCreateStandbyWorkspacesRequest_errorCode :: Lens' FailedCreateStandbyWorkspacesRequest (Maybe Text)
failedCreateStandbyWorkspacesRequest_errorCode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FailedCreateStandbyWorkspacesRequest' {Maybe Text
errorCode :: Maybe Text
$sel:errorCode:FailedCreateStandbyWorkspacesRequest' :: FailedCreateStandbyWorkspacesRequest -> Maybe Text
errorCode} -> Maybe Text
errorCode) (\s :: FailedCreateStandbyWorkspacesRequest
s@FailedCreateStandbyWorkspacesRequest' {} Maybe Text
a -> FailedCreateStandbyWorkspacesRequest
s {$sel:errorCode:FailedCreateStandbyWorkspacesRequest' :: Maybe Text
errorCode = Maybe Text
a} :: FailedCreateStandbyWorkspacesRequest)

-- | The text of the error message that is returned if the Standby WorkSpace
-- could not be created.
failedCreateStandbyWorkspacesRequest_errorMessage :: Lens.Lens' FailedCreateStandbyWorkspacesRequest (Prelude.Maybe Prelude.Text)
failedCreateStandbyWorkspacesRequest_errorMessage :: Lens' FailedCreateStandbyWorkspacesRequest (Maybe Text)
failedCreateStandbyWorkspacesRequest_errorMessage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FailedCreateStandbyWorkspacesRequest' {Maybe Text
errorMessage :: Maybe Text
$sel:errorMessage:FailedCreateStandbyWorkspacesRequest' :: FailedCreateStandbyWorkspacesRequest -> Maybe Text
errorMessage} -> Maybe Text
errorMessage) (\s :: FailedCreateStandbyWorkspacesRequest
s@FailedCreateStandbyWorkspacesRequest' {} Maybe Text
a -> FailedCreateStandbyWorkspacesRequest
s {$sel:errorMessage:FailedCreateStandbyWorkspacesRequest' :: Maybe Text
errorMessage = Maybe Text
a} :: FailedCreateStandbyWorkspacesRequest)

-- | Information about the Standby WorkSpace that could not be created.
failedCreateStandbyWorkspacesRequest_standbyWorkspaceRequest :: Lens.Lens' FailedCreateStandbyWorkspacesRequest (Prelude.Maybe StandbyWorkspace)
failedCreateStandbyWorkspacesRequest_standbyWorkspaceRequest :: Lens' FailedCreateStandbyWorkspacesRequest (Maybe StandbyWorkspace)
failedCreateStandbyWorkspacesRequest_standbyWorkspaceRequest = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FailedCreateStandbyWorkspacesRequest' {Maybe StandbyWorkspace
standbyWorkspaceRequest :: Maybe StandbyWorkspace
$sel:standbyWorkspaceRequest:FailedCreateStandbyWorkspacesRequest' :: FailedCreateStandbyWorkspacesRequest -> Maybe StandbyWorkspace
standbyWorkspaceRequest} -> Maybe StandbyWorkspace
standbyWorkspaceRequest) (\s :: FailedCreateStandbyWorkspacesRequest
s@FailedCreateStandbyWorkspacesRequest' {} Maybe StandbyWorkspace
a -> FailedCreateStandbyWorkspacesRequest
s {$sel:standbyWorkspaceRequest:FailedCreateStandbyWorkspacesRequest' :: Maybe StandbyWorkspace
standbyWorkspaceRequest = Maybe StandbyWorkspace
a} :: FailedCreateStandbyWorkspacesRequest)

instance
  Data.FromJSON
    FailedCreateStandbyWorkspacesRequest
  where
  parseJSON :: Value -> Parser FailedCreateStandbyWorkspacesRequest
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"FailedCreateStandbyWorkspacesRequest"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe StandbyWorkspace
-> FailedCreateStandbyWorkspacesRequest
FailedCreateStandbyWorkspacesRequest'
            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
"ErrorCode")
            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
"ErrorMessage")
            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
"StandbyWorkspaceRequest")
      )

instance
  Prelude.Hashable
    FailedCreateStandbyWorkspacesRequest
  where
  hashWithSalt :: Int -> FailedCreateStandbyWorkspacesRequest -> Int
hashWithSalt
    Int
_salt
    FailedCreateStandbyWorkspacesRequest' {Maybe Text
Maybe StandbyWorkspace
standbyWorkspaceRequest :: Maybe StandbyWorkspace
errorMessage :: Maybe Text
errorCode :: Maybe Text
$sel:standbyWorkspaceRequest:FailedCreateStandbyWorkspacesRequest' :: FailedCreateStandbyWorkspacesRequest -> Maybe StandbyWorkspace
$sel:errorMessage:FailedCreateStandbyWorkspacesRequest' :: FailedCreateStandbyWorkspacesRequest -> Maybe Text
$sel:errorCode:FailedCreateStandbyWorkspacesRequest' :: FailedCreateStandbyWorkspacesRequest -> Maybe Text
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
errorCode
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
errorMessage
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe StandbyWorkspace
standbyWorkspaceRequest

instance
  Prelude.NFData
    FailedCreateStandbyWorkspacesRequest
  where
  rnf :: FailedCreateStandbyWorkspacesRequest -> ()
rnf FailedCreateStandbyWorkspacesRequest' {Maybe Text
Maybe StandbyWorkspace
standbyWorkspaceRequest :: Maybe StandbyWorkspace
errorMessage :: Maybe Text
errorCode :: Maybe Text
$sel:standbyWorkspaceRequest:FailedCreateStandbyWorkspacesRequest' :: FailedCreateStandbyWorkspacesRequest -> Maybe StandbyWorkspace
$sel:errorMessage:FailedCreateStandbyWorkspacesRequest' :: FailedCreateStandbyWorkspacesRequest -> Maybe Text
$sel:errorCode:FailedCreateStandbyWorkspacesRequest' :: FailedCreateStandbyWorkspacesRequest -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
errorCode
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
errorMessage
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe StandbyWorkspace
standbyWorkspaceRequest