{-# 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.Transfer.CreateConnector
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates the connector, which captures the parameters for an outbound
-- connection for the AS2 protocol. The connector is required for sending
-- files to an externally hosted AS2 server. For more details about
-- connectors, see
-- <https://docs.aws.amazon.com/transfer/latest/userguide/create-b2b-server.html#configure-as2-connector Create AS2 connectors>.
module Amazonka.Transfer.CreateConnector
  ( -- * Creating a Request
    CreateConnector (..),
    newCreateConnector,

    -- * Request Lenses
    createConnector_loggingRole,
    createConnector_tags,
    createConnector_url,
    createConnector_as2Config,
    createConnector_accessRole,

    -- * Destructuring the Response
    CreateConnectorResponse (..),
    newCreateConnectorResponse,

    -- * Response Lenses
    createConnectorResponse_httpStatus,
    createConnectorResponse_connectorId,
  )
where

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

-- | /See:/ 'newCreateConnector' smart constructor.
data CreateConnector = CreateConnector'
  { -- | The Amazon Resource Name (ARN) of the Identity and Access Management
    -- (IAM) role that allows a connector to turn on CloudWatch logging for
    -- Amazon S3 events. When set, you can view connector activity in your
    -- CloudWatch logs.
    CreateConnector -> Maybe Text
loggingRole :: Prelude.Maybe Prelude.Text,
    -- | Key-value pairs that can be used to group and search for connectors.
    -- Tags are metadata attached to connectors for any purpose.
    CreateConnector -> Maybe (NonEmpty Tag)
tags :: Prelude.Maybe (Prelude.NonEmpty Tag),
    -- | The URL of the partner\'s AS2 endpoint.
    CreateConnector -> Text
url :: Prelude.Text,
    -- | A structure that contains the parameters for a connector object.
    CreateConnector -> As2ConnectorConfig
as2Config :: As2ConnectorConfig,
    -- | With AS2, you can send files by calling @StartFileTransfer@ and
    -- specifying the file paths in the request parameter, @SendFilePaths@. We
    -- use the file’s parent directory (for example, for
    -- @--send-file-paths \/bucket\/dir\/file.txt@, parent directory is
    -- @\/bucket\/dir\/@) to temporarily store a processed AS2 message file,
    -- store the MDN when we receive them from the partner, and write a final
    -- JSON file containing relevant metadata of the transmission. So, the
    -- @AccessRole@ needs to provide read and write access to the parent
    -- directory of the file location used in the @StartFileTransfer@ request.
    -- Additionally, you need to provide read and write access to the parent
    -- directory of the files that you intend to send with @StartFileTransfer@.
    CreateConnector -> Text
accessRole :: Prelude.Text
  }
  deriving (CreateConnector -> CreateConnector -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateConnector -> CreateConnector -> Bool
$c/= :: CreateConnector -> CreateConnector -> Bool
== :: CreateConnector -> CreateConnector -> Bool
$c== :: CreateConnector -> CreateConnector -> Bool
Prelude.Eq, ReadPrec [CreateConnector]
ReadPrec CreateConnector
Int -> ReadS CreateConnector
ReadS [CreateConnector]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateConnector]
$creadListPrec :: ReadPrec [CreateConnector]
readPrec :: ReadPrec CreateConnector
$creadPrec :: ReadPrec CreateConnector
readList :: ReadS [CreateConnector]
$creadList :: ReadS [CreateConnector]
readsPrec :: Int -> ReadS CreateConnector
$creadsPrec :: Int -> ReadS CreateConnector
Prelude.Read, Int -> CreateConnector -> ShowS
[CreateConnector] -> ShowS
CreateConnector -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateConnector] -> ShowS
$cshowList :: [CreateConnector] -> ShowS
show :: CreateConnector -> String
$cshow :: CreateConnector -> String
showsPrec :: Int -> CreateConnector -> ShowS
$cshowsPrec :: Int -> CreateConnector -> ShowS
Prelude.Show, forall x. Rep CreateConnector x -> CreateConnector
forall x. CreateConnector -> Rep CreateConnector x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateConnector x -> CreateConnector
$cfrom :: forall x. CreateConnector -> Rep CreateConnector x
Prelude.Generic)

-- |
-- Create a value of 'CreateConnector' 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:
--
-- 'loggingRole', 'createConnector_loggingRole' - The Amazon Resource Name (ARN) of the Identity and Access Management
-- (IAM) role that allows a connector to turn on CloudWatch logging for
-- Amazon S3 events. When set, you can view connector activity in your
-- CloudWatch logs.
--
-- 'tags', 'createConnector_tags' - Key-value pairs that can be used to group and search for connectors.
-- Tags are metadata attached to connectors for any purpose.
--
-- 'url', 'createConnector_url' - The URL of the partner\'s AS2 endpoint.
--
-- 'as2Config', 'createConnector_as2Config' - A structure that contains the parameters for a connector object.
--
-- 'accessRole', 'createConnector_accessRole' - With AS2, you can send files by calling @StartFileTransfer@ and
-- specifying the file paths in the request parameter, @SendFilePaths@. We
-- use the file’s parent directory (for example, for
-- @--send-file-paths \/bucket\/dir\/file.txt@, parent directory is
-- @\/bucket\/dir\/@) to temporarily store a processed AS2 message file,
-- store the MDN when we receive them from the partner, and write a final
-- JSON file containing relevant metadata of the transmission. So, the
-- @AccessRole@ needs to provide read and write access to the parent
-- directory of the file location used in the @StartFileTransfer@ request.
-- Additionally, you need to provide read and write access to the parent
-- directory of the files that you intend to send with @StartFileTransfer@.
newCreateConnector ::
  -- | 'url'
  Prelude.Text ->
  -- | 'as2Config'
  As2ConnectorConfig ->
  -- | 'accessRole'
  Prelude.Text ->
  CreateConnector
newCreateConnector :: Text -> As2ConnectorConfig -> Text -> CreateConnector
newCreateConnector Text
pUrl_ As2ConnectorConfig
pAs2Config_ Text
pAccessRole_ =
  CreateConnector'
    { $sel:loggingRole:CreateConnector' :: Maybe Text
loggingRole = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateConnector' :: Maybe (NonEmpty Tag)
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:url:CreateConnector' :: Text
url = Text
pUrl_,
      $sel:as2Config:CreateConnector' :: As2ConnectorConfig
as2Config = As2ConnectorConfig
pAs2Config_,
      $sel:accessRole:CreateConnector' :: Text
accessRole = Text
pAccessRole_
    }

-- | The Amazon Resource Name (ARN) of the Identity and Access Management
-- (IAM) role that allows a connector to turn on CloudWatch logging for
-- Amazon S3 events. When set, you can view connector activity in your
-- CloudWatch logs.
createConnector_loggingRole :: Lens.Lens' CreateConnector (Prelude.Maybe Prelude.Text)
createConnector_loggingRole :: Lens' CreateConnector (Maybe Text)
createConnector_loggingRole = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConnector' {Maybe Text
loggingRole :: Maybe Text
$sel:loggingRole:CreateConnector' :: CreateConnector -> Maybe Text
loggingRole} -> Maybe Text
loggingRole) (\s :: CreateConnector
s@CreateConnector' {} Maybe Text
a -> CreateConnector
s {$sel:loggingRole:CreateConnector' :: Maybe Text
loggingRole = Maybe Text
a} :: CreateConnector)

-- | Key-value pairs that can be used to group and search for connectors.
-- Tags are metadata attached to connectors for any purpose.
createConnector_tags :: Lens.Lens' CreateConnector (Prelude.Maybe (Prelude.NonEmpty Tag))
createConnector_tags :: Lens' CreateConnector (Maybe (NonEmpty Tag))
createConnector_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConnector' {Maybe (NonEmpty Tag)
tags :: Maybe (NonEmpty Tag)
$sel:tags:CreateConnector' :: CreateConnector -> Maybe (NonEmpty Tag)
tags} -> Maybe (NonEmpty Tag)
tags) (\s :: CreateConnector
s@CreateConnector' {} Maybe (NonEmpty Tag)
a -> CreateConnector
s {$sel:tags:CreateConnector' :: Maybe (NonEmpty Tag)
tags = Maybe (NonEmpty Tag)
a} :: CreateConnector) 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 URL of the partner\'s AS2 endpoint.
createConnector_url :: Lens.Lens' CreateConnector Prelude.Text
createConnector_url :: Lens' CreateConnector Text
createConnector_url = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConnector' {Text
url :: Text
$sel:url:CreateConnector' :: CreateConnector -> Text
url} -> Text
url) (\s :: CreateConnector
s@CreateConnector' {} Text
a -> CreateConnector
s {$sel:url:CreateConnector' :: Text
url = Text
a} :: CreateConnector)

-- | A structure that contains the parameters for a connector object.
createConnector_as2Config :: Lens.Lens' CreateConnector As2ConnectorConfig
createConnector_as2Config :: Lens' CreateConnector As2ConnectorConfig
createConnector_as2Config = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConnector' {As2ConnectorConfig
as2Config :: As2ConnectorConfig
$sel:as2Config:CreateConnector' :: CreateConnector -> As2ConnectorConfig
as2Config} -> As2ConnectorConfig
as2Config) (\s :: CreateConnector
s@CreateConnector' {} As2ConnectorConfig
a -> CreateConnector
s {$sel:as2Config:CreateConnector' :: As2ConnectorConfig
as2Config = As2ConnectorConfig
a} :: CreateConnector)

-- | With AS2, you can send files by calling @StartFileTransfer@ and
-- specifying the file paths in the request parameter, @SendFilePaths@. We
-- use the file’s parent directory (for example, for
-- @--send-file-paths \/bucket\/dir\/file.txt@, parent directory is
-- @\/bucket\/dir\/@) to temporarily store a processed AS2 message file,
-- store the MDN when we receive them from the partner, and write a final
-- JSON file containing relevant metadata of the transmission. So, the
-- @AccessRole@ needs to provide read and write access to the parent
-- directory of the file location used in the @StartFileTransfer@ request.
-- Additionally, you need to provide read and write access to the parent
-- directory of the files that you intend to send with @StartFileTransfer@.
createConnector_accessRole :: Lens.Lens' CreateConnector Prelude.Text
createConnector_accessRole :: Lens' CreateConnector Text
createConnector_accessRole = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConnector' {Text
accessRole :: Text
$sel:accessRole:CreateConnector' :: CreateConnector -> Text
accessRole} -> Text
accessRole) (\s :: CreateConnector
s@CreateConnector' {} Text
a -> CreateConnector
s {$sel:accessRole:CreateConnector' :: Text
accessRole = Text
a} :: CreateConnector)

instance Core.AWSRequest CreateConnector where
  type
    AWSResponse CreateConnector =
      CreateConnectorResponse
  request :: (Service -> Service) -> CreateConnector -> Request CreateConnector
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 CreateConnector
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateConnector)))
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 ->
          Int -> Text -> CreateConnectorResponse
CreateConnectorResponse'
            forall (f :: * -> *) a b. Functor 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))
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"ConnectorId")
      )

instance Prelude.Hashable CreateConnector where
  hashWithSalt :: Int -> CreateConnector -> Int
hashWithSalt Int
_salt CreateConnector' {Maybe (NonEmpty Tag)
Maybe Text
Text
As2ConnectorConfig
accessRole :: Text
as2Config :: As2ConnectorConfig
url :: Text
tags :: Maybe (NonEmpty Tag)
loggingRole :: Maybe Text
$sel:accessRole:CreateConnector' :: CreateConnector -> Text
$sel:as2Config:CreateConnector' :: CreateConnector -> As2ConnectorConfig
$sel:url:CreateConnector' :: CreateConnector -> Text
$sel:tags:CreateConnector' :: CreateConnector -> Maybe (NonEmpty Tag)
$sel:loggingRole:CreateConnector' :: CreateConnector -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
loggingRole
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty Tag)
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
url
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` As2ConnectorConfig
as2Config
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
accessRole

instance Prelude.NFData CreateConnector where
  rnf :: CreateConnector -> ()
rnf CreateConnector' {Maybe (NonEmpty Tag)
Maybe Text
Text
As2ConnectorConfig
accessRole :: Text
as2Config :: As2ConnectorConfig
url :: Text
tags :: Maybe (NonEmpty Tag)
loggingRole :: Maybe Text
$sel:accessRole:CreateConnector' :: CreateConnector -> Text
$sel:as2Config:CreateConnector' :: CreateConnector -> As2ConnectorConfig
$sel:url:CreateConnector' :: CreateConnector -> Text
$sel:tags:CreateConnector' :: CreateConnector -> Maybe (NonEmpty Tag)
$sel:loggingRole:CreateConnector' :: CreateConnector -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
loggingRole
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty Tag)
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
url
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf As2ConnectorConfig
as2Config
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
accessRole

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

instance Data.ToJSON CreateConnector where
  toJSON :: CreateConnector -> Value
toJSON CreateConnector' {Maybe (NonEmpty Tag)
Maybe Text
Text
As2ConnectorConfig
accessRole :: Text
as2Config :: As2ConnectorConfig
url :: Text
tags :: Maybe (NonEmpty Tag)
loggingRole :: Maybe Text
$sel:accessRole:CreateConnector' :: CreateConnector -> Text
$sel:as2Config:CreateConnector' :: CreateConnector -> As2ConnectorConfig
$sel:url:CreateConnector' :: CreateConnector -> Text
$sel:tags:CreateConnector' :: CreateConnector -> Maybe (NonEmpty Tag)
$sel:loggingRole:CreateConnector' :: CreateConnector -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"LoggingRole" 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
loggingRole,
            (Key
"Tags" 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 (NonEmpty Tag)
tags,
            forall a. a -> Maybe a
Prelude.Just (Key
"Url" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
url),
            forall a. a -> Maybe a
Prelude.Just (Key
"As2Config" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= As2ConnectorConfig
as2Config),
            forall a. a -> Maybe a
Prelude.Just (Key
"AccessRole" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
accessRole)
          ]
      )

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

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

-- | /See:/ 'newCreateConnectorResponse' smart constructor.
data CreateConnectorResponse = CreateConnectorResponse'
  { -- | The response's http status code.
    CreateConnectorResponse -> Int
httpStatus :: Prelude.Int,
    -- | The unique identifier for the connector, returned after the API call
    -- succeeds.
    CreateConnectorResponse -> Text
connectorId :: Prelude.Text
  }
  deriving (CreateConnectorResponse -> CreateConnectorResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateConnectorResponse -> CreateConnectorResponse -> Bool
$c/= :: CreateConnectorResponse -> CreateConnectorResponse -> Bool
== :: CreateConnectorResponse -> CreateConnectorResponse -> Bool
$c== :: CreateConnectorResponse -> CreateConnectorResponse -> Bool
Prelude.Eq, ReadPrec [CreateConnectorResponse]
ReadPrec CreateConnectorResponse
Int -> ReadS CreateConnectorResponse
ReadS [CreateConnectorResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateConnectorResponse]
$creadListPrec :: ReadPrec [CreateConnectorResponse]
readPrec :: ReadPrec CreateConnectorResponse
$creadPrec :: ReadPrec CreateConnectorResponse
readList :: ReadS [CreateConnectorResponse]
$creadList :: ReadS [CreateConnectorResponse]
readsPrec :: Int -> ReadS CreateConnectorResponse
$creadsPrec :: Int -> ReadS CreateConnectorResponse
Prelude.Read, Int -> CreateConnectorResponse -> ShowS
[CreateConnectorResponse] -> ShowS
CreateConnectorResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateConnectorResponse] -> ShowS
$cshowList :: [CreateConnectorResponse] -> ShowS
show :: CreateConnectorResponse -> String
$cshow :: CreateConnectorResponse -> String
showsPrec :: Int -> CreateConnectorResponse -> ShowS
$cshowsPrec :: Int -> CreateConnectorResponse -> ShowS
Prelude.Show, forall x. Rep CreateConnectorResponse x -> CreateConnectorResponse
forall x. CreateConnectorResponse -> Rep CreateConnectorResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateConnectorResponse x -> CreateConnectorResponse
$cfrom :: forall x. CreateConnectorResponse -> Rep CreateConnectorResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateConnectorResponse' 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:
--
-- 'httpStatus', 'createConnectorResponse_httpStatus' - The response's http status code.
--
-- 'connectorId', 'createConnectorResponse_connectorId' - The unique identifier for the connector, returned after the API call
-- succeeds.
newCreateConnectorResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'connectorId'
  Prelude.Text ->
  CreateConnectorResponse
newCreateConnectorResponse :: Int -> Text -> CreateConnectorResponse
newCreateConnectorResponse Int
pHttpStatus_ Text
pConnectorId_ =
  CreateConnectorResponse'
    { $sel:httpStatus:CreateConnectorResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:connectorId:CreateConnectorResponse' :: Text
connectorId = Text
pConnectorId_
    }

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

-- | The unique identifier for the connector, returned after the API call
-- succeeds.
createConnectorResponse_connectorId :: Lens.Lens' CreateConnectorResponse Prelude.Text
createConnectorResponse_connectorId :: Lens' CreateConnectorResponse Text
createConnectorResponse_connectorId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConnectorResponse' {Text
connectorId :: Text
$sel:connectorId:CreateConnectorResponse' :: CreateConnectorResponse -> Text
connectorId} -> Text
connectorId) (\s :: CreateConnectorResponse
s@CreateConnectorResponse' {} Text
a -> CreateConnectorResponse
s {$sel:connectorId:CreateConnectorResponse' :: Text
connectorId = Text
a} :: CreateConnectorResponse)

instance Prelude.NFData CreateConnectorResponse where
  rnf :: CreateConnectorResponse -> ()
rnf CreateConnectorResponse' {Int
Text
connectorId :: Text
httpStatus :: Int
$sel:connectorId:CreateConnectorResponse' :: CreateConnectorResponse -> Text
$sel:httpStatus:CreateConnectorResponse' :: CreateConnectorResponse -> Int
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
connectorId