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