{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.StorageGateway.UpdateNFSFileShare
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Updates a Network File System (NFS) file share. This operation is only
-- supported in S3 File Gateways.
--
-- To leave a file share field unchanged, set the corresponding input field
-- to null.
--
-- Updates the following file share settings:
--
-- -   Default storage class for your S3 bucket
--
-- -   Metadata defaults for your S3 bucket
--
-- -   Allowed NFS clients for your file share
--
-- -   Squash settings
--
-- -   Write status of your file share
module Amazonka.StorageGateway.UpdateNFSFileShare
  ( -- * Creating a Request
    UpdateNFSFileShare (..),
    newUpdateNFSFileShare,

    -- * Request Lenses
    updateNFSFileShare_auditDestinationARN,
    updateNFSFileShare_kmsKey,
    updateNFSFileShare_cacheAttributes,
    updateNFSFileShare_objectACL,
    updateNFSFileShare_kmsEncrypted,
    updateNFSFileShare_defaultStorageClass,
    updateNFSFileShare_fileShareName,
    updateNFSFileShare_notificationPolicy,
    updateNFSFileShare_squash,
    updateNFSFileShare_requesterPays,
    updateNFSFileShare_nFSFileShareDefaults,
    updateNFSFileShare_clientList,
    updateNFSFileShare_guessMIMETypeEnabled,
    updateNFSFileShare_readOnly,
    updateNFSFileShare_fileShareARN,

    -- * Destructuring the Response
    UpdateNFSFileShareResponse (..),
    newUpdateNFSFileShareResponse,

    -- * Response Lenses
    updateNFSFileShareResponse_fileShareARN,
    updateNFSFileShareResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.StorageGateway.Types

-- | UpdateNFSFileShareInput
--
-- /See:/ 'newUpdateNFSFileShare' smart constructor.
data UpdateNFSFileShare = UpdateNFSFileShare'
  { -- | The Amazon Resource Name (ARN) of the storage used for audit logs.
    UpdateNFSFileShare -> Maybe Text
auditDestinationARN :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of a symmetric customer master key (CMK)
    -- used for Amazon S3 server-side encryption. Storage Gateway does not
    -- support asymmetric CMKs. This value can only be set when @KMSEncrypted@
    -- is @true@. Optional.
    UpdateNFSFileShare -> Maybe Text
kmsKey :: Prelude.Maybe Prelude.Text,
    -- | Specifies refresh cache information for the file share.
    UpdateNFSFileShare -> Maybe CacheAttributes
cacheAttributes :: Prelude.Maybe CacheAttributes,
    -- | A value that sets the access control list (ACL) permission for objects
    -- in the S3 bucket that a S3 File Gateway puts objects into. The default
    -- value is @private@.
    UpdateNFSFileShare -> Maybe ObjectACL
objectACL :: Prelude.Maybe ObjectACL,
    -- | Set to @true@ to use Amazon S3 server-side encryption with your own KMS
    -- key, or @false@ to use a key managed by Amazon S3. Optional.
    --
    -- Valid Values: @true@ | @false@
    UpdateNFSFileShare -> Maybe Bool
kmsEncrypted :: Prelude.Maybe Prelude.Bool,
    -- | The default storage class for objects put into an Amazon S3 bucket by
    -- the S3 File Gateway. The default value is @S3_INTELLIGENT_TIERING@.
    -- Optional.
    --
    -- Valid Values: @S3_STANDARD@ | @S3_INTELLIGENT_TIERING@ |
    -- @S3_STANDARD_IA@ | @S3_ONEZONE_IA@
    UpdateNFSFileShare -> Maybe Text
defaultStorageClass :: Prelude.Maybe Prelude.Text,
    -- | The name of the file share. Optional.
    --
    -- @FileShareName@ must be set if an S3 prefix name is set in
    -- @LocationARN@, or if an access point or access point alias is used.
    UpdateNFSFileShare -> Maybe Text
fileShareName :: Prelude.Maybe Prelude.Text,
    -- | The notification policy of the file share. @SettlingTimeInSeconds@
    -- controls the number of seconds to wait after the last point in time a
    -- client wrote to a file before generating an @ObjectUploaded@
    -- notification. Because clients can make many small writes to files, it\'s
    -- best to set this parameter for as long as possible to avoid generating
    -- multiple notifications for the same file in a small time period.
    --
    -- @SettlingTimeInSeconds@ has no effect on the timing of the object
    -- uploading to Amazon S3, only the timing of the notification.
    --
    -- The following example sets @NotificationPolicy@ on with
    -- @SettlingTimeInSeconds@ set to 60.
    --
    -- @{\\\"Upload\\\": {\\\"SettlingTimeInSeconds\\\": 60}}@
    --
    -- The following example sets @NotificationPolicy@ off.
    --
    -- @{}@
    UpdateNFSFileShare -> Maybe Text
notificationPolicy :: Prelude.Maybe Prelude.Text,
    -- | The user mapped to anonymous user.
    --
    -- Valid values are the following:
    --
    -- -   @RootSquash@: Only root is mapped to anonymous user.
    --
    -- -   @NoSquash@: No one is mapped to anonymous user.
    --
    -- -   @AllSquash@: Everyone is mapped to anonymous user.
    UpdateNFSFileShare -> Maybe Text
squash :: Prelude.Maybe Prelude.Text,
    -- | A value that sets who pays the cost of the request and the cost
    -- associated with data download from the S3 bucket. If this value is set
    -- to @true@, the requester pays the costs; otherwise, the S3 bucket owner
    -- pays. However, the S3 bucket owner always pays the cost of storing data.
    --
    -- @RequesterPays@ is a configuration for the S3 bucket that backs the file
    -- share, so make sure that the configuration on the file share is the same
    -- as the S3 bucket configuration.
    --
    -- Valid Values: @true@ | @false@
    UpdateNFSFileShare -> Maybe Bool
requesterPays :: Prelude.Maybe Prelude.Bool,
    -- | The default values for the file share. Optional.
    UpdateNFSFileShare -> Maybe NFSFileShareDefaults
nFSFileShareDefaults :: Prelude.Maybe NFSFileShareDefaults,
    -- | The list of clients that are allowed to access the S3 File Gateway. The
    -- list must contain either valid IP addresses or valid CIDR blocks.
    UpdateNFSFileShare -> Maybe (NonEmpty Text)
clientList :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
    -- | A value that enables guessing of the MIME type for uploaded objects
    -- based on file extensions. Set this value to @true@ to enable MIME type
    -- guessing, otherwise set to @false@. The default value is @true@.
    --
    -- Valid Values: @true@ | @false@
    UpdateNFSFileShare -> Maybe Bool
guessMIMETypeEnabled :: Prelude.Maybe Prelude.Bool,
    -- | A value that sets the write status of a file share. Set this value to
    -- @true@ to set the write status to read-only, otherwise set to @false@.
    --
    -- Valid Values: @true@ | @false@
    UpdateNFSFileShare -> Maybe Bool
readOnly :: Prelude.Maybe Prelude.Bool,
    -- | The Amazon Resource Name (ARN) of the file share to be updated.
    UpdateNFSFileShare -> Text
fileShareARN :: Prelude.Text
  }
  deriving (UpdateNFSFileShare -> UpdateNFSFileShare -> Bool
(UpdateNFSFileShare -> UpdateNFSFileShare -> Bool)
-> (UpdateNFSFileShare -> UpdateNFSFileShare -> Bool)
-> Eq UpdateNFSFileShare
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateNFSFileShare -> UpdateNFSFileShare -> Bool
$c/= :: UpdateNFSFileShare -> UpdateNFSFileShare -> Bool
== :: UpdateNFSFileShare -> UpdateNFSFileShare -> Bool
$c== :: UpdateNFSFileShare -> UpdateNFSFileShare -> Bool
Prelude.Eq, ReadPrec [UpdateNFSFileShare]
ReadPrec UpdateNFSFileShare
Int -> ReadS UpdateNFSFileShare
ReadS [UpdateNFSFileShare]
(Int -> ReadS UpdateNFSFileShare)
-> ReadS [UpdateNFSFileShare]
-> ReadPrec UpdateNFSFileShare
-> ReadPrec [UpdateNFSFileShare]
-> Read UpdateNFSFileShare
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateNFSFileShare]
$creadListPrec :: ReadPrec [UpdateNFSFileShare]
readPrec :: ReadPrec UpdateNFSFileShare
$creadPrec :: ReadPrec UpdateNFSFileShare
readList :: ReadS [UpdateNFSFileShare]
$creadList :: ReadS [UpdateNFSFileShare]
readsPrec :: Int -> ReadS UpdateNFSFileShare
$creadsPrec :: Int -> ReadS UpdateNFSFileShare
Prelude.Read, Int -> UpdateNFSFileShare -> ShowS
[UpdateNFSFileShare] -> ShowS
UpdateNFSFileShare -> String
(Int -> UpdateNFSFileShare -> ShowS)
-> (UpdateNFSFileShare -> String)
-> ([UpdateNFSFileShare] -> ShowS)
-> Show UpdateNFSFileShare
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateNFSFileShare] -> ShowS
$cshowList :: [UpdateNFSFileShare] -> ShowS
show :: UpdateNFSFileShare -> String
$cshow :: UpdateNFSFileShare -> String
showsPrec :: Int -> UpdateNFSFileShare -> ShowS
$cshowsPrec :: Int -> UpdateNFSFileShare -> ShowS
Prelude.Show, (forall x. UpdateNFSFileShare -> Rep UpdateNFSFileShare x)
-> (forall x. Rep UpdateNFSFileShare x -> UpdateNFSFileShare)
-> Generic UpdateNFSFileShare
forall x. Rep UpdateNFSFileShare x -> UpdateNFSFileShare
forall x. UpdateNFSFileShare -> Rep UpdateNFSFileShare x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateNFSFileShare x -> UpdateNFSFileShare
$cfrom :: forall x. UpdateNFSFileShare -> Rep UpdateNFSFileShare x
Prelude.Generic)

-- |
-- Create a value of 'UpdateNFSFileShare' 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:
--
-- 'auditDestinationARN', 'updateNFSFileShare_auditDestinationARN' - The Amazon Resource Name (ARN) of the storage used for audit logs.
--
-- 'kmsKey', 'updateNFSFileShare_kmsKey' - The Amazon Resource Name (ARN) of a symmetric customer master key (CMK)
-- used for Amazon S3 server-side encryption. Storage Gateway does not
-- support asymmetric CMKs. This value can only be set when @KMSEncrypted@
-- is @true@. Optional.
--
-- 'cacheAttributes', 'updateNFSFileShare_cacheAttributes' - Specifies refresh cache information for the file share.
--
-- 'objectACL', 'updateNFSFileShare_objectACL' - A value that sets the access control list (ACL) permission for objects
-- in the S3 bucket that a S3 File Gateway puts objects into. The default
-- value is @private@.
--
-- 'kmsEncrypted', 'updateNFSFileShare_kmsEncrypted' - Set to @true@ to use Amazon S3 server-side encryption with your own KMS
-- key, or @false@ to use a key managed by Amazon S3. Optional.
--
-- Valid Values: @true@ | @false@
--
-- 'defaultStorageClass', 'updateNFSFileShare_defaultStorageClass' - The default storage class for objects put into an Amazon S3 bucket by
-- the S3 File Gateway. The default value is @S3_INTELLIGENT_TIERING@.
-- Optional.
--
-- Valid Values: @S3_STANDARD@ | @S3_INTELLIGENT_TIERING@ |
-- @S3_STANDARD_IA@ | @S3_ONEZONE_IA@
--
-- 'fileShareName', 'updateNFSFileShare_fileShareName' - The name of the file share. Optional.
--
-- @FileShareName@ must be set if an S3 prefix name is set in
-- @LocationARN@, or if an access point or access point alias is used.
--
-- 'notificationPolicy', 'updateNFSFileShare_notificationPolicy' - The notification policy of the file share. @SettlingTimeInSeconds@
-- controls the number of seconds to wait after the last point in time a
-- client wrote to a file before generating an @ObjectUploaded@
-- notification. Because clients can make many small writes to files, it\'s
-- best to set this parameter for as long as possible to avoid generating
-- multiple notifications for the same file in a small time period.
--
-- @SettlingTimeInSeconds@ has no effect on the timing of the object
-- uploading to Amazon S3, only the timing of the notification.
--
-- The following example sets @NotificationPolicy@ on with
-- @SettlingTimeInSeconds@ set to 60.
--
-- @{\\\"Upload\\\": {\\\"SettlingTimeInSeconds\\\": 60}}@
--
-- The following example sets @NotificationPolicy@ off.
--
-- @{}@
--
-- 'squash', 'updateNFSFileShare_squash' - The user mapped to anonymous user.
--
-- Valid values are the following:
--
-- -   @RootSquash@: Only root is mapped to anonymous user.
--
-- -   @NoSquash@: No one is mapped to anonymous user.
--
-- -   @AllSquash@: Everyone is mapped to anonymous user.
--
-- 'requesterPays', 'updateNFSFileShare_requesterPays' - A value that sets who pays the cost of the request and the cost
-- associated with data download from the S3 bucket. If this value is set
-- to @true@, the requester pays the costs; otherwise, the S3 bucket owner
-- pays. However, the S3 bucket owner always pays the cost of storing data.
--
-- @RequesterPays@ is a configuration for the S3 bucket that backs the file
-- share, so make sure that the configuration on the file share is the same
-- as the S3 bucket configuration.
--
-- Valid Values: @true@ | @false@
--
-- 'nFSFileShareDefaults', 'updateNFSFileShare_nFSFileShareDefaults' - The default values for the file share. Optional.
--
-- 'clientList', 'updateNFSFileShare_clientList' - The list of clients that are allowed to access the S3 File Gateway. The
-- list must contain either valid IP addresses or valid CIDR blocks.
--
-- 'guessMIMETypeEnabled', 'updateNFSFileShare_guessMIMETypeEnabled' - A value that enables guessing of the MIME type for uploaded objects
-- based on file extensions. Set this value to @true@ to enable MIME type
-- guessing, otherwise set to @false@. The default value is @true@.
--
-- Valid Values: @true@ | @false@
--
-- 'readOnly', 'updateNFSFileShare_readOnly' - A value that sets the write status of a file share. Set this value to
-- @true@ to set the write status to read-only, otherwise set to @false@.
--
-- Valid Values: @true@ | @false@
--
-- 'fileShareARN', 'updateNFSFileShare_fileShareARN' - The Amazon Resource Name (ARN) of the file share to be updated.
newUpdateNFSFileShare ::
  -- | 'fileShareARN'
  Prelude.Text ->
  UpdateNFSFileShare
newUpdateNFSFileShare :: Text -> UpdateNFSFileShare
newUpdateNFSFileShare Text
pFileShareARN_ =
  UpdateNFSFileShare' :: Maybe Text
-> Maybe Text
-> Maybe CacheAttributes
-> Maybe ObjectACL
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe NFSFileShareDefaults
-> Maybe (NonEmpty Text)
-> Maybe Bool
-> Maybe Bool
-> Text
-> UpdateNFSFileShare
UpdateNFSFileShare'
    { $sel:auditDestinationARN:UpdateNFSFileShare' :: Maybe Text
auditDestinationARN =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:kmsKey:UpdateNFSFileShare' :: Maybe Text
kmsKey = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:cacheAttributes:UpdateNFSFileShare' :: Maybe CacheAttributes
cacheAttributes = Maybe CacheAttributes
forall a. Maybe a
Prelude.Nothing,
      $sel:objectACL:UpdateNFSFileShare' :: Maybe ObjectACL
objectACL = Maybe ObjectACL
forall a. Maybe a
Prelude.Nothing,
      $sel:kmsEncrypted:UpdateNFSFileShare' :: Maybe Bool
kmsEncrypted = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:defaultStorageClass:UpdateNFSFileShare' :: Maybe Text
defaultStorageClass = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:fileShareName:UpdateNFSFileShare' :: Maybe Text
fileShareName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:notificationPolicy:UpdateNFSFileShare' :: Maybe Text
notificationPolicy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:squash:UpdateNFSFileShare' :: Maybe Text
squash = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:requesterPays:UpdateNFSFileShare' :: Maybe Bool
requesterPays = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:nFSFileShareDefaults:UpdateNFSFileShare' :: Maybe NFSFileShareDefaults
nFSFileShareDefaults = Maybe NFSFileShareDefaults
forall a. Maybe a
Prelude.Nothing,
      $sel:clientList:UpdateNFSFileShare' :: Maybe (NonEmpty Text)
clientList = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:guessMIMETypeEnabled:UpdateNFSFileShare' :: Maybe Bool
guessMIMETypeEnabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:readOnly:UpdateNFSFileShare' :: Maybe Bool
readOnly = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:fileShareARN:UpdateNFSFileShare' :: Text
fileShareARN = Text
pFileShareARN_
    }

-- | The Amazon Resource Name (ARN) of the storage used for audit logs.
updateNFSFileShare_auditDestinationARN :: Lens.Lens' UpdateNFSFileShare (Prelude.Maybe Prelude.Text)
updateNFSFileShare_auditDestinationARN :: (Maybe Text -> f (Maybe Text))
-> UpdateNFSFileShare -> f UpdateNFSFileShare
updateNFSFileShare_auditDestinationARN = (UpdateNFSFileShare -> Maybe Text)
-> (UpdateNFSFileShare -> Maybe Text -> UpdateNFSFileShare)
-> Lens
     UpdateNFSFileShare UpdateNFSFileShare (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNFSFileShare' {Maybe Text
auditDestinationARN :: Maybe Text
$sel:auditDestinationARN:UpdateNFSFileShare' :: UpdateNFSFileShare -> Maybe Text
auditDestinationARN} -> Maybe Text
auditDestinationARN) (\s :: UpdateNFSFileShare
s@UpdateNFSFileShare' {} Maybe Text
a -> UpdateNFSFileShare
s {$sel:auditDestinationARN:UpdateNFSFileShare' :: Maybe Text
auditDestinationARN = Maybe Text
a} :: UpdateNFSFileShare)

-- | The Amazon Resource Name (ARN) of a symmetric customer master key (CMK)
-- used for Amazon S3 server-side encryption. Storage Gateway does not
-- support asymmetric CMKs. This value can only be set when @KMSEncrypted@
-- is @true@. Optional.
updateNFSFileShare_kmsKey :: Lens.Lens' UpdateNFSFileShare (Prelude.Maybe Prelude.Text)
updateNFSFileShare_kmsKey :: (Maybe Text -> f (Maybe Text))
-> UpdateNFSFileShare -> f UpdateNFSFileShare
updateNFSFileShare_kmsKey = (UpdateNFSFileShare -> Maybe Text)
-> (UpdateNFSFileShare -> Maybe Text -> UpdateNFSFileShare)
-> Lens
     UpdateNFSFileShare UpdateNFSFileShare (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNFSFileShare' {Maybe Text
kmsKey :: Maybe Text
$sel:kmsKey:UpdateNFSFileShare' :: UpdateNFSFileShare -> Maybe Text
kmsKey} -> Maybe Text
kmsKey) (\s :: UpdateNFSFileShare
s@UpdateNFSFileShare' {} Maybe Text
a -> UpdateNFSFileShare
s {$sel:kmsKey:UpdateNFSFileShare' :: Maybe Text
kmsKey = Maybe Text
a} :: UpdateNFSFileShare)

-- | Specifies refresh cache information for the file share.
updateNFSFileShare_cacheAttributes :: Lens.Lens' UpdateNFSFileShare (Prelude.Maybe CacheAttributes)
updateNFSFileShare_cacheAttributes :: (Maybe CacheAttributes -> f (Maybe CacheAttributes))
-> UpdateNFSFileShare -> f UpdateNFSFileShare
updateNFSFileShare_cacheAttributes = (UpdateNFSFileShare -> Maybe CacheAttributes)
-> (UpdateNFSFileShare
    -> Maybe CacheAttributes -> UpdateNFSFileShare)
-> Lens
     UpdateNFSFileShare
     UpdateNFSFileShare
     (Maybe CacheAttributes)
     (Maybe CacheAttributes)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNFSFileShare' {Maybe CacheAttributes
cacheAttributes :: Maybe CacheAttributes
$sel:cacheAttributes:UpdateNFSFileShare' :: UpdateNFSFileShare -> Maybe CacheAttributes
cacheAttributes} -> Maybe CacheAttributes
cacheAttributes) (\s :: UpdateNFSFileShare
s@UpdateNFSFileShare' {} Maybe CacheAttributes
a -> UpdateNFSFileShare
s {$sel:cacheAttributes:UpdateNFSFileShare' :: Maybe CacheAttributes
cacheAttributes = Maybe CacheAttributes
a} :: UpdateNFSFileShare)

-- | A value that sets the access control list (ACL) permission for objects
-- in the S3 bucket that a S3 File Gateway puts objects into. The default
-- value is @private@.
updateNFSFileShare_objectACL :: Lens.Lens' UpdateNFSFileShare (Prelude.Maybe ObjectACL)
updateNFSFileShare_objectACL :: (Maybe ObjectACL -> f (Maybe ObjectACL))
-> UpdateNFSFileShare -> f UpdateNFSFileShare
updateNFSFileShare_objectACL = (UpdateNFSFileShare -> Maybe ObjectACL)
-> (UpdateNFSFileShare -> Maybe ObjectACL -> UpdateNFSFileShare)
-> Lens
     UpdateNFSFileShare
     UpdateNFSFileShare
     (Maybe ObjectACL)
     (Maybe ObjectACL)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNFSFileShare' {Maybe ObjectACL
objectACL :: Maybe ObjectACL
$sel:objectACL:UpdateNFSFileShare' :: UpdateNFSFileShare -> Maybe ObjectACL
objectACL} -> Maybe ObjectACL
objectACL) (\s :: UpdateNFSFileShare
s@UpdateNFSFileShare' {} Maybe ObjectACL
a -> UpdateNFSFileShare
s {$sel:objectACL:UpdateNFSFileShare' :: Maybe ObjectACL
objectACL = Maybe ObjectACL
a} :: UpdateNFSFileShare)

-- | Set to @true@ to use Amazon S3 server-side encryption with your own KMS
-- key, or @false@ to use a key managed by Amazon S3. Optional.
--
-- Valid Values: @true@ | @false@
updateNFSFileShare_kmsEncrypted :: Lens.Lens' UpdateNFSFileShare (Prelude.Maybe Prelude.Bool)
updateNFSFileShare_kmsEncrypted :: (Maybe Bool -> f (Maybe Bool))
-> UpdateNFSFileShare -> f UpdateNFSFileShare
updateNFSFileShare_kmsEncrypted = (UpdateNFSFileShare -> Maybe Bool)
-> (UpdateNFSFileShare -> Maybe Bool -> UpdateNFSFileShare)
-> Lens
     UpdateNFSFileShare UpdateNFSFileShare (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNFSFileShare' {Maybe Bool
kmsEncrypted :: Maybe Bool
$sel:kmsEncrypted:UpdateNFSFileShare' :: UpdateNFSFileShare -> Maybe Bool
kmsEncrypted} -> Maybe Bool
kmsEncrypted) (\s :: UpdateNFSFileShare
s@UpdateNFSFileShare' {} Maybe Bool
a -> UpdateNFSFileShare
s {$sel:kmsEncrypted:UpdateNFSFileShare' :: Maybe Bool
kmsEncrypted = Maybe Bool
a} :: UpdateNFSFileShare)

-- | The default storage class for objects put into an Amazon S3 bucket by
-- the S3 File Gateway. The default value is @S3_INTELLIGENT_TIERING@.
-- Optional.
--
-- Valid Values: @S3_STANDARD@ | @S3_INTELLIGENT_TIERING@ |
-- @S3_STANDARD_IA@ | @S3_ONEZONE_IA@
updateNFSFileShare_defaultStorageClass :: Lens.Lens' UpdateNFSFileShare (Prelude.Maybe Prelude.Text)
updateNFSFileShare_defaultStorageClass :: (Maybe Text -> f (Maybe Text))
-> UpdateNFSFileShare -> f UpdateNFSFileShare
updateNFSFileShare_defaultStorageClass = (UpdateNFSFileShare -> Maybe Text)
-> (UpdateNFSFileShare -> Maybe Text -> UpdateNFSFileShare)
-> Lens
     UpdateNFSFileShare UpdateNFSFileShare (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNFSFileShare' {Maybe Text
defaultStorageClass :: Maybe Text
$sel:defaultStorageClass:UpdateNFSFileShare' :: UpdateNFSFileShare -> Maybe Text
defaultStorageClass} -> Maybe Text
defaultStorageClass) (\s :: UpdateNFSFileShare
s@UpdateNFSFileShare' {} Maybe Text
a -> UpdateNFSFileShare
s {$sel:defaultStorageClass:UpdateNFSFileShare' :: Maybe Text
defaultStorageClass = Maybe Text
a} :: UpdateNFSFileShare)

-- | The name of the file share. Optional.
--
-- @FileShareName@ must be set if an S3 prefix name is set in
-- @LocationARN@, or if an access point or access point alias is used.
updateNFSFileShare_fileShareName :: Lens.Lens' UpdateNFSFileShare (Prelude.Maybe Prelude.Text)
updateNFSFileShare_fileShareName :: (Maybe Text -> f (Maybe Text))
-> UpdateNFSFileShare -> f UpdateNFSFileShare
updateNFSFileShare_fileShareName = (UpdateNFSFileShare -> Maybe Text)
-> (UpdateNFSFileShare -> Maybe Text -> UpdateNFSFileShare)
-> Lens
     UpdateNFSFileShare UpdateNFSFileShare (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNFSFileShare' {Maybe Text
fileShareName :: Maybe Text
$sel:fileShareName:UpdateNFSFileShare' :: UpdateNFSFileShare -> Maybe Text
fileShareName} -> Maybe Text
fileShareName) (\s :: UpdateNFSFileShare
s@UpdateNFSFileShare' {} Maybe Text
a -> UpdateNFSFileShare
s {$sel:fileShareName:UpdateNFSFileShare' :: Maybe Text
fileShareName = Maybe Text
a} :: UpdateNFSFileShare)

-- | The notification policy of the file share. @SettlingTimeInSeconds@
-- controls the number of seconds to wait after the last point in time a
-- client wrote to a file before generating an @ObjectUploaded@
-- notification. Because clients can make many small writes to files, it\'s
-- best to set this parameter for as long as possible to avoid generating
-- multiple notifications for the same file in a small time period.
--
-- @SettlingTimeInSeconds@ has no effect on the timing of the object
-- uploading to Amazon S3, only the timing of the notification.
--
-- The following example sets @NotificationPolicy@ on with
-- @SettlingTimeInSeconds@ set to 60.
--
-- @{\\\"Upload\\\": {\\\"SettlingTimeInSeconds\\\": 60}}@
--
-- The following example sets @NotificationPolicy@ off.
--
-- @{}@
updateNFSFileShare_notificationPolicy :: Lens.Lens' UpdateNFSFileShare (Prelude.Maybe Prelude.Text)
updateNFSFileShare_notificationPolicy :: (Maybe Text -> f (Maybe Text))
-> UpdateNFSFileShare -> f UpdateNFSFileShare
updateNFSFileShare_notificationPolicy = (UpdateNFSFileShare -> Maybe Text)
-> (UpdateNFSFileShare -> Maybe Text -> UpdateNFSFileShare)
-> Lens
     UpdateNFSFileShare UpdateNFSFileShare (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNFSFileShare' {Maybe Text
notificationPolicy :: Maybe Text
$sel:notificationPolicy:UpdateNFSFileShare' :: UpdateNFSFileShare -> Maybe Text
notificationPolicy} -> Maybe Text
notificationPolicy) (\s :: UpdateNFSFileShare
s@UpdateNFSFileShare' {} Maybe Text
a -> UpdateNFSFileShare
s {$sel:notificationPolicy:UpdateNFSFileShare' :: Maybe Text
notificationPolicy = Maybe Text
a} :: UpdateNFSFileShare)

-- | The user mapped to anonymous user.
--
-- Valid values are the following:
--
-- -   @RootSquash@: Only root is mapped to anonymous user.
--
-- -   @NoSquash@: No one is mapped to anonymous user.
--
-- -   @AllSquash@: Everyone is mapped to anonymous user.
updateNFSFileShare_squash :: Lens.Lens' UpdateNFSFileShare (Prelude.Maybe Prelude.Text)
updateNFSFileShare_squash :: (Maybe Text -> f (Maybe Text))
-> UpdateNFSFileShare -> f UpdateNFSFileShare
updateNFSFileShare_squash = (UpdateNFSFileShare -> Maybe Text)
-> (UpdateNFSFileShare -> Maybe Text -> UpdateNFSFileShare)
-> Lens
     UpdateNFSFileShare UpdateNFSFileShare (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNFSFileShare' {Maybe Text
squash :: Maybe Text
$sel:squash:UpdateNFSFileShare' :: UpdateNFSFileShare -> Maybe Text
squash} -> Maybe Text
squash) (\s :: UpdateNFSFileShare
s@UpdateNFSFileShare' {} Maybe Text
a -> UpdateNFSFileShare
s {$sel:squash:UpdateNFSFileShare' :: Maybe Text
squash = Maybe Text
a} :: UpdateNFSFileShare)

-- | A value that sets who pays the cost of the request and the cost
-- associated with data download from the S3 bucket. If this value is set
-- to @true@, the requester pays the costs; otherwise, the S3 bucket owner
-- pays. However, the S3 bucket owner always pays the cost of storing data.
--
-- @RequesterPays@ is a configuration for the S3 bucket that backs the file
-- share, so make sure that the configuration on the file share is the same
-- as the S3 bucket configuration.
--
-- Valid Values: @true@ | @false@
updateNFSFileShare_requesterPays :: Lens.Lens' UpdateNFSFileShare (Prelude.Maybe Prelude.Bool)
updateNFSFileShare_requesterPays :: (Maybe Bool -> f (Maybe Bool))
-> UpdateNFSFileShare -> f UpdateNFSFileShare
updateNFSFileShare_requesterPays = (UpdateNFSFileShare -> Maybe Bool)
-> (UpdateNFSFileShare -> Maybe Bool -> UpdateNFSFileShare)
-> Lens
     UpdateNFSFileShare UpdateNFSFileShare (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNFSFileShare' {Maybe Bool
requesterPays :: Maybe Bool
$sel:requesterPays:UpdateNFSFileShare' :: UpdateNFSFileShare -> Maybe Bool
requesterPays} -> Maybe Bool
requesterPays) (\s :: UpdateNFSFileShare
s@UpdateNFSFileShare' {} Maybe Bool
a -> UpdateNFSFileShare
s {$sel:requesterPays:UpdateNFSFileShare' :: Maybe Bool
requesterPays = Maybe Bool
a} :: UpdateNFSFileShare)

-- | The default values for the file share. Optional.
updateNFSFileShare_nFSFileShareDefaults :: Lens.Lens' UpdateNFSFileShare (Prelude.Maybe NFSFileShareDefaults)
updateNFSFileShare_nFSFileShareDefaults :: (Maybe NFSFileShareDefaults -> f (Maybe NFSFileShareDefaults))
-> UpdateNFSFileShare -> f UpdateNFSFileShare
updateNFSFileShare_nFSFileShareDefaults = (UpdateNFSFileShare -> Maybe NFSFileShareDefaults)
-> (UpdateNFSFileShare
    -> Maybe NFSFileShareDefaults -> UpdateNFSFileShare)
-> Lens
     UpdateNFSFileShare
     UpdateNFSFileShare
     (Maybe NFSFileShareDefaults)
     (Maybe NFSFileShareDefaults)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNFSFileShare' {Maybe NFSFileShareDefaults
nFSFileShareDefaults :: Maybe NFSFileShareDefaults
$sel:nFSFileShareDefaults:UpdateNFSFileShare' :: UpdateNFSFileShare -> Maybe NFSFileShareDefaults
nFSFileShareDefaults} -> Maybe NFSFileShareDefaults
nFSFileShareDefaults) (\s :: UpdateNFSFileShare
s@UpdateNFSFileShare' {} Maybe NFSFileShareDefaults
a -> UpdateNFSFileShare
s {$sel:nFSFileShareDefaults:UpdateNFSFileShare' :: Maybe NFSFileShareDefaults
nFSFileShareDefaults = Maybe NFSFileShareDefaults
a} :: UpdateNFSFileShare)

-- | The list of clients that are allowed to access the S3 File Gateway. The
-- list must contain either valid IP addresses or valid CIDR blocks.
updateNFSFileShare_clientList :: Lens.Lens' UpdateNFSFileShare (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
updateNFSFileShare_clientList :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> UpdateNFSFileShare -> f UpdateNFSFileShare
updateNFSFileShare_clientList = (UpdateNFSFileShare -> Maybe (NonEmpty Text))
-> (UpdateNFSFileShare
    -> Maybe (NonEmpty Text) -> UpdateNFSFileShare)
-> Lens
     UpdateNFSFileShare
     UpdateNFSFileShare
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNFSFileShare' {Maybe (NonEmpty Text)
clientList :: Maybe (NonEmpty Text)
$sel:clientList:UpdateNFSFileShare' :: UpdateNFSFileShare -> Maybe (NonEmpty Text)
clientList} -> Maybe (NonEmpty Text)
clientList) (\s :: UpdateNFSFileShare
s@UpdateNFSFileShare' {} Maybe (NonEmpty Text)
a -> UpdateNFSFileShare
s {$sel:clientList:UpdateNFSFileShare' :: Maybe (NonEmpty Text)
clientList = Maybe (NonEmpty Text)
a} :: UpdateNFSFileShare) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
 -> UpdateNFSFileShare -> f UpdateNFSFileShare)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
    -> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> UpdateNFSFileShare
-> f UpdateNFSFileShare
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
-> Iso
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
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 AnIso
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A value that enables guessing of the MIME type for uploaded objects
-- based on file extensions. Set this value to @true@ to enable MIME type
-- guessing, otherwise set to @false@. The default value is @true@.
--
-- Valid Values: @true@ | @false@
updateNFSFileShare_guessMIMETypeEnabled :: Lens.Lens' UpdateNFSFileShare (Prelude.Maybe Prelude.Bool)
updateNFSFileShare_guessMIMETypeEnabled :: (Maybe Bool -> f (Maybe Bool))
-> UpdateNFSFileShare -> f UpdateNFSFileShare
updateNFSFileShare_guessMIMETypeEnabled = (UpdateNFSFileShare -> Maybe Bool)
-> (UpdateNFSFileShare -> Maybe Bool -> UpdateNFSFileShare)
-> Lens
     UpdateNFSFileShare UpdateNFSFileShare (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNFSFileShare' {Maybe Bool
guessMIMETypeEnabled :: Maybe Bool
$sel:guessMIMETypeEnabled:UpdateNFSFileShare' :: UpdateNFSFileShare -> Maybe Bool
guessMIMETypeEnabled} -> Maybe Bool
guessMIMETypeEnabled) (\s :: UpdateNFSFileShare
s@UpdateNFSFileShare' {} Maybe Bool
a -> UpdateNFSFileShare
s {$sel:guessMIMETypeEnabled:UpdateNFSFileShare' :: Maybe Bool
guessMIMETypeEnabled = Maybe Bool
a} :: UpdateNFSFileShare)

-- | A value that sets the write status of a file share. Set this value to
-- @true@ to set the write status to read-only, otherwise set to @false@.
--
-- Valid Values: @true@ | @false@
updateNFSFileShare_readOnly :: Lens.Lens' UpdateNFSFileShare (Prelude.Maybe Prelude.Bool)
updateNFSFileShare_readOnly :: (Maybe Bool -> f (Maybe Bool))
-> UpdateNFSFileShare -> f UpdateNFSFileShare
updateNFSFileShare_readOnly = (UpdateNFSFileShare -> Maybe Bool)
-> (UpdateNFSFileShare -> Maybe Bool -> UpdateNFSFileShare)
-> Lens
     UpdateNFSFileShare UpdateNFSFileShare (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNFSFileShare' {Maybe Bool
readOnly :: Maybe Bool
$sel:readOnly:UpdateNFSFileShare' :: UpdateNFSFileShare -> Maybe Bool
readOnly} -> Maybe Bool
readOnly) (\s :: UpdateNFSFileShare
s@UpdateNFSFileShare' {} Maybe Bool
a -> UpdateNFSFileShare
s {$sel:readOnly:UpdateNFSFileShare' :: Maybe Bool
readOnly = Maybe Bool
a} :: UpdateNFSFileShare)

-- | The Amazon Resource Name (ARN) of the file share to be updated.
updateNFSFileShare_fileShareARN :: Lens.Lens' UpdateNFSFileShare Prelude.Text
updateNFSFileShare_fileShareARN :: (Text -> f Text) -> UpdateNFSFileShare -> f UpdateNFSFileShare
updateNFSFileShare_fileShareARN = (UpdateNFSFileShare -> Text)
-> (UpdateNFSFileShare -> Text -> UpdateNFSFileShare)
-> Lens UpdateNFSFileShare UpdateNFSFileShare Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNFSFileShare' {Text
fileShareARN :: Text
$sel:fileShareARN:UpdateNFSFileShare' :: UpdateNFSFileShare -> Text
fileShareARN} -> Text
fileShareARN) (\s :: UpdateNFSFileShare
s@UpdateNFSFileShare' {} Text
a -> UpdateNFSFileShare
s {$sel:fileShareARN:UpdateNFSFileShare' :: Text
fileShareARN = Text
a} :: UpdateNFSFileShare)

instance Core.AWSRequest UpdateNFSFileShare where
  type
    AWSResponse UpdateNFSFileShare =
      UpdateNFSFileShareResponse
  request :: UpdateNFSFileShare -> Request UpdateNFSFileShare
request = Service -> UpdateNFSFileShare -> Request UpdateNFSFileShare
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateNFSFileShare
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateNFSFileShare)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateNFSFileShare))
-> Logger
-> Service
-> Proxy UpdateNFSFileShare
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateNFSFileShare)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text -> Int -> UpdateNFSFileShareResponse
UpdateNFSFileShareResponse'
            (Maybe Text -> Int -> UpdateNFSFileShareResponse)
-> Either String (Maybe Text)
-> Either String (Int -> UpdateNFSFileShareResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"FileShareARN")
            Either String (Int -> UpdateNFSFileShareResponse)
-> Either String Int -> Either String UpdateNFSFileShareResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable UpdateNFSFileShare

instance Prelude.NFData UpdateNFSFileShare

instance Core.ToHeaders UpdateNFSFileShare where
  toHeaders :: UpdateNFSFileShare -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateNFSFileShare -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"StorageGateway_20130630.UpdateNFSFileShare" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON UpdateNFSFileShare where
  toJSON :: UpdateNFSFileShare -> Value
toJSON UpdateNFSFileShare' {Maybe Bool
Maybe (NonEmpty Text)
Maybe Text
Maybe CacheAttributes
Maybe NFSFileShareDefaults
Maybe ObjectACL
Text
fileShareARN :: Text
readOnly :: Maybe Bool
guessMIMETypeEnabled :: Maybe Bool
clientList :: Maybe (NonEmpty Text)
nFSFileShareDefaults :: Maybe NFSFileShareDefaults
requesterPays :: Maybe Bool
squash :: Maybe Text
notificationPolicy :: Maybe Text
fileShareName :: Maybe Text
defaultStorageClass :: Maybe Text
kmsEncrypted :: Maybe Bool
objectACL :: Maybe ObjectACL
cacheAttributes :: Maybe CacheAttributes
kmsKey :: Maybe Text
auditDestinationARN :: Maybe Text
$sel:fileShareARN:UpdateNFSFileShare' :: UpdateNFSFileShare -> Text
$sel:readOnly:UpdateNFSFileShare' :: UpdateNFSFileShare -> Maybe Bool
$sel:guessMIMETypeEnabled:UpdateNFSFileShare' :: UpdateNFSFileShare -> Maybe Bool
$sel:clientList:UpdateNFSFileShare' :: UpdateNFSFileShare -> Maybe (NonEmpty Text)
$sel:nFSFileShareDefaults:UpdateNFSFileShare' :: UpdateNFSFileShare -> Maybe NFSFileShareDefaults
$sel:requesterPays:UpdateNFSFileShare' :: UpdateNFSFileShare -> Maybe Bool
$sel:squash:UpdateNFSFileShare' :: UpdateNFSFileShare -> Maybe Text
$sel:notificationPolicy:UpdateNFSFileShare' :: UpdateNFSFileShare -> Maybe Text
$sel:fileShareName:UpdateNFSFileShare' :: UpdateNFSFileShare -> Maybe Text
$sel:defaultStorageClass:UpdateNFSFileShare' :: UpdateNFSFileShare -> Maybe Text
$sel:kmsEncrypted:UpdateNFSFileShare' :: UpdateNFSFileShare -> Maybe Bool
$sel:objectACL:UpdateNFSFileShare' :: UpdateNFSFileShare -> Maybe ObjectACL
$sel:cacheAttributes:UpdateNFSFileShare' :: UpdateNFSFileShare -> Maybe CacheAttributes
$sel:kmsKey:UpdateNFSFileShare' :: UpdateNFSFileShare -> Maybe Text
$sel:auditDestinationARN:UpdateNFSFileShare' :: UpdateNFSFileShare -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"AuditDestinationARN" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
auditDestinationARN,
            (Text
"KMSKey" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
kmsKey,
            (Text
"CacheAttributes" Text -> CacheAttributes -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (CacheAttributes -> Pair) -> Maybe CacheAttributes -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CacheAttributes
cacheAttributes,
            (Text
"ObjectACL" Text -> ObjectACL -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (ObjectACL -> Pair) -> Maybe ObjectACL -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ObjectACL
objectACL,
            (Text
"KMSEncrypted" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
kmsEncrypted,
            (Text
"DefaultStorageClass" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
defaultStorageClass,
            (Text
"FileShareName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
fileShareName,
            (Text
"NotificationPolicy" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
notificationPolicy,
            (Text
"Squash" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
squash,
            (Text
"RequesterPays" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
requesterPays,
            (Text
"NFSFileShareDefaults" Text -> NFSFileShareDefaults -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (NFSFileShareDefaults -> Pair)
-> Maybe NFSFileShareDefaults -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe NFSFileShareDefaults
nFSFileShareDefaults,
            (Text
"ClientList" Text -> NonEmpty Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NonEmpty Text -> Pair) -> Maybe (NonEmpty Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Text)
clientList,
            (Text
"GuessMIMETypeEnabled" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
guessMIMETypeEnabled,
            (Text
"ReadOnly" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
readOnly,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"FileShareARN" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
fileShareARN)
          ]
      )

instance Core.ToPath UpdateNFSFileShare where
  toPath :: UpdateNFSFileShare -> ByteString
toPath = ByteString -> UpdateNFSFileShare -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery UpdateNFSFileShare where
  toQuery :: UpdateNFSFileShare -> QueryString
toQuery = QueryString -> UpdateNFSFileShare -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | UpdateNFSFileShareOutput
--
-- /See:/ 'newUpdateNFSFileShareResponse' smart constructor.
data UpdateNFSFileShareResponse = UpdateNFSFileShareResponse'
  { -- | The Amazon Resource Name (ARN) of the updated file share.
    UpdateNFSFileShareResponse -> Maybe Text
fileShareARN :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    UpdateNFSFileShareResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateNFSFileShareResponse -> UpdateNFSFileShareResponse -> Bool
(UpdateNFSFileShareResponse -> UpdateNFSFileShareResponse -> Bool)
-> (UpdateNFSFileShareResponse
    -> UpdateNFSFileShareResponse -> Bool)
-> Eq UpdateNFSFileShareResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateNFSFileShareResponse -> UpdateNFSFileShareResponse -> Bool
$c/= :: UpdateNFSFileShareResponse -> UpdateNFSFileShareResponse -> Bool
== :: UpdateNFSFileShareResponse -> UpdateNFSFileShareResponse -> Bool
$c== :: UpdateNFSFileShareResponse -> UpdateNFSFileShareResponse -> Bool
Prelude.Eq, ReadPrec [UpdateNFSFileShareResponse]
ReadPrec UpdateNFSFileShareResponse
Int -> ReadS UpdateNFSFileShareResponse
ReadS [UpdateNFSFileShareResponse]
(Int -> ReadS UpdateNFSFileShareResponse)
-> ReadS [UpdateNFSFileShareResponse]
-> ReadPrec UpdateNFSFileShareResponse
-> ReadPrec [UpdateNFSFileShareResponse]
-> Read UpdateNFSFileShareResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateNFSFileShareResponse]
$creadListPrec :: ReadPrec [UpdateNFSFileShareResponse]
readPrec :: ReadPrec UpdateNFSFileShareResponse
$creadPrec :: ReadPrec UpdateNFSFileShareResponse
readList :: ReadS [UpdateNFSFileShareResponse]
$creadList :: ReadS [UpdateNFSFileShareResponse]
readsPrec :: Int -> ReadS UpdateNFSFileShareResponse
$creadsPrec :: Int -> ReadS UpdateNFSFileShareResponse
Prelude.Read, Int -> UpdateNFSFileShareResponse -> ShowS
[UpdateNFSFileShareResponse] -> ShowS
UpdateNFSFileShareResponse -> String
(Int -> UpdateNFSFileShareResponse -> ShowS)
-> (UpdateNFSFileShareResponse -> String)
-> ([UpdateNFSFileShareResponse] -> ShowS)
-> Show UpdateNFSFileShareResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateNFSFileShareResponse] -> ShowS
$cshowList :: [UpdateNFSFileShareResponse] -> ShowS
show :: UpdateNFSFileShareResponse -> String
$cshow :: UpdateNFSFileShareResponse -> String
showsPrec :: Int -> UpdateNFSFileShareResponse -> ShowS
$cshowsPrec :: Int -> UpdateNFSFileShareResponse -> ShowS
Prelude.Show, (forall x.
 UpdateNFSFileShareResponse -> Rep UpdateNFSFileShareResponse x)
-> (forall x.
    Rep UpdateNFSFileShareResponse x -> UpdateNFSFileShareResponse)
-> Generic UpdateNFSFileShareResponse
forall x.
Rep UpdateNFSFileShareResponse x -> UpdateNFSFileShareResponse
forall x.
UpdateNFSFileShareResponse -> Rep UpdateNFSFileShareResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateNFSFileShareResponse x -> UpdateNFSFileShareResponse
$cfrom :: forall x.
UpdateNFSFileShareResponse -> Rep UpdateNFSFileShareResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateNFSFileShareResponse' 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:
--
-- 'fileShareARN', 'updateNFSFileShareResponse_fileShareARN' - The Amazon Resource Name (ARN) of the updated file share.
--
-- 'httpStatus', 'updateNFSFileShareResponse_httpStatus' - The response's http status code.
newUpdateNFSFileShareResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateNFSFileShareResponse
newUpdateNFSFileShareResponse :: Int -> UpdateNFSFileShareResponse
newUpdateNFSFileShareResponse Int
pHttpStatus_ =
  UpdateNFSFileShareResponse' :: Maybe Text -> Int -> UpdateNFSFileShareResponse
UpdateNFSFileShareResponse'
    { $sel:fileShareARN:UpdateNFSFileShareResponse' :: Maybe Text
fileShareARN =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateNFSFileShareResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The Amazon Resource Name (ARN) of the updated file share.
updateNFSFileShareResponse_fileShareARN :: Lens.Lens' UpdateNFSFileShareResponse (Prelude.Maybe Prelude.Text)
updateNFSFileShareResponse_fileShareARN :: (Maybe Text -> f (Maybe Text))
-> UpdateNFSFileShareResponse -> f UpdateNFSFileShareResponse
updateNFSFileShareResponse_fileShareARN = (UpdateNFSFileShareResponse -> Maybe Text)
-> (UpdateNFSFileShareResponse
    -> Maybe Text -> UpdateNFSFileShareResponse)
-> Lens
     UpdateNFSFileShareResponse
     UpdateNFSFileShareResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNFSFileShareResponse' {Maybe Text
fileShareARN :: Maybe Text
$sel:fileShareARN:UpdateNFSFileShareResponse' :: UpdateNFSFileShareResponse -> Maybe Text
fileShareARN} -> Maybe Text
fileShareARN) (\s :: UpdateNFSFileShareResponse
s@UpdateNFSFileShareResponse' {} Maybe Text
a -> UpdateNFSFileShareResponse
s {$sel:fileShareARN:UpdateNFSFileShareResponse' :: Maybe Text
fileShareARN = Maybe Text
a} :: UpdateNFSFileShareResponse)

-- | The response's http status code.
updateNFSFileShareResponse_httpStatus :: Lens.Lens' UpdateNFSFileShareResponse Prelude.Int
updateNFSFileShareResponse_httpStatus :: (Int -> f Int)
-> UpdateNFSFileShareResponse -> f UpdateNFSFileShareResponse
updateNFSFileShareResponse_httpStatus = (UpdateNFSFileShareResponse -> Int)
-> (UpdateNFSFileShareResponse
    -> Int -> UpdateNFSFileShareResponse)
-> Lens
     UpdateNFSFileShareResponse UpdateNFSFileShareResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNFSFileShareResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateNFSFileShareResponse' :: UpdateNFSFileShareResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateNFSFileShareResponse
s@UpdateNFSFileShareResponse' {} Int
a -> UpdateNFSFileShareResponse
s {$sel:httpStatus:UpdateNFSFileShareResponse' :: Int
httpStatus = Int
a} :: UpdateNFSFileShareResponse)

instance Prelude.NFData UpdateNFSFileShareResponse