{-# 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.MwAA.ListEnvironments
-- 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)
--
-- Lists the Amazon Managed Workflows for Apache Airflow (MWAA)
-- environments.
--
-- This operation returns paginated results.
module Amazonka.MwAA.ListEnvironments
  ( -- * Creating a Request
    ListEnvironments (..),
    newListEnvironments,

    -- * Request Lenses
    listEnvironments_nextToken,
    listEnvironments_maxResults,

    -- * Destructuring the Response
    ListEnvironmentsResponse (..),
    newListEnvironmentsResponse,

    -- * Response Lenses
    listEnvironmentsResponse_nextToken,
    listEnvironmentsResponse_httpStatus,
    listEnvironmentsResponse_environments,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MwAA.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newListEnvironments' smart constructor.
data ListEnvironments = ListEnvironments'
  { -- | Retrieves the next page of the results.
    ListEnvironments -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results to retrieve per page. For example, @5@
    -- environments per page.
    ListEnvironments -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
  }
  deriving (ListEnvironments -> ListEnvironments -> Bool
(ListEnvironments -> ListEnvironments -> Bool)
-> (ListEnvironments -> ListEnvironments -> Bool)
-> Eq ListEnvironments
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListEnvironments -> ListEnvironments -> Bool
$c/= :: ListEnvironments -> ListEnvironments -> Bool
== :: ListEnvironments -> ListEnvironments -> Bool
$c== :: ListEnvironments -> ListEnvironments -> Bool
Prelude.Eq, ReadPrec [ListEnvironments]
ReadPrec ListEnvironments
Int -> ReadS ListEnvironments
ReadS [ListEnvironments]
(Int -> ReadS ListEnvironments)
-> ReadS [ListEnvironments]
-> ReadPrec ListEnvironments
-> ReadPrec [ListEnvironments]
-> Read ListEnvironments
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListEnvironments]
$creadListPrec :: ReadPrec [ListEnvironments]
readPrec :: ReadPrec ListEnvironments
$creadPrec :: ReadPrec ListEnvironments
readList :: ReadS [ListEnvironments]
$creadList :: ReadS [ListEnvironments]
readsPrec :: Int -> ReadS ListEnvironments
$creadsPrec :: Int -> ReadS ListEnvironments
Prelude.Read, Int -> ListEnvironments -> ShowS
[ListEnvironments] -> ShowS
ListEnvironments -> String
(Int -> ListEnvironments -> ShowS)
-> (ListEnvironments -> String)
-> ([ListEnvironments] -> ShowS)
-> Show ListEnvironments
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListEnvironments] -> ShowS
$cshowList :: [ListEnvironments] -> ShowS
show :: ListEnvironments -> String
$cshow :: ListEnvironments -> String
showsPrec :: Int -> ListEnvironments -> ShowS
$cshowsPrec :: Int -> ListEnvironments -> ShowS
Prelude.Show, (forall x. ListEnvironments -> Rep ListEnvironments x)
-> (forall x. Rep ListEnvironments x -> ListEnvironments)
-> Generic ListEnvironments
forall x. Rep ListEnvironments x -> ListEnvironments
forall x. ListEnvironments -> Rep ListEnvironments x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListEnvironments x -> ListEnvironments
$cfrom :: forall x. ListEnvironments -> Rep ListEnvironments x
Prelude.Generic)

-- |
-- Create a value of 'ListEnvironments' 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:
--
-- 'nextToken', 'listEnvironments_nextToken' - Retrieves the next page of the results.
--
-- 'maxResults', 'listEnvironments_maxResults' - The maximum number of results to retrieve per page. For example, @5@
-- environments per page.
newListEnvironments ::
  ListEnvironments
newListEnvironments :: ListEnvironments
newListEnvironments =
  ListEnvironments' :: Maybe Text -> Maybe Natural -> ListEnvironments
ListEnvironments'
    { $sel:nextToken:ListEnvironments' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListEnvironments' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | Retrieves the next page of the results.
listEnvironments_nextToken :: Lens.Lens' ListEnvironments (Prelude.Maybe Prelude.Text)
listEnvironments_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListEnvironments -> f ListEnvironments
listEnvironments_nextToken = (ListEnvironments -> Maybe Text)
-> (ListEnvironments -> Maybe Text -> ListEnvironments)
-> Lens ListEnvironments ListEnvironments (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEnvironments' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListEnvironments' :: ListEnvironments -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListEnvironments
s@ListEnvironments' {} Maybe Text
a -> ListEnvironments
s {$sel:nextToken:ListEnvironments' :: Maybe Text
nextToken = Maybe Text
a} :: ListEnvironments)

-- | The maximum number of results to retrieve per page. For example, @5@
-- environments per page.
listEnvironments_maxResults :: Lens.Lens' ListEnvironments (Prelude.Maybe Prelude.Natural)
listEnvironments_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListEnvironments -> f ListEnvironments
listEnvironments_maxResults = (ListEnvironments -> Maybe Natural)
-> (ListEnvironments -> Maybe Natural -> ListEnvironments)
-> Lens
     ListEnvironments ListEnvironments (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEnvironments' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListEnvironments' :: ListEnvironments -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListEnvironments
s@ListEnvironments' {} Maybe Natural
a -> ListEnvironments
s {$sel:maxResults:ListEnvironments' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListEnvironments)

instance Core.AWSPager ListEnvironments where
  page :: ListEnvironments
-> AWSResponse ListEnvironments -> Maybe ListEnvironments
page ListEnvironments
rq AWSResponse ListEnvironments
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListEnvironments
ListEnvironmentsResponse
rs
            ListEnvironmentsResponse
-> Getting (First Text) ListEnvironmentsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListEnvironmentsResponse
-> Const (First Text) ListEnvironmentsResponse
Lens' ListEnvironmentsResponse (Maybe Text)
listEnvironmentsResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListEnvironmentsResponse
 -> Const (First Text) ListEnvironmentsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListEnvironmentsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListEnvironments
forall a. Maybe a
Prelude.Nothing
    | [Text] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        (AWSResponse ListEnvironments
ListEnvironmentsResponse
rs ListEnvironmentsResponse
-> Getting [Text] ListEnvironmentsResponse [Text] -> [Text]
forall s a. s -> Getting a s a -> a
Lens.^. Getting [Text] ListEnvironmentsResponse [Text]
Lens' ListEnvironmentsResponse [Text]
listEnvironmentsResponse_environments) =
      Maybe ListEnvironments
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListEnvironments -> Maybe ListEnvironments
forall a. a -> Maybe a
Prelude.Just (ListEnvironments -> Maybe ListEnvironments)
-> ListEnvironments -> Maybe ListEnvironments
forall a b. (a -> b) -> a -> b
Prelude.$
        ListEnvironments
rq
          ListEnvironments
-> (ListEnvironments -> ListEnvironments) -> ListEnvironments
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListEnvironments -> Identity ListEnvironments
Lens ListEnvironments ListEnvironments (Maybe Text) (Maybe Text)
listEnvironments_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListEnvironments -> Identity ListEnvironments)
-> Maybe Text -> ListEnvironments -> ListEnvironments
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListEnvironments
ListEnvironmentsResponse
rs
          ListEnvironmentsResponse
-> Getting (First Text) ListEnvironmentsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListEnvironmentsResponse
-> Const (First Text) ListEnvironmentsResponse
Lens' ListEnvironmentsResponse (Maybe Text)
listEnvironmentsResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListEnvironmentsResponse
 -> Const (First Text) ListEnvironmentsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListEnvironmentsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest ListEnvironments where
  type
    AWSResponse ListEnvironments =
      ListEnvironmentsResponse
  request :: ListEnvironments -> Request ListEnvironments
request = Service -> ListEnvironments -> Request ListEnvironments
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy ListEnvironments
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListEnvironments)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListEnvironments))
-> Logger
-> Service
-> Proxy ListEnvironments
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListEnvironments)))
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 -> [Text] -> ListEnvironmentsResponse
ListEnvironmentsResponse'
            (Maybe Text -> Int -> [Text] -> ListEnvironmentsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> [Text] -> ListEnvironmentsResponse)
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
"NextToken")
            Either String (Int -> [Text] -> ListEnvironmentsResponse)
-> Either String Int
-> Either String ([Text] -> ListEnvironmentsResponse)
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))
            Either String ([Text] -> ListEnvironmentsResponse)
-> Either String [Text] -> Either String ListEnvironmentsResponse
forall (f :: * -> *) a b. Applicative f => 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
"Environments" Either String (Maybe [Text]) -> [Text] -> Either String [Text]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Text]
forall a. Monoid a => a
Prelude.mempty)
      )

instance Prelude.Hashable ListEnvironments

instance Prelude.NFData ListEnvironments

instance Core.ToHeaders ListEnvironments where
  toHeaders :: ListEnvironments -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListEnvironments -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ 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.ToPath ListEnvironments where
  toPath :: ListEnvironments -> ByteString
toPath = ByteString -> ListEnvironments -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/environments"

instance Core.ToQuery ListEnvironments where
  toQuery :: ListEnvironments -> QueryString
toQuery ListEnvironments' {Maybe Natural
Maybe Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:maxResults:ListEnvironments' :: ListEnvironments -> Maybe Natural
$sel:nextToken:ListEnvironments' :: ListEnvironments -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"NextToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
        ByteString
"MaxResults" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxResults
      ]

-- | /See:/ 'newListEnvironmentsResponse' smart constructor.
data ListEnvironmentsResponse = ListEnvironmentsResponse'
  { -- | Retrieves the next page of the results.
    ListEnvironmentsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListEnvironmentsResponse -> Int
httpStatus :: Prelude.Int,
    -- | Returns the list of Amazon MWAA environments.
    ListEnvironmentsResponse -> [Text]
environments :: [Prelude.Text]
  }
  deriving (ListEnvironmentsResponse -> ListEnvironmentsResponse -> Bool
(ListEnvironmentsResponse -> ListEnvironmentsResponse -> Bool)
-> (ListEnvironmentsResponse -> ListEnvironmentsResponse -> Bool)
-> Eq ListEnvironmentsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListEnvironmentsResponse -> ListEnvironmentsResponse -> Bool
$c/= :: ListEnvironmentsResponse -> ListEnvironmentsResponse -> Bool
== :: ListEnvironmentsResponse -> ListEnvironmentsResponse -> Bool
$c== :: ListEnvironmentsResponse -> ListEnvironmentsResponse -> Bool
Prelude.Eq, ReadPrec [ListEnvironmentsResponse]
ReadPrec ListEnvironmentsResponse
Int -> ReadS ListEnvironmentsResponse
ReadS [ListEnvironmentsResponse]
(Int -> ReadS ListEnvironmentsResponse)
-> ReadS [ListEnvironmentsResponse]
-> ReadPrec ListEnvironmentsResponse
-> ReadPrec [ListEnvironmentsResponse]
-> Read ListEnvironmentsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListEnvironmentsResponse]
$creadListPrec :: ReadPrec [ListEnvironmentsResponse]
readPrec :: ReadPrec ListEnvironmentsResponse
$creadPrec :: ReadPrec ListEnvironmentsResponse
readList :: ReadS [ListEnvironmentsResponse]
$creadList :: ReadS [ListEnvironmentsResponse]
readsPrec :: Int -> ReadS ListEnvironmentsResponse
$creadsPrec :: Int -> ReadS ListEnvironmentsResponse
Prelude.Read, Int -> ListEnvironmentsResponse -> ShowS
[ListEnvironmentsResponse] -> ShowS
ListEnvironmentsResponse -> String
(Int -> ListEnvironmentsResponse -> ShowS)
-> (ListEnvironmentsResponse -> String)
-> ([ListEnvironmentsResponse] -> ShowS)
-> Show ListEnvironmentsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListEnvironmentsResponse] -> ShowS
$cshowList :: [ListEnvironmentsResponse] -> ShowS
show :: ListEnvironmentsResponse -> String
$cshow :: ListEnvironmentsResponse -> String
showsPrec :: Int -> ListEnvironmentsResponse -> ShowS
$cshowsPrec :: Int -> ListEnvironmentsResponse -> ShowS
Prelude.Show, (forall x.
 ListEnvironmentsResponse -> Rep ListEnvironmentsResponse x)
-> (forall x.
    Rep ListEnvironmentsResponse x -> ListEnvironmentsResponse)
-> Generic ListEnvironmentsResponse
forall x.
Rep ListEnvironmentsResponse x -> ListEnvironmentsResponse
forall x.
ListEnvironmentsResponse -> Rep ListEnvironmentsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListEnvironmentsResponse x -> ListEnvironmentsResponse
$cfrom :: forall x.
ListEnvironmentsResponse -> Rep ListEnvironmentsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListEnvironmentsResponse' 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:
--
-- 'nextToken', 'listEnvironmentsResponse_nextToken' - Retrieves the next page of the results.
--
-- 'httpStatus', 'listEnvironmentsResponse_httpStatus' - The response's http status code.
--
-- 'environments', 'listEnvironmentsResponse_environments' - Returns the list of Amazon MWAA environments.
newListEnvironmentsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListEnvironmentsResponse
newListEnvironmentsResponse :: Int -> ListEnvironmentsResponse
newListEnvironmentsResponse Int
pHttpStatus_ =
  ListEnvironmentsResponse' :: Maybe Text -> Int -> [Text] -> ListEnvironmentsResponse
ListEnvironmentsResponse'
    { $sel:nextToken:ListEnvironmentsResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListEnvironmentsResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:environments:ListEnvironmentsResponse' :: [Text]
environments = [Text]
forall a. Monoid a => a
Prelude.mempty
    }

-- | Retrieves the next page of the results.
listEnvironmentsResponse_nextToken :: Lens.Lens' ListEnvironmentsResponse (Prelude.Maybe Prelude.Text)
listEnvironmentsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListEnvironmentsResponse -> f ListEnvironmentsResponse
listEnvironmentsResponse_nextToken = (ListEnvironmentsResponse -> Maybe Text)
-> (ListEnvironmentsResponse
    -> Maybe Text -> ListEnvironmentsResponse)
-> Lens' ListEnvironmentsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEnvironmentsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListEnvironmentsResponse' :: ListEnvironmentsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListEnvironmentsResponse
s@ListEnvironmentsResponse' {} Maybe Text
a -> ListEnvironmentsResponse
s {$sel:nextToken:ListEnvironmentsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListEnvironmentsResponse)

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

-- | Returns the list of Amazon MWAA environments.
listEnvironmentsResponse_environments :: Lens.Lens' ListEnvironmentsResponse [Prelude.Text]
listEnvironmentsResponse_environments :: ([Text] -> f [Text])
-> ListEnvironmentsResponse -> f ListEnvironmentsResponse
listEnvironmentsResponse_environments = (ListEnvironmentsResponse -> [Text])
-> (ListEnvironmentsResponse -> [Text] -> ListEnvironmentsResponse)
-> Lens' ListEnvironmentsResponse [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEnvironmentsResponse' {[Text]
environments :: [Text]
$sel:environments:ListEnvironmentsResponse' :: ListEnvironmentsResponse -> [Text]
environments} -> [Text]
environments) (\s :: ListEnvironmentsResponse
s@ListEnvironmentsResponse' {} [Text]
a -> ListEnvironmentsResponse
s {$sel:environments:ListEnvironmentsResponse' :: [Text]
environments = [Text]
a} :: ListEnvironmentsResponse) (([Text] -> f [Text])
 -> ListEnvironmentsResponse -> f ListEnvironmentsResponse)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> ListEnvironmentsResponse
-> f ListEnvironmentsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> f [Text]) -> [Text] -> f [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Prelude.NFData ListEnvironmentsResponse