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

-- | The configuration of an Amazon FSx for NetApp ONTAP volume.
--
-- /See:/ 'newOntapVolumeConfiguration' smart constructor.
data OntapVolumeConfiguration = OntapVolumeConfiguration'
  { -- | 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.
    OntapVolumeConfiguration -> Maybe Bool
copyTagsToBackups :: Prelude.Maybe Prelude.Bool,
    -- | Specifies the FlexCache endpoint type of the volume. Valid values are
    -- the following:
    --
    -- -   @NONE@ specifies that the volume doesn\'t have a FlexCache
    --     configuration. @NONE@ is the default.
    --
    -- -   @ORIGIN@ specifies that the volume is the origin volume for a
    --     FlexCache volume.
    --
    -- -   @CACHE@ specifies that the volume is a FlexCache volume.
    OntapVolumeConfiguration -> Maybe FlexCacheEndpointType
flexCacheEndpointType :: Prelude.Maybe FlexCacheEndpointType,
    -- | Specifies the directory that network-attached storage (NAS) clients use
    -- to mount the volume, along with the storage virtual machine (SVM) Domain
    -- Name System (DNS) name or IP address. You can create a @JunctionPath@
    -- directly below a parent volume junction or on a directory within a
    -- volume. A @JunctionPath@ for a volume named @vol3@ might be
    -- @\/vol1\/vol2\/vol3@, or @\/vol1\/dir2\/vol3@, or even
    -- @\/dir1\/dir2\/vol3@.
    OntapVolumeConfiguration -> Maybe Text
junctionPath :: Prelude.Maybe Prelude.Text,
    -- | Specifies the type of volume. Valid values are the following:
    --
    -- -   @RW@ specifies a read\/write volume. @RW@ is the default.
    --
    -- -   @DP@ specifies a data-protection volume. You can protect data by
    --     replicating it to data-protection mirror copies. If a disaster
    --     occurs, you can use these data-protection mirror copies to recover
    --     data.
    --
    -- -   @LS@ specifies a load-sharing mirror volume. A load-sharing mirror
    --     reduces the network traffic to a FlexVol volume by providing
    --     additional read-only access to clients.
    OntapVolumeConfiguration -> Maybe OntapVolumeType
ontapVolumeType :: Prelude.Maybe OntapVolumeType,
    -- | The security style for the volume, which can be @UNIX@, @NTFS@, or
    -- @MIXED@.
    OntapVolumeConfiguration -> Maybe SecurityStyle
securityStyle :: Prelude.Maybe SecurityStyle,
    -- | The configured size of the volume, in megabytes (MBs).
    OntapVolumeConfiguration -> Maybe Natural
sizeInMegabytes :: Prelude.Maybe Prelude.Natural,
    -- | 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/.
    OntapVolumeConfiguration -> Maybe Text
snapshotPolicy :: Prelude.Maybe Prelude.Text,
    -- | The volume\'s storage efficiency setting.
    OntapVolumeConfiguration -> Maybe Bool
storageEfficiencyEnabled :: Prelude.Maybe Prelude.Bool,
    -- | The ID of the volume\'s storage virtual machine.
    OntapVolumeConfiguration -> Maybe Text
storageVirtualMachineId :: Prelude.Maybe Prelude.Text,
    -- | A Boolean flag indicating whether this volume is the root volume for its
    -- storage virtual machine (SVM). Only one volume on an SVM can be the root
    -- volume. This value defaults to @false@. If this value is @true@, then
    -- this is the SVM root volume.
    --
    -- This flag is useful when you\'re deleting an SVM, because you must first
    -- delete all non-root volumes. This flag, when set to @false@, helps you
    -- identify which volumes to delete before you can delete the SVM.
    OntapVolumeConfiguration -> Maybe Bool
storageVirtualMachineRoot :: Prelude.Maybe Prelude.Bool,
    -- | The volume\'s @TieringPolicy@ setting.
    OntapVolumeConfiguration -> Maybe TieringPolicy
tieringPolicy :: Prelude.Maybe TieringPolicy,
    -- | The volume\'s universally unique identifier (UUID).
    OntapVolumeConfiguration -> Maybe Text
uuid :: Prelude.Maybe Prelude.Text
  }
  deriving (OntapVolumeConfiguration -> OntapVolumeConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OntapVolumeConfiguration -> OntapVolumeConfiguration -> Bool
$c/= :: OntapVolumeConfiguration -> OntapVolumeConfiguration -> Bool
== :: OntapVolumeConfiguration -> OntapVolumeConfiguration -> Bool
$c== :: OntapVolumeConfiguration -> OntapVolumeConfiguration -> Bool
Prelude.Eq, ReadPrec [OntapVolumeConfiguration]
ReadPrec OntapVolumeConfiguration
Int -> ReadS OntapVolumeConfiguration
ReadS [OntapVolumeConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [OntapVolumeConfiguration]
$creadListPrec :: ReadPrec [OntapVolumeConfiguration]
readPrec :: ReadPrec OntapVolumeConfiguration
$creadPrec :: ReadPrec OntapVolumeConfiguration
readList :: ReadS [OntapVolumeConfiguration]
$creadList :: ReadS [OntapVolumeConfiguration]
readsPrec :: Int -> ReadS OntapVolumeConfiguration
$creadsPrec :: Int -> ReadS OntapVolumeConfiguration
Prelude.Read, Int -> OntapVolumeConfiguration -> ShowS
[OntapVolumeConfiguration] -> ShowS
OntapVolumeConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OntapVolumeConfiguration] -> ShowS
$cshowList :: [OntapVolumeConfiguration] -> ShowS
show :: OntapVolumeConfiguration -> String
$cshow :: OntapVolumeConfiguration -> String
showsPrec :: Int -> OntapVolumeConfiguration -> ShowS
$cshowsPrec :: Int -> OntapVolumeConfiguration -> ShowS
Prelude.Show, forall x.
Rep OntapVolumeConfiguration x -> OntapVolumeConfiguration
forall x.
OntapVolumeConfiguration -> Rep OntapVolumeConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep OntapVolumeConfiguration x -> OntapVolumeConfiguration
$cfrom :: forall x.
OntapVolumeConfiguration -> Rep OntapVolumeConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'OntapVolumeConfiguration' 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', 'ontapVolumeConfiguration_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.
--
-- 'flexCacheEndpointType', 'ontapVolumeConfiguration_flexCacheEndpointType' - Specifies the FlexCache endpoint type of the volume. Valid values are
-- the following:
--
-- -   @NONE@ specifies that the volume doesn\'t have a FlexCache
--     configuration. @NONE@ is the default.
--
-- -   @ORIGIN@ specifies that the volume is the origin volume for a
--     FlexCache volume.
--
-- -   @CACHE@ specifies that the volume is a FlexCache volume.
--
-- 'junctionPath', 'ontapVolumeConfiguration_junctionPath' - Specifies the directory that network-attached storage (NAS) clients use
-- to mount the volume, along with the storage virtual machine (SVM) Domain
-- Name System (DNS) name or IP address. You can create a @JunctionPath@
-- directly below a parent volume junction or on a directory within a
-- volume. A @JunctionPath@ for a volume named @vol3@ might be
-- @\/vol1\/vol2\/vol3@, or @\/vol1\/dir2\/vol3@, or even
-- @\/dir1\/dir2\/vol3@.
--
-- 'ontapVolumeType', 'ontapVolumeConfiguration_ontapVolumeType' - Specifies the type of volume. Valid values are the following:
--
-- -   @RW@ specifies a read\/write volume. @RW@ is the default.
--
-- -   @DP@ specifies a data-protection volume. You can protect data by
--     replicating it to data-protection mirror copies. If a disaster
--     occurs, you can use these data-protection mirror copies to recover
--     data.
--
-- -   @LS@ specifies a load-sharing mirror volume. A load-sharing mirror
--     reduces the network traffic to a FlexVol volume by providing
--     additional read-only access to clients.
--
-- 'securityStyle', 'ontapVolumeConfiguration_securityStyle' - The security style for the volume, which can be @UNIX@, @NTFS@, or
-- @MIXED@.
--
-- 'sizeInMegabytes', 'ontapVolumeConfiguration_sizeInMegabytes' - The configured size of the volume, in megabytes (MBs).
--
-- 'snapshotPolicy', 'ontapVolumeConfiguration_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', 'ontapVolumeConfiguration_storageEfficiencyEnabled' - The volume\'s storage efficiency setting.
--
-- 'storageVirtualMachineId', 'ontapVolumeConfiguration_storageVirtualMachineId' - The ID of the volume\'s storage virtual machine.
--
-- 'storageVirtualMachineRoot', 'ontapVolumeConfiguration_storageVirtualMachineRoot' - A Boolean flag indicating whether this volume is the root volume for its
-- storage virtual machine (SVM). Only one volume on an SVM can be the root
-- volume. This value defaults to @false@. If this value is @true@, then
-- this is the SVM root volume.
--
-- This flag is useful when you\'re deleting an SVM, because you must first
-- delete all non-root volumes. This flag, when set to @false@, helps you
-- identify which volumes to delete before you can delete the SVM.
--
-- 'tieringPolicy', 'ontapVolumeConfiguration_tieringPolicy' - The volume\'s @TieringPolicy@ setting.
--
-- 'uuid', 'ontapVolumeConfiguration_uuid' - The volume\'s universally unique identifier (UUID).
newOntapVolumeConfiguration ::
  OntapVolumeConfiguration
newOntapVolumeConfiguration :: OntapVolumeConfiguration
newOntapVolumeConfiguration =
  OntapVolumeConfiguration'
    { $sel:copyTagsToBackups:OntapVolumeConfiguration' :: Maybe Bool
copyTagsToBackups =
        forall a. Maybe a
Prelude.Nothing,
      $sel:flexCacheEndpointType:OntapVolumeConfiguration' :: Maybe FlexCacheEndpointType
flexCacheEndpointType = forall a. Maybe a
Prelude.Nothing,
      $sel:junctionPath:OntapVolumeConfiguration' :: Maybe Text
junctionPath = forall a. Maybe a
Prelude.Nothing,
      $sel:ontapVolumeType:OntapVolumeConfiguration' :: Maybe OntapVolumeType
ontapVolumeType = forall a. Maybe a
Prelude.Nothing,
      $sel:securityStyle:OntapVolumeConfiguration' :: Maybe SecurityStyle
securityStyle = forall a. Maybe a
Prelude.Nothing,
      $sel:sizeInMegabytes:OntapVolumeConfiguration' :: Maybe Natural
sizeInMegabytes = forall a. Maybe a
Prelude.Nothing,
      $sel:snapshotPolicy:OntapVolumeConfiguration' :: Maybe Text
snapshotPolicy = forall a. Maybe a
Prelude.Nothing,
      $sel:storageEfficiencyEnabled:OntapVolumeConfiguration' :: Maybe Bool
storageEfficiencyEnabled = forall a. Maybe a
Prelude.Nothing,
      $sel:storageVirtualMachineId:OntapVolumeConfiguration' :: Maybe Text
storageVirtualMachineId = forall a. Maybe a
Prelude.Nothing,
      $sel:storageVirtualMachineRoot:OntapVolumeConfiguration' :: Maybe Bool
storageVirtualMachineRoot = forall a. Maybe a
Prelude.Nothing,
      $sel:tieringPolicy:OntapVolumeConfiguration' :: Maybe TieringPolicy
tieringPolicy = forall a. Maybe a
Prelude.Nothing,
      $sel:uuid:OntapVolumeConfiguration' :: Maybe Text
uuid = forall a. Maybe a
Prelude.Nothing
    }

-- | 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.
ontapVolumeConfiguration_copyTagsToBackups :: Lens.Lens' OntapVolumeConfiguration (Prelude.Maybe Prelude.Bool)
ontapVolumeConfiguration_copyTagsToBackups :: Lens' OntapVolumeConfiguration (Maybe Bool)
ontapVolumeConfiguration_copyTagsToBackups = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OntapVolumeConfiguration' {Maybe Bool
copyTagsToBackups :: Maybe Bool
$sel:copyTagsToBackups:OntapVolumeConfiguration' :: OntapVolumeConfiguration -> Maybe Bool
copyTagsToBackups} -> Maybe Bool
copyTagsToBackups) (\s :: OntapVolumeConfiguration
s@OntapVolumeConfiguration' {} Maybe Bool
a -> OntapVolumeConfiguration
s {$sel:copyTagsToBackups:OntapVolumeConfiguration' :: Maybe Bool
copyTagsToBackups = Maybe Bool
a} :: OntapVolumeConfiguration)

-- | Specifies the FlexCache endpoint type of the volume. Valid values are
-- the following:
--
-- -   @NONE@ specifies that the volume doesn\'t have a FlexCache
--     configuration. @NONE@ is the default.
--
-- -   @ORIGIN@ specifies that the volume is the origin volume for a
--     FlexCache volume.
--
-- -   @CACHE@ specifies that the volume is a FlexCache volume.
ontapVolumeConfiguration_flexCacheEndpointType :: Lens.Lens' OntapVolumeConfiguration (Prelude.Maybe FlexCacheEndpointType)
ontapVolumeConfiguration_flexCacheEndpointType :: Lens' OntapVolumeConfiguration (Maybe FlexCacheEndpointType)
ontapVolumeConfiguration_flexCacheEndpointType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OntapVolumeConfiguration' {Maybe FlexCacheEndpointType
flexCacheEndpointType :: Maybe FlexCacheEndpointType
$sel:flexCacheEndpointType:OntapVolumeConfiguration' :: OntapVolumeConfiguration -> Maybe FlexCacheEndpointType
flexCacheEndpointType} -> Maybe FlexCacheEndpointType
flexCacheEndpointType) (\s :: OntapVolumeConfiguration
s@OntapVolumeConfiguration' {} Maybe FlexCacheEndpointType
a -> OntapVolumeConfiguration
s {$sel:flexCacheEndpointType:OntapVolumeConfiguration' :: Maybe FlexCacheEndpointType
flexCacheEndpointType = Maybe FlexCacheEndpointType
a} :: OntapVolumeConfiguration)

-- | Specifies the directory that network-attached storage (NAS) clients use
-- to mount the volume, along with the storage virtual machine (SVM) Domain
-- Name System (DNS) name or IP address. You can create a @JunctionPath@
-- directly below a parent volume junction or on a directory within a
-- volume. A @JunctionPath@ for a volume named @vol3@ might be
-- @\/vol1\/vol2\/vol3@, or @\/vol1\/dir2\/vol3@, or even
-- @\/dir1\/dir2\/vol3@.
ontapVolumeConfiguration_junctionPath :: Lens.Lens' OntapVolumeConfiguration (Prelude.Maybe Prelude.Text)
ontapVolumeConfiguration_junctionPath :: Lens' OntapVolumeConfiguration (Maybe Text)
ontapVolumeConfiguration_junctionPath = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OntapVolumeConfiguration' {Maybe Text
junctionPath :: Maybe Text
$sel:junctionPath:OntapVolumeConfiguration' :: OntapVolumeConfiguration -> Maybe Text
junctionPath} -> Maybe Text
junctionPath) (\s :: OntapVolumeConfiguration
s@OntapVolumeConfiguration' {} Maybe Text
a -> OntapVolumeConfiguration
s {$sel:junctionPath:OntapVolumeConfiguration' :: Maybe Text
junctionPath = Maybe Text
a} :: OntapVolumeConfiguration)

-- | Specifies the type of volume. Valid values are the following:
--
-- -   @RW@ specifies a read\/write volume. @RW@ is the default.
--
-- -   @DP@ specifies a data-protection volume. You can protect data by
--     replicating it to data-protection mirror copies. If a disaster
--     occurs, you can use these data-protection mirror copies to recover
--     data.
--
-- -   @LS@ specifies a load-sharing mirror volume. A load-sharing mirror
--     reduces the network traffic to a FlexVol volume by providing
--     additional read-only access to clients.
ontapVolumeConfiguration_ontapVolumeType :: Lens.Lens' OntapVolumeConfiguration (Prelude.Maybe OntapVolumeType)
ontapVolumeConfiguration_ontapVolumeType :: Lens' OntapVolumeConfiguration (Maybe OntapVolumeType)
ontapVolumeConfiguration_ontapVolumeType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OntapVolumeConfiguration' {Maybe OntapVolumeType
ontapVolumeType :: Maybe OntapVolumeType
$sel:ontapVolumeType:OntapVolumeConfiguration' :: OntapVolumeConfiguration -> Maybe OntapVolumeType
ontapVolumeType} -> Maybe OntapVolumeType
ontapVolumeType) (\s :: OntapVolumeConfiguration
s@OntapVolumeConfiguration' {} Maybe OntapVolumeType
a -> OntapVolumeConfiguration
s {$sel:ontapVolumeType:OntapVolumeConfiguration' :: Maybe OntapVolumeType
ontapVolumeType = Maybe OntapVolumeType
a} :: OntapVolumeConfiguration)

-- | The security style for the volume, which can be @UNIX@, @NTFS@, or
-- @MIXED@.
ontapVolumeConfiguration_securityStyle :: Lens.Lens' OntapVolumeConfiguration (Prelude.Maybe SecurityStyle)
ontapVolumeConfiguration_securityStyle :: Lens' OntapVolumeConfiguration (Maybe SecurityStyle)
ontapVolumeConfiguration_securityStyle = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OntapVolumeConfiguration' {Maybe SecurityStyle
securityStyle :: Maybe SecurityStyle
$sel:securityStyle:OntapVolumeConfiguration' :: OntapVolumeConfiguration -> Maybe SecurityStyle
securityStyle} -> Maybe SecurityStyle
securityStyle) (\s :: OntapVolumeConfiguration
s@OntapVolumeConfiguration' {} Maybe SecurityStyle
a -> OntapVolumeConfiguration
s {$sel:securityStyle:OntapVolumeConfiguration' :: Maybe SecurityStyle
securityStyle = Maybe SecurityStyle
a} :: OntapVolumeConfiguration)

-- | The configured size of the volume, in megabytes (MBs).
ontapVolumeConfiguration_sizeInMegabytes :: Lens.Lens' OntapVolumeConfiguration (Prelude.Maybe Prelude.Natural)
ontapVolumeConfiguration_sizeInMegabytes :: Lens' OntapVolumeConfiguration (Maybe Natural)
ontapVolumeConfiguration_sizeInMegabytes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OntapVolumeConfiguration' {Maybe Natural
sizeInMegabytes :: Maybe Natural
$sel:sizeInMegabytes:OntapVolumeConfiguration' :: OntapVolumeConfiguration -> Maybe Natural
sizeInMegabytes} -> Maybe Natural
sizeInMegabytes) (\s :: OntapVolumeConfiguration
s@OntapVolumeConfiguration' {} Maybe Natural
a -> OntapVolumeConfiguration
s {$sel:sizeInMegabytes:OntapVolumeConfiguration' :: Maybe Natural
sizeInMegabytes = Maybe Natural
a} :: OntapVolumeConfiguration)

-- | 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/.
ontapVolumeConfiguration_snapshotPolicy :: Lens.Lens' OntapVolumeConfiguration (Prelude.Maybe Prelude.Text)
ontapVolumeConfiguration_snapshotPolicy :: Lens' OntapVolumeConfiguration (Maybe Text)
ontapVolumeConfiguration_snapshotPolicy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OntapVolumeConfiguration' {Maybe Text
snapshotPolicy :: Maybe Text
$sel:snapshotPolicy:OntapVolumeConfiguration' :: OntapVolumeConfiguration -> Maybe Text
snapshotPolicy} -> Maybe Text
snapshotPolicy) (\s :: OntapVolumeConfiguration
s@OntapVolumeConfiguration' {} Maybe Text
a -> OntapVolumeConfiguration
s {$sel:snapshotPolicy:OntapVolumeConfiguration' :: Maybe Text
snapshotPolicy = Maybe Text
a} :: OntapVolumeConfiguration)

-- | The volume\'s storage efficiency setting.
ontapVolumeConfiguration_storageEfficiencyEnabled :: Lens.Lens' OntapVolumeConfiguration (Prelude.Maybe Prelude.Bool)
ontapVolumeConfiguration_storageEfficiencyEnabled :: Lens' OntapVolumeConfiguration (Maybe Bool)
ontapVolumeConfiguration_storageEfficiencyEnabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OntapVolumeConfiguration' {Maybe Bool
storageEfficiencyEnabled :: Maybe Bool
$sel:storageEfficiencyEnabled:OntapVolumeConfiguration' :: OntapVolumeConfiguration -> Maybe Bool
storageEfficiencyEnabled} -> Maybe Bool
storageEfficiencyEnabled) (\s :: OntapVolumeConfiguration
s@OntapVolumeConfiguration' {} Maybe Bool
a -> OntapVolumeConfiguration
s {$sel:storageEfficiencyEnabled:OntapVolumeConfiguration' :: Maybe Bool
storageEfficiencyEnabled = Maybe Bool
a} :: OntapVolumeConfiguration)

-- | The ID of the volume\'s storage virtual machine.
ontapVolumeConfiguration_storageVirtualMachineId :: Lens.Lens' OntapVolumeConfiguration (Prelude.Maybe Prelude.Text)
ontapVolumeConfiguration_storageVirtualMachineId :: Lens' OntapVolumeConfiguration (Maybe Text)
ontapVolumeConfiguration_storageVirtualMachineId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OntapVolumeConfiguration' {Maybe Text
storageVirtualMachineId :: Maybe Text
$sel:storageVirtualMachineId:OntapVolumeConfiguration' :: OntapVolumeConfiguration -> Maybe Text
storageVirtualMachineId} -> Maybe Text
storageVirtualMachineId) (\s :: OntapVolumeConfiguration
s@OntapVolumeConfiguration' {} Maybe Text
a -> OntapVolumeConfiguration
s {$sel:storageVirtualMachineId:OntapVolumeConfiguration' :: Maybe Text
storageVirtualMachineId = Maybe Text
a} :: OntapVolumeConfiguration)

-- | A Boolean flag indicating whether this volume is the root volume for its
-- storage virtual machine (SVM). Only one volume on an SVM can be the root
-- volume. This value defaults to @false@. If this value is @true@, then
-- this is the SVM root volume.
--
-- This flag is useful when you\'re deleting an SVM, because you must first
-- delete all non-root volumes. This flag, when set to @false@, helps you
-- identify which volumes to delete before you can delete the SVM.
ontapVolumeConfiguration_storageVirtualMachineRoot :: Lens.Lens' OntapVolumeConfiguration (Prelude.Maybe Prelude.Bool)
ontapVolumeConfiguration_storageVirtualMachineRoot :: Lens' OntapVolumeConfiguration (Maybe Bool)
ontapVolumeConfiguration_storageVirtualMachineRoot = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OntapVolumeConfiguration' {Maybe Bool
storageVirtualMachineRoot :: Maybe Bool
$sel:storageVirtualMachineRoot:OntapVolumeConfiguration' :: OntapVolumeConfiguration -> Maybe Bool
storageVirtualMachineRoot} -> Maybe Bool
storageVirtualMachineRoot) (\s :: OntapVolumeConfiguration
s@OntapVolumeConfiguration' {} Maybe Bool
a -> OntapVolumeConfiguration
s {$sel:storageVirtualMachineRoot:OntapVolumeConfiguration' :: Maybe Bool
storageVirtualMachineRoot = Maybe Bool
a} :: OntapVolumeConfiguration)

-- | The volume\'s @TieringPolicy@ setting.
ontapVolumeConfiguration_tieringPolicy :: Lens.Lens' OntapVolumeConfiguration (Prelude.Maybe TieringPolicy)
ontapVolumeConfiguration_tieringPolicy :: Lens' OntapVolumeConfiguration (Maybe TieringPolicy)
ontapVolumeConfiguration_tieringPolicy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OntapVolumeConfiguration' {Maybe TieringPolicy
tieringPolicy :: Maybe TieringPolicy
$sel:tieringPolicy:OntapVolumeConfiguration' :: OntapVolumeConfiguration -> Maybe TieringPolicy
tieringPolicy} -> Maybe TieringPolicy
tieringPolicy) (\s :: OntapVolumeConfiguration
s@OntapVolumeConfiguration' {} Maybe TieringPolicy
a -> OntapVolumeConfiguration
s {$sel:tieringPolicy:OntapVolumeConfiguration' :: Maybe TieringPolicy
tieringPolicy = Maybe TieringPolicy
a} :: OntapVolumeConfiguration)

-- | The volume\'s universally unique identifier (UUID).
ontapVolumeConfiguration_uuid :: Lens.Lens' OntapVolumeConfiguration (Prelude.Maybe Prelude.Text)
ontapVolumeConfiguration_uuid :: Lens' OntapVolumeConfiguration (Maybe Text)
ontapVolumeConfiguration_uuid = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OntapVolumeConfiguration' {Maybe Text
uuid :: Maybe Text
$sel:uuid:OntapVolumeConfiguration' :: OntapVolumeConfiguration -> Maybe Text
uuid} -> Maybe Text
uuid) (\s :: OntapVolumeConfiguration
s@OntapVolumeConfiguration' {} Maybe Text
a -> OntapVolumeConfiguration
s {$sel:uuid:OntapVolumeConfiguration' :: Maybe Text
uuid = Maybe Text
a} :: OntapVolumeConfiguration)

instance Data.FromJSON OntapVolumeConfiguration where
  parseJSON :: Value -> Parser OntapVolumeConfiguration
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"OntapVolumeConfiguration"
      ( \Object
x ->
          Maybe Bool
-> Maybe FlexCacheEndpointType
-> Maybe Text
-> Maybe OntapVolumeType
-> Maybe SecurityStyle
-> Maybe Natural
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Bool
-> Maybe TieringPolicy
-> Maybe Text
-> OntapVolumeConfiguration
OntapVolumeConfiguration'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CopyTagsToBackups")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"FlexCacheEndpointType")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"JunctionPath")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"OntapVolumeType")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"SecurityStyle")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"SizeInMegabytes")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"SnapshotPolicy")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"StorageEfficiencyEnabled")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"StorageVirtualMachineId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"StorageVirtualMachineRoot")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"TieringPolicy")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"UUID")
      )

instance Prelude.Hashable OntapVolumeConfiguration where
  hashWithSalt :: Int -> OntapVolumeConfiguration -> Int
hashWithSalt Int
_salt OntapVolumeConfiguration' {Maybe Bool
Maybe Natural
Maybe Text
Maybe FlexCacheEndpointType
Maybe OntapVolumeType
Maybe SecurityStyle
Maybe TieringPolicy
uuid :: Maybe Text
tieringPolicy :: Maybe TieringPolicy
storageVirtualMachineRoot :: Maybe Bool
storageVirtualMachineId :: Maybe Text
storageEfficiencyEnabled :: Maybe Bool
snapshotPolicy :: Maybe Text
sizeInMegabytes :: Maybe Natural
securityStyle :: Maybe SecurityStyle
ontapVolumeType :: Maybe OntapVolumeType
junctionPath :: Maybe Text
flexCacheEndpointType :: Maybe FlexCacheEndpointType
copyTagsToBackups :: Maybe Bool
$sel:uuid:OntapVolumeConfiguration' :: OntapVolumeConfiguration -> Maybe Text
$sel:tieringPolicy:OntapVolumeConfiguration' :: OntapVolumeConfiguration -> Maybe TieringPolicy
$sel:storageVirtualMachineRoot:OntapVolumeConfiguration' :: OntapVolumeConfiguration -> Maybe Bool
$sel:storageVirtualMachineId:OntapVolumeConfiguration' :: OntapVolumeConfiguration -> Maybe Text
$sel:storageEfficiencyEnabled:OntapVolumeConfiguration' :: OntapVolumeConfiguration -> Maybe Bool
$sel:snapshotPolicy:OntapVolumeConfiguration' :: OntapVolumeConfiguration -> Maybe Text
$sel:sizeInMegabytes:OntapVolumeConfiguration' :: OntapVolumeConfiguration -> Maybe Natural
$sel:securityStyle:OntapVolumeConfiguration' :: OntapVolumeConfiguration -> Maybe SecurityStyle
$sel:ontapVolumeType:OntapVolumeConfiguration' :: OntapVolumeConfiguration -> Maybe OntapVolumeType
$sel:junctionPath:OntapVolumeConfiguration' :: OntapVolumeConfiguration -> Maybe Text
$sel:flexCacheEndpointType:OntapVolumeConfiguration' :: OntapVolumeConfiguration -> Maybe FlexCacheEndpointType
$sel:copyTagsToBackups:OntapVolumeConfiguration' :: OntapVolumeConfiguration -> 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 FlexCacheEndpointType
flexCacheEndpointType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
junctionPath
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe OntapVolumeType
ontapVolumeType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe SecurityStyle
securityStyle
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
sizeInMegabytes
      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 Text
storageVirtualMachineId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
storageVirtualMachineRoot
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe TieringPolicy
tieringPolicy
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
uuid

instance Prelude.NFData OntapVolumeConfiguration where
  rnf :: OntapVolumeConfiguration -> ()
rnf OntapVolumeConfiguration' {Maybe Bool
Maybe Natural
Maybe Text
Maybe FlexCacheEndpointType
Maybe OntapVolumeType
Maybe SecurityStyle
Maybe TieringPolicy
uuid :: Maybe Text
tieringPolicy :: Maybe TieringPolicy
storageVirtualMachineRoot :: Maybe Bool
storageVirtualMachineId :: Maybe Text
storageEfficiencyEnabled :: Maybe Bool
snapshotPolicy :: Maybe Text
sizeInMegabytes :: Maybe Natural
securityStyle :: Maybe SecurityStyle
ontapVolumeType :: Maybe OntapVolumeType
junctionPath :: Maybe Text
flexCacheEndpointType :: Maybe FlexCacheEndpointType
copyTagsToBackups :: Maybe Bool
$sel:uuid:OntapVolumeConfiguration' :: OntapVolumeConfiguration -> Maybe Text
$sel:tieringPolicy:OntapVolumeConfiguration' :: OntapVolumeConfiguration -> Maybe TieringPolicy
$sel:storageVirtualMachineRoot:OntapVolumeConfiguration' :: OntapVolumeConfiguration -> Maybe Bool
$sel:storageVirtualMachineId:OntapVolumeConfiguration' :: OntapVolumeConfiguration -> Maybe Text
$sel:storageEfficiencyEnabled:OntapVolumeConfiguration' :: OntapVolumeConfiguration -> Maybe Bool
$sel:snapshotPolicy:OntapVolumeConfiguration' :: OntapVolumeConfiguration -> Maybe Text
$sel:sizeInMegabytes:OntapVolumeConfiguration' :: OntapVolumeConfiguration -> Maybe Natural
$sel:securityStyle:OntapVolumeConfiguration' :: OntapVolumeConfiguration -> Maybe SecurityStyle
$sel:ontapVolumeType:OntapVolumeConfiguration' :: OntapVolumeConfiguration -> Maybe OntapVolumeType
$sel:junctionPath:OntapVolumeConfiguration' :: OntapVolumeConfiguration -> Maybe Text
$sel:flexCacheEndpointType:OntapVolumeConfiguration' :: OntapVolumeConfiguration -> Maybe FlexCacheEndpointType
$sel:copyTagsToBackups:OntapVolumeConfiguration' :: OntapVolumeConfiguration -> 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 FlexCacheEndpointType
flexCacheEndpointType
      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 OntapVolumeType
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 Natural
sizeInMegabytes
      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 Text
storageVirtualMachineId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
storageVirtualMachineRoot
      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 Maybe Text
uuid