{-# 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-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 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_userName,
    updateFileSystemAssociation_password,
    updateFileSystemAssociation_fileSystemAssociationARN,

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

    -- * Response Lenses
    updateFileSystemAssociationResponse_fileSystemAssociationARN,
    updateFileSystemAssociationResponse_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

-- | /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 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 password of the user credential.
    UpdateFileSystemAssociation -> Maybe (Sensitive Text)
password :: Prelude.Maybe (Core.Sensitive 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
(UpdateFileSystemAssociation
 -> UpdateFileSystemAssociation -> Bool)
-> (UpdateFileSystemAssociation
    -> UpdateFileSystemAssociation -> Bool)
-> Eq UpdateFileSystemAssociation
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
(Int -> UpdateFileSystemAssociation -> ShowS)
-> (UpdateFileSystemAssociation -> String)
-> ([UpdateFileSystemAssociation] -> ShowS)
-> Show UpdateFileSystemAssociation
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.
 UpdateFileSystemAssociation -> Rep UpdateFileSystemAssociation x)
-> (forall x.
    Rep UpdateFileSystemAssociation x -> UpdateFileSystemAssociation)
-> Generic UpdateFileSystemAssociation
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.
--
-- '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.
--
-- 'password', 'updateFileSystemAssociation_password' - The password of the user credential.
--
-- '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' :: Maybe Text
-> Maybe CacheAttributes
-> Maybe Text
-> Maybe (Sensitive Text)
-> Text
-> UpdateFileSystemAssociation
UpdateFileSystemAssociation'
      { $sel:auditDestinationARN:UpdateFileSystemAssociation' :: Maybe Text
auditDestinationARN =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:cacheAttributes:UpdateFileSystemAssociation' :: Maybe CacheAttributes
cacheAttributes = Maybe CacheAttributes
forall a. Maybe a
Prelude.Nothing,
        $sel:userName:UpdateFileSystemAssociation' :: Maybe Text
userName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:password:UpdateFileSystemAssociation' :: Maybe (Sensitive Text)
password = Maybe (Sensitive Text)
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 :: (Maybe Text -> f (Maybe Text))
-> UpdateFileSystemAssociation -> f UpdateFileSystemAssociation
updateFileSystemAssociation_auditDestinationARN = (UpdateFileSystemAssociation -> Maybe Text)
-> (UpdateFileSystemAssociation
    -> Maybe Text -> UpdateFileSystemAssociation)
-> Lens
     UpdateFileSystemAssociation
     UpdateFileSystemAssociation
     (Maybe Text)
     (Maybe Text)
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 :: (Maybe CacheAttributes -> f (Maybe CacheAttributes))
-> UpdateFileSystemAssociation -> f UpdateFileSystemAssociation
updateFileSystemAssociation_cacheAttributes = (UpdateFileSystemAssociation -> Maybe CacheAttributes)
-> (UpdateFileSystemAssociation
    -> Maybe CacheAttributes -> UpdateFileSystemAssociation)
-> Lens
     UpdateFileSystemAssociation
     UpdateFileSystemAssociation
     (Maybe CacheAttributes)
     (Maybe 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 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 :: (Maybe Text -> f (Maybe Text))
-> UpdateFileSystemAssociation -> f UpdateFileSystemAssociation
updateFileSystemAssociation_userName = (UpdateFileSystemAssociation -> Maybe Text)
-> (UpdateFileSystemAssociation
    -> Maybe Text -> UpdateFileSystemAssociation)
-> Lens
     UpdateFileSystemAssociation
     UpdateFileSystemAssociation
     (Maybe Text)
     (Maybe Text)
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 password of the user credential.
updateFileSystemAssociation_password :: Lens.Lens' UpdateFileSystemAssociation (Prelude.Maybe Prelude.Text)
updateFileSystemAssociation_password :: (Maybe Text -> f (Maybe Text))
-> UpdateFileSystemAssociation -> f UpdateFileSystemAssociation
updateFileSystemAssociation_password = (UpdateFileSystemAssociation -> Maybe (Sensitive Text))
-> (UpdateFileSystemAssociation
    -> Maybe (Sensitive Text) -> UpdateFileSystemAssociation)
-> Lens
     UpdateFileSystemAssociation
     UpdateFileSystemAssociation
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
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) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> UpdateFileSystemAssociation -> f UpdateFileSystemAssociation)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> UpdateFileSystemAssociation
-> f UpdateFileSystemAssociation
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
     (Maybe Text)
     (Maybe 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 (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive

-- | The Amazon Resource Name (ARN) of the file system association that you
-- want to update.
updateFileSystemAssociation_fileSystemAssociationARN :: Lens.Lens' UpdateFileSystemAssociation Prelude.Text
updateFileSystemAssociation_fileSystemAssociationARN :: (Text -> f Text)
-> UpdateFileSystemAssociation -> f UpdateFileSystemAssociation
updateFileSystemAssociation_fileSystemAssociationARN = (UpdateFileSystemAssociation -> Text)
-> (UpdateFileSystemAssociation
    -> Text -> UpdateFileSystemAssociation)
-> Lens
     UpdateFileSystemAssociation UpdateFileSystemAssociation Text Text
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 :: UpdateFileSystemAssociation -> Request UpdateFileSystemAssociation
request = Service
-> UpdateFileSystemAssociation
-> Request UpdateFileSystemAssociation
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateFileSystemAssociation
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateFileSystemAssociation)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateFileSystemAssociation))
-> Logger
-> Service
-> Proxy UpdateFileSystemAssociation
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateFileSystemAssociation)))
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 -> UpdateFileSystemAssociationResponse
UpdateFileSystemAssociationResponse'
            (Maybe Text -> Int -> UpdateFileSystemAssociationResponse)
-> Either String (Maybe Text)
-> Either String (Int -> UpdateFileSystemAssociationResponse)
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
"FileSystemAssociationARN")
            Either String (Int -> UpdateFileSystemAssociationResponse)
-> Either String Int
-> Either String UpdateFileSystemAssociationResponse
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 UpdateFileSystemAssociation

instance Prelude.NFData UpdateFileSystemAssociation

instance Core.ToHeaders UpdateFileSystemAssociation where
  toHeaders :: UpdateFileSystemAssociation -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateFileSystemAssociation -> 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.UpdateFileSystemAssociation" ::
                          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 UpdateFileSystemAssociation where
  toJSON :: UpdateFileSystemAssociation -> Value
toJSON UpdateFileSystemAssociation' {Maybe Text
Maybe (Sensitive Text)
Maybe CacheAttributes
Text
fileSystemAssociationARN :: Text
password :: Maybe (Sensitive Text)
userName :: Maybe Text
cacheAttributes :: Maybe CacheAttributes
auditDestinationARN :: Maybe Text
$sel:fileSystemAssociationARN:UpdateFileSystemAssociation' :: UpdateFileSystemAssociation -> Text
$sel:password:UpdateFileSystemAssociation' :: UpdateFileSystemAssociation -> Maybe (Sensitive Text)
$sel:userName:UpdateFileSystemAssociation' :: UpdateFileSystemAssociation -> Maybe Text
$sel:cacheAttributes:UpdateFileSystemAssociation' :: UpdateFileSystemAssociation -> Maybe CacheAttributes
$sel:auditDestinationARN:UpdateFileSystemAssociation' :: UpdateFileSystemAssociation -> 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
"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
"UserName" 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
userName,
            (Text
"Password" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Sensitive Text -> Pair) -> Maybe (Sensitive Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
password,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"FileSystemAssociationARN"
                  Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
fileSystemAssociationARN
              )
          ]
      )

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

instance Core.ToQuery UpdateFileSystemAssociation where
  toQuery :: UpdateFileSystemAssociation -> QueryString
toQuery = QueryString -> UpdateFileSystemAssociation -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
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
(UpdateFileSystemAssociationResponse
 -> UpdateFileSystemAssociationResponse -> Bool)
-> (UpdateFileSystemAssociationResponse
    -> UpdateFileSystemAssociationResponse -> Bool)
-> Eq UpdateFileSystemAssociationResponse
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]
(Int -> ReadS UpdateFileSystemAssociationResponse)
-> ReadS [UpdateFileSystemAssociationResponse]
-> ReadPrec UpdateFileSystemAssociationResponse
-> ReadPrec [UpdateFileSystemAssociationResponse]
-> Read 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
(Int -> UpdateFileSystemAssociationResponse -> ShowS)
-> (UpdateFileSystemAssociationResponse -> String)
-> ([UpdateFileSystemAssociationResponse] -> ShowS)
-> Show UpdateFileSystemAssociationResponse
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.
 UpdateFileSystemAssociationResponse
 -> Rep UpdateFileSystemAssociationResponse x)
-> (forall x.
    Rep UpdateFileSystemAssociationResponse x
    -> UpdateFileSystemAssociationResponse)
-> Generic UpdateFileSystemAssociationResponse
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' :: Maybe Text -> Int -> UpdateFileSystemAssociationResponse
UpdateFileSystemAssociationResponse'
    { $sel:fileSystemAssociationARN:UpdateFileSystemAssociationResponse' :: Maybe Text
fileSystemAssociationARN =
        Maybe Text
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 :: (Maybe Text -> f (Maybe Text))
-> UpdateFileSystemAssociationResponse
-> f UpdateFileSystemAssociationResponse
updateFileSystemAssociationResponse_fileSystemAssociationARN = (UpdateFileSystemAssociationResponse -> Maybe Text)
-> (UpdateFileSystemAssociationResponse
    -> Maybe Text -> UpdateFileSystemAssociationResponse)
-> Lens
     UpdateFileSystemAssociationResponse
     UpdateFileSystemAssociationResponse
     (Maybe Text)
     (Maybe Text)
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 :: (Int -> f Int)
-> UpdateFileSystemAssociationResponse
-> f UpdateFileSystemAssociationResponse
updateFileSystemAssociationResponse_httpStatus = (UpdateFileSystemAssociationResponse -> Int)
-> (UpdateFileSystemAssociationResponse
    -> Int -> UpdateFileSystemAssociationResponse)
-> Lens
     UpdateFileSystemAssociationResponse
     UpdateFileSystemAssociationResponse
     Int
     Int
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