{-# 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.EC2.Types.DeleteQueuedReservedInstancesError where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.EC2.Internal
import Amazonka.EC2.Types.DeleteQueuedReservedInstancesErrorCode
import qualified Amazonka.Prelude as Prelude
data DeleteQueuedReservedInstancesError = DeleteQueuedReservedInstancesError'
{
DeleteQueuedReservedInstancesError
-> Maybe DeleteQueuedReservedInstancesErrorCode
code :: Prelude.Maybe DeleteQueuedReservedInstancesErrorCode,
DeleteQueuedReservedInstancesError -> Maybe Text
message :: Prelude.Maybe Prelude.Text
}
deriving (DeleteQueuedReservedInstancesError
-> DeleteQueuedReservedInstancesError -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteQueuedReservedInstancesError
-> DeleteQueuedReservedInstancesError -> Bool
$c/= :: DeleteQueuedReservedInstancesError
-> DeleteQueuedReservedInstancesError -> Bool
== :: DeleteQueuedReservedInstancesError
-> DeleteQueuedReservedInstancesError -> Bool
$c== :: DeleteQueuedReservedInstancesError
-> DeleteQueuedReservedInstancesError -> Bool
Prelude.Eq, ReadPrec [DeleteQueuedReservedInstancesError]
ReadPrec DeleteQueuedReservedInstancesError
Int -> ReadS DeleteQueuedReservedInstancesError
ReadS [DeleteQueuedReservedInstancesError]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteQueuedReservedInstancesError]
$creadListPrec :: ReadPrec [DeleteQueuedReservedInstancesError]
readPrec :: ReadPrec DeleteQueuedReservedInstancesError
$creadPrec :: ReadPrec DeleteQueuedReservedInstancesError
readList :: ReadS [DeleteQueuedReservedInstancesError]
$creadList :: ReadS [DeleteQueuedReservedInstancesError]
readsPrec :: Int -> ReadS DeleteQueuedReservedInstancesError
$creadsPrec :: Int -> ReadS DeleteQueuedReservedInstancesError
Prelude.Read, Int -> DeleteQueuedReservedInstancesError -> ShowS
[DeleteQueuedReservedInstancesError] -> ShowS
DeleteQueuedReservedInstancesError -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteQueuedReservedInstancesError] -> ShowS
$cshowList :: [DeleteQueuedReservedInstancesError] -> ShowS
show :: DeleteQueuedReservedInstancesError -> String
$cshow :: DeleteQueuedReservedInstancesError -> String
showsPrec :: Int -> DeleteQueuedReservedInstancesError -> ShowS
$cshowsPrec :: Int -> DeleteQueuedReservedInstancesError -> ShowS
Prelude.Show, forall x.
Rep DeleteQueuedReservedInstancesError x
-> DeleteQueuedReservedInstancesError
forall x.
DeleteQueuedReservedInstancesError
-> Rep DeleteQueuedReservedInstancesError x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteQueuedReservedInstancesError x
-> DeleteQueuedReservedInstancesError
$cfrom :: forall x.
DeleteQueuedReservedInstancesError
-> Rep DeleteQueuedReservedInstancesError x
Prelude.Generic)
newDeleteQueuedReservedInstancesError ::
DeleteQueuedReservedInstancesError
newDeleteQueuedReservedInstancesError :: DeleteQueuedReservedInstancesError
newDeleteQueuedReservedInstancesError =
DeleteQueuedReservedInstancesError'
{ $sel:code:DeleteQueuedReservedInstancesError' :: Maybe DeleteQueuedReservedInstancesErrorCode
code =
forall a. Maybe a
Prelude.Nothing,
$sel:message:DeleteQueuedReservedInstancesError' :: Maybe Text
message = forall a. Maybe a
Prelude.Nothing
}
deleteQueuedReservedInstancesError_code :: Lens.Lens' DeleteQueuedReservedInstancesError (Prelude.Maybe DeleteQueuedReservedInstancesErrorCode)
deleteQueuedReservedInstancesError_code :: Lens'
DeleteQueuedReservedInstancesError
(Maybe DeleteQueuedReservedInstancesErrorCode)
deleteQueuedReservedInstancesError_code = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteQueuedReservedInstancesError' {Maybe DeleteQueuedReservedInstancesErrorCode
code :: Maybe DeleteQueuedReservedInstancesErrorCode
$sel:code:DeleteQueuedReservedInstancesError' :: DeleteQueuedReservedInstancesError
-> Maybe DeleteQueuedReservedInstancesErrorCode
code} -> Maybe DeleteQueuedReservedInstancesErrorCode
code) (\s :: DeleteQueuedReservedInstancesError
s@DeleteQueuedReservedInstancesError' {} Maybe DeleteQueuedReservedInstancesErrorCode
a -> DeleteQueuedReservedInstancesError
s {$sel:code:DeleteQueuedReservedInstancesError' :: Maybe DeleteQueuedReservedInstancesErrorCode
code = Maybe DeleteQueuedReservedInstancesErrorCode
a} :: DeleteQueuedReservedInstancesError)
deleteQueuedReservedInstancesError_message :: Lens.Lens' DeleteQueuedReservedInstancesError (Prelude.Maybe Prelude.Text)
deleteQueuedReservedInstancesError_message :: Lens' DeleteQueuedReservedInstancesError (Maybe Text)
deleteQueuedReservedInstancesError_message = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteQueuedReservedInstancesError' {Maybe Text
message :: Maybe Text
$sel:message:DeleteQueuedReservedInstancesError' :: DeleteQueuedReservedInstancesError -> Maybe Text
message} -> Maybe Text
message) (\s :: DeleteQueuedReservedInstancesError
s@DeleteQueuedReservedInstancesError' {} Maybe Text
a -> DeleteQueuedReservedInstancesError
s {$sel:message:DeleteQueuedReservedInstancesError' :: Maybe Text
message = Maybe Text
a} :: DeleteQueuedReservedInstancesError)
instance
Data.FromXML
DeleteQueuedReservedInstancesError
where
parseXML :: [Node] -> Either String DeleteQueuedReservedInstancesError
parseXML [Node]
x =
Maybe DeleteQueuedReservedInstancesErrorCode
-> Maybe Text -> DeleteQueuedReservedInstancesError
DeleteQueuedReservedInstancesError'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"code")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"message")
instance
Prelude.Hashable
DeleteQueuedReservedInstancesError
where
hashWithSalt :: Int -> DeleteQueuedReservedInstancesError -> Int
hashWithSalt
Int
_salt
DeleteQueuedReservedInstancesError' {Maybe Text
Maybe DeleteQueuedReservedInstancesErrorCode
message :: Maybe Text
code :: Maybe DeleteQueuedReservedInstancesErrorCode
$sel:message:DeleteQueuedReservedInstancesError' :: DeleteQueuedReservedInstancesError -> Maybe Text
$sel:code:DeleteQueuedReservedInstancesError' :: DeleteQueuedReservedInstancesError
-> Maybe DeleteQueuedReservedInstancesErrorCode
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DeleteQueuedReservedInstancesErrorCode
code
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
message
instance
Prelude.NFData
DeleteQueuedReservedInstancesError
where
rnf :: DeleteQueuedReservedInstancesError -> ()
rnf DeleteQueuedReservedInstancesError' {Maybe Text
Maybe DeleteQueuedReservedInstancesErrorCode
message :: Maybe Text
code :: Maybe DeleteQueuedReservedInstancesErrorCode
$sel:message:DeleteQueuedReservedInstancesError' :: DeleteQueuedReservedInstancesError -> Maybe Text
$sel:code:DeleteQueuedReservedInstancesError' :: DeleteQueuedReservedInstancesError
-> Maybe DeleteQueuedReservedInstancesErrorCode
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe DeleteQueuedReservedInstancesErrorCode
code seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
message