{-# 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.Greengrass.ListConnectorDefinitions
-- 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)
--
-- Retrieves a list of connector definitions.
--
-- This operation returns paginated results.
module Amazonka.Greengrass.ListConnectorDefinitions
  ( -- * Creating a Request
    ListConnectorDefinitions (..),
    newListConnectorDefinitions,

    -- * Request Lenses
    listConnectorDefinitions_nextToken,
    listConnectorDefinitions_maxResults,

    -- * Destructuring the Response
    ListConnectorDefinitionsResponse (..),
    newListConnectorDefinitionsResponse,

    -- * Response Lenses
    listConnectorDefinitionsResponse_nextToken,
    listConnectorDefinitionsResponse_definitions,
    listConnectorDefinitionsResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.Greengrass.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:/ 'newListConnectorDefinitions' smart constructor.
data ListConnectorDefinitions = ListConnectorDefinitions'
  { -- | The token for the next set of results, or \'\'null\'\' if there are no
    -- additional results.
    ListConnectorDefinitions -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results to be returned per request.
    ListConnectorDefinitions -> Maybe Text
maxResults :: Prelude.Maybe Prelude.Text
  }
  deriving (ListConnectorDefinitions -> ListConnectorDefinitions -> Bool
(ListConnectorDefinitions -> ListConnectorDefinitions -> Bool)
-> (ListConnectorDefinitions -> ListConnectorDefinitions -> Bool)
-> Eq ListConnectorDefinitions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListConnectorDefinitions -> ListConnectorDefinitions -> Bool
$c/= :: ListConnectorDefinitions -> ListConnectorDefinitions -> Bool
== :: ListConnectorDefinitions -> ListConnectorDefinitions -> Bool
$c== :: ListConnectorDefinitions -> ListConnectorDefinitions -> Bool
Prelude.Eq, ReadPrec [ListConnectorDefinitions]
ReadPrec ListConnectorDefinitions
Int -> ReadS ListConnectorDefinitions
ReadS [ListConnectorDefinitions]
(Int -> ReadS ListConnectorDefinitions)
-> ReadS [ListConnectorDefinitions]
-> ReadPrec ListConnectorDefinitions
-> ReadPrec [ListConnectorDefinitions]
-> Read ListConnectorDefinitions
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListConnectorDefinitions]
$creadListPrec :: ReadPrec [ListConnectorDefinitions]
readPrec :: ReadPrec ListConnectorDefinitions
$creadPrec :: ReadPrec ListConnectorDefinitions
readList :: ReadS [ListConnectorDefinitions]
$creadList :: ReadS [ListConnectorDefinitions]
readsPrec :: Int -> ReadS ListConnectorDefinitions
$creadsPrec :: Int -> ReadS ListConnectorDefinitions
Prelude.Read, Int -> ListConnectorDefinitions -> ShowS
[ListConnectorDefinitions] -> ShowS
ListConnectorDefinitions -> String
(Int -> ListConnectorDefinitions -> ShowS)
-> (ListConnectorDefinitions -> String)
-> ([ListConnectorDefinitions] -> ShowS)
-> Show ListConnectorDefinitions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListConnectorDefinitions] -> ShowS
$cshowList :: [ListConnectorDefinitions] -> ShowS
show :: ListConnectorDefinitions -> String
$cshow :: ListConnectorDefinitions -> String
showsPrec :: Int -> ListConnectorDefinitions -> ShowS
$cshowsPrec :: Int -> ListConnectorDefinitions -> ShowS
Prelude.Show, (forall x.
 ListConnectorDefinitions -> Rep ListConnectorDefinitions x)
-> (forall x.
    Rep ListConnectorDefinitions x -> ListConnectorDefinitions)
-> Generic ListConnectorDefinitions
forall x.
Rep ListConnectorDefinitions x -> ListConnectorDefinitions
forall x.
ListConnectorDefinitions -> Rep ListConnectorDefinitions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListConnectorDefinitions x -> ListConnectorDefinitions
$cfrom :: forall x.
ListConnectorDefinitions -> Rep ListConnectorDefinitions x
Prelude.Generic)

-- |
-- Create a value of 'ListConnectorDefinitions' 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', 'listConnectorDefinitions_nextToken' - The token for the next set of results, or \'\'null\'\' if there are no
-- additional results.
--
-- 'maxResults', 'listConnectorDefinitions_maxResults' - The maximum number of results to be returned per request.
newListConnectorDefinitions ::
  ListConnectorDefinitions
newListConnectorDefinitions :: ListConnectorDefinitions
newListConnectorDefinitions =
  ListConnectorDefinitions' :: Maybe Text -> Maybe Text -> ListConnectorDefinitions
ListConnectorDefinitions'
    { $sel:nextToken:ListConnectorDefinitions' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListConnectorDefinitions' :: Maybe Text
maxResults = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The token for the next set of results, or \'\'null\'\' if there are no
-- additional results.
listConnectorDefinitions_nextToken :: Lens.Lens' ListConnectorDefinitions (Prelude.Maybe Prelude.Text)
listConnectorDefinitions_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListConnectorDefinitions -> f ListConnectorDefinitions
listConnectorDefinitions_nextToken = (ListConnectorDefinitions -> Maybe Text)
-> (ListConnectorDefinitions
    -> Maybe Text -> ListConnectorDefinitions)
-> Lens
     ListConnectorDefinitions
     ListConnectorDefinitions
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListConnectorDefinitions' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListConnectorDefinitions' :: ListConnectorDefinitions -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListConnectorDefinitions
s@ListConnectorDefinitions' {} Maybe Text
a -> ListConnectorDefinitions
s {$sel:nextToken:ListConnectorDefinitions' :: Maybe Text
nextToken = Maybe Text
a} :: ListConnectorDefinitions)

-- | The maximum number of results to be returned per request.
listConnectorDefinitions_maxResults :: Lens.Lens' ListConnectorDefinitions (Prelude.Maybe Prelude.Text)
listConnectorDefinitions_maxResults :: (Maybe Text -> f (Maybe Text))
-> ListConnectorDefinitions -> f ListConnectorDefinitions
listConnectorDefinitions_maxResults = (ListConnectorDefinitions -> Maybe Text)
-> (ListConnectorDefinitions
    -> Maybe Text -> ListConnectorDefinitions)
-> Lens
     ListConnectorDefinitions
     ListConnectorDefinitions
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListConnectorDefinitions' {Maybe Text
maxResults :: Maybe Text
$sel:maxResults:ListConnectorDefinitions' :: ListConnectorDefinitions -> Maybe Text
maxResults} -> Maybe Text
maxResults) (\s :: ListConnectorDefinitions
s@ListConnectorDefinitions' {} Maybe Text
a -> ListConnectorDefinitions
s {$sel:maxResults:ListConnectorDefinitions' :: Maybe Text
maxResults = Maybe Text
a} :: ListConnectorDefinitions)

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

instance Prelude.NFData ListConnectorDefinitions

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

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

-- | /See:/ 'newListConnectorDefinitionsResponse' smart constructor.
data ListConnectorDefinitionsResponse = ListConnectorDefinitionsResponse'
  { -- | The token for the next set of results, or \'\'null\'\' if there are no
    -- additional results.
    ListConnectorDefinitionsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Information about a definition.
    ListConnectorDefinitionsResponse -> Maybe [DefinitionInformation]
definitions :: Prelude.Maybe [DefinitionInformation],
    -- | The response's http status code.
    ListConnectorDefinitionsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListConnectorDefinitionsResponse
-> ListConnectorDefinitionsResponse -> Bool
(ListConnectorDefinitionsResponse
 -> ListConnectorDefinitionsResponse -> Bool)
-> (ListConnectorDefinitionsResponse
    -> ListConnectorDefinitionsResponse -> Bool)
-> Eq ListConnectorDefinitionsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListConnectorDefinitionsResponse
-> ListConnectorDefinitionsResponse -> Bool
$c/= :: ListConnectorDefinitionsResponse
-> ListConnectorDefinitionsResponse -> Bool
== :: ListConnectorDefinitionsResponse
-> ListConnectorDefinitionsResponse -> Bool
$c== :: ListConnectorDefinitionsResponse
-> ListConnectorDefinitionsResponse -> Bool
Prelude.Eq, ReadPrec [ListConnectorDefinitionsResponse]
ReadPrec ListConnectorDefinitionsResponse
Int -> ReadS ListConnectorDefinitionsResponse
ReadS [ListConnectorDefinitionsResponse]
(Int -> ReadS ListConnectorDefinitionsResponse)
-> ReadS [ListConnectorDefinitionsResponse]
-> ReadPrec ListConnectorDefinitionsResponse
-> ReadPrec [ListConnectorDefinitionsResponse]
-> Read ListConnectorDefinitionsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListConnectorDefinitionsResponse]
$creadListPrec :: ReadPrec [ListConnectorDefinitionsResponse]
readPrec :: ReadPrec ListConnectorDefinitionsResponse
$creadPrec :: ReadPrec ListConnectorDefinitionsResponse
readList :: ReadS [ListConnectorDefinitionsResponse]
$creadList :: ReadS [ListConnectorDefinitionsResponse]
readsPrec :: Int -> ReadS ListConnectorDefinitionsResponse
$creadsPrec :: Int -> ReadS ListConnectorDefinitionsResponse
Prelude.Read, Int -> ListConnectorDefinitionsResponse -> ShowS
[ListConnectorDefinitionsResponse] -> ShowS
ListConnectorDefinitionsResponse -> String
(Int -> ListConnectorDefinitionsResponse -> ShowS)
-> (ListConnectorDefinitionsResponse -> String)
-> ([ListConnectorDefinitionsResponse] -> ShowS)
-> Show ListConnectorDefinitionsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListConnectorDefinitionsResponse] -> ShowS
$cshowList :: [ListConnectorDefinitionsResponse] -> ShowS
show :: ListConnectorDefinitionsResponse -> String
$cshow :: ListConnectorDefinitionsResponse -> String
showsPrec :: Int -> ListConnectorDefinitionsResponse -> ShowS
$cshowsPrec :: Int -> ListConnectorDefinitionsResponse -> ShowS
Prelude.Show, (forall x.
 ListConnectorDefinitionsResponse
 -> Rep ListConnectorDefinitionsResponse x)
-> (forall x.
    Rep ListConnectorDefinitionsResponse x
    -> ListConnectorDefinitionsResponse)
-> Generic ListConnectorDefinitionsResponse
forall x.
Rep ListConnectorDefinitionsResponse x
-> ListConnectorDefinitionsResponse
forall x.
ListConnectorDefinitionsResponse
-> Rep ListConnectorDefinitionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListConnectorDefinitionsResponse x
-> ListConnectorDefinitionsResponse
$cfrom :: forall x.
ListConnectorDefinitionsResponse
-> Rep ListConnectorDefinitionsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListConnectorDefinitionsResponse' 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', 'listConnectorDefinitionsResponse_nextToken' - The token for the next set of results, or \'\'null\'\' if there are no
-- additional results.
--
-- 'definitions', 'listConnectorDefinitionsResponse_definitions' - Information about a definition.
--
-- 'httpStatus', 'listConnectorDefinitionsResponse_httpStatus' - The response's http status code.
newListConnectorDefinitionsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListConnectorDefinitionsResponse
newListConnectorDefinitionsResponse :: Int -> ListConnectorDefinitionsResponse
newListConnectorDefinitionsResponse Int
pHttpStatus_ =
  ListConnectorDefinitionsResponse' :: Maybe Text
-> Maybe [DefinitionInformation]
-> Int
-> ListConnectorDefinitionsResponse
ListConnectorDefinitionsResponse'
    { $sel:nextToken:ListConnectorDefinitionsResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:definitions:ListConnectorDefinitionsResponse' :: Maybe [DefinitionInformation]
definitions = Maybe [DefinitionInformation]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListConnectorDefinitionsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The token for the next set of results, or \'\'null\'\' if there are no
-- additional results.
listConnectorDefinitionsResponse_nextToken :: Lens.Lens' ListConnectorDefinitionsResponse (Prelude.Maybe Prelude.Text)
listConnectorDefinitionsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListConnectorDefinitionsResponse
-> f ListConnectorDefinitionsResponse
listConnectorDefinitionsResponse_nextToken = (ListConnectorDefinitionsResponse -> Maybe Text)
-> (ListConnectorDefinitionsResponse
    -> Maybe Text -> ListConnectorDefinitionsResponse)
-> Lens' ListConnectorDefinitionsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListConnectorDefinitionsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListConnectorDefinitionsResponse' :: ListConnectorDefinitionsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListConnectorDefinitionsResponse
s@ListConnectorDefinitionsResponse' {} Maybe Text
a -> ListConnectorDefinitionsResponse
s {$sel:nextToken:ListConnectorDefinitionsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListConnectorDefinitionsResponse)

-- | Information about a definition.
listConnectorDefinitionsResponse_definitions :: Lens.Lens' ListConnectorDefinitionsResponse (Prelude.Maybe [DefinitionInformation])
listConnectorDefinitionsResponse_definitions :: (Maybe [DefinitionInformation]
 -> f (Maybe [DefinitionInformation]))
-> ListConnectorDefinitionsResponse
-> f ListConnectorDefinitionsResponse
listConnectorDefinitionsResponse_definitions = (ListConnectorDefinitionsResponse -> Maybe [DefinitionInformation])
-> (ListConnectorDefinitionsResponse
    -> Maybe [DefinitionInformation]
    -> ListConnectorDefinitionsResponse)
-> Lens'
     ListConnectorDefinitionsResponse (Maybe [DefinitionInformation])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListConnectorDefinitionsResponse' {Maybe [DefinitionInformation]
definitions :: Maybe [DefinitionInformation]
$sel:definitions:ListConnectorDefinitionsResponse' :: ListConnectorDefinitionsResponse -> Maybe [DefinitionInformation]
definitions} -> Maybe [DefinitionInformation]
definitions) (\s :: ListConnectorDefinitionsResponse
s@ListConnectorDefinitionsResponse' {} Maybe [DefinitionInformation]
a -> ListConnectorDefinitionsResponse
s {$sel:definitions:ListConnectorDefinitionsResponse' :: Maybe [DefinitionInformation]
definitions = Maybe [DefinitionInformation]
a} :: ListConnectorDefinitionsResponse) ((Maybe [DefinitionInformation]
  -> f (Maybe [DefinitionInformation]))
 -> ListConnectorDefinitionsResponse
 -> f ListConnectorDefinitionsResponse)
-> ((Maybe [DefinitionInformation]
     -> f (Maybe [DefinitionInformation]))
    -> Maybe [DefinitionInformation]
    -> f (Maybe [DefinitionInformation]))
-> (Maybe [DefinitionInformation]
    -> f (Maybe [DefinitionInformation]))
-> ListConnectorDefinitionsResponse
-> f ListConnectorDefinitionsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [DefinitionInformation]
  [DefinitionInformation]
  [DefinitionInformation]
  [DefinitionInformation]
-> Iso
     (Maybe [DefinitionInformation])
     (Maybe [DefinitionInformation])
     (Maybe [DefinitionInformation])
     (Maybe [DefinitionInformation])
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
  [DefinitionInformation]
  [DefinitionInformation]
  [DefinitionInformation]
  [DefinitionInformation]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    ListConnectorDefinitionsResponse