{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE NoImplicitPrelude #-} {-# 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.Types.InputLambdaProcessorDescription -- Copyright : (c) 2013-2023 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay -- Stability : auto-generated -- Portability : non-portable (GHC extensions) module Amazonka.KinesisAnalytics.Types.InputLambdaProcessorDescription 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 -- | An object that contains the Amazon Resource Name (ARN) of the -- function that is used -- to preprocess records in the stream, and the ARN of the IAM role that is -- used to access the AWS Lambda expression. -- -- /See:/ 'newInputLambdaProcessorDescription' smart constructor. data InputLambdaProcessorDescription = InputLambdaProcessorDescription' { -- | The ARN of the function -- that is used to preprocess the records in the stream. resourceARN :: Prelude.Maybe Prelude.Text, -- | The ARN of the IAM role that is used to access the AWS Lambda function. roleARN :: Prelude.Maybe Prelude.Text } deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic) -- | -- Create a value of 'InputLambdaProcessorDescription' with all optional fields omitted. -- -- Use or to modify other optional fields. -- -- The following record fields are available, with the corresponding lenses provided -- for backwards compatibility: -- -- 'resourceARN', 'inputLambdaProcessorDescription_resourceARN' - The ARN of the function -- that is used to preprocess the records in the stream. -- -- 'roleARN', 'inputLambdaProcessorDescription_roleARN' - The ARN of the IAM role that is used to access the AWS Lambda function. newInputLambdaProcessorDescription :: InputLambdaProcessorDescription newInputLambdaProcessorDescription = InputLambdaProcessorDescription' { resourceARN = Prelude.Nothing, roleARN = Prelude.Nothing } -- | The ARN of the function -- that is used to preprocess the records in the stream. inputLambdaProcessorDescription_resourceARN :: Lens.Lens' InputLambdaProcessorDescription (Prelude.Maybe Prelude.Text) inputLambdaProcessorDescription_resourceARN = Lens.lens (\InputLambdaProcessorDescription' {resourceARN} -> resourceARN) (\s@InputLambdaProcessorDescription' {} a -> s {resourceARN = a} :: InputLambdaProcessorDescription) -- | The ARN of the IAM role that is used to access the AWS Lambda function. inputLambdaProcessorDescription_roleARN :: Lens.Lens' InputLambdaProcessorDescription (Prelude.Maybe Prelude.Text) inputLambdaProcessorDescription_roleARN = Lens.lens (\InputLambdaProcessorDescription' {roleARN} -> roleARN) (\s@InputLambdaProcessorDescription' {} a -> s {roleARN = a} :: InputLambdaProcessorDescription) instance Data.FromJSON InputLambdaProcessorDescription where parseJSON = Data.withObject "InputLambdaProcessorDescription" ( \x -> InputLambdaProcessorDescription' Prelude.<$> (x Data..:? "ResourceARN") Prelude.<*> (x Data..:? "RoleARN") ) instance Prelude.Hashable InputLambdaProcessorDescription where hashWithSalt _salt InputLambdaProcessorDescription' {..} = _salt `Prelude.hashWithSalt` resourceARN `Prelude.hashWithSalt` roleARN instance Prelude.NFData InputLambdaProcessorDescription where rnf InputLambdaProcessorDescription' {..} = Prelude.rnf resourceARN `Prelude.seq` Prelude.rnf roleARN