{-# 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.AppIntegrationS.CreateEventIntegration
-- 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 an EventIntegration, given a specified name, description, and a
-- reference to an Amazon EventBridge bus in your account and a partner
-- event source that pushes events to that bus. No objects are created in
-- the your account, only metadata that is persisted on the
-- EventIntegration control plane.
module Amazonka.AppIntegrationS.CreateEventIntegration
  ( -- * Creating a Request
    CreateEventIntegration (..),
    newCreateEventIntegration,

    -- * Request Lenses
    createEventIntegration_clientToken,
    createEventIntegration_description,
    createEventIntegration_tags,
    createEventIntegration_name,
    createEventIntegration_eventFilter,
    createEventIntegration_eventBridgeBus,

    -- * Destructuring the Response
    CreateEventIntegrationResponse (..),
    newCreateEventIntegrationResponse,

    -- * Response Lenses
    createEventIntegrationResponse_eventIntegrationArn,
    createEventIntegrationResponse_httpStatus,
  )
where

import Amazonka.AppIntegrationS.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newCreateEventIntegration' smart constructor.
data CreateEventIntegration = CreateEventIntegration'
  { -- | A unique, case-sensitive identifier that you provide to ensure the
    -- idempotency of the request.
    CreateEventIntegration -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
    -- | The description of the event integration.
    CreateEventIntegration -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | One or more tags.
    CreateEventIntegration -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The name of the event integration.
    CreateEventIntegration -> Text
name :: Prelude.Text,
    -- | The event filter.
    CreateEventIntegration -> EventFilter
eventFilter :: EventFilter,
    -- | The EventBridge bus.
    CreateEventIntegration -> Text
eventBridgeBus :: Prelude.Text
  }
  deriving (CreateEventIntegration -> CreateEventIntegration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateEventIntegration -> CreateEventIntegration -> Bool
$c/= :: CreateEventIntegration -> CreateEventIntegration -> Bool
== :: CreateEventIntegration -> CreateEventIntegration -> Bool
$c== :: CreateEventIntegration -> CreateEventIntegration -> Bool
Prelude.Eq, ReadPrec [CreateEventIntegration]
ReadPrec CreateEventIntegration
Int -> ReadS CreateEventIntegration
ReadS [CreateEventIntegration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateEventIntegration]
$creadListPrec :: ReadPrec [CreateEventIntegration]
readPrec :: ReadPrec CreateEventIntegration
$creadPrec :: ReadPrec CreateEventIntegration
readList :: ReadS [CreateEventIntegration]
$creadList :: ReadS [CreateEventIntegration]
readsPrec :: Int -> ReadS CreateEventIntegration
$creadsPrec :: Int -> ReadS CreateEventIntegration
Prelude.Read, Int -> CreateEventIntegration -> ShowS
[CreateEventIntegration] -> ShowS
CreateEventIntegration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateEventIntegration] -> ShowS
$cshowList :: [CreateEventIntegration] -> ShowS
show :: CreateEventIntegration -> String
$cshow :: CreateEventIntegration -> String
showsPrec :: Int -> CreateEventIntegration -> ShowS
$cshowsPrec :: Int -> CreateEventIntegration -> ShowS
Prelude.Show, forall x. Rep CreateEventIntegration x -> CreateEventIntegration
forall x. CreateEventIntegration -> Rep CreateEventIntegration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateEventIntegration x -> CreateEventIntegration
$cfrom :: forall x. CreateEventIntegration -> Rep CreateEventIntegration x
Prelude.Generic)

-- |
-- Create a value of 'CreateEventIntegration' 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:
--
-- 'clientToken', 'createEventIntegration_clientToken' - A unique, case-sensitive identifier that you provide to ensure the
-- idempotency of the request.
--
-- 'description', 'createEventIntegration_description' - The description of the event integration.
--
-- 'tags', 'createEventIntegration_tags' - One or more tags.
--
-- 'name', 'createEventIntegration_name' - The name of the event integration.
--
-- 'eventFilter', 'createEventIntegration_eventFilter' - The event filter.
--
-- 'eventBridgeBus', 'createEventIntegration_eventBridgeBus' - The EventBridge bus.
newCreateEventIntegration ::
  -- | 'name'
  Prelude.Text ->
  -- | 'eventFilter'
  EventFilter ->
  -- | 'eventBridgeBus'
  Prelude.Text ->
  CreateEventIntegration
newCreateEventIntegration :: Text -> EventFilter -> Text -> CreateEventIntegration
newCreateEventIntegration
  Text
pName_
  EventFilter
pEventFilter_
  Text
pEventBridgeBus_ =
    CreateEventIntegration'
      { $sel:clientToken:CreateEventIntegration' :: Maybe Text
clientToken =
          forall a. Maybe a
Prelude.Nothing,
        $sel:description:CreateEventIntegration' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
        $sel:tags:CreateEventIntegration' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing,
        $sel:name:CreateEventIntegration' :: Text
name = Text
pName_,
        $sel:eventFilter:CreateEventIntegration' :: EventFilter
eventFilter = EventFilter
pEventFilter_,
        $sel:eventBridgeBus:CreateEventIntegration' :: Text
eventBridgeBus = Text
pEventBridgeBus_
      }

-- | A unique, case-sensitive identifier that you provide to ensure the
-- idempotency of the request.
createEventIntegration_clientToken :: Lens.Lens' CreateEventIntegration (Prelude.Maybe Prelude.Text)
createEventIntegration_clientToken :: Lens' CreateEventIntegration (Maybe Text)
createEventIntegration_clientToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEventIntegration' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:CreateEventIntegration' :: CreateEventIntegration -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: CreateEventIntegration
s@CreateEventIntegration' {} Maybe Text
a -> CreateEventIntegration
s {$sel:clientToken:CreateEventIntegration' :: Maybe Text
clientToken = Maybe Text
a} :: CreateEventIntegration)

-- | The description of the event integration.
createEventIntegration_description :: Lens.Lens' CreateEventIntegration (Prelude.Maybe Prelude.Text)
createEventIntegration_description :: Lens' CreateEventIntegration (Maybe Text)
createEventIntegration_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEventIntegration' {Maybe Text
description :: Maybe Text
$sel:description:CreateEventIntegration' :: CreateEventIntegration -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateEventIntegration
s@CreateEventIntegration' {} Maybe Text
a -> CreateEventIntegration
s {$sel:description:CreateEventIntegration' :: Maybe Text
description = Maybe Text
a} :: CreateEventIntegration)

-- | One or more tags.
createEventIntegration_tags :: Lens.Lens' CreateEventIntegration (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createEventIntegration_tags :: Lens' CreateEventIntegration (Maybe (HashMap Text Text))
createEventIntegration_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEventIntegration' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateEventIntegration' :: CreateEventIntegration -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateEventIntegration
s@CreateEventIntegration' {} Maybe (HashMap Text Text)
a -> CreateEventIntegration
s {$sel:tags:CreateEventIntegration' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateEventIntegration) 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 name of the event integration.
createEventIntegration_name :: Lens.Lens' CreateEventIntegration Prelude.Text
createEventIntegration_name :: Lens' CreateEventIntegration Text
createEventIntegration_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEventIntegration' {Text
name :: Text
$sel:name:CreateEventIntegration' :: CreateEventIntegration -> Text
name} -> Text
name) (\s :: CreateEventIntegration
s@CreateEventIntegration' {} Text
a -> CreateEventIntegration
s {$sel:name:CreateEventIntegration' :: Text
name = Text
a} :: CreateEventIntegration)

-- | The event filter.
createEventIntegration_eventFilter :: Lens.Lens' CreateEventIntegration EventFilter
createEventIntegration_eventFilter :: Lens' CreateEventIntegration EventFilter
createEventIntegration_eventFilter = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEventIntegration' {EventFilter
eventFilter :: EventFilter
$sel:eventFilter:CreateEventIntegration' :: CreateEventIntegration -> EventFilter
eventFilter} -> EventFilter
eventFilter) (\s :: CreateEventIntegration
s@CreateEventIntegration' {} EventFilter
a -> CreateEventIntegration
s {$sel:eventFilter:CreateEventIntegration' :: EventFilter
eventFilter = EventFilter
a} :: CreateEventIntegration)

-- | The EventBridge bus.
createEventIntegration_eventBridgeBus :: Lens.Lens' CreateEventIntegration Prelude.Text
createEventIntegration_eventBridgeBus :: Lens' CreateEventIntegration Text
createEventIntegration_eventBridgeBus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEventIntegration' {Text
eventBridgeBus :: Text
$sel:eventBridgeBus:CreateEventIntegration' :: CreateEventIntegration -> Text
eventBridgeBus} -> Text
eventBridgeBus) (\s :: CreateEventIntegration
s@CreateEventIntegration' {} Text
a -> CreateEventIntegration
s {$sel:eventBridgeBus:CreateEventIntegration' :: Text
eventBridgeBus = Text
a} :: CreateEventIntegration)

instance Core.AWSRequest CreateEventIntegration where
  type
    AWSResponse CreateEventIntegration =
      CreateEventIntegrationResponse
  request :: (Service -> Service)
-> CreateEventIntegration -> Request CreateEventIntegration
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 CreateEventIntegration
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateEventIntegration)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text -> Int -> CreateEventIntegrationResponse
CreateEventIntegrationResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"EventIntegrationArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable CreateEventIntegration where
  hashWithSalt :: Int -> CreateEventIntegration -> Int
hashWithSalt Int
_salt CreateEventIntegration' {Maybe Text
Maybe (HashMap Text Text)
Text
EventFilter
eventBridgeBus :: Text
eventFilter :: EventFilter
name :: Text
tags :: Maybe (HashMap Text Text)
description :: Maybe Text
clientToken :: Maybe Text
$sel:eventBridgeBus:CreateEventIntegration' :: CreateEventIntegration -> Text
$sel:eventFilter:CreateEventIntegration' :: CreateEventIntegration -> EventFilter
$sel:name:CreateEventIntegration' :: CreateEventIntegration -> Text
$sel:tags:CreateEventIntegration' :: CreateEventIntegration -> Maybe (HashMap Text Text)
$sel:description:CreateEventIntegration' :: CreateEventIntegration -> Maybe Text
$sel:clientToken:CreateEventIntegration' :: CreateEventIntegration -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clientToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` EventFilter
eventFilter
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
eventBridgeBus

instance Prelude.NFData CreateEventIntegration where
  rnf :: CreateEventIntegration -> ()
rnf CreateEventIntegration' {Maybe Text
Maybe (HashMap Text Text)
Text
EventFilter
eventBridgeBus :: Text
eventFilter :: EventFilter
name :: Text
tags :: Maybe (HashMap Text Text)
description :: Maybe Text
clientToken :: Maybe Text
$sel:eventBridgeBus:CreateEventIntegration' :: CreateEventIntegration -> Text
$sel:eventFilter:CreateEventIntegration' :: CreateEventIntegration -> EventFilter
$sel:name:CreateEventIntegration' :: CreateEventIntegration -> Text
$sel:tags:CreateEventIntegration' :: CreateEventIntegration -> Maybe (HashMap Text Text)
$sel:description:CreateEventIntegration' :: CreateEventIntegration -> Maybe Text
$sel:clientToken:CreateEventIntegration' :: CreateEventIntegration -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clientToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf EventFilter
eventFilter
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
eventBridgeBus

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

instance Data.ToJSON CreateEventIntegration where
  toJSON :: CreateEventIntegration -> Value
toJSON CreateEventIntegration' {Maybe Text
Maybe (HashMap Text Text)
Text
EventFilter
eventBridgeBus :: Text
eventFilter :: EventFilter
name :: Text
tags :: Maybe (HashMap Text Text)
description :: Maybe Text
clientToken :: Maybe Text
$sel:eventBridgeBus:CreateEventIntegration' :: CreateEventIntegration -> Text
$sel:eventFilter:CreateEventIntegration' :: CreateEventIntegration -> EventFilter
$sel:name:CreateEventIntegration' :: CreateEventIntegration -> Text
$sel:tags:CreateEventIntegration' :: CreateEventIntegration -> Maybe (HashMap Text Text)
$sel:description:CreateEventIntegration' :: CreateEventIntegration -> Maybe Text
$sel:clientToken:CreateEventIntegration' :: CreateEventIntegration -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"ClientToken" 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
clientToken,
            (Key
"Description" 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
description,
            (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 (HashMap Text Text)
tags,
            forall a. a -> Maybe a
Prelude.Just (Key
"Name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
name),
            forall a. a -> Maybe a
Prelude.Just (Key
"EventFilter" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= EventFilter
eventFilter),
            forall a. a -> Maybe a
Prelude.Just
              (Key
"EventBridgeBus" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
eventBridgeBus)
          ]
      )

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

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

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

-- |
-- Create a value of 'CreateEventIntegrationResponse' 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:
--
-- 'eventIntegrationArn', 'createEventIntegrationResponse_eventIntegrationArn' - The Amazon Resource Name (ARN) of the event integration.
--
-- 'httpStatus', 'createEventIntegrationResponse_httpStatus' - The response's http status code.
newCreateEventIntegrationResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateEventIntegrationResponse
newCreateEventIntegrationResponse :: Int -> CreateEventIntegrationResponse
newCreateEventIntegrationResponse Int
pHttpStatus_ =
  CreateEventIntegrationResponse'
    { $sel:eventIntegrationArn:CreateEventIntegrationResponse' :: Maybe Text
eventIntegrationArn =
        forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateEventIntegrationResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The Amazon Resource Name (ARN) of the event integration.
createEventIntegrationResponse_eventIntegrationArn :: Lens.Lens' CreateEventIntegrationResponse (Prelude.Maybe Prelude.Text)
createEventIntegrationResponse_eventIntegrationArn :: Lens' CreateEventIntegrationResponse (Maybe Text)
createEventIntegrationResponse_eventIntegrationArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEventIntegrationResponse' {Maybe Text
eventIntegrationArn :: Maybe Text
$sel:eventIntegrationArn:CreateEventIntegrationResponse' :: CreateEventIntegrationResponse -> Maybe Text
eventIntegrationArn} -> Maybe Text
eventIntegrationArn) (\s :: CreateEventIntegrationResponse
s@CreateEventIntegrationResponse' {} Maybe Text
a -> CreateEventIntegrationResponse
s {$sel:eventIntegrationArn:CreateEventIntegrationResponse' :: Maybe Text
eventIntegrationArn = Maybe Text
a} :: CreateEventIntegrationResponse)

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

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