/**
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * SPDX-License-Identifier: Apache-2.0.
 */

#pragma once
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/lambda/LambdaRequest.h>
#include <aws/lambda/Lambda_EXPORTS.h>
#include <aws/lambda/model/CapacityProviderConfig.h>
#include <aws/lambda/model/DeadLetterConfig.h>
#include <aws/lambda/model/DurableConfig.h>
#include <aws/lambda/model/Environment.h>
#include <aws/lambda/model/EphemeralStorage.h>
#include <aws/lambda/model/FileSystemConfig.h>
#include <aws/lambda/model/ImageConfig.h>
#include <aws/lambda/model/LoggingConfig.h>
#include <aws/lambda/model/Runtime.h>
#include <aws/lambda/model/SnapStart.h>
#include <aws/lambda/model/TracingConfig.h>
#include <aws/lambda/model/VpcConfig.h>

#include <utility>

namespace Aws {
namespace Lambda {
namespace Model {

/**
 */
class UpdateFunctionConfigurationRequest : public LambdaRequest {
 public:
  AWS_LAMBDA_API UpdateFunctionConfigurationRequest() = default;

  // Service request name is the Operation name which will send this request out,
  // each operation should has unique request name, so that we can get operation's name from this request.
  // Note: this is not true for response, multiple operations may have the same response name,
  // so we can not get operation's name from response.
  inline virtual const char* GetServiceRequestName() const override { return "UpdateFunctionConfiguration"; }

  AWS_LAMBDA_API Aws::String SerializePayload() const override;

  ///@{
  /**
   * <p>The name or ARN of the Lambda function.</p> <p class="title"> <b>Name
   * formats</b> </p> <ul> <li> <p> <b>Function name</b> –
   * <code>my-function</code>.</p> </li> <li> <p> <b>Function ARN</b> –
   * <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p>
   * </li> <li> <p> <b>Partial ARN</b> –
   * <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>The length
   * constraint applies only to the full ARN. If you specify only the function name,
   * it is limited to 64 characters in length.</p>
   */
  inline const Aws::String& GetFunctionName() const { return m_functionName; }
  inline bool FunctionNameHasBeenSet() const { return m_functionNameHasBeenSet; }
  template <typename FunctionNameT = Aws::String>
  void SetFunctionName(FunctionNameT&& value) {
    m_functionNameHasBeenSet = true;
    m_functionName = std::forward<FunctionNameT>(value);
  }
  template <typename FunctionNameT = Aws::String>
  UpdateFunctionConfigurationRequest& WithFunctionName(FunctionNameT&& value) {
    SetFunctionName(std::forward<FunctionNameT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The Amazon Resource Name (ARN) of the function's execution role.</p>
   */
  inline const Aws::String& GetRole() const { return m_role; }
  inline bool RoleHasBeenSet() const { return m_roleHasBeenSet; }
  template <typename RoleT = Aws::String>
  void SetRole(RoleT&& value) {
    m_roleHasBeenSet = true;
    m_role = std::forward<RoleT>(value);
  }
  template <typename RoleT = Aws::String>
  UpdateFunctionConfigurationRequest& WithRole(RoleT&& value) {
    SetRole(std::forward<RoleT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The name of the method within your code that Lambda calls to run your
   * function. Handler is required if the deployment package is a .zip file archive.
   * The format includes the file name. It can also include namespaces and other
   * qualifiers, depending on the runtime. For more information, see <a
   * href="https://docs.aws.amazon.com/lambda/latest/dg/foundation-progmodel.html">Lambda
   * programming model</a>.</p>
   */
  inline const Aws::String& GetHandler() const { return m_handler; }
  inline bool HandlerHasBeenSet() const { return m_handlerHasBeenSet; }
  template <typename HandlerT = Aws::String>
  void SetHandler(HandlerT&& value) {
    m_handlerHasBeenSet = true;
    m_handler = std::forward<HandlerT>(value);
  }
  template <typename HandlerT = Aws::String>
  UpdateFunctionConfigurationRequest& WithHandler(HandlerT&& value) {
    SetHandler(std::forward<HandlerT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>A description of the function.</p>
   */
  inline const Aws::String& GetDescription() const { return m_description; }
  inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
  template <typename DescriptionT = Aws::String>
  void SetDescription(DescriptionT&& value) {
    m_descriptionHasBeenSet = true;
    m_description = std::forward<DescriptionT>(value);
  }
  template <typename DescriptionT = Aws::String>
  UpdateFunctionConfigurationRequest& WithDescription(DescriptionT&& value) {
    SetDescription(std::forward<DescriptionT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The amount of time (in seconds) that Lambda allows a function to run before
   * stopping it. The default is 3 seconds. The maximum allowed value is 900 seconds.
   * For more information, see <a
   * href="https://docs.aws.amazon.com/lambda/latest/dg/runtimes-context.html">Lambda
   * execution environment</a>.</p>
   */
  inline int GetTimeout() const { return m_timeout; }
  inline bool TimeoutHasBeenSet() const { return m_timeoutHasBeenSet; }
  inline void SetTimeout(int value) {
    m_timeoutHasBeenSet = true;
    m_timeout = value;
  }
  inline UpdateFunctionConfigurationRequest& WithTimeout(int value) {
    SetTimeout(value);
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The amount of <a
   * href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-memory-console">memory
   * available to the function</a> at runtime. Increasing the function memory also
   * increases its CPU allocation. The default value is 128 MB. The value can be any
   * multiple of 1 MB.</p>
   */
  inline int GetMemorySize() const { return m_memorySize; }
  inline bool MemorySizeHasBeenSet() const { return m_memorySizeHasBeenSet; }
  inline void SetMemorySize(int value) {
    m_memorySizeHasBeenSet = true;
    m_memorySize = value;
  }
  inline UpdateFunctionConfigurationRequest& WithMemorySize(int value) {
    SetMemorySize(value);
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>For network connectivity to Amazon Web Services resources in a VPC, specify a
   * list of security groups and subnets in the VPC. When you connect a function to a
   * VPC, it can access resources and the internet only through that VPC. For more
   * information, see <a
   * href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html">Configuring
   * a Lambda function to access resources in a VPC</a>.</p>
   */
  inline const VpcConfig& GetVpcConfig() const { return m_vpcConfig; }
  inline bool VpcConfigHasBeenSet() const { return m_vpcConfigHasBeenSet; }
  template <typename VpcConfigT = VpcConfig>
  void SetVpcConfig(VpcConfigT&& value) {
    m_vpcConfigHasBeenSet = true;
    m_vpcConfig = std::forward<VpcConfigT>(value);
  }
  template <typename VpcConfigT = VpcConfig>
  UpdateFunctionConfigurationRequest& WithVpcConfig(VpcConfigT&& value) {
    SetVpcConfig(std::forward<VpcConfigT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Environment variables that are accessible from function code during
   * execution.</p>
   */
  inline const Environment& GetEnvironment() const { return m_environment; }
  inline bool EnvironmentHasBeenSet() const { return m_environmentHasBeenSet; }
  template <typename EnvironmentT = Environment>
  void SetEnvironment(EnvironmentT&& value) {
    m_environmentHasBeenSet = true;
    m_environment = std::forward<EnvironmentT>(value);
  }
  template <typename EnvironmentT = Environment>
  UpdateFunctionConfigurationRequest& WithEnvironment(EnvironmentT&& value) {
    SetEnvironment(std::forward<EnvironmentT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The identifier of the function's <a
   * href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html">
   * runtime</a>. Runtime is required if the deployment package is a .zip file
   * archive. Specifying a runtime results in an error if you're deploying a function
   * using a container image.</p> <p>The following list includes deprecated runtimes.
   * Lambda blocks creating new functions and updating existing functions shortly
   * after each runtime is deprecated. For more information, see <a
   * href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-deprecation-levels">Runtime
   * use after deprecation</a>.</p> <p>For a list of all currently supported
   * runtimes, see <a
   * href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtimes-supported">Supported
   * runtimes</a>.</p>
   */
  inline Runtime GetRuntime() const { return m_runtime; }
  inline bool RuntimeHasBeenSet() const { return m_runtimeHasBeenSet; }
  inline void SetRuntime(Runtime value) {
    m_runtimeHasBeenSet = true;
    m_runtime = value;
  }
  inline UpdateFunctionConfigurationRequest& WithRuntime(Runtime value) {
    SetRuntime(value);
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>A dead-letter queue configuration that specifies the queue or topic where
   * Lambda sends asynchronous events when they fail processing. For more
   * information, see <a
   * href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-dlq">Dead-letter
   * queues</a>.</p>
   */
  inline const DeadLetterConfig& GetDeadLetterConfig() const { return m_deadLetterConfig; }
  inline bool DeadLetterConfigHasBeenSet() const { return m_deadLetterConfigHasBeenSet; }
  template <typename DeadLetterConfigT = DeadLetterConfig>
  void SetDeadLetterConfig(DeadLetterConfigT&& value) {
    m_deadLetterConfigHasBeenSet = true;
    m_deadLetterConfig = std::forward<DeadLetterConfigT>(value);
  }
  template <typename DeadLetterConfigT = DeadLetterConfig>
  UpdateFunctionConfigurationRequest& WithDeadLetterConfig(DeadLetterConfigT&& value) {
    SetDeadLetterConfig(std::forward<DeadLetterConfigT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The ARN of the Key Management Service (KMS) customer managed key that's used
   * to encrypt the following resources:</p> <ul> <li> <p>The function's <a
   * href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-encryption">environment
   * variables</a>.</p> </li> <li> <p>The function's <a
   * href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html">Lambda
   * SnapStart</a> snapshots.</p> </li> <li> <p>When used with
   * <code>SourceKMSKeyArn</code>, the unzipped version of the .zip deployment
   * package that's used for function invocations. For more information, see <a
   * href="https://docs.aws.amazon.com/lambda/latest/dg/encrypt-zip-package.html#enable-zip-custom-encryption">
   * Specifying a customer managed key for Lambda</a>.</p> </li> <li> <p>The
   * optimized version of the container image that's used for function invocations.
   * Note that this is not the same key that's used to protect your container image
   * in the Amazon Elastic Container Registry (Amazon ECR). For more information, see
   * <a
   * href="https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-lifecycle">Function
   * lifecycle</a>.</p> </li> </ul> <p>If you don't provide a customer managed key,
   * Lambda uses an <a
   * href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk">Amazon
   * Web Services owned key</a> or an <a
   * href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk">Amazon
   * Web Services managed key</a>.</p>
   */
  inline const Aws::String& GetKMSKeyArn() const { return m_kMSKeyArn; }
  inline bool KMSKeyArnHasBeenSet() const { return m_kMSKeyArnHasBeenSet; }
  template <typename KMSKeyArnT = Aws::String>
  void SetKMSKeyArn(KMSKeyArnT&& value) {
    m_kMSKeyArnHasBeenSet = true;
    m_kMSKeyArn = std::forward<KMSKeyArnT>(value);
  }
  template <typename KMSKeyArnT = Aws::String>
  UpdateFunctionConfigurationRequest& WithKMSKeyArn(KMSKeyArnT&& value) {
    SetKMSKeyArn(std::forward<KMSKeyArnT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Set <code>Mode</code> to <code>Active</code> to sample and trace a subset of
   * incoming requests with <a
   * href="https://docs.aws.amazon.com/lambda/latest/dg/services-xray.html">X-Ray</a>.</p>
   */
  inline const TracingConfig& GetTracingConfig() const { return m_tracingConfig; }
  inline bool TracingConfigHasBeenSet() const { return m_tracingConfigHasBeenSet; }
  template <typename TracingConfigT = TracingConfig>
  void SetTracingConfig(TracingConfigT&& value) {
    m_tracingConfigHasBeenSet = true;
    m_tracingConfig = std::forward<TracingConfigT>(value);
  }
  template <typename TracingConfigT = TracingConfig>
  UpdateFunctionConfigurationRequest& WithTracingConfig(TracingConfigT&& value) {
    SetTracingConfig(std::forward<TracingConfigT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Update the function only if the revision ID matches the ID that's specified.
   * Use this option to avoid modifying a function that has changed since you last
   * read it.</p>
   */
  inline const Aws::String& GetRevisionId() const { return m_revisionId; }
  inline bool RevisionIdHasBeenSet() const { return m_revisionIdHasBeenSet; }
  template <typename RevisionIdT = Aws::String>
  void SetRevisionId(RevisionIdT&& value) {
    m_revisionIdHasBeenSet = true;
    m_revisionId = std::forward<RevisionIdT>(value);
  }
  template <typename RevisionIdT = Aws::String>
  UpdateFunctionConfigurationRequest& WithRevisionId(RevisionIdT&& value) {
    SetRevisionId(std::forward<RevisionIdT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>A list of <a
   * href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html">function
   * layers</a> to add to the function's execution environment. Specify each layer by
   * its ARN, including the version.</p>
   */
  inline const Aws::Vector<Aws::String>& GetLayers() const { return m_layers; }
  inline bool LayersHasBeenSet() const { return m_layersHasBeenSet; }
  template <typename LayersT = Aws::Vector<Aws::String>>
  void SetLayers(LayersT&& value) {
    m_layersHasBeenSet = true;
    m_layers = std::forward<LayersT>(value);
  }
  template <typename LayersT = Aws::Vector<Aws::String>>
  UpdateFunctionConfigurationRequest& WithLayers(LayersT&& value) {
    SetLayers(std::forward<LayersT>(value));
    return *this;
  }
  template <typename LayersT = Aws::String>
  UpdateFunctionConfigurationRequest& AddLayers(LayersT&& value) {
    m_layersHasBeenSet = true;
    m_layers.emplace_back(std::forward<LayersT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Connection settings for an Amazon EFS file system or an Amazon S3 Files file
   * system.</p>
   */
  inline const Aws::Vector<FileSystemConfig>& GetFileSystemConfigs() const { return m_fileSystemConfigs; }
  inline bool FileSystemConfigsHasBeenSet() const { return m_fileSystemConfigsHasBeenSet; }
  template <typename FileSystemConfigsT = Aws::Vector<FileSystemConfig>>
  void SetFileSystemConfigs(FileSystemConfigsT&& value) {
    m_fileSystemConfigsHasBeenSet = true;
    m_fileSystemConfigs = std::forward<FileSystemConfigsT>(value);
  }
  template <typename FileSystemConfigsT = Aws::Vector<FileSystemConfig>>
  UpdateFunctionConfigurationRequest& WithFileSystemConfigs(FileSystemConfigsT&& value) {
    SetFileSystemConfigs(std::forward<FileSystemConfigsT>(value));
    return *this;
  }
  template <typename FileSystemConfigsT = FileSystemConfig>
  UpdateFunctionConfigurationRequest& AddFileSystemConfigs(FileSystemConfigsT&& value) {
    m_fileSystemConfigsHasBeenSet = true;
    m_fileSystemConfigs.emplace_back(std::forward<FileSystemConfigsT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p> <a
   * href="https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-parms">Container
   * image configuration values</a> that override the values in the container image
   * Docker file.</p>
   */
  inline const ImageConfig& GetImageConfig() const { return m_imageConfig; }
  inline bool ImageConfigHasBeenSet() const { return m_imageConfigHasBeenSet; }
  template <typename ImageConfigT = ImageConfig>
  void SetImageConfig(ImageConfigT&& value) {
    m_imageConfigHasBeenSet = true;
    m_imageConfig = std::forward<ImageConfigT>(value);
  }
  template <typename ImageConfigT = ImageConfig>
  UpdateFunctionConfigurationRequest& WithImageConfig(ImageConfigT&& value) {
    SetImageConfig(std::forward<ImageConfigT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The size of the function's <code>/tmp</code> directory in MB. The default
   * value is 512, but can be any whole number between 512 and 10,240 MB. For more
   * information, see <a
   * href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-ephemeral-storage">Configuring
   * ephemeral storage (console)</a>.</p>
   */
  inline const EphemeralStorage& GetEphemeralStorage() const { return m_ephemeralStorage; }
  inline bool EphemeralStorageHasBeenSet() const { return m_ephemeralStorageHasBeenSet; }
  template <typename EphemeralStorageT = EphemeralStorage>
  void SetEphemeralStorage(EphemeralStorageT&& value) {
    m_ephemeralStorageHasBeenSet = true;
    m_ephemeralStorage = std::forward<EphemeralStorageT>(value);
  }
  template <typename EphemeralStorageT = EphemeralStorage>
  UpdateFunctionConfigurationRequest& WithEphemeralStorage(EphemeralStorageT&& value) {
    SetEphemeralStorage(std::forward<EphemeralStorageT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The function's <a
   * href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html">SnapStart</a>
   * setting.</p>
   */
  inline const SnapStart& GetSnapStart() const { return m_snapStart; }
  inline bool SnapStartHasBeenSet() const { return m_snapStartHasBeenSet; }
  template <typename SnapStartT = SnapStart>
  void SetSnapStart(SnapStartT&& value) {
    m_snapStartHasBeenSet = true;
    m_snapStart = std::forward<SnapStartT>(value);
  }
  template <typename SnapStartT = SnapStart>
  UpdateFunctionConfigurationRequest& WithSnapStart(SnapStartT&& value) {
    SetSnapStart(std::forward<SnapStartT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The function's Amazon CloudWatch Logs configuration settings.</p>
   */
  inline const LoggingConfig& GetLoggingConfig() const { return m_loggingConfig; }
  inline bool LoggingConfigHasBeenSet() const { return m_loggingConfigHasBeenSet; }
  template <typename LoggingConfigT = LoggingConfig>
  void SetLoggingConfig(LoggingConfigT&& value) {
    m_loggingConfigHasBeenSet = true;
    m_loggingConfig = std::forward<LoggingConfigT>(value);
  }
  template <typename LoggingConfigT = LoggingConfig>
  UpdateFunctionConfigurationRequest& WithLoggingConfig(LoggingConfigT&& value) {
    SetLoggingConfig(std::forward<LoggingConfigT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Configuration for the capacity provider that manages compute resources for
   * Lambda functions.</p>
   */
  inline const CapacityProviderConfig& GetCapacityProviderConfig() const { return m_capacityProviderConfig; }
  inline bool CapacityProviderConfigHasBeenSet() const { return m_capacityProviderConfigHasBeenSet; }
  template <typename CapacityProviderConfigT = CapacityProviderConfig>
  void SetCapacityProviderConfig(CapacityProviderConfigT&& value) {
    m_capacityProviderConfigHasBeenSet = true;
    m_capacityProviderConfig = std::forward<CapacityProviderConfigT>(value);
  }
  template <typename CapacityProviderConfigT = CapacityProviderConfig>
  UpdateFunctionConfigurationRequest& WithCapacityProviderConfig(CapacityProviderConfigT&& value) {
    SetCapacityProviderConfig(std::forward<CapacityProviderConfigT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Configuration settings for durable functions. Allows updating execution
   * timeout and retention period for functions with durability enabled.</p>
   */
  inline const DurableConfig& GetDurableConfig() const { return m_durableConfig; }
  inline bool DurableConfigHasBeenSet() const { return m_durableConfigHasBeenSet; }
  template <typename DurableConfigT = DurableConfig>
  void SetDurableConfig(DurableConfigT&& value) {
    m_durableConfigHasBeenSet = true;
    m_durableConfig = std::forward<DurableConfigT>(value);
  }
  template <typename DurableConfigT = DurableConfig>
  UpdateFunctionConfigurationRequest& WithDurableConfig(DurableConfigT&& value) {
    SetDurableConfig(std::forward<DurableConfigT>(value));
    return *this;
  }
  ///@}
 private:
  Aws::String m_functionName;

  Aws::String m_role;

  Aws::String m_handler;

  Aws::String m_description;

  int m_timeout{0};

  int m_memorySize{0};

  VpcConfig m_vpcConfig;

  Environment m_environment;

  Runtime m_runtime{Runtime::NOT_SET};

  DeadLetterConfig m_deadLetterConfig;

  Aws::String m_kMSKeyArn;

  TracingConfig m_tracingConfig;

  Aws::String m_revisionId;

  Aws::Vector<Aws::String> m_layers;

  Aws::Vector<FileSystemConfig> m_fileSystemConfigs;

  ImageConfig m_imageConfig;

  EphemeralStorage m_ephemeralStorage;

  SnapStart m_snapStart;

  LoggingConfig m_loggingConfig;

  CapacityProviderConfig m_capacityProviderConfig;

  DurableConfig m_durableConfig;
  bool m_functionNameHasBeenSet = false;
  bool m_roleHasBeenSet = false;
  bool m_handlerHasBeenSet = false;
  bool m_descriptionHasBeenSet = false;
  bool m_timeoutHasBeenSet = false;
  bool m_memorySizeHasBeenSet = false;
  bool m_vpcConfigHasBeenSet = false;
  bool m_environmentHasBeenSet = false;
  bool m_runtimeHasBeenSet = false;
  bool m_deadLetterConfigHasBeenSet = false;
  bool m_kMSKeyArnHasBeenSet = false;
  bool m_tracingConfigHasBeenSet = false;
  bool m_revisionIdHasBeenSet = false;
  bool m_layersHasBeenSet = false;
  bool m_fileSystemConfigsHasBeenSet = false;
  bool m_imageConfigHasBeenSet = false;
  bool m_ephemeralStorageHasBeenSet = false;
  bool m_snapStartHasBeenSet = false;
  bool m_loggingConfigHasBeenSet = false;
  bool m_capacityProviderConfigHasBeenSet = false;
  bool m_durableConfigHasBeenSet = false;
};

}  // namespace Model
}  // namespace Lambda
}  // namespace Aws
