{-# 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.CreateConnectorProfile
-- 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)
--
-- Creates a new connector profile associated with your Amazon Web Services
-- account. There is a soft quota of 100 connector profiles per Amazon Web
-- Services account. If you need more connector profiles than this quota
-- allows, you can submit a request to the Amazon AppFlow team through the
-- Amazon AppFlow support channel.
module Amazonka.AppFlow.CreateConnectorProfile
  ( -- * Creating a Request
    CreateConnectorProfile (..),
    newCreateConnectorProfile,

    -- * Request Lenses
    createConnectorProfile_kmsArn,
    createConnectorProfile_connectorProfileName,
    createConnectorProfile_connectorType,
    createConnectorProfile_connectionMode,
    createConnectorProfile_connectorProfileConfig,

    -- * Destructuring the Response
    CreateConnectorProfileResponse (..),
    newCreateConnectorProfileResponse,

    -- * Response Lenses
    createConnectorProfileResponse_connectorProfileArn,
    createConnectorProfileResponse_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:/ 'newCreateConnectorProfile' smart constructor.
data CreateConnectorProfile = CreateConnectorProfile'
  { -- | The ARN (Amazon Resource Name) of the Key Management Service (KMS) key
    -- you provide for encryption. This is required if you do not want to use
    -- the Amazon AppFlow-managed KMS key. If you don\'t provide anything here,
    -- Amazon AppFlow uses the Amazon AppFlow-managed KMS key.
    CreateConnectorProfile -> Maybe Text
kmsArn :: Prelude.Maybe Prelude.Text,
    -- | The name of the connector profile. The name is unique for each
    -- @ConnectorProfile@ in your Amazon Web Services account.
    CreateConnectorProfile -> Text
connectorProfileName :: Prelude.Text,
    -- | The type of connector, such as Salesforce, Amplitude, and so on.
    CreateConnectorProfile -> ConnectorType
connectorType :: ConnectorType,
    -- | Indicates the connection mode and specifies whether it is public or
    -- private. Private flows use Amazon Web Services PrivateLink to route data
    -- over Amazon Web Services infrastructure without exposing it to the
    -- public internet.
    CreateConnectorProfile -> ConnectionMode
connectionMode :: ConnectionMode,
    -- | Defines the connector-specific configuration and credentials.
    CreateConnectorProfile -> ConnectorProfileConfig
connectorProfileConfig :: ConnectorProfileConfig
  }
  deriving (CreateConnectorProfile -> CreateConnectorProfile -> Bool
(CreateConnectorProfile -> CreateConnectorProfile -> Bool)
-> (CreateConnectorProfile -> CreateConnectorProfile -> Bool)
-> Eq CreateConnectorProfile
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateConnectorProfile -> CreateConnectorProfile -> Bool
$c/= :: CreateConnectorProfile -> CreateConnectorProfile -> Bool
== :: CreateConnectorProfile -> CreateConnectorProfile -> Bool
$c== :: CreateConnectorProfile -> CreateConnectorProfile -> Bool
Prelude.Eq, Int -> CreateConnectorProfile -> ShowS
[CreateConnectorProfile] -> ShowS
CreateConnectorProfile -> String
(Int -> CreateConnectorProfile -> ShowS)
-> (CreateConnectorProfile -> String)
-> ([CreateConnectorProfile] -> ShowS)
-> Show CreateConnectorProfile
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateConnectorProfile] -> ShowS
$cshowList :: [CreateConnectorProfile] -> ShowS
show :: CreateConnectorProfile -> String
$cshow :: CreateConnectorProfile -> String
showsPrec :: Int -> CreateConnectorProfile -> ShowS
$cshowsPrec :: Int -> CreateConnectorProfile -> ShowS
Prelude.Show, (forall x. CreateConnectorProfile -> Rep CreateConnectorProfile x)
-> (forall x.
    Rep CreateConnectorProfile x -> CreateConnectorProfile)
-> Generic CreateConnectorProfile
forall x. Rep CreateConnectorProfile x -> CreateConnectorProfile
forall x. CreateConnectorProfile -> Rep CreateConnectorProfile x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateConnectorProfile x -> CreateConnectorProfile
$cfrom :: forall x. CreateConnectorProfile -> Rep CreateConnectorProfile x
Prelude.Generic)

-- |
-- Create a value of 'CreateConnectorProfile' 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:
--
-- 'kmsArn', 'createConnectorProfile_kmsArn' - The ARN (Amazon Resource Name) of the Key Management Service (KMS) key
-- you provide for encryption. This is required if you do not want to use
-- the Amazon AppFlow-managed KMS key. If you don\'t provide anything here,
-- Amazon AppFlow uses the Amazon AppFlow-managed KMS key.
--
-- 'connectorProfileName', 'createConnectorProfile_connectorProfileName' - The name of the connector profile. The name is unique for each
-- @ConnectorProfile@ in your Amazon Web Services account.
--
-- 'connectorType', 'createConnectorProfile_connectorType' - The type of connector, such as Salesforce, Amplitude, and so on.
--
-- 'connectionMode', 'createConnectorProfile_connectionMode' - Indicates the connection mode and specifies whether it is public or
-- private. Private flows use Amazon Web Services PrivateLink to route data
-- over Amazon Web Services infrastructure without exposing it to the
-- public internet.
--
-- 'connectorProfileConfig', 'createConnectorProfile_connectorProfileConfig' - Defines the connector-specific configuration and credentials.
newCreateConnectorProfile ::
  -- | 'connectorProfileName'
  Prelude.Text ->
  -- | 'connectorType'
  ConnectorType ->
  -- | 'connectionMode'
  ConnectionMode ->
  -- | 'connectorProfileConfig'
  ConnectorProfileConfig ->
  CreateConnectorProfile
newCreateConnectorProfile :: Text
-> ConnectorType
-> ConnectionMode
-> ConnectorProfileConfig
-> CreateConnectorProfile
newCreateConnectorProfile
  Text
pConnectorProfileName_
  ConnectorType
pConnectorType_
  ConnectionMode
pConnectionMode_
  ConnectorProfileConfig
pConnectorProfileConfig_ =
    CreateConnectorProfile' :: Maybe Text
-> Text
-> ConnectorType
-> ConnectionMode
-> ConnectorProfileConfig
-> CreateConnectorProfile
CreateConnectorProfile'
      { $sel:kmsArn:CreateConnectorProfile' :: Maybe Text
kmsArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:connectorProfileName:CreateConnectorProfile' :: Text
connectorProfileName = Text
pConnectorProfileName_,
        $sel:connectorType:CreateConnectorProfile' :: ConnectorType
connectorType = ConnectorType
pConnectorType_,
        $sel:connectionMode:CreateConnectorProfile' :: ConnectionMode
connectionMode = ConnectionMode
pConnectionMode_,
        $sel:connectorProfileConfig:CreateConnectorProfile' :: ConnectorProfileConfig
connectorProfileConfig = ConnectorProfileConfig
pConnectorProfileConfig_
      }

-- | The ARN (Amazon Resource Name) of the Key Management Service (KMS) key
-- you provide for encryption. This is required if you do not want to use
-- the Amazon AppFlow-managed KMS key. If you don\'t provide anything here,
-- Amazon AppFlow uses the Amazon AppFlow-managed KMS key.
createConnectorProfile_kmsArn :: Lens.Lens' CreateConnectorProfile (Prelude.Maybe Prelude.Text)
createConnectorProfile_kmsArn :: (Maybe Text -> f (Maybe Text))
-> CreateConnectorProfile -> f CreateConnectorProfile
createConnectorProfile_kmsArn = (CreateConnectorProfile -> Maybe Text)
-> (CreateConnectorProfile -> Maybe Text -> CreateConnectorProfile)
-> Lens
     CreateConnectorProfile
     CreateConnectorProfile
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConnectorProfile' {Maybe Text
kmsArn :: Maybe Text
$sel:kmsArn:CreateConnectorProfile' :: CreateConnectorProfile -> Maybe Text
kmsArn} -> Maybe Text
kmsArn) (\s :: CreateConnectorProfile
s@CreateConnectorProfile' {} Maybe Text
a -> CreateConnectorProfile
s {$sel:kmsArn:CreateConnectorProfile' :: Maybe Text
kmsArn = Maybe Text
a} :: CreateConnectorProfile)

-- | The name of the connector profile. The name is unique for each
-- @ConnectorProfile@ in your Amazon Web Services account.
createConnectorProfile_connectorProfileName :: Lens.Lens' CreateConnectorProfile Prelude.Text
createConnectorProfile_connectorProfileName :: (Text -> f Text)
-> CreateConnectorProfile -> f CreateConnectorProfile
createConnectorProfile_connectorProfileName = (CreateConnectorProfile -> Text)
-> (CreateConnectorProfile -> Text -> CreateConnectorProfile)
-> Lens CreateConnectorProfile CreateConnectorProfile Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConnectorProfile' {Text
connectorProfileName :: Text
$sel:connectorProfileName:CreateConnectorProfile' :: CreateConnectorProfile -> Text
connectorProfileName} -> Text
connectorProfileName) (\s :: CreateConnectorProfile
s@CreateConnectorProfile' {} Text
a -> CreateConnectorProfile
s {$sel:connectorProfileName:CreateConnectorProfile' :: Text
connectorProfileName = Text
a} :: CreateConnectorProfile)

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

-- | Indicates the connection mode and specifies whether it is public or
-- private. Private flows use Amazon Web Services PrivateLink to route data
-- over Amazon Web Services infrastructure without exposing it to the
-- public internet.
createConnectorProfile_connectionMode :: Lens.Lens' CreateConnectorProfile ConnectionMode
createConnectorProfile_connectionMode :: (ConnectionMode -> f ConnectionMode)
-> CreateConnectorProfile -> f CreateConnectorProfile
createConnectorProfile_connectionMode = (CreateConnectorProfile -> ConnectionMode)
-> (CreateConnectorProfile
    -> ConnectionMode -> CreateConnectorProfile)
-> Lens
     CreateConnectorProfile
     CreateConnectorProfile
     ConnectionMode
     ConnectionMode
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConnectorProfile' {ConnectionMode
connectionMode :: ConnectionMode
$sel:connectionMode:CreateConnectorProfile' :: CreateConnectorProfile -> ConnectionMode
connectionMode} -> ConnectionMode
connectionMode) (\s :: CreateConnectorProfile
s@CreateConnectorProfile' {} ConnectionMode
a -> CreateConnectorProfile
s {$sel:connectionMode:CreateConnectorProfile' :: ConnectionMode
connectionMode = ConnectionMode
a} :: CreateConnectorProfile)

-- | Defines the connector-specific configuration and credentials.
createConnectorProfile_connectorProfileConfig :: Lens.Lens' CreateConnectorProfile ConnectorProfileConfig
createConnectorProfile_connectorProfileConfig :: (ConnectorProfileConfig -> f ConnectorProfileConfig)
-> CreateConnectorProfile -> f CreateConnectorProfile
createConnectorProfile_connectorProfileConfig = (CreateConnectorProfile -> ConnectorProfileConfig)
-> (CreateConnectorProfile
    -> ConnectorProfileConfig -> CreateConnectorProfile)
-> Lens
     CreateConnectorProfile
     CreateConnectorProfile
     ConnectorProfileConfig
     ConnectorProfileConfig
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConnectorProfile' {ConnectorProfileConfig
connectorProfileConfig :: ConnectorProfileConfig
$sel:connectorProfileConfig:CreateConnectorProfile' :: CreateConnectorProfile -> ConnectorProfileConfig
connectorProfileConfig} -> ConnectorProfileConfig
connectorProfileConfig) (\s :: CreateConnectorProfile
s@CreateConnectorProfile' {} ConnectorProfileConfig
a -> CreateConnectorProfile
s {$sel:connectorProfileConfig:CreateConnectorProfile' :: ConnectorProfileConfig
connectorProfileConfig = ConnectorProfileConfig
a} :: CreateConnectorProfile)

instance Core.AWSRequest CreateConnectorProfile where
  type
    AWSResponse CreateConnectorProfile =
      CreateConnectorProfileResponse
  request :: CreateConnectorProfile -> Request CreateConnectorProfile
request = Service -> CreateConnectorProfile -> Request CreateConnectorProfile
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateConnectorProfile
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateConnectorProfile)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse CreateConnectorProfile))
-> Logger
-> Service
-> Proxy CreateConnectorProfile
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateConnectorProfile)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text -> Int -> CreateConnectorProfileResponse
CreateConnectorProfileResponse'
            (Maybe Text -> Int -> CreateConnectorProfileResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateConnectorProfileResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"connectorProfileArn")
            Either String (Int -> CreateConnectorProfileResponse)
-> Either String Int
-> Either String CreateConnectorProfileResponse
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 CreateConnectorProfile

instance Prelude.NFData CreateConnectorProfile

instance Core.ToHeaders CreateConnectorProfile where
  toHeaders :: CreateConnectorProfile -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreateConnectorProfile -> 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 CreateConnectorProfile where
  toJSON :: CreateConnectorProfile -> Value
toJSON CreateConnectorProfile' {Maybe Text
Text
ConnectionMode
ConnectorType
ConnectorProfileConfig
connectorProfileConfig :: ConnectorProfileConfig
connectionMode :: ConnectionMode
connectorType :: ConnectorType
connectorProfileName :: Text
kmsArn :: Maybe Text
$sel:connectorProfileConfig:CreateConnectorProfile' :: CreateConnectorProfile -> ConnectorProfileConfig
$sel:connectionMode:CreateConnectorProfile' :: CreateConnectorProfile -> ConnectionMode
$sel:connectorType:CreateConnectorProfile' :: CreateConnectorProfile -> ConnectorType
$sel:connectorProfileName:CreateConnectorProfile' :: CreateConnectorProfile -> Text
$sel:kmsArn:CreateConnectorProfile' :: CreateConnectorProfile -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"kmsArn" 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
kmsArn,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"connectorProfileName"
                  Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
connectorProfileName
              ),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"connectorType" Text -> ConnectorType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ConnectorType
connectorType),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"connectionMode" Text -> ConnectionMode -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ConnectionMode
connectionMode),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"connectorProfileConfig"
                  Text -> ConnectorProfileConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ConnectorProfileConfig
connectorProfileConfig
              )
          ]
      )

instance Core.ToPath CreateConnectorProfile where
  toPath :: CreateConnectorProfile -> ByteString
toPath = ByteString -> CreateConnectorProfile -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/create-connector-profile"

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

-- | /See:/ 'newCreateConnectorProfileResponse' smart constructor.
data CreateConnectorProfileResponse = CreateConnectorProfileResponse'
  { -- | The Amazon Resource Name (ARN) of the connector profile.
    CreateConnectorProfileResponse -> Maybe Text
connectorProfileArn :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    CreateConnectorProfileResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateConnectorProfileResponse
-> CreateConnectorProfileResponse -> Bool
(CreateConnectorProfileResponse
 -> CreateConnectorProfileResponse -> Bool)
-> (CreateConnectorProfileResponse
    -> CreateConnectorProfileResponse -> Bool)
-> Eq CreateConnectorProfileResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateConnectorProfileResponse
-> CreateConnectorProfileResponse -> Bool
$c/= :: CreateConnectorProfileResponse
-> CreateConnectorProfileResponse -> Bool
== :: CreateConnectorProfileResponse
-> CreateConnectorProfileResponse -> Bool
$c== :: CreateConnectorProfileResponse
-> CreateConnectorProfileResponse -> Bool
Prelude.Eq, ReadPrec [CreateConnectorProfileResponse]
ReadPrec CreateConnectorProfileResponse
Int -> ReadS CreateConnectorProfileResponse
ReadS [CreateConnectorProfileResponse]
(Int -> ReadS CreateConnectorProfileResponse)
-> ReadS [CreateConnectorProfileResponse]
-> ReadPrec CreateConnectorProfileResponse
-> ReadPrec [CreateConnectorProfileResponse]
-> Read CreateConnectorProfileResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateConnectorProfileResponse]
$creadListPrec :: ReadPrec [CreateConnectorProfileResponse]
readPrec :: ReadPrec CreateConnectorProfileResponse
$creadPrec :: ReadPrec CreateConnectorProfileResponse
readList :: ReadS [CreateConnectorProfileResponse]
$creadList :: ReadS [CreateConnectorProfileResponse]
readsPrec :: Int -> ReadS CreateConnectorProfileResponse
$creadsPrec :: Int -> ReadS CreateConnectorProfileResponse
Prelude.Read, Int -> CreateConnectorProfileResponse -> ShowS
[CreateConnectorProfileResponse] -> ShowS
CreateConnectorProfileResponse -> String
(Int -> CreateConnectorProfileResponse -> ShowS)
-> (CreateConnectorProfileResponse -> String)
-> ([CreateConnectorProfileResponse] -> ShowS)
-> Show CreateConnectorProfileResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateConnectorProfileResponse] -> ShowS
$cshowList :: [CreateConnectorProfileResponse] -> ShowS
show :: CreateConnectorProfileResponse -> String
$cshow :: CreateConnectorProfileResponse -> String
showsPrec :: Int -> CreateConnectorProfileResponse -> ShowS
$cshowsPrec :: Int -> CreateConnectorProfileResponse -> ShowS
Prelude.Show, (forall x.
 CreateConnectorProfileResponse
 -> Rep CreateConnectorProfileResponse x)
-> (forall x.
    Rep CreateConnectorProfileResponse x
    -> CreateConnectorProfileResponse)
-> Generic CreateConnectorProfileResponse
forall x.
Rep CreateConnectorProfileResponse x
-> CreateConnectorProfileResponse
forall x.
CreateConnectorProfileResponse
-> Rep CreateConnectorProfileResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateConnectorProfileResponse x
-> CreateConnectorProfileResponse
$cfrom :: forall x.
CreateConnectorProfileResponse
-> Rep CreateConnectorProfileResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateConnectorProfileResponse' 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:
--
-- 'connectorProfileArn', 'createConnectorProfileResponse_connectorProfileArn' - The Amazon Resource Name (ARN) of the connector profile.
--
-- 'httpStatus', 'createConnectorProfileResponse_httpStatus' - The response's http status code.
newCreateConnectorProfileResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateConnectorProfileResponse
newCreateConnectorProfileResponse :: Int -> CreateConnectorProfileResponse
newCreateConnectorProfileResponse Int
pHttpStatus_ =
  CreateConnectorProfileResponse' :: Maybe Text -> Int -> CreateConnectorProfileResponse
CreateConnectorProfileResponse'
    { $sel:connectorProfileArn:CreateConnectorProfileResponse' :: Maybe Text
connectorProfileArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateConnectorProfileResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

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

instance
  Prelude.NFData
    CreateConnectorProfileResponse