{-# 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.GroundStation.ListDataflowEndpointGroups
-- 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)
--
-- Returns a list of @DataflowEndpoint@ groups.
--
-- This operation returns paginated results.
module Amazonka.GroundStation.ListDataflowEndpointGroups
  ( -- * Creating a Request
    ListDataflowEndpointGroups (..),
    newListDataflowEndpointGroups,

    -- * Request Lenses
    listDataflowEndpointGroups_nextToken,
    listDataflowEndpointGroups_maxResults,

    -- * Destructuring the Response
    ListDataflowEndpointGroupsResponse (..),
    newListDataflowEndpointGroupsResponse,

    -- * Response Lenses
    listDataflowEndpointGroupsResponse_dataflowEndpointGroupList,
    listDataflowEndpointGroupsResponse_nextToken,
    listDataflowEndpointGroupsResponse_httpStatus,
  )
where

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

-- |
--
-- /See:/ 'newListDataflowEndpointGroups' smart constructor.
data ListDataflowEndpointGroups = ListDataflowEndpointGroups'
  { -- | Next token returned in the request of a previous
    -- @ListDataflowEndpointGroups@ call. Used to get the next page of results.
    ListDataflowEndpointGroups -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Maximum number of dataflow endpoint groups returned.
    ListDataflowEndpointGroups -> Maybe Int
maxResults :: Prelude.Maybe Prelude.Int
  }
  deriving (ListDataflowEndpointGroups -> ListDataflowEndpointGroups -> Bool
(ListDataflowEndpointGroups -> ListDataflowEndpointGroups -> Bool)
-> (ListDataflowEndpointGroups
    -> ListDataflowEndpointGroups -> Bool)
-> Eq ListDataflowEndpointGroups
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDataflowEndpointGroups -> ListDataflowEndpointGroups -> Bool
$c/= :: ListDataflowEndpointGroups -> ListDataflowEndpointGroups -> Bool
== :: ListDataflowEndpointGroups -> ListDataflowEndpointGroups -> Bool
$c== :: ListDataflowEndpointGroups -> ListDataflowEndpointGroups -> Bool
Prelude.Eq, ReadPrec [ListDataflowEndpointGroups]
ReadPrec ListDataflowEndpointGroups
Int -> ReadS ListDataflowEndpointGroups
ReadS [ListDataflowEndpointGroups]
(Int -> ReadS ListDataflowEndpointGroups)
-> ReadS [ListDataflowEndpointGroups]
-> ReadPrec ListDataflowEndpointGroups
-> ReadPrec [ListDataflowEndpointGroups]
-> Read ListDataflowEndpointGroups
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDataflowEndpointGroups]
$creadListPrec :: ReadPrec [ListDataflowEndpointGroups]
readPrec :: ReadPrec ListDataflowEndpointGroups
$creadPrec :: ReadPrec ListDataflowEndpointGroups
readList :: ReadS [ListDataflowEndpointGroups]
$creadList :: ReadS [ListDataflowEndpointGroups]
readsPrec :: Int -> ReadS ListDataflowEndpointGroups
$creadsPrec :: Int -> ReadS ListDataflowEndpointGroups
Prelude.Read, Int -> ListDataflowEndpointGroups -> ShowS
[ListDataflowEndpointGroups] -> ShowS
ListDataflowEndpointGroups -> String
(Int -> ListDataflowEndpointGroups -> ShowS)
-> (ListDataflowEndpointGroups -> String)
-> ([ListDataflowEndpointGroups] -> ShowS)
-> Show ListDataflowEndpointGroups
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDataflowEndpointGroups] -> ShowS
$cshowList :: [ListDataflowEndpointGroups] -> ShowS
show :: ListDataflowEndpointGroups -> String
$cshow :: ListDataflowEndpointGroups -> String
showsPrec :: Int -> ListDataflowEndpointGroups -> ShowS
$cshowsPrec :: Int -> ListDataflowEndpointGroups -> ShowS
Prelude.Show, (forall x.
 ListDataflowEndpointGroups -> Rep ListDataflowEndpointGroups x)
-> (forall x.
    Rep ListDataflowEndpointGroups x -> ListDataflowEndpointGroups)
-> Generic ListDataflowEndpointGroups
forall x.
Rep ListDataflowEndpointGroups x -> ListDataflowEndpointGroups
forall x.
ListDataflowEndpointGroups -> Rep ListDataflowEndpointGroups x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListDataflowEndpointGroups x -> ListDataflowEndpointGroups
$cfrom :: forall x.
ListDataflowEndpointGroups -> Rep ListDataflowEndpointGroups x
Prelude.Generic)

-- |
-- Create a value of 'ListDataflowEndpointGroups' 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', 'listDataflowEndpointGroups_nextToken' - Next token returned in the request of a previous
-- @ListDataflowEndpointGroups@ call. Used to get the next page of results.
--
-- 'maxResults', 'listDataflowEndpointGroups_maxResults' - Maximum number of dataflow endpoint groups returned.
newListDataflowEndpointGroups ::
  ListDataflowEndpointGroups
newListDataflowEndpointGroups :: ListDataflowEndpointGroups
newListDataflowEndpointGroups =
  ListDataflowEndpointGroups' :: Maybe Text -> Maybe Int -> ListDataflowEndpointGroups
ListDataflowEndpointGroups'
    { $sel:nextToken:ListDataflowEndpointGroups' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListDataflowEndpointGroups' :: Maybe Int
maxResults = Maybe Int
forall a. Maybe a
Prelude.Nothing
    }

-- | Next token returned in the request of a previous
-- @ListDataflowEndpointGroups@ call. Used to get the next page of results.
listDataflowEndpointGroups_nextToken :: Lens.Lens' ListDataflowEndpointGroups (Prelude.Maybe Prelude.Text)
listDataflowEndpointGroups_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListDataflowEndpointGroups -> f ListDataflowEndpointGroups
listDataflowEndpointGroups_nextToken = (ListDataflowEndpointGroups -> Maybe Text)
-> (ListDataflowEndpointGroups
    -> Maybe Text -> ListDataflowEndpointGroups)
-> Lens
     ListDataflowEndpointGroups
     ListDataflowEndpointGroups
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDataflowEndpointGroups' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListDataflowEndpointGroups' :: ListDataflowEndpointGroups -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListDataflowEndpointGroups
s@ListDataflowEndpointGroups' {} Maybe Text
a -> ListDataflowEndpointGroups
s {$sel:nextToken:ListDataflowEndpointGroups' :: Maybe Text
nextToken = Maybe Text
a} :: ListDataflowEndpointGroups)

-- | Maximum number of dataflow endpoint groups returned.
listDataflowEndpointGroups_maxResults :: Lens.Lens' ListDataflowEndpointGroups (Prelude.Maybe Prelude.Int)
listDataflowEndpointGroups_maxResults :: (Maybe Int -> f (Maybe Int))
-> ListDataflowEndpointGroups -> f ListDataflowEndpointGroups
listDataflowEndpointGroups_maxResults = (ListDataflowEndpointGroups -> Maybe Int)
-> (ListDataflowEndpointGroups
    -> Maybe Int -> ListDataflowEndpointGroups)
-> Lens
     ListDataflowEndpointGroups
     ListDataflowEndpointGroups
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDataflowEndpointGroups' {Maybe Int
maxResults :: Maybe Int
$sel:maxResults:ListDataflowEndpointGroups' :: ListDataflowEndpointGroups -> Maybe Int
maxResults} -> Maybe Int
maxResults) (\s :: ListDataflowEndpointGroups
s@ListDataflowEndpointGroups' {} Maybe Int
a -> ListDataflowEndpointGroups
s {$sel:maxResults:ListDataflowEndpointGroups' :: Maybe Int
maxResults = Maybe Int
a} :: ListDataflowEndpointGroups)

instance Core.AWSPager ListDataflowEndpointGroups where
  page :: ListDataflowEndpointGroups
-> AWSResponse ListDataflowEndpointGroups
-> Maybe ListDataflowEndpointGroups
page ListDataflowEndpointGroups
rq AWSResponse ListDataflowEndpointGroups
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListDataflowEndpointGroups
ListDataflowEndpointGroupsResponse
rs
            ListDataflowEndpointGroupsResponse
-> Getting (First Text) ListDataflowEndpointGroupsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListDataflowEndpointGroupsResponse
-> Const (First Text) ListDataflowEndpointGroupsResponse
Lens' ListDataflowEndpointGroupsResponse (Maybe Text)
listDataflowEndpointGroupsResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListDataflowEndpointGroupsResponse
 -> Const (First Text) ListDataflowEndpointGroupsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListDataflowEndpointGroupsResponse 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 ListDataflowEndpointGroups
forall a. Maybe a
Prelude.Nothing
    | Maybe [DataflowEndpointListItem] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListDataflowEndpointGroups
ListDataflowEndpointGroupsResponse
rs
            ListDataflowEndpointGroupsResponse
-> Getting
     (First [DataflowEndpointListItem])
     ListDataflowEndpointGroupsResponse
     [DataflowEndpointListItem]
-> Maybe [DataflowEndpointListItem]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [DataflowEndpointListItem]
 -> Const
      (First [DataflowEndpointListItem])
      (Maybe [DataflowEndpointListItem]))
-> ListDataflowEndpointGroupsResponse
-> Const
     (First [DataflowEndpointListItem])
     ListDataflowEndpointGroupsResponse
Lens'
  ListDataflowEndpointGroupsResponse
  (Maybe [DataflowEndpointListItem])
listDataflowEndpointGroupsResponse_dataflowEndpointGroupList
              ((Maybe [DataflowEndpointListItem]
  -> Const
       (First [DataflowEndpointListItem])
       (Maybe [DataflowEndpointListItem]))
 -> ListDataflowEndpointGroupsResponse
 -> Const
      (First [DataflowEndpointListItem])
      ListDataflowEndpointGroupsResponse)
-> (([DataflowEndpointListItem]
     -> Const
          (First [DataflowEndpointListItem]) [DataflowEndpointListItem])
    -> Maybe [DataflowEndpointListItem]
    -> Const
         (First [DataflowEndpointListItem])
         (Maybe [DataflowEndpointListItem]))
-> Getting
     (First [DataflowEndpointListItem])
     ListDataflowEndpointGroupsResponse
     [DataflowEndpointListItem]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DataflowEndpointListItem]
 -> Const
      (First [DataflowEndpointListItem]) [DataflowEndpointListItem])
-> Maybe [DataflowEndpointListItem]
-> Const
     (First [DataflowEndpointListItem])
     (Maybe [DataflowEndpointListItem])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListDataflowEndpointGroups
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListDataflowEndpointGroups -> Maybe ListDataflowEndpointGroups
forall a. a -> Maybe a
Prelude.Just (ListDataflowEndpointGroups -> Maybe ListDataflowEndpointGroups)
-> ListDataflowEndpointGroups -> Maybe ListDataflowEndpointGroups
forall a b. (a -> b) -> a -> b
Prelude.$
        ListDataflowEndpointGroups
rq
          ListDataflowEndpointGroups
-> (ListDataflowEndpointGroups -> ListDataflowEndpointGroups)
-> ListDataflowEndpointGroups
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListDataflowEndpointGroups
-> Identity ListDataflowEndpointGroups
Lens
  ListDataflowEndpointGroups
  ListDataflowEndpointGroups
  (Maybe Text)
  (Maybe Text)
listDataflowEndpointGroups_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListDataflowEndpointGroups
 -> Identity ListDataflowEndpointGroups)
-> Maybe Text
-> ListDataflowEndpointGroups
-> ListDataflowEndpointGroups
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListDataflowEndpointGroups
ListDataflowEndpointGroupsResponse
rs
          ListDataflowEndpointGroupsResponse
-> Getting (First Text) ListDataflowEndpointGroupsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListDataflowEndpointGroupsResponse
-> Const (First Text) ListDataflowEndpointGroupsResponse
Lens' ListDataflowEndpointGroupsResponse (Maybe Text)
listDataflowEndpointGroupsResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListDataflowEndpointGroupsResponse
 -> Const (First Text) ListDataflowEndpointGroupsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListDataflowEndpointGroupsResponse 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 ListDataflowEndpointGroups where
  type
    AWSResponse ListDataflowEndpointGroups =
      ListDataflowEndpointGroupsResponse
  request :: ListDataflowEndpointGroups -> Request ListDataflowEndpointGroups
request = Service
-> ListDataflowEndpointGroups -> Request ListDataflowEndpointGroups
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy ListDataflowEndpointGroups
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListDataflowEndpointGroups)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListDataflowEndpointGroups))
-> Logger
-> Service
-> Proxy ListDataflowEndpointGroups
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListDataflowEndpointGroups)))
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 [DataflowEndpointListItem]
-> Maybe Text -> Int -> ListDataflowEndpointGroupsResponse
ListDataflowEndpointGroupsResponse'
            (Maybe [DataflowEndpointListItem]
 -> Maybe Text -> Int -> ListDataflowEndpointGroupsResponse)
-> Either String (Maybe [DataflowEndpointListItem])
-> Either
     String (Maybe Text -> Int -> ListDataflowEndpointGroupsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object
-> Text -> Either String (Maybe (Maybe [DataflowEndpointListItem]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"dataflowEndpointGroupList"
                            Either String (Maybe (Maybe [DataflowEndpointListItem]))
-> Maybe [DataflowEndpointListItem]
-> Either String (Maybe [DataflowEndpointListItem])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [DataflowEndpointListItem]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either
  String (Maybe Text -> Int -> ListDataflowEndpointGroupsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ListDataflowEndpointGroupsResponse)
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
"nextToken")
            Either String (Int -> ListDataflowEndpointGroupsResponse)
-> Either String Int
-> Either String ListDataflowEndpointGroupsResponse
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))
      )

instance Prelude.Hashable ListDataflowEndpointGroups

instance Prelude.NFData ListDataflowEndpointGroups

instance Core.ToHeaders ListDataflowEndpointGroups where
  toHeaders :: ListDataflowEndpointGroups -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListDataflowEndpointGroups -> 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 ListDataflowEndpointGroups where
  toPath :: ListDataflowEndpointGroups -> ByteString
toPath = ByteString -> ListDataflowEndpointGroups -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/dataflowEndpointGroup"

instance Core.ToQuery ListDataflowEndpointGroups where
  toQuery :: ListDataflowEndpointGroups -> QueryString
toQuery ListDataflowEndpointGroups' {Maybe Int
Maybe Text
maxResults :: Maybe Int
nextToken :: Maybe Text
$sel:maxResults:ListDataflowEndpointGroups' :: ListDataflowEndpointGroups -> Maybe Int
$sel:nextToken:ListDataflowEndpointGroups' :: ListDataflowEndpointGroups -> 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 Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
maxResults
      ]

-- |
--
-- /See:/ 'newListDataflowEndpointGroupsResponse' smart constructor.
data ListDataflowEndpointGroupsResponse = ListDataflowEndpointGroupsResponse'
  { -- | A list of dataflow endpoint groups.
    ListDataflowEndpointGroupsResponse
-> Maybe [DataflowEndpointListItem]
dataflowEndpointGroupList :: Prelude.Maybe [DataflowEndpointListItem],
    -- | Next token returned in the response of a previous
    -- @ListDataflowEndpointGroups@ call. Used to get the next page of results.
    ListDataflowEndpointGroupsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListDataflowEndpointGroupsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListDataflowEndpointGroupsResponse
-> ListDataflowEndpointGroupsResponse -> Bool
(ListDataflowEndpointGroupsResponse
 -> ListDataflowEndpointGroupsResponse -> Bool)
-> (ListDataflowEndpointGroupsResponse
    -> ListDataflowEndpointGroupsResponse -> Bool)
-> Eq ListDataflowEndpointGroupsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDataflowEndpointGroupsResponse
-> ListDataflowEndpointGroupsResponse -> Bool
$c/= :: ListDataflowEndpointGroupsResponse
-> ListDataflowEndpointGroupsResponse -> Bool
== :: ListDataflowEndpointGroupsResponse
-> ListDataflowEndpointGroupsResponse -> Bool
$c== :: ListDataflowEndpointGroupsResponse
-> ListDataflowEndpointGroupsResponse -> Bool
Prelude.Eq, ReadPrec [ListDataflowEndpointGroupsResponse]
ReadPrec ListDataflowEndpointGroupsResponse
Int -> ReadS ListDataflowEndpointGroupsResponse
ReadS [ListDataflowEndpointGroupsResponse]
(Int -> ReadS ListDataflowEndpointGroupsResponse)
-> ReadS [ListDataflowEndpointGroupsResponse]
-> ReadPrec ListDataflowEndpointGroupsResponse
-> ReadPrec [ListDataflowEndpointGroupsResponse]
-> Read ListDataflowEndpointGroupsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDataflowEndpointGroupsResponse]
$creadListPrec :: ReadPrec [ListDataflowEndpointGroupsResponse]
readPrec :: ReadPrec ListDataflowEndpointGroupsResponse
$creadPrec :: ReadPrec ListDataflowEndpointGroupsResponse
readList :: ReadS [ListDataflowEndpointGroupsResponse]
$creadList :: ReadS [ListDataflowEndpointGroupsResponse]
readsPrec :: Int -> ReadS ListDataflowEndpointGroupsResponse
$creadsPrec :: Int -> ReadS ListDataflowEndpointGroupsResponse
Prelude.Read, Int -> ListDataflowEndpointGroupsResponse -> ShowS
[ListDataflowEndpointGroupsResponse] -> ShowS
ListDataflowEndpointGroupsResponse -> String
(Int -> ListDataflowEndpointGroupsResponse -> ShowS)
-> (ListDataflowEndpointGroupsResponse -> String)
-> ([ListDataflowEndpointGroupsResponse] -> ShowS)
-> Show ListDataflowEndpointGroupsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDataflowEndpointGroupsResponse] -> ShowS
$cshowList :: [ListDataflowEndpointGroupsResponse] -> ShowS
show :: ListDataflowEndpointGroupsResponse -> String
$cshow :: ListDataflowEndpointGroupsResponse -> String
showsPrec :: Int -> ListDataflowEndpointGroupsResponse -> ShowS
$cshowsPrec :: Int -> ListDataflowEndpointGroupsResponse -> ShowS
Prelude.Show, (forall x.
 ListDataflowEndpointGroupsResponse
 -> Rep ListDataflowEndpointGroupsResponse x)
-> (forall x.
    Rep ListDataflowEndpointGroupsResponse x
    -> ListDataflowEndpointGroupsResponse)
-> Generic ListDataflowEndpointGroupsResponse
forall x.
Rep ListDataflowEndpointGroupsResponse x
-> ListDataflowEndpointGroupsResponse
forall x.
ListDataflowEndpointGroupsResponse
-> Rep ListDataflowEndpointGroupsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListDataflowEndpointGroupsResponse x
-> ListDataflowEndpointGroupsResponse
$cfrom :: forall x.
ListDataflowEndpointGroupsResponse
-> Rep ListDataflowEndpointGroupsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListDataflowEndpointGroupsResponse' 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:
--
-- 'dataflowEndpointGroupList', 'listDataflowEndpointGroupsResponse_dataflowEndpointGroupList' - A list of dataflow endpoint groups.
--
-- 'nextToken', 'listDataflowEndpointGroupsResponse_nextToken' - Next token returned in the response of a previous
-- @ListDataflowEndpointGroups@ call. Used to get the next page of results.
--
-- 'httpStatus', 'listDataflowEndpointGroupsResponse_httpStatus' - The response's http status code.
newListDataflowEndpointGroupsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListDataflowEndpointGroupsResponse
newListDataflowEndpointGroupsResponse :: Int -> ListDataflowEndpointGroupsResponse
newListDataflowEndpointGroupsResponse Int
pHttpStatus_ =
  ListDataflowEndpointGroupsResponse' :: Maybe [DataflowEndpointListItem]
-> Maybe Text -> Int -> ListDataflowEndpointGroupsResponse
ListDataflowEndpointGroupsResponse'
    { $sel:dataflowEndpointGroupList:ListDataflowEndpointGroupsResponse' :: Maybe [DataflowEndpointListItem]
dataflowEndpointGroupList =
        Maybe [DataflowEndpointListItem]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListDataflowEndpointGroupsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListDataflowEndpointGroupsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A list of dataflow endpoint groups.
listDataflowEndpointGroupsResponse_dataflowEndpointGroupList :: Lens.Lens' ListDataflowEndpointGroupsResponse (Prelude.Maybe [DataflowEndpointListItem])
listDataflowEndpointGroupsResponse_dataflowEndpointGroupList :: (Maybe [DataflowEndpointListItem]
 -> f (Maybe [DataflowEndpointListItem]))
-> ListDataflowEndpointGroupsResponse
-> f ListDataflowEndpointGroupsResponse
listDataflowEndpointGroupsResponse_dataflowEndpointGroupList = (ListDataflowEndpointGroupsResponse
 -> Maybe [DataflowEndpointListItem])
-> (ListDataflowEndpointGroupsResponse
    -> Maybe [DataflowEndpointListItem]
    -> ListDataflowEndpointGroupsResponse)
-> Lens'
     ListDataflowEndpointGroupsResponse
     (Maybe [DataflowEndpointListItem])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDataflowEndpointGroupsResponse' {Maybe [DataflowEndpointListItem]
dataflowEndpointGroupList :: Maybe [DataflowEndpointListItem]
$sel:dataflowEndpointGroupList:ListDataflowEndpointGroupsResponse' :: ListDataflowEndpointGroupsResponse
-> Maybe [DataflowEndpointListItem]
dataflowEndpointGroupList} -> Maybe [DataflowEndpointListItem]
dataflowEndpointGroupList) (\s :: ListDataflowEndpointGroupsResponse
s@ListDataflowEndpointGroupsResponse' {} Maybe [DataflowEndpointListItem]
a -> ListDataflowEndpointGroupsResponse
s {$sel:dataflowEndpointGroupList:ListDataflowEndpointGroupsResponse' :: Maybe [DataflowEndpointListItem]
dataflowEndpointGroupList = Maybe [DataflowEndpointListItem]
a} :: ListDataflowEndpointGroupsResponse) ((Maybe [DataflowEndpointListItem]
  -> f (Maybe [DataflowEndpointListItem]))
 -> ListDataflowEndpointGroupsResponse
 -> f ListDataflowEndpointGroupsResponse)
-> ((Maybe [DataflowEndpointListItem]
     -> f (Maybe [DataflowEndpointListItem]))
    -> Maybe [DataflowEndpointListItem]
    -> f (Maybe [DataflowEndpointListItem]))
-> (Maybe [DataflowEndpointListItem]
    -> f (Maybe [DataflowEndpointListItem]))
-> ListDataflowEndpointGroupsResponse
-> f ListDataflowEndpointGroupsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [DataflowEndpointListItem]
  [DataflowEndpointListItem]
  [DataflowEndpointListItem]
  [DataflowEndpointListItem]
-> Iso
     (Maybe [DataflowEndpointListItem])
     (Maybe [DataflowEndpointListItem])
     (Maybe [DataflowEndpointListItem])
     (Maybe [DataflowEndpointListItem])
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
  [DataflowEndpointListItem]
  [DataflowEndpointListItem]
  [DataflowEndpointListItem]
  [DataflowEndpointListItem]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Next token returned in the response of a previous
-- @ListDataflowEndpointGroups@ call. Used to get the next page of results.
listDataflowEndpointGroupsResponse_nextToken :: Lens.Lens' ListDataflowEndpointGroupsResponse (Prelude.Maybe Prelude.Text)
listDataflowEndpointGroupsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListDataflowEndpointGroupsResponse
-> f ListDataflowEndpointGroupsResponse
listDataflowEndpointGroupsResponse_nextToken = (ListDataflowEndpointGroupsResponse -> Maybe Text)
-> (ListDataflowEndpointGroupsResponse
    -> Maybe Text -> ListDataflowEndpointGroupsResponse)
-> Lens' ListDataflowEndpointGroupsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDataflowEndpointGroupsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListDataflowEndpointGroupsResponse' :: ListDataflowEndpointGroupsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListDataflowEndpointGroupsResponse
s@ListDataflowEndpointGroupsResponse' {} Maybe Text
a -> ListDataflowEndpointGroupsResponse
s {$sel:nextToken:ListDataflowEndpointGroupsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListDataflowEndpointGroupsResponse)

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

instance
  Prelude.NFData
    ListDataflowEndpointGroupsResponse