{-# 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.FSx.Types.UpdateOpenZFSVolumeConfiguration
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.FSx.Types.UpdateOpenZFSVolumeConfiguration where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.FSx.Types.OpenZFSDataCompressionType
import Amazonka.FSx.Types.OpenZFSNfsExport
import Amazonka.FSx.Types.OpenZFSUserOrGroupQuota
import qualified Amazonka.Prelude as Prelude

-- | Used to specify changes to the OpenZFS configuration for the volume that
-- you are updating.
--
-- /See:/ 'newUpdateOpenZFSVolumeConfiguration' smart constructor.
data UpdateOpenZFSVolumeConfiguration = UpdateOpenZFSVolumeConfiguration'
  { -- | Specifies the method used to compress the data on the volume. The
    -- compression type is @NONE@ by default.
    --
    -- -   @NONE@ - Doesn\'t compress the data on the volume. @NONE@ is the
    --     default.
    --
    -- -   @ZSTD@ - Compresses the data in the volume using the Zstandard
    --     (ZSTD) compression algorithm. Compared to LZ4, Z-Standard provides a
    --     better compression ratio to minimize on-disk storage utilization.
    --
    -- -   @LZ4@ - Compresses the data in the volume using the LZ4 compression
    --     algorithm. Compared to Z-Standard, LZ4 is less compute-intensive and
    --     delivers higher write throughput speeds.
    UpdateOpenZFSVolumeConfiguration
-> Maybe OpenZFSDataCompressionType
dataCompressionType :: Prelude.Maybe OpenZFSDataCompressionType,
    -- | The configuration object for mounting a Network File System (NFS) file
    -- system.
    UpdateOpenZFSVolumeConfiguration -> Maybe [OpenZFSNfsExport]
nfsExports :: Prelude.Maybe [OpenZFSNfsExport],
    -- | A Boolean value indicating whether the volume is read-only.
    UpdateOpenZFSVolumeConfiguration -> Maybe Bool
readOnly :: Prelude.Maybe Prelude.Bool,
    -- | Specifies the record size of an OpenZFS volume, in kibibytes (KiB).
    -- Valid values are 4, 8, 16, 32, 64, 128, 256, 512, or 1024 KiB. The
    -- default is 128 KiB. Most workloads should use the default record size.
    -- Database workflows can benefit from a smaller record size, while
    -- streaming workflows can benefit from a larger record size. For
    -- additional guidance on when to set a custom record size, see
    -- <https://docs.aws.amazon.com/fsx/latest/OpenZFSGuide/performance.html#performance-tips-zfs Tips for maximizing performance>
    -- in the /Amazon FSx for OpenZFS User Guide/.
    UpdateOpenZFSVolumeConfiguration -> Maybe Natural
recordSizeKiB :: Prelude.Maybe Prelude.Natural,
    -- | The maximum amount of storage in gibibytes (GiB) that the volume can use
    -- from its parent. You can specify a quota larger than the storage on the
    -- parent volume. You can specify a value of @-1@ to unset a volume\'s
    -- storage capacity quota.
    UpdateOpenZFSVolumeConfiguration -> Maybe Int
storageCapacityQuotaGiB :: Prelude.Maybe Prelude.Int,
    -- | The amount of storage in gibibytes (GiB) to reserve from the parent
    -- volume. You can\'t reserve more storage than the parent volume has
    -- reserved. You can specify a value of @-1@ to unset a volume\'s storage
    -- capacity reservation.
    UpdateOpenZFSVolumeConfiguration -> Maybe Int
storageCapacityReservationGiB :: Prelude.Maybe Prelude.Int,
    -- | An object specifying how much storage users or groups can use on the
    -- volume.
    UpdateOpenZFSVolumeConfiguration -> Maybe [OpenZFSUserOrGroupQuota]
userAndGroupQuotas :: Prelude.Maybe [OpenZFSUserOrGroupQuota]
  }
  deriving (UpdateOpenZFSVolumeConfiguration
-> UpdateOpenZFSVolumeConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateOpenZFSVolumeConfiguration
-> UpdateOpenZFSVolumeConfiguration -> Bool
$c/= :: UpdateOpenZFSVolumeConfiguration
-> UpdateOpenZFSVolumeConfiguration -> Bool
== :: UpdateOpenZFSVolumeConfiguration
-> UpdateOpenZFSVolumeConfiguration -> Bool
$c== :: UpdateOpenZFSVolumeConfiguration
-> UpdateOpenZFSVolumeConfiguration -> Bool
Prelude.Eq, ReadPrec [UpdateOpenZFSVolumeConfiguration]
ReadPrec UpdateOpenZFSVolumeConfiguration
Int -> ReadS UpdateOpenZFSVolumeConfiguration
ReadS [UpdateOpenZFSVolumeConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateOpenZFSVolumeConfiguration]
$creadListPrec :: ReadPrec [UpdateOpenZFSVolumeConfiguration]
readPrec :: ReadPrec UpdateOpenZFSVolumeConfiguration
$creadPrec :: ReadPrec UpdateOpenZFSVolumeConfiguration
readList :: ReadS [UpdateOpenZFSVolumeConfiguration]
$creadList :: ReadS [UpdateOpenZFSVolumeConfiguration]
readsPrec :: Int -> ReadS UpdateOpenZFSVolumeConfiguration
$creadsPrec :: Int -> ReadS UpdateOpenZFSVolumeConfiguration
Prelude.Read, Int -> UpdateOpenZFSVolumeConfiguration -> ShowS
[UpdateOpenZFSVolumeConfiguration] -> ShowS
UpdateOpenZFSVolumeConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateOpenZFSVolumeConfiguration] -> ShowS
$cshowList :: [UpdateOpenZFSVolumeConfiguration] -> ShowS
show :: UpdateOpenZFSVolumeConfiguration -> String
$cshow :: UpdateOpenZFSVolumeConfiguration -> String
showsPrec :: Int -> UpdateOpenZFSVolumeConfiguration -> ShowS
$cshowsPrec :: Int -> UpdateOpenZFSVolumeConfiguration -> ShowS
Prelude.Show, forall x.
Rep UpdateOpenZFSVolumeConfiguration x
-> UpdateOpenZFSVolumeConfiguration
forall x.
UpdateOpenZFSVolumeConfiguration
-> Rep UpdateOpenZFSVolumeConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateOpenZFSVolumeConfiguration x
-> UpdateOpenZFSVolumeConfiguration
$cfrom :: forall x.
UpdateOpenZFSVolumeConfiguration
-> Rep UpdateOpenZFSVolumeConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'UpdateOpenZFSVolumeConfiguration' 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:
--
-- 'dataCompressionType', 'updateOpenZFSVolumeConfiguration_dataCompressionType' - Specifies the method used to compress the data on the volume. The
-- compression type is @NONE@ by default.
--
-- -   @NONE@ - Doesn\'t compress the data on the volume. @NONE@ is the
--     default.
--
-- -   @ZSTD@ - Compresses the data in the volume using the Zstandard
--     (ZSTD) compression algorithm. Compared to LZ4, Z-Standard provides a
--     better compression ratio to minimize on-disk storage utilization.
--
-- -   @LZ4@ - Compresses the data in the volume using the LZ4 compression
--     algorithm. Compared to Z-Standard, LZ4 is less compute-intensive and
--     delivers higher write throughput speeds.
--
-- 'nfsExports', 'updateOpenZFSVolumeConfiguration_nfsExports' - The configuration object for mounting a Network File System (NFS) file
-- system.
--
-- 'readOnly', 'updateOpenZFSVolumeConfiguration_readOnly' - A Boolean value indicating whether the volume is read-only.
--
-- 'recordSizeKiB', 'updateOpenZFSVolumeConfiguration_recordSizeKiB' - Specifies the record size of an OpenZFS volume, in kibibytes (KiB).
-- Valid values are 4, 8, 16, 32, 64, 128, 256, 512, or 1024 KiB. The
-- default is 128 KiB. Most workloads should use the default record size.
-- Database workflows can benefit from a smaller record size, while
-- streaming workflows can benefit from a larger record size. For
-- additional guidance on when to set a custom record size, see
-- <https://docs.aws.amazon.com/fsx/latest/OpenZFSGuide/performance.html#performance-tips-zfs Tips for maximizing performance>
-- in the /Amazon FSx for OpenZFS User Guide/.
--
-- 'storageCapacityQuotaGiB', 'updateOpenZFSVolumeConfiguration_storageCapacityQuotaGiB' - The maximum amount of storage in gibibytes (GiB) that the volume can use
-- from its parent. You can specify a quota larger than the storage on the
-- parent volume. You can specify a value of @-1@ to unset a volume\'s
-- storage capacity quota.
--
-- 'storageCapacityReservationGiB', 'updateOpenZFSVolumeConfiguration_storageCapacityReservationGiB' - The amount of storage in gibibytes (GiB) to reserve from the parent
-- volume. You can\'t reserve more storage than the parent volume has
-- reserved. You can specify a value of @-1@ to unset a volume\'s storage
-- capacity reservation.
--
-- 'userAndGroupQuotas', 'updateOpenZFSVolumeConfiguration_userAndGroupQuotas' - An object specifying how much storage users or groups can use on the
-- volume.
newUpdateOpenZFSVolumeConfiguration ::
  UpdateOpenZFSVolumeConfiguration
newUpdateOpenZFSVolumeConfiguration :: UpdateOpenZFSVolumeConfiguration
newUpdateOpenZFSVolumeConfiguration =
  UpdateOpenZFSVolumeConfiguration'
    { $sel:dataCompressionType:UpdateOpenZFSVolumeConfiguration' :: Maybe OpenZFSDataCompressionType
dataCompressionType =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nfsExports:UpdateOpenZFSVolumeConfiguration' :: Maybe [OpenZFSNfsExport]
nfsExports = forall a. Maybe a
Prelude.Nothing,
      $sel:readOnly:UpdateOpenZFSVolumeConfiguration' :: Maybe Bool
readOnly = forall a. Maybe a
Prelude.Nothing,
      $sel:recordSizeKiB:UpdateOpenZFSVolumeConfiguration' :: Maybe Natural
recordSizeKiB = forall a. Maybe a
Prelude.Nothing,
      $sel:storageCapacityQuotaGiB:UpdateOpenZFSVolumeConfiguration' :: Maybe Int
storageCapacityQuotaGiB = forall a. Maybe a
Prelude.Nothing,
      $sel:storageCapacityReservationGiB:UpdateOpenZFSVolumeConfiguration' :: Maybe Int
storageCapacityReservationGiB =
        forall a. Maybe a
Prelude.Nothing,
      $sel:userAndGroupQuotas:UpdateOpenZFSVolumeConfiguration' :: Maybe [OpenZFSUserOrGroupQuota]
userAndGroupQuotas = forall a. Maybe a
Prelude.Nothing
    }

-- | Specifies the method used to compress the data on the volume. The
-- compression type is @NONE@ by default.
--
-- -   @NONE@ - Doesn\'t compress the data on the volume. @NONE@ is the
--     default.
--
-- -   @ZSTD@ - Compresses the data in the volume using the Zstandard
--     (ZSTD) compression algorithm. Compared to LZ4, Z-Standard provides a
--     better compression ratio to minimize on-disk storage utilization.
--
-- -   @LZ4@ - Compresses the data in the volume using the LZ4 compression
--     algorithm. Compared to Z-Standard, LZ4 is less compute-intensive and
--     delivers higher write throughput speeds.
updateOpenZFSVolumeConfiguration_dataCompressionType :: Lens.Lens' UpdateOpenZFSVolumeConfiguration (Prelude.Maybe OpenZFSDataCompressionType)
updateOpenZFSVolumeConfiguration_dataCompressionType :: Lens'
  UpdateOpenZFSVolumeConfiguration (Maybe OpenZFSDataCompressionType)
updateOpenZFSVolumeConfiguration_dataCompressionType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateOpenZFSVolumeConfiguration' {Maybe OpenZFSDataCompressionType
dataCompressionType :: Maybe OpenZFSDataCompressionType
$sel:dataCompressionType:UpdateOpenZFSVolumeConfiguration' :: UpdateOpenZFSVolumeConfiguration
-> Maybe OpenZFSDataCompressionType
dataCompressionType} -> Maybe OpenZFSDataCompressionType
dataCompressionType) (\s :: UpdateOpenZFSVolumeConfiguration
s@UpdateOpenZFSVolumeConfiguration' {} Maybe OpenZFSDataCompressionType
a -> UpdateOpenZFSVolumeConfiguration
s {$sel:dataCompressionType:UpdateOpenZFSVolumeConfiguration' :: Maybe OpenZFSDataCompressionType
dataCompressionType = Maybe OpenZFSDataCompressionType
a} :: UpdateOpenZFSVolumeConfiguration)

-- | The configuration object for mounting a Network File System (NFS) file
-- system.
updateOpenZFSVolumeConfiguration_nfsExports :: Lens.Lens' UpdateOpenZFSVolumeConfiguration (Prelude.Maybe [OpenZFSNfsExport])
updateOpenZFSVolumeConfiguration_nfsExports :: Lens' UpdateOpenZFSVolumeConfiguration (Maybe [OpenZFSNfsExport])
updateOpenZFSVolumeConfiguration_nfsExports = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateOpenZFSVolumeConfiguration' {Maybe [OpenZFSNfsExport]
nfsExports :: Maybe [OpenZFSNfsExport]
$sel:nfsExports:UpdateOpenZFSVolumeConfiguration' :: UpdateOpenZFSVolumeConfiguration -> Maybe [OpenZFSNfsExport]
nfsExports} -> Maybe [OpenZFSNfsExport]
nfsExports) (\s :: UpdateOpenZFSVolumeConfiguration
s@UpdateOpenZFSVolumeConfiguration' {} Maybe [OpenZFSNfsExport]
a -> UpdateOpenZFSVolumeConfiguration
s {$sel:nfsExports:UpdateOpenZFSVolumeConfiguration' :: Maybe [OpenZFSNfsExport]
nfsExports = Maybe [OpenZFSNfsExport]
a} :: UpdateOpenZFSVolumeConfiguration) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A Boolean value indicating whether the volume is read-only.
updateOpenZFSVolumeConfiguration_readOnly :: Lens.Lens' UpdateOpenZFSVolumeConfiguration (Prelude.Maybe Prelude.Bool)
updateOpenZFSVolumeConfiguration_readOnly :: Lens' UpdateOpenZFSVolumeConfiguration (Maybe Bool)
updateOpenZFSVolumeConfiguration_readOnly = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateOpenZFSVolumeConfiguration' {Maybe Bool
readOnly :: Maybe Bool
$sel:readOnly:UpdateOpenZFSVolumeConfiguration' :: UpdateOpenZFSVolumeConfiguration -> Maybe Bool
readOnly} -> Maybe Bool
readOnly) (\s :: UpdateOpenZFSVolumeConfiguration
s@UpdateOpenZFSVolumeConfiguration' {} Maybe Bool
a -> UpdateOpenZFSVolumeConfiguration
s {$sel:readOnly:UpdateOpenZFSVolumeConfiguration' :: Maybe Bool
readOnly = Maybe Bool
a} :: UpdateOpenZFSVolumeConfiguration)

-- | Specifies the record size of an OpenZFS volume, in kibibytes (KiB).
-- Valid values are 4, 8, 16, 32, 64, 128, 256, 512, or 1024 KiB. The
-- default is 128 KiB. Most workloads should use the default record size.
-- Database workflows can benefit from a smaller record size, while
-- streaming workflows can benefit from a larger record size. For
-- additional guidance on when to set a custom record size, see
-- <https://docs.aws.amazon.com/fsx/latest/OpenZFSGuide/performance.html#performance-tips-zfs Tips for maximizing performance>
-- in the /Amazon FSx for OpenZFS User Guide/.
updateOpenZFSVolumeConfiguration_recordSizeKiB :: Lens.Lens' UpdateOpenZFSVolumeConfiguration (Prelude.Maybe Prelude.Natural)
updateOpenZFSVolumeConfiguration_recordSizeKiB :: Lens' UpdateOpenZFSVolumeConfiguration (Maybe Natural)
updateOpenZFSVolumeConfiguration_recordSizeKiB = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateOpenZFSVolumeConfiguration' {Maybe Natural
recordSizeKiB :: Maybe Natural
$sel:recordSizeKiB:UpdateOpenZFSVolumeConfiguration' :: UpdateOpenZFSVolumeConfiguration -> Maybe Natural
recordSizeKiB} -> Maybe Natural
recordSizeKiB) (\s :: UpdateOpenZFSVolumeConfiguration
s@UpdateOpenZFSVolumeConfiguration' {} Maybe Natural
a -> UpdateOpenZFSVolumeConfiguration
s {$sel:recordSizeKiB:UpdateOpenZFSVolumeConfiguration' :: Maybe Natural
recordSizeKiB = Maybe Natural
a} :: UpdateOpenZFSVolumeConfiguration)

-- | The maximum amount of storage in gibibytes (GiB) that the volume can use
-- from its parent. You can specify a quota larger than the storage on the
-- parent volume. You can specify a value of @-1@ to unset a volume\'s
-- storage capacity quota.
updateOpenZFSVolumeConfiguration_storageCapacityQuotaGiB :: Lens.Lens' UpdateOpenZFSVolumeConfiguration (Prelude.Maybe Prelude.Int)
updateOpenZFSVolumeConfiguration_storageCapacityQuotaGiB :: Lens' UpdateOpenZFSVolumeConfiguration (Maybe Int)
updateOpenZFSVolumeConfiguration_storageCapacityQuotaGiB = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateOpenZFSVolumeConfiguration' {Maybe Int
storageCapacityQuotaGiB :: Maybe Int
$sel:storageCapacityQuotaGiB:UpdateOpenZFSVolumeConfiguration' :: UpdateOpenZFSVolumeConfiguration -> Maybe Int
storageCapacityQuotaGiB} -> Maybe Int
storageCapacityQuotaGiB) (\s :: UpdateOpenZFSVolumeConfiguration
s@UpdateOpenZFSVolumeConfiguration' {} Maybe Int
a -> UpdateOpenZFSVolumeConfiguration
s {$sel:storageCapacityQuotaGiB:UpdateOpenZFSVolumeConfiguration' :: Maybe Int
storageCapacityQuotaGiB = Maybe Int
a} :: UpdateOpenZFSVolumeConfiguration)

-- | The amount of storage in gibibytes (GiB) to reserve from the parent
-- volume. You can\'t reserve more storage than the parent volume has
-- reserved. You can specify a value of @-1@ to unset a volume\'s storage
-- capacity reservation.
updateOpenZFSVolumeConfiguration_storageCapacityReservationGiB :: Lens.Lens' UpdateOpenZFSVolumeConfiguration (Prelude.Maybe Prelude.Int)
updateOpenZFSVolumeConfiguration_storageCapacityReservationGiB :: Lens' UpdateOpenZFSVolumeConfiguration (Maybe Int)
updateOpenZFSVolumeConfiguration_storageCapacityReservationGiB = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateOpenZFSVolumeConfiguration' {Maybe Int
storageCapacityReservationGiB :: Maybe Int
$sel:storageCapacityReservationGiB:UpdateOpenZFSVolumeConfiguration' :: UpdateOpenZFSVolumeConfiguration -> Maybe Int
storageCapacityReservationGiB} -> Maybe Int
storageCapacityReservationGiB) (\s :: UpdateOpenZFSVolumeConfiguration
s@UpdateOpenZFSVolumeConfiguration' {} Maybe Int
a -> UpdateOpenZFSVolumeConfiguration
s {$sel:storageCapacityReservationGiB:UpdateOpenZFSVolumeConfiguration' :: Maybe Int
storageCapacityReservationGiB = Maybe Int
a} :: UpdateOpenZFSVolumeConfiguration)

-- | An object specifying how much storage users or groups can use on the
-- volume.
updateOpenZFSVolumeConfiguration_userAndGroupQuotas :: Lens.Lens' UpdateOpenZFSVolumeConfiguration (Prelude.Maybe [OpenZFSUserOrGroupQuota])
updateOpenZFSVolumeConfiguration_userAndGroupQuotas :: Lens'
  UpdateOpenZFSVolumeConfiguration (Maybe [OpenZFSUserOrGroupQuota])
updateOpenZFSVolumeConfiguration_userAndGroupQuotas = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateOpenZFSVolumeConfiguration' {Maybe [OpenZFSUserOrGroupQuota]
userAndGroupQuotas :: Maybe [OpenZFSUserOrGroupQuota]
$sel:userAndGroupQuotas:UpdateOpenZFSVolumeConfiguration' :: UpdateOpenZFSVolumeConfiguration -> Maybe [OpenZFSUserOrGroupQuota]
userAndGroupQuotas} -> Maybe [OpenZFSUserOrGroupQuota]
userAndGroupQuotas) (\s :: UpdateOpenZFSVolumeConfiguration
s@UpdateOpenZFSVolumeConfiguration' {} Maybe [OpenZFSUserOrGroupQuota]
a -> UpdateOpenZFSVolumeConfiguration
s {$sel:userAndGroupQuotas:UpdateOpenZFSVolumeConfiguration' :: Maybe [OpenZFSUserOrGroupQuota]
userAndGroupQuotas = Maybe [OpenZFSUserOrGroupQuota]
a} :: UpdateOpenZFSVolumeConfiguration) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance
  Prelude.Hashable
    UpdateOpenZFSVolumeConfiguration
  where
  hashWithSalt :: Int -> UpdateOpenZFSVolumeConfiguration -> Int
hashWithSalt
    Int
_salt
    UpdateOpenZFSVolumeConfiguration' {Maybe Bool
Maybe Int
Maybe Natural
Maybe [OpenZFSNfsExport]
Maybe [OpenZFSUserOrGroupQuota]
Maybe OpenZFSDataCompressionType
userAndGroupQuotas :: Maybe [OpenZFSUserOrGroupQuota]
storageCapacityReservationGiB :: Maybe Int
storageCapacityQuotaGiB :: Maybe Int
recordSizeKiB :: Maybe Natural
readOnly :: Maybe Bool
nfsExports :: Maybe [OpenZFSNfsExport]
dataCompressionType :: Maybe OpenZFSDataCompressionType
$sel:userAndGroupQuotas:UpdateOpenZFSVolumeConfiguration' :: UpdateOpenZFSVolumeConfiguration -> Maybe [OpenZFSUserOrGroupQuota]
$sel:storageCapacityReservationGiB:UpdateOpenZFSVolumeConfiguration' :: UpdateOpenZFSVolumeConfiguration -> Maybe Int
$sel:storageCapacityQuotaGiB:UpdateOpenZFSVolumeConfiguration' :: UpdateOpenZFSVolumeConfiguration -> Maybe Int
$sel:recordSizeKiB:UpdateOpenZFSVolumeConfiguration' :: UpdateOpenZFSVolumeConfiguration -> Maybe Natural
$sel:readOnly:UpdateOpenZFSVolumeConfiguration' :: UpdateOpenZFSVolumeConfiguration -> Maybe Bool
$sel:nfsExports:UpdateOpenZFSVolumeConfiguration' :: UpdateOpenZFSVolumeConfiguration -> Maybe [OpenZFSNfsExport]
$sel:dataCompressionType:UpdateOpenZFSVolumeConfiguration' :: UpdateOpenZFSVolumeConfiguration
-> Maybe OpenZFSDataCompressionType
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe OpenZFSDataCompressionType
dataCompressionType
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [OpenZFSNfsExport]
nfsExports
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
readOnly
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
recordSizeKiB
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
storageCapacityQuotaGiB
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
storageCapacityReservationGiB
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [OpenZFSUserOrGroupQuota]
userAndGroupQuotas

instance
  Prelude.NFData
    UpdateOpenZFSVolumeConfiguration
  where
  rnf :: UpdateOpenZFSVolumeConfiguration -> ()
rnf UpdateOpenZFSVolumeConfiguration' {Maybe Bool
Maybe Int
Maybe Natural
Maybe [OpenZFSNfsExport]
Maybe [OpenZFSUserOrGroupQuota]
Maybe OpenZFSDataCompressionType
userAndGroupQuotas :: Maybe [OpenZFSUserOrGroupQuota]
storageCapacityReservationGiB :: Maybe Int
storageCapacityQuotaGiB :: Maybe Int
recordSizeKiB :: Maybe Natural
readOnly :: Maybe Bool
nfsExports :: Maybe [OpenZFSNfsExport]
dataCompressionType :: Maybe OpenZFSDataCompressionType
$sel:userAndGroupQuotas:UpdateOpenZFSVolumeConfiguration' :: UpdateOpenZFSVolumeConfiguration -> Maybe [OpenZFSUserOrGroupQuota]
$sel:storageCapacityReservationGiB:UpdateOpenZFSVolumeConfiguration' :: UpdateOpenZFSVolumeConfiguration -> Maybe Int
$sel:storageCapacityQuotaGiB:UpdateOpenZFSVolumeConfiguration' :: UpdateOpenZFSVolumeConfiguration -> Maybe Int
$sel:recordSizeKiB:UpdateOpenZFSVolumeConfiguration' :: UpdateOpenZFSVolumeConfiguration -> Maybe Natural
$sel:readOnly:UpdateOpenZFSVolumeConfiguration' :: UpdateOpenZFSVolumeConfiguration -> Maybe Bool
$sel:nfsExports:UpdateOpenZFSVolumeConfiguration' :: UpdateOpenZFSVolumeConfiguration -> Maybe [OpenZFSNfsExport]
$sel:dataCompressionType:UpdateOpenZFSVolumeConfiguration' :: UpdateOpenZFSVolumeConfiguration
-> Maybe OpenZFSDataCompressionType
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe OpenZFSDataCompressionType
dataCompressionType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [OpenZFSNfsExport]
nfsExports
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
readOnly
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
recordSizeKiB
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
storageCapacityQuotaGiB
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
storageCapacityReservationGiB
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [OpenZFSUserOrGroupQuota]
userAndGroupQuotas

instance Data.ToJSON UpdateOpenZFSVolumeConfiguration where
  toJSON :: UpdateOpenZFSVolumeConfiguration -> Value
toJSON UpdateOpenZFSVolumeConfiguration' {Maybe Bool
Maybe Int
Maybe Natural
Maybe [OpenZFSNfsExport]
Maybe [OpenZFSUserOrGroupQuota]
Maybe OpenZFSDataCompressionType
userAndGroupQuotas :: Maybe [OpenZFSUserOrGroupQuota]
storageCapacityReservationGiB :: Maybe Int
storageCapacityQuotaGiB :: Maybe Int
recordSizeKiB :: Maybe Natural
readOnly :: Maybe Bool
nfsExports :: Maybe [OpenZFSNfsExport]
dataCompressionType :: Maybe OpenZFSDataCompressionType
$sel:userAndGroupQuotas:UpdateOpenZFSVolumeConfiguration' :: UpdateOpenZFSVolumeConfiguration -> Maybe [OpenZFSUserOrGroupQuota]
$sel:storageCapacityReservationGiB:UpdateOpenZFSVolumeConfiguration' :: UpdateOpenZFSVolumeConfiguration -> Maybe Int
$sel:storageCapacityQuotaGiB:UpdateOpenZFSVolumeConfiguration' :: UpdateOpenZFSVolumeConfiguration -> Maybe Int
$sel:recordSizeKiB:UpdateOpenZFSVolumeConfiguration' :: UpdateOpenZFSVolumeConfiguration -> Maybe Natural
$sel:readOnly:UpdateOpenZFSVolumeConfiguration' :: UpdateOpenZFSVolumeConfiguration -> Maybe Bool
$sel:nfsExports:UpdateOpenZFSVolumeConfiguration' :: UpdateOpenZFSVolumeConfiguration -> Maybe [OpenZFSNfsExport]
$sel:dataCompressionType:UpdateOpenZFSVolumeConfiguration' :: UpdateOpenZFSVolumeConfiguration
-> Maybe OpenZFSDataCompressionType
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"DataCompressionType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OpenZFSDataCompressionType
dataCompressionType,
            (Key
"NfsExports" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [OpenZFSNfsExport]
nfsExports,
            (Key
"ReadOnly" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
readOnly,
            (Key
"RecordSizeKiB" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
recordSizeKiB,
            (Key
"StorageCapacityQuotaGiB" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
storageCapacityQuotaGiB,
            (Key
"StorageCapacityReservationGiB" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
storageCapacityReservationGiB,
            (Key
"UserAndGroupQuotas" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [OpenZFSUserOrGroupQuota]
userAndGroupQuotas
          ]
      )