{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.MGN.Types.DataReplicationInfoReplicatedDisk
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.MGN.Types.DataReplicationInfoReplicatedDisk where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Request to query disks replicated.
--
-- /See:/ 'newDataReplicationInfoReplicatedDisk' smart constructor.
data DataReplicationInfoReplicatedDisk = DataReplicationInfoReplicatedDisk'
  { -- | Request to query amount of data replicated in bytes.
    DataReplicationInfoReplicatedDisk -> Maybe Natural
replicatedStorageBytes :: Prelude.Maybe Prelude.Natural,
    -- | Request to query data replication backlog size in bytes.
    DataReplicationInfoReplicatedDisk -> Maybe Natural
backloggedStorageBytes :: Prelude.Maybe Prelude.Natural,
    -- | Request to query device name.
    DataReplicationInfoReplicatedDisk -> Maybe Text
deviceName :: Prelude.Maybe Prelude.Text,
    -- | Request to query amount of data rescanned in bytes.
    DataReplicationInfoReplicatedDisk -> Maybe Natural
rescannedStorageBytes :: Prelude.Maybe Prelude.Natural,
    -- | Request to query total amount of data replicated in bytes.
    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)

-- |
-- Create a value of 'DataReplicationInfoReplicatedDisk' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'replicatedStorageBytes', 'dataReplicationInfoReplicatedDisk_replicatedStorageBytes' - Request to query amount of data replicated in bytes.
--
-- 'backloggedStorageBytes', 'dataReplicationInfoReplicatedDisk_backloggedStorageBytes' - Request to query data replication backlog size in bytes.
--
-- 'deviceName', 'dataReplicationInfoReplicatedDisk_deviceName' - Request to query device name.
--
-- 'rescannedStorageBytes', 'dataReplicationInfoReplicatedDisk_rescannedStorageBytes' - Request to query amount of data rescanned in bytes.
--
-- 'totalStorageBytes', 'dataReplicationInfoReplicatedDisk_totalStorageBytes' - Request to query total amount of data replicated in bytes.
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
    }

-- | Request to query amount of data replicated in bytes.
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)

-- | Request to query data replication backlog size in bytes.
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)

-- | Request to query device name.
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)

-- | Request to query amount of data rescanned in bytes.
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)

-- | Request to query total amount of data replicated in bytes.
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