{-# 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-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.FileSystemAssociationSummary where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
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,
    FileSystemAssociationSummary -> Maybe Text
gatewayARN :: 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
  }
  deriving (FileSystemAssociationSummary
-> FileSystemAssociationSummary -> Bool
(FileSystemAssociationSummary
 -> FileSystemAssociationSummary -> Bool)
-> (FileSystemAssociationSummary
    -> FileSystemAssociationSummary -> Bool)
-> Eq FileSystemAssociationSummary
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]
(Int -> ReadS FileSystemAssociationSummary)
-> ReadS [FileSystemAssociationSummary]
-> ReadPrec FileSystemAssociationSummary
-> ReadPrec [FileSystemAssociationSummary]
-> Read 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
(Int -> FileSystemAssociationSummary -> ShowS)
-> (FileSystemAssociationSummary -> String)
-> ([FileSystemAssociationSummary] -> ShowS)
-> Show FileSystemAssociationSummary
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.
 FileSystemAssociationSummary -> Rep FileSystemAssociationSummary x)
-> (forall x.
    Rep FileSystemAssociationSummary x -> FileSystemAssociationSummary)
-> Generic FileSystemAssociationSummary
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.
--
-- 'gatewayARN', 'fileSystemAssociationSummary_gatewayARN' - Undocumented member.
--
-- '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@
newFileSystemAssociationSummary ::
  FileSystemAssociationSummary
newFileSystemAssociationSummary :: FileSystemAssociationSummary
newFileSystemAssociationSummary =
  FileSystemAssociationSummary' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> FileSystemAssociationSummary
FileSystemAssociationSummary'
    { $sel:fileSystemAssociationARN:FileSystemAssociationSummary' :: Maybe Text
fileSystemAssociationARN =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:gatewayARN:FileSystemAssociationSummary' :: Maybe Text
gatewayARN = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:fileSystemAssociationId:FileSystemAssociationSummary' :: Maybe Text
fileSystemAssociationId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:fileSystemAssociationStatus:FileSystemAssociationSummary' :: Maybe Text
fileSystemAssociationStatus = Maybe Text
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 :: (Maybe Text -> f (Maybe Text))
-> FileSystemAssociationSummary -> f FileSystemAssociationSummary
fileSystemAssociationSummary_fileSystemAssociationARN = (FileSystemAssociationSummary -> Maybe Text)
-> (FileSystemAssociationSummary
    -> Maybe Text -> FileSystemAssociationSummary)
-> Lens
     FileSystemAssociationSummary
     FileSystemAssociationSummary
     (Maybe Text)
     (Maybe Text)
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)

-- | Undocumented member.
fileSystemAssociationSummary_gatewayARN :: Lens.Lens' FileSystemAssociationSummary (Prelude.Maybe Prelude.Text)
fileSystemAssociationSummary_gatewayARN :: (Maybe Text -> f (Maybe Text))
-> FileSystemAssociationSummary -> f FileSystemAssociationSummary
fileSystemAssociationSummary_gatewayARN = (FileSystemAssociationSummary -> Maybe Text)
-> (FileSystemAssociationSummary
    -> Maybe Text -> FileSystemAssociationSummary)
-> Lens
     FileSystemAssociationSummary
     FileSystemAssociationSummary
     (Maybe Text)
     (Maybe Text)
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)

-- | The ID of the file system association.
fileSystemAssociationSummary_fileSystemAssociationId :: Lens.Lens' FileSystemAssociationSummary (Prelude.Maybe Prelude.Text)
fileSystemAssociationSummary_fileSystemAssociationId :: (Maybe Text -> f (Maybe Text))
-> FileSystemAssociationSummary -> f FileSystemAssociationSummary
fileSystemAssociationSummary_fileSystemAssociationId = (FileSystemAssociationSummary -> Maybe Text)
-> (FileSystemAssociationSummary
    -> Maybe Text -> FileSystemAssociationSummary)
-> Lens
     FileSystemAssociationSummary
     FileSystemAssociationSummary
     (Maybe Text)
     (Maybe Text)
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 :: (Maybe Text -> f (Maybe Text))
-> FileSystemAssociationSummary -> f FileSystemAssociationSummary
fileSystemAssociationSummary_fileSystemAssociationStatus = (FileSystemAssociationSummary -> Maybe Text)
-> (FileSystemAssociationSummary
    -> Maybe Text -> FileSystemAssociationSummary)
-> Lens
     FileSystemAssociationSummary
     FileSystemAssociationSummary
     (Maybe Text)
     (Maybe Text)
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)

instance Core.FromJSON FileSystemAssociationSummary where
  parseJSON :: Value -> Parser FileSystemAssociationSummary
parseJSON =
    String
-> (Object -> Parser FileSystemAssociationSummary)
-> Value
-> Parser FileSystemAssociationSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"FileSystemAssociationSummary"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> FileSystemAssociationSummary
FileSystemAssociationSummary'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> FileSystemAssociationSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe Text -> FileSystemAssociationSummary)
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
"FileSystemAssociationARN")
            Parser
  (Maybe Text
   -> Maybe Text -> Maybe Text -> FileSystemAssociationSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe Text -> FileSystemAssociationSummary)
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 Text -> Maybe Text -> FileSystemAssociationSummary)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> FileSystemAssociationSummary)
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
"FileSystemAssociationId")
            Parser (Maybe Text -> FileSystemAssociationSummary)
-> Parser (Maybe Text) -> Parser FileSystemAssociationSummary
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")
      )

instance
  Prelude.Hashable
    FileSystemAssociationSummary

instance Prelude.NFData FileSystemAssociationSummary