{-# 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.FileSystemAssociationSummary
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.StorageGateway.Types.FileSystemAssociationSummary 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

-- | Gets the summary returned by @ListFileSystemAssociation@, which is a
-- summary of a created file system association.
--
-- /See:/ 'newFileSystemAssociationSummary' smart constructor.
data FileSystemAssociationSummary = FileSystemAssociationSummary'
  { -- | The Amazon Resource Name (ARN) of the file system association.
    FileSystemAssociationSummary -> Maybe Text
fileSystemAssociationARN :: Prelude.Maybe Prelude.Text,
    -- | The ID of the file system association.
    FileSystemAssociationSummary -> Maybe Text
fileSystemAssociationId :: Prelude.Maybe Prelude.Text,
    -- | The status of the file share. Valid Values: @AVAILABLE@ | @CREATING@ |
    -- @DELETING@ | @FORCE_DELETING@ | @UPDATING@ | @ERROR@
    FileSystemAssociationSummary -> Maybe Text
fileSystemAssociationStatus :: Prelude.Maybe Prelude.Text,
    FileSystemAssociationSummary -> Maybe Text
gatewayARN :: Prelude.Maybe Prelude.Text
  }
  deriving (FileSystemAssociationSummary
-> FileSystemAssociationSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FileSystemAssociationSummary
-> FileSystemAssociationSummary -> Bool
$c/= :: FileSystemAssociationSummary
-> FileSystemAssociationSummary -> Bool
== :: FileSystemAssociationSummary
-> FileSystemAssociationSummary -> Bool
$c== :: FileSystemAssociationSummary
-> FileSystemAssociationSummary -> Bool
Prelude.Eq, ReadPrec [FileSystemAssociationSummary]
ReadPrec FileSystemAssociationSummary
Int -> ReadS FileSystemAssociationSummary
ReadS [FileSystemAssociationSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FileSystemAssociationSummary]
$creadListPrec :: ReadPrec [FileSystemAssociationSummary]
readPrec :: ReadPrec FileSystemAssociationSummary
$creadPrec :: ReadPrec FileSystemAssociationSummary
readList :: ReadS [FileSystemAssociationSummary]
$creadList :: ReadS [FileSystemAssociationSummary]
readsPrec :: Int -> ReadS FileSystemAssociationSummary
$creadsPrec :: Int -> ReadS FileSystemAssociationSummary
Prelude.Read, Int -> FileSystemAssociationSummary -> ShowS
[FileSystemAssociationSummary] -> ShowS
FileSystemAssociationSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FileSystemAssociationSummary] -> ShowS
$cshowList :: [FileSystemAssociationSummary] -> ShowS
show :: FileSystemAssociationSummary -> String
$cshow :: FileSystemAssociationSummary -> String
showsPrec :: Int -> FileSystemAssociationSummary -> ShowS
$cshowsPrec :: Int -> FileSystemAssociationSummary -> ShowS
Prelude.Show, forall x.
Rep FileSystemAssociationSummary x -> FileSystemAssociationSummary
forall x.
FileSystemAssociationSummary -> Rep FileSystemAssociationSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep FileSystemAssociationSummary x -> FileSystemAssociationSummary
$cfrom :: forall x.
FileSystemAssociationSummary -> Rep FileSystemAssociationSummary x
Prelude.Generic)

-- |
-- Create a value of 'FileSystemAssociationSummary' 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', 'fileSystemAssociationSummary_fileSystemAssociationARN' - The Amazon Resource Name (ARN) of the file system association.
--
-- 'fileSystemAssociationId', 'fileSystemAssociationSummary_fileSystemAssociationId' - The ID of the file system association.
--
-- 'fileSystemAssociationStatus', 'fileSystemAssociationSummary_fileSystemAssociationStatus' - The status of the file share. Valid Values: @AVAILABLE@ | @CREATING@ |
-- @DELETING@ | @FORCE_DELETING@ | @UPDATING@ | @ERROR@
--
-- 'gatewayARN', 'fileSystemAssociationSummary_gatewayARN' - Undocumented member.
newFileSystemAssociationSummary ::
  FileSystemAssociationSummary
newFileSystemAssociationSummary :: FileSystemAssociationSummary
newFileSystemAssociationSummary =
  FileSystemAssociationSummary'
    { $sel:fileSystemAssociationARN:FileSystemAssociationSummary' :: Maybe Text
fileSystemAssociationARN =
        forall a. Maybe a
Prelude.Nothing,
      $sel:fileSystemAssociationId:FileSystemAssociationSummary' :: Maybe Text
fileSystemAssociationId = forall a. Maybe a
Prelude.Nothing,
      $sel:fileSystemAssociationStatus:FileSystemAssociationSummary' :: Maybe Text
fileSystemAssociationStatus = forall a. Maybe a
Prelude.Nothing,
      $sel:gatewayARN:FileSystemAssociationSummary' :: Maybe Text
gatewayARN = forall a. Maybe a
Prelude.Nothing
    }

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

-- | The ID of the file system association.
fileSystemAssociationSummary_fileSystemAssociationId :: Lens.Lens' FileSystemAssociationSummary (Prelude.Maybe Prelude.Text)
fileSystemAssociationSummary_fileSystemAssociationId :: Lens' FileSystemAssociationSummary (Maybe Text)
fileSystemAssociationSummary_fileSystemAssociationId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FileSystemAssociationSummary' {Maybe Text
fileSystemAssociationId :: Maybe Text
$sel:fileSystemAssociationId:FileSystemAssociationSummary' :: FileSystemAssociationSummary -> Maybe Text
fileSystemAssociationId} -> Maybe Text
fileSystemAssociationId) (\s :: FileSystemAssociationSummary
s@FileSystemAssociationSummary' {} Maybe Text
a -> FileSystemAssociationSummary
s {$sel:fileSystemAssociationId:FileSystemAssociationSummary' :: Maybe Text
fileSystemAssociationId = Maybe Text
a} :: FileSystemAssociationSummary)

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

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

instance Data.FromJSON FileSystemAssociationSummary where
  parseJSON :: Value -> Parser FileSystemAssociationSummary
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"FileSystemAssociationSummary"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> FileSystemAssociationSummary
FileSystemAssociationSummary'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"FileSystemAssociationARN")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"FileSystemAssociationId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"FileSystemAssociationStatus")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"GatewayARN")
      )

instance
  Prelude.Hashable
    FileSystemAssociationSummary
  where
  hashWithSalt :: Int -> FileSystemAssociationSummary -> Int
hashWithSalt Int
_salt FileSystemAssociationSummary' {Maybe Text
gatewayARN :: Maybe Text
fileSystemAssociationStatus :: Maybe Text
fileSystemAssociationId :: Maybe Text
fileSystemAssociationARN :: Maybe Text
$sel:gatewayARN:FileSystemAssociationSummary' :: FileSystemAssociationSummary -> Maybe Text
$sel:fileSystemAssociationStatus:FileSystemAssociationSummary' :: FileSystemAssociationSummary -> Maybe Text
$sel:fileSystemAssociationId:FileSystemAssociationSummary' :: FileSystemAssociationSummary -> Maybe Text
$sel:fileSystemAssociationARN:FileSystemAssociationSummary' :: FileSystemAssociationSummary -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
fileSystemAssociationARN
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
fileSystemAssociationId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
fileSystemAssociationStatus
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
gatewayARN

instance Prelude.NFData FileSystemAssociationSummary where
  rnf :: FileSystemAssociationSummary -> ()
rnf FileSystemAssociationSummary' {Maybe Text
gatewayARN :: Maybe Text
fileSystemAssociationStatus :: Maybe Text
fileSystemAssociationId :: Maybe Text
fileSystemAssociationARN :: Maybe Text
$sel:gatewayARN:FileSystemAssociationSummary' :: FileSystemAssociationSummary -> Maybe Text
$sel:fileSystemAssociationStatus:FileSystemAssociationSummary' :: FileSystemAssociationSummary -> Maybe Text
$sel:fileSystemAssociationId:FileSystemAssociationSummary' :: FileSystemAssociationSummary -> Maybe Text
$sel:fileSystemAssociationARN:FileSystemAssociationSummary' :: FileSystemAssociationSummary -> 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 Maybe Text
fileSystemAssociationId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
fileSystemAssociationStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
gatewayARN