{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data DataReplicationInfoReplicatedDisk = DataReplicationInfoReplicatedDisk'
{
DataReplicationInfoReplicatedDisk -> Maybe Natural
backloggedStorageBytes :: Prelude.Maybe Prelude.Natural,
DataReplicationInfoReplicatedDisk -> Maybe Text
deviceName :: Prelude.Maybe Prelude.Text,
DataReplicationInfoReplicatedDisk -> Maybe Natural
replicatedStorageBytes :: Prelude.Maybe Prelude.Natural,
DataReplicationInfoReplicatedDisk -> Maybe Natural
rescannedStorageBytes :: Prelude.Maybe Prelude.Natural,
DataReplicationInfoReplicatedDisk -> Maybe Natural
totalStorageBytes :: Prelude.Maybe Prelude.Natural
}
deriving (DataReplicationInfoReplicatedDisk
-> DataReplicationInfoReplicatedDisk -> Bool
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]
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
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.
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'
{ $sel:backloggedStorageBytes:DataReplicationInfoReplicatedDisk' :: Maybe Natural
backloggedStorageBytes =
forall a. Maybe a
Prelude.Nothing,
$sel:deviceName:DataReplicationInfoReplicatedDisk' :: Maybe Text
deviceName = forall a. Maybe a
Prelude.Nothing,
$sel:replicatedStorageBytes:DataReplicationInfoReplicatedDisk' :: Maybe Natural
replicatedStorageBytes = forall a. Maybe a
Prelude.Nothing,
$sel:rescannedStorageBytes:DataReplicationInfoReplicatedDisk' :: Maybe Natural
rescannedStorageBytes = forall a. Maybe a
Prelude.Nothing,
$sel:totalStorageBytes:DataReplicationInfoReplicatedDisk' :: Maybe Natural
totalStorageBytes = forall a. Maybe a
Prelude.Nothing
}
dataReplicationInfoReplicatedDisk_backloggedStorageBytes :: Lens.Lens' DataReplicationInfoReplicatedDisk (Prelude.Maybe Prelude.Natural)
dataReplicationInfoReplicatedDisk_backloggedStorageBytes :: Lens' DataReplicationInfoReplicatedDisk (Maybe Natural)
dataReplicationInfoReplicatedDisk_backloggedStorageBytes = 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 :: Lens' DataReplicationInfoReplicatedDisk (Maybe Text)
dataReplicationInfoReplicatedDisk_deviceName = 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_replicatedStorageBytes :: Lens.Lens' DataReplicationInfoReplicatedDisk (Prelude.Maybe Prelude.Natural)
dataReplicationInfoReplicatedDisk_replicatedStorageBytes :: Lens' DataReplicationInfoReplicatedDisk (Maybe Natural)
dataReplicationInfoReplicatedDisk_replicatedStorageBytes = 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_rescannedStorageBytes :: Lens.Lens' DataReplicationInfoReplicatedDisk (Prelude.Maybe Prelude.Natural)
dataReplicationInfoReplicatedDisk_rescannedStorageBytes :: Lens' DataReplicationInfoReplicatedDisk (Maybe Natural)
dataReplicationInfoReplicatedDisk_rescannedStorageBytes = 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 :: Lens' DataReplicationInfoReplicatedDisk (Maybe Natural)
dataReplicationInfoReplicatedDisk_totalStorageBytes = 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
Data.FromJSON
DataReplicationInfoReplicatedDisk
where
parseJSON :: Value -> Parser DataReplicationInfoReplicatedDisk
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"DataReplicationInfoReplicatedDisk"
( \Object
x ->
Maybe Natural
-> Maybe Text
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> DataReplicationInfoReplicatedDisk
DataReplicationInfoReplicatedDisk'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"backloggedStorageBytes")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"deviceName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"replicatedStorageBytes")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"rescannedStorageBytes")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"totalStorageBytes")
)
instance
Prelude.Hashable
DataReplicationInfoReplicatedDisk
where
hashWithSalt :: Int -> DataReplicationInfoReplicatedDisk -> Int
hashWithSalt
Int
_salt
DataReplicationInfoReplicatedDisk' {Maybe Natural
Maybe Text
totalStorageBytes :: Maybe Natural
rescannedStorageBytes :: Maybe Natural
replicatedStorageBytes :: Maybe Natural
deviceName :: Maybe Text
backloggedStorageBytes :: Maybe Natural
$sel:totalStorageBytes:DataReplicationInfoReplicatedDisk' :: DataReplicationInfoReplicatedDisk -> Maybe Natural
$sel:rescannedStorageBytes:DataReplicationInfoReplicatedDisk' :: DataReplicationInfoReplicatedDisk -> Maybe Natural
$sel:replicatedStorageBytes:DataReplicationInfoReplicatedDisk' :: DataReplicationInfoReplicatedDisk -> Maybe Natural
$sel:deviceName:DataReplicationInfoReplicatedDisk' :: DataReplicationInfoReplicatedDisk -> Maybe Text
$sel:backloggedStorageBytes:DataReplicationInfoReplicatedDisk' :: DataReplicationInfoReplicatedDisk -> Maybe Natural
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
backloggedStorageBytes
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
deviceName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
replicatedStorageBytes
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
rescannedStorageBytes
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
totalStorageBytes
instance
Prelude.NFData
DataReplicationInfoReplicatedDisk
where
rnf :: DataReplicationInfoReplicatedDisk -> ()
rnf DataReplicationInfoReplicatedDisk' {Maybe Natural
Maybe Text
totalStorageBytes :: Maybe Natural
rescannedStorageBytes :: Maybe Natural
replicatedStorageBytes :: Maybe Natural
deviceName :: Maybe Text
backloggedStorageBytes :: Maybe Natural
$sel:totalStorageBytes:DataReplicationInfoReplicatedDisk' :: DataReplicationInfoReplicatedDisk -> Maybe Natural
$sel:rescannedStorageBytes:DataReplicationInfoReplicatedDisk' :: DataReplicationInfoReplicatedDisk -> Maybe Natural
$sel:replicatedStorageBytes:DataReplicationInfoReplicatedDisk' :: DataReplicationInfoReplicatedDisk -> Maybe Natural
$sel:deviceName:DataReplicationInfoReplicatedDisk' :: DataReplicationInfoReplicatedDisk -> Maybe Text
$sel:backloggedStorageBytes:DataReplicationInfoReplicatedDisk' :: DataReplicationInfoReplicatedDisk -> Maybe Natural
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
backloggedStorageBytes
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
deviceName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
replicatedStorageBytes
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
rescannedStorageBytes
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
totalStorageBytes