{-# 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.KafkaConnect.DescribeConnector
-- 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 summary information about the connector.
module Amazonka.KafkaConnect.DescribeConnector
  ( -- * Creating a Request
    DescribeConnector (..),
    newDescribeConnector,

    -- * Request Lenses
    describeConnector_connectorArn,

    -- * Destructuring the Response
    DescribeConnectorResponse (..),
    newDescribeConnectorResponse,

    -- * Response Lenses
    describeConnectorResponse_creationTime,
    describeConnectorResponse_kafkaCluster,
    describeConnectorResponse_kafkaConnectVersion,
    describeConnectorResponse_logDelivery,
    describeConnectorResponse_currentVersion,
    describeConnectorResponse_connectorConfiguration,
    describeConnectorResponse_workerConfiguration,
    describeConnectorResponse_connectorArn,
    describeConnectorResponse_connectorName,
    describeConnectorResponse_connectorState,
    describeConnectorResponse_capacity,
    describeConnectorResponse_plugins,
    describeConnectorResponse_connectorDescription,
    describeConnectorResponse_kafkaClusterClientAuthentication,
    describeConnectorResponse_kafkaClusterEncryptionInTransit,
    describeConnectorResponse_serviceExecutionRoleArn,
    describeConnectorResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.KafkaConnect.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:/ 'newDescribeConnector' smart constructor.
data DescribeConnector = DescribeConnector'
  { -- | The Amazon Resource Name (ARN) of the connector that you want to
    -- describe.
    DescribeConnector -> Text
connectorArn :: Prelude.Text
  }
  deriving (DescribeConnector -> DescribeConnector -> Bool
(DescribeConnector -> DescribeConnector -> Bool)
-> (DescribeConnector -> DescribeConnector -> Bool)
-> Eq DescribeConnector
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeConnector -> DescribeConnector -> Bool
$c/= :: DescribeConnector -> DescribeConnector -> Bool
== :: DescribeConnector -> DescribeConnector -> Bool
$c== :: DescribeConnector -> DescribeConnector -> Bool
Prelude.Eq, ReadPrec [DescribeConnector]
ReadPrec DescribeConnector
Int -> ReadS DescribeConnector
ReadS [DescribeConnector]
(Int -> ReadS DescribeConnector)
-> ReadS [DescribeConnector]
-> ReadPrec DescribeConnector
-> ReadPrec [DescribeConnector]
-> Read DescribeConnector
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeConnector]
$creadListPrec :: ReadPrec [DescribeConnector]
readPrec :: ReadPrec DescribeConnector
$creadPrec :: ReadPrec DescribeConnector
readList :: ReadS [DescribeConnector]
$creadList :: ReadS [DescribeConnector]
readsPrec :: Int -> ReadS DescribeConnector
$creadsPrec :: Int -> ReadS DescribeConnector
Prelude.Read, Int -> DescribeConnector -> ShowS
[DescribeConnector] -> ShowS
DescribeConnector -> String
(Int -> DescribeConnector -> ShowS)
-> (DescribeConnector -> String)
-> ([DescribeConnector] -> ShowS)
-> Show DescribeConnector
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeConnector] -> ShowS
$cshowList :: [DescribeConnector] -> ShowS
show :: DescribeConnector -> String
$cshow :: DescribeConnector -> String
showsPrec :: Int -> DescribeConnector -> ShowS
$cshowsPrec :: Int -> DescribeConnector -> ShowS
Prelude.Show, (forall x. DescribeConnector -> Rep DescribeConnector x)
-> (forall x. Rep DescribeConnector x -> DescribeConnector)
-> Generic DescribeConnector
forall x. Rep DescribeConnector x -> DescribeConnector
forall x. DescribeConnector -> Rep DescribeConnector x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeConnector x -> DescribeConnector
$cfrom :: forall x. DescribeConnector -> Rep DescribeConnector x
Prelude.Generic)

-- |
-- Create a value of 'DescribeConnector' 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:
--
-- 'connectorArn', 'describeConnector_connectorArn' - The Amazon Resource Name (ARN) of the connector that you want to
-- describe.
newDescribeConnector ::
  -- | 'connectorArn'
  Prelude.Text ->
  DescribeConnector
newDescribeConnector :: Text -> DescribeConnector
newDescribeConnector Text
pConnectorArn_ =
  DescribeConnector' :: Text -> DescribeConnector
DescribeConnector' {$sel:connectorArn:DescribeConnector' :: Text
connectorArn = Text
pConnectorArn_}

-- | The Amazon Resource Name (ARN) of the connector that you want to
-- describe.
describeConnector_connectorArn :: Lens.Lens' DescribeConnector Prelude.Text
describeConnector_connectorArn :: (Text -> f Text) -> DescribeConnector -> f DescribeConnector
describeConnector_connectorArn = (DescribeConnector -> Text)
-> (DescribeConnector -> Text -> DescribeConnector)
-> Lens DescribeConnector DescribeConnector Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConnector' {Text
connectorArn :: Text
$sel:connectorArn:DescribeConnector' :: DescribeConnector -> Text
connectorArn} -> Text
connectorArn) (\s :: DescribeConnector
s@DescribeConnector' {} Text
a -> DescribeConnector
s {$sel:connectorArn:DescribeConnector' :: Text
connectorArn = Text
a} :: DescribeConnector)

instance Core.AWSRequest DescribeConnector where
  type
    AWSResponse DescribeConnector =
      DescribeConnectorResponse
  request :: DescribeConnector -> Request DescribeConnector
request = Service -> DescribeConnector -> Request DescribeConnector
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeConnector
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeConnector)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeConnector))
-> Logger
-> Service
-> Proxy DescribeConnector
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeConnector)))
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 POSIX
-> Maybe KafkaClusterDescription
-> Maybe Text
-> Maybe LogDeliveryDescription
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe WorkerConfigurationDescription
-> Maybe Text
-> Maybe Text
-> Maybe ConnectorState
-> Maybe CapacityDescription
-> Maybe [PluginDescription]
-> Maybe Text
-> Maybe KafkaClusterClientAuthenticationDescription
-> Maybe KafkaClusterEncryptionInTransitDescription
-> Maybe Text
-> Int
-> DescribeConnectorResponse
DescribeConnectorResponse'
            (Maybe POSIX
 -> Maybe KafkaClusterDescription
 -> Maybe Text
 -> Maybe LogDeliveryDescription
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Maybe WorkerConfigurationDescription
 -> Maybe Text
 -> Maybe Text
 -> Maybe ConnectorState
 -> Maybe CapacityDescription
 -> Maybe [PluginDescription]
 -> Maybe Text
 -> Maybe KafkaClusterClientAuthenticationDescription
 -> Maybe KafkaClusterEncryptionInTransitDescription
 -> Maybe Text
 -> Int
 -> DescribeConnectorResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe KafkaClusterDescription
      -> Maybe Text
      -> Maybe LogDeliveryDescription
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe WorkerConfigurationDescription
      -> Maybe Text
      -> Maybe Text
      -> Maybe ConnectorState
      -> Maybe CapacityDescription
      -> Maybe [PluginDescription]
      -> Maybe Text
      -> Maybe KafkaClusterClientAuthenticationDescription
      -> Maybe KafkaClusterEncryptionInTransitDescription
      -> Maybe Text
      -> Int
      -> DescribeConnectorResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"creationTime")
            Either
  String
  (Maybe KafkaClusterDescription
   -> Maybe Text
   -> Maybe LogDeliveryDescription
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe WorkerConfigurationDescription
   -> Maybe Text
   -> Maybe Text
   -> Maybe ConnectorState
   -> Maybe CapacityDescription
   -> Maybe [PluginDescription]
   -> Maybe Text
   -> Maybe KafkaClusterClientAuthenticationDescription
   -> Maybe KafkaClusterEncryptionInTransitDescription
   -> Maybe Text
   -> Int
   -> DescribeConnectorResponse)
-> Either String (Maybe KafkaClusterDescription)
-> Either
     String
     (Maybe Text
      -> Maybe LogDeliveryDescription
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe WorkerConfigurationDescription
      -> Maybe Text
      -> Maybe Text
      -> Maybe ConnectorState
      -> Maybe CapacityDescription
      -> Maybe [PluginDescription]
      -> Maybe Text
      -> Maybe KafkaClusterClientAuthenticationDescription
      -> Maybe KafkaClusterEncryptionInTransitDescription
      -> Maybe Text
      -> Int
      -> DescribeConnectorResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe KafkaClusterDescription)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"kafkaCluster")
            Either
  String
  (Maybe Text
   -> Maybe LogDeliveryDescription
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe WorkerConfigurationDescription
   -> Maybe Text
   -> Maybe Text
   -> Maybe ConnectorState
   -> Maybe CapacityDescription
   -> Maybe [PluginDescription]
   -> Maybe Text
   -> Maybe KafkaClusterClientAuthenticationDescription
   -> Maybe KafkaClusterEncryptionInTransitDescription
   -> Maybe Text
   -> Int
   -> DescribeConnectorResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe LogDeliveryDescription
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe WorkerConfigurationDescription
      -> Maybe Text
      -> Maybe Text
      -> Maybe ConnectorState
      -> Maybe CapacityDescription
      -> Maybe [PluginDescription]
      -> Maybe Text
      -> Maybe KafkaClusterClientAuthenticationDescription
      -> Maybe KafkaClusterEncryptionInTransitDescription
      -> Maybe Text
      -> Int
      -> DescribeConnectorResponse)
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
"kafkaConnectVersion")
            Either
  String
  (Maybe LogDeliveryDescription
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe WorkerConfigurationDescription
   -> Maybe Text
   -> Maybe Text
   -> Maybe ConnectorState
   -> Maybe CapacityDescription
   -> Maybe [PluginDescription]
   -> Maybe Text
   -> Maybe KafkaClusterClientAuthenticationDescription
   -> Maybe KafkaClusterEncryptionInTransitDescription
   -> Maybe Text
   -> Int
   -> DescribeConnectorResponse)
-> Either String (Maybe LogDeliveryDescription)
-> Either
     String
     (Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe WorkerConfigurationDescription
      -> Maybe Text
      -> Maybe Text
      -> Maybe ConnectorState
      -> Maybe CapacityDescription
      -> Maybe [PluginDescription]
      -> Maybe Text
      -> Maybe KafkaClusterClientAuthenticationDescription
      -> Maybe KafkaClusterEncryptionInTransitDescription
      -> Maybe Text
      -> Int
      -> DescribeConnectorResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe LogDeliveryDescription)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"logDelivery")
            Either
  String
  (Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe WorkerConfigurationDescription
   -> Maybe Text
   -> Maybe Text
   -> Maybe ConnectorState
   -> Maybe CapacityDescription
   -> Maybe [PluginDescription]
   -> Maybe Text
   -> Maybe KafkaClusterClientAuthenticationDescription
   -> Maybe KafkaClusterEncryptionInTransitDescription
   -> Maybe Text
   -> Int
   -> DescribeConnectorResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe (HashMap Text Text)
      -> Maybe WorkerConfigurationDescription
      -> Maybe Text
      -> Maybe Text
      -> Maybe ConnectorState
      -> Maybe CapacityDescription
      -> Maybe [PluginDescription]
      -> Maybe Text
      -> Maybe KafkaClusterClientAuthenticationDescription
      -> Maybe KafkaClusterEncryptionInTransitDescription
      -> Maybe Text
      -> Int
      -> DescribeConnectorResponse)
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
"currentVersion")
            Either
  String
  (Maybe (HashMap Text Text)
   -> Maybe WorkerConfigurationDescription
   -> Maybe Text
   -> Maybe Text
   -> Maybe ConnectorState
   -> Maybe CapacityDescription
   -> Maybe [PluginDescription]
   -> Maybe Text
   -> Maybe KafkaClusterClientAuthenticationDescription
   -> Maybe KafkaClusterEncryptionInTransitDescription
   -> Maybe Text
   -> Int
   -> DescribeConnectorResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either
     String
     (Maybe WorkerConfigurationDescription
      -> Maybe Text
      -> Maybe Text
      -> Maybe ConnectorState
      -> Maybe CapacityDescription
      -> Maybe [PluginDescription]
      -> Maybe Text
      -> Maybe KafkaClusterClientAuthenticationDescription
      -> Maybe KafkaClusterEncryptionInTransitDescription
      -> Maybe Text
      -> Int
      -> DescribeConnectorResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"connectorConfiguration"
                            Either String (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text)
-> Either String (Maybe (HashMap Text Text))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty
                        )
            Either
  String
  (Maybe WorkerConfigurationDescription
   -> Maybe Text
   -> Maybe Text
   -> Maybe ConnectorState
   -> Maybe CapacityDescription
   -> Maybe [PluginDescription]
   -> Maybe Text
   -> Maybe KafkaClusterClientAuthenticationDescription
   -> Maybe KafkaClusterEncryptionInTransitDescription
   -> Maybe Text
   -> Int
   -> DescribeConnectorResponse)
-> Either String (Maybe WorkerConfigurationDescription)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe ConnectorState
      -> Maybe CapacityDescription
      -> Maybe [PluginDescription]
      -> Maybe Text
      -> Maybe KafkaClusterClientAuthenticationDescription
      -> Maybe KafkaClusterEncryptionInTransitDescription
      -> Maybe Text
      -> Int
      -> DescribeConnectorResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Either String (Maybe WorkerConfigurationDescription)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"workerConfiguration")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe ConnectorState
   -> Maybe CapacityDescription
   -> Maybe [PluginDescription]
   -> Maybe Text
   -> Maybe KafkaClusterClientAuthenticationDescription
   -> Maybe KafkaClusterEncryptionInTransitDescription
   -> Maybe Text
   -> Int
   -> DescribeConnectorResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe ConnectorState
      -> Maybe CapacityDescription
      -> Maybe [PluginDescription]
      -> Maybe Text
      -> Maybe KafkaClusterClientAuthenticationDescription
      -> Maybe KafkaClusterEncryptionInTransitDescription
      -> Maybe Text
      -> Int
      -> DescribeConnectorResponse)
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
"connectorArn")
            Either
  String
  (Maybe Text
   -> Maybe ConnectorState
   -> Maybe CapacityDescription
   -> Maybe [PluginDescription]
   -> Maybe Text
   -> Maybe KafkaClusterClientAuthenticationDescription
   -> Maybe KafkaClusterEncryptionInTransitDescription
   -> Maybe Text
   -> Int
   -> DescribeConnectorResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe ConnectorState
      -> Maybe CapacityDescription
      -> Maybe [PluginDescription]
      -> Maybe Text
      -> Maybe KafkaClusterClientAuthenticationDescription
      -> Maybe KafkaClusterEncryptionInTransitDescription
      -> Maybe Text
      -> Int
      -> DescribeConnectorResponse)
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
"connectorName")
            Either
  String
  (Maybe ConnectorState
   -> Maybe CapacityDescription
   -> Maybe [PluginDescription]
   -> Maybe Text
   -> Maybe KafkaClusterClientAuthenticationDescription
   -> Maybe KafkaClusterEncryptionInTransitDescription
   -> Maybe Text
   -> Int
   -> DescribeConnectorResponse)
-> Either String (Maybe ConnectorState)
-> Either
     String
     (Maybe CapacityDescription
      -> Maybe [PluginDescription]
      -> Maybe Text
      -> Maybe KafkaClusterClientAuthenticationDescription
      -> Maybe KafkaClusterEncryptionInTransitDescription
      -> Maybe Text
      -> Int
      -> DescribeConnectorResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe ConnectorState)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"connectorState")
            Either
  String
  (Maybe CapacityDescription
   -> Maybe [PluginDescription]
   -> Maybe Text
   -> Maybe KafkaClusterClientAuthenticationDescription
   -> Maybe KafkaClusterEncryptionInTransitDescription
   -> Maybe Text
   -> Int
   -> DescribeConnectorResponse)
-> Either String (Maybe CapacityDescription)
-> Either
     String
     (Maybe [PluginDescription]
      -> Maybe Text
      -> Maybe KafkaClusterClientAuthenticationDescription
      -> Maybe KafkaClusterEncryptionInTransitDescription
      -> Maybe Text
      -> Int
      -> DescribeConnectorResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe CapacityDescription)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"capacity")
            Either
  String
  (Maybe [PluginDescription]
   -> Maybe Text
   -> Maybe KafkaClusterClientAuthenticationDescription
   -> Maybe KafkaClusterEncryptionInTransitDescription
   -> Maybe Text
   -> Int
   -> DescribeConnectorResponse)
-> Either String (Maybe [PluginDescription])
-> Either
     String
     (Maybe Text
      -> Maybe KafkaClusterClientAuthenticationDescription
      -> Maybe KafkaClusterEncryptionInTransitDescription
      -> Maybe Text
      -> Int
      -> DescribeConnectorResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [PluginDescription]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"plugins" Either String (Maybe (Maybe [PluginDescription]))
-> Maybe [PluginDescription]
-> Either String (Maybe [PluginDescription])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [PluginDescription]
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Maybe Text
   -> Maybe KafkaClusterClientAuthenticationDescription
   -> Maybe KafkaClusterEncryptionInTransitDescription
   -> Maybe Text
   -> Int
   -> DescribeConnectorResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe KafkaClusterClientAuthenticationDescription
      -> Maybe KafkaClusterEncryptionInTransitDescription
      -> Maybe Text
      -> Int
      -> DescribeConnectorResponse)
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
"connectorDescription")
            Either
  String
  (Maybe KafkaClusterClientAuthenticationDescription
   -> Maybe KafkaClusterEncryptionInTransitDescription
   -> Maybe Text
   -> Int
   -> DescribeConnectorResponse)
-> Either
     String (Maybe KafkaClusterClientAuthenticationDescription)
-> Either
     String
     (Maybe KafkaClusterEncryptionInTransitDescription
      -> Maybe Text -> Int -> DescribeConnectorResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text
-> Either
     String (Maybe KafkaClusterClientAuthenticationDescription)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"kafkaClusterClientAuthentication")
            Either
  String
  (Maybe KafkaClusterEncryptionInTransitDescription
   -> Maybe Text -> Int -> DescribeConnectorResponse)
-> Either String (Maybe KafkaClusterEncryptionInTransitDescription)
-> Either String (Maybe Text -> Int -> DescribeConnectorResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text
-> Either String (Maybe KafkaClusterEncryptionInTransitDescription)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"kafkaClusterEncryptionInTransit")
            Either String (Maybe Text -> Int -> DescribeConnectorResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeConnectorResponse)
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
"serviceExecutionRoleArn")
            Either String (Int -> DescribeConnectorResponse)
-> Either String Int -> Either String DescribeConnectorResponse
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 DescribeConnector

instance Prelude.NFData DescribeConnector

instance Core.ToHeaders DescribeConnector where
  toHeaders :: DescribeConnector -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeConnector -> 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 DescribeConnector where
  toPath :: DescribeConnector -> ByteString
toPath DescribeConnector' {Text
connectorArn :: Text
$sel:connectorArn:DescribeConnector' :: DescribeConnector -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/v1/connectors/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
connectorArn]

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

-- | /See:/ 'newDescribeConnectorResponse' smart constructor.
data DescribeConnectorResponse = DescribeConnectorResponse'
  { -- | The time the connector was created.
    DescribeConnectorResponse -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
    -- | The Apache Kafka cluster that the connector is connected to.
    DescribeConnectorResponse -> Maybe KafkaClusterDescription
kafkaCluster :: Prelude.Maybe KafkaClusterDescription,
    -- | The version of Kafka Connect. It has to be compatible with both the
    -- Apache Kafka cluster\'s version and the plugins.
    DescribeConnectorResponse -> Maybe Text
kafkaConnectVersion :: Prelude.Maybe Prelude.Text,
    -- | Details about delivering logs to Amazon CloudWatch Logs.
    DescribeConnectorResponse -> Maybe LogDeliveryDescription
logDelivery :: Prelude.Maybe LogDeliveryDescription,
    -- | The current version of the connector.
    DescribeConnectorResponse -> Maybe Text
currentVersion :: Prelude.Maybe Prelude.Text,
    -- | A map of keys to values that represent the configuration for the
    -- connector.
    DescribeConnectorResponse -> Maybe (HashMap Text Text)
connectorConfiguration :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | Specifies which worker configuration was used for the connector.
    DescribeConnectorResponse -> Maybe WorkerConfigurationDescription
workerConfiguration :: Prelude.Maybe WorkerConfigurationDescription,
    -- | The Amazon Resource Name (ARN) of the connector.
    DescribeConnectorResponse -> Maybe Text
connectorArn :: Prelude.Maybe Prelude.Text,
    -- | The name of the connector.
    DescribeConnectorResponse -> Maybe Text
connectorName :: Prelude.Maybe Prelude.Text,
    -- | The state of the connector.
    DescribeConnectorResponse -> Maybe ConnectorState
connectorState :: Prelude.Maybe ConnectorState,
    -- | Information about the capacity of the connector, whether it is auto
    -- scaled or provisioned.
    DescribeConnectorResponse -> Maybe CapacityDescription
capacity :: Prelude.Maybe CapacityDescription,
    -- | Specifies which plugins were used for this connector.
    DescribeConnectorResponse -> Maybe [PluginDescription]
plugins :: Prelude.Maybe [PluginDescription],
    -- | A summary description of the connector.
    DescribeConnectorResponse -> Maybe Text
connectorDescription :: Prelude.Maybe Prelude.Text,
    -- | The type of client authentication used to connect to the Apache Kafka
    -- cluster. The value is NONE when no client authentication is used.
    DescribeConnectorResponse
-> Maybe KafkaClusterClientAuthenticationDescription
kafkaClusterClientAuthentication :: Prelude.Maybe KafkaClusterClientAuthenticationDescription,
    -- | Details of encryption in transit to the Apache Kafka cluster.
    DescribeConnectorResponse
-> Maybe KafkaClusterEncryptionInTransitDescription
kafkaClusterEncryptionInTransit :: Prelude.Maybe KafkaClusterEncryptionInTransitDescription,
    -- | The Amazon Resource Name (ARN) of the IAM role used by the connector to
    -- access Amazon Web Services resources.
    DescribeConnectorResponse -> Maybe Text
serviceExecutionRoleArn :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeConnectorResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeConnectorResponse -> DescribeConnectorResponse -> Bool
(DescribeConnectorResponse -> DescribeConnectorResponse -> Bool)
-> (DescribeConnectorResponse -> DescribeConnectorResponse -> Bool)
-> Eq DescribeConnectorResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeConnectorResponse -> DescribeConnectorResponse -> Bool
$c/= :: DescribeConnectorResponse -> DescribeConnectorResponse -> Bool
== :: DescribeConnectorResponse -> DescribeConnectorResponse -> Bool
$c== :: DescribeConnectorResponse -> DescribeConnectorResponse -> Bool
Prelude.Eq, ReadPrec [DescribeConnectorResponse]
ReadPrec DescribeConnectorResponse
Int -> ReadS DescribeConnectorResponse
ReadS [DescribeConnectorResponse]
(Int -> ReadS DescribeConnectorResponse)
-> ReadS [DescribeConnectorResponse]
-> ReadPrec DescribeConnectorResponse
-> ReadPrec [DescribeConnectorResponse]
-> Read DescribeConnectorResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeConnectorResponse]
$creadListPrec :: ReadPrec [DescribeConnectorResponse]
readPrec :: ReadPrec DescribeConnectorResponse
$creadPrec :: ReadPrec DescribeConnectorResponse
readList :: ReadS [DescribeConnectorResponse]
$creadList :: ReadS [DescribeConnectorResponse]
readsPrec :: Int -> ReadS DescribeConnectorResponse
$creadsPrec :: Int -> ReadS DescribeConnectorResponse
Prelude.Read, Int -> DescribeConnectorResponse -> ShowS
[DescribeConnectorResponse] -> ShowS
DescribeConnectorResponse -> String
(Int -> DescribeConnectorResponse -> ShowS)
-> (DescribeConnectorResponse -> String)
-> ([DescribeConnectorResponse] -> ShowS)
-> Show DescribeConnectorResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeConnectorResponse] -> ShowS
$cshowList :: [DescribeConnectorResponse] -> ShowS
show :: DescribeConnectorResponse -> String
$cshow :: DescribeConnectorResponse -> String
showsPrec :: Int -> DescribeConnectorResponse -> ShowS
$cshowsPrec :: Int -> DescribeConnectorResponse -> ShowS
Prelude.Show, (forall x.
 DescribeConnectorResponse -> Rep DescribeConnectorResponse x)
-> (forall x.
    Rep DescribeConnectorResponse x -> DescribeConnectorResponse)
-> Generic DescribeConnectorResponse
forall x.
Rep DescribeConnectorResponse x -> DescribeConnectorResponse
forall x.
DescribeConnectorResponse -> Rep DescribeConnectorResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeConnectorResponse x -> DescribeConnectorResponse
$cfrom :: forall x.
DescribeConnectorResponse -> Rep DescribeConnectorResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeConnectorResponse' 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:
--
-- 'creationTime', 'describeConnectorResponse_creationTime' - The time the connector was created.
--
-- 'kafkaCluster', 'describeConnectorResponse_kafkaCluster' - The Apache Kafka cluster that the connector is connected to.
--
-- 'kafkaConnectVersion', 'describeConnectorResponse_kafkaConnectVersion' - The version of Kafka Connect. It has to be compatible with both the
-- Apache Kafka cluster\'s version and the plugins.
--
-- 'logDelivery', 'describeConnectorResponse_logDelivery' - Details about delivering logs to Amazon CloudWatch Logs.
--
-- 'currentVersion', 'describeConnectorResponse_currentVersion' - The current version of the connector.
--
-- 'connectorConfiguration', 'describeConnectorResponse_connectorConfiguration' - A map of keys to values that represent the configuration for the
-- connector.
--
-- 'workerConfiguration', 'describeConnectorResponse_workerConfiguration' - Specifies which worker configuration was used for the connector.
--
-- 'connectorArn', 'describeConnectorResponse_connectorArn' - The Amazon Resource Name (ARN) of the connector.
--
-- 'connectorName', 'describeConnectorResponse_connectorName' - The name of the connector.
--
-- 'connectorState', 'describeConnectorResponse_connectorState' - The state of the connector.
--
-- 'capacity', 'describeConnectorResponse_capacity' - Information about the capacity of the connector, whether it is auto
-- scaled or provisioned.
--
-- 'plugins', 'describeConnectorResponse_plugins' - Specifies which plugins were used for this connector.
--
-- 'connectorDescription', 'describeConnectorResponse_connectorDescription' - A summary description of the connector.
--
-- 'kafkaClusterClientAuthentication', 'describeConnectorResponse_kafkaClusterClientAuthentication' - The type of client authentication used to connect to the Apache Kafka
-- cluster. The value is NONE when no client authentication is used.
--
-- 'kafkaClusterEncryptionInTransit', 'describeConnectorResponse_kafkaClusterEncryptionInTransit' - Details of encryption in transit to the Apache Kafka cluster.
--
-- 'serviceExecutionRoleArn', 'describeConnectorResponse_serviceExecutionRoleArn' - The Amazon Resource Name (ARN) of the IAM role used by the connector to
-- access Amazon Web Services resources.
--
-- 'httpStatus', 'describeConnectorResponse_httpStatus' - The response's http status code.
newDescribeConnectorResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeConnectorResponse
newDescribeConnectorResponse :: Int -> DescribeConnectorResponse
newDescribeConnectorResponse Int
pHttpStatus_ =
  DescribeConnectorResponse' :: Maybe POSIX
-> Maybe KafkaClusterDescription
-> Maybe Text
-> Maybe LogDeliveryDescription
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe WorkerConfigurationDescription
-> Maybe Text
-> Maybe Text
-> Maybe ConnectorState
-> Maybe CapacityDescription
-> Maybe [PluginDescription]
-> Maybe Text
-> Maybe KafkaClusterClientAuthenticationDescription
-> Maybe KafkaClusterEncryptionInTransitDescription
-> Maybe Text
-> Int
-> DescribeConnectorResponse
DescribeConnectorResponse'
    { $sel:creationTime:DescribeConnectorResponse' :: Maybe POSIX
creationTime =
        Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:kafkaCluster:DescribeConnectorResponse' :: Maybe KafkaClusterDescription
kafkaCluster = Maybe KafkaClusterDescription
forall a. Maybe a
Prelude.Nothing,
      $sel:kafkaConnectVersion:DescribeConnectorResponse' :: Maybe Text
kafkaConnectVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:logDelivery:DescribeConnectorResponse' :: Maybe LogDeliveryDescription
logDelivery = Maybe LogDeliveryDescription
forall a. Maybe a
Prelude.Nothing,
      $sel:currentVersion:DescribeConnectorResponse' :: Maybe Text
currentVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:connectorConfiguration:DescribeConnectorResponse' :: Maybe (HashMap Text Text)
connectorConfiguration = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:workerConfiguration:DescribeConnectorResponse' :: Maybe WorkerConfigurationDescription
workerConfiguration = Maybe WorkerConfigurationDescription
forall a. Maybe a
Prelude.Nothing,
      $sel:connectorArn:DescribeConnectorResponse' :: Maybe Text
connectorArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:connectorName:DescribeConnectorResponse' :: Maybe Text
connectorName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:connectorState:DescribeConnectorResponse' :: Maybe ConnectorState
connectorState = Maybe ConnectorState
forall a. Maybe a
Prelude.Nothing,
      $sel:capacity:DescribeConnectorResponse' :: Maybe CapacityDescription
capacity = Maybe CapacityDescription
forall a. Maybe a
Prelude.Nothing,
      $sel:plugins:DescribeConnectorResponse' :: Maybe [PluginDescription]
plugins = Maybe [PluginDescription]
forall a. Maybe a
Prelude.Nothing,
      $sel:connectorDescription:DescribeConnectorResponse' :: Maybe Text
connectorDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:kafkaClusterClientAuthentication:DescribeConnectorResponse' :: Maybe KafkaClusterClientAuthenticationDescription
kafkaClusterClientAuthentication =
        Maybe KafkaClusterClientAuthenticationDescription
forall a. Maybe a
Prelude.Nothing,
      $sel:kafkaClusterEncryptionInTransit:DescribeConnectorResponse' :: Maybe KafkaClusterEncryptionInTransitDescription
kafkaClusterEncryptionInTransit =
        Maybe KafkaClusterEncryptionInTransitDescription
forall a. Maybe a
Prelude.Nothing,
      $sel:serviceExecutionRoleArn:DescribeConnectorResponse' :: Maybe Text
serviceExecutionRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeConnectorResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The time the connector was created.
describeConnectorResponse_creationTime :: Lens.Lens' DescribeConnectorResponse (Prelude.Maybe Prelude.UTCTime)
describeConnectorResponse_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeConnectorResponse -> f DescribeConnectorResponse
describeConnectorResponse_creationTime = (DescribeConnectorResponse -> Maybe POSIX)
-> (DescribeConnectorResponse
    -> Maybe POSIX -> DescribeConnectorResponse)
-> Lens
     DescribeConnectorResponse
     DescribeConnectorResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConnectorResponse' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:DescribeConnectorResponse' :: DescribeConnectorResponse -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: DescribeConnectorResponse
s@DescribeConnectorResponse' {} Maybe POSIX
a -> DescribeConnectorResponse
s {$sel:creationTime:DescribeConnectorResponse' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: DescribeConnectorResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeConnectorResponse -> f DescribeConnectorResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeConnectorResponse
-> f DescribeConnectorResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The Apache Kafka cluster that the connector is connected to.
describeConnectorResponse_kafkaCluster :: Lens.Lens' DescribeConnectorResponse (Prelude.Maybe KafkaClusterDescription)
describeConnectorResponse_kafkaCluster :: (Maybe KafkaClusterDescription
 -> f (Maybe KafkaClusterDescription))
-> DescribeConnectorResponse -> f DescribeConnectorResponse
describeConnectorResponse_kafkaCluster = (DescribeConnectorResponse -> Maybe KafkaClusterDescription)
-> (DescribeConnectorResponse
    -> Maybe KafkaClusterDescription -> DescribeConnectorResponse)
-> Lens
     DescribeConnectorResponse
     DescribeConnectorResponse
     (Maybe KafkaClusterDescription)
     (Maybe KafkaClusterDescription)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConnectorResponse' {Maybe KafkaClusterDescription
kafkaCluster :: Maybe KafkaClusterDescription
$sel:kafkaCluster:DescribeConnectorResponse' :: DescribeConnectorResponse -> Maybe KafkaClusterDescription
kafkaCluster} -> Maybe KafkaClusterDescription
kafkaCluster) (\s :: DescribeConnectorResponse
s@DescribeConnectorResponse' {} Maybe KafkaClusterDescription
a -> DescribeConnectorResponse
s {$sel:kafkaCluster:DescribeConnectorResponse' :: Maybe KafkaClusterDescription
kafkaCluster = Maybe KafkaClusterDescription
a} :: DescribeConnectorResponse)

-- | The version of Kafka Connect. It has to be compatible with both the
-- Apache Kafka cluster\'s version and the plugins.
describeConnectorResponse_kafkaConnectVersion :: Lens.Lens' DescribeConnectorResponse (Prelude.Maybe Prelude.Text)
describeConnectorResponse_kafkaConnectVersion :: (Maybe Text -> f (Maybe Text))
-> DescribeConnectorResponse -> f DescribeConnectorResponse
describeConnectorResponse_kafkaConnectVersion = (DescribeConnectorResponse -> Maybe Text)
-> (DescribeConnectorResponse
    -> Maybe Text -> DescribeConnectorResponse)
-> Lens
     DescribeConnectorResponse
     DescribeConnectorResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConnectorResponse' {Maybe Text
kafkaConnectVersion :: Maybe Text
$sel:kafkaConnectVersion:DescribeConnectorResponse' :: DescribeConnectorResponse -> Maybe Text
kafkaConnectVersion} -> Maybe Text
kafkaConnectVersion) (\s :: DescribeConnectorResponse
s@DescribeConnectorResponse' {} Maybe Text
a -> DescribeConnectorResponse
s {$sel:kafkaConnectVersion:DescribeConnectorResponse' :: Maybe Text
kafkaConnectVersion = Maybe Text
a} :: DescribeConnectorResponse)

-- | Details about delivering logs to Amazon CloudWatch Logs.
describeConnectorResponse_logDelivery :: Lens.Lens' DescribeConnectorResponse (Prelude.Maybe LogDeliveryDescription)
describeConnectorResponse_logDelivery :: (Maybe LogDeliveryDescription -> f (Maybe LogDeliveryDescription))
-> DescribeConnectorResponse -> f DescribeConnectorResponse
describeConnectorResponse_logDelivery = (DescribeConnectorResponse -> Maybe LogDeliveryDescription)
-> (DescribeConnectorResponse
    -> Maybe LogDeliveryDescription -> DescribeConnectorResponse)
-> Lens
     DescribeConnectorResponse
     DescribeConnectorResponse
     (Maybe LogDeliveryDescription)
     (Maybe LogDeliveryDescription)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConnectorResponse' {Maybe LogDeliveryDescription
logDelivery :: Maybe LogDeliveryDescription
$sel:logDelivery:DescribeConnectorResponse' :: DescribeConnectorResponse -> Maybe LogDeliveryDescription
logDelivery} -> Maybe LogDeliveryDescription
logDelivery) (\s :: DescribeConnectorResponse
s@DescribeConnectorResponse' {} Maybe LogDeliveryDescription
a -> DescribeConnectorResponse
s {$sel:logDelivery:DescribeConnectorResponse' :: Maybe LogDeliveryDescription
logDelivery = Maybe LogDeliveryDescription
a} :: DescribeConnectorResponse)

-- | The current version of the connector.
describeConnectorResponse_currentVersion :: Lens.Lens' DescribeConnectorResponse (Prelude.Maybe Prelude.Text)
describeConnectorResponse_currentVersion :: (Maybe Text -> f (Maybe Text))
-> DescribeConnectorResponse -> f DescribeConnectorResponse
describeConnectorResponse_currentVersion = (DescribeConnectorResponse -> Maybe Text)
-> (DescribeConnectorResponse
    -> Maybe Text -> DescribeConnectorResponse)
-> Lens
     DescribeConnectorResponse
     DescribeConnectorResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConnectorResponse' {Maybe Text
currentVersion :: Maybe Text
$sel:currentVersion:DescribeConnectorResponse' :: DescribeConnectorResponse -> Maybe Text
currentVersion} -> Maybe Text
currentVersion) (\s :: DescribeConnectorResponse
s@DescribeConnectorResponse' {} Maybe Text
a -> DescribeConnectorResponse
s {$sel:currentVersion:DescribeConnectorResponse' :: Maybe Text
currentVersion = Maybe Text
a} :: DescribeConnectorResponse)

-- | A map of keys to values that represent the configuration for the
-- connector.
describeConnectorResponse_connectorConfiguration :: Lens.Lens' DescribeConnectorResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
describeConnectorResponse_connectorConfiguration :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> DescribeConnectorResponse -> f DescribeConnectorResponse
describeConnectorResponse_connectorConfiguration = (DescribeConnectorResponse -> Maybe (HashMap Text Text))
-> (DescribeConnectorResponse
    -> Maybe (HashMap Text Text) -> DescribeConnectorResponse)
-> Lens
     DescribeConnectorResponse
     DescribeConnectorResponse
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConnectorResponse' {Maybe (HashMap Text Text)
connectorConfiguration :: Maybe (HashMap Text Text)
$sel:connectorConfiguration:DescribeConnectorResponse' :: DescribeConnectorResponse -> Maybe (HashMap Text Text)
connectorConfiguration} -> Maybe (HashMap Text Text)
connectorConfiguration) (\s :: DescribeConnectorResponse
s@DescribeConnectorResponse' {} Maybe (HashMap Text Text)
a -> DescribeConnectorResponse
s {$sel:connectorConfiguration:DescribeConnectorResponse' :: Maybe (HashMap Text Text)
connectorConfiguration = Maybe (HashMap Text Text)
a} :: DescribeConnectorResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> DescribeConnectorResponse -> f DescribeConnectorResponse)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> DescribeConnectorResponse
-> f DescribeConnectorResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text 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
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Specifies which worker configuration was used for the connector.
describeConnectorResponse_workerConfiguration :: Lens.Lens' DescribeConnectorResponse (Prelude.Maybe WorkerConfigurationDescription)
describeConnectorResponse_workerConfiguration :: (Maybe WorkerConfigurationDescription
 -> f (Maybe WorkerConfigurationDescription))
-> DescribeConnectorResponse -> f DescribeConnectorResponse
describeConnectorResponse_workerConfiguration = (DescribeConnectorResponse -> Maybe WorkerConfigurationDescription)
-> (DescribeConnectorResponse
    -> Maybe WorkerConfigurationDescription
    -> DescribeConnectorResponse)
-> Lens
     DescribeConnectorResponse
     DescribeConnectorResponse
     (Maybe WorkerConfigurationDescription)
     (Maybe WorkerConfigurationDescription)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConnectorResponse' {Maybe WorkerConfigurationDescription
workerConfiguration :: Maybe WorkerConfigurationDescription
$sel:workerConfiguration:DescribeConnectorResponse' :: DescribeConnectorResponse -> Maybe WorkerConfigurationDescription
workerConfiguration} -> Maybe WorkerConfigurationDescription
workerConfiguration) (\s :: DescribeConnectorResponse
s@DescribeConnectorResponse' {} Maybe WorkerConfigurationDescription
a -> DescribeConnectorResponse
s {$sel:workerConfiguration:DescribeConnectorResponse' :: Maybe WorkerConfigurationDescription
workerConfiguration = Maybe WorkerConfigurationDescription
a} :: DescribeConnectorResponse)

-- | The Amazon Resource Name (ARN) of the connector.
describeConnectorResponse_connectorArn :: Lens.Lens' DescribeConnectorResponse (Prelude.Maybe Prelude.Text)
describeConnectorResponse_connectorArn :: (Maybe Text -> f (Maybe Text))
-> DescribeConnectorResponse -> f DescribeConnectorResponse
describeConnectorResponse_connectorArn = (DescribeConnectorResponse -> Maybe Text)
-> (DescribeConnectorResponse
    -> Maybe Text -> DescribeConnectorResponse)
-> Lens
     DescribeConnectorResponse
     DescribeConnectorResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConnectorResponse' {Maybe Text
connectorArn :: Maybe Text
$sel:connectorArn:DescribeConnectorResponse' :: DescribeConnectorResponse -> Maybe Text
connectorArn} -> Maybe Text
connectorArn) (\s :: DescribeConnectorResponse
s@DescribeConnectorResponse' {} Maybe Text
a -> DescribeConnectorResponse
s {$sel:connectorArn:DescribeConnectorResponse' :: Maybe Text
connectorArn = Maybe Text
a} :: DescribeConnectorResponse)

-- | The name of the connector.
describeConnectorResponse_connectorName :: Lens.Lens' DescribeConnectorResponse (Prelude.Maybe Prelude.Text)
describeConnectorResponse_connectorName :: (Maybe Text -> f (Maybe Text))
-> DescribeConnectorResponse -> f DescribeConnectorResponse
describeConnectorResponse_connectorName = (DescribeConnectorResponse -> Maybe Text)
-> (DescribeConnectorResponse
    -> Maybe Text -> DescribeConnectorResponse)
-> Lens
     DescribeConnectorResponse
     DescribeConnectorResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConnectorResponse' {Maybe Text
connectorName :: Maybe Text
$sel:connectorName:DescribeConnectorResponse' :: DescribeConnectorResponse -> Maybe Text
connectorName} -> Maybe Text
connectorName) (\s :: DescribeConnectorResponse
s@DescribeConnectorResponse' {} Maybe Text
a -> DescribeConnectorResponse
s {$sel:connectorName:DescribeConnectorResponse' :: Maybe Text
connectorName = Maybe Text
a} :: DescribeConnectorResponse)

-- | The state of the connector.
describeConnectorResponse_connectorState :: Lens.Lens' DescribeConnectorResponse (Prelude.Maybe ConnectorState)
describeConnectorResponse_connectorState :: (Maybe ConnectorState -> f (Maybe ConnectorState))
-> DescribeConnectorResponse -> f DescribeConnectorResponse
describeConnectorResponse_connectorState = (DescribeConnectorResponse -> Maybe ConnectorState)
-> (DescribeConnectorResponse
    -> Maybe ConnectorState -> DescribeConnectorResponse)
-> Lens
     DescribeConnectorResponse
     DescribeConnectorResponse
     (Maybe ConnectorState)
     (Maybe ConnectorState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConnectorResponse' {Maybe ConnectorState
connectorState :: Maybe ConnectorState
$sel:connectorState:DescribeConnectorResponse' :: DescribeConnectorResponse -> Maybe ConnectorState
connectorState} -> Maybe ConnectorState
connectorState) (\s :: DescribeConnectorResponse
s@DescribeConnectorResponse' {} Maybe ConnectorState
a -> DescribeConnectorResponse
s {$sel:connectorState:DescribeConnectorResponse' :: Maybe ConnectorState
connectorState = Maybe ConnectorState
a} :: DescribeConnectorResponse)

-- | Information about the capacity of the connector, whether it is auto
-- scaled or provisioned.
describeConnectorResponse_capacity :: Lens.Lens' DescribeConnectorResponse (Prelude.Maybe CapacityDescription)
describeConnectorResponse_capacity :: (Maybe CapacityDescription -> f (Maybe CapacityDescription))
-> DescribeConnectorResponse -> f DescribeConnectorResponse
describeConnectorResponse_capacity = (DescribeConnectorResponse -> Maybe CapacityDescription)
-> (DescribeConnectorResponse
    -> Maybe CapacityDescription -> DescribeConnectorResponse)
-> Lens
     DescribeConnectorResponse
     DescribeConnectorResponse
     (Maybe CapacityDescription)
     (Maybe CapacityDescription)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConnectorResponse' {Maybe CapacityDescription
capacity :: Maybe CapacityDescription
$sel:capacity:DescribeConnectorResponse' :: DescribeConnectorResponse -> Maybe CapacityDescription
capacity} -> Maybe CapacityDescription
capacity) (\s :: DescribeConnectorResponse
s@DescribeConnectorResponse' {} Maybe CapacityDescription
a -> DescribeConnectorResponse
s {$sel:capacity:DescribeConnectorResponse' :: Maybe CapacityDescription
capacity = Maybe CapacityDescription
a} :: DescribeConnectorResponse)

-- | Specifies which plugins were used for this connector.
describeConnectorResponse_plugins :: Lens.Lens' DescribeConnectorResponse (Prelude.Maybe [PluginDescription])
describeConnectorResponse_plugins :: (Maybe [PluginDescription] -> f (Maybe [PluginDescription]))
-> DescribeConnectorResponse -> f DescribeConnectorResponse
describeConnectorResponse_plugins = (DescribeConnectorResponse -> Maybe [PluginDescription])
-> (DescribeConnectorResponse
    -> Maybe [PluginDescription] -> DescribeConnectorResponse)
-> Lens
     DescribeConnectorResponse
     DescribeConnectorResponse
     (Maybe [PluginDescription])
     (Maybe [PluginDescription])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConnectorResponse' {Maybe [PluginDescription]
plugins :: Maybe [PluginDescription]
$sel:plugins:DescribeConnectorResponse' :: DescribeConnectorResponse -> Maybe [PluginDescription]
plugins} -> Maybe [PluginDescription]
plugins) (\s :: DescribeConnectorResponse
s@DescribeConnectorResponse' {} Maybe [PluginDescription]
a -> DescribeConnectorResponse
s {$sel:plugins:DescribeConnectorResponse' :: Maybe [PluginDescription]
plugins = Maybe [PluginDescription]
a} :: DescribeConnectorResponse) ((Maybe [PluginDescription] -> f (Maybe [PluginDescription]))
 -> DescribeConnectorResponse -> f DescribeConnectorResponse)
-> ((Maybe [PluginDescription] -> f (Maybe [PluginDescription]))
    -> Maybe [PluginDescription] -> f (Maybe [PluginDescription]))
-> (Maybe [PluginDescription] -> f (Maybe [PluginDescription]))
-> DescribeConnectorResponse
-> f DescribeConnectorResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [PluginDescription]
  [PluginDescription]
  [PluginDescription]
  [PluginDescription]
-> Iso
     (Maybe [PluginDescription])
     (Maybe [PluginDescription])
     (Maybe [PluginDescription])
     (Maybe [PluginDescription])
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
  [PluginDescription]
  [PluginDescription]
  [PluginDescription]
  [PluginDescription]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A summary description of the connector.
describeConnectorResponse_connectorDescription :: Lens.Lens' DescribeConnectorResponse (Prelude.Maybe Prelude.Text)
describeConnectorResponse_connectorDescription :: (Maybe Text -> f (Maybe Text))
-> DescribeConnectorResponse -> f DescribeConnectorResponse
describeConnectorResponse_connectorDescription = (DescribeConnectorResponse -> Maybe Text)
-> (DescribeConnectorResponse
    -> Maybe Text -> DescribeConnectorResponse)
-> Lens
     DescribeConnectorResponse
     DescribeConnectorResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConnectorResponse' {Maybe Text
connectorDescription :: Maybe Text
$sel:connectorDescription:DescribeConnectorResponse' :: DescribeConnectorResponse -> Maybe Text
connectorDescription} -> Maybe Text
connectorDescription) (\s :: DescribeConnectorResponse
s@DescribeConnectorResponse' {} Maybe Text
a -> DescribeConnectorResponse
s {$sel:connectorDescription:DescribeConnectorResponse' :: Maybe Text
connectorDescription = Maybe Text
a} :: DescribeConnectorResponse)

-- | The type of client authentication used to connect to the Apache Kafka
-- cluster. The value is NONE when no client authentication is used.
describeConnectorResponse_kafkaClusterClientAuthentication :: Lens.Lens' DescribeConnectorResponse (Prelude.Maybe KafkaClusterClientAuthenticationDescription)
describeConnectorResponse_kafkaClusterClientAuthentication :: (Maybe KafkaClusterClientAuthenticationDescription
 -> f (Maybe KafkaClusterClientAuthenticationDescription))
-> DescribeConnectorResponse -> f DescribeConnectorResponse
describeConnectorResponse_kafkaClusterClientAuthentication = (DescribeConnectorResponse
 -> Maybe KafkaClusterClientAuthenticationDescription)
-> (DescribeConnectorResponse
    -> Maybe KafkaClusterClientAuthenticationDescription
    -> DescribeConnectorResponse)
-> Lens
     DescribeConnectorResponse
     DescribeConnectorResponse
     (Maybe KafkaClusterClientAuthenticationDescription)
     (Maybe KafkaClusterClientAuthenticationDescription)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConnectorResponse' {Maybe KafkaClusterClientAuthenticationDescription
kafkaClusterClientAuthentication :: Maybe KafkaClusterClientAuthenticationDescription
$sel:kafkaClusterClientAuthentication:DescribeConnectorResponse' :: DescribeConnectorResponse
-> Maybe KafkaClusterClientAuthenticationDescription
kafkaClusterClientAuthentication} -> Maybe KafkaClusterClientAuthenticationDescription
kafkaClusterClientAuthentication) (\s :: DescribeConnectorResponse
s@DescribeConnectorResponse' {} Maybe KafkaClusterClientAuthenticationDescription
a -> DescribeConnectorResponse
s {$sel:kafkaClusterClientAuthentication:DescribeConnectorResponse' :: Maybe KafkaClusterClientAuthenticationDescription
kafkaClusterClientAuthentication = Maybe KafkaClusterClientAuthenticationDescription
a} :: DescribeConnectorResponse)

-- | Details of encryption in transit to the Apache Kafka cluster.
describeConnectorResponse_kafkaClusterEncryptionInTransit :: Lens.Lens' DescribeConnectorResponse (Prelude.Maybe KafkaClusterEncryptionInTransitDescription)
describeConnectorResponse_kafkaClusterEncryptionInTransit :: (Maybe KafkaClusterEncryptionInTransitDescription
 -> f (Maybe KafkaClusterEncryptionInTransitDescription))
-> DescribeConnectorResponse -> f DescribeConnectorResponse
describeConnectorResponse_kafkaClusterEncryptionInTransit = (DescribeConnectorResponse
 -> Maybe KafkaClusterEncryptionInTransitDescription)
-> (DescribeConnectorResponse
    -> Maybe KafkaClusterEncryptionInTransitDescription
    -> DescribeConnectorResponse)
-> Lens
     DescribeConnectorResponse
     DescribeConnectorResponse
     (Maybe KafkaClusterEncryptionInTransitDescription)
     (Maybe KafkaClusterEncryptionInTransitDescription)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConnectorResponse' {Maybe KafkaClusterEncryptionInTransitDescription
kafkaClusterEncryptionInTransit :: Maybe KafkaClusterEncryptionInTransitDescription
$sel:kafkaClusterEncryptionInTransit:DescribeConnectorResponse' :: DescribeConnectorResponse
-> Maybe KafkaClusterEncryptionInTransitDescription
kafkaClusterEncryptionInTransit} -> Maybe KafkaClusterEncryptionInTransitDescription
kafkaClusterEncryptionInTransit) (\s :: DescribeConnectorResponse
s@DescribeConnectorResponse' {} Maybe KafkaClusterEncryptionInTransitDescription
a -> DescribeConnectorResponse
s {$sel:kafkaClusterEncryptionInTransit:DescribeConnectorResponse' :: Maybe KafkaClusterEncryptionInTransitDescription
kafkaClusterEncryptionInTransit = Maybe KafkaClusterEncryptionInTransitDescription
a} :: DescribeConnectorResponse)

-- | The Amazon Resource Name (ARN) of the IAM role used by the connector to
-- access Amazon Web Services resources.
describeConnectorResponse_serviceExecutionRoleArn :: Lens.Lens' DescribeConnectorResponse (Prelude.Maybe Prelude.Text)
describeConnectorResponse_serviceExecutionRoleArn :: (Maybe Text -> f (Maybe Text))
-> DescribeConnectorResponse -> f DescribeConnectorResponse
describeConnectorResponse_serviceExecutionRoleArn = (DescribeConnectorResponse -> Maybe Text)
-> (DescribeConnectorResponse
    -> Maybe Text -> DescribeConnectorResponse)
-> Lens
     DescribeConnectorResponse
     DescribeConnectorResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConnectorResponse' {Maybe Text
serviceExecutionRoleArn :: Maybe Text
$sel:serviceExecutionRoleArn:DescribeConnectorResponse' :: DescribeConnectorResponse -> Maybe Text
serviceExecutionRoleArn} -> Maybe Text
serviceExecutionRoleArn) (\s :: DescribeConnectorResponse
s@DescribeConnectorResponse' {} Maybe Text
a -> DescribeConnectorResponse
s {$sel:serviceExecutionRoleArn:DescribeConnectorResponse' :: Maybe Text
serviceExecutionRoleArn = Maybe Text
a} :: DescribeConnectorResponse)

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

instance Prelude.NFData DescribeConnectorResponse