{-# 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.AppStream.Types.UserStackAssociationError where
import Amazonka.AppStream.Types.UserStackAssociation
import Amazonka.AppStream.Types.UserStackAssociationErrorCode
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data UserStackAssociationError = UserStackAssociationError'
{
UserStackAssociationError -> Maybe UserStackAssociation
userStackAssociation :: Prelude.Maybe UserStackAssociation,
UserStackAssociationError -> Maybe UserStackAssociationErrorCode
errorCode :: Prelude.Maybe UserStackAssociationErrorCode,
UserStackAssociationError -> Maybe Text
errorMessage :: Prelude.Maybe Prelude.Text
}
deriving (UserStackAssociationError -> UserStackAssociationError -> Bool
(UserStackAssociationError -> UserStackAssociationError -> Bool)
-> (UserStackAssociationError -> UserStackAssociationError -> Bool)
-> Eq UserStackAssociationError
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UserStackAssociationError -> UserStackAssociationError -> Bool
$c/= :: UserStackAssociationError -> UserStackAssociationError -> Bool
== :: UserStackAssociationError -> UserStackAssociationError -> Bool
$c== :: UserStackAssociationError -> UserStackAssociationError -> Bool
Prelude.Eq, Int -> UserStackAssociationError -> ShowS
[UserStackAssociationError] -> ShowS
UserStackAssociationError -> String
(Int -> UserStackAssociationError -> ShowS)
-> (UserStackAssociationError -> String)
-> ([UserStackAssociationError] -> ShowS)
-> Show UserStackAssociationError
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UserStackAssociationError] -> ShowS
$cshowList :: [UserStackAssociationError] -> ShowS
show :: UserStackAssociationError -> String
$cshow :: UserStackAssociationError -> String
showsPrec :: Int -> UserStackAssociationError -> ShowS
$cshowsPrec :: Int -> UserStackAssociationError -> ShowS
Prelude.Show, (forall x.
UserStackAssociationError -> Rep UserStackAssociationError x)
-> (forall x.
Rep UserStackAssociationError x -> UserStackAssociationError)
-> Generic UserStackAssociationError
forall x.
Rep UserStackAssociationError x -> UserStackAssociationError
forall x.
UserStackAssociationError -> Rep UserStackAssociationError x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UserStackAssociationError x -> UserStackAssociationError
$cfrom :: forall x.
UserStackAssociationError -> Rep UserStackAssociationError x
Prelude.Generic)
newUserStackAssociationError ::
UserStackAssociationError
newUserStackAssociationError :: UserStackAssociationError
newUserStackAssociationError =
UserStackAssociationError' :: Maybe UserStackAssociation
-> Maybe UserStackAssociationErrorCode
-> Maybe Text
-> UserStackAssociationError
UserStackAssociationError'
{ $sel:userStackAssociation:UserStackAssociationError' :: Maybe UserStackAssociation
userStackAssociation =
Maybe UserStackAssociation
forall a. Maybe a
Prelude.Nothing,
$sel:errorCode:UserStackAssociationError' :: Maybe UserStackAssociationErrorCode
errorCode = Maybe UserStackAssociationErrorCode
forall a. Maybe a
Prelude.Nothing,
$sel:errorMessage:UserStackAssociationError' :: Maybe Text
errorMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
userStackAssociationError_userStackAssociation :: Lens.Lens' UserStackAssociationError (Prelude.Maybe UserStackAssociation)
userStackAssociationError_userStackAssociation :: (Maybe UserStackAssociation -> f (Maybe UserStackAssociation))
-> UserStackAssociationError -> f UserStackAssociationError
userStackAssociationError_userStackAssociation = (UserStackAssociationError -> Maybe UserStackAssociation)
-> (UserStackAssociationError
-> Maybe UserStackAssociation -> UserStackAssociationError)
-> Lens
UserStackAssociationError
UserStackAssociationError
(Maybe UserStackAssociation)
(Maybe UserStackAssociation)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UserStackAssociationError' {Maybe UserStackAssociation
userStackAssociation :: Maybe UserStackAssociation
$sel:userStackAssociation:UserStackAssociationError' :: UserStackAssociationError -> Maybe UserStackAssociation
userStackAssociation} -> Maybe UserStackAssociation
userStackAssociation) (\s :: UserStackAssociationError
s@UserStackAssociationError' {} Maybe UserStackAssociation
a -> UserStackAssociationError
s {$sel:userStackAssociation:UserStackAssociationError' :: Maybe UserStackAssociation
userStackAssociation = Maybe UserStackAssociation
a} :: UserStackAssociationError)
userStackAssociationError_errorCode :: Lens.Lens' UserStackAssociationError (Prelude.Maybe UserStackAssociationErrorCode)
userStackAssociationError_errorCode :: (Maybe UserStackAssociationErrorCode
-> f (Maybe UserStackAssociationErrorCode))
-> UserStackAssociationError -> f UserStackAssociationError
userStackAssociationError_errorCode = (UserStackAssociationError -> Maybe UserStackAssociationErrorCode)
-> (UserStackAssociationError
-> Maybe UserStackAssociationErrorCode
-> UserStackAssociationError)
-> Lens
UserStackAssociationError
UserStackAssociationError
(Maybe UserStackAssociationErrorCode)
(Maybe UserStackAssociationErrorCode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UserStackAssociationError' {Maybe UserStackAssociationErrorCode
errorCode :: Maybe UserStackAssociationErrorCode
$sel:errorCode:UserStackAssociationError' :: UserStackAssociationError -> Maybe UserStackAssociationErrorCode
errorCode} -> Maybe UserStackAssociationErrorCode
errorCode) (\s :: UserStackAssociationError
s@UserStackAssociationError' {} Maybe UserStackAssociationErrorCode
a -> UserStackAssociationError
s {$sel:errorCode:UserStackAssociationError' :: Maybe UserStackAssociationErrorCode
errorCode = Maybe UserStackAssociationErrorCode
a} :: UserStackAssociationError)
userStackAssociationError_errorMessage :: Lens.Lens' UserStackAssociationError (Prelude.Maybe Prelude.Text)
userStackAssociationError_errorMessage :: (Maybe Text -> f (Maybe Text))
-> UserStackAssociationError -> f UserStackAssociationError
userStackAssociationError_errorMessage = (UserStackAssociationError -> Maybe Text)
-> (UserStackAssociationError
-> Maybe Text -> UserStackAssociationError)
-> Lens
UserStackAssociationError
UserStackAssociationError
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UserStackAssociationError' {Maybe Text
errorMessage :: Maybe Text
$sel:errorMessage:UserStackAssociationError' :: UserStackAssociationError -> Maybe Text
errorMessage} -> Maybe Text
errorMessage) (\s :: UserStackAssociationError
s@UserStackAssociationError' {} Maybe Text
a -> UserStackAssociationError
s {$sel:errorMessage:UserStackAssociationError' :: Maybe Text
errorMessage = Maybe Text
a} :: UserStackAssociationError)
instance Core.FromJSON UserStackAssociationError where
parseJSON :: Value -> Parser UserStackAssociationError
parseJSON =
String
-> (Object -> Parser UserStackAssociationError)
-> Value
-> Parser UserStackAssociationError
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"UserStackAssociationError"
( \Object
x ->
Maybe UserStackAssociation
-> Maybe UserStackAssociationErrorCode
-> Maybe Text
-> UserStackAssociationError
UserStackAssociationError'
(Maybe UserStackAssociation
-> Maybe UserStackAssociationErrorCode
-> Maybe Text
-> UserStackAssociationError)
-> Parser (Maybe UserStackAssociation)
-> Parser
(Maybe UserStackAssociationErrorCode
-> Maybe Text -> UserStackAssociationError)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe UserStackAssociation)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"UserStackAssociation")
Parser
(Maybe UserStackAssociationErrorCode
-> Maybe Text -> UserStackAssociationError)
-> Parser (Maybe UserStackAssociationErrorCode)
-> Parser (Maybe Text -> UserStackAssociationError)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe UserStackAssociationErrorCode)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ErrorCode")
Parser (Maybe Text -> UserStackAssociationError)
-> Parser (Maybe Text) -> Parser UserStackAssociationError
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 UserStackAssociationError
instance Prelude.NFData UserStackAssociationError