{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- 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_connectorLabel,
    describeConnectorProfiles_connectorProfileNames,
    describeConnectorProfiles_connectorType,
    describeConnectorProfiles_maxResults,
    describeConnectorProfiles_nextToken,

    -- * 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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. The name is unique for each
    -- @ConnectorRegistration@ in your Amazon Web Services account. Only needed
    -- if calling for CUSTOMCONNECTOR connector type\/.
    DescribeConnectorProfiles -> Maybe Text
connectorLabel :: Prelude.Maybe Prelude.Text,
    -- | 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 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,
    -- | The pagination token for the next page of data.
    DescribeConnectorProfiles -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text
  }
  deriving (DescribeConnectorProfiles -> DescribeConnectorProfiles -> Bool
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]
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
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.
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:
--
-- 'connectorLabel', 'describeConnectorProfiles_connectorLabel' - The name of the connector. The name is unique for each
-- @ConnectorRegistration@ in your Amazon Web Services account. Only needed
-- if calling for CUSTOMCONNECTOR connector type\/.
--
-- 'connectorProfileNames', 'describeConnectorProfiles_connectorProfileNames' - The name of the connector profile. The name is unique for each
-- @ConnectorProfile@ in the Amazon Web Services account.
--
-- '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).
--
-- 'nextToken', 'describeConnectorProfiles_nextToken' - The pagination token for the next page of data.
newDescribeConnectorProfiles ::
  DescribeConnectorProfiles
newDescribeConnectorProfiles :: DescribeConnectorProfiles
newDescribeConnectorProfiles =
  DescribeConnectorProfiles'
    { $sel:connectorLabel:DescribeConnectorProfiles' :: Maybe Text
connectorLabel =
        forall a. Maybe a
Prelude.Nothing,
      $sel:connectorProfileNames:DescribeConnectorProfiles' :: Maybe [Text]
connectorProfileNames = forall a. Maybe a
Prelude.Nothing,
      $sel:connectorType:DescribeConnectorProfiles' :: Maybe ConnectorType
connectorType = forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:DescribeConnectorProfiles' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeConnectorProfiles' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing
    }

-- | The name of the connector. The name is unique for each
-- @ConnectorRegistration@ in your Amazon Web Services account. Only needed
-- if calling for CUSTOMCONNECTOR connector type\/.
describeConnectorProfiles_connectorLabel :: Lens.Lens' DescribeConnectorProfiles (Prelude.Maybe Prelude.Text)
describeConnectorProfiles_connectorLabel :: Lens' DescribeConnectorProfiles (Maybe Text)
describeConnectorProfiles_connectorLabel = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConnectorProfiles' {Maybe Text
connectorLabel :: Maybe Text
$sel:connectorLabel:DescribeConnectorProfiles' :: DescribeConnectorProfiles -> Maybe Text
connectorLabel} -> Maybe Text
connectorLabel) (\s :: DescribeConnectorProfiles
s@DescribeConnectorProfiles' {} Maybe Text
a -> DescribeConnectorProfiles
s {$sel:connectorLabel:DescribeConnectorProfiles' :: Maybe Text
connectorLabel = Maybe Text
a} :: DescribeConnectorProfiles)

-- | 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 :: Lens' DescribeConnectorProfiles (Maybe [Text])
describeConnectorProfiles_connectorProfileNames = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The type of connector, such as Salesforce, Amplitude, and so on.
describeConnectorProfiles_connectorType :: Lens.Lens' DescribeConnectorProfiles (Prelude.Maybe ConnectorType)
describeConnectorProfiles_connectorType :: Lens' DescribeConnectorProfiles (Maybe ConnectorType)
describeConnectorProfiles_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 :: Lens' DescribeConnectorProfiles (Maybe Natural)
describeConnectorProfiles_maxResults = 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)

-- | The pagination token for the next page of data.
describeConnectorProfiles_nextToken :: Lens.Lens' DescribeConnectorProfiles (Prelude.Maybe Prelude.Text)
describeConnectorProfiles_nextToken :: Lens' DescribeConnectorProfiles (Maybe Text)
describeConnectorProfiles_nextToken = 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)

instance Core.AWSRequest DescribeConnectorProfiles where
  type
    AWSResponse DescribeConnectorProfiles =
      DescribeConnectorProfilesResponse
  request :: (Service -> Service)
-> DescribeConnectorProfiles -> Request DescribeConnectorProfiles
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DescribeConnectorProfiles
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeConnectorProfiles)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> 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'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"connectorProfileDetails"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"nextToken")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable DescribeConnectorProfiles where
  hashWithSalt :: Int -> DescribeConnectorProfiles -> Int
hashWithSalt Int
_salt DescribeConnectorProfiles' {Maybe Natural
Maybe [Text]
Maybe Text
Maybe ConnectorType
nextToken :: Maybe Text
maxResults :: Maybe Natural
connectorType :: Maybe ConnectorType
connectorProfileNames :: Maybe [Text]
connectorLabel :: Maybe Text
$sel:nextToken:DescribeConnectorProfiles' :: DescribeConnectorProfiles -> Maybe Text
$sel:maxResults:DescribeConnectorProfiles' :: DescribeConnectorProfiles -> Maybe Natural
$sel:connectorType:DescribeConnectorProfiles' :: DescribeConnectorProfiles -> Maybe ConnectorType
$sel:connectorProfileNames:DescribeConnectorProfiles' :: DescribeConnectorProfiles -> Maybe [Text]
$sel:connectorLabel:DescribeConnectorProfiles' :: DescribeConnectorProfiles -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
connectorLabel
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
connectorProfileNames
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ConnectorType
connectorType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken

instance Prelude.NFData DescribeConnectorProfiles where
  rnf :: DescribeConnectorProfiles -> ()
rnf DescribeConnectorProfiles' {Maybe Natural
Maybe [Text]
Maybe Text
Maybe ConnectorType
nextToken :: Maybe Text
maxResults :: Maybe Natural
connectorType :: Maybe ConnectorType
connectorProfileNames :: Maybe [Text]
connectorLabel :: Maybe Text
$sel:nextToken:DescribeConnectorProfiles' :: DescribeConnectorProfiles -> Maybe Text
$sel:maxResults:DescribeConnectorProfiles' :: DescribeConnectorProfiles -> Maybe Natural
$sel:connectorType:DescribeConnectorProfiles' :: DescribeConnectorProfiles -> Maybe ConnectorType
$sel:connectorProfileNames:DescribeConnectorProfiles' :: DescribeConnectorProfiles -> Maybe [Text]
$sel:connectorLabel:DescribeConnectorProfiles' :: DescribeConnectorProfiles -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
connectorLabel
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
connectorProfileNames
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ConnectorType
connectorType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken

instance Data.ToHeaders DescribeConnectorProfiles where
  toHeaders :: DescribeConnectorProfiles -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON DescribeConnectorProfiles where
  toJSON :: DescribeConnectorProfiles -> Value
toJSON DescribeConnectorProfiles' {Maybe Natural
Maybe [Text]
Maybe Text
Maybe ConnectorType
nextToken :: Maybe Text
maxResults :: Maybe Natural
connectorType :: Maybe ConnectorType
connectorProfileNames :: Maybe [Text]
connectorLabel :: Maybe Text
$sel:nextToken:DescribeConnectorProfiles' :: DescribeConnectorProfiles -> Maybe Text
$sel:maxResults:DescribeConnectorProfiles' :: DescribeConnectorProfiles -> Maybe Natural
$sel:connectorType:DescribeConnectorProfiles' :: DescribeConnectorProfiles -> Maybe ConnectorType
$sel:connectorProfileNames:DescribeConnectorProfiles' :: DescribeConnectorProfiles -> Maybe [Text]
$sel:connectorLabel:DescribeConnectorProfiles' :: DescribeConnectorProfiles -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"connectorLabel" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
connectorLabel,
            (Key
"connectorProfileNames" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
connectorProfileNames,
            (Key
"connectorType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ConnectorType
connectorType,
            (Key
"maxResults" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
            (Key
"nextToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken
          ]
      )

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

instance Data.ToQuery DescribeConnectorProfiles where
  toQuery :: DescribeConnectorProfiles -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const 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
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]
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
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.
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'
    { $sel:connectorProfileDetails:DescribeConnectorProfilesResponse' :: Maybe [ConnectorProfile]
connectorProfileDetails =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeConnectorProfilesResponse' :: Maybe Text
nextToken = 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 :: Lens' DescribeConnectorProfilesResponse (Maybe [ConnectorProfile])
describeConnectorProfilesResponse_connectorProfileDetails = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 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 :: Lens' DescribeConnectorProfilesResponse (Maybe Text)
describeConnectorProfilesResponse_nextToken = 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 :: Lens' DescribeConnectorProfilesResponse Int
describeConnectorProfilesResponse_httpStatus = 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
  where
  rnf :: DescribeConnectorProfilesResponse -> ()
rnf DescribeConnectorProfilesResponse' {Int
Maybe [ConnectorProfile]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
connectorProfileDetails :: Maybe [ConnectorProfile]
$sel:httpStatus:DescribeConnectorProfilesResponse' :: DescribeConnectorProfilesResponse -> Int
$sel:nextToken:DescribeConnectorProfilesResponse' :: DescribeConnectorProfilesResponse -> Maybe Text
$sel:connectorProfileDetails:DescribeConnectorProfilesResponse' :: DescribeConnectorProfilesResponse -> Maybe [ConnectorProfile]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [ConnectorProfile]
connectorProfileDetails
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus