{-# 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.StorageGateway.Types.VolumeRecoveryPointInfo where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data VolumeRecoveryPointInfo = VolumeRecoveryPointInfo'
{
VolumeRecoveryPointInfo -> Maybe Text
volumeRecoveryPointTime :: Prelude.Maybe Prelude.Text,
VolumeRecoveryPointInfo -> Maybe Text
volumeARN :: Prelude.Maybe Prelude.Text,
VolumeRecoveryPointInfo -> Maybe Integer
volumeSizeInBytes :: Prelude.Maybe Prelude.Integer,
VolumeRecoveryPointInfo -> Maybe Integer
volumeUsageInBytes :: Prelude.Maybe Prelude.Integer
}
deriving (VolumeRecoveryPointInfo -> VolumeRecoveryPointInfo -> Bool
(VolumeRecoveryPointInfo -> VolumeRecoveryPointInfo -> Bool)
-> (VolumeRecoveryPointInfo -> VolumeRecoveryPointInfo -> Bool)
-> Eq VolumeRecoveryPointInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VolumeRecoveryPointInfo -> VolumeRecoveryPointInfo -> Bool
$c/= :: VolumeRecoveryPointInfo -> VolumeRecoveryPointInfo -> Bool
== :: VolumeRecoveryPointInfo -> VolumeRecoveryPointInfo -> Bool
$c== :: VolumeRecoveryPointInfo -> VolumeRecoveryPointInfo -> Bool
Prelude.Eq, ReadPrec [VolumeRecoveryPointInfo]
ReadPrec VolumeRecoveryPointInfo
Int -> ReadS VolumeRecoveryPointInfo
ReadS [VolumeRecoveryPointInfo]
(Int -> ReadS VolumeRecoveryPointInfo)
-> ReadS [VolumeRecoveryPointInfo]
-> ReadPrec VolumeRecoveryPointInfo
-> ReadPrec [VolumeRecoveryPointInfo]
-> Read VolumeRecoveryPointInfo
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VolumeRecoveryPointInfo]
$creadListPrec :: ReadPrec [VolumeRecoveryPointInfo]
readPrec :: ReadPrec VolumeRecoveryPointInfo
$creadPrec :: ReadPrec VolumeRecoveryPointInfo
readList :: ReadS [VolumeRecoveryPointInfo]
$creadList :: ReadS [VolumeRecoveryPointInfo]
readsPrec :: Int -> ReadS VolumeRecoveryPointInfo
$creadsPrec :: Int -> ReadS VolumeRecoveryPointInfo
Prelude.Read, Int -> VolumeRecoveryPointInfo -> ShowS
[VolumeRecoveryPointInfo] -> ShowS
VolumeRecoveryPointInfo -> String
(Int -> VolumeRecoveryPointInfo -> ShowS)
-> (VolumeRecoveryPointInfo -> String)
-> ([VolumeRecoveryPointInfo] -> ShowS)
-> Show VolumeRecoveryPointInfo
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VolumeRecoveryPointInfo] -> ShowS
$cshowList :: [VolumeRecoveryPointInfo] -> ShowS
show :: VolumeRecoveryPointInfo -> String
$cshow :: VolumeRecoveryPointInfo -> String
showsPrec :: Int -> VolumeRecoveryPointInfo -> ShowS
$cshowsPrec :: Int -> VolumeRecoveryPointInfo -> ShowS
Prelude.Show, (forall x.
VolumeRecoveryPointInfo -> Rep VolumeRecoveryPointInfo x)
-> (forall x.
Rep VolumeRecoveryPointInfo x -> VolumeRecoveryPointInfo)
-> Generic VolumeRecoveryPointInfo
forall x. Rep VolumeRecoveryPointInfo x -> VolumeRecoveryPointInfo
forall x. VolumeRecoveryPointInfo -> Rep VolumeRecoveryPointInfo x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep VolumeRecoveryPointInfo x -> VolumeRecoveryPointInfo
$cfrom :: forall x. VolumeRecoveryPointInfo -> Rep VolumeRecoveryPointInfo x
Prelude.Generic)
newVolumeRecoveryPointInfo ::
VolumeRecoveryPointInfo
newVolumeRecoveryPointInfo :: VolumeRecoveryPointInfo
newVolumeRecoveryPointInfo =
VolumeRecoveryPointInfo' :: Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Integer
-> VolumeRecoveryPointInfo
VolumeRecoveryPointInfo'
{ $sel:volumeRecoveryPointTime:VolumeRecoveryPointInfo' :: Maybe Text
volumeRecoveryPointTime =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:volumeARN:VolumeRecoveryPointInfo' :: Maybe Text
volumeARN = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:volumeSizeInBytes:VolumeRecoveryPointInfo' :: Maybe Integer
volumeSizeInBytes = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:volumeUsageInBytes:VolumeRecoveryPointInfo' :: Maybe Integer
volumeUsageInBytes = Maybe Integer
forall a. Maybe a
Prelude.Nothing
}
volumeRecoveryPointInfo_volumeRecoveryPointTime :: Lens.Lens' VolumeRecoveryPointInfo (Prelude.Maybe Prelude.Text)
volumeRecoveryPointInfo_volumeRecoveryPointTime :: (Maybe Text -> f (Maybe Text))
-> VolumeRecoveryPointInfo -> f VolumeRecoveryPointInfo
volumeRecoveryPointInfo_volumeRecoveryPointTime = (VolumeRecoveryPointInfo -> Maybe Text)
-> (VolumeRecoveryPointInfo
-> Maybe Text -> VolumeRecoveryPointInfo)
-> Lens
VolumeRecoveryPointInfo
VolumeRecoveryPointInfo
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VolumeRecoveryPointInfo' {Maybe Text
volumeRecoveryPointTime :: Maybe Text
$sel:volumeRecoveryPointTime:VolumeRecoveryPointInfo' :: VolumeRecoveryPointInfo -> Maybe Text
volumeRecoveryPointTime} -> Maybe Text
volumeRecoveryPointTime) (\s :: VolumeRecoveryPointInfo
s@VolumeRecoveryPointInfo' {} Maybe Text
a -> VolumeRecoveryPointInfo
s {$sel:volumeRecoveryPointTime:VolumeRecoveryPointInfo' :: Maybe Text
volumeRecoveryPointTime = Maybe Text
a} :: VolumeRecoveryPointInfo)
volumeRecoveryPointInfo_volumeARN :: Lens.Lens' VolumeRecoveryPointInfo (Prelude.Maybe Prelude.Text)
volumeRecoveryPointInfo_volumeARN :: (Maybe Text -> f (Maybe Text))
-> VolumeRecoveryPointInfo -> f VolumeRecoveryPointInfo
volumeRecoveryPointInfo_volumeARN = (VolumeRecoveryPointInfo -> Maybe Text)
-> (VolumeRecoveryPointInfo
-> Maybe Text -> VolumeRecoveryPointInfo)
-> Lens
VolumeRecoveryPointInfo
VolumeRecoveryPointInfo
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VolumeRecoveryPointInfo' {Maybe Text
volumeARN :: Maybe Text
$sel:volumeARN:VolumeRecoveryPointInfo' :: VolumeRecoveryPointInfo -> Maybe Text
volumeARN} -> Maybe Text
volumeARN) (\s :: VolumeRecoveryPointInfo
s@VolumeRecoveryPointInfo' {} Maybe Text
a -> VolumeRecoveryPointInfo
s {$sel:volumeARN:VolumeRecoveryPointInfo' :: Maybe Text
volumeARN = Maybe Text
a} :: VolumeRecoveryPointInfo)
volumeRecoveryPointInfo_volumeSizeInBytes :: Lens.Lens' VolumeRecoveryPointInfo (Prelude.Maybe Prelude.Integer)
volumeRecoveryPointInfo_volumeSizeInBytes :: (Maybe Integer -> f (Maybe Integer))
-> VolumeRecoveryPointInfo -> f VolumeRecoveryPointInfo
volumeRecoveryPointInfo_volumeSizeInBytes = (VolumeRecoveryPointInfo -> Maybe Integer)
-> (VolumeRecoveryPointInfo
-> Maybe Integer -> VolumeRecoveryPointInfo)
-> Lens
VolumeRecoveryPointInfo
VolumeRecoveryPointInfo
(Maybe Integer)
(Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VolumeRecoveryPointInfo' {Maybe Integer
volumeSizeInBytes :: Maybe Integer
$sel:volumeSizeInBytes:VolumeRecoveryPointInfo' :: VolumeRecoveryPointInfo -> Maybe Integer
volumeSizeInBytes} -> Maybe Integer
volumeSizeInBytes) (\s :: VolumeRecoveryPointInfo
s@VolumeRecoveryPointInfo' {} Maybe Integer
a -> VolumeRecoveryPointInfo
s {$sel:volumeSizeInBytes:VolumeRecoveryPointInfo' :: Maybe Integer
volumeSizeInBytes = Maybe Integer
a} :: VolumeRecoveryPointInfo)
volumeRecoveryPointInfo_volumeUsageInBytes :: Lens.Lens' VolumeRecoveryPointInfo (Prelude.Maybe Prelude.Integer)
volumeRecoveryPointInfo_volumeUsageInBytes :: (Maybe Integer -> f (Maybe Integer))
-> VolumeRecoveryPointInfo -> f VolumeRecoveryPointInfo
volumeRecoveryPointInfo_volumeUsageInBytes = (VolumeRecoveryPointInfo -> Maybe Integer)
-> (VolumeRecoveryPointInfo
-> Maybe Integer -> VolumeRecoveryPointInfo)
-> Lens
VolumeRecoveryPointInfo
VolumeRecoveryPointInfo
(Maybe Integer)
(Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VolumeRecoveryPointInfo' {Maybe Integer
volumeUsageInBytes :: Maybe Integer
$sel:volumeUsageInBytes:VolumeRecoveryPointInfo' :: VolumeRecoveryPointInfo -> Maybe Integer
volumeUsageInBytes} -> Maybe Integer
volumeUsageInBytes) (\s :: VolumeRecoveryPointInfo
s@VolumeRecoveryPointInfo' {} Maybe Integer
a -> VolumeRecoveryPointInfo
s {$sel:volumeUsageInBytes:VolumeRecoveryPointInfo' :: Maybe Integer
volumeUsageInBytes = Maybe Integer
a} :: VolumeRecoveryPointInfo)
instance Core.FromJSON VolumeRecoveryPointInfo where
parseJSON :: Value -> Parser VolumeRecoveryPointInfo
parseJSON =
String
-> (Object -> Parser VolumeRecoveryPointInfo)
-> Value
-> Parser VolumeRecoveryPointInfo
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"VolumeRecoveryPointInfo"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Integer
-> VolumeRecoveryPointInfo
VolumeRecoveryPointInfo'
(Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Integer
-> VolumeRecoveryPointInfo)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Integer -> Maybe Integer -> VolumeRecoveryPointInfo)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"VolumeRecoveryPointTime")
Parser
(Maybe Text
-> Maybe Integer -> Maybe Integer -> VolumeRecoveryPointInfo)
-> Parser (Maybe Text)
-> Parser
(Maybe Integer -> Maybe Integer -> VolumeRecoveryPointInfo)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"VolumeARN")
Parser (Maybe Integer -> Maybe Integer -> VolumeRecoveryPointInfo)
-> Parser (Maybe Integer)
-> Parser (Maybe Integer -> VolumeRecoveryPointInfo)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"VolumeSizeInBytes")
Parser (Maybe Integer -> VolumeRecoveryPointInfo)
-> Parser (Maybe Integer) -> Parser VolumeRecoveryPointInfo
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"VolumeUsageInBytes")
)
instance Prelude.Hashable VolumeRecoveryPointInfo
instance Prelude.NFData VolumeRecoveryPointInfo