{-# 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.FSx.DescribeFileSystems
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns the description of specific Amazon FSx file systems, if a
-- @FileSystemIds@ value is provided for that file system. Otherwise, it
-- returns descriptions of all file systems owned by your Amazon Web
-- Services account in the Amazon Web Services Region of the endpoint that
-- you\'re calling.
--
-- When retrieving all file system descriptions, you can optionally specify
-- the @MaxResults@ parameter to limit the number of descriptions in a
-- response. If more file system descriptions remain, Amazon FSx returns a
-- @NextToken@ value in the response. In this case, send a later request
-- with the @NextToken@ request parameter set to the value of @NextToken@
-- from the last response.
--
-- This operation is used in an iterative process to retrieve a list of
-- your file system descriptions. @DescribeFileSystems@ is called first
-- without a @NextToken@value. Then the operation continues to be called
-- with the @NextToken@ parameter set to the value of the last @NextToken@
-- value until a response has no @NextToken@.
--
-- When using this operation, keep the following in mind:
--
-- -   The implementation might return fewer than @MaxResults@ file system
--     descriptions while still including a @NextToken@ value.
--
-- -   The order of file systems returned in the response of one
--     @DescribeFileSystems@ call and the order of file systems returned
--     across the responses of a multicall iteration is unspecified.
--
-- This operation returns paginated results.
module Amazonka.FSx.DescribeFileSystems
  ( -- * Creating a Request
    DescribeFileSystems (..),
    newDescribeFileSystems,

    -- * Request Lenses
    describeFileSystems_fileSystemIds,
    describeFileSystems_maxResults,
    describeFileSystems_nextToken,

    -- * Destructuring the Response
    DescribeFileSystemsResponse (..),
    newDescribeFileSystemsResponse,

    -- * Response Lenses
    describeFileSystemsResponse_fileSystems,
    describeFileSystemsResponse_nextToken,
    describeFileSystemsResponse_httpStatus,
  )
where

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

-- | The request object for @DescribeFileSystems@ operation.
--
-- /See:/ 'newDescribeFileSystems' smart constructor.
data DescribeFileSystems = DescribeFileSystems'
  { -- | IDs of the file systems whose descriptions you want to retrieve
    -- (String).
    DescribeFileSystems -> Maybe [Text]
fileSystemIds :: Prelude.Maybe [Prelude.Text],
    -- | Maximum number of file systems to return in the response (integer). This
    -- parameter value must be greater than 0. The number of items that Amazon
    -- FSx returns is the minimum of the @MaxResults@ parameter specified in
    -- the request and the service\'s internal maximum number of items per
    -- page.
    DescribeFileSystems -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | Opaque pagination token returned from a previous @DescribeFileSystems@
    -- operation (String). If a token present, the operation continues the list
    -- from where the returning call left off.
    DescribeFileSystems -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text
  }
  deriving (DescribeFileSystems -> DescribeFileSystems -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeFileSystems -> DescribeFileSystems -> Bool
$c/= :: DescribeFileSystems -> DescribeFileSystems -> Bool
== :: DescribeFileSystems -> DescribeFileSystems -> Bool
$c== :: DescribeFileSystems -> DescribeFileSystems -> Bool
Prelude.Eq, ReadPrec [DescribeFileSystems]
ReadPrec DescribeFileSystems
Int -> ReadS DescribeFileSystems
ReadS [DescribeFileSystems]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeFileSystems]
$creadListPrec :: ReadPrec [DescribeFileSystems]
readPrec :: ReadPrec DescribeFileSystems
$creadPrec :: ReadPrec DescribeFileSystems
readList :: ReadS [DescribeFileSystems]
$creadList :: ReadS [DescribeFileSystems]
readsPrec :: Int -> ReadS DescribeFileSystems
$creadsPrec :: Int -> ReadS DescribeFileSystems
Prelude.Read, Int -> DescribeFileSystems -> ShowS
[DescribeFileSystems] -> ShowS
DescribeFileSystems -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeFileSystems] -> ShowS
$cshowList :: [DescribeFileSystems] -> ShowS
show :: DescribeFileSystems -> String
$cshow :: DescribeFileSystems -> String
showsPrec :: Int -> DescribeFileSystems -> ShowS
$cshowsPrec :: Int -> DescribeFileSystems -> ShowS
Prelude.Show, forall x. Rep DescribeFileSystems x -> DescribeFileSystems
forall x. DescribeFileSystems -> Rep DescribeFileSystems x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeFileSystems x -> DescribeFileSystems
$cfrom :: forall x. DescribeFileSystems -> Rep DescribeFileSystems x
Prelude.Generic)

-- |
-- Create a value of 'DescribeFileSystems' 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:
--
-- 'fileSystemIds', 'describeFileSystems_fileSystemIds' - IDs of the file systems whose descriptions you want to retrieve
-- (String).
--
-- 'maxResults', 'describeFileSystems_maxResults' - Maximum number of file systems to return in the response (integer). This
-- parameter value must be greater than 0. The number of items that Amazon
-- FSx returns is the minimum of the @MaxResults@ parameter specified in
-- the request and the service\'s internal maximum number of items per
-- page.
--
-- 'nextToken', 'describeFileSystems_nextToken' - Opaque pagination token returned from a previous @DescribeFileSystems@
-- operation (String). If a token present, the operation continues the list
-- from where the returning call left off.
newDescribeFileSystems ::
  DescribeFileSystems
newDescribeFileSystems :: DescribeFileSystems
newDescribeFileSystems =
  DescribeFileSystems'
    { $sel:fileSystemIds:DescribeFileSystems' :: Maybe [Text]
fileSystemIds =
        forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:DescribeFileSystems' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeFileSystems' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing
    }

-- | IDs of the file systems whose descriptions you want to retrieve
-- (String).
describeFileSystems_fileSystemIds :: Lens.Lens' DescribeFileSystems (Prelude.Maybe [Prelude.Text])
describeFileSystems_fileSystemIds :: Lens' DescribeFileSystems (Maybe [Text])
describeFileSystems_fileSystemIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFileSystems' {Maybe [Text]
fileSystemIds :: Maybe [Text]
$sel:fileSystemIds:DescribeFileSystems' :: DescribeFileSystems -> Maybe [Text]
fileSystemIds} -> Maybe [Text]
fileSystemIds) (\s :: DescribeFileSystems
s@DescribeFileSystems' {} Maybe [Text]
a -> DescribeFileSystems
s {$sel:fileSystemIds:DescribeFileSystems' :: Maybe [Text]
fileSystemIds = Maybe [Text]
a} :: DescribeFileSystems) 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 s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Maximum number of file systems to return in the response (integer). This
-- parameter value must be greater than 0. The number of items that Amazon
-- FSx returns is the minimum of the @MaxResults@ parameter specified in
-- the request and the service\'s internal maximum number of items per
-- page.
describeFileSystems_maxResults :: Lens.Lens' DescribeFileSystems (Prelude.Maybe Prelude.Natural)
describeFileSystems_maxResults :: Lens' DescribeFileSystems (Maybe Natural)
describeFileSystems_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFileSystems' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:DescribeFileSystems' :: DescribeFileSystems -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: DescribeFileSystems
s@DescribeFileSystems' {} Maybe Natural
a -> DescribeFileSystems
s {$sel:maxResults:DescribeFileSystems' :: Maybe Natural
maxResults = Maybe Natural
a} :: DescribeFileSystems)

-- | Opaque pagination token returned from a previous @DescribeFileSystems@
-- operation (String). If a token present, the operation continues the list
-- from where the returning call left off.
describeFileSystems_nextToken :: Lens.Lens' DescribeFileSystems (Prelude.Maybe Prelude.Text)
describeFileSystems_nextToken :: Lens' DescribeFileSystems (Maybe Text)
describeFileSystems_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFileSystems' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeFileSystems' :: DescribeFileSystems -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeFileSystems
s@DescribeFileSystems' {} Maybe Text
a -> DescribeFileSystems
s {$sel:nextToken:DescribeFileSystems' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeFileSystems)

instance Core.AWSPager DescribeFileSystems where
  page :: DescribeFileSystems
-> AWSResponse DescribeFileSystems -> Maybe DescribeFileSystems
page DescribeFileSystems
rq AWSResponse DescribeFileSystems
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeFileSystems
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeFileSystemsResponse (Maybe Text)
describeFileSystemsResponse_nextToken
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeFileSystems
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeFileSystemsResponse (Maybe [FileSystem])
describeFileSystemsResponse_fileSystems
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ DescribeFileSystems
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' DescribeFileSystems (Maybe Text)
describeFileSystems_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeFileSystems
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeFileSystemsResponse (Maybe Text)
describeFileSystemsResponse_nextToken
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest DescribeFileSystems where
  type
    AWSResponse DescribeFileSystems =
      DescribeFileSystemsResponse
  request :: (Service -> Service)
-> DescribeFileSystems -> Request DescribeFileSystems
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 DescribeFileSystems
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeFileSystems)))
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 [FileSystem]
-> Maybe Text -> Int -> DescribeFileSystemsResponse
DescribeFileSystemsResponse'
            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
"FileSystems" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"NextToken")
            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 DescribeFileSystems where
  hashWithSalt :: Int -> DescribeFileSystems -> Int
hashWithSalt Int
_salt DescribeFileSystems' {Maybe Natural
Maybe [Text]
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
fileSystemIds :: Maybe [Text]
$sel:nextToken:DescribeFileSystems' :: DescribeFileSystems -> Maybe Text
$sel:maxResults:DescribeFileSystems' :: DescribeFileSystems -> Maybe Natural
$sel:fileSystemIds:DescribeFileSystems' :: DescribeFileSystems -> Maybe [Text]
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
fileSystemIds
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken

instance Prelude.NFData DescribeFileSystems where
  rnf :: DescribeFileSystems -> ()
rnf DescribeFileSystems' {Maybe Natural
Maybe [Text]
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
fileSystemIds :: Maybe [Text]
$sel:nextToken:DescribeFileSystems' :: DescribeFileSystems -> Maybe Text
$sel:maxResults:DescribeFileSystems' :: DescribeFileSystems -> Maybe Natural
$sel:fileSystemIds:DescribeFileSystems' :: DescribeFileSystems -> Maybe [Text]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
fileSystemIds
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken

instance Data.ToHeaders DescribeFileSystems where
  toHeaders :: DescribeFileSystems -> 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
"AWSSimbaAPIService_v20180301.DescribeFileSystems" ::
                          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 DescribeFileSystems where
  toJSON :: DescribeFileSystems -> Value
toJSON DescribeFileSystems' {Maybe Natural
Maybe [Text]
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
fileSystemIds :: Maybe [Text]
$sel:nextToken:DescribeFileSystems' :: DescribeFileSystems -> Maybe Text
$sel:maxResults:DescribeFileSystems' :: DescribeFileSystems -> Maybe Natural
$sel:fileSystemIds:DescribeFileSystems' :: DescribeFileSystems -> Maybe [Text]
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"FileSystemIds" 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]
fileSystemIds,
            (Key
"MaxResults" 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 Natural
maxResults,
            (Key
"NextToken" 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
nextToken
          ]
      )

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

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

-- | The response object for @DescribeFileSystems@ operation.
--
-- /See:/ 'newDescribeFileSystemsResponse' smart constructor.
data DescribeFileSystemsResponse = DescribeFileSystemsResponse'
  { -- | An array of file system descriptions.
    DescribeFileSystemsResponse -> Maybe [FileSystem]
fileSystems :: Prelude.Maybe [FileSystem],
    -- | Present if there are more file systems than returned in the response
    -- (String). You can use the @NextToken@ value in the later request to
    -- fetch the descriptions.
    DescribeFileSystemsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeFileSystemsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeFileSystemsResponse -> DescribeFileSystemsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeFileSystemsResponse -> DescribeFileSystemsResponse -> Bool
$c/= :: DescribeFileSystemsResponse -> DescribeFileSystemsResponse -> Bool
== :: DescribeFileSystemsResponse -> DescribeFileSystemsResponse -> Bool
$c== :: DescribeFileSystemsResponse -> DescribeFileSystemsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeFileSystemsResponse]
ReadPrec DescribeFileSystemsResponse
Int -> ReadS DescribeFileSystemsResponse
ReadS [DescribeFileSystemsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeFileSystemsResponse]
$creadListPrec :: ReadPrec [DescribeFileSystemsResponse]
readPrec :: ReadPrec DescribeFileSystemsResponse
$creadPrec :: ReadPrec DescribeFileSystemsResponse
readList :: ReadS [DescribeFileSystemsResponse]
$creadList :: ReadS [DescribeFileSystemsResponse]
readsPrec :: Int -> ReadS DescribeFileSystemsResponse
$creadsPrec :: Int -> ReadS DescribeFileSystemsResponse
Prelude.Read, Int -> DescribeFileSystemsResponse -> ShowS
[DescribeFileSystemsResponse] -> ShowS
DescribeFileSystemsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeFileSystemsResponse] -> ShowS
$cshowList :: [DescribeFileSystemsResponse] -> ShowS
show :: DescribeFileSystemsResponse -> String
$cshow :: DescribeFileSystemsResponse -> String
showsPrec :: Int -> DescribeFileSystemsResponse -> ShowS
$cshowsPrec :: Int -> DescribeFileSystemsResponse -> ShowS
Prelude.Show, forall x.
Rep DescribeFileSystemsResponse x -> DescribeFileSystemsResponse
forall x.
DescribeFileSystemsResponse -> Rep DescribeFileSystemsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeFileSystemsResponse x -> DescribeFileSystemsResponse
$cfrom :: forall x.
DescribeFileSystemsResponse -> Rep DescribeFileSystemsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeFileSystemsResponse' 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:
--
-- 'fileSystems', 'describeFileSystemsResponse_fileSystems' - An array of file system descriptions.
--
-- 'nextToken', 'describeFileSystemsResponse_nextToken' - Present if there are more file systems than returned in the response
-- (String). You can use the @NextToken@ value in the later request to
-- fetch the descriptions.
--
-- 'httpStatus', 'describeFileSystemsResponse_httpStatus' - The response's http status code.
newDescribeFileSystemsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeFileSystemsResponse
newDescribeFileSystemsResponse :: Int -> DescribeFileSystemsResponse
newDescribeFileSystemsResponse Int
pHttpStatus_ =
  DescribeFileSystemsResponse'
    { $sel:fileSystems:DescribeFileSystemsResponse' :: Maybe [FileSystem]
fileSystems =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeFileSystemsResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeFileSystemsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An array of file system descriptions.
describeFileSystemsResponse_fileSystems :: Lens.Lens' DescribeFileSystemsResponse (Prelude.Maybe [FileSystem])
describeFileSystemsResponse_fileSystems :: Lens' DescribeFileSystemsResponse (Maybe [FileSystem])
describeFileSystemsResponse_fileSystems = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFileSystemsResponse' {Maybe [FileSystem]
fileSystems :: Maybe [FileSystem]
$sel:fileSystems:DescribeFileSystemsResponse' :: DescribeFileSystemsResponse -> Maybe [FileSystem]
fileSystems} -> Maybe [FileSystem]
fileSystems) (\s :: DescribeFileSystemsResponse
s@DescribeFileSystemsResponse' {} Maybe [FileSystem]
a -> DescribeFileSystemsResponse
s {$sel:fileSystems:DescribeFileSystemsResponse' :: Maybe [FileSystem]
fileSystems = Maybe [FileSystem]
a} :: DescribeFileSystemsResponse) 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 s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Present if there are more file systems than returned in the response
-- (String). You can use the @NextToken@ value in the later request to
-- fetch the descriptions.
describeFileSystemsResponse_nextToken :: Lens.Lens' DescribeFileSystemsResponse (Prelude.Maybe Prelude.Text)
describeFileSystemsResponse_nextToken :: Lens' DescribeFileSystemsResponse (Maybe Text)
describeFileSystemsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFileSystemsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeFileSystemsResponse' :: DescribeFileSystemsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeFileSystemsResponse
s@DescribeFileSystemsResponse' {} Maybe Text
a -> DescribeFileSystemsResponse
s {$sel:nextToken:DescribeFileSystemsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeFileSystemsResponse)

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

instance Prelude.NFData DescribeFileSystemsResponse where
  rnf :: DescribeFileSystemsResponse -> ()
rnf DescribeFileSystemsResponse' {Int
Maybe [FileSystem]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
fileSystems :: Maybe [FileSystem]
$sel:httpStatus:DescribeFileSystemsResponse' :: DescribeFileSystemsResponse -> Int
$sel:nextToken:DescribeFileSystemsResponse' :: DescribeFileSystemsResponse -> Maybe Text
$sel:fileSystems:DescribeFileSystemsResponse' :: DescribeFileSystemsResponse -> Maybe [FileSystem]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [FileSystem]
fileSystems
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus