{-# 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.OpenZFSCreateRootVolumeConfiguration
-- 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.OpenZFSCreateRootVolumeConfiguration 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

-- | The configuration of an Amazon FSx for OpenZFS root volume.
--
-- /See:/ 'newOpenZFSCreateRootVolumeConfiguration' smart constructor.
data OpenZFSCreateRootVolumeConfiguration = OpenZFSCreateRootVolumeConfiguration'
  { -- | A Boolean value indicating whether tags for the volume should be copied
    -- to snapshots of the volume. This value defaults to @false@. If it\'s set
    -- to @true@, all tags for the volume are copied to snapshots where the
    -- user doesn\'t specify tags. If this value is @true@ and you specify one
    -- or more tags, only the specified tags are copied to snapshots. If you
    -- specify one or more tags when creating the snapshot, no tags are copied
    -- from the volume, regardless of this value.
    OpenZFSCreateRootVolumeConfiguration -> Maybe Bool
copyTagsToSnapshots :: Prelude.Maybe Prelude.Bool,
    -- | 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.
    OpenZFSCreateRootVolumeConfiguration
-> Maybe OpenZFSDataCompressionType
dataCompressionType :: Prelude.Maybe OpenZFSDataCompressionType,
    -- | The configuration object for mounting a file system.
    OpenZFSCreateRootVolumeConfiguration -> Maybe [OpenZFSNfsExport]
nfsExports :: Prelude.Maybe [OpenZFSNfsExport],
    -- | A Boolean value indicating whether the volume is read-only. Setting this
    -- value to @true@ can be useful after you have completed changes to a
    -- volume and no longer want changes to occur.
    OpenZFSCreateRootVolumeConfiguration -> Maybe Bool
readOnly :: Prelude.Maybe Prelude.Bool,
    -- | Specifies the record size of an OpenZFS root 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 setting 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/.
    OpenZFSCreateRootVolumeConfiguration -> Maybe Natural
recordSizeKiB :: Prelude.Maybe Prelude.Natural,
    -- | An object specifying how much storage users or groups can use on the
    -- volume.
    OpenZFSCreateRootVolumeConfiguration
-> Maybe [OpenZFSUserOrGroupQuota]
userAndGroupQuotas :: Prelude.Maybe [OpenZFSUserOrGroupQuota]
  }
  deriving (OpenZFSCreateRootVolumeConfiguration
-> OpenZFSCreateRootVolumeConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OpenZFSCreateRootVolumeConfiguration
-> OpenZFSCreateRootVolumeConfiguration -> Bool
$c/= :: OpenZFSCreateRootVolumeConfiguration
-> OpenZFSCreateRootVolumeConfiguration -> Bool
== :: OpenZFSCreateRootVolumeConfiguration
-> OpenZFSCreateRootVolumeConfiguration -> Bool
$c== :: OpenZFSCreateRootVolumeConfiguration
-> OpenZFSCreateRootVolumeConfiguration -> Bool
Prelude.Eq, ReadPrec [OpenZFSCreateRootVolumeConfiguration]
ReadPrec OpenZFSCreateRootVolumeConfiguration
Int -> ReadS OpenZFSCreateRootVolumeConfiguration
ReadS [OpenZFSCreateRootVolumeConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [OpenZFSCreateRootVolumeConfiguration]
$creadListPrec :: ReadPrec [OpenZFSCreateRootVolumeConfiguration]
readPrec :: ReadPrec OpenZFSCreateRootVolumeConfiguration
$creadPrec :: ReadPrec OpenZFSCreateRootVolumeConfiguration
readList :: ReadS [OpenZFSCreateRootVolumeConfiguration]
$creadList :: ReadS [OpenZFSCreateRootVolumeConfiguration]
readsPrec :: Int -> ReadS OpenZFSCreateRootVolumeConfiguration
$creadsPrec :: Int -> ReadS OpenZFSCreateRootVolumeConfiguration
Prelude.Read, Int -> OpenZFSCreateRootVolumeConfiguration -> ShowS
[OpenZFSCreateRootVolumeConfiguration] -> ShowS
OpenZFSCreateRootVolumeConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OpenZFSCreateRootVolumeConfiguration] -> ShowS
$cshowList :: [OpenZFSCreateRootVolumeConfiguration] -> ShowS
show :: OpenZFSCreateRootVolumeConfiguration -> String
$cshow :: OpenZFSCreateRootVolumeConfiguration -> String
showsPrec :: Int -> OpenZFSCreateRootVolumeConfiguration -> ShowS
$cshowsPrec :: Int -> OpenZFSCreateRootVolumeConfiguration -> ShowS
Prelude.Show, forall x.
Rep OpenZFSCreateRootVolumeConfiguration x
-> OpenZFSCreateRootVolumeConfiguration
forall x.
OpenZFSCreateRootVolumeConfiguration
-> Rep OpenZFSCreateRootVolumeConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep OpenZFSCreateRootVolumeConfiguration x
-> OpenZFSCreateRootVolumeConfiguration
$cfrom :: forall x.
OpenZFSCreateRootVolumeConfiguration
-> Rep OpenZFSCreateRootVolumeConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'OpenZFSCreateRootVolumeConfiguration' 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:
--
-- 'copyTagsToSnapshots', 'openZFSCreateRootVolumeConfiguration_copyTagsToSnapshots' - A Boolean value indicating whether tags for the volume should be copied
-- to snapshots of the volume. This value defaults to @false@. If it\'s set
-- to @true@, all tags for the volume are copied to snapshots where the
-- user doesn\'t specify tags. If this value is @true@ and you specify one
-- or more tags, only the specified tags are copied to snapshots. If you
-- specify one or more tags when creating the snapshot, no tags are copied
-- from the volume, regardless of this value.
--
-- 'dataCompressionType', 'openZFSCreateRootVolumeConfiguration_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', 'openZFSCreateRootVolumeConfiguration_nfsExports' - The configuration object for mounting a file system.
--
-- 'readOnly', 'openZFSCreateRootVolumeConfiguration_readOnly' - A Boolean value indicating whether the volume is read-only. Setting this
-- value to @true@ can be useful after you have completed changes to a
-- volume and no longer want changes to occur.
--
-- 'recordSizeKiB', 'openZFSCreateRootVolumeConfiguration_recordSizeKiB' - Specifies the record size of an OpenZFS root 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 setting 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/.
--
-- 'userAndGroupQuotas', 'openZFSCreateRootVolumeConfiguration_userAndGroupQuotas' - An object specifying how much storage users or groups can use on the
-- volume.
newOpenZFSCreateRootVolumeConfiguration ::
  OpenZFSCreateRootVolumeConfiguration
newOpenZFSCreateRootVolumeConfiguration :: OpenZFSCreateRootVolumeConfiguration
newOpenZFSCreateRootVolumeConfiguration =
  OpenZFSCreateRootVolumeConfiguration'
    { $sel:copyTagsToSnapshots:OpenZFSCreateRootVolumeConfiguration' :: Maybe Bool
copyTagsToSnapshots =
        forall a. Maybe a
Prelude.Nothing,
      $sel:dataCompressionType:OpenZFSCreateRootVolumeConfiguration' :: Maybe OpenZFSDataCompressionType
dataCompressionType = forall a. Maybe a
Prelude.Nothing,
      $sel:nfsExports:OpenZFSCreateRootVolumeConfiguration' :: Maybe [OpenZFSNfsExport]
nfsExports = forall a. Maybe a
Prelude.Nothing,
      $sel:readOnly:OpenZFSCreateRootVolumeConfiguration' :: Maybe Bool
readOnly = forall a. Maybe a
Prelude.Nothing,
      $sel:recordSizeKiB:OpenZFSCreateRootVolumeConfiguration' :: Maybe Natural
recordSizeKiB = forall a. Maybe a
Prelude.Nothing,
      $sel:userAndGroupQuotas:OpenZFSCreateRootVolumeConfiguration' :: Maybe [OpenZFSUserOrGroupQuota]
userAndGroupQuotas = forall a. Maybe a
Prelude.Nothing
    }

-- | A Boolean value indicating whether tags for the volume should be copied
-- to snapshots of the volume. This value defaults to @false@. If it\'s set
-- to @true@, all tags for the volume are copied to snapshots where the
-- user doesn\'t specify tags. If this value is @true@ and you specify one
-- or more tags, only the specified tags are copied to snapshots. If you
-- specify one or more tags when creating the snapshot, no tags are copied
-- from the volume, regardless of this value.
openZFSCreateRootVolumeConfiguration_copyTagsToSnapshots :: Lens.Lens' OpenZFSCreateRootVolumeConfiguration (Prelude.Maybe Prelude.Bool)
openZFSCreateRootVolumeConfiguration_copyTagsToSnapshots :: Lens' OpenZFSCreateRootVolumeConfiguration (Maybe Bool)
openZFSCreateRootVolumeConfiguration_copyTagsToSnapshots = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OpenZFSCreateRootVolumeConfiguration' {Maybe Bool
copyTagsToSnapshots :: Maybe Bool
$sel:copyTagsToSnapshots:OpenZFSCreateRootVolumeConfiguration' :: OpenZFSCreateRootVolumeConfiguration -> Maybe Bool
copyTagsToSnapshots} -> Maybe Bool
copyTagsToSnapshots) (\s :: OpenZFSCreateRootVolumeConfiguration
s@OpenZFSCreateRootVolumeConfiguration' {} Maybe Bool
a -> OpenZFSCreateRootVolumeConfiguration
s {$sel:copyTagsToSnapshots:OpenZFSCreateRootVolumeConfiguration' :: Maybe Bool
copyTagsToSnapshots = Maybe Bool
a} :: OpenZFSCreateRootVolumeConfiguration)

-- | 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.
openZFSCreateRootVolumeConfiguration_dataCompressionType :: Lens.Lens' OpenZFSCreateRootVolumeConfiguration (Prelude.Maybe OpenZFSDataCompressionType)
openZFSCreateRootVolumeConfiguration_dataCompressionType :: Lens'
  OpenZFSCreateRootVolumeConfiguration
  (Maybe OpenZFSDataCompressionType)
openZFSCreateRootVolumeConfiguration_dataCompressionType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OpenZFSCreateRootVolumeConfiguration' {Maybe OpenZFSDataCompressionType
dataCompressionType :: Maybe OpenZFSDataCompressionType
$sel:dataCompressionType:OpenZFSCreateRootVolumeConfiguration' :: OpenZFSCreateRootVolumeConfiguration
-> Maybe OpenZFSDataCompressionType
dataCompressionType} -> Maybe OpenZFSDataCompressionType
dataCompressionType) (\s :: OpenZFSCreateRootVolumeConfiguration
s@OpenZFSCreateRootVolumeConfiguration' {} Maybe OpenZFSDataCompressionType
a -> OpenZFSCreateRootVolumeConfiguration
s {$sel:dataCompressionType:OpenZFSCreateRootVolumeConfiguration' :: Maybe OpenZFSDataCompressionType
dataCompressionType = Maybe OpenZFSDataCompressionType
a} :: OpenZFSCreateRootVolumeConfiguration)

-- | The configuration object for mounting a file system.
openZFSCreateRootVolumeConfiguration_nfsExports :: Lens.Lens' OpenZFSCreateRootVolumeConfiguration (Prelude.Maybe [OpenZFSNfsExport])
openZFSCreateRootVolumeConfiguration_nfsExports :: Lens'
  OpenZFSCreateRootVolumeConfiguration (Maybe [OpenZFSNfsExport])
openZFSCreateRootVolumeConfiguration_nfsExports = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OpenZFSCreateRootVolumeConfiguration' {Maybe [OpenZFSNfsExport]
nfsExports :: Maybe [OpenZFSNfsExport]
$sel:nfsExports:OpenZFSCreateRootVolumeConfiguration' :: OpenZFSCreateRootVolumeConfiguration -> Maybe [OpenZFSNfsExport]
nfsExports} -> Maybe [OpenZFSNfsExport]
nfsExports) (\s :: OpenZFSCreateRootVolumeConfiguration
s@OpenZFSCreateRootVolumeConfiguration' {} Maybe [OpenZFSNfsExport]
a -> OpenZFSCreateRootVolumeConfiguration
s {$sel:nfsExports:OpenZFSCreateRootVolumeConfiguration' :: Maybe [OpenZFSNfsExport]
nfsExports = Maybe [OpenZFSNfsExport]
a} :: OpenZFSCreateRootVolumeConfiguration) 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. Setting this
-- value to @true@ can be useful after you have completed changes to a
-- volume and no longer want changes to occur.
openZFSCreateRootVolumeConfiguration_readOnly :: Lens.Lens' OpenZFSCreateRootVolumeConfiguration (Prelude.Maybe Prelude.Bool)
openZFSCreateRootVolumeConfiguration_readOnly :: Lens' OpenZFSCreateRootVolumeConfiguration (Maybe Bool)
openZFSCreateRootVolumeConfiguration_readOnly = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OpenZFSCreateRootVolumeConfiguration' {Maybe Bool
readOnly :: Maybe Bool
$sel:readOnly:OpenZFSCreateRootVolumeConfiguration' :: OpenZFSCreateRootVolumeConfiguration -> Maybe Bool
readOnly} -> Maybe Bool
readOnly) (\s :: OpenZFSCreateRootVolumeConfiguration
s@OpenZFSCreateRootVolumeConfiguration' {} Maybe Bool
a -> OpenZFSCreateRootVolumeConfiguration
s {$sel:readOnly:OpenZFSCreateRootVolumeConfiguration' :: Maybe Bool
readOnly = Maybe Bool
a} :: OpenZFSCreateRootVolumeConfiguration)

-- | Specifies the record size of an OpenZFS root 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 setting 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/.
openZFSCreateRootVolumeConfiguration_recordSizeKiB :: Lens.Lens' OpenZFSCreateRootVolumeConfiguration (Prelude.Maybe Prelude.Natural)
openZFSCreateRootVolumeConfiguration_recordSizeKiB :: Lens' OpenZFSCreateRootVolumeConfiguration (Maybe Natural)
openZFSCreateRootVolumeConfiguration_recordSizeKiB = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OpenZFSCreateRootVolumeConfiguration' {Maybe Natural
recordSizeKiB :: Maybe Natural
$sel:recordSizeKiB:OpenZFSCreateRootVolumeConfiguration' :: OpenZFSCreateRootVolumeConfiguration -> Maybe Natural
recordSizeKiB} -> Maybe Natural
recordSizeKiB) (\s :: OpenZFSCreateRootVolumeConfiguration
s@OpenZFSCreateRootVolumeConfiguration' {} Maybe Natural
a -> OpenZFSCreateRootVolumeConfiguration
s {$sel:recordSizeKiB:OpenZFSCreateRootVolumeConfiguration' :: Maybe Natural
recordSizeKiB = Maybe Natural
a} :: OpenZFSCreateRootVolumeConfiguration)

-- | An object specifying how much storage users or groups can use on the
-- volume.
openZFSCreateRootVolumeConfiguration_userAndGroupQuotas :: Lens.Lens' OpenZFSCreateRootVolumeConfiguration (Prelude.Maybe [OpenZFSUserOrGroupQuota])
openZFSCreateRootVolumeConfiguration_userAndGroupQuotas :: Lens'
  OpenZFSCreateRootVolumeConfiguration
  (Maybe [OpenZFSUserOrGroupQuota])
openZFSCreateRootVolumeConfiguration_userAndGroupQuotas = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OpenZFSCreateRootVolumeConfiguration' {Maybe [OpenZFSUserOrGroupQuota]
userAndGroupQuotas :: Maybe [OpenZFSUserOrGroupQuota]
$sel:userAndGroupQuotas:OpenZFSCreateRootVolumeConfiguration' :: OpenZFSCreateRootVolumeConfiguration
-> Maybe [OpenZFSUserOrGroupQuota]
userAndGroupQuotas} -> Maybe [OpenZFSUserOrGroupQuota]
userAndGroupQuotas) (\s :: OpenZFSCreateRootVolumeConfiguration
s@OpenZFSCreateRootVolumeConfiguration' {} Maybe [OpenZFSUserOrGroupQuota]
a -> OpenZFSCreateRootVolumeConfiguration
s {$sel:userAndGroupQuotas:OpenZFSCreateRootVolumeConfiguration' :: Maybe [OpenZFSUserOrGroupQuota]
userAndGroupQuotas = Maybe [OpenZFSUserOrGroupQuota]
a} :: OpenZFSCreateRootVolumeConfiguration) 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
    OpenZFSCreateRootVolumeConfiguration
  where
  hashWithSalt :: Int -> OpenZFSCreateRootVolumeConfiguration -> Int
hashWithSalt
    Int
_salt
    OpenZFSCreateRootVolumeConfiguration' {Maybe Bool
Maybe Natural
Maybe [OpenZFSNfsExport]
Maybe [OpenZFSUserOrGroupQuota]
Maybe OpenZFSDataCompressionType
userAndGroupQuotas :: Maybe [OpenZFSUserOrGroupQuota]
recordSizeKiB :: Maybe Natural
readOnly :: Maybe Bool
nfsExports :: Maybe [OpenZFSNfsExport]
dataCompressionType :: Maybe OpenZFSDataCompressionType
copyTagsToSnapshots :: Maybe Bool
$sel:userAndGroupQuotas:OpenZFSCreateRootVolumeConfiguration' :: OpenZFSCreateRootVolumeConfiguration
-> Maybe [OpenZFSUserOrGroupQuota]
$sel:recordSizeKiB:OpenZFSCreateRootVolumeConfiguration' :: OpenZFSCreateRootVolumeConfiguration -> Maybe Natural
$sel:readOnly:OpenZFSCreateRootVolumeConfiguration' :: OpenZFSCreateRootVolumeConfiguration -> Maybe Bool
$sel:nfsExports:OpenZFSCreateRootVolumeConfiguration' :: OpenZFSCreateRootVolumeConfiguration -> Maybe [OpenZFSNfsExport]
$sel:dataCompressionType:OpenZFSCreateRootVolumeConfiguration' :: OpenZFSCreateRootVolumeConfiguration
-> Maybe OpenZFSDataCompressionType
$sel:copyTagsToSnapshots:OpenZFSCreateRootVolumeConfiguration' :: OpenZFSCreateRootVolumeConfiguration -> Maybe Bool
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
copyTagsToSnapshots
        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 [OpenZFSUserOrGroupQuota]
userAndGroupQuotas

instance
  Prelude.NFData
    OpenZFSCreateRootVolumeConfiguration
  where
  rnf :: OpenZFSCreateRootVolumeConfiguration -> ()
rnf OpenZFSCreateRootVolumeConfiguration' {Maybe Bool
Maybe Natural
Maybe [OpenZFSNfsExport]
Maybe [OpenZFSUserOrGroupQuota]
Maybe OpenZFSDataCompressionType
userAndGroupQuotas :: Maybe [OpenZFSUserOrGroupQuota]
recordSizeKiB :: Maybe Natural
readOnly :: Maybe Bool
nfsExports :: Maybe [OpenZFSNfsExport]
dataCompressionType :: Maybe OpenZFSDataCompressionType
copyTagsToSnapshots :: Maybe Bool
$sel:userAndGroupQuotas:OpenZFSCreateRootVolumeConfiguration' :: OpenZFSCreateRootVolumeConfiguration
-> Maybe [OpenZFSUserOrGroupQuota]
$sel:recordSizeKiB:OpenZFSCreateRootVolumeConfiguration' :: OpenZFSCreateRootVolumeConfiguration -> Maybe Natural
$sel:readOnly:OpenZFSCreateRootVolumeConfiguration' :: OpenZFSCreateRootVolumeConfiguration -> Maybe Bool
$sel:nfsExports:OpenZFSCreateRootVolumeConfiguration' :: OpenZFSCreateRootVolumeConfiguration -> Maybe [OpenZFSNfsExport]
$sel:dataCompressionType:OpenZFSCreateRootVolumeConfiguration' :: OpenZFSCreateRootVolumeConfiguration
-> Maybe OpenZFSDataCompressionType
$sel:copyTagsToSnapshots:OpenZFSCreateRootVolumeConfiguration' :: OpenZFSCreateRootVolumeConfiguration -> Maybe Bool
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
copyTagsToSnapshots
      seq :: forall a b. a -> b -> b
`Prelude.seq` 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 [OpenZFSUserOrGroupQuota]
userAndGroupQuotas

instance
  Data.ToJSON
    OpenZFSCreateRootVolumeConfiguration
  where
  toJSON :: OpenZFSCreateRootVolumeConfiguration -> Value
toJSON OpenZFSCreateRootVolumeConfiguration' {Maybe Bool
Maybe Natural
Maybe [OpenZFSNfsExport]
Maybe [OpenZFSUserOrGroupQuota]
Maybe OpenZFSDataCompressionType
userAndGroupQuotas :: Maybe [OpenZFSUserOrGroupQuota]
recordSizeKiB :: Maybe Natural
readOnly :: Maybe Bool
nfsExports :: Maybe [OpenZFSNfsExport]
dataCompressionType :: Maybe OpenZFSDataCompressionType
copyTagsToSnapshots :: Maybe Bool
$sel:userAndGroupQuotas:OpenZFSCreateRootVolumeConfiguration' :: OpenZFSCreateRootVolumeConfiguration
-> Maybe [OpenZFSUserOrGroupQuota]
$sel:recordSizeKiB:OpenZFSCreateRootVolumeConfiguration' :: OpenZFSCreateRootVolumeConfiguration -> Maybe Natural
$sel:readOnly:OpenZFSCreateRootVolumeConfiguration' :: OpenZFSCreateRootVolumeConfiguration -> Maybe Bool
$sel:nfsExports:OpenZFSCreateRootVolumeConfiguration' :: OpenZFSCreateRootVolumeConfiguration -> Maybe [OpenZFSNfsExport]
$sel:dataCompressionType:OpenZFSCreateRootVolumeConfiguration' :: OpenZFSCreateRootVolumeConfiguration
-> Maybe OpenZFSDataCompressionType
$sel:copyTagsToSnapshots:OpenZFSCreateRootVolumeConfiguration' :: OpenZFSCreateRootVolumeConfiguration -> Maybe Bool
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"CopyTagsToSnapshots" 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
copyTagsToSnapshots,
            (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
"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
          ]
      )