{-# 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.OpsWorks.Types.VolumeConfiguration
-- 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.OpsWorks.Types.VolumeConfiguration where

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

-- | Describes an Amazon EBS volume configuration.
--
-- /See:/ 'newVolumeConfiguration' smart constructor.
data VolumeConfiguration = VolumeConfiguration'
  { -- | For PIOPS volumes, the IOPS per disk.
    VolumeConfiguration -> Maybe Int
iops :: Prelude.Maybe Prelude.Int,
    -- | The volume
    -- <http://en.wikipedia.org/wiki/Standard_RAID_levels RAID level>.
    VolumeConfiguration -> Maybe Int
raidLevel :: Prelude.Maybe Prelude.Int,
    -- | Specifies whether an Amazon EBS volume is encrypted. For more
    -- information, see
    -- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html Amazon EBS Encryption>.
    VolumeConfiguration -> Maybe Bool
encrypted :: Prelude.Maybe Prelude.Bool,
    -- | The volume type. For more information, see
    -- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html Amazon EBS Volume Types>.
    --
    -- -   @standard@ - Magnetic. Magnetic volumes must have a minimum size of
    --     1 GiB and a maximum size of 1024 GiB.
    --
    -- -   @io1@ - Provisioned IOPS (SSD). PIOPS volumes must have a minimum
    --     size of 4 GiB and a maximum size of 16384 GiB.
    --
    -- -   @gp2@ - General Purpose (SSD). General purpose volumes must have a
    --     minimum size of 1 GiB and a maximum size of 16384 GiB.
    --
    -- -   @st1@ - Throughput Optimized hard disk drive (HDD). Throughput
    --     optimized HDD volumes must have a minimum size of 500 GiB and a
    --     maximum size of 16384 GiB.
    --
    -- -   @sc1@ - Cold HDD. Cold HDD volumes must have a minimum size of 500
    --     GiB and a maximum size of 16384 GiB.
    VolumeConfiguration -> Maybe Text
volumeType :: Prelude.Maybe Prelude.Text,
    -- | The volume mount point. For example \"\/dev\/sdh\".
    VolumeConfiguration -> Text
mountPoint :: Prelude.Text,
    -- | The number of disks in the volume.
    VolumeConfiguration -> Int
numberOfDisks :: Prelude.Int,
    -- | The volume size.
    VolumeConfiguration -> Int
size :: Prelude.Int
  }
  deriving (VolumeConfiguration -> VolumeConfiguration -> Bool
(VolumeConfiguration -> VolumeConfiguration -> Bool)
-> (VolumeConfiguration -> VolumeConfiguration -> Bool)
-> Eq VolumeConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VolumeConfiguration -> VolumeConfiguration -> Bool
$c/= :: VolumeConfiguration -> VolumeConfiguration -> Bool
== :: VolumeConfiguration -> VolumeConfiguration -> Bool
$c== :: VolumeConfiguration -> VolumeConfiguration -> Bool
Prelude.Eq, ReadPrec [VolumeConfiguration]
ReadPrec VolumeConfiguration
Int -> ReadS VolumeConfiguration
ReadS [VolumeConfiguration]
(Int -> ReadS VolumeConfiguration)
-> ReadS [VolumeConfiguration]
-> ReadPrec VolumeConfiguration
-> ReadPrec [VolumeConfiguration]
-> Read VolumeConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VolumeConfiguration]
$creadListPrec :: ReadPrec [VolumeConfiguration]
readPrec :: ReadPrec VolumeConfiguration
$creadPrec :: ReadPrec VolumeConfiguration
readList :: ReadS [VolumeConfiguration]
$creadList :: ReadS [VolumeConfiguration]
readsPrec :: Int -> ReadS VolumeConfiguration
$creadsPrec :: Int -> ReadS VolumeConfiguration
Prelude.Read, Int -> VolumeConfiguration -> ShowS
[VolumeConfiguration] -> ShowS
VolumeConfiguration -> String
(Int -> VolumeConfiguration -> ShowS)
-> (VolumeConfiguration -> String)
-> ([VolumeConfiguration] -> ShowS)
-> Show VolumeConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VolumeConfiguration] -> ShowS
$cshowList :: [VolumeConfiguration] -> ShowS
show :: VolumeConfiguration -> String
$cshow :: VolumeConfiguration -> String
showsPrec :: Int -> VolumeConfiguration -> ShowS
$cshowsPrec :: Int -> VolumeConfiguration -> ShowS
Prelude.Show, (forall x. VolumeConfiguration -> Rep VolumeConfiguration x)
-> (forall x. Rep VolumeConfiguration x -> VolumeConfiguration)
-> Generic VolumeConfiguration
forall x. Rep VolumeConfiguration x -> VolumeConfiguration
forall x. VolumeConfiguration -> Rep VolumeConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep VolumeConfiguration x -> VolumeConfiguration
$cfrom :: forall x. VolumeConfiguration -> Rep VolumeConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'VolumeConfiguration' 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:
--
-- 'iops', 'volumeConfiguration_iops' - For PIOPS volumes, the IOPS per disk.
--
-- 'raidLevel', 'volumeConfiguration_raidLevel' - The volume
-- <http://en.wikipedia.org/wiki/Standard_RAID_levels RAID level>.
--
-- 'encrypted', 'volumeConfiguration_encrypted' - Specifies whether an Amazon EBS volume is encrypted. For more
-- information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html Amazon EBS Encryption>.
--
-- 'volumeType', 'volumeConfiguration_volumeType' - The volume type. For more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html Amazon EBS Volume Types>.
--
-- -   @standard@ - Magnetic. Magnetic volumes must have a minimum size of
--     1 GiB and a maximum size of 1024 GiB.
--
-- -   @io1@ - Provisioned IOPS (SSD). PIOPS volumes must have a minimum
--     size of 4 GiB and a maximum size of 16384 GiB.
--
-- -   @gp2@ - General Purpose (SSD). General purpose volumes must have a
--     minimum size of 1 GiB and a maximum size of 16384 GiB.
--
-- -   @st1@ - Throughput Optimized hard disk drive (HDD). Throughput
--     optimized HDD volumes must have a minimum size of 500 GiB and a
--     maximum size of 16384 GiB.
--
-- -   @sc1@ - Cold HDD. Cold HDD volumes must have a minimum size of 500
--     GiB and a maximum size of 16384 GiB.
--
-- 'mountPoint', 'volumeConfiguration_mountPoint' - The volume mount point. For example \"\/dev\/sdh\".
--
-- 'numberOfDisks', 'volumeConfiguration_numberOfDisks' - The number of disks in the volume.
--
-- 'size', 'volumeConfiguration_size' - The volume size.
newVolumeConfiguration ::
  -- | 'mountPoint'
  Prelude.Text ->
  -- | 'numberOfDisks'
  Prelude.Int ->
  -- | 'size'
  Prelude.Int ->
  VolumeConfiguration
newVolumeConfiguration :: Text -> Int -> Int -> VolumeConfiguration
newVolumeConfiguration
  Text
pMountPoint_
  Int
pNumberOfDisks_
  Int
pSize_ =
    VolumeConfiguration' :: Maybe Int
-> Maybe Int
-> Maybe Bool
-> Maybe Text
-> Text
-> Int
-> Int
-> VolumeConfiguration
VolumeConfiguration'
      { $sel:iops:VolumeConfiguration' :: Maybe Int
iops = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:raidLevel:VolumeConfiguration' :: Maybe Int
raidLevel = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:encrypted:VolumeConfiguration' :: Maybe Bool
encrypted = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:volumeType:VolumeConfiguration' :: Maybe Text
volumeType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:mountPoint:VolumeConfiguration' :: Text
mountPoint = Text
pMountPoint_,
        $sel:numberOfDisks:VolumeConfiguration' :: Int
numberOfDisks = Int
pNumberOfDisks_,
        $sel:size:VolumeConfiguration' :: Int
size = Int
pSize_
      }

-- | For PIOPS volumes, the IOPS per disk.
volumeConfiguration_iops :: Lens.Lens' VolumeConfiguration (Prelude.Maybe Prelude.Int)
volumeConfiguration_iops :: (Maybe Int -> f (Maybe Int))
-> VolumeConfiguration -> f VolumeConfiguration
volumeConfiguration_iops = (VolumeConfiguration -> Maybe Int)
-> (VolumeConfiguration -> Maybe Int -> VolumeConfiguration)
-> Lens
     VolumeConfiguration VolumeConfiguration (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VolumeConfiguration' {Maybe Int
iops :: Maybe Int
$sel:iops:VolumeConfiguration' :: VolumeConfiguration -> Maybe Int
iops} -> Maybe Int
iops) (\s :: VolumeConfiguration
s@VolumeConfiguration' {} Maybe Int
a -> VolumeConfiguration
s {$sel:iops:VolumeConfiguration' :: Maybe Int
iops = Maybe Int
a} :: VolumeConfiguration)

-- | The volume
-- <http://en.wikipedia.org/wiki/Standard_RAID_levels RAID level>.
volumeConfiguration_raidLevel :: Lens.Lens' VolumeConfiguration (Prelude.Maybe Prelude.Int)
volumeConfiguration_raidLevel :: (Maybe Int -> f (Maybe Int))
-> VolumeConfiguration -> f VolumeConfiguration
volumeConfiguration_raidLevel = (VolumeConfiguration -> Maybe Int)
-> (VolumeConfiguration -> Maybe Int -> VolumeConfiguration)
-> Lens
     VolumeConfiguration VolumeConfiguration (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VolumeConfiguration' {Maybe Int
raidLevel :: Maybe Int
$sel:raidLevel:VolumeConfiguration' :: VolumeConfiguration -> Maybe Int
raidLevel} -> Maybe Int
raidLevel) (\s :: VolumeConfiguration
s@VolumeConfiguration' {} Maybe Int
a -> VolumeConfiguration
s {$sel:raidLevel:VolumeConfiguration' :: Maybe Int
raidLevel = Maybe Int
a} :: VolumeConfiguration)

-- | Specifies whether an Amazon EBS volume is encrypted. For more
-- information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html Amazon EBS Encryption>.
volumeConfiguration_encrypted :: Lens.Lens' VolumeConfiguration (Prelude.Maybe Prelude.Bool)
volumeConfiguration_encrypted :: (Maybe Bool -> f (Maybe Bool))
-> VolumeConfiguration -> f VolumeConfiguration
volumeConfiguration_encrypted = (VolumeConfiguration -> Maybe Bool)
-> (VolumeConfiguration -> Maybe Bool -> VolumeConfiguration)
-> Lens
     VolumeConfiguration VolumeConfiguration (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VolumeConfiguration' {Maybe Bool
encrypted :: Maybe Bool
$sel:encrypted:VolumeConfiguration' :: VolumeConfiguration -> Maybe Bool
encrypted} -> Maybe Bool
encrypted) (\s :: VolumeConfiguration
s@VolumeConfiguration' {} Maybe Bool
a -> VolumeConfiguration
s {$sel:encrypted:VolumeConfiguration' :: Maybe Bool
encrypted = Maybe Bool
a} :: VolumeConfiguration)

-- | The volume type. For more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html Amazon EBS Volume Types>.
--
-- -   @standard@ - Magnetic. Magnetic volumes must have a minimum size of
--     1 GiB and a maximum size of 1024 GiB.
--
-- -   @io1@ - Provisioned IOPS (SSD). PIOPS volumes must have a minimum
--     size of 4 GiB and a maximum size of 16384 GiB.
--
-- -   @gp2@ - General Purpose (SSD). General purpose volumes must have a
--     minimum size of 1 GiB and a maximum size of 16384 GiB.
--
-- -   @st1@ - Throughput Optimized hard disk drive (HDD). Throughput
--     optimized HDD volumes must have a minimum size of 500 GiB and a
--     maximum size of 16384 GiB.
--
-- -   @sc1@ - Cold HDD. Cold HDD volumes must have a minimum size of 500
--     GiB and a maximum size of 16384 GiB.
volumeConfiguration_volumeType :: Lens.Lens' VolumeConfiguration (Prelude.Maybe Prelude.Text)
volumeConfiguration_volumeType :: (Maybe Text -> f (Maybe Text))
-> VolumeConfiguration -> f VolumeConfiguration
volumeConfiguration_volumeType = (VolumeConfiguration -> Maybe Text)
-> (VolumeConfiguration -> Maybe Text -> VolumeConfiguration)
-> Lens
     VolumeConfiguration VolumeConfiguration (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VolumeConfiguration' {Maybe Text
volumeType :: Maybe Text
$sel:volumeType:VolumeConfiguration' :: VolumeConfiguration -> Maybe Text
volumeType} -> Maybe Text
volumeType) (\s :: VolumeConfiguration
s@VolumeConfiguration' {} Maybe Text
a -> VolumeConfiguration
s {$sel:volumeType:VolumeConfiguration' :: Maybe Text
volumeType = Maybe Text
a} :: VolumeConfiguration)

-- | The volume mount point. For example \"\/dev\/sdh\".
volumeConfiguration_mountPoint :: Lens.Lens' VolumeConfiguration Prelude.Text
volumeConfiguration_mountPoint :: (Text -> f Text) -> VolumeConfiguration -> f VolumeConfiguration
volumeConfiguration_mountPoint = (VolumeConfiguration -> Text)
-> (VolumeConfiguration -> Text -> VolumeConfiguration)
-> Lens VolumeConfiguration VolumeConfiguration Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VolumeConfiguration' {Text
mountPoint :: Text
$sel:mountPoint:VolumeConfiguration' :: VolumeConfiguration -> Text
mountPoint} -> Text
mountPoint) (\s :: VolumeConfiguration
s@VolumeConfiguration' {} Text
a -> VolumeConfiguration
s {$sel:mountPoint:VolumeConfiguration' :: Text
mountPoint = Text
a} :: VolumeConfiguration)

-- | The number of disks in the volume.
volumeConfiguration_numberOfDisks :: Lens.Lens' VolumeConfiguration Prelude.Int
volumeConfiguration_numberOfDisks :: (Int -> f Int) -> VolumeConfiguration -> f VolumeConfiguration
volumeConfiguration_numberOfDisks = (VolumeConfiguration -> Int)
-> (VolumeConfiguration -> Int -> VolumeConfiguration)
-> Lens VolumeConfiguration VolumeConfiguration Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VolumeConfiguration' {Int
numberOfDisks :: Int
$sel:numberOfDisks:VolumeConfiguration' :: VolumeConfiguration -> Int
numberOfDisks} -> Int
numberOfDisks) (\s :: VolumeConfiguration
s@VolumeConfiguration' {} Int
a -> VolumeConfiguration
s {$sel:numberOfDisks:VolumeConfiguration' :: Int
numberOfDisks = Int
a} :: VolumeConfiguration)

-- | The volume size.
volumeConfiguration_size :: Lens.Lens' VolumeConfiguration Prelude.Int
volumeConfiguration_size :: (Int -> f Int) -> VolumeConfiguration -> f VolumeConfiguration
volumeConfiguration_size = (VolumeConfiguration -> Int)
-> (VolumeConfiguration -> Int -> VolumeConfiguration)
-> Lens VolumeConfiguration VolumeConfiguration Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VolumeConfiguration' {Int
size :: Int
$sel:size:VolumeConfiguration' :: VolumeConfiguration -> Int
size} -> Int
size) (\s :: VolumeConfiguration
s@VolumeConfiguration' {} Int
a -> VolumeConfiguration
s {$sel:size:VolumeConfiguration' :: Int
size = Int
a} :: VolumeConfiguration)

instance Core.FromJSON VolumeConfiguration where
  parseJSON :: Value -> Parser VolumeConfiguration
parseJSON =
    String
-> (Object -> Parser VolumeConfiguration)
-> Value
-> Parser VolumeConfiguration
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"VolumeConfiguration"
      ( \Object
x ->
          Maybe Int
-> Maybe Int
-> Maybe Bool
-> Maybe Text
-> Text
-> Int
-> Int
-> VolumeConfiguration
VolumeConfiguration'
            (Maybe Int
 -> Maybe Int
 -> Maybe Bool
 -> Maybe Text
 -> Text
 -> Int
 -> Int
 -> VolumeConfiguration)
-> Parser (Maybe Int)
-> Parser
     (Maybe Int
      -> Maybe Bool
      -> Maybe Text
      -> Text
      -> Int
      -> Int
      -> VolumeConfiguration)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Iops")
            Parser
  (Maybe Int
   -> Maybe Bool
   -> Maybe Text
   -> Text
   -> Int
   -> Int
   -> VolumeConfiguration)
-> Parser (Maybe Int)
-> Parser
     (Maybe Bool
      -> Maybe Text -> Text -> Int -> Int -> VolumeConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RaidLevel")
            Parser
  (Maybe Bool
   -> Maybe Text -> Text -> Int -> Int -> VolumeConfiguration)
-> Parser (Maybe Bool)
-> Parser (Maybe Text -> Text -> Int -> Int -> VolumeConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Encrypted")
            Parser (Maybe Text -> Text -> Int -> Int -> VolumeConfiguration)
-> Parser (Maybe Text)
-> Parser (Text -> Int -> Int -> VolumeConfiguration)
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
"VolumeType")
            Parser (Text -> Int -> Int -> VolumeConfiguration)
-> Parser Text -> Parser (Int -> Int -> VolumeConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"MountPoint")
            Parser (Int -> Int -> VolumeConfiguration)
-> Parser Int -> Parser (Int -> VolumeConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Int
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"NumberOfDisks")
            Parser (Int -> VolumeConfiguration)
-> Parser Int -> Parser VolumeConfiguration
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Int
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Size")
      )

instance Prelude.Hashable VolumeConfiguration

instance Prelude.NFData VolumeConfiguration

instance Core.ToJSON VolumeConfiguration where
  toJSON :: VolumeConfiguration -> Value
toJSON VolumeConfiguration' {Int
Maybe Bool
Maybe Int
Maybe Text
Text
size :: Int
numberOfDisks :: Int
mountPoint :: Text
volumeType :: Maybe Text
encrypted :: Maybe Bool
raidLevel :: Maybe Int
iops :: Maybe Int
$sel:size:VolumeConfiguration' :: VolumeConfiguration -> Int
$sel:numberOfDisks:VolumeConfiguration' :: VolumeConfiguration -> Int
$sel:mountPoint:VolumeConfiguration' :: VolumeConfiguration -> Text
$sel:volumeType:VolumeConfiguration' :: VolumeConfiguration -> Maybe Text
$sel:encrypted:VolumeConfiguration' :: VolumeConfiguration -> Maybe Bool
$sel:raidLevel:VolumeConfiguration' :: VolumeConfiguration -> Maybe Int
$sel:iops:VolumeConfiguration' :: VolumeConfiguration -> Maybe Int
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"Iops" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
iops,
            (Text
"RaidLevel" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
raidLevel,
            (Text
"Encrypted" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
encrypted,
            (Text
"VolumeType" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
volumeType,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"MountPoint" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
mountPoint),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"NumberOfDisks" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Int
numberOfDisks),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Size" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Int
size)
          ]
      )