{-# 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.KinesisAnalytics.AddApplicationReferenceDataSource
-- 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)
--
-- This documentation is for version 1 of the Amazon Kinesis Data Analytics
-- API, which only supports SQL applications. Version 2 of the API supports
-- SQL and Java applications. For more information about version 2, see
-- </kinesisanalytics/latest/apiv2/Welcome.html Amazon Kinesis Data Analytics API V2 Documentation>.
--
-- Adds a reference data source to an existing application.
--
-- Amazon Kinesis Analytics reads reference data (that is, an Amazon S3
-- object) and creates an in-application table within your application. In
-- the request, you provide the source (S3 bucket name and object key
-- name), name of the in-application table to create, and the necessary
-- mapping information that describes how data in Amazon S3 object maps to
-- columns in the resulting in-application table.
--
-- For conceptual information, see
-- <https://docs.aws.amazon.com/kinesisanalytics/latest/dev/how-it-works-input.html Configuring Application Input>.
-- For the limits on data sources you can add to your application, see
-- <https://docs.aws.amazon.com/kinesisanalytics/latest/dev/limits.html Limits>.
--
-- This operation requires permissions to perform the
-- @kinesisanalytics:AddApplicationOutput@ action.
module Amazonka.KinesisAnalytics.AddApplicationReferenceDataSource
  ( -- * Creating a Request
    AddApplicationReferenceDataSource (..),
    newAddApplicationReferenceDataSource,

    -- * Request Lenses
    addApplicationReferenceDataSource_applicationName,
    addApplicationReferenceDataSource_currentApplicationVersionId,
    addApplicationReferenceDataSource_referenceDataSource,

    -- * Destructuring the Response
    AddApplicationReferenceDataSourceResponse (..),
    newAddApplicationReferenceDataSourceResponse,

    -- * Response Lenses
    addApplicationReferenceDataSourceResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.KinesisAnalytics.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:/ 'newAddApplicationReferenceDataSource' smart constructor.
data AddApplicationReferenceDataSource = AddApplicationReferenceDataSource'
  { -- | Name of an existing application.
    AddApplicationReferenceDataSource -> Text
applicationName :: Prelude.Text,
    -- | Version of the application for which you are adding the reference data
    -- source. You can use the
    -- <https://docs.aws.amazon.com/kinesisanalytics/latest/dev/API_DescribeApplication.html DescribeApplication>
    -- operation to get the current application version. If the version
    -- specified is not the current version, the
    -- @ConcurrentModificationException@ is returned.
    AddApplicationReferenceDataSource -> Natural
currentApplicationVersionId :: Prelude.Natural,
    -- | The reference data source can be an object in your Amazon S3 bucket.
    -- Amazon Kinesis Analytics reads the object and copies the data into the
    -- in-application table that is created. You provide an S3 bucket, object
    -- key name, and the resulting in-application table that is created. You
    -- must also provide an IAM role with the necessary permissions that Amazon
    -- Kinesis Analytics can assume to read the object from your S3 bucket on
    -- your behalf.
    AddApplicationReferenceDataSource -> ReferenceDataSource
referenceDataSource :: ReferenceDataSource
  }
  deriving (AddApplicationReferenceDataSource
-> AddApplicationReferenceDataSource -> Bool
(AddApplicationReferenceDataSource
 -> AddApplicationReferenceDataSource -> Bool)
-> (AddApplicationReferenceDataSource
    -> AddApplicationReferenceDataSource -> Bool)
-> Eq AddApplicationReferenceDataSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AddApplicationReferenceDataSource
-> AddApplicationReferenceDataSource -> Bool
$c/= :: AddApplicationReferenceDataSource
-> AddApplicationReferenceDataSource -> Bool
== :: AddApplicationReferenceDataSource
-> AddApplicationReferenceDataSource -> Bool
$c== :: AddApplicationReferenceDataSource
-> AddApplicationReferenceDataSource -> Bool
Prelude.Eq, ReadPrec [AddApplicationReferenceDataSource]
ReadPrec AddApplicationReferenceDataSource
Int -> ReadS AddApplicationReferenceDataSource
ReadS [AddApplicationReferenceDataSource]
(Int -> ReadS AddApplicationReferenceDataSource)
-> ReadS [AddApplicationReferenceDataSource]
-> ReadPrec AddApplicationReferenceDataSource
-> ReadPrec [AddApplicationReferenceDataSource]
-> Read AddApplicationReferenceDataSource
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AddApplicationReferenceDataSource]
$creadListPrec :: ReadPrec [AddApplicationReferenceDataSource]
readPrec :: ReadPrec AddApplicationReferenceDataSource
$creadPrec :: ReadPrec AddApplicationReferenceDataSource
readList :: ReadS [AddApplicationReferenceDataSource]
$creadList :: ReadS [AddApplicationReferenceDataSource]
readsPrec :: Int -> ReadS AddApplicationReferenceDataSource
$creadsPrec :: Int -> ReadS AddApplicationReferenceDataSource
Prelude.Read, Int -> AddApplicationReferenceDataSource -> ShowS
[AddApplicationReferenceDataSource] -> ShowS
AddApplicationReferenceDataSource -> String
(Int -> AddApplicationReferenceDataSource -> ShowS)
-> (AddApplicationReferenceDataSource -> String)
-> ([AddApplicationReferenceDataSource] -> ShowS)
-> Show AddApplicationReferenceDataSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AddApplicationReferenceDataSource] -> ShowS
$cshowList :: [AddApplicationReferenceDataSource] -> ShowS
show :: AddApplicationReferenceDataSource -> String
$cshow :: AddApplicationReferenceDataSource -> String
showsPrec :: Int -> AddApplicationReferenceDataSource -> ShowS
$cshowsPrec :: Int -> AddApplicationReferenceDataSource -> ShowS
Prelude.Show, (forall x.
 AddApplicationReferenceDataSource
 -> Rep AddApplicationReferenceDataSource x)
-> (forall x.
    Rep AddApplicationReferenceDataSource x
    -> AddApplicationReferenceDataSource)
-> Generic AddApplicationReferenceDataSource
forall x.
Rep AddApplicationReferenceDataSource x
-> AddApplicationReferenceDataSource
forall x.
AddApplicationReferenceDataSource
-> Rep AddApplicationReferenceDataSource x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AddApplicationReferenceDataSource x
-> AddApplicationReferenceDataSource
$cfrom :: forall x.
AddApplicationReferenceDataSource
-> Rep AddApplicationReferenceDataSource x
Prelude.Generic)

-- |
-- Create a value of 'AddApplicationReferenceDataSource' 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:
--
-- 'applicationName', 'addApplicationReferenceDataSource_applicationName' - Name of an existing application.
--
-- 'currentApplicationVersionId', 'addApplicationReferenceDataSource_currentApplicationVersionId' - Version of the application for which you are adding the reference data
-- source. You can use the
-- <https://docs.aws.amazon.com/kinesisanalytics/latest/dev/API_DescribeApplication.html DescribeApplication>
-- operation to get the current application version. If the version
-- specified is not the current version, the
-- @ConcurrentModificationException@ is returned.
--
-- 'referenceDataSource', 'addApplicationReferenceDataSource_referenceDataSource' - The reference data source can be an object in your Amazon S3 bucket.
-- Amazon Kinesis Analytics reads the object and copies the data into the
-- in-application table that is created. You provide an S3 bucket, object
-- key name, and the resulting in-application table that is created. You
-- must also provide an IAM role with the necessary permissions that Amazon
-- Kinesis Analytics can assume to read the object from your S3 bucket on
-- your behalf.
newAddApplicationReferenceDataSource ::
  -- | 'applicationName'
  Prelude.Text ->
  -- | 'currentApplicationVersionId'
  Prelude.Natural ->
  -- | 'referenceDataSource'
  ReferenceDataSource ->
  AddApplicationReferenceDataSource
newAddApplicationReferenceDataSource :: Text
-> Natural
-> ReferenceDataSource
-> AddApplicationReferenceDataSource
newAddApplicationReferenceDataSource
  Text
pApplicationName_
  Natural
pCurrentApplicationVersionId_
  ReferenceDataSource
pReferenceDataSource_ =
    AddApplicationReferenceDataSource' :: Text
-> Natural
-> ReferenceDataSource
-> AddApplicationReferenceDataSource
AddApplicationReferenceDataSource'
      { $sel:applicationName:AddApplicationReferenceDataSource' :: Text
applicationName =
          Text
pApplicationName_,
        $sel:currentApplicationVersionId:AddApplicationReferenceDataSource' :: Natural
currentApplicationVersionId =
          Natural
pCurrentApplicationVersionId_,
        $sel:referenceDataSource:AddApplicationReferenceDataSource' :: ReferenceDataSource
referenceDataSource =
          ReferenceDataSource
pReferenceDataSource_
      }

-- | Name of an existing application.
addApplicationReferenceDataSource_applicationName :: Lens.Lens' AddApplicationReferenceDataSource Prelude.Text
addApplicationReferenceDataSource_applicationName :: (Text -> f Text)
-> AddApplicationReferenceDataSource
-> f AddApplicationReferenceDataSource
addApplicationReferenceDataSource_applicationName = (AddApplicationReferenceDataSource -> Text)
-> (AddApplicationReferenceDataSource
    -> Text -> AddApplicationReferenceDataSource)
-> Lens
     AddApplicationReferenceDataSource
     AddApplicationReferenceDataSource
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddApplicationReferenceDataSource' {Text
applicationName :: Text
$sel:applicationName:AddApplicationReferenceDataSource' :: AddApplicationReferenceDataSource -> Text
applicationName} -> Text
applicationName) (\s :: AddApplicationReferenceDataSource
s@AddApplicationReferenceDataSource' {} Text
a -> AddApplicationReferenceDataSource
s {$sel:applicationName:AddApplicationReferenceDataSource' :: Text
applicationName = Text
a} :: AddApplicationReferenceDataSource)

-- | Version of the application for which you are adding the reference data
-- source. You can use the
-- <https://docs.aws.amazon.com/kinesisanalytics/latest/dev/API_DescribeApplication.html DescribeApplication>
-- operation to get the current application version. If the version
-- specified is not the current version, the
-- @ConcurrentModificationException@ is returned.
addApplicationReferenceDataSource_currentApplicationVersionId :: Lens.Lens' AddApplicationReferenceDataSource Prelude.Natural
addApplicationReferenceDataSource_currentApplicationVersionId :: (Natural -> f Natural)
-> AddApplicationReferenceDataSource
-> f AddApplicationReferenceDataSource
addApplicationReferenceDataSource_currentApplicationVersionId = (AddApplicationReferenceDataSource -> Natural)
-> (AddApplicationReferenceDataSource
    -> Natural -> AddApplicationReferenceDataSource)
-> Lens
     AddApplicationReferenceDataSource
     AddApplicationReferenceDataSource
     Natural
     Natural
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddApplicationReferenceDataSource' {Natural
currentApplicationVersionId :: Natural
$sel:currentApplicationVersionId:AddApplicationReferenceDataSource' :: AddApplicationReferenceDataSource -> Natural
currentApplicationVersionId} -> Natural
currentApplicationVersionId) (\s :: AddApplicationReferenceDataSource
s@AddApplicationReferenceDataSource' {} Natural
a -> AddApplicationReferenceDataSource
s {$sel:currentApplicationVersionId:AddApplicationReferenceDataSource' :: Natural
currentApplicationVersionId = Natural
a} :: AddApplicationReferenceDataSource)

-- | The reference data source can be an object in your Amazon S3 bucket.
-- Amazon Kinesis Analytics reads the object and copies the data into the
-- in-application table that is created. You provide an S3 bucket, object
-- key name, and the resulting in-application table that is created. You
-- must also provide an IAM role with the necessary permissions that Amazon
-- Kinesis Analytics can assume to read the object from your S3 bucket on
-- your behalf.
addApplicationReferenceDataSource_referenceDataSource :: Lens.Lens' AddApplicationReferenceDataSource ReferenceDataSource
addApplicationReferenceDataSource_referenceDataSource :: (ReferenceDataSource -> f ReferenceDataSource)
-> AddApplicationReferenceDataSource
-> f AddApplicationReferenceDataSource
addApplicationReferenceDataSource_referenceDataSource = (AddApplicationReferenceDataSource -> ReferenceDataSource)
-> (AddApplicationReferenceDataSource
    -> ReferenceDataSource -> AddApplicationReferenceDataSource)
-> Lens
     AddApplicationReferenceDataSource
     AddApplicationReferenceDataSource
     ReferenceDataSource
     ReferenceDataSource
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddApplicationReferenceDataSource' {ReferenceDataSource
referenceDataSource :: ReferenceDataSource
$sel:referenceDataSource:AddApplicationReferenceDataSource' :: AddApplicationReferenceDataSource -> ReferenceDataSource
referenceDataSource} -> ReferenceDataSource
referenceDataSource) (\s :: AddApplicationReferenceDataSource
s@AddApplicationReferenceDataSource' {} ReferenceDataSource
a -> AddApplicationReferenceDataSource
s {$sel:referenceDataSource:AddApplicationReferenceDataSource' :: ReferenceDataSource
referenceDataSource = ReferenceDataSource
a} :: AddApplicationReferenceDataSource)

instance
  Core.AWSRequest
    AddApplicationReferenceDataSource
  where
  type
    AWSResponse AddApplicationReferenceDataSource =
      AddApplicationReferenceDataSourceResponse
  request :: AddApplicationReferenceDataSource
-> Request AddApplicationReferenceDataSource
request = Service
-> AddApplicationReferenceDataSource
-> Request AddApplicationReferenceDataSource
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy AddApplicationReferenceDataSource
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse AddApplicationReferenceDataSource)))
response =
    (Int
 -> ResponseHeaders
 -> ()
 -> Either String (AWSResponse AddApplicationReferenceDataSource))
-> Logger
-> Service
-> Proxy AddApplicationReferenceDataSource
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse AddApplicationReferenceDataSource)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
      ( \Int
s ResponseHeaders
h ()
x ->
          Int -> AddApplicationReferenceDataSourceResponse
AddApplicationReferenceDataSourceResponse'
            (Int -> AddApplicationReferenceDataSourceResponse)
-> Either String Int
-> Either String AddApplicationReferenceDataSourceResponse
forall (f :: * -> *) a b. Functor 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
    AddApplicationReferenceDataSource

instance
  Prelude.NFData
    AddApplicationReferenceDataSource

instance
  Core.ToHeaders
    AddApplicationReferenceDataSource
  where
  toHeaders :: AddApplicationReferenceDataSource -> ResponseHeaders
toHeaders =
    ResponseHeaders
-> AddApplicationReferenceDataSource -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"KinesisAnalytics_20150814.AddApplicationReferenceDataSource" ::
                          Prelude.ByteString
                      ),
            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
    AddApplicationReferenceDataSource
  where
  toJSON :: AddApplicationReferenceDataSource -> Value
toJSON AddApplicationReferenceDataSource' {Natural
Text
ReferenceDataSource
referenceDataSource :: ReferenceDataSource
currentApplicationVersionId :: Natural
applicationName :: Text
$sel:referenceDataSource:AddApplicationReferenceDataSource' :: AddApplicationReferenceDataSource -> ReferenceDataSource
$sel:currentApplicationVersionId:AddApplicationReferenceDataSource' :: AddApplicationReferenceDataSource -> Natural
$sel:applicationName:AddApplicationReferenceDataSource' :: AddApplicationReferenceDataSource -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"ApplicationName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
applicationName),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"CurrentApplicationVersionId"
                  Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Natural
currentApplicationVersionId
              ),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"ReferenceDataSource" Text -> ReferenceDataSource -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ReferenceDataSource
referenceDataSource)
          ]
      )

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

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

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

-- |
-- Create a value of 'AddApplicationReferenceDataSourceResponse' 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', 'addApplicationReferenceDataSourceResponse_httpStatus' - The response's http status code.
newAddApplicationReferenceDataSourceResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  AddApplicationReferenceDataSourceResponse
newAddApplicationReferenceDataSourceResponse :: Int -> AddApplicationReferenceDataSourceResponse
newAddApplicationReferenceDataSourceResponse
  Int
pHttpStatus_ =
    AddApplicationReferenceDataSourceResponse' :: Int -> AddApplicationReferenceDataSourceResponse
AddApplicationReferenceDataSourceResponse'
      { $sel:httpStatus:AddApplicationReferenceDataSourceResponse' :: Int
httpStatus =
          Int
pHttpStatus_
      }

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

instance
  Prelude.NFData
    AddApplicationReferenceDataSourceResponse