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