{-# 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.AppFlow.DescribeConnectorProfiles
-- 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 @connector-profile@ details matching the provided
-- @connector-profile@ names and @connector-types@. Both input lists are
-- optional, and you can use them to filter the result.
--
-- If no names or @connector-types@ are provided, returns all connector
-- profiles in a paginated form. If there is no match, this operation
-- returns an empty list.
module Amazonka.AppFlow.DescribeConnectorProfiles
  ( -- * Creating a Request
    DescribeConnectorProfiles (..),
    newDescribeConnectorProfiles,

    -- * Request Lenses
    describeConnectorProfiles_connectorProfileNames,
    describeConnectorProfiles_nextToken,
    describeConnectorProfiles_connectorType,
    describeConnectorProfiles_maxResults,

    -- * Destructuring the Response
    DescribeConnectorProfilesResponse (..),
    newDescribeConnectorProfilesResponse,

    -- * Response Lenses
    describeConnectorProfilesResponse_connectorProfileDetails,
    describeConnectorProfilesResponse_nextToken,
    describeConnectorProfilesResponse_httpStatus,
  )
where

import Amazonka.AppFlow.Types
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

-- | /See:/ 'newDescribeConnectorProfiles' smart constructor.
data DescribeConnectorProfiles = DescribeConnectorProfiles'
  { -- | The name of the connector profile. The name is unique for each
    -- @ConnectorProfile@ in the Amazon Web Services account.
    DescribeConnectorProfiles -> Maybe [Text]
connectorProfileNames :: Prelude.Maybe [Prelude.Text],
    -- | The pagination token for the next page of data.
    DescribeConnectorProfiles -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The type of connector, such as Salesforce, Amplitude, and so on.
    DescribeConnectorProfiles -> Maybe ConnectorType
connectorType :: Prelude.Maybe ConnectorType,
    -- | Specifies the maximum number of items that should be returned in the
    -- result set. The default for @maxResults@ is 20 (for all paginated API
    -- operations).
    DescribeConnectorProfiles -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
  }
  deriving (DescribeConnectorProfiles -> DescribeConnectorProfiles -> Bool
(DescribeConnectorProfiles -> DescribeConnectorProfiles -> Bool)
-> (DescribeConnectorProfiles -> DescribeConnectorProfiles -> Bool)
-> Eq DescribeConnectorProfiles
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeConnectorProfiles -> DescribeConnectorProfiles -> Bool
$c/= :: DescribeConnectorProfiles -> DescribeConnectorProfiles -> Bool
== :: DescribeConnectorProfiles -> DescribeConnectorProfiles -> Bool
$c== :: DescribeConnectorProfiles -> DescribeConnectorProfiles -> Bool
Prelude.Eq, ReadPrec [DescribeConnectorProfiles]
ReadPrec DescribeConnectorProfiles
Int -> ReadS DescribeConnectorProfiles
ReadS [DescribeConnectorProfiles]
(Int -> ReadS DescribeConnectorProfiles)
-> ReadS [DescribeConnectorProfiles]
-> ReadPrec DescribeConnectorProfiles
-> ReadPrec [DescribeConnectorProfiles]
-> Read DescribeConnectorProfiles
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeConnectorProfiles]
$creadListPrec :: ReadPrec [DescribeConnectorProfiles]
readPrec :: ReadPrec DescribeConnectorProfiles
$creadPrec :: ReadPrec DescribeConnectorProfiles
readList :: ReadS [DescribeConnectorProfiles]
$creadList :: ReadS [DescribeConnectorProfiles]
readsPrec :: Int -> ReadS DescribeConnectorProfiles
$creadsPrec :: Int -> ReadS DescribeConnectorProfiles
Prelude.Read, Int -> DescribeConnectorProfiles -> ShowS
[DescribeConnectorProfiles] -> ShowS
DescribeConnectorProfiles -> String
(Int -> DescribeConnectorProfiles -> ShowS)
-> (DescribeConnectorProfiles -> String)
-> ([DescribeConnectorProfiles] -> ShowS)
-> Show DescribeConnectorProfiles
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeConnectorProfiles] -> ShowS
$cshowList :: [DescribeConnectorProfiles] -> ShowS
show :: DescribeConnectorProfiles -> String
$cshow :: DescribeConnectorProfiles -> String
showsPrec :: Int -> DescribeConnectorProfiles -> ShowS
$cshowsPrec :: Int -> DescribeConnectorProfiles -> ShowS
Prelude.Show, (forall x.
 DescribeConnectorProfiles -> Rep DescribeConnectorProfiles x)
-> (forall x.
    Rep DescribeConnectorProfiles x -> DescribeConnectorProfiles)
-> Generic DescribeConnectorProfiles
forall x.
Rep DescribeConnectorProfiles x -> DescribeConnectorProfiles
forall x.
DescribeConnectorProfiles -> Rep DescribeConnectorProfiles x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeConnectorProfiles x -> DescribeConnectorProfiles
$cfrom :: forall x.
DescribeConnectorProfiles -> Rep DescribeConnectorProfiles x
Prelude.Generic)

-- |
-- Create a value of 'DescribeConnectorProfiles' 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:
--
-- 'connectorProfileNames', 'describeConnectorProfiles_connectorProfileNames' - The name of the connector profile. The name is unique for each
-- @ConnectorProfile@ in the Amazon Web Services account.
--
-- 'nextToken', 'describeConnectorProfiles_nextToken' - The pagination token for the next page of data.
--
-- 'connectorType', 'describeConnectorProfiles_connectorType' - The type of connector, such as Salesforce, Amplitude, and so on.
--
-- 'maxResults', 'describeConnectorProfiles_maxResults' - Specifies the maximum number of items that should be returned in the
-- result set. The default for @maxResults@ is 20 (for all paginated API
-- operations).
newDescribeConnectorProfiles ::
  DescribeConnectorProfiles
newDescribeConnectorProfiles :: DescribeConnectorProfiles
newDescribeConnectorProfiles =
  DescribeConnectorProfiles' :: Maybe [Text]
-> Maybe Text
-> Maybe ConnectorType
-> Maybe Natural
-> DescribeConnectorProfiles
DescribeConnectorProfiles'
    { $sel:connectorProfileNames:DescribeConnectorProfiles' :: Maybe [Text]
connectorProfileNames =
        Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeConnectorProfiles' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:connectorType:DescribeConnectorProfiles' :: Maybe ConnectorType
connectorType = Maybe ConnectorType
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:DescribeConnectorProfiles' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | The name of the connector profile. The name is unique for each
-- @ConnectorProfile@ in the Amazon Web Services account.
describeConnectorProfiles_connectorProfileNames :: Lens.Lens' DescribeConnectorProfiles (Prelude.Maybe [Prelude.Text])
describeConnectorProfiles_connectorProfileNames :: (Maybe [Text] -> f (Maybe [Text]))
-> DescribeConnectorProfiles -> f DescribeConnectorProfiles
describeConnectorProfiles_connectorProfileNames = (DescribeConnectorProfiles -> Maybe [Text])
-> (DescribeConnectorProfiles
    -> Maybe [Text] -> DescribeConnectorProfiles)
-> Lens
     DescribeConnectorProfiles
     DescribeConnectorProfiles
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConnectorProfiles' {Maybe [Text]
connectorProfileNames :: Maybe [Text]
$sel:connectorProfileNames:DescribeConnectorProfiles' :: DescribeConnectorProfiles -> Maybe [Text]
connectorProfileNames} -> Maybe [Text]
connectorProfileNames) (\s :: DescribeConnectorProfiles
s@DescribeConnectorProfiles' {} Maybe [Text]
a -> DescribeConnectorProfiles
s {$sel:connectorProfileNames:DescribeConnectorProfiles' :: Maybe [Text]
connectorProfileNames = Maybe [Text]
a} :: DescribeConnectorProfiles) ((Maybe [Text] -> f (Maybe [Text]))
 -> DescribeConnectorProfiles -> f DescribeConnectorProfiles)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DescribeConnectorProfiles
-> f DescribeConnectorProfiles
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The pagination token for the next page of data.
describeConnectorProfiles_nextToken :: Lens.Lens' DescribeConnectorProfiles (Prelude.Maybe Prelude.Text)
describeConnectorProfiles_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeConnectorProfiles -> f DescribeConnectorProfiles
describeConnectorProfiles_nextToken = (DescribeConnectorProfiles -> Maybe Text)
-> (DescribeConnectorProfiles
    -> Maybe Text -> DescribeConnectorProfiles)
-> Lens
     DescribeConnectorProfiles
     DescribeConnectorProfiles
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConnectorProfiles' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeConnectorProfiles' :: DescribeConnectorProfiles -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeConnectorProfiles
s@DescribeConnectorProfiles' {} Maybe Text
a -> DescribeConnectorProfiles
s {$sel:nextToken:DescribeConnectorProfiles' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeConnectorProfiles)

-- | The type of connector, such as Salesforce, Amplitude, and so on.
describeConnectorProfiles_connectorType :: Lens.Lens' DescribeConnectorProfiles (Prelude.Maybe ConnectorType)
describeConnectorProfiles_connectorType :: (Maybe ConnectorType -> f (Maybe ConnectorType))
-> DescribeConnectorProfiles -> f DescribeConnectorProfiles
describeConnectorProfiles_connectorType = (DescribeConnectorProfiles -> Maybe ConnectorType)
-> (DescribeConnectorProfiles
    -> Maybe ConnectorType -> DescribeConnectorProfiles)
-> Lens
     DescribeConnectorProfiles
     DescribeConnectorProfiles
     (Maybe ConnectorType)
     (Maybe ConnectorType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConnectorProfiles' {Maybe ConnectorType
connectorType :: Maybe ConnectorType
$sel:connectorType:DescribeConnectorProfiles' :: DescribeConnectorProfiles -> Maybe ConnectorType
connectorType} -> Maybe ConnectorType
connectorType) (\s :: DescribeConnectorProfiles
s@DescribeConnectorProfiles' {} Maybe ConnectorType
a -> DescribeConnectorProfiles
s {$sel:connectorType:DescribeConnectorProfiles' :: Maybe ConnectorType
connectorType = Maybe ConnectorType
a} :: DescribeConnectorProfiles)

-- | Specifies the maximum number of items that should be returned in the
-- result set. The default for @maxResults@ is 20 (for all paginated API
-- operations).
describeConnectorProfiles_maxResults :: Lens.Lens' DescribeConnectorProfiles (Prelude.Maybe Prelude.Natural)
describeConnectorProfiles_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> DescribeConnectorProfiles -> f DescribeConnectorProfiles
describeConnectorProfiles_maxResults = (DescribeConnectorProfiles -> Maybe Natural)
-> (DescribeConnectorProfiles
    -> Maybe Natural -> DescribeConnectorProfiles)
-> Lens
     DescribeConnectorProfiles
     DescribeConnectorProfiles
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConnectorProfiles' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:DescribeConnectorProfiles' :: DescribeConnectorProfiles -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: DescribeConnectorProfiles
s@DescribeConnectorProfiles' {} Maybe Natural
a -> DescribeConnectorProfiles
s {$sel:maxResults:DescribeConnectorProfiles' :: Maybe Natural
maxResults = Maybe Natural
a} :: DescribeConnectorProfiles)

instance Core.AWSRequest DescribeConnectorProfiles where
  type
    AWSResponse DescribeConnectorProfiles =
      DescribeConnectorProfilesResponse
  request :: DescribeConnectorProfiles -> Request DescribeConnectorProfiles
request = Service
-> DescribeConnectorProfiles -> Request DescribeConnectorProfiles
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeConnectorProfiles
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeConnectorProfiles)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeConnectorProfiles))
-> Logger
-> Service
-> Proxy DescribeConnectorProfiles
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeConnectorProfiles)))
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 [ConnectorProfile]
-> Maybe Text -> Int -> DescribeConnectorProfilesResponse
DescribeConnectorProfilesResponse'
            (Maybe [ConnectorProfile]
 -> Maybe Text -> Int -> DescribeConnectorProfilesResponse)
-> Either String (Maybe [ConnectorProfile])
-> Either
     String (Maybe Text -> Int -> DescribeConnectorProfilesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object -> Text -> Either String (Maybe (Maybe [ConnectorProfile]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"connectorProfileDetails"
                            Either String (Maybe (Maybe [ConnectorProfile]))
-> Maybe [ConnectorProfile]
-> Either String (Maybe [ConnectorProfile])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [ConnectorProfile]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either
  String (Maybe Text -> Int -> DescribeConnectorProfilesResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeConnectorProfilesResponse)
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 -> DescribeConnectorProfilesResponse)
-> Either String Int
-> Either String DescribeConnectorProfilesResponse
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 DescribeConnectorProfiles

instance Prelude.NFData DescribeConnectorProfiles

instance Core.ToHeaders DescribeConnectorProfiles where
  toHeaders :: DescribeConnectorProfiles -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeConnectorProfiles -> 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.ToJSON DescribeConnectorProfiles where
  toJSON :: DescribeConnectorProfiles -> Value
toJSON DescribeConnectorProfiles' {Maybe Natural
Maybe [Text]
Maybe Text
Maybe ConnectorType
maxResults :: Maybe Natural
connectorType :: Maybe ConnectorType
nextToken :: Maybe Text
connectorProfileNames :: Maybe [Text]
$sel:maxResults:DescribeConnectorProfiles' :: DescribeConnectorProfiles -> Maybe Natural
$sel:connectorType:DescribeConnectorProfiles' :: DescribeConnectorProfiles -> Maybe ConnectorType
$sel:nextToken:DescribeConnectorProfiles' :: DescribeConnectorProfiles -> Maybe Text
$sel:connectorProfileNames:DescribeConnectorProfiles' :: DescribeConnectorProfiles -> Maybe [Text]
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"connectorProfileNames" 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]
connectorProfileNames,
            (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
"connectorType" Text -> ConnectorType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (ConnectorType -> Pair) -> Maybe ConnectorType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ConnectorType
connectorType,
            (Text
"maxResults" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults
          ]
      )

instance Core.ToPath DescribeConnectorProfiles where
  toPath :: DescribeConnectorProfiles -> ByteString
toPath = ByteString -> DescribeConnectorProfiles -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/describe-connector-profiles"

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

-- | /See:/ 'newDescribeConnectorProfilesResponse' smart constructor.
data DescribeConnectorProfilesResponse = DescribeConnectorProfilesResponse'
  { -- | Returns information about the connector profiles associated with the
    -- flow.
    DescribeConnectorProfilesResponse -> Maybe [ConnectorProfile]
connectorProfileDetails :: Prelude.Maybe [ConnectorProfile],
    -- | The pagination token for the next page of data. If @nextToken=null@,
    -- this means that all records have been fetched.
    DescribeConnectorProfilesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeConnectorProfilesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeConnectorProfilesResponse
-> DescribeConnectorProfilesResponse -> Bool
(DescribeConnectorProfilesResponse
 -> DescribeConnectorProfilesResponse -> Bool)
-> (DescribeConnectorProfilesResponse
    -> DescribeConnectorProfilesResponse -> Bool)
-> Eq DescribeConnectorProfilesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeConnectorProfilesResponse
-> DescribeConnectorProfilesResponse -> Bool
$c/= :: DescribeConnectorProfilesResponse
-> DescribeConnectorProfilesResponse -> Bool
== :: DescribeConnectorProfilesResponse
-> DescribeConnectorProfilesResponse -> Bool
$c== :: DescribeConnectorProfilesResponse
-> DescribeConnectorProfilesResponse -> Bool
Prelude.Eq, ReadPrec [DescribeConnectorProfilesResponse]
ReadPrec DescribeConnectorProfilesResponse
Int -> ReadS DescribeConnectorProfilesResponse
ReadS [DescribeConnectorProfilesResponse]
(Int -> ReadS DescribeConnectorProfilesResponse)
-> ReadS [DescribeConnectorProfilesResponse]
-> ReadPrec DescribeConnectorProfilesResponse
-> ReadPrec [DescribeConnectorProfilesResponse]
-> Read DescribeConnectorProfilesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeConnectorProfilesResponse]
$creadListPrec :: ReadPrec [DescribeConnectorProfilesResponse]
readPrec :: ReadPrec DescribeConnectorProfilesResponse
$creadPrec :: ReadPrec DescribeConnectorProfilesResponse
readList :: ReadS [DescribeConnectorProfilesResponse]
$creadList :: ReadS [DescribeConnectorProfilesResponse]
readsPrec :: Int -> ReadS DescribeConnectorProfilesResponse
$creadsPrec :: Int -> ReadS DescribeConnectorProfilesResponse
Prelude.Read, Int -> DescribeConnectorProfilesResponse -> ShowS
[DescribeConnectorProfilesResponse] -> ShowS
DescribeConnectorProfilesResponse -> String
(Int -> DescribeConnectorProfilesResponse -> ShowS)
-> (DescribeConnectorProfilesResponse -> String)
-> ([DescribeConnectorProfilesResponse] -> ShowS)
-> Show DescribeConnectorProfilesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeConnectorProfilesResponse] -> ShowS
$cshowList :: [DescribeConnectorProfilesResponse] -> ShowS
show :: DescribeConnectorProfilesResponse -> String
$cshow :: DescribeConnectorProfilesResponse -> String
showsPrec :: Int -> DescribeConnectorProfilesResponse -> ShowS
$cshowsPrec :: Int -> DescribeConnectorProfilesResponse -> ShowS
Prelude.Show, (forall x.
 DescribeConnectorProfilesResponse
 -> Rep DescribeConnectorProfilesResponse x)
-> (forall x.
    Rep DescribeConnectorProfilesResponse x
    -> DescribeConnectorProfilesResponse)
-> Generic DescribeConnectorProfilesResponse
forall x.
Rep DescribeConnectorProfilesResponse x
-> DescribeConnectorProfilesResponse
forall x.
DescribeConnectorProfilesResponse
-> Rep DescribeConnectorProfilesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeConnectorProfilesResponse x
-> DescribeConnectorProfilesResponse
$cfrom :: forall x.
DescribeConnectorProfilesResponse
-> Rep DescribeConnectorProfilesResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeConnectorProfilesResponse' 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:
--
-- 'connectorProfileDetails', 'describeConnectorProfilesResponse_connectorProfileDetails' - Returns information about the connector profiles associated with the
-- flow.
--
-- 'nextToken', 'describeConnectorProfilesResponse_nextToken' - The pagination token for the next page of data. If @nextToken=null@,
-- this means that all records have been fetched.
--
-- 'httpStatus', 'describeConnectorProfilesResponse_httpStatus' - The response's http status code.
newDescribeConnectorProfilesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeConnectorProfilesResponse
newDescribeConnectorProfilesResponse :: Int -> DescribeConnectorProfilesResponse
newDescribeConnectorProfilesResponse Int
pHttpStatus_ =
  DescribeConnectorProfilesResponse' :: Maybe [ConnectorProfile]
-> Maybe Text -> Int -> DescribeConnectorProfilesResponse
DescribeConnectorProfilesResponse'
    { $sel:connectorProfileDetails:DescribeConnectorProfilesResponse' :: Maybe [ConnectorProfile]
connectorProfileDetails =
        Maybe [ConnectorProfile]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeConnectorProfilesResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeConnectorProfilesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Returns information about the connector profiles associated with the
-- flow.
describeConnectorProfilesResponse_connectorProfileDetails :: Lens.Lens' DescribeConnectorProfilesResponse (Prelude.Maybe [ConnectorProfile])
describeConnectorProfilesResponse_connectorProfileDetails :: (Maybe [ConnectorProfile] -> f (Maybe [ConnectorProfile]))
-> DescribeConnectorProfilesResponse
-> f DescribeConnectorProfilesResponse
describeConnectorProfilesResponse_connectorProfileDetails = (DescribeConnectorProfilesResponse -> Maybe [ConnectorProfile])
-> (DescribeConnectorProfilesResponse
    -> Maybe [ConnectorProfile] -> DescribeConnectorProfilesResponse)
-> Lens
     DescribeConnectorProfilesResponse
     DescribeConnectorProfilesResponse
     (Maybe [ConnectorProfile])
     (Maybe [ConnectorProfile])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConnectorProfilesResponse' {Maybe [ConnectorProfile]
connectorProfileDetails :: Maybe [ConnectorProfile]
$sel:connectorProfileDetails:DescribeConnectorProfilesResponse' :: DescribeConnectorProfilesResponse -> Maybe [ConnectorProfile]
connectorProfileDetails} -> Maybe [ConnectorProfile]
connectorProfileDetails) (\s :: DescribeConnectorProfilesResponse
s@DescribeConnectorProfilesResponse' {} Maybe [ConnectorProfile]
a -> DescribeConnectorProfilesResponse
s {$sel:connectorProfileDetails:DescribeConnectorProfilesResponse' :: Maybe [ConnectorProfile]
connectorProfileDetails = Maybe [ConnectorProfile]
a} :: DescribeConnectorProfilesResponse) ((Maybe [ConnectorProfile] -> f (Maybe [ConnectorProfile]))
 -> DescribeConnectorProfilesResponse
 -> f DescribeConnectorProfilesResponse)
-> ((Maybe [ConnectorProfile] -> f (Maybe [ConnectorProfile]))
    -> Maybe [ConnectorProfile] -> f (Maybe [ConnectorProfile]))
-> (Maybe [ConnectorProfile] -> f (Maybe [ConnectorProfile]))
-> DescribeConnectorProfilesResponse
-> f DescribeConnectorProfilesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ConnectorProfile]
  [ConnectorProfile]
  [ConnectorProfile]
  [ConnectorProfile]
-> Iso
     (Maybe [ConnectorProfile])
     (Maybe [ConnectorProfile])
     (Maybe [ConnectorProfile])
     (Maybe [ConnectorProfile])
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
  [ConnectorProfile]
  [ConnectorProfile]
  [ConnectorProfile]
  [ConnectorProfile]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The pagination token for the next page of data. If @nextToken=null@,
-- this means that all records have been fetched.
describeConnectorProfilesResponse_nextToken :: Lens.Lens' DescribeConnectorProfilesResponse (Prelude.Maybe Prelude.Text)
describeConnectorProfilesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeConnectorProfilesResponse
-> f DescribeConnectorProfilesResponse
describeConnectorProfilesResponse_nextToken = (DescribeConnectorProfilesResponse -> Maybe Text)
-> (DescribeConnectorProfilesResponse
    -> Maybe Text -> DescribeConnectorProfilesResponse)
-> Lens
     DescribeConnectorProfilesResponse
     DescribeConnectorProfilesResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConnectorProfilesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeConnectorProfilesResponse' :: DescribeConnectorProfilesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeConnectorProfilesResponse
s@DescribeConnectorProfilesResponse' {} Maybe Text
a -> DescribeConnectorProfilesResponse
s {$sel:nextToken:DescribeConnectorProfilesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeConnectorProfilesResponse)

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

instance
  Prelude.NFData
    DescribeConnectorProfilesResponse