{-# 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.UnsuccessfulInstanceCreditSpecificationItem 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.UnsuccessfulInstanceCreditSpecificationItemError
import qualified Amazonka.Prelude as Prelude
data UnsuccessfulInstanceCreditSpecificationItem = UnsuccessfulInstanceCreditSpecificationItem'
{
UnsuccessfulInstanceCreditSpecificationItem
-> Maybe UnsuccessfulInstanceCreditSpecificationItemError
error :: Prelude.Maybe UnsuccessfulInstanceCreditSpecificationItemError,
UnsuccessfulInstanceCreditSpecificationItem -> Maybe Text
instanceId :: Prelude.Maybe Prelude.Text
}
deriving (UnsuccessfulInstanceCreditSpecificationItem
-> UnsuccessfulInstanceCreditSpecificationItem -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UnsuccessfulInstanceCreditSpecificationItem
-> UnsuccessfulInstanceCreditSpecificationItem -> Bool
$c/= :: UnsuccessfulInstanceCreditSpecificationItem
-> UnsuccessfulInstanceCreditSpecificationItem -> Bool
== :: UnsuccessfulInstanceCreditSpecificationItem
-> UnsuccessfulInstanceCreditSpecificationItem -> Bool
$c== :: UnsuccessfulInstanceCreditSpecificationItem
-> UnsuccessfulInstanceCreditSpecificationItem -> Bool
Prelude.Eq, ReadPrec [UnsuccessfulInstanceCreditSpecificationItem]
ReadPrec UnsuccessfulInstanceCreditSpecificationItem
Int -> ReadS UnsuccessfulInstanceCreditSpecificationItem
ReadS [UnsuccessfulInstanceCreditSpecificationItem]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UnsuccessfulInstanceCreditSpecificationItem]
$creadListPrec :: ReadPrec [UnsuccessfulInstanceCreditSpecificationItem]
readPrec :: ReadPrec UnsuccessfulInstanceCreditSpecificationItem
$creadPrec :: ReadPrec UnsuccessfulInstanceCreditSpecificationItem
readList :: ReadS [UnsuccessfulInstanceCreditSpecificationItem]
$creadList :: ReadS [UnsuccessfulInstanceCreditSpecificationItem]
readsPrec :: Int -> ReadS UnsuccessfulInstanceCreditSpecificationItem
$creadsPrec :: Int -> ReadS UnsuccessfulInstanceCreditSpecificationItem
Prelude.Read, Int -> UnsuccessfulInstanceCreditSpecificationItem -> ShowS
[UnsuccessfulInstanceCreditSpecificationItem] -> ShowS
UnsuccessfulInstanceCreditSpecificationItem -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UnsuccessfulInstanceCreditSpecificationItem] -> ShowS
$cshowList :: [UnsuccessfulInstanceCreditSpecificationItem] -> ShowS
show :: UnsuccessfulInstanceCreditSpecificationItem -> String
$cshow :: UnsuccessfulInstanceCreditSpecificationItem -> String
showsPrec :: Int -> UnsuccessfulInstanceCreditSpecificationItem -> ShowS
$cshowsPrec :: Int -> UnsuccessfulInstanceCreditSpecificationItem -> ShowS
Prelude.Show, forall x.
Rep UnsuccessfulInstanceCreditSpecificationItem x
-> UnsuccessfulInstanceCreditSpecificationItem
forall x.
UnsuccessfulInstanceCreditSpecificationItem
-> Rep UnsuccessfulInstanceCreditSpecificationItem x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UnsuccessfulInstanceCreditSpecificationItem x
-> UnsuccessfulInstanceCreditSpecificationItem
$cfrom :: forall x.
UnsuccessfulInstanceCreditSpecificationItem
-> Rep UnsuccessfulInstanceCreditSpecificationItem x
Prelude.Generic)
newUnsuccessfulInstanceCreditSpecificationItem ::
UnsuccessfulInstanceCreditSpecificationItem
newUnsuccessfulInstanceCreditSpecificationItem :: UnsuccessfulInstanceCreditSpecificationItem
newUnsuccessfulInstanceCreditSpecificationItem =
UnsuccessfulInstanceCreditSpecificationItem'
{ $sel:error:UnsuccessfulInstanceCreditSpecificationItem' :: Maybe UnsuccessfulInstanceCreditSpecificationItemError
error =
forall a. Maybe a
Prelude.Nothing,
$sel:instanceId:UnsuccessfulInstanceCreditSpecificationItem' :: Maybe Text
instanceId = forall a. Maybe a
Prelude.Nothing
}
unsuccessfulInstanceCreditSpecificationItem_error :: Lens.Lens' UnsuccessfulInstanceCreditSpecificationItem (Prelude.Maybe UnsuccessfulInstanceCreditSpecificationItemError)
unsuccessfulInstanceCreditSpecificationItem_error :: Lens'
UnsuccessfulInstanceCreditSpecificationItem
(Maybe UnsuccessfulInstanceCreditSpecificationItemError)
unsuccessfulInstanceCreditSpecificationItem_error = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UnsuccessfulInstanceCreditSpecificationItem' {Maybe UnsuccessfulInstanceCreditSpecificationItemError
error :: Maybe UnsuccessfulInstanceCreditSpecificationItemError
$sel:error:UnsuccessfulInstanceCreditSpecificationItem' :: UnsuccessfulInstanceCreditSpecificationItem
-> Maybe UnsuccessfulInstanceCreditSpecificationItemError
error} -> Maybe UnsuccessfulInstanceCreditSpecificationItemError
error) (\s :: UnsuccessfulInstanceCreditSpecificationItem
s@UnsuccessfulInstanceCreditSpecificationItem' {} Maybe UnsuccessfulInstanceCreditSpecificationItemError
a -> UnsuccessfulInstanceCreditSpecificationItem
s {$sel:error:UnsuccessfulInstanceCreditSpecificationItem' :: Maybe UnsuccessfulInstanceCreditSpecificationItemError
error = Maybe UnsuccessfulInstanceCreditSpecificationItemError
a} :: UnsuccessfulInstanceCreditSpecificationItem)
unsuccessfulInstanceCreditSpecificationItem_instanceId :: Lens.Lens' UnsuccessfulInstanceCreditSpecificationItem (Prelude.Maybe Prelude.Text)
unsuccessfulInstanceCreditSpecificationItem_instanceId :: Lens' UnsuccessfulInstanceCreditSpecificationItem (Maybe Text)
unsuccessfulInstanceCreditSpecificationItem_instanceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UnsuccessfulInstanceCreditSpecificationItem' {Maybe Text
instanceId :: Maybe Text
$sel:instanceId:UnsuccessfulInstanceCreditSpecificationItem' :: UnsuccessfulInstanceCreditSpecificationItem -> Maybe Text
instanceId} -> Maybe Text
instanceId) (\s :: UnsuccessfulInstanceCreditSpecificationItem
s@UnsuccessfulInstanceCreditSpecificationItem' {} Maybe Text
a -> UnsuccessfulInstanceCreditSpecificationItem
s {$sel:instanceId:UnsuccessfulInstanceCreditSpecificationItem' :: Maybe Text
instanceId = Maybe Text
a} :: UnsuccessfulInstanceCreditSpecificationItem)
instance
Data.FromXML
UnsuccessfulInstanceCreditSpecificationItem
where
parseXML :: [Node] -> Either String UnsuccessfulInstanceCreditSpecificationItem
parseXML [Node]
x =
Maybe UnsuccessfulInstanceCreditSpecificationItemError
-> Maybe Text -> UnsuccessfulInstanceCreditSpecificationItem
UnsuccessfulInstanceCreditSpecificationItem'
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
"error")
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
"instanceId")
instance
Prelude.Hashable
UnsuccessfulInstanceCreditSpecificationItem
where
hashWithSalt :: Int -> UnsuccessfulInstanceCreditSpecificationItem -> Int
hashWithSalt
Int
_salt
UnsuccessfulInstanceCreditSpecificationItem' {Maybe Text
Maybe UnsuccessfulInstanceCreditSpecificationItemError
instanceId :: Maybe Text
error :: Maybe UnsuccessfulInstanceCreditSpecificationItemError
$sel:instanceId:UnsuccessfulInstanceCreditSpecificationItem' :: UnsuccessfulInstanceCreditSpecificationItem -> Maybe Text
$sel:error:UnsuccessfulInstanceCreditSpecificationItem' :: UnsuccessfulInstanceCreditSpecificationItem
-> Maybe UnsuccessfulInstanceCreditSpecificationItemError
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe UnsuccessfulInstanceCreditSpecificationItemError
error
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
instanceId
instance
Prelude.NFData
UnsuccessfulInstanceCreditSpecificationItem
where
rnf :: UnsuccessfulInstanceCreditSpecificationItem -> ()
rnf UnsuccessfulInstanceCreditSpecificationItem' {Maybe Text
Maybe UnsuccessfulInstanceCreditSpecificationItemError
instanceId :: Maybe Text
error :: Maybe UnsuccessfulInstanceCreditSpecificationItemError
$sel:instanceId:UnsuccessfulInstanceCreditSpecificationItem' :: UnsuccessfulInstanceCreditSpecificationItem -> Maybe Text
$sel:error:UnsuccessfulInstanceCreditSpecificationItem' :: UnsuccessfulInstanceCreditSpecificationItem
-> Maybe UnsuccessfulInstanceCreditSpecificationItemError
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe UnsuccessfulInstanceCreditSpecificationItemError
error
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
instanceId