{-# 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.UpdateFileSystemAssociation
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Updates a file system association. This operation is only supported in
-- the FSx File Gateways.
module Amazonka.StorageGateway.UpdateFileSystemAssociation
  ( -- * Creating a Request
    UpdateFileSystemAssociation (..),
    newUpdateFileSystemAssociation,

    -- * Request Lenses
    updateFileSystemAssociation_auditDestinationARN,
    updateFileSystemAssociation_cacheAttributes,
    updateFileSystemAssociation_password,
    updateFileSystemAssociation_userName,
    updateFileSystemAssociation_fileSystemAssociationARN,

    -- * Destructuring the Response
    UpdateFileSystemAssociationResponse (..),
    newUpdateFileSystemAssociationResponse,

    -- * Response Lenses
    updateFileSystemAssociationResponse_fileSystemAssociationARN,
    updateFileSystemAssociationResponse_httpStatus,
  )
where

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

-- | /See:/ 'newUpdateFileSystemAssociation' smart constructor.
data UpdateFileSystemAssociation = UpdateFileSystemAssociation'
  { -- | The Amazon Resource Name (ARN) of the storage used for the audit logs.
    UpdateFileSystemAssociation -> Maybe Text
auditDestinationARN :: Prelude.Maybe Prelude.Text,
    UpdateFileSystemAssociation -> Maybe CacheAttributes
cacheAttributes :: Prelude.Maybe CacheAttributes,
    -- | The password of the user credential.
    UpdateFileSystemAssociation -> Maybe (Sensitive Text)
password :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | The user name of the user credential that has permission to access the
    -- root share D$ of the Amazon FSx file system. The user account must
    -- belong to the Amazon FSx delegated admin user group.
    UpdateFileSystemAssociation -> Maybe Text
userName :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the file system association that you
    -- want to update.
    UpdateFileSystemAssociation -> Text
fileSystemAssociationARN :: Prelude.Text
  }
  deriving (UpdateFileSystemAssociation -> UpdateFileSystemAssociation -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateFileSystemAssociation -> UpdateFileSystemAssociation -> Bool
$c/= :: UpdateFileSystemAssociation -> UpdateFileSystemAssociation -> Bool
== :: UpdateFileSystemAssociation -> UpdateFileSystemAssociation -> Bool
$c== :: UpdateFileSystemAssociation -> UpdateFileSystemAssociation -> Bool
Prelude.Eq, Int -> UpdateFileSystemAssociation -> ShowS
[UpdateFileSystemAssociation] -> ShowS
UpdateFileSystemAssociation -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateFileSystemAssociation] -> ShowS
$cshowList :: [UpdateFileSystemAssociation] -> ShowS
show :: UpdateFileSystemAssociation -> String
$cshow :: UpdateFileSystemAssociation -> String
showsPrec :: Int -> UpdateFileSystemAssociation -> ShowS
$cshowsPrec :: Int -> UpdateFileSystemAssociation -> ShowS
Prelude.Show, forall x.
Rep UpdateFileSystemAssociation x -> UpdateFileSystemAssociation
forall x.
UpdateFileSystemAssociation -> Rep UpdateFileSystemAssociation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateFileSystemAssociation x -> UpdateFileSystemAssociation
$cfrom :: forall x.
UpdateFileSystemAssociation -> Rep UpdateFileSystemAssociation x
Prelude.Generic)

-- |
-- Create a value of 'UpdateFileSystemAssociation' 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', 'updateFileSystemAssociation_auditDestinationARN' - The Amazon Resource Name (ARN) of the storage used for the audit logs.
--
-- 'cacheAttributes', 'updateFileSystemAssociation_cacheAttributes' - Undocumented member.
--
-- 'password', 'updateFileSystemAssociation_password' - The password of the user credential.
--
-- 'userName', 'updateFileSystemAssociation_userName' - The user name of the user credential that has permission to access the
-- root share D$ of the Amazon FSx file system. The user account must
-- belong to the Amazon FSx delegated admin user group.
--
-- 'fileSystemAssociationARN', 'updateFileSystemAssociation_fileSystemAssociationARN' - The Amazon Resource Name (ARN) of the file system association that you
-- want to update.
newUpdateFileSystemAssociation ::
  -- | 'fileSystemAssociationARN'
  Prelude.Text ->
  UpdateFileSystemAssociation
newUpdateFileSystemAssociation :: Text -> UpdateFileSystemAssociation
newUpdateFileSystemAssociation
  Text
pFileSystemAssociationARN_ =
    UpdateFileSystemAssociation'
      { $sel:auditDestinationARN:UpdateFileSystemAssociation' :: Maybe Text
auditDestinationARN =
          forall a. Maybe a
Prelude.Nothing,
        $sel:cacheAttributes:UpdateFileSystemAssociation' :: Maybe CacheAttributes
cacheAttributes = forall a. Maybe a
Prelude.Nothing,
        $sel:password:UpdateFileSystemAssociation' :: Maybe (Sensitive Text)
password = forall a. Maybe a
Prelude.Nothing,
        $sel:userName:UpdateFileSystemAssociation' :: Maybe Text
userName = forall a. Maybe a
Prelude.Nothing,
        $sel:fileSystemAssociationARN:UpdateFileSystemAssociation' :: Text
fileSystemAssociationARN =
          Text
pFileSystemAssociationARN_
      }

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

-- | Undocumented member.
updateFileSystemAssociation_cacheAttributes :: Lens.Lens' UpdateFileSystemAssociation (Prelude.Maybe CacheAttributes)
updateFileSystemAssociation_cacheAttributes :: Lens' UpdateFileSystemAssociation (Maybe CacheAttributes)
updateFileSystemAssociation_cacheAttributes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFileSystemAssociation' {Maybe CacheAttributes
cacheAttributes :: Maybe CacheAttributes
$sel:cacheAttributes:UpdateFileSystemAssociation' :: UpdateFileSystemAssociation -> Maybe CacheAttributes
cacheAttributes} -> Maybe CacheAttributes
cacheAttributes) (\s :: UpdateFileSystemAssociation
s@UpdateFileSystemAssociation' {} Maybe CacheAttributes
a -> UpdateFileSystemAssociation
s {$sel:cacheAttributes:UpdateFileSystemAssociation' :: Maybe CacheAttributes
cacheAttributes = Maybe CacheAttributes
a} :: UpdateFileSystemAssociation)

-- | The password of the user credential.
updateFileSystemAssociation_password :: Lens.Lens' UpdateFileSystemAssociation (Prelude.Maybe Prelude.Text)
updateFileSystemAssociation_password :: Lens' UpdateFileSystemAssociation (Maybe Text)
updateFileSystemAssociation_password = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFileSystemAssociation' {Maybe (Sensitive Text)
password :: Maybe (Sensitive Text)
$sel:password:UpdateFileSystemAssociation' :: UpdateFileSystemAssociation -> Maybe (Sensitive Text)
password} -> Maybe (Sensitive Text)
password) (\s :: UpdateFileSystemAssociation
s@UpdateFileSystemAssociation' {} Maybe (Sensitive Text)
a -> UpdateFileSystemAssociation
s {$sel:password:UpdateFileSystemAssociation' :: Maybe (Sensitive Text)
password = Maybe (Sensitive Text)
a} :: UpdateFileSystemAssociation) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall a. Iso' (Sensitive a) a
Data._Sensitive

-- | The user name of the user credential that has permission to access the
-- root share D$ of the Amazon FSx file system. The user account must
-- belong to the Amazon FSx delegated admin user group.
updateFileSystemAssociation_userName :: Lens.Lens' UpdateFileSystemAssociation (Prelude.Maybe Prelude.Text)
updateFileSystemAssociation_userName :: Lens' UpdateFileSystemAssociation (Maybe Text)
updateFileSystemAssociation_userName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFileSystemAssociation' {Maybe Text
userName :: Maybe Text
$sel:userName:UpdateFileSystemAssociation' :: UpdateFileSystemAssociation -> Maybe Text
userName} -> Maybe Text
userName) (\s :: UpdateFileSystemAssociation
s@UpdateFileSystemAssociation' {} Maybe Text
a -> UpdateFileSystemAssociation
s {$sel:userName:UpdateFileSystemAssociation' :: Maybe Text
userName = Maybe Text
a} :: UpdateFileSystemAssociation)

-- | The Amazon Resource Name (ARN) of the file system association that you
-- want to update.
updateFileSystemAssociation_fileSystemAssociationARN :: Lens.Lens' UpdateFileSystemAssociation Prelude.Text
updateFileSystemAssociation_fileSystemAssociationARN :: Lens' UpdateFileSystemAssociation Text
updateFileSystemAssociation_fileSystemAssociationARN = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFileSystemAssociation' {Text
fileSystemAssociationARN :: Text
$sel:fileSystemAssociationARN:UpdateFileSystemAssociation' :: UpdateFileSystemAssociation -> Text
fileSystemAssociationARN} -> Text
fileSystemAssociationARN) (\s :: UpdateFileSystemAssociation
s@UpdateFileSystemAssociation' {} Text
a -> UpdateFileSystemAssociation
s {$sel:fileSystemAssociationARN:UpdateFileSystemAssociation' :: Text
fileSystemAssociationARN = Text
a} :: UpdateFileSystemAssociation)

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

instance Prelude.Hashable UpdateFileSystemAssociation where
  hashWithSalt :: Int -> UpdateFileSystemAssociation -> Int
hashWithSalt Int
_salt UpdateFileSystemAssociation' {Maybe Text
Maybe (Sensitive Text)
Maybe CacheAttributes
Text
fileSystemAssociationARN :: Text
userName :: Maybe Text
password :: Maybe (Sensitive Text)
cacheAttributes :: Maybe CacheAttributes
auditDestinationARN :: Maybe Text
$sel:fileSystemAssociationARN:UpdateFileSystemAssociation' :: UpdateFileSystemAssociation -> Text
$sel:userName:UpdateFileSystemAssociation' :: UpdateFileSystemAssociation -> Maybe Text
$sel:password:UpdateFileSystemAssociation' :: UpdateFileSystemAssociation -> Maybe (Sensitive Text)
$sel:cacheAttributes:UpdateFileSystemAssociation' :: UpdateFileSystemAssociation -> Maybe CacheAttributes
$sel:auditDestinationARN:UpdateFileSystemAssociation' :: UpdateFileSystemAssociation -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
auditDestinationARN
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CacheAttributes
cacheAttributes
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
password
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
userName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
fileSystemAssociationARN

instance Prelude.NFData UpdateFileSystemAssociation where
  rnf :: UpdateFileSystemAssociation -> ()
rnf UpdateFileSystemAssociation' {Maybe Text
Maybe (Sensitive Text)
Maybe CacheAttributes
Text
fileSystemAssociationARN :: Text
userName :: Maybe Text
password :: Maybe (Sensitive Text)
cacheAttributes :: Maybe CacheAttributes
auditDestinationARN :: Maybe Text
$sel:fileSystemAssociationARN:UpdateFileSystemAssociation' :: UpdateFileSystemAssociation -> Text
$sel:userName:UpdateFileSystemAssociation' :: UpdateFileSystemAssociation -> Maybe Text
$sel:password:UpdateFileSystemAssociation' :: UpdateFileSystemAssociation -> Maybe (Sensitive Text)
$sel:cacheAttributes:UpdateFileSystemAssociation' :: UpdateFileSystemAssociation -> Maybe CacheAttributes
$sel:auditDestinationARN:UpdateFileSystemAssociation' :: UpdateFileSystemAssociation -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
auditDestinationARN
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe CacheAttributes
cacheAttributes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
password
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
userName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
fileSystemAssociationARN

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

instance Data.ToJSON UpdateFileSystemAssociation where
  toJSON :: UpdateFileSystemAssociation -> Value
toJSON UpdateFileSystemAssociation' {Maybe Text
Maybe (Sensitive Text)
Maybe CacheAttributes
Text
fileSystemAssociationARN :: Text
userName :: Maybe Text
password :: Maybe (Sensitive Text)
cacheAttributes :: Maybe CacheAttributes
auditDestinationARN :: Maybe Text
$sel:fileSystemAssociationARN:UpdateFileSystemAssociation' :: UpdateFileSystemAssociation -> Text
$sel:userName:UpdateFileSystemAssociation' :: UpdateFileSystemAssociation -> Maybe Text
$sel:password:UpdateFileSystemAssociation' :: UpdateFileSystemAssociation -> Maybe (Sensitive Text)
$sel:cacheAttributes:UpdateFileSystemAssociation' :: UpdateFileSystemAssociation -> Maybe CacheAttributes
$sel:auditDestinationARN:UpdateFileSystemAssociation' :: UpdateFileSystemAssociation -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"AuditDestinationARN" 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
auditDestinationARN,
            (Key
"CacheAttributes" 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 CacheAttributes
cacheAttributes,
            (Key
"Password" 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 (Sensitive Text)
password,
            (Key
"UserName" 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
userName,
            forall a. a -> Maybe a
Prelude.Just
              ( Key
"FileSystemAssociationARN"
                  forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
fileSystemAssociationARN
              )
          ]
      )

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

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

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

-- |
-- Create a value of 'UpdateFileSystemAssociationResponse' 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:
--
-- 'fileSystemAssociationARN', 'updateFileSystemAssociationResponse_fileSystemAssociationARN' - The ARN of the updated file system association.
--
-- 'httpStatus', 'updateFileSystemAssociationResponse_httpStatus' - The response's http status code.
newUpdateFileSystemAssociationResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateFileSystemAssociationResponse
newUpdateFileSystemAssociationResponse :: Int -> UpdateFileSystemAssociationResponse
newUpdateFileSystemAssociationResponse Int
pHttpStatus_ =
  UpdateFileSystemAssociationResponse'
    { $sel:fileSystemAssociationARN:UpdateFileSystemAssociationResponse' :: Maybe Text
fileSystemAssociationARN =
        forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateFileSystemAssociationResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The ARN of the updated file system association.
updateFileSystemAssociationResponse_fileSystemAssociationARN :: Lens.Lens' UpdateFileSystemAssociationResponse (Prelude.Maybe Prelude.Text)
updateFileSystemAssociationResponse_fileSystemAssociationARN :: Lens' UpdateFileSystemAssociationResponse (Maybe Text)
updateFileSystemAssociationResponse_fileSystemAssociationARN = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFileSystemAssociationResponse' {Maybe Text
fileSystemAssociationARN :: Maybe Text
$sel:fileSystemAssociationARN:UpdateFileSystemAssociationResponse' :: UpdateFileSystemAssociationResponse -> Maybe Text
fileSystemAssociationARN} -> Maybe Text
fileSystemAssociationARN) (\s :: UpdateFileSystemAssociationResponse
s@UpdateFileSystemAssociationResponse' {} Maybe Text
a -> UpdateFileSystemAssociationResponse
s {$sel:fileSystemAssociationARN:UpdateFileSystemAssociationResponse' :: Maybe Text
fileSystemAssociationARN = Maybe Text
a} :: UpdateFileSystemAssociationResponse)

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

instance
  Prelude.NFData
    UpdateFileSystemAssociationResponse
  where
  rnf :: UpdateFileSystemAssociationResponse -> ()
rnf UpdateFileSystemAssociationResponse' {Int
Maybe Text
httpStatus :: Int
fileSystemAssociationARN :: Maybe Text
$sel:httpStatus:UpdateFileSystemAssociationResponse' :: UpdateFileSystemAssociationResponse -> Int
$sel:fileSystemAssociationARN:UpdateFileSystemAssociationResponse' :: UpdateFileSystemAssociationResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
fileSystemAssociationARN
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus