{-# 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.MGN.Types.DataReplicationInfoReplicatedDisk where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DataReplicationInfoReplicatedDisk = DataReplicationInfoReplicatedDisk'
{
DataReplicationInfoReplicatedDisk -> Maybe Natural
replicatedStorageBytes :: Prelude.Maybe Prelude.Natural,
DataReplicationInfoReplicatedDisk -> Maybe Natural
backloggedStorageBytes :: Prelude.Maybe Prelude.Natural,
DataReplicationInfoReplicatedDisk -> Maybe Text
deviceName :: Prelude.Maybe Prelude.Text,
DataReplicationInfoReplicatedDisk -> Maybe Natural
rescannedStorageBytes :: Prelude.Maybe Prelude.Natural,
DataReplicationInfoReplicatedDisk -> Maybe Natural
totalStorageBytes :: Prelude.Maybe Prelude.Natural
}
deriving (DataReplicationInfoReplicatedDisk
-> DataReplicationInfoReplicatedDisk -> Bool
(DataReplicationInfoReplicatedDisk
-> DataReplicationInfoReplicatedDisk -> Bool)
-> (DataReplicationInfoReplicatedDisk
-> DataReplicationInfoReplicatedDisk -> Bool)
-> Eq DataReplicationInfoReplicatedDisk
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DataReplicationInfoReplicatedDisk
-> DataReplicationInfoReplicatedDisk -> Bool
$c/= :: DataReplicationInfoReplicatedDisk
-> DataReplicationInfoReplicatedDisk -> Bool
== :: DataReplicationInfoReplicatedDisk
-> DataReplicationInfoReplicatedDisk -> Bool
$c== :: DataReplicationInfoReplicatedDisk
-> DataReplicationInfoReplicatedDisk -> Bool
Prelude.Eq, ReadPrec [DataReplicationInfoReplicatedDisk]
ReadPrec DataReplicationInfoReplicatedDisk
Int -> ReadS DataReplicationInfoReplicatedDisk
ReadS [DataReplicationInfoReplicatedDisk]
(Int -> ReadS DataReplicationInfoReplicatedDisk)
-> ReadS [DataReplicationInfoReplicatedDisk]
-> ReadPrec DataReplicationInfoReplicatedDisk
-> ReadPrec [DataReplicationInfoReplicatedDisk]
-> Read DataReplicationInfoReplicatedDisk
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DataReplicationInfoReplicatedDisk]
$creadListPrec :: ReadPrec [DataReplicationInfoReplicatedDisk]
readPrec :: ReadPrec DataReplicationInfoReplicatedDisk
$creadPrec :: ReadPrec DataReplicationInfoReplicatedDisk
readList :: ReadS [DataReplicationInfoReplicatedDisk]
$creadList :: ReadS [DataReplicationInfoReplicatedDisk]
readsPrec :: Int -> ReadS DataReplicationInfoReplicatedDisk
$creadsPrec :: Int -> ReadS DataReplicationInfoReplicatedDisk
Prelude.Read, Int -> DataReplicationInfoReplicatedDisk -> ShowS
[DataReplicationInfoReplicatedDisk] -> ShowS
DataReplicationInfoReplicatedDisk -> String
(Int -> DataReplicationInfoReplicatedDisk -> ShowS)
-> (DataReplicationInfoReplicatedDisk -> String)
-> ([DataReplicationInfoReplicatedDisk] -> ShowS)
-> Show DataReplicationInfoReplicatedDisk
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DataReplicationInfoReplicatedDisk] -> ShowS
$cshowList :: [DataReplicationInfoReplicatedDisk] -> ShowS
show :: DataReplicationInfoReplicatedDisk -> String
$cshow :: DataReplicationInfoReplicatedDisk -> String
showsPrec :: Int -> DataReplicationInfoReplicatedDisk -> ShowS
$cshowsPrec :: Int -> DataReplicationInfoReplicatedDisk -> ShowS
Prelude.Show, (forall x.
DataReplicationInfoReplicatedDisk
-> Rep DataReplicationInfoReplicatedDisk x)
-> (forall x.
Rep DataReplicationInfoReplicatedDisk x
-> DataReplicationInfoReplicatedDisk)
-> Generic DataReplicationInfoReplicatedDisk
forall x.
Rep DataReplicationInfoReplicatedDisk x
-> DataReplicationInfoReplicatedDisk
forall x.
DataReplicationInfoReplicatedDisk
-> Rep DataReplicationInfoReplicatedDisk x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DataReplicationInfoReplicatedDisk x
-> DataReplicationInfoReplicatedDisk
$cfrom :: forall x.
DataReplicationInfoReplicatedDisk
-> Rep DataReplicationInfoReplicatedDisk x
Prelude.Generic)
newDataReplicationInfoReplicatedDisk ::
DataReplicationInfoReplicatedDisk
newDataReplicationInfoReplicatedDisk :: DataReplicationInfoReplicatedDisk
newDataReplicationInfoReplicatedDisk =
DataReplicationInfoReplicatedDisk' :: Maybe Natural
-> Maybe Natural
-> Maybe Text
-> Maybe Natural
-> Maybe Natural
-> DataReplicationInfoReplicatedDisk
DataReplicationInfoReplicatedDisk'
{ $sel:replicatedStorageBytes:DataReplicationInfoReplicatedDisk' :: Maybe Natural
replicatedStorageBytes =
Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:backloggedStorageBytes:DataReplicationInfoReplicatedDisk' :: Maybe Natural
backloggedStorageBytes = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:deviceName:DataReplicationInfoReplicatedDisk' :: Maybe Text
deviceName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:rescannedStorageBytes:DataReplicationInfoReplicatedDisk' :: Maybe Natural
rescannedStorageBytes = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:totalStorageBytes:DataReplicationInfoReplicatedDisk' :: Maybe Natural
totalStorageBytes = Maybe Natural
forall a. Maybe a
Prelude.Nothing
}
dataReplicationInfoReplicatedDisk_replicatedStorageBytes :: Lens.Lens' DataReplicationInfoReplicatedDisk (Prelude.Maybe Prelude.Natural)
dataReplicationInfoReplicatedDisk_replicatedStorageBytes :: (Maybe Natural -> f (Maybe Natural))
-> DataReplicationInfoReplicatedDisk
-> f DataReplicationInfoReplicatedDisk
dataReplicationInfoReplicatedDisk_replicatedStorageBytes = (DataReplicationInfoReplicatedDisk -> Maybe Natural)
-> (DataReplicationInfoReplicatedDisk
-> Maybe Natural -> DataReplicationInfoReplicatedDisk)
-> Lens
DataReplicationInfoReplicatedDisk
DataReplicationInfoReplicatedDisk
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataReplicationInfoReplicatedDisk' {Maybe Natural
replicatedStorageBytes :: Maybe Natural
$sel:replicatedStorageBytes:DataReplicationInfoReplicatedDisk' :: DataReplicationInfoReplicatedDisk -> Maybe Natural
replicatedStorageBytes} -> Maybe Natural
replicatedStorageBytes) (\s :: DataReplicationInfoReplicatedDisk
s@DataReplicationInfoReplicatedDisk' {} Maybe Natural
a -> DataReplicationInfoReplicatedDisk
s {$sel:replicatedStorageBytes:DataReplicationInfoReplicatedDisk' :: Maybe Natural
replicatedStorageBytes = Maybe Natural
a} :: DataReplicationInfoReplicatedDisk)
dataReplicationInfoReplicatedDisk_backloggedStorageBytes :: Lens.Lens' DataReplicationInfoReplicatedDisk (Prelude.Maybe Prelude.Natural)
dataReplicationInfoReplicatedDisk_backloggedStorageBytes :: (Maybe Natural -> f (Maybe Natural))
-> DataReplicationInfoReplicatedDisk
-> f DataReplicationInfoReplicatedDisk
dataReplicationInfoReplicatedDisk_backloggedStorageBytes = (DataReplicationInfoReplicatedDisk -> Maybe Natural)
-> (DataReplicationInfoReplicatedDisk
-> Maybe Natural -> DataReplicationInfoReplicatedDisk)
-> Lens
DataReplicationInfoReplicatedDisk
DataReplicationInfoReplicatedDisk
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataReplicationInfoReplicatedDisk' {Maybe Natural
backloggedStorageBytes :: Maybe Natural
$sel:backloggedStorageBytes:DataReplicationInfoReplicatedDisk' :: DataReplicationInfoReplicatedDisk -> Maybe Natural
backloggedStorageBytes} -> Maybe Natural
backloggedStorageBytes) (\s :: DataReplicationInfoReplicatedDisk
s@DataReplicationInfoReplicatedDisk' {} Maybe Natural
a -> DataReplicationInfoReplicatedDisk
s {$sel:backloggedStorageBytes:DataReplicationInfoReplicatedDisk' :: Maybe Natural
backloggedStorageBytes = Maybe Natural
a} :: DataReplicationInfoReplicatedDisk)
dataReplicationInfoReplicatedDisk_deviceName :: Lens.Lens' DataReplicationInfoReplicatedDisk (Prelude.Maybe Prelude.Text)
dataReplicationInfoReplicatedDisk_deviceName :: (Maybe Text -> f (Maybe Text))
-> DataReplicationInfoReplicatedDisk
-> f DataReplicationInfoReplicatedDisk
dataReplicationInfoReplicatedDisk_deviceName = (DataReplicationInfoReplicatedDisk -> Maybe Text)
-> (DataReplicationInfoReplicatedDisk
-> Maybe Text -> DataReplicationInfoReplicatedDisk)
-> Lens
DataReplicationInfoReplicatedDisk
DataReplicationInfoReplicatedDisk
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataReplicationInfoReplicatedDisk' {Maybe Text
deviceName :: Maybe Text
$sel:deviceName:DataReplicationInfoReplicatedDisk' :: DataReplicationInfoReplicatedDisk -> Maybe Text
deviceName} -> Maybe Text
deviceName) (\s :: DataReplicationInfoReplicatedDisk
s@DataReplicationInfoReplicatedDisk' {} Maybe Text
a -> DataReplicationInfoReplicatedDisk
s {$sel:deviceName:DataReplicationInfoReplicatedDisk' :: Maybe Text
deviceName = Maybe Text
a} :: DataReplicationInfoReplicatedDisk)
dataReplicationInfoReplicatedDisk_rescannedStorageBytes :: Lens.Lens' DataReplicationInfoReplicatedDisk (Prelude.Maybe Prelude.Natural)
dataReplicationInfoReplicatedDisk_rescannedStorageBytes :: (Maybe Natural -> f (Maybe Natural))
-> DataReplicationInfoReplicatedDisk
-> f DataReplicationInfoReplicatedDisk
dataReplicationInfoReplicatedDisk_rescannedStorageBytes = (DataReplicationInfoReplicatedDisk -> Maybe Natural)
-> (DataReplicationInfoReplicatedDisk
-> Maybe Natural -> DataReplicationInfoReplicatedDisk)
-> Lens
DataReplicationInfoReplicatedDisk
DataReplicationInfoReplicatedDisk
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataReplicationInfoReplicatedDisk' {Maybe Natural
rescannedStorageBytes :: Maybe Natural
$sel:rescannedStorageBytes:DataReplicationInfoReplicatedDisk' :: DataReplicationInfoReplicatedDisk -> Maybe Natural
rescannedStorageBytes} -> Maybe Natural
rescannedStorageBytes) (\s :: DataReplicationInfoReplicatedDisk
s@DataReplicationInfoReplicatedDisk' {} Maybe Natural
a -> DataReplicationInfoReplicatedDisk
s {$sel:rescannedStorageBytes:DataReplicationInfoReplicatedDisk' :: Maybe Natural
rescannedStorageBytes = Maybe Natural
a} :: DataReplicationInfoReplicatedDisk)
dataReplicationInfoReplicatedDisk_totalStorageBytes :: Lens.Lens' DataReplicationInfoReplicatedDisk (Prelude.Maybe Prelude.Natural)
dataReplicationInfoReplicatedDisk_totalStorageBytes :: (Maybe Natural -> f (Maybe Natural))
-> DataReplicationInfoReplicatedDisk
-> f DataReplicationInfoReplicatedDisk
dataReplicationInfoReplicatedDisk_totalStorageBytes = (DataReplicationInfoReplicatedDisk -> Maybe Natural)
-> (DataReplicationInfoReplicatedDisk
-> Maybe Natural -> DataReplicationInfoReplicatedDisk)
-> Lens
DataReplicationInfoReplicatedDisk
DataReplicationInfoReplicatedDisk
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataReplicationInfoReplicatedDisk' {Maybe Natural
totalStorageBytes :: Maybe Natural
$sel:totalStorageBytes:DataReplicationInfoReplicatedDisk' :: DataReplicationInfoReplicatedDisk -> Maybe Natural
totalStorageBytes} -> Maybe Natural
totalStorageBytes) (\s :: DataReplicationInfoReplicatedDisk
s@DataReplicationInfoReplicatedDisk' {} Maybe Natural
a -> DataReplicationInfoReplicatedDisk
s {$sel:totalStorageBytes:DataReplicationInfoReplicatedDisk' :: Maybe Natural
totalStorageBytes = Maybe Natural
a} :: DataReplicationInfoReplicatedDisk)
instance
Core.FromJSON
DataReplicationInfoReplicatedDisk
where
parseJSON :: Value -> Parser DataReplicationInfoReplicatedDisk
parseJSON =
String
-> (Object -> Parser DataReplicationInfoReplicatedDisk)
-> Value
-> Parser DataReplicationInfoReplicatedDisk
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DataReplicationInfoReplicatedDisk"
( \Object
x ->
Maybe Natural
-> Maybe Natural
-> Maybe Text
-> Maybe Natural
-> Maybe Natural
-> DataReplicationInfoReplicatedDisk
DataReplicationInfoReplicatedDisk'
(Maybe Natural
-> Maybe Natural
-> Maybe Text
-> Maybe Natural
-> Maybe Natural
-> DataReplicationInfoReplicatedDisk)
-> Parser (Maybe Natural)
-> Parser
(Maybe Natural
-> Maybe Text
-> Maybe Natural
-> Maybe Natural
-> DataReplicationInfoReplicatedDisk)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"replicatedStorageBytes")
Parser
(Maybe Natural
-> Maybe Text
-> Maybe Natural
-> Maybe Natural
-> DataReplicationInfoReplicatedDisk)
-> Parser (Maybe Natural)
-> Parser
(Maybe Text
-> Maybe Natural
-> Maybe Natural
-> DataReplicationInfoReplicatedDisk)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"backloggedStorageBytes")
Parser
(Maybe Text
-> Maybe Natural
-> Maybe Natural
-> DataReplicationInfoReplicatedDisk)
-> Parser (Maybe Text)
-> Parser
(Maybe Natural
-> Maybe Natural -> DataReplicationInfoReplicatedDisk)
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
"deviceName")
Parser
(Maybe Natural
-> Maybe Natural -> DataReplicationInfoReplicatedDisk)
-> Parser (Maybe Natural)
-> Parser (Maybe Natural -> DataReplicationInfoReplicatedDisk)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"rescannedStorageBytes")
Parser (Maybe Natural -> DataReplicationInfoReplicatedDisk)
-> Parser (Maybe Natural)
-> Parser DataReplicationInfoReplicatedDisk
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"totalStorageBytes")
)
instance
Prelude.Hashable
DataReplicationInfoReplicatedDisk
instance
Prelude.NFData
DataReplicationInfoReplicatedDisk