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