{-# 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.CreateOntapVolumeConfiguration
-- 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.CreateOntapVolumeConfiguration 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.InputOntapVolumeType
import Amazonka.FSx.Types.SecurityStyle
import Amazonka.FSx.Types.TieringPolicy
import qualified Amazonka.Prelude as Prelude

-- | Specifies the configuration of the ONTAP volume that you are creating.
--
-- /See:/ 'newCreateOntapVolumeConfiguration' smart constructor.
data CreateOntapVolumeConfiguration = CreateOntapVolumeConfiguration'
  { -- | A boolean flag indicating whether tags for the volume should be copied
    -- to backups. This value defaults to false. If it\'s set to true, all tags
    -- for the volume are copied to all automatic and user-initiated backups
    -- 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 backups.
    -- If you specify one or more tags when creating a user-initiated backup,
    -- no tags are copied from the volume, regardless of this value.
    CreateOntapVolumeConfiguration -> Maybe Bool
copyTagsToBackups :: Prelude.Maybe Prelude.Bool,
    -- | Specifies the location in the SVM\'s namespace where the volume is
    -- mounted. The @JunctionPath@ must have a leading forward slash, such as
    -- @\/vol3@.
    CreateOntapVolumeConfiguration -> Maybe Text
junctionPath :: Prelude.Maybe Prelude.Text,
    -- | Specifies the type of volume you are creating. Valid values are the
    -- following:
    --
    -- -   @RW@ specifies a read\/write volume. @RW@ is the default.
    --
    -- -   @DP@ specifies a data-protection volume. A @DP@ volume is read-only
    --     and can be used as the destination of a NetApp SnapMirror
    --     relationship.
    --
    -- For more information, see
    -- <https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/volume-types Volume types>
    -- in the /Amazon FSx for NetApp ONTAP User Guide/.
    CreateOntapVolumeConfiguration -> Maybe InputOntapVolumeType
ontapVolumeType :: Prelude.Maybe InputOntapVolumeType,
    -- | Specifies the security style for the volume. If a volume\'s security
    -- style is not specified, it is automatically set to the root volume\'s
    -- security style. The security style determines the type of permissions
    -- that FSx for ONTAP uses to control data access. For more information,
    -- see
    -- <https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/managing-volumes.html#volume-security-style Volume security style>
    -- in the /Amazon FSx for NetApp ONTAP User Guide/. Specify one of the
    -- following values:
    --
    -- -   @UNIX@ if the file system is managed by a UNIX administrator, the
    --     majority of users are NFS clients, and an application accessing the
    --     data uses a UNIX user as the service account.
    --
    -- -   @NTFS@ if the file system is managed by a Windows administrator, the
    --     majority of users are SMB clients, and an application accessing the
    --     data uses a Windows user as the service account.
    --
    -- -   @MIXED@ if the file system is managed by both UNIX and Windows
    --     administrators and users consist of both NFS and SMB clients.
    CreateOntapVolumeConfiguration -> Maybe SecurityStyle
securityStyle :: Prelude.Maybe SecurityStyle,
    -- | Specifies the snapshot policy for the volume. There are three built-in
    -- snapshot policies:
    --
    -- -   @default@: This is the default policy. A maximum of six hourly
    --     snapshots taken five minutes past the hour. A maximum of two daily
    --     snapshots taken Monday through Saturday at 10 minutes after
    --     midnight. A maximum of two weekly snapshots taken every Sunday at 15
    --     minutes after midnight.
    --
    -- -   @default-1weekly@: This policy is the same as the @default@ policy
    --     except that it only retains one snapshot from the weekly schedule.
    --
    -- -   @none@: This policy does not take any snapshots. This policy can be
    --     assigned to volumes to prevent automatic snapshots from being taken.
    --
    -- You can also provide the name of a custom policy that you created with
    -- the ONTAP CLI or REST API.
    --
    -- For more information, see
    -- <https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/snapshots-ontap.html#snapshot-policies Snapshot policies>
    -- in the /Amazon FSx for NetApp ONTAP User Guide/.
    CreateOntapVolumeConfiguration -> Maybe Text
snapshotPolicy :: Prelude.Maybe Prelude.Text,
    -- | Set to true to enable deduplication, compression, and compaction storage
    -- efficiency features on the volume.
    CreateOntapVolumeConfiguration -> Maybe Bool
storageEfficiencyEnabled :: Prelude.Maybe Prelude.Bool,
    CreateOntapVolumeConfiguration -> Maybe TieringPolicy
tieringPolicy :: Prelude.Maybe TieringPolicy,
    -- | Specifies the size of the volume, in megabytes (MB), that you are
    -- creating.
    CreateOntapVolumeConfiguration -> Natural
sizeInMegabytes :: Prelude.Natural,
    -- | Specifies the ONTAP SVM in which to create the volume.
    CreateOntapVolumeConfiguration -> Text
storageVirtualMachineId :: Prelude.Text
  }
  deriving (CreateOntapVolumeConfiguration
-> CreateOntapVolumeConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateOntapVolumeConfiguration
-> CreateOntapVolumeConfiguration -> Bool
$c/= :: CreateOntapVolumeConfiguration
-> CreateOntapVolumeConfiguration -> Bool
== :: CreateOntapVolumeConfiguration
-> CreateOntapVolumeConfiguration -> Bool
$c== :: CreateOntapVolumeConfiguration
-> CreateOntapVolumeConfiguration -> Bool
Prelude.Eq, ReadPrec [CreateOntapVolumeConfiguration]
ReadPrec CreateOntapVolumeConfiguration
Int -> ReadS CreateOntapVolumeConfiguration
ReadS [CreateOntapVolumeConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateOntapVolumeConfiguration]
$creadListPrec :: ReadPrec [CreateOntapVolumeConfiguration]
readPrec :: ReadPrec CreateOntapVolumeConfiguration
$creadPrec :: ReadPrec CreateOntapVolumeConfiguration
readList :: ReadS [CreateOntapVolumeConfiguration]
$creadList :: ReadS [CreateOntapVolumeConfiguration]
readsPrec :: Int -> ReadS CreateOntapVolumeConfiguration
$creadsPrec :: Int -> ReadS CreateOntapVolumeConfiguration
Prelude.Read, Int -> CreateOntapVolumeConfiguration -> ShowS
[CreateOntapVolumeConfiguration] -> ShowS
CreateOntapVolumeConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateOntapVolumeConfiguration] -> ShowS
$cshowList :: [CreateOntapVolumeConfiguration] -> ShowS
show :: CreateOntapVolumeConfiguration -> String
$cshow :: CreateOntapVolumeConfiguration -> String
showsPrec :: Int -> CreateOntapVolumeConfiguration -> ShowS
$cshowsPrec :: Int -> CreateOntapVolumeConfiguration -> ShowS
Prelude.Show, forall x.
Rep CreateOntapVolumeConfiguration x
-> CreateOntapVolumeConfiguration
forall x.
CreateOntapVolumeConfiguration
-> Rep CreateOntapVolumeConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateOntapVolumeConfiguration x
-> CreateOntapVolumeConfiguration
$cfrom :: forall x.
CreateOntapVolumeConfiguration
-> Rep CreateOntapVolumeConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'CreateOntapVolumeConfiguration' 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:
--
-- 'copyTagsToBackups', 'createOntapVolumeConfiguration_copyTagsToBackups' - A boolean flag indicating whether tags for the volume should be copied
-- to backups. This value defaults to false. If it\'s set to true, all tags
-- for the volume are copied to all automatic and user-initiated backups
-- 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 backups.
-- If you specify one or more tags when creating a user-initiated backup,
-- no tags are copied from the volume, regardless of this value.
--
-- 'junctionPath', 'createOntapVolumeConfiguration_junctionPath' - Specifies the location in the SVM\'s namespace where the volume is
-- mounted. The @JunctionPath@ must have a leading forward slash, such as
-- @\/vol3@.
--
-- 'ontapVolumeType', 'createOntapVolumeConfiguration_ontapVolumeType' - Specifies the type of volume you are creating. Valid values are the
-- following:
--
-- -   @RW@ specifies a read\/write volume. @RW@ is the default.
--
-- -   @DP@ specifies a data-protection volume. A @DP@ volume is read-only
--     and can be used as the destination of a NetApp SnapMirror
--     relationship.
--
-- For more information, see
-- <https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/volume-types Volume types>
-- in the /Amazon FSx for NetApp ONTAP User Guide/.
--
-- 'securityStyle', 'createOntapVolumeConfiguration_securityStyle' - Specifies the security style for the volume. If a volume\'s security
-- style is not specified, it is automatically set to the root volume\'s
-- security style. The security style determines the type of permissions
-- that FSx for ONTAP uses to control data access. For more information,
-- see
-- <https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/managing-volumes.html#volume-security-style Volume security style>
-- in the /Amazon FSx for NetApp ONTAP User Guide/. Specify one of the
-- following values:
--
-- -   @UNIX@ if the file system is managed by a UNIX administrator, the
--     majority of users are NFS clients, and an application accessing the
--     data uses a UNIX user as the service account.
--
-- -   @NTFS@ if the file system is managed by a Windows administrator, the
--     majority of users are SMB clients, and an application accessing the
--     data uses a Windows user as the service account.
--
-- -   @MIXED@ if the file system is managed by both UNIX and Windows
--     administrators and users consist of both NFS and SMB clients.
--
-- 'snapshotPolicy', 'createOntapVolumeConfiguration_snapshotPolicy' - Specifies the snapshot policy for the volume. There are three built-in
-- snapshot policies:
--
-- -   @default@: This is the default policy. A maximum of six hourly
--     snapshots taken five minutes past the hour. A maximum of two daily
--     snapshots taken Monday through Saturday at 10 minutes after
--     midnight. A maximum of two weekly snapshots taken every Sunday at 15
--     minutes after midnight.
--
-- -   @default-1weekly@: This policy is the same as the @default@ policy
--     except that it only retains one snapshot from the weekly schedule.
--
-- -   @none@: This policy does not take any snapshots. This policy can be
--     assigned to volumes to prevent automatic snapshots from being taken.
--
-- You can also provide the name of a custom policy that you created with
-- the ONTAP CLI or REST API.
--
-- For more information, see
-- <https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/snapshots-ontap.html#snapshot-policies Snapshot policies>
-- in the /Amazon FSx for NetApp ONTAP User Guide/.
--
-- 'storageEfficiencyEnabled', 'createOntapVolumeConfiguration_storageEfficiencyEnabled' - Set to true to enable deduplication, compression, and compaction storage
-- efficiency features on the volume.
--
-- 'tieringPolicy', 'createOntapVolumeConfiguration_tieringPolicy' - Undocumented member.
--
-- 'sizeInMegabytes', 'createOntapVolumeConfiguration_sizeInMegabytes' - Specifies the size of the volume, in megabytes (MB), that you are
-- creating.
--
-- 'storageVirtualMachineId', 'createOntapVolumeConfiguration_storageVirtualMachineId' - Specifies the ONTAP SVM in which to create the volume.
newCreateOntapVolumeConfiguration ::
  -- | 'sizeInMegabytes'
  Prelude.Natural ->
  -- | 'storageVirtualMachineId'
  Prelude.Text ->
  CreateOntapVolumeConfiguration
newCreateOntapVolumeConfiguration :: Natural -> Text -> CreateOntapVolumeConfiguration
newCreateOntapVolumeConfiguration
  Natural
pSizeInMegabytes_
  Text
pStorageVirtualMachineId_ =
    CreateOntapVolumeConfiguration'
      { $sel:copyTagsToBackups:CreateOntapVolumeConfiguration' :: Maybe Bool
copyTagsToBackups =
          forall a. Maybe a
Prelude.Nothing,
        $sel:junctionPath:CreateOntapVolumeConfiguration' :: Maybe Text
junctionPath = forall a. Maybe a
Prelude.Nothing,
        $sel:ontapVolumeType:CreateOntapVolumeConfiguration' :: Maybe InputOntapVolumeType
ontapVolumeType = forall a. Maybe a
Prelude.Nothing,
        $sel:securityStyle:CreateOntapVolumeConfiguration' :: Maybe SecurityStyle
securityStyle = forall a. Maybe a
Prelude.Nothing,
        $sel:snapshotPolicy:CreateOntapVolumeConfiguration' :: Maybe Text
snapshotPolicy = forall a. Maybe a
Prelude.Nothing,
        $sel:storageEfficiencyEnabled:CreateOntapVolumeConfiguration' :: Maybe Bool
storageEfficiencyEnabled = forall a. Maybe a
Prelude.Nothing,
        $sel:tieringPolicy:CreateOntapVolumeConfiguration' :: Maybe TieringPolicy
tieringPolicy = forall a. Maybe a
Prelude.Nothing,
        $sel:sizeInMegabytes:CreateOntapVolumeConfiguration' :: Natural
sizeInMegabytes = Natural
pSizeInMegabytes_,
        $sel:storageVirtualMachineId:CreateOntapVolumeConfiguration' :: Text
storageVirtualMachineId =
          Text
pStorageVirtualMachineId_
      }

-- | A boolean flag indicating whether tags for the volume should be copied
-- to backups. This value defaults to false. If it\'s set to true, all tags
-- for the volume are copied to all automatic and user-initiated backups
-- 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 backups.
-- If you specify one or more tags when creating a user-initiated backup,
-- no tags are copied from the volume, regardless of this value.
createOntapVolumeConfiguration_copyTagsToBackups :: Lens.Lens' CreateOntapVolumeConfiguration (Prelude.Maybe Prelude.Bool)
createOntapVolumeConfiguration_copyTagsToBackups :: Lens' CreateOntapVolumeConfiguration (Maybe Bool)
createOntapVolumeConfiguration_copyTagsToBackups = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateOntapVolumeConfiguration' {Maybe Bool
copyTagsToBackups :: Maybe Bool
$sel:copyTagsToBackups:CreateOntapVolumeConfiguration' :: CreateOntapVolumeConfiguration -> Maybe Bool
copyTagsToBackups} -> Maybe Bool
copyTagsToBackups) (\s :: CreateOntapVolumeConfiguration
s@CreateOntapVolumeConfiguration' {} Maybe Bool
a -> CreateOntapVolumeConfiguration
s {$sel:copyTagsToBackups:CreateOntapVolumeConfiguration' :: Maybe Bool
copyTagsToBackups = Maybe Bool
a} :: CreateOntapVolumeConfiguration)

-- | Specifies the location in the SVM\'s namespace where the volume is
-- mounted. The @JunctionPath@ must have a leading forward slash, such as
-- @\/vol3@.
createOntapVolumeConfiguration_junctionPath :: Lens.Lens' CreateOntapVolumeConfiguration (Prelude.Maybe Prelude.Text)
createOntapVolumeConfiguration_junctionPath :: Lens' CreateOntapVolumeConfiguration (Maybe Text)
createOntapVolumeConfiguration_junctionPath = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateOntapVolumeConfiguration' {Maybe Text
junctionPath :: Maybe Text
$sel:junctionPath:CreateOntapVolumeConfiguration' :: CreateOntapVolumeConfiguration -> Maybe Text
junctionPath} -> Maybe Text
junctionPath) (\s :: CreateOntapVolumeConfiguration
s@CreateOntapVolumeConfiguration' {} Maybe Text
a -> CreateOntapVolumeConfiguration
s {$sel:junctionPath:CreateOntapVolumeConfiguration' :: Maybe Text
junctionPath = Maybe Text
a} :: CreateOntapVolumeConfiguration)

-- | Specifies the type of volume you are creating. Valid values are the
-- following:
--
-- -   @RW@ specifies a read\/write volume. @RW@ is the default.
--
-- -   @DP@ specifies a data-protection volume. A @DP@ volume is read-only
--     and can be used as the destination of a NetApp SnapMirror
--     relationship.
--
-- For more information, see
-- <https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/volume-types Volume types>
-- in the /Amazon FSx for NetApp ONTAP User Guide/.
createOntapVolumeConfiguration_ontapVolumeType :: Lens.Lens' CreateOntapVolumeConfiguration (Prelude.Maybe InputOntapVolumeType)
createOntapVolumeConfiguration_ontapVolumeType :: Lens' CreateOntapVolumeConfiguration (Maybe InputOntapVolumeType)
createOntapVolumeConfiguration_ontapVolumeType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateOntapVolumeConfiguration' {Maybe InputOntapVolumeType
ontapVolumeType :: Maybe InputOntapVolumeType
$sel:ontapVolumeType:CreateOntapVolumeConfiguration' :: CreateOntapVolumeConfiguration -> Maybe InputOntapVolumeType
ontapVolumeType} -> Maybe InputOntapVolumeType
ontapVolumeType) (\s :: CreateOntapVolumeConfiguration
s@CreateOntapVolumeConfiguration' {} Maybe InputOntapVolumeType
a -> CreateOntapVolumeConfiguration
s {$sel:ontapVolumeType:CreateOntapVolumeConfiguration' :: Maybe InputOntapVolumeType
ontapVolumeType = Maybe InputOntapVolumeType
a} :: CreateOntapVolumeConfiguration)

-- | Specifies the security style for the volume. If a volume\'s security
-- style is not specified, it is automatically set to the root volume\'s
-- security style. The security style determines the type of permissions
-- that FSx for ONTAP uses to control data access. For more information,
-- see
-- <https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/managing-volumes.html#volume-security-style Volume security style>
-- in the /Amazon FSx for NetApp ONTAP User Guide/. Specify one of the
-- following values:
--
-- -   @UNIX@ if the file system is managed by a UNIX administrator, the
--     majority of users are NFS clients, and an application accessing the
--     data uses a UNIX user as the service account.
--
-- -   @NTFS@ if the file system is managed by a Windows administrator, the
--     majority of users are SMB clients, and an application accessing the
--     data uses a Windows user as the service account.
--
-- -   @MIXED@ if the file system is managed by both UNIX and Windows
--     administrators and users consist of both NFS and SMB clients.
createOntapVolumeConfiguration_securityStyle :: Lens.Lens' CreateOntapVolumeConfiguration (Prelude.Maybe SecurityStyle)
createOntapVolumeConfiguration_securityStyle :: Lens' CreateOntapVolumeConfiguration (Maybe SecurityStyle)
createOntapVolumeConfiguration_securityStyle = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateOntapVolumeConfiguration' {Maybe SecurityStyle
securityStyle :: Maybe SecurityStyle
$sel:securityStyle:CreateOntapVolumeConfiguration' :: CreateOntapVolumeConfiguration -> Maybe SecurityStyle
securityStyle} -> Maybe SecurityStyle
securityStyle) (\s :: CreateOntapVolumeConfiguration
s@CreateOntapVolumeConfiguration' {} Maybe SecurityStyle
a -> CreateOntapVolumeConfiguration
s {$sel:securityStyle:CreateOntapVolumeConfiguration' :: Maybe SecurityStyle
securityStyle = Maybe SecurityStyle
a} :: CreateOntapVolumeConfiguration)

-- | Specifies the snapshot policy for the volume. There are three built-in
-- snapshot policies:
--
-- -   @default@: This is the default policy. A maximum of six hourly
--     snapshots taken five minutes past the hour. A maximum of two daily
--     snapshots taken Monday through Saturday at 10 minutes after
--     midnight. A maximum of two weekly snapshots taken every Sunday at 15
--     minutes after midnight.
--
-- -   @default-1weekly@: This policy is the same as the @default@ policy
--     except that it only retains one snapshot from the weekly schedule.
--
-- -   @none@: This policy does not take any snapshots. This policy can be
--     assigned to volumes to prevent automatic snapshots from being taken.
--
-- You can also provide the name of a custom policy that you created with
-- the ONTAP CLI or REST API.
--
-- For more information, see
-- <https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/snapshots-ontap.html#snapshot-policies Snapshot policies>
-- in the /Amazon FSx for NetApp ONTAP User Guide/.
createOntapVolumeConfiguration_snapshotPolicy :: Lens.Lens' CreateOntapVolumeConfiguration (Prelude.Maybe Prelude.Text)
createOntapVolumeConfiguration_snapshotPolicy :: Lens' CreateOntapVolumeConfiguration (Maybe Text)
createOntapVolumeConfiguration_snapshotPolicy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateOntapVolumeConfiguration' {Maybe Text
snapshotPolicy :: Maybe Text
$sel:snapshotPolicy:CreateOntapVolumeConfiguration' :: CreateOntapVolumeConfiguration -> Maybe Text
snapshotPolicy} -> Maybe Text
snapshotPolicy) (\s :: CreateOntapVolumeConfiguration
s@CreateOntapVolumeConfiguration' {} Maybe Text
a -> CreateOntapVolumeConfiguration
s {$sel:snapshotPolicy:CreateOntapVolumeConfiguration' :: Maybe Text
snapshotPolicy = Maybe Text
a} :: CreateOntapVolumeConfiguration)

-- | Set to true to enable deduplication, compression, and compaction storage
-- efficiency features on the volume.
createOntapVolumeConfiguration_storageEfficiencyEnabled :: Lens.Lens' CreateOntapVolumeConfiguration (Prelude.Maybe Prelude.Bool)
createOntapVolumeConfiguration_storageEfficiencyEnabled :: Lens' CreateOntapVolumeConfiguration (Maybe Bool)
createOntapVolumeConfiguration_storageEfficiencyEnabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateOntapVolumeConfiguration' {Maybe Bool
storageEfficiencyEnabled :: Maybe Bool
$sel:storageEfficiencyEnabled:CreateOntapVolumeConfiguration' :: CreateOntapVolumeConfiguration -> Maybe Bool
storageEfficiencyEnabled} -> Maybe Bool
storageEfficiencyEnabled) (\s :: CreateOntapVolumeConfiguration
s@CreateOntapVolumeConfiguration' {} Maybe Bool
a -> CreateOntapVolumeConfiguration
s {$sel:storageEfficiencyEnabled:CreateOntapVolumeConfiguration' :: Maybe Bool
storageEfficiencyEnabled = Maybe Bool
a} :: CreateOntapVolumeConfiguration)

-- | Undocumented member.
createOntapVolumeConfiguration_tieringPolicy :: Lens.Lens' CreateOntapVolumeConfiguration (Prelude.Maybe TieringPolicy)
createOntapVolumeConfiguration_tieringPolicy :: Lens' CreateOntapVolumeConfiguration (Maybe TieringPolicy)
createOntapVolumeConfiguration_tieringPolicy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateOntapVolumeConfiguration' {Maybe TieringPolicy
tieringPolicy :: Maybe TieringPolicy
$sel:tieringPolicy:CreateOntapVolumeConfiguration' :: CreateOntapVolumeConfiguration -> Maybe TieringPolicy
tieringPolicy} -> Maybe TieringPolicy
tieringPolicy) (\s :: CreateOntapVolumeConfiguration
s@CreateOntapVolumeConfiguration' {} Maybe TieringPolicy
a -> CreateOntapVolumeConfiguration
s {$sel:tieringPolicy:CreateOntapVolumeConfiguration' :: Maybe TieringPolicy
tieringPolicy = Maybe TieringPolicy
a} :: CreateOntapVolumeConfiguration)

-- | Specifies the size of the volume, in megabytes (MB), that you are
-- creating.
createOntapVolumeConfiguration_sizeInMegabytes :: Lens.Lens' CreateOntapVolumeConfiguration Prelude.Natural
createOntapVolumeConfiguration_sizeInMegabytes :: Lens' CreateOntapVolumeConfiguration Natural
createOntapVolumeConfiguration_sizeInMegabytes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateOntapVolumeConfiguration' {Natural
sizeInMegabytes :: Natural
$sel:sizeInMegabytes:CreateOntapVolumeConfiguration' :: CreateOntapVolumeConfiguration -> Natural
sizeInMegabytes} -> Natural
sizeInMegabytes) (\s :: CreateOntapVolumeConfiguration
s@CreateOntapVolumeConfiguration' {} Natural
a -> CreateOntapVolumeConfiguration
s {$sel:sizeInMegabytes:CreateOntapVolumeConfiguration' :: Natural
sizeInMegabytes = Natural
a} :: CreateOntapVolumeConfiguration)

-- | Specifies the ONTAP SVM in which to create the volume.
createOntapVolumeConfiguration_storageVirtualMachineId :: Lens.Lens' CreateOntapVolumeConfiguration Prelude.Text
createOntapVolumeConfiguration_storageVirtualMachineId :: Lens' CreateOntapVolumeConfiguration Text
createOntapVolumeConfiguration_storageVirtualMachineId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateOntapVolumeConfiguration' {Text
storageVirtualMachineId :: Text
$sel:storageVirtualMachineId:CreateOntapVolumeConfiguration' :: CreateOntapVolumeConfiguration -> Text
storageVirtualMachineId} -> Text
storageVirtualMachineId) (\s :: CreateOntapVolumeConfiguration
s@CreateOntapVolumeConfiguration' {} Text
a -> CreateOntapVolumeConfiguration
s {$sel:storageVirtualMachineId:CreateOntapVolumeConfiguration' :: Text
storageVirtualMachineId = Text
a} :: CreateOntapVolumeConfiguration)

instance
  Prelude.Hashable
    CreateOntapVolumeConfiguration
  where
  hashWithSalt :: Int -> CreateOntapVolumeConfiguration -> Int
hashWithSalt
    Int
_salt
    CreateOntapVolumeConfiguration' {Natural
Maybe Bool
Maybe Text
Maybe InputOntapVolumeType
Maybe SecurityStyle
Maybe TieringPolicy
Text
storageVirtualMachineId :: Text
sizeInMegabytes :: Natural
tieringPolicy :: Maybe TieringPolicy
storageEfficiencyEnabled :: Maybe Bool
snapshotPolicy :: Maybe Text
securityStyle :: Maybe SecurityStyle
ontapVolumeType :: Maybe InputOntapVolumeType
junctionPath :: Maybe Text
copyTagsToBackups :: Maybe Bool
$sel:storageVirtualMachineId:CreateOntapVolumeConfiguration' :: CreateOntapVolumeConfiguration -> Text
$sel:sizeInMegabytes:CreateOntapVolumeConfiguration' :: CreateOntapVolumeConfiguration -> Natural
$sel:tieringPolicy:CreateOntapVolumeConfiguration' :: CreateOntapVolumeConfiguration -> Maybe TieringPolicy
$sel:storageEfficiencyEnabled:CreateOntapVolumeConfiguration' :: CreateOntapVolumeConfiguration -> Maybe Bool
$sel:snapshotPolicy:CreateOntapVolumeConfiguration' :: CreateOntapVolumeConfiguration -> Maybe Text
$sel:securityStyle:CreateOntapVolumeConfiguration' :: CreateOntapVolumeConfiguration -> Maybe SecurityStyle
$sel:ontapVolumeType:CreateOntapVolumeConfiguration' :: CreateOntapVolumeConfiguration -> Maybe InputOntapVolumeType
$sel:junctionPath:CreateOntapVolumeConfiguration' :: CreateOntapVolumeConfiguration -> Maybe Text
$sel:copyTagsToBackups:CreateOntapVolumeConfiguration' :: CreateOntapVolumeConfiguration -> Maybe Bool
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
copyTagsToBackups
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
junctionPath
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe InputOntapVolumeType
ontapVolumeType
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe SecurityStyle
securityStyle
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
snapshotPolicy
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
storageEfficiencyEnabled
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe TieringPolicy
tieringPolicy
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Natural
sizeInMegabytes
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
storageVirtualMachineId

instance
  Prelude.NFData
    CreateOntapVolumeConfiguration
  where
  rnf :: CreateOntapVolumeConfiguration -> ()
rnf CreateOntapVolumeConfiguration' {Natural
Maybe Bool
Maybe Text
Maybe InputOntapVolumeType
Maybe SecurityStyle
Maybe TieringPolicy
Text
storageVirtualMachineId :: Text
sizeInMegabytes :: Natural
tieringPolicy :: Maybe TieringPolicy
storageEfficiencyEnabled :: Maybe Bool
snapshotPolicy :: Maybe Text
securityStyle :: Maybe SecurityStyle
ontapVolumeType :: Maybe InputOntapVolumeType
junctionPath :: Maybe Text
copyTagsToBackups :: Maybe Bool
$sel:storageVirtualMachineId:CreateOntapVolumeConfiguration' :: CreateOntapVolumeConfiguration -> Text
$sel:sizeInMegabytes:CreateOntapVolumeConfiguration' :: CreateOntapVolumeConfiguration -> Natural
$sel:tieringPolicy:CreateOntapVolumeConfiguration' :: CreateOntapVolumeConfiguration -> Maybe TieringPolicy
$sel:storageEfficiencyEnabled:CreateOntapVolumeConfiguration' :: CreateOntapVolumeConfiguration -> Maybe Bool
$sel:snapshotPolicy:CreateOntapVolumeConfiguration' :: CreateOntapVolumeConfiguration -> Maybe Text
$sel:securityStyle:CreateOntapVolumeConfiguration' :: CreateOntapVolumeConfiguration -> Maybe SecurityStyle
$sel:ontapVolumeType:CreateOntapVolumeConfiguration' :: CreateOntapVolumeConfiguration -> Maybe InputOntapVolumeType
$sel:junctionPath:CreateOntapVolumeConfiguration' :: CreateOntapVolumeConfiguration -> Maybe Text
$sel:copyTagsToBackups:CreateOntapVolumeConfiguration' :: CreateOntapVolumeConfiguration -> Maybe Bool
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
copyTagsToBackups
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
junctionPath
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe InputOntapVolumeType
ontapVolumeType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe SecurityStyle
securityStyle
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
snapshotPolicy
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
storageEfficiencyEnabled
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe TieringPolicy
tieringPolicy
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Natural
sizeInMegabytes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
storageVirtualMachineId

instance Data.ToJSON CreateOntapVolumeConfiguration where
  toJSON :: CreateOntapVolumeConfiguration -> Value
toJSON CreateOntapVolumeConfiguration' {Natural
Maybe Bool
Maybe Text
Maybe InputOntapVolumeType
Maybe SecurityStyle
Maybe TieringPolicy
Text
storageVirtualMachineId :: Text
sizeInMegabytes :: Natural
tieringPolicy :: Maybe TieringPolicy
storageEfficiencyEnabled :: Maybe Bool
snapshotPolicy :: Maybe Text
securityStyle :: Maybe SecurityStyle
ontapVolumeType :: Maybe InputOntapVolumeType
junctionPath :: Maybe Text
copyTagsToBackups :: Maybe Bool
$sel:storageVirtualMachineId:CreateOntapVolumeConfiguration' :: CreateOntapVolumeConfiguration -> Text
$sel:sizeInMegabytes:CreateOntapVolumeConfiguration' :: CreateOntapVolumeConfiguration -> Natural
$sel:tieringPolicy:CreateOntapVolumeConfiguration' :: CreateOntapVolumeConfiguration -> Maybe TieringPolicy
$sel:storageEfficiencyEnabled:CreateOntapVolumeConfiguration' :: CreateOntapVolumeConfiguration -> Maybe Bool
$sel:snapshotPolicy:CreateOntapVolumeConfiguration' :: CreateOntapVolumeConfiguration -> Maybe Text
$sel:securityStyle:CreateOntapVolumeConfiguration' :: CreateOntapVolumeConfiguration -> Maybe SecurityStyle
$sel:ontapVolumeType:CreateOntapVolumeConfiguration' :: CreateOntapVolumeConfiguration -> Maybe InputOntapVolumeType
$sel:junctionPath:CreateOntapVolumeConfiguration' :: CreateOntapVolumeConfiguration -> Maybe Text
$sel:copyTagsToBackups:CreateOntapVolumeConfiguration' :: CreateOntapVolumeConfiguration -> Maybe Bool
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"CopyTagsToBackups" 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
copyTagsToBackups,
            (Key
"JunctionPath" 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 Text
junctionPath,
            (Key
"OntapVolumeType" 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 InputOntapVolumeType
ontapVolumeType,
            (Key
"SecurityStyle" 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 SecurityStyle
securityStyle,
            (Key
"SnapshotPolicy" 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 Text
snapshotPolicy,
            (Key
"StorageEfficiencyEnabled" 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
storageEfficiencyEnabled,
            (Key
"TieringPolicy" 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 TieringPolicy
tieringPolicy,
            forall a. a -> Maybe a
Prelude.Just
              (Key
"SizeInMegabytes" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Natural
sizeInMegabytes),
            forall a. a -> Maybe a
Prelude.Just
              ( Key
"StorageVirtualMachineId"
                  forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
storageVirtualMachineId
              )
          ]
      )