{-# 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.SMS.GetConnectors
-- 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)
--
-- Describes the connectors registered with the AWS SMS.
--
-- This operation returns paginated results.
module Amazonka.SMS.GetConnectors
  ( -- * Creating a Request
    GetConnectors (..),
    newGetConnectors,

    -- * Request Lenses
    getConnectors_nextToken,
    getConnectors_maxResults,

    -- * Destructuring the Response
    GetConnectorsResponse (..),
    newGetConnectorsResponse,

    -- * Response Lenses
    getConnectorsResponse_connectorList,
    getConnectorsResponse_nextToken,
    getConnectorsResponse_httpStatus,
  )
where

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

-- | /See:/ 'newGetConnectors' smart constructor.
data GetConnectors = GetConnectors'
  { -- | The token for the next set of results.
    GetConnectors -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results to return in a single call. The default
    -- value is 50. To retrieve the remaining results, make another call with
    -- the returned @NextToken@ value.
    GetConnectors -> Maybe Int
maxResults :: Prelude.Maybe Prelude.Int
  }
  deriving (GetConnectors -> GetConnectors -> Bool
(GetConnectors -> GetConnectors -> Bool)
-> (GetConnectors -> GetConnectors -> Bool) -> Eq GetConnectors
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetConnectors -> GetConnectors -> Bool
$c/= :: GetConnectors -> GetConnectors -> Bool
== :: GetConnectors -> GetConnectors -> Bool
$c== :: GetConnectors -> GetConnectors -> Bool
Prelude.Eq, ReadPrec [GetConnectors]
ReadPrec GetConnectors
Int -> ReadS GetConnectors
ReadS [GetConnectors]
(Int -> ReadS GetConnectors)
-> ReadS [GetConnectors]
-> ReadPrec GetConnectors
-> ReadPrec [GetConnectors]
-> Read GetConnectors
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetConnectors]
$creadListPrec :: ReadPrec [GetConnectors]
readPrec :: ReadPrec GetConnectors
$creadPrec :: ReadPrec GetConnectors
readList :: ReadS [GetConnectors]
$creadList :: ReadS [GetConnectors]
readsPrec :: Int -> ReadS GetConnectors
$creadsPrec :: Int -> ReadS GetConnectors
Prelude.Read, Int -> GetConnectors -> ShowS
[GetConnectors] -> ShowS
GetConnectors -> String
(Int -> GetConnectors -> ShowS)
-> (GetConnectors -> String)
-> ([GetConnectors] -> ShowS)
-> Show GetConnectors
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetConnectors] -> ShowS
$cshowList :: [GetConnectors] -> ShowS
show :: GetConnectors -> String
$cshow :: GetConnectors -> String
showsPrec :: Int -> GetConnectors -> ShowS
$cshowsPrec :: Int -> GetConnectors -> ShowS
Prelude.Show, (forall x. GetConnectors -> Rep GetConnectors x)
-> (forall x. Rep GetConnectors x -> GetConnectors)
-> Generic GetConnectors
forall x. Rep GetConnectors x -> GetConnectors
forall x. GetConnectors -> Rep GetConnectors x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetConnectors x -> GetConnectors
$cfrom :: forall x. GetConnectors -> Rep GetConnectors x
Prelude.Generic)

-- |
-- Create a value of 'GetConnectors' 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', 'getConnectors_nextToken' - The token for the next set of results.
--
-- 'maxResults', 'getConnectors_maxResults' - The maximum number of results to return in a single call. The default
-- value is 50. To retrieve the remaining results, make another call with
-- the returned @NextToken@ value.
newGetConnectors ::
  GetConnectors
newGetConnectors :: GetConnectors
newGetConnectors =
  GetConnectors' :: Maybe Text -> Maybe Int -> GetConnectors
GetConnectors'
    { $sel:nextToken:GetConnectors' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:GetConnectors' :: Maybe Int
maxResults = Maybe Int
forall a. Maybe a
Prelude.Nothing
    }

-- | The token for the next set of results.
getConnectors_nextToken :: Lens.Lens' GetConnectors (Prelude.Maybe Prelude.Text)
getConnectors_nextToken :: (Maybe Text -> f (Maybe Text)) -> GetConnectors -> f GetConnectors
getConnectors_nextToken = (GetConnectors -> Maybe Text)
-> (GetConnectors -> Maybe Text -> GetConnectors)
-> Lens GetConnectors GetConnectors (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetConnectors' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetConnectors' :: GetConnectors -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetConnectors
s@GetConnectors' {} Maybe Text
a -> GetConnectors
s {$sel:nextToken:GetConnectors' :: Maybe Text
nextToken = Maybe Text
a} :: GetConnectors)

-- | The maximum number of results to return in a single call. The default
-- value is 50. To retrieve the remaining results, make another call with
-- the returned @NextToken@ value.
getConnectors_maxResults :: Lens.Lens' GetConnectors (Prelude.Maybe Prelude.Int)
getConnectors_maxResults :: (Maybe Int -> f (Maybe Int)) -> GetConnectors -> f GetConnectors
getConnectors_maxResults = (GetConnectors -> Maybe Int)
-> (GetConnectors -> Maybe Int -> GetConnectors)
-> Lens GetConnectors GetConnectors (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetConnectors' {Maybe Int
maxResults :: Maybe Int
$sel:maxResults:GetConnectors' :: GetConnectors -> Maybe Int
maxResults} -> Maybe Int
maxResults) (\s :: GetConnectors
s@GetConnectors' {} Maybe Int
a -> GetConnectors
s {$sel:maxResults:GetConnectors' :: Maybe Int
maxResults = Maybe Int
a} :: GetConnectors)

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

instance Prelude.NFData GetConnectors

instance Core.ToHeaders GetConnectors where
  toHeaders :: GetConnectors -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetConnectors -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AWSServerMigrationService_V2016_10_24.GetConnectors" ::
                          Prelude.ByteString
                      ),
            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.ToJSON GetConnectors where
  toJSON :: GetConnectors -> Value
toJSON GetConnectors' {Maybe Int
Maybe Text
maxResults :: Maybe Int
nextToken :: Maybe Text
$sel:maxResults:GetConnectors' :: GetConnectors -> Maybe Int
$sel:nextToken:GetConnectors' :: GetConnectors -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"nextToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            (Text
"maxResults" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
maxResults
          ]
      )

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

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

-- | /See:/ 'newGetConnectorsResponse' smart constructor.
data GetConnectorsResponse = GetConnectorsResponse'
  { -- | Information about the registered connectors.
    GetConnectorsResponse -> Maybe [Connector]
connectorList :: Prelude.Maybe [Connector],
    -- | The token required to retrieve the next set of results. This value is
    -- null when there are no more results to return.
    GetConnectorsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    GetConnectorsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetConnectorsResponse -> GetConnectorsResponse -> Bool
(GetConnectorsResponse -> GetConnectorsResponse -> Bool)
-> (GetConnectorsResponse -> GetConnectorsResponse -> Bool)
-> Eq GetConnectorsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetConnectorsResponse -> GetConnectorsResponse -> Bool
$c/= :: GetConnectorsResponse -> GetConnectorsResponse -> Bool
== :: GetConnectorsResponse -> GetConnectorsResponse -> Bool
$c== :: GetConnectorsResponse -> GetConnectorsResponse -> Bool
Prelude.Eq, ReadPrec [GetConnectorsResponse]
ReadPrec GetConnectorsResponse
Int -> ReadS GetConnectorsResponse
ReadS [GetConnectorsResponse]
(Int -> ReadS GetConnectorsResponse)
-> ReadS [GetConnectorsResponse]
-> ReadPrec GetConnectorsResponse
-> ReadPrec [GetConnectorsResponse]
-> Read GetConnectorsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetConnectorsResponse]
$creadListPrec :: ReadPrec [GetConnectorsResponse]
readPrec :: ReadPrec GetConnectorsResponse
$creadPrec :: ReadPrec GetConnectorsResponse
readList :: ReadS [GetConnectorsResponse]
$creadList :: ReadS [GetConnectorsResponse]
readsPrec :: Int -> ReadS GetConnectorsResponse
$creadsPrec :: Int -> ReadS GetConnectorsResponse
Prelude.Read, Int -> GetConnectorsResponse -> ShowS
[GetConnectorsResponse] -> ShowS
GetConnectorsResponse -> String
(Int -> GetConnectorsResponse -> ShowS)
-> (GetConnectorsResponse -> String)
-> ([GetConnectorsResponse] -> ShowS)
-> Show GetConnectorsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetConnectorsResponse] -> ShowS
$cshowList :: [GetConnectorsResponse] -> ShowS
show :: GetConnectorsResponse -> String
$cshow :: GetConnectorsResponse -> String
showsPrec :: Int -> GetConnectorsResponse -> ShowS
$cshowsPrec :: Int -> GetConnectorsResponse -> ShowS
Prelude.Show, (forall x. GetConnectorsResponse -> Rep GetConnectorsResponse x)
-> (forall x. Rep GetConnectorsResponse x -> GetConnectorsResponse)
-> Generic GetConnectorsResponse
forall x. Rep GetConnectorsResponse x -> GetConnectorsResponse
forall x. GetConnectorsResponse -> Rep GetConnectorsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetConnectorsResponse x -> GetConnectorsResponse
$cfrom :: forall x. GetConnectorsResponse -> Rep GetConnectorsResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetConnectorsResponse' 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:
--
-- 'connectorList', 'getConnectorsResponse_connectorList' - Information about the registered connectors.
--
-- 'nextToken', 'getConnectorsResponse_nextToken' - The token required to retrieve the next set of results. This value is
-- null when there are no more results to return.
--
-- 'httpStatus', 'getConnectorsResponse_httpStatus' - The response's http status code.
newGetConnectorsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetConnectorsResponse
newGetConnectorsResponse :: Int -> GetConnectorsResponse
newGetConnectorsResponse Int
pHttpStatus_ =
  GetConnectorsResponse' :: Maybe [Connector] -> Maybe Text -> Int -> GetConnectorsResponse
GetConnectorsResponse'
    { $sel:connectorList:GetConnectorsResponse' :: Maybe [Connector]
connectorList =
        Maybe [Connector]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:GetConnectorsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetConnectorsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Information about the registered connectors.
getConnectorsResponse_connectorList :: Lens.Lens' GetConnectorsResponse (Prelude.Maybe [Connector])
getConnectorsResponse_connectorList :: (Maybe [Connector] -> f (Maybe [Connector]))
-> GetConnectorsResponse -> f GetConnectorsResponse
getConnectorsResponse_connectorList = (GetConnectorsResponse -> Maybe [Connector])
-> (GetConnectorsResponse
    -> Maybe [Connector] -> GetConnectorsResponse)
-> Lens' GetConnectorsResponse (Maybe [Connector])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetConnectorsResponse' {Maybe [Connector]
connectorList :: Maybe [Connector]
$sel:connectorList:GetConnectorsResponse' :: GetConnectorsResponse -> Maybe [Connector]
connectorList} -> Maybe [Connector]
connectorList) (\s :: GetConnectorsResponse
s@GetConnectorsResponse' {} Maybe [Connector]
a -> GetConnectorsResponse
s {$sel:connectorList:GetConnectorsResponse' :: Maybe [Connector]
connectorList = Maybe [Connector]
a} :: GetConnectorsResponse) ((Maybe [Connector] -> f (Maybe [Connector]))
 -> GetConnectorsResponse -> f GetConnectorsResponse)
-> ((Maybe [Connector] -> f (Maybe [Connector]))
    -> Maybe [Connector] -> f (Maybe [Connector]))
-> (Maybe [Connector] -> f (Maybe [Connector]))
-> GetConnectorsResponse
-> f GetConnectorsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Connector] [Connector] [Connector] [Connector]
-> Iso
     (Maybe [Connector])
     (Maybe [Connector])
     (Maybe [Connector])
     (Maybe [Connector])
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 [Connector] [Connector] [Connector] [Connector]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The token required to retrieve the next set of results. This value is
-- null when there are no more results to return.
getConnectorsResponse_nextToken :: Lens.Lens' GetConnectorsResponse (Prelude.Maybe Prelude.Text)
getConnectorsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> GetConnectorsResponse -> f GetConnectorsResponse
getConnectorsResponse_nextToken = (GetConnectorsResponse -> Maybe Text)
-> (GetConnectorsResponse -> Maybe Text -> GetConnectorsResponse)
-> Lens' GetConnectorsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetConnectorsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetConnectorsResponse' :: GetConnectorsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetConnectorsResponse
s@GetConnectorsResponse' {} Maybe Text
a -> GetConnectorsResponse
s {$sel:nextToken:GetConnectorsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: GetConnectorsResponse)

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

instance Prelude.NFData GetConnectorsResponse