{-# 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.SnapshotRecycleBinInfo 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 qualified Amazonka.Prelude as Prelude
data SnapshotRecycleBinInfo = SnapshotRecycleBinInfo'
{
SnapshotRecycleBinInfo -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
SnapshotRecycleBinInfo -> Maybe ISO8601
recycleBinEnterTime :: Prelude.Maybe Data.ISO8601,
SnapshotRecycleBinInfo -> Maybe ISO8601
recycleBinExitTime :: Prelude.Maybe Data.ISO8601,
SnapshotRecycleBinInfo -> Maybe Text
snapshotId :: Prelude.Maybe Prelude.Text,
SnapshotRecycleBinInfo -> Maybe Text
volumeId :: Prelude.Maybe Prelude.Text
}
deriving (SnapshotRecycleBinInfo -> SnapshotRecycleBinInfo -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SnapshotRecycleBinInfo -> SnapshotRecycleBinInfo -> Bool
$c/= :: SnapshotRecycleBinInfo -> SnapshotRecycleBinInfo -> Bool
== :: SnapshotRecycleBinInfo -> SnapshotRecycleBinInfo -> Bool
$c== :: SnapshotRecycleBinInfo -> SnapshotRecycleBinInfo -> Bool
Prelude.Eq, ReadPrec [SnapshotRecycleBinInfo]
ReadPrec SnapshotRecycleBinInfo
Int -> ReadS SnapshotRecycleBinInfo
ReadS [SnapshotRecycleBinInfo]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SnapshotRecycleBinInfo]
$creadListPrec :: ReadPrec [SnapshotRecycleBinInfo]
readPrec :: ReadPrec SnapshotRecycleBinInfo
$creadPrec :: ReadPrec SnapshotRecycleBinInfo
readList :: ReadS [SnapshotRecycleBinInfo]
$creadList :: ReadS [SnapshotRecycleBinInfo]
readsPrec :: Int -> ReadS SnapshotRecycleBinInfo
$creadsPrec :: Int -> ReadS SnapshotRecycleBinInfo
Prelude.Read, Int -> SnapshotRecycleBinInfo -> ShowS
[SnapshotRecycleBinInfo] -> ShowS
SnapshotRecycleBinInfo -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SnapshotRecycleBinInfo] -> ShowS
$cshowList :: [SnapshotRecycleBinInfo] -> ShowS
show :: SnapshotRecycleBinInfo -> String
$cshow :: SnapshotRecycleBinInfo -> String
showsPrec :: Int -> SnapshotRecycleBinInfo -> ShowS
$cshowsPrec :: Int -> SnapshotRecycleBinInfo -> ShowS
Prelude.Show, forall x. Rep SnapshotRecycleBinInfo x -> SnapshotRecycleBinInfo
forall x. SnapshotRecycleBinInfo -> Rep SnapshotRecycleBinInfo x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SnapshotRecycleBinInfo x -> SnapshotRecycleBinInfo
$cfrom :: forall x. SnapshotRecycleBinInfo -> Rep SnapshotRecycleBinInfo x
Prelude.Generic)
newSnapshotRecycleBinInfo ::
SnapshotRecycleBinInfo
newSnapshotRecycleBinInfo :: SnapshotRecycleBinInfo
newSnapshotRecycleBinInfo =
SnapshotRecycleBinInfo'
{ $sel:description:SnapshotRecycleBinInfo' :: Maybe Text
description =
forall a. Maybe a
Prelude.Nothing,
$sel:recycleBinEnterTime:SnapshotRecycleBinInfo' :: Maybe ISO8601
recycleBinEnterTime = forall a. Maybe a
Prelude.Nothing,
$sel:recycleBinExitTime:SnapshotRecycleBinInfo' :: Maybe ISO8601
recycleBinExitTime = forall a. Maybe a
Prelude.Nothing,
$sel:snapshotId:SnapshotRecycleBinInfo' :: Maybe Text
snapshotId = forall a. Maybe a
Prelude.Nothing,
$sel:volumeId:SnapshotRecycleBinInfo' :: Maybe Text
volumeId = forall a. Maybe a
Prelude.Nothing
}
snapshotRecycleBinInfo_description :: Lens.Lens' SnapshotRecycleBinInfo (Prelude.Maybe Prelude.Text)
snapshotRecycleBinInfo_description :: Lens' SnapshotRecycleBinInfo (Maybe Text)
snapshotRecycleBinInfo_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SnapshotRecycleBinInfo' {Maybe Text
description :: Maybe Text
$sel:description:SnapshotRecycleBinInfo' :: SnapshotRecycleBinInfo -> Maybe Text
description} -> Maybe Text
description) (\s :: SnapshotRecycleBinInfo
s@SnapshotRecycleBinInfo' {} Maybe Text
a -> SnapshotRecycleBinInfo
s {$sel:description:SnapshotRecycleBinInfo' :: Maybe Text
description = Maybe Text
a} :: SnapshotRecycleBinInfo)
snapshotRecycleBinInfo_recycleBinEnterTime :: Lens.Lens' SnapshotRecycleBinInfo (Prelude.Maybe Prelude.UTCTime)
snapshotRecycleBinInfo_recycleBinEnterTime :: Lens' SnapshotRecycleBinInfo (Maybe UTCTime)
snapshotRecycleBinInfo_recycleBinEnterTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SnapshotRecycleBinInfo' {Maybe ISO8601
recycleBinEnterTime :: Maybe ISO8601
$sel:recycleBinEnterTime:SnapshotRecycleBinInfo' :: SnapshotRecycleBinInfo -> Maybe ISO8601
recycleBinEnterTime} -> Maybe ISO8601
recycleBinEnterTime) (\s :: SnapshotRecycleBinInfo
s@SnapshotRecycleBinInfo' {} Maybe ISO8601
a -> SnapshotRecycleBinInfo
s {$sel:recycleBinEnterTime:SnapshotRecycleBinInfo' :: Maybe ISO8601
recycleBinEnterTime = Maybe ISO8601
a} :: SnapshotRecycleBinInfo) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
snapshotRecycleBinInfo_recycleBinExitTime :: Lens.Lens' SnapshotRecycleBinInfo (Prelude.Maybe Prelude.UTCTime)
snapshotRecycleBinInfo_recycleBinExitTime :: Lens' SnapshotRecycleBinInfo (Maybe UTCTime)
snapshotRecycleBinInfo_recycleBinExitTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SnapshotRecycleBinInfo' {Maybe ISO8601
recycleBinExitTime :: Maybe ISO8601
$sel:recycleBinExitTime:SnapshotRecycleBinInfo' :: SnapshotRecycleBinInfo -> Maybe ISO8601
recycleBinExitTime} -> Maybe ISO8601
recycleBinExitTime) (\s :: SnapshotRecycleBinInfo
s@SnapshotRecycleBinInfo' {} Maybe ISO8601
a -> SnapshotRecycleBinInfo
s {$sel:recycleBinExitTime:SnapshotRecycleBinInfo' :: Maybe ISO8601
recycleBinExitTime = Maybe ISO8601
a} :: SnapshotRecycleBinInfo) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
snapshotRecycleBinInfo_snapshotId :: Lens.Lens' SnapshotRecycleBinInfo (Prelude.Maybe Prelude.Text)
snapshotRecycleBinInfo_snapshotId :: Lens' SnapshotRecycleBinInfo (Maybe Text)
snapshotRecycleBinInfo_snapshotId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SnapshotRecycleBinInfo' {Maybe Text
snapshotId :: Maybe Text
$sel:snapshotId:SnapshotRecycleBinInfo' :: SnapshotRecycleBinInfo -> Maybe Text
snapshotId} -> Maybe Text
snapshotId) (\s :: SnapshotRecycleBinInfo
s@SnapshotRecycleBinInfo' {} Maybe Text
a -> SnapshotRecycleBinInfo
s {$sel:snapshotId:SnapshotRecycleBinInfo' :: Maybe Text
snapshotId = Maybe Text
a} :: SnapshotRecycleBinInfo)
snapshotRecycleBinInfo_volumeId :: Lens.Lens' SnapshotRecycleBinInfo (Prelude.Maybe Prelude.Text)
snapshotRecycleBinInfo_volumeId :: Lens' SnapshotRecycleBinInfo (Maybe Text)
snapshotRecycleBinInfo_volumeId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SnapshotRecycleBinInfo' {Maybe Text
volumeId :: Maybe Text
$sel:volumeId:SnapshotRecycleBinInfo' :: SnapshotRecycleBinInfo -> Maybe Text
volumeId} -> Maybe Text
volumeId) (\s :: SnapshotRecycleBinInfo
s@SnapshotRecycleBinInfo' {} Maybe Text
a -> SnapshotRecycleBinInfo
s {$sel:volumeId:SnapshotRecycleBinInfo' :: Maybe Text
volumeId = Maybe Text
a} :: SnapshotRecycleBinInfo)
instance Data.FromXML SnapshotRecycleBinInfo where
parseXML :: [Node] -> Either String SnapshotRecycleBinInfo
parseXML [Node]
x =
Maybe Text
-> Maybe ISO8601
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> SnapshotRecycleBinInfo
SnapshotRecycleBinInfo'
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
"description")
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
"recycleBinEnterTime")
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
"recycleBinExitTime")
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
"snapshotId")
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
"volumeId")
instance Prelude.Hashable SnapshotRecycleBinInfo where
hashWithSalt :: Int -> SnapshotRecycleBinInfo -> Int
hashWithSalt Int
_salt SnapshotRecycleBinInfo' {Maybe Text
Maybe ISO8601
volumeId :: Maybe Text
snapshotId :: Maybe Text
recycleBinExitTime :: Maybe ISO8601
recycleBinEnterTime :: Maybe ISO8601
description :: Maybe Text
$sel:volumeId:SnapshotRecycleBinInfo' :: SnapshotRecycleBinInfo -> Maybe Text
$sel:snapshotId:SnapshotRecycleBinInfo' :: SnapshotRecycleBinInfo -> Maybe Text
$sel:recycleBinExitTime:SnapshotRecycleBinInfo' :: SnapshotRecycleBinInfo -> Maybe ISO8601
$sel:recycleBinEnterTime:SnapshotRecycleBinInfo' :: SnapshotRecycleBinInfo -> Maybe ISO8601
$sel:description:SnapshotRecycleBinInfo' :: SnapshotRecycleBinInfo -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
recycleBinEnterTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
recycleBinExitTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
snapshotId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
volumeId
instance Prelude.NFData SnapshotRecycleBinInfo where
rnf :: SnapshotRecycleBinInfo -> ()
rnf SnapshotRecycleBinInfo' {Maybe Text
Maybe ISO8601
volumeId :: Maybe Text
snapshotId :: Maybe Text
recycleBinExitTime :: Maybe ISO8601
recycleBinEnterTime :: Maybe ISO8601
description :: Maybe Text
$sel:volumeId:SnapshotRecycleBinInfo' :: SnapshotRecycleBinInfo -> Maybe Text
$sel:snapshotId:SnapshotRecycleBinInfo' :: SnapshotRecycleBinInfo -> Maybe Text
$sel:recycleBinExitTime:SnapshotRecycleBinInfo' :: SnapshotRecycleBinInfo -> Maybe ISO8601
$sel:recycleBinEnterTime:SnapshotRecycleBinInfo' :: SnapshotRecycleBinInfo -> Maybe ISO8601
$sel:description:SnapshotRecycleBinInfo' :: SnapshotRecycleBinInfo -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
recycleBinEnterTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
recycleBinExitTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
snapshotId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
volumeId