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