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

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

-- |
-- Module      : Amazonka.StorageGateway.Types.FileSystemAssociationInfo
-- 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)
module Amazonka.StorageGateway.Types.FileSystemAssociationInfo where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.StorageGateway.Types.CacheAttributes
import Amazonka.StorageGateway.Types.EndpointNetworkConfiguration
import Amazonka.StorageGateway.Types.FileSystemAssociationStatusDetail
import Amazonka.StorageGateway.Types.Tag

-- | Describes the object returned by @DescribeFileSystemAssociations@ that
-- describes a created file system association.
--
-- /See:/ 'newFileSystemAssociationInfo' smart constructor.
data FileSystemAssociationInfo = FileSystemAssociationInfo'
  { -- | The Amazon Resource Name (ARN) of the storage used for the audit logs.
    FileSystemAssociationInfo -> Maybe Text
auditDestinationARN :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the file system association.
    FileSystemAssociationInfo -> Maybe Text
fileSystemAssociationARN :: Prelude.Maybe Prelude.Text,
    FileSystemAssociationInfo -> Maybe Text
gatewayARN :: Prelude.Maybe Prelude.Text,
    FileSystemAssociationInfo -> Maybe CacheAttributes
cacheAttributes :: Prelude.Maybe CacheAttributes,
    -- | An array containing the FileSystemAssociationStatusDetail data type,
    -- which provides detailed information on file system association status.
    FileSystemAssociationInfo
-> Maybe [FileSystemAssociationStatusDetail]
fileSystemAssociationStatusDetails :: Prelude.Maybe [FileSystemAssociationStatusDetail],
    -- | Specifies network configuration information for the gateway associated
    -- with the Amazon FSx file system.
    --
    -- If multiple file systems are associated with this gateway, this
    -- parameter\'s @IpAddresses@ field is required.
    FileSystemAssociationInfo -> Maybe EndpointNetworkConfiguration
endpointNetworkConfiguration :: Prelude.Maybe EndpointNetworkConfiguration,
    -- | The ARN of the backend Amazon FSx file system used for storing file
    -- data. For information, see
    -- <https://docs.aws.amazon.com/fsx/latest/APIReference/API_FileSystem.html FileSystem>
    -- in the /Amazon FSx API Reference/.
    FileSystemAssociationInfo -> Maybe Text
locationARN :: Prelude.Maybe Prelude.Text,
    -- | The status of the file system association. Valid Values: @AVAILABLE@ |
    -- @CREATING@ | @DELETING@ | @FORCE_DELETING@ | @UPDATING@ | @ERROR@
    FileSystemAssociationInfo -> Maybe Text
fileSystemAssociationStatus :: Prelude.Maybe Prelude.Text,
    -- | A list of up to 50 tags assigned to the SMB file share, sorted
    -- alphabetically by key name. Each tag is a key-value pair.
    FileSystemAssociationInfo -> Maybe [Tag]
tags :: Prelude.Maybe [Tag]
  }
  deriving (FileSystemAssociationInfo -> FileSystemAssociationInfo -> Bool
(FileSystemAssociationInfo -> FileSystemAssociationInfo -> Bool)
-> (FileSystemAssociationInfo -> FileSystemAssociationInfo -> Bool)
-> Eq FileSystemAssociationInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FileSystemAssociationInfo -> FileSystemAssociationInfo -> Bool
$c/= :: FileSystemAssociationInfo -> FileSystemAssociationInfo -> Bool
== :: FileSystemAssociationInfo -> FileSystemAssociationInfo -> Bool
$c== :: FileSystemAssociationInfo -> FileSystemAssociationInfo -> Bool
Prelude.Eq, ReadPrec [FileSystemAssociationInfo]
ReadPrec FileSystemAssociationInfo
Int -> ReadS FileSystemAssociationInfo
ReadS [FileSystemAssociationInfo]
(Int -> ReadS FileSystemAssociationInfo)
-> ReadS [FileSystemAssociationInfo]
-> ReadPrec FileSystemAssociationInfo
-> ReadPrec [FileSystemAssociationInfo]
-> Read FileSystemAssociationInfo
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FileSystemAssociationInfo]
$creadListPrec :: ReadPrec [FileSystemAssociationInfo]
readPrec :: ReadPrec FileSystemAssociationInfo
$creadPrec :: ReadPrec FileSystemAssociationInfo
readList :: ReadS [FileSystemAssociationInfo]
$creadList :: ReadS [FileSystemAssociationInfo]
readsPrec :: Int -> ReadS FileSystemAssociationInfo
$creadsPrec :: Int -> ReadS FileSystemAssociationInfo
Prelude.Read, Int -> FileSystemAssociationInfo -> ShowS
[FileSystemAssociationInfo] -> ShowS
FileSystemAssociationInfo -> String
(Int -> FileSystemAssociationInfo -> ShowS)
-> (FileSystemAssociationInfo -> String)
-> ([FileSystemAssociationInfo] -> ShowS)
-> Show FileSystemAssociationInfo
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FileSystemAssociationInfo] -> ShowS
$cshowList :: [FileSystemAssociationInfo] -> ShowS
show :: FileSystemAssociationInfo -> String
$cshow :: FileSystemAssociationInfo -> String
showsPrec :: Int -> FileSystemAssociationInfo -> ShowS
$cshowsPrec :: Int -> FileSystemAssociationInfo -> ShowS
Prelude.Show, (forall x.
 FileSystemAssociationInfo -> Rep FileSystemAssociationInfo x)
-> (forall x.
    Rep FileSystemAssociationInfo x -> FileSystemAssociationInfo)
-> Generic FileSystemAssociationInfo
forall x.
Rep FileSystemAssociationInfo x -> FileSystemAssociationInfo
forall x.
FileSystemAssociationInfo -> Rep FileSystemAssociationInfo x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep FileSystemAssociationInfo x -> FileSystemAssociationInfo
$cfrom :: forall x.
FileSystemAssociationInfo -> Rep FileSystemAssociationInfo x
Prelude.Generic)

-- |
-- Create a value of 'FileSystemAssociationInfo' 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', 'fileSystemAssociationInfo_auditDestinationARN' - The Amazon Resource Name (ARN) of the storage used for the audit logs.
--
-- 'fileSystemAssociationARN', 'fileSystemAssociationInfo_fileSystemAssociationARN' - The Amazon Resource Name (ARN) of the file system association.
--
-- 'gatewayARN', 'fileSystemAssociationInfo_gatewayARN' - Undocumented member.
--
-- 'cacheAttributes', 'fileSystemAssociationInfo_cacheAttributes' - Undocumented member.
--
-- 'fileSystemAssociationStatusDetails', 'fileSystemAssociationInfo_fileSystemAssociationStatusDetails' - An array containing the FileSystemAssociationStatusDetail data type,
-- which provides detailed information on file system association status.
--
-- 'endpointNetworkConfiguration', 'fileSystemAssociationInfo_endpointNetworkConfiguration' - Specifies network configuration information for the gateway associated
-- with the Amazon FSx file system.
--
-- If multiple file systems are associated with this gateway, this
-- parameter\'s @IpAddresses@ field is required.
--
-- 'locationARN', 'fileSystemAssociationInfo_locationARN' - The ARN of the backend Amazon FSx file system used for storing file
-- data. For information, see
-- <https://docs.aws.amazon.com/fsx/latest/APIReference/API_FileSystem.html FileSystem>
-- in the /Amazon FSx API Reference/.
--
-- 'fileSystemAssociationStatus', 'fileSystemAssociationInfo_fileSystemAssociationStatus' - The status of the file system association. Valid Values: @AVAILABLE@ |
-- @CREATING@ | @DELETING@ | @FORCE_DELETING@ | @UPDATING@ | @ERROR@
--
-- 'tags', 'fileSystemAssociationInfo_tags' - A list of up to 50 tags assigned to the SMB file share, sorted
-- alphabetically by key name. Each tag is a key-value pair.
newFileSystemAssociationInfo ::
  FileSystemAssociationInfo
newFileSystemAssociationInfo :: FileSystemAssociationInfo
newFileSystemAssociationInfo =
  FileSystemAssociationInfo' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe CacheAttributes
-> Maybe [FileSystemAssociationStatusDetail]
-> Maybe EndpointNetworkConfiguration
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> FileSystemAssociationInfo
FileSystemAssociationInfo'
    { $sel:auditDestinationARN:FileSystemAssociationInfo' :: Maybe Text
auditDestinationARN =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:fileSystemAssociationARN:FileSystemAssociationInfo' :: Maybe Text
fileSystemAssociationARN = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:gatewayARN:FileSystemAssociationInfo' :: Maybe Text
gatewayARN = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:cacheAttributes:FileSystemAssociationInfo' :: Maybe CacheAttributes
cacheAttributes = Maybe CacheAttributes
forall a. Maybe a
Prelude.Nothing,
      $sel:fileSystemAssociationStatusDetails:FileSystemAssociationInfo' :: Maybe [FileSystemAssociationStatusDetail]
fileSystemAssociationStatusDetails =
        Maybe [FileSystemAssociationStatusDetail]
forall a. Maybe a
Prelude.Nothing,
      $sel:endpointNetworkConfiguration:FileSystemAssociationInfo' :: Maybe EndpointNetworkConfiguration
endpointNetworkConfiguration = Maybe EndpointNetworkConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:locationARN:FileSystemAssociationInfo' :: Maybe Text
locationARN = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:fileSystemAssociationStatus:FileSystemAssociationInfo' :: Maybe Text
fileSystemAssociationStatus = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:FileSystemAssociationInfo' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing
    }

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

-- | The Amazon Resource Name (ARN) of the file system association.
fileSystemAssociationInfo_fileSystemAssociationARN :: Lens.Lens' FileSystemAssociationInfo (Prelude.Maybe Prelude.Text)
fileSystemAssociationInfo_fileSystemAssociationARN :: (Maybe Text -> f (Maybe Text))
-> FileSystemAssociationInfo -> f FileSystemAssociationInfo
fileSystemAssociationInfo_fileSystemAssociationARN = (FileSystemAssociationInfo -> Maybe Text)
-> (FileSystemAssociationInfo
    -> Maybe Text -> FileSystemAssociationInfo)
-> Lens
     FileSystemAssociationInfo
     FileSystemAssociationInfo
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FileSystemAssociationInfo' {Maybe Text
fileSystemAssociationARN :: Maybe Text
$sel:fileSystemAssociationARN:FileSystemAssociationInfo' :: FileSystemAssociationInfo -> Maybe Text
fileSystemAssociationARN} -> Maybe Text
fileSystemAssociationARN) (\s :: FileSystemAssociationInfo
s@FileSystemAssociationInfo' {} Maybe Text
a -> FileSystemAssociationInfo
s {$sel:fileSystemAssociationARN:FileSystemAssociationInfo' :: Maybe Text
fileSystemAssociationARN = Maybe Text
a} :: FileSystemAssociationInfo)

-- | Undocumented member.
fileSystemAssociationInfo_gatewayARN :: Lens.Lens' FileSystemAssociationInfo (Prelude.Maybe Prelude.Text)
fileSystemAssociationInfo_gatewayARN :: (Maybe Text -> f (Maybe Text))
-> FileSystemAssociationInfo -> f FileSystemAssociationInfo
fileSystemAssociationInfo_gatewayARN = (FileSystemAssociationInfo -> Maybe Text)
-> (FileSystemAssociationInfo
    -> Maybe Text -> FileSystemAssociationInfo)
-> Lens
     FileSystemAssociationInfo
     FileSystemAssociationInfo
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FileSystemAssociationInfo' {Maybe Text
gatewayARN :: Maybe Text
$sel:gatewayARN:FileSystemAssociationInfo' :: FileSystemAssociationInfo -> Maybe Text
gatewayARN} -> Maybe Text
gatewayARN) (\s :: FileSystemAssociationInfo
s@FileSystemAssociationInfo' {} Maybe Text
a -> FileSystemAssociationInfo
s {$sel:gatewayARN:FileSystemAssociationInfo' :: Maybe Text
gatewayARN = Maybe Text
a} :: FileSystemAssociationInfo)

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

-- | An array containing the FileSystemAssociationStatusDetail data type,
-- which provides detailed information on file system association status.
fileSystemAssociationInfo_fileSystemAssociationStatusDetails :: Lens.Lens' FileSystemAssociationInfo (Prelude.Maybe [FileSystemAssociationStatusDetail])
fileSystemAssociationInfo_fileSystemAssociationStatusDetails :: (Maybe [FileSystemAssociationStatusDetail]
 -> f (Maybe [FileSystemAssociationStatusDetail]))
-> FileSystemAssociationInfo -> f FileSystemAssociationInfo
fileSystemAssociationInfo_fileSystemAssociationStatusDetails = (FileSystemAssociationInfo
 -> Maybe [FileSystemAssociationStatusDetail])
-> (FileSystemAssociationInfo
    -> Maybe [FileSystemAssociationStatusDetail]
    -> FileSystemAssociationInfo)
-> Lens
     FileSystemAssociationInfo
     FileSystemAssociationInfo
     (Maybe [FileSystemAssociationStatusDetail])
     (Maybe [FileSystemAssociationStatusDetail])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FileSystemAssociationInfo' {Maybe [FileSystemAssociationStatusDetail]
fileSystemAssociationStatusDetails :: Maybe [FileSystemAssociationStatusDetail]
$sel:fileSystemAssociationStatusDetails:FileSystemAssociationInfo' :: FileSystemAssociationInfo
-> Maybe [FileSystemAssociationStatusDetail]
fileSystemAssociationStatusDetails} -> Maybe [FileSystemAssociationStatusDetail]
fileSystemAssociationStatusDetails) (\s :: FileSystemAssociationInfo
s@FileSystemAssociationInfo' {} Maybe [FileSystemAssociationStatusDetail]
a -> FileSystemAssociationInfo
s {$sel:fileSystemAssociationStatusDetails:FileSystemAssociationInfo' :: Maybe [FileSystemAssociationStatusDetail]
fileSystemAssociationStatusDetails = Maybe [FileSystemAssociationStatusDetail]
a} :: FileSystemAssociationInfo) ((Maybe [FileSystemAssociationStatusDetail]
  -> f (Maybe [FileSystemAssociationStatusDetail]))
 -> FileSystemAssociationInfo -> f FileSystemAssociationInfo)
-> ((Maybe [FileSystemAssociationStatusDetail]
     -> f (Maybe [FileSystemAssociationStatusDetail]))
    -> Maybe [FileSystemAssociationStatusDetail]
    -> f (Maybe [FileSystemAssociationStatusDetail]))
-> (Maybe [FileSystemAssociationStatusDetail]
    -> f (Maybe [FileSystemAssociationStatusDetail]))
-> FileSystemAssociationInfo
-> f FileSystemAssociationInfo
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [FileSystemAssociationStatusDetail]
  [FileSystemAssociationStatusDetail]
  [FileSystemAssociationStatusDetail]
  [FileSystemAssociationStatusDetail]
-> Iso
     (Maybe [FileSystemAssociationStatusDetail])
     (Maybe [FileSystemAssociationStatusDetail])
     (Maybe [FileSystemAssociationStatusDetail])
     (Maybe [FileSystemAssociationStatusDetail])
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
  [FileSystemAssociationStatusDetail]
  [FileSystemAssociationStatusDetail]
  [FileSystemAssociationStatusDetail]
  [FileSystemAssociationStatusDetail]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Specifies network configuration information for the gateway associated
-- with the Amazon FSx file system.
--
-- If multiple file systems are associated with this gateway, this
-- parameter\'s @IpAddresses@ field is required.
fileSystemAssociationInfo_endpointNetworkConfiguration :: Lens.Lens' FileSystemAssociationInfo (Prelude.Maybe EndpointNetworkConfiguration)
fileSystemAssociationInfo_endpointNetworkConfiguration :: (Maybe EndpointNetworkConfiguration
 -> f (Maybe EndpointNetworkConfiguration))
-> FileSystemAssociationInfo -> f FileSystemAssociationInfo
fileSystemAssociationInfo_endpointNetworkConfiguration = (FileSystemAssociationInfo -> Maybe EndpointNetworkConfiguration)
-> (FileSystemAssociationInfo
    -> Maybe EndpointNetworkConfiguration -> FileSystemAssociationInfo)
-> Lens
     FileSystemAssociationInfo
     FileSystemAssociationInfo
     (Maybe EndpointNetworkConfiguration)
     (Maybe EndpointNetworkConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FileSystemAssociationInfo' {Maybe EndpointNetworkConfiguration
endpointNetworkConfiguration :: Maybe EndpointNetworkConfiguration
$sel:endpointNetworkConfiguration:FileSystemAssociationInfo' :: FileSystemAssociationInfo -> Maybe EndpointNetworkConfiguration
endpointNetworkConfiguration} -> Maybe EndpointNetworkConfiguration
endpointNetworkConfiguration) (\s :: FileSystemAssociationInfo
s@FileSystemAssociationInfo' {} Maybe EndpointNetworkConfiguration
a -> FileSystemAssociationInfo
s {$sel:endpointNetworkConfiguration:FileSystemAssociationInfo' :: Maybe EndpointNetworkConfiguration
endpointNetworkConfiguration = Maybe EndpointNetworkConfiguration
a} :: FileSystemAssociationInfo)

-- | The ARN of the backend Amazon FSx file system used for storing file
-- data. For information, see
-- <https://docs.aws.amazon.com/fsx/latest/APIReference/API_FileSystem.html FileSystem>
-- in the /Amazon FSx API Reference/.
fileSystemAssociationInfo_locationARN :: Lens.Lens' FileSystemAssociationInfo (Prelude.Maybe Prelude.Text)
fileSystemAssociationInfo_locationARN :: (Maybe Text -> f (Maybe Text))
-> FileSystemAssociationInfo -> f FileSystemAssociationInfo
fileSystemAssociationInfo_locationARN = (FileSystemAssociationInfo -> Maybe Text)
-> (FileSystemAssociationInfo
    -> Maybe Text -> FileSystemAssociationInfo)
-> Lens
     FileSystemAssociationInfo
     FileSystemAssociationInfo
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FileSystemAssociationInfo' {Maybe Text
locationARN :: Maybe Text
$sel:locationARN:FileSystemAssociationInfo' :: FileSystemAssociationInfo -> Maybe Text
locationARN} -> Maybe Text
locationARN) (\s :: FileSystemAssociationInfo
s@FileSystemAssociationInfo' {} Maybe Text
a -> FileSystemAssociationInfo
s {$sel:locationARN:FileSystemAssociationInfo' :: Maybe Text
locationARN = Maybe Text
a} :: FileSystemAssociationInfo)

-- | The status of the file system association. Valid Values: @AVAILABLE@ |
-- @CREATING@ | @DELETING@ | @FORCE_DELETING@ | @UPDATING@ | @ERROR@
fileSystemAssociationInfo_fileSystemAssociationStatus :: Lens.Lens' FileSystemAssociationInfo (Prelude.Maybe Prelude.Text)
fileSystemAssociationInfo_fileSystemAssociationStatus :: (Maybe Text -> f (Maybe Text))
-> FileSystemAssociationInfo -> f FileSystemAssociationInfo
fileSystemAssociationInfo_fileSystemAssociationStatus = (FileSystemAssociationInfo -> Maybe Text)
-> (FileSystemAssociationInfo
    -> Maybe Text -> FileSystemAssociationInfo)
-> Lens
     FileSystemAssociationInfo
     FileSystemAssociationInfo
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FileSystemAssociationInfo' {Maybe Text
fileSystemAssociationStatus :: Maybe Text
$sel:fileSystemAssociationStatus:FileSystemAssociationInfo' :: FileSystemAssociationInfo -> Maybe Text
fileSystemAssociationStatus} -> Maybe Text
fileSystemAssociationStatus) (\s :: FileSystemAssociationInfo
s@FileSystemAssociationInfo' {} Maybe Text
a -> FileSystemAssociationInfo
s {$sel:fileSystemAssociationStatus:FileSystemAssociationInfo' :: Maybe Text
fileSystemAssociationStatus = Maybe Text
a} :: FileSystemAssociationInfo)

-- | A list of up to 50 tags assigned to the SMB file share, sorted
-- alphabetically by key name. Each tag is a key-value pair.
fileSystemAssociationInfo_tags :: Lens.Lens' FileSystemAssociationInfo (Prelude.Maybe [Tag])
fileSystemAssociationInfo_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> FileSystemAssociationInfo -> f FileSystemAssociationInfo
fileSystemAssociationInfo_tags = (FileSystemAssociationInfo -> Maybe [Tag])
-> (FileSystemAssociationInfo
    -> Maybe [Tag] -> FileSystemAssociationInfo)
-> Lens
     FileSystemAssociationInfo
     FileSystemAssociationInfo
     (Maybe [Tag])
     (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FileSystemAssociationInfo' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:FileSystemAssociationInfo' :: FileSystemAssociationInfo -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: FileSystemAssociationInfo
s@FileSystemAssociationInfo' {} Maybe [Tag]
a -> FileSystemAssociationInfo
s {$sel:tags:FileSystemAssociationInfo' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: FileSystemAssociationInfo) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> FileSystemAssociationInfo -> f FileSystemAssociationInfo)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> FileSystemAssociationInfo
-> f FileSystemAssociationInfo
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.FromJSON FileSystemAssociationInfo where
  parseJSON :: Value -> Parser FileSystemAssociationInfo
parseJSON =
    String
-> (Object -> Parser FileSystemAssociationInfo)
-> Value
-> Parser FileSystemAssociationInfo
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"FileSystemAssociationInfo"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe CacheAttributes
-> Maybe [FileSystemAssociationStatusDetail]
-> Maybe EndpointNetworkConfiguration
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> FileSystemAssociationInfo
FileSystemAssociationInfo'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe CacheAttributes
 -> Maybe [FileSystemAssociationStatusDetail]
 -> Maybe EndpointNetworkConfiguration
 -> Maybe Text
 -> Maybe Text
 -> Maybe [Tag]
 -> FileSystemAssociationInfo)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe CacheAttributes
      -> Maybe [FileSystemAssociationStatusDetail]
      -> Maybe EndpointNetworkConfiguration
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Tag]
      -> FileSystemAssociationInfo)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AuditDestinationARN")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe CacheAttributes
   -> Maybe [FileSystemAssociationStatusDetail]
   -> Maybe EndpointNetworkConfiguration
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Tag]
   -> FileSystemAssociationInfo)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe CacheAttributes
      -> Maybe [FileSystemAssociationStatusDetail]
      -> Maybe EndpointNetworkConfiguration
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Tag]
      -> FileSystemAssociationInfo)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"FileSystemAssociationARN")
            Parser
  (Maybe Text
   -> Maybe CacheAttributes
   -> Maybe [FileSystemAssociationStatusDetail]
   -> Maybe EndpointNetworkConfiguration
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Tag]
   -> FileSystemAssociationInfo)
-> Parser (Maybe Text)
-> Parser
     (Maybe CacheAttributes
      -> Maybe [FileSystemAssociationStatusDetail]
      -> Maybe EndpointNetworkConfiguration
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Tag]
      -> FileSystemAssociationInfo)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"GatewayARN")
            Parser
  (Maybe CacheAttributes
   -> Maybe [FileSystemAssociationStatusDetail]
   -> Maybe EndpointNetworkConfiguration
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Tag]
   -> FileSystemAssociationInfo)
-> Parser (Maybe CacheAttributes)
-> Parser
     (Maybe [FileSystemAssociationStatusDetail]
      -> Maybe EndpointNetworkConfiguration
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Tag]
      -> FileSystemAssociationInfo)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe CacheAttributes)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CacheAttributes")
            Parser
  (Maybe [FileSystemAssociationStatusDetail]
   -> Maybe EndpointNetworkConfiguration
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Tag]
   -> FileSystemAssociationInfo)
-> Parser (Maybe [FileSystemAssociationStatusDetail])
-> Parser
     (Maybe EndpointNetworkConfiguration
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Tag]
      -> FileSystemAssociationInfo)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text
-> Parser (Maybe (Maybe [FileSystemAssociationStatusDetail]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"FileSystemAssociationStatusDetails"
                            Parser (Maybe (Maybe [FileSystemAssociationStatusDetail]))
-> Maybe [FileSystemAssociationStatusDetail]
-> Parser (Maybe [FileSystemAssociationStatusDetail])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [FileSystemAssociationStatusDetail]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe EndpointNetworkConfiguration
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Tag]
   -> FileSystemAssociationInfo)
-> Parser (Maybe EndpointNetworkConfiguration)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe [Tag] -> FileSystemAssociationInfo)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe EndpointNetworkConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EndpointNetworkConfiguration")
            Parser
  (Maybe Text
   -> Maybe Text -> Maybe [Tag] -> FileSystemAssociationInfo)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe [Tag] -> FileSystemAssociationInfo)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LocationARN")
            Parser (Maybe Text -> Maybe [Tag] -> FileSystemAssociationInfo)
-> Parser (Maybe Text)
-> Parser (Maybe [Tag] -> FileSystemAssociationInfo)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"FileSystemAssociationStatus")
            Parser (Maybe [Tag] -> FileSystemAssociationInfo)
-> Parser (Maybe [Tag]) -> Parser FileSystemAssociationInfo
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Tag]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Tags" Parser (Maybe (Maybe [Tag])) -> Maybe [Tag] -> Parser (Maybe [Tag])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Tag]
forall a. Monoid a => a
Prelude.mempty)
      )

instance Prelude.Hashable FileSystemAssociationInfo

instance Prelude.NFData FileSystemAssociationInfo