io.github.cdklabs.awslambdarust.RustFunctionProps Maven / Gradle / Ivy
package io.github.cdklabs.awslambdarust;
/**
* (experimental) Properties for a RustFunction.
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-10-10T00:47:35.790Z")
@software.amazon.jsii.Jsii(module = io.github.cdklabs.awslambdarust.$Module.class, fqn = "@cdklabs/aws-lambda-rust.RustFunctionProps")
@software.amazon.jsii.Jsii.Proxy(RustFunctionProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface RustFunctionProps extends software.amazon.jsii.JsiiSerializable, software.amazon.awscdk.services.lambda.FunctionOptions {
/**
* (experimental) The name of the binary to build, in case that it's different that the package's name.
*
* Default: Build all binaries
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.String getBinaryName() {
return null;
}
/**
* (experimental) Bundling options.
*
* Default: - use default bundling options: all
* binaries and packages are bundled.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable io.github.cdklabs.awslambdarust.BundlingOptions getBundling() {
return null;
}
/**
* (experimental) Path to the entry Cargo.toml file.
*
* Default: - Derived from the name of the defining file and the construct's id.
* If the `RustsFunction` is defined in `stack.ts` with `my-binary` as id
* (`new RustFunction(this, 'my-binary')`), the construct will look at `stack.my-binary/Cargo.toml`
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.String getEntry() {
return null;
}
/**
* (experimental) The path to the directory containing project Manifest file.
*
* Default: - the directory containing the `depsLockFilePath`
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.String getProjectRoot() {
return null;
}
/**
* (experimental) The runtime environment.
*
* Only OS-only runtimes are supported.
*
* Default: `Runtime.PROVIDED_AL2023`
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.lambda.Runtime getRuntime() {
return null;
}
/**
* @return a {@link Builder} of {@link RustFunctionProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link RustFunctionProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static final class Builder implements software.amazon.jsii.Builder {
java.lang.String binaryName;
io.github.cdklabs.awslambdarust.BundlingOptions bundling;
java.lang.String entry;
java.lang.String projectRoot;
software.amazon.awscdk.services.lambda.Runtime runtime;
software.amazon.awscdk.services.lambda.AdotInstrumentationConfig adotInstrumentation;
java.lang.Boolean allowAllOutbound;
java.lang.Boolean allowPublicSubnet;
java.lang.String applicationLogLevel;
software.amazon.awscdk.services.lambda.Architecture architecture;
software.amazon.awscdk.services.lambda.ICodeSigningConfig codeSigningConfig;
software.amazon.awscdk.services.lambda.VersionOptions currentVersionOptions;
software.amazon.awscdk.services.sqs.IQueue deadLetterQueue;
java.lang.Boolean deadLetterQueueEnabled;
software.amazon.awscdk.services.sns.ITopic deadLetterTopic;
java.lang.String description;
java.util.Map environment;
software.amazon.awscdk.services.kms.IKey environmentEncryption;
software.amazon.awscdk.Size ephemeralStorageSize;
java.util.List events;
software.amazon.awscdk.services.lambda.FileSystem filesystem;
java.lang.String functionName;
java.util.List initialPolicy;
software.amazon.awscdk.services.lambda.LambdaInsightsVersion insightsVersion;
java.util.List layers;
java.lang.String logFormat;
software.amazon.awscdk.services.logs.ILogGroup logGroup;
software.amazon.awscdk.services.logs.RetentionDays logRetention;
software.amazon.awscdk.services.lambda.LogRetentionRetryOptions logRetentionRetryOptions;
software.amazon.awscdk.services.iam.IRole logRetentionRole;
java.lang.Number memorySize;
software.amazon.awscdk.services.lambda.ParamsAndSecretsLayerVersion paramsAndSecrets;
java.lang.Boolean profiling;
software.amazon.awscdk.services.codeguruprofiler.IProfilingGroup profilingGroup;
java.lang.Number reservedConcurrentExecutions;
software.amazon.awscdk.services.iam.IRole role;
software.amazon.awscdk.services.lambda.RuntimeManagementMode runtimeManagementMode;
java.util.List securityGroups;
software.amazon.awscdk.services.lambda.SnapStartConf snapStart;
java.lang.String systemLogLevel;
software.amazon.awscdk.Duration timeout;
software.amazon.awscdk.services.lambda.Tracing tracing;
software.amazon.awscdk.services.ec2.IVpc vpc;
software.amazon.awscdk.services.ec2.SubnetSelection vpcSubnets;
software.amazon.awscdk.Duration maxEventAge;
software.amazon.awscdk.services.lambda.IDestination onFailure;
software.amazon.awscdk.services.lambda.IDestination onSuccess;
java.lang.Number retryAttempts;
/**
* Sets the value of {@link RustFunctionProps#getBinaryName}
* @param binaryName The name of the binary to build, in case that it's different that the package's name.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder binaryName(java.lang.String binaryName) {
this.binaryName = binaryName;
return this;
}
/**
* Sets the value of {@link RustFunctionProps#getBundling}
* @param bundling Bundling options.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder bundling(io.github.cdklabs.awslambdarust.BundlingOptions bundling) {
this.bundling = bundling;
return this;
}
/**
* Sets the value of {@link RustFunctionProps#getEntry}
* @param entry Path to the entry Cargo.toml file.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder entry(java.lang.String entry) {
this.entry = entry;
return this;
}
/**
* Sets the value of {@link RustFunctionProps#getProjectRoot}
* @param projectRoot The path to the directory containing project Manifest file.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder projectRoot(java.lang.String projectRoot) {
this.projectRoot = projectRoot;
return this;
}
/**
* Sets the value of {@link RustFunctionProps#getRuntime}
* @param runtime The runtime environment.
* Only OS-only runtimes are supported.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder runtime(software.amazon.awscdk.services.lambda.Runtime runtime) {
this.runtime = runtime;
return this;
}
/**
* Sets the value of {@link RustFunctionProps#getAdotInstrumentation}
* @param adotInstrumentation Specify the configuration of AWS Distro for OpenTelemetry (ADOT) instrumentation.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder adotInstrumentation(software.amazon.awscdk.services.lambda.AdotInstrumentationConfig adotInstrumentation) {
this.adotInstrumentation = adotInstrumentation;
return this;
}
/**
* Sets the value of {@link RustFunctionProps#getAllowAllOutbound}
* @param allowAllOutbound Whether to allow the Lambda to send all network traffic.
* If set to false, you must individually add traffic rules to allow the
* Lambda to connect to network targets.
*
* Do not specify this property if the securityGroups
or securityGroup
property is set.
* Instead, configure allowAllOutbound
directly on the security group.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder allowAllOutbound(java.lang.Boolean allowAllOutbound) {
this.allowAllOutbound = allowAllOutbound;
return this;
}
/**
* Sets the value of {@link RustFunctionProps#getAllowPublicSubnet}
* @param allowPublicSubnet Lambda Functions in a public subnet can NOT access the internet.
* Use this property to acknowledge this limitation and still place the function in a public subnet.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder allowPublicSubnet(java.lang.Boolean allowPublicSubnet) {
this.allowPublicSubnet = allowPublicSubnet;
return this;
}
/**
* Sets the value of {@link RustFunctionProps#getApplicationLogLevel}
* @param applicationLogLevel Sets the application log level for the function.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder applicationLogLevel(java.lang.String applicationLogLevel) {
this.applicationLogLevel = applicationLogLevel;
return this;
}
/**
* Sets the value of {@link RustFunctionProps#getArchitecture}
* @param architecture The system architectures compatible with this lambda function.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder architecture(software.amazon.awscdk.services.lambda.Architecture architecture) {
this.architecture = architecture;
return this;
}
/**
* Sets the value of {@link RustFunctionProps#getCodeSigningConfig}
* @param codeSigningConfig Code signing config associated with this function.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder codeSigningConfig(software.amazon.awscdk.services.lambda.ICodeSigningConfig codeSigningConfig) {
this.codeSigningConfig = codeSigningConfig;
return this;
}
/**
* Sets the value of {@link RustFunctionProps#getCurrentVersionOptions}
* @param currentVersionOptions Options for the lambda.Version
resource automatically created by the fn.currentVersion
method.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder currentVersionOptions(software.amazon.awscdk.services.lambda.VersionOptions currentVersionOptions) {
this.currentVersionOptions = currentVersionOptions;
return this;
}
/**
* Sets the value of {@link RustFunctionProps#getDeadLetterQueue}
* @param deadLetterQueue The SQS queue to use if DLQ is enabled.
* If SNS topic is desired, specify deadLetterTopic
property instead.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder deadLetterQueue(software.amazon.awscdk.services.sqs.IQueue deadLetterQueue) {
this.deadLetterQueue = deadLetterQueue;
return this;
}
/**
* Sets the value of {@link RustFunctionProps#getDeadLetterQueueEnabled}
* @param deadLetterQueueEnabled Enabled DLQ.
* If deadLetterQueue
is undefined,
* an SQS queue with default options will be defined for your Function.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder deadLetterQueueEnabled(java.lang.Boolean deadLetterQueueEnabled) {
this.deadLetterQueueEnabled = deadLetterQueueEnabled;
return this;
}
/**
* Sets the value of {@link RustFunctionProps#getDeadLetterTopic}
* @param deadLetterTopic The SNS topic to use as a DLQ.
* Note that if deadLetterQueueEnabled
is set to true
, an SQS queue will be created
* rather than an SNS topic. Using an SNS topic as a DLQ requires this property to be set explicitly.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder deadLetterTopic(software.amazon.awscdk.services.sns.ITopic deadLetterTopic) {
this.deadLetterTopic = deadLetterTopic;
return this;
}
/**
* Sets the value of {@link RustFunctionProps#getDescription}
* @param description A description of the function.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder description(java.lang.String description) {
this.description = description;
return this;
}
/**
* Sets the value of {@link RustFunctionProps#getEnvironment}
* @param environment Key-value pairs that Lambda caches and makes available for your Lambda functions.
* Use environment variables to apply configuration changes, such
* as test and production environment configurations, without changing your
* Lambda function source code.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder environment(java.util.Map environment) {
this.environment = environment;
return this;
}
/**
* Sets the value of {@link RustFunctionProps#getEnvironmentEncryption}
* @param environmentEncryption The AWS KMS key that's used to encrypt your function's environment variables.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder environmentEncryption(software.amazon.awscdk.services.kms.IKey environmentEncryption) {
this.environmentEncryption = environmentEncryption;
return this;
}
/**
* Sets the value of {@link RustFunctionProps#getEphemeralStorageSize}
* @param ephemeralStorageSize The size of the function’s /tmp directory in MiB.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder ephemeralStorageSize(software.amazon.awscdk.Size ephemeralStorageSize) {
this.ephemeralStorageSize = ephemeralStorageSize;
return this;
}
/**
* Sets the value of {@link RustFunctionProps#getEvents}
* @param events Event sources for this function.
* You can also add event sources using addEventSource
.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@SuppressWarnings("unchecked")
public Builder events(java.util.List extends software.amazon.awscdk.services.lambda.IEventSource> events) {
this.events = (java.util.List)events;
return this;
}
/**
* Sets the value of {@link RustFunctionProps#getFilesystem}
* @param filesystem The filesystem configuration for the lambda function.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder filesystem(software.amazon.awscdk.services.lambda.FileSystem filesystem) {
this.filesystem = filesystem;
return this;
}
/**
* Sets the value of {@link RustFunctionProps#getFunctionName}
* @param functionName A name for the function.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder functionName(java.lang.String functionName) {
this.functionName = functionName;
return this;
}
/**
* Sets the value of {@link RustFunctionProps#getInitialPolicy}
* @param initialPolicy Initial policy statements to add to the created Lambda Role.
* You can call addToRolePolicy
to the created lambda to add statements post creation.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@SuppressWarnings("unchecked")
public Builder initialPolicy(java.util.List extends software.amazon.awscdk.services.iam.PolicyStatement> initialPolicy) {
this.initialPolicy = (java.util.List)initialPolicy;
return this;
}
/**
* Sets the value of {@link RustFunctionProps#getInsightsVersion}
* @param insightsVersion Specify the version of CloudWatch Lambda insights to use for monitoring.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder insightsVersion(software.amazon.awscdk.services.lambda.LambdaInsightsVersion insightsVersion) {
this.insightsVersion = insightsVersion;
return this;
}
/**
* Sets the value of {@link RustFunctionProps#getLayers}
* @param layers A list of layers to add to the function's execution environment.
* You can configure your Lambda function to pull in
* additional code during initialization in the form of layers. Layers are packages of libraries or other dependencies
* that can be used by multiple functions.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@SuppressWarnings("unchecked")
public Builder layers(java.util.List extends software.amazon.awscdk.services.lambda.ILayerVersion> layers) {
this.layers = (java.util.List)layers;
return this;
}
/**
* Sets the value of {@link RustFunctionProps#getLogFormat}
* @param logFormat Sets the logFormat for the function.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder logFormat(java.lang.String logFormat) {
this.logFormat = logFormat;
return this;
}
/**
* Sets the value of {@link RustFunctionProps#getLogGroup}
* @param logGroup Sets the log group name for the function.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder logGroup(software.amazon.awscdk.services.logs.ILogGroup logGroup) {
this.logGroup = logGroup;
return this;
}
/**
* Sets the value of {@link RustFunctionProps#getLogRetention}
* @param logRetention The number of days log events are kept in CloudWatch Logs.
* When updating
* this property, unsetting it doesn't remove the log retention policy. To
* remove the retention policy, set the value to INFINITE
.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder logRetention(software.amazon.awscdk.services.logs.RetentionDays logRetention) {
this.logRetention = logRetention;
return this;
}
/**
* Sets the value of {@link RustFunctionProps#getLogRetentionRetryOptions}
* @param logRetentionRetryOptions When log retention is specified, a custom resource attempts to create the CloudWatch log group.
* These options control the retry policy when interacting with CloudWatch APIs.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder logRetentionRetryOptions(software.amazon.awscdk.services.lambda.LogRetentionRetryOptions logRetentionRetryOptions) {
this.logRetentionRetryOptions = logRetentionRetryOptions;
return this;
}
/**
* Sets the value of {@link RustFunctionProps#getLogRetentionRole}
* @param logRetentionRole The IAM role for the Lambda function associated with the custom resource that sets the retention policy.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder logRetentionRole(software.amazon.awscdk.services.iam.IRole logRetentionRole) {
this.logRetentionRole = logRetentionRole;
return this;
}
/**
* Sets the value of {@link RustFunctionProps#getMemorySize}
* @param memorySize The amount of memory, in MB, that is allocated to your Lambda function.
* Lambda uses this value to proportionally allocate the amount of CPU
* power. For more information, see Resource Model in the AWS Lambda
* Developer Guide.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder memorySize(java.lang.Number memorySize) {
this.memorySize = memorySize;
return this;
}
/**
* Sets the value of {@link RustFunctionProps#getParamsAndSecrets}
* @param paramsAndSecrets Specify the configuration of Parameters and Secrets Extension.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder paramsAndSecrets(software.amazon.awscdk.services.lambda.ParamsAndSecretsLayerVersion paramsAndSecrets) {
this.paramsAndSecrets = paramsAndSecrets;
return this;
}
/**
* Sets the value of {@link RustFunctionProps#getProfiling}
* @param profiling Enable profiling.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder profiling(java.lang.Boolean profiling) {
this.profiling = profiling;
return this;
}
/**
* Sets the value of {@link RustFunctionProps#getProfilingGroup}
* @param profilingGroup Profiling Group.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder profilingGroup(software.amazon.awscdk.services.codeguruprofiler.IProfilingGroup profilingGroup) {
this.profilingGroup = profilingGroup;
return this;
}
/**
* Sets the value of {@link RustFunctionProps#getReservedConcurrentExecutions}
* @param reservedConcurrentExecutions The maximum of concurrent executions you want to reserve for the function.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder reservedConcurrentExecutions(java.lang.Number reservedConcurrentExecutions) {
this.reservedConcurrentExecutions = reservedConcurrentExecutions;
return this;
}
/**
* Sets the value of {@link RustFunctionProps#getRole}
* @param role Lambda execution role.
* This is the role that will be assumed by the function upon execution.
* It controls the permissions that the function will have. The Role must
* be assumable by the 'lambda.amazonaws.com' service principal.
*
* The default Role automatically has permissions granted for Lambda execution. If you
* provide a Role, you must add the relevant AWS managed policies yourself.
*
* The relevant managed policies are "service-role/AWSLambdaBasicExecutionRole" and
* "service-role/AWSLambdaVPCAccessExecutionRole".
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder role(software.amazon.awscdk.services.iam.IRole role) {
this.role = role;
return this;
}
/**
* Sets the value of {@link RustFunctionProps#getRuntimeManagementMode}
* @param runtimeManagementMode Sets the runtime management configuration for a function's version.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder runtimeManagementMode(software.amazon.awscdk.services.lambda.RuntimeManagementMode runtimeManagementMode) {
this.runtimeManagementMode = runtimeManagementMode;
return this;
}
/**
* Sets the value of {@link RustFunctionProps#getSecurityGroups}
* @param securityGroups The list of security groups to associate with the Lambda's network interfaces.
* Only used if 'vpc' is supplied.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@SuppressWarnings("unchecked")
public Builder securityGroups(java.util.List extends software.amazon.awscdk.services.ec2.ISecurityGroup> securityGroups) {
this.securityGroups = (java.util.List)securityGroups;
return this;
}
/**
* Sets the value of {@link RustFunctionProps#getSnapStart}
* @param snapStart Enable SnapStart for Lambda Function.
* SnapStart is currently supported only for Java 11, 17 runtime
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder snapStart(software.amazon.awscdk.services.lambda.SnapStartConf snapStart) {
this.snapStart = snapStart;
return this;
}
/**
* Sets the value of {@link RustFunctionProps#getSystemLogLevel}
* @param systemLogLevel Sets the system log level for the function.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder systemLogLevel(java.lang.String systemLogLevel) {
this.systemLogLevel = systemLogLevel;
return this;
}
/**
* Sets the value of {@link RustFunctionProps#getTimeout}
* @param timeout The function execution time (in seconds) after which Lambda terminates the function.
* Because the execution time affects cost, set this value
* based on the function's expected execution time.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder timeout(software.amazon.awscdk.Duration timeout) {
this.timeout = timeout;
return this;
}
/**
* Sets the value of {@link RustFunctionProps#getTracing}
* @param tracing Enable AWS X-Ray Tracing for Lambda Function.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder tracing(software.amazon.awscdk.services.lambda.Tracing tracing) {
this.tracing = tracing;
return this;
}
/**
* Sets the value of {@link RustFunctionProps#getVpc}
* @param vpc VPC network to place Lambda network interfaces.
* Specify this if the Lambda function needs to access resources in a VPC.
* This is required when vpcSubnets
is specified.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder vpc(software.amazon.awscdk.services.ec2.IVpc vpc) {
this.vpc = vpc;
return this;
}
/**
* Sets the value of {@link RustFunctionProps#getVpcSubnets}
* @param vpcSubnets Where to place the network interfaces within the VPC.
* This requires vpc
to be specified in order for interfaces to actually be
* placed in the subnets. If vpc
is not specify, this will raise an error.
*
* Note: Internet access for Lambda Functions requires a NAT Gateway, so picking
* public subnets is not allowed (unless allowPublicSubnet
is set to true
).
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder vpcSubnets(software.amazon.awscdk.services.ec2.SubnetSelection vpcSubnets) {
this.vpcSubnets = vpcSubnets;
return this;
}
/**
* Sets the value of {@link RustFunctionProps#getMaxEventAge}
* @param maxEventAge The maximum age of a request that Lambda sends to a function for processing.
* Minimum: 60 seconds
* Maximum: 6 hours
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder maxEventAge(software.amazon.awscdk.Duration maxEventAge) {
this.maxEventAge = maxEventAge;
return this;
}
/**
* Sets the value of {@link RustFunctionProps#getOnFailure}
* @param onFailure The destination for failed invocations.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder onFailure(software.amazon.awscdk.services.lambda.IDestination onFailure) {
this.onFailure = onFailure;
return this;
}
/**
* Sets the value of {@link RustFunctionProps#getOnSuccess}
* @param onSuccess The destination for successful invocations.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder onSuccess(software.amazon.awscdk.services.lambda.IDestination onSuccess) {
this.onSuccess = onSuccess;
return this;
}
/**
* Sets the value of {@link RustFunctionProps#getRetryAttempts}
* @param retryAttempts The maximum number of times to retry when the function returns an error.
* Minimum: 0
* Maximum: 2
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder retryAttempts(java.lang.Number retryAttempts) {
this.retryAttempts = retryAttempts;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link RustFunctionProps}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public RustFunctionProps build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link RustFunctionProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements RustFunctionProps {
private final java.lang.String binaryName;
private final io.github.cdklabs.awslambdarust.BundlingOptions bundling;
private final java.lang.String entry;
private final java.lang.String projectRoot;
private final software.amazon.awscdk.services.lambda.Runtime runtime;
private final software.amazon.awscdk.services.lambda.AdotInstrumentationConfig adotInstrumentation;
private final java.lang.Boolean allowAllOutbound;
private final java.lang.Boolean allowPublicSubnet;
private final java.lang.String applicationLogLevel;
private final software.amazon.awscdk.services.lambda.Architecture architecture;
private final software.amazon.awscdk.services.lambda.ICodeSigningConfig codeSigningConfig;
private final software.amazon.awscdk.services.lambda.VersionOptions currentVersionOptions;
private final software.amazon.awscdk.services.sqs.IQueue deadLetterQueue;
private final java.lang.Boolean deadLetterQueueEnabled;
private final software.amazon.awscdk.services.sns.ITopic deadLetterTopic;
private final java.lang.String description;
private final java.util.Map environment;
private final software.amazon.awscdk.services.kms.IKey environmentEncryption;
private final software.amazon.awscdk.Size ephemeralStorageSize;
private final java.util.List events;
private final software.amazon.awscdk.services.lambda.FileSystem filesystem;
private final java.lang.String functionName;
private final java.util.List initialPolicy;
private final software.amazon.awscdk.services.lambda.LambdaInsightsVersion insightsVersion;
private final java.util.List layers;
private final java.lang.String logFormat;
private final software.amazon.awscdk.services.logs.ILogGroup logGroup;
private final software.amazon.awscdk.services.logs.RetentionDays logRetention;
private final software.amazon.awscdk.services.lambda.LogRetentionRetryOptions logRetentionRetryOptions;
private final software.amazon.awscdk.services.iam.IRole logRetentionRole;
private final java.lang.Number memorySize;
private final software.amazon.awscdk.services.lambda.ParamsAndSecretsLayerVersion paramsAndSecrets;
private final java.lang.Boolean profiling;
private final software.amazon.awscdk.services.codeguruprofiler.IProfilingGroup profilingGroup;
private final java.lang.Number reservedConcurrentExecutions;
private final software.amazon.awscdk.services.iam.IRole role;
private final software.amazon.awscdk.services.lambda.RuntimeManagementMode runtimeManagementMode;
private final java.util.List securityGroups;
private final software.amazon.awscdk.services.lambda.SnapStartConf snapStart;
private final java.lang.String systemLogLevel;
private final software.amazon.awscdk.Duration timeout;
private final software.amazon.awscdk.services.lambda.Tracing tracing;
private final software.amazon.awscdk.services.ec2.IVpc vpc;
private final software.amazon.awscdk.services.ec2.SubnetSelection vpcSubnets;
private final software.amazon.awscdk.Duration maxEventAge;
private final software.amazon.awscdk.services.lambda.IDestination onFailure;
private final software.amazon.awscdk.services.lambda.IDestination onSuccess;
private final java.lang.Number retryAttempts;
/**
* Constructor that initializes the object based on values retrieved from the JsiiObject.
* @param objRef Reference to the JSII managed object.
*/
protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
this.binaryName = software.amazon.jsii.Kernel.get(this, "binaryName", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.bundling = software.amazon.jsii.Kernel.get(this, "bundling", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.awslambdarust.BundlingOptions.class));
this.entry = software.amazon.jsii.Kernel.get(this, "entry", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.projectRoot = software.amazon.jsii.Kernel.get(this, "projectRoot", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.runtime = software.amazon.jsii.Kernel.get(this, "runtime", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.lambda.Runtime.class));
this.adotInstrumentation = software.amazon.jsii.Kernel.get(this, "adotInstrumentation", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.lambda.AdotInstrumentationConfig.class));
this.allowAllOutbound = software.amazon.jsii.Kernel.get(this, "allowAllOutbound", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
this.allowPublicSubnet = software.amazon.jsii.Kernel.get(this, "allowPublicSubnet", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
this.applicationLogLevel = software.amazon.jsii.Kernel.get(this, "applicationLogLevel", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.architecture = software.amazon.jsii.Kernel.get(this, "architecture", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.lambda.Architecture.class));
this.codeSigningConfig = software.amazon.jsii.Kernel.get(this, "codeSigningConfig", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.lambda.ICodeSigningConfig.class));
this.currentVersionOptions = software.amazon.jsii.Kernel.get(this, "currentVersionOptions", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.lambda.VersionOptions.class));
this.deadLetterQueue = software.amazon.jsii.Kernel.get(this, "deadLetterQueue", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.sqs.IQueue.class));
this.deadLetterQueueEnabled = software.amazon.jsii.Kernel.get(this, "deadLetterQueueEnabled", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
this.deadLetterTopic = software.amazon.jsii.Kernel.get(this, "deadLetterTopic", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.sns.ITopic.class));
this.description = software.amazon.jsii.Kernel.get(this, "description", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.environment = software.amazon.jsii.Kernel.get(this, "environment", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)));
this.environmentEncryption = software.amazon.jsii.Kernel.get(this, "environmentEncryption", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.kms.IKey.class));
this.ephemeralStorageSize = software.amazon.jsii.Kernel.get(this, "ephemeralStorageSize", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.Size.class));
this.events = software.amazon.jsii.Kernel.get(this, "events", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.lambda.IEventSource.class)));
this.filesystem = software.amazon.jsii.Kernel.get(this, "filesystem", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.lambda.FileSystem.class));
this.functionName = software.amazon.jsii.Kernel.get(this, "functionName", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.initialPolicy = software.amazon.jsii.Kernel.get(this, "initialPolicy", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.iam.PolicyStatement.class)));
this.insightsVersion = software.amazon.jsii.Kernel.get(this, "insightsVersion", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.lambda.LambdaInsightsVersion.class));
this.layers = software.amazon.jsii.Kernel.get(this, "layers", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.lambda.ILayerVersion.class)));
this.logFormat = software.amazon.jsii.Kernel.get(this, "logFormat", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.logGroup = software.amazon.jsii.Kernel.get(this, "logGroup", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.logs.ILogGroup.class));
this.logRetention = software.amazon.jsii.Kernel.get(this, "logRetention", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.logs.RetentionDays.class));
this.logRetentionRetryOptions = software.amazon.jsii.Kernel.get(this, "logRetentionRetryOptions", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.lambda.LogRetentionRetryOptions.class));
this.logRetentionRole = software.amazon.jsii.Kernel.get(this, "logRetentionRole", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.iam.IRole.class));
this.memorySize = software.amazon.jsii.Kernel.get(this, "memorySize", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));
this.paramsAndSecrets = software.amazon.jsii.Kernel.get(this, "paramsAndSecrets", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.lambda.ParamsAndSecretsLayerVersion.class));
this.profiling = software.amazon.jsii.Kernel.get(this, "profiling", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
this.profilingGroup = software.amazon.jsii.Kernel.get(this, "profilingGroup", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.codeguruprofiler.IProfilingGroup.class));
this.reservedConcurrentExecutions = software.amazon.jsii.Kernel.get(this, "reservedConcurrentExecutions", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));
this.role = software.amazon.jsii.Kernel.get(this, "role", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.iam.IRole.class));
this.runtimeManagementMode = software.amazon.jsii.Kernel.get(this, "runtimeManagementMode", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.lambda.RuntimeManagementMode.class));
this.securityGroups = software.amazon.jsii.Kernel.get(this, "securityGroups", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.ISecurityGroup.class)));
this.snapStart = software.amazon.jsii.Kernel.get(this, "snapStart", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.lambda.SnapStartConf.class));
this.systemLogLevel = software.amazon.jsii.Kernel.get(this, "systemLogLevel", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.timeout = software.amazon.jsii.Kernel.get(this, "timeout", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.Duration.class));
this.tracing = software.amazon.jsii.Kernel.get(this, "tracing", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.lambda.Tracing.class));
this.vpc = software.amazon.jsii.Kernel.get(this, "vpc", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.IVpc.class));
this.vpcSubnets = software.amazon.jsii.Kernel.get(this, "vpcSubnets", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.SubnetSelection.class));
this.maxEventAge = software.amazon.jsii.Kernel.get(this, "maxEventAge", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.Duration.class));
this.onFailure = software.amazon.jsii.Kernel.get(this, "onFailure", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.lambda.IDestination.class));
this.onSuccess = software.amazon.jsii.Kernel.get(this, "onSuccess", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.lambda.IDestination.class));
this.retryAttempts = software.amazon.jsii.Kernel.get(this, "retryAttempts", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));
}
/**
* Constructor that initializes the object based on literal property values passed by the {@link Builder}.
*/
@SuppressWarnings("unchecked")
protected Jsii$Proxy(final Builder builder) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
this.binaryName = builder.binaryName;
this.bundling = builder.bundling;
this.entry = builder.entry;
this.projectRoot = builder.projectRoot;
this.runtime = builder.runtime;
this.adotInstrumentation = builder.adotInstrumentation;
this.allowAllOutbound = builder.allowAllOutbound;
this.allowPublicSubnet = builder.allowPublicSubnet;
this.applicationLogLevel = builder.applicationLogLevel;
this.architecture = builder.architecture;
this.codeSigningConfig = builder.codeSigningConfig;
this.currentVersionOptions = builder.currentVersionOptions;
this.deadLetterQueue = builder.deadLetterQueue;
this.deadLetterQueueEnabled = builder.deadLetterQueueEnabled;
this.deadLetterTopic = builder.deadLetterTopic;
this.description = builder.description;
this.environment = builder.environment;
this.environmentEncryption = builder.environmentEncryption;
this.ephemeralStorageSize = builder.ephemeralStorageSize;
this.events = (java.util.List)builder.events;
this.filesystem = builder.filesystem;
this.functionName = builder.functionName;
this.initialPolicy = (java.util.List)builder.initialPolicy;
this.insightsVersion = builder.insightsVersion;
this.layers = (java.util.List)builder.layers;
this.logFormat = builder.logFormat;
this.logGroup = builder.logGroup;
this.logRetention = builder.logRetention;
this.logRetentionRetryOptions = builder.logRetentionRetryOptions;
this.logRetentionRole = builder.logRetentionRole;
this.memorySize = builder.memorySize;
this.paramsAndSecrets = builder.paramsAndSecrets;
this.profiling = builder.profiling;
this.profilingGroup = builder.profilingGroup;
this.reservedConcurrentExecutions = builder.reservedConcurrentExecutions;
this.role = builder.role;
this.runtimeManagementMode = builder.runtimeManagementMode;
this.securityGroups = (java.util.List)builder.securityGroups;
this.snapStart = builder.snapStart;
this.systemLogLevel = builder.systemLogLevel;
this.timeout = builder.timeout;
this.tracing = builder.tracing;
this.vpc = builder.vpc;
this.vpcSubnets = builder.vpcSubnets;
this.maxEventAge = builder.maxEventAge;
this.onFailure = builder.onFailure;
this.onSuccess = builder.onSuccess;
this.retryAttempts = builder.retryAttempts;
}
@Override
public final java.lang.String getBinaryName() {
return this.binaryName;
}
@Override
public final io.github.cdklabs.awslambdarust.BundlingOptions getBundling() {
return this.bundling;
}
@Override
public final java.lang.String getEntry() {
return this.entry;
}
@Override
public final java.lang.String getProjectRoot() {
return this.projectRoot;
}
@Override
public final software.amazon.awscdk.services.lambda.Runtime getRuntime() {
return this.runtime;
}
@Override
public final software.amazon.awscdk.services.lambda.AdotInstrumentationConfig getAdotInstrumentation() {
return this.adotInstrumentation;
}
@Override
public final java.lang.Boolean getAllowAllOutbound() {
return this.allowAllOutbound;
}
@Override
public final java.lang.Boolean getAllowPublicSubnet() {
return this.allowPublicSubnet;
}
@Override
public final java.lang.String getApplicationLogLevel() {
return this.applicationLogLevel;
}
@Override
public final software.amazon.awscdk.services.lambda.Architecture getArchitecture() {
return this.architecture;
}
@Override
public final software.amazon.awscdk.services.lambda.ICodeSigningConfig getCodeSigningConfig() {
return this.codeSigningConfig;
}
@Override
public final software.amazon.awscdk.services.lambda.VersionOptions getCurrentVersionOptions() {
return this.currentVersionOptions;
}
@Override
public final software.amazon.awscdk.services.sqs.IQueue getDeadLetterQueue() {
return this.deadLetterQueue;
}
@Override
public final java.lang.Boolean getDeadLetterQueueEnabled() {
return this.deadLetterQueueEnabled;
}
@Override
public final software.amazon.awscdk.services.sns.ITopic getDeadLetterTopic() {
return this.deadLetterTopic;
}
@Override
public final java.lang.String getDescription() {
return this.description;
}
@Override
public final java.util.Map getEnvironment() {
return this.environment;
}
@Override
public final software.amazon.awscdk.services.kms.IKey getEnvironmentEncryption() {
return this.environmentEncryption;
}
@Override
public final software.amazon.awscdk.Size getEphemeralStorageSize() {
return this.ephemeralStorageSize;
}
@Override
public final java.util.List getEvents() {
return this.events;
}
@Override
public final software.amazon.awscdk.services.lambda.FileSystem getFilesystem() {
return this.filesystem;
}
@Override
public final java.lang.String getFunctionName() {
return this.functionName;
}
@Override
public final java.util.List getInitialPolicy() {
return this.initialPolicy;
}
@Override
public final software.amazon.awscdk.services.lambda.LambdaInsightsVersion getInsightsVersion() {
return this.insightsVersion;
}
@Override
public final java.util.List getLayers() {
return this.layers;
}
@Override
public final java.lang.String getLogFormat() {
return this.logFormat;
}
@Override
public final software.amazon.awscdk.services.logs.ILogGroup getLogGroup() {
return this.logGroup;
}
@Override
public final software.amazon.awscdk.services.logs.RetentionDays getLogRetention() {
return this.logRetention;
}
@Override
public final software.amazon.awscdk.services.lambda.LogRetentionRetryOptions getLogRetentionRetryOptions() {
return this.logRetentionRetryOptions;
}
@Override
public final software.amazon.awscdk.services.iam.IRole getLogRetentionRole() {
return this.logRetentionRole;
}
@Override
public final java.lang.Number getMemorySize() {
return this.memorySize;
}
@Override
public final software.amazon.awscdk.services.lambda.ParamsAndSecretsLayerVersion getParamsAndSecrets() {
return this.paramsAndSecrets;
}
@Override
public final java.lang.Boolean getProfiling() {
return this.profiling;
}
@Override
public final software.amazon.awscdk.services.codeguruprofiler.IProfilingGroup getProfilingGroup() {
return this.profilingGroup;
}
@Override
public final java.lang.Number getReservedConcurrentExecutions() {
return this.reservedConcurrentExecutions;
}
@Override
public final software.amazon.awscdk.services.iam.IRole getRole() {
return this.role;
}
@Override
public final software.amazon.awscdk.services.lambda.RuntimeManagementMode getRuntimeManagementMode() {
return this.runtimeManagementMode;
}
@Override
public final java.util.List getSecurityGroups() {
return this.securityGroups;
}
@Override
public final software.amazon.awscdk.services.lambda.SnapStartConf getSnapStart() {
return this.snapStart;
}
@Override
public final java.lang.String getSystemLogLevel() {
return this.systemLogLevel;
}
@Override
public final software.amazon.awscdk.Duration getTimeout() {
return this.timeout;
}
@Override
public final software.amazon.awscdk.services.lambda.Tracing getTracing() {
return this.tracing;
}
@Override
public final software.amazon.awscdk.services.ec2.IVpc getVpc() {
return this.vpc;
}
@Override
public final software.amazon.awscdk.services.ec2.SubnetSelection getVpcSubnets() {
return this.vpcSubnets;
}
@Override
public final software.amazon.awscdk.Duration getMaxEventAge() {
return this.maxEventAge;
}
@Override
public final software.amazon.awscdk.services.lambda.IDestination getOnFailure() {
return this.onFailure;
}
@Override
public final software.amazon.awscdk.services.lambda.IDestination getOnSuccess() {
return this.onSuccess;
}
@Override
public final java.lang.Number getRetryAttempts() {
return this.retryAttempts;
}
@Override
@software.amazon.jsii.Internal
public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() {
final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE;
final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
if (this.getBinaryName() != null) {
data.set("binaryName", om.valueToTree(this.getBinaryName()));
}
if (this.getBundling() != null) {
data.set("bundling", om.valueToTree(this.getBundling()));
}
if (this.getEntry() != null) {
data.set("entry", om.valueToTree(this.getEntry()));
}
if (this.getProjectRoot() != null) {
data.set("projectRoot", om.valueToTree(this.getProjectRoot()));
}
if (this.getRuntime() != null) {
data.set("runtime", om.valueToTree(this.getRuntime()));
}
if (this.getAdotInstrumentation() != null) {
data.set("adotInstrumentation", om.valueToTree(this.getAdotInstrumentation()));
}
if (this.getAllowAllOutbound() != null) {
data.set("allowAllOutbound", om.valueToTree(this.getAllowAllOutbound()));
}
if (this.getAllowPublicSubnet() != null) {
data.set("allowPublicSubnet", om.valueToTree(this.getAllowPublicSubnet()));
}
if (this.getApplicationLogLevel() != null) {
data.set("applicationLogLevel", om.valueToTree(this.getApplicationLogLevel()));
}
if (this.getArchitecture() != null) {
data.set("architecture", om.valueToTree(this.getArchitecture()));
}
if (this.getCodeSigningConfig() != null) {
data.set("codeSigningConfig", om.valueToTree(this.getCodeSigningConfig()));
}
if (this.getCurrentVersionOptions() != null) {
data.set("currentVersionOptions", om.valueToTree(this.getCurrentVersionOptions()));
}
if (this.getDeadLetterQueue() != null) {
data.set("deadLetterQueue", om.valueToTree(this.getDeadLetterQueue()));
}
if (this.getDeadLetterQueueEnabled() != null) {
data.set("deadLetterQueueEnabled", om.valueToTree(this.getDeadLetterQueueEnabled()));
}
if (this.getDeadLetterTopic() != null) {
data.set("deadLetterTopic", om.valueToTree(this.getDeadLetterTopic()));
}
if (this.getDescription() != null) {
data.set("description", om.valueToTree(this.getDescription()));
}
if (this.getEnvironment() != null) {
data.set("environment", om.valueToTree(this.getEnvironment()));
}
if (this.getEnvironmentEncryption() != null) {
data.set("environmentEncryption", om.valueToTree(this.getEnvironmentEncryption()));
}
if (this.getEphemeralStorageSize() != null) {
data.set("ephemeralStorageSize", om.valueToTree(this.getEphemeralStorageSize()));
}
if (this.getEvents() != null) {
data.set("events", om.valueToTree(this.getEvents()));
}
if (this.getFilesystem() != null) {
data.set("filesystem", om.valueToTree(this.getFilesystem()));
}
if (this.getFunctionName() != null) {
data.set("functionName", om.valueToTree(this.getFunctionName()));
}
if (this.getInitialPolicy() != null) {
data.set("initialPolicy", om.valueToTree(this.getInitialPolicy()));
}
if (this.getInsightsVersion() != null) {
data.set("insightsVersion", om.valueToTree(this.getInsightsVersion()));
}
if (this.getLayers() != null) {
data.set("layers", om.valueToTree(this.getLayers()));
}
if (this.getLogFormat() != null) {
data.set("logFormat", om.valueToTree(this.getLogFormat()));
}
if (this.getLogGroup() != null) {
data.set("logGroup", om.valueToTree(this.getLogGroup()));
}
if (this.getLogRetention() != null) {
data.set("logRetention", om.valueToTree(this.getLogRetention()));
}
if (this.getLogRetentionRetryOptions() != null) {
data.set("logRetentionRetryOptions", om.valueToTree(this.getLogRetentionRetryOptions()));
}
if (this.getLogRetentionRole() != null) {
data.set("logRetentionRole", om.valueToTree(this.getLogRetentionRole()));
}
if (this.getMemorySize() != null) {
data.set("memorySize", om.valueToTree(this.getMemorySize()));
}
if (this.getParamsAndSecrets() != null) {
data.set("paramsAndSecrets", om.valueToTree(this.getParamsAndSecrets()));
}
if (this.getProfiling() != null) {
data.set("profiling", om.valueToTree(this.getProfiling()));
}
if (this.getProfilingGroup() != null) {
data.set("profilingGroup", om.valueToTree(this.getProfilingGroup()));
}
if (this.getReservedConcurrentExecutions() != null) {
data.set("reservedConcurrentExecutions", om.valueToTree(this.getReservedConcurrentExecutions()));
}
if (this.getRole() != null) {
data.set("role", om.valueToTree(this.getRole()));
}
if (this.getRuntimeManagementMode() != null) {
data.set("runtimeManagementMode", om.valueToTree(this.getRuntimeManagementMode()));
}
if (this.getSecurityGroups() != null) {
data.set("securityGroups", om.valueToTree(this.getSecurityGroups()));
}
if (this.getSnapStart() != null) {
data.set("snapStart", om.valueToTree(this.getSnapStart()));
}
if (this.getSystemLogLevel() != null) {
data.set("systemLogLevel", om.valueToTree(this.getSystemLogLevel()));
}
if (this.getTimeout() != null) {
data.set("timeout", om.valueToTree(this.getTimeout()));
}
if (this.getTracing() != null) {
data.set("tracing", om.valueToTree(this.getTracing()));
}
if (this.getVpc() != null) {
data.set("vpc", om.valueToTree(this.getVpc()));
}
if (this.getVpcSubnets() != null) {
data.set("vpcSubnets", om.valueToTree(this.getVpcSubnets()));
}
if (this.getMaxEventAge() != null) {
data.set("maxEventAge", om.valueToTree(this.getMaxEventAge()));
}
if (this.getOnFailure() != null) {
data.set("onFailure", om.valueToTree(this.getOnFailure()));
}
if (this.getOnSuccess() != null) {
data.set("onSuccess", om.valueToTree(this.getOnSuccess()));
}
if (this.getRetryAttempts() != null) {
data.set("retryAttempts", om.valueToTree(this.getRetryAttempts()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("@cdklabs/aws-lambda-rust.RustFunctionProps"));
struct.set("data", data);
final com.fasterxml.jackson.databind.node.ObjectNode obj = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
obj.set("$jsii.struct", struct);
return obj;
}
@Override
public final boolean equals(final Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
RustFunctionProps.Jsii$Proxy that = (RustFunctionProps.Jsii$Proxy) o;
if (this.binaryName != null ? !this.binaryName.equals(that.binaryName) : that.binaryName != null) return false;
if (this.bundling != null ? !this.bundling.equals(that.bundling) : that.bundling != null) return false;
if (this.entry != null ? !this.entry.equals(that.entry) : that.entry != null) return false;
if (this.projectRoot != null ? !this.projectRoot.equals(that.projectRoot) : that.projectRoot != null) return false;
if (this.runtime != null ? !this.runtime.equals(that.runtime) : that.runtime != null) return false;
if (this.adotInstrumentation != null ? !this.adotInstrumentation.equals(that.adotInstrumentation) : that.adotInstrumentation != null) return false;
if (this.allowAllOutbound != null ? !this.allowAllOutbound.equals(that.allowAllOutbound) : that.allowAllOutbound != null) return false;
if (this.allowPublicSubnet != null ? !this.allowPublicSubnet.equals(that.allowPublicSubnet) : that.allowPublicSubnet != null) return false;
if (this.applicationLogLevel != null ? !this.applicationLogLevel.equals(that.applicationLogLevel) : that.applicationLogLevel != null) return false;
if (this.architecture != null ? !this.architecture.equals(that.architecture) : that.architecture != null) return false;
if (this.codeSigningConfig != null ? !this.codeSigningConfig.equals(that.codeSigningConfig) : that.codeSigningConfig != null) return false;
if (this.currentVersionOptions != null ? !this.currentVersionOptions.equals(that.currentVersionOptions) : that.currentVersionOptions != null) return false;
if (this.deadLetterQueue != null ? !this.deadLetterQueue.equals(that.deadLetterQueue) : that.deadLetterQueue != null) return false;
if (this.deadLetterQueueEnabled != null ? !this.deadLetterQueueEnabled.equals(that.deadLetterQueueEnabled) : that.deadLetterQueueEnabled != null) return false;
if (this.deadLetterTopic != null ? !this.deadLetterTopic.equals(that.deadLetterTopic) : that.deadLetterTopic != null) return false;
if (this.description != null ? !this.description.equals(that.description) : that.description != null) return false;
if (this.environment != null ? !this.environment.equals(that.environment) : that.environment != null) return false;
if (this.environmentEncryption != null ? !this.environmentEncryption.equals(that.environmentEncryption) : that.environmentEncryption != null) return false;
if (this.ephemeralStorageSize != null ? !this.ephemeralStorageSize.equals(that.ephemeralStorageSize) : that.ephemeralStorageSize != null) return false;
if (this.events != null ? !this.events.equals(that.events) : that.events != null) return false;
if (this.filesystem != null ? !this.filesystem.equals(that.filesystem) : that.filesystem != null) return false;
if (this.functionName != null ? !this.functionName.equals(that.functionName) : that.functionName != null) return false;
if (this.initialPolicy != null ? !this.initialPolicy.equals(that.initialPolicy) : that.initialPolicy != null) return false;
if (this.insightsVersion != null ? !this.insightsVersion.equals(that.insightsVersion) : that.insightsVersion != null) return false;
if (this.layers != null ? !this.layers.equals(that.layers) : that.layers != null) return false;
if (this.logFormat != null ? !this.logFormat.equals(that.logFormat) : that.logFormat != null) return false;
if (this.logGroup != null ? !this.logGroup.equals(that.logGroup) : that.logGroup != null) return false;
if (this.logRetention != null ? !this.logRetention.equals(that.logRetention) : that.logRetention != null) return false;
if (this.logRetentionRetryOptions != null ? !this.logRetentionRetryOptions.equals(that.logRetentionRetryOptions) : that.logRetentionRetryOptions != null) return false;
if (this.logRetentionRole != null ? !this.logRetentionRole.equals(that.logRetentionRole) : that.logRetentionRole != null) return false;
if (this.memorySize != null ? !this.memorySize.equals(that.memorySize) : that.memorySize != null) return false;
if (this.paramsAndSecrets != null ? !this.paramsAndSecrets.equals(that.paramsAndSecrets) : that.paramsAndSecrets != null) return false;
if (this.profiling != null ? !this.profiling.equals(that.profiling) : that.profiling != null) return false;
if (this.profilingGroup != null ? !this.profilingGroup.equals(that.profilingGroup) : that.profilingGroup != null) return false;
if (this.reservedConcurrentExecutions != null ? !this.reservedConcurrentExecutions.equals(that.reservedConcurrentExecutions) : that.reservedConcurrentExecutions != null) return false;
if (this.role != null ? !this.role.equals(that.role) : that.role != null) return false;
if (this.runtimeManagementMode != null ? !this.runtimeManagementMode.equals(that.runtimeManagementMode) : that.runtimeManagementMode != null) return false;
if (this.securityGroups != null ? !this.securityGroups.equals(that.securityGroups) : that.securityGroups != null) return false;
if (this.snapStart != null ? !this.snapStart.equals(that.snapStart) : that.snapStart != null) return false;
if (this.systemLogLevel != null ? !this.systemLogLevel.equals(that.systemLogLevel) : that.systemLogLevel != null) return false;
if (this.timeout != null ? !this.timeout.equals(that.timeout) : that.timeout != null) return false;
if (this.tracing != null ? !this.tracing.equals(that.tracing) : that.tracing != null) return false;
if (this.vpc != null ? !this.vpc.equals(that.vpc) : that.vpc != null) return false;
if (this.vpcSubnets != null ? !this.vpcSubnets.equals(that.vpcSubnets) : that.vpcSubnets != null) return false;
if (this.maxEventAge != null ? !this.maxEventAge.equals(that.maxEventAge) : that.maxEventAge != null) return false;
if (this.onFailure != null ? !this.onFailure.equals(that.onFailure) : that.onFailure != null) return false;
if (this.onSuccess != null ? !this.onSuccess.equals(that.onSuccess) : that.onSuccess != null) return false;
return this.retryAttempts != null ? this.retryAttempts.equals(that.retryAttempts) : that.retryAttempts == null;
}
@Override
public final int hashCode() {
int result = this.binaryName != null ? this.binaryName.hashCode() : 0;
result = 31 * result + (this.bundling != null ? this.bundling.hashCode() : 0);
result = 31 * result + (this.entry != null ? this.entry.hashCode() : 0);
result = 31 * result + (this.projectRoot != null ? this.projectRoot.hashCode() : 0);
result = 31 * result + (this.runtime != null ? this.runtime.hashCode() : 0);
result = 31 * result + (this.adotInstrumentation != null ? this.adotInstrumentation.hashCode() : 0);
result = 31 * result + (this.allowAllOutbound != null ? this.allowAllOutbound.hashCode() : 0);
result = 31 * result + (this.allowPublicSubnet != null ? this.allowPublicSubnet.hashCode() : 0);
result = 31 * result + (this.applicationLogLevel != null ? this.applicationLogLevel.hashCode() : 0);
result = 31 * result + (this.architecture != null ? this.architecture.hashCode() : 0);
result = 31 * result + (this.codeSigningConfig != null ? this.codeSigningConfig.hashCode() : 0);
result = 31 * result + (this.currentVersionOptions != null ? this.currentVersionOptions.hashCode() : 0);
result = 31 * result + (this.deadLetterQueue != null ? this.deadLetterQueue.hashCode() : 0);
result = 31 * result + (this.deadLetterQueueEnabled != null ? this.deadLetterQueueEnabled.hashCode() : 0);
result = 31 * result + (this.deadLetterTopic != null ? this.deadLetterTopic.hashCode() : 0);
result = 31 * result + (this.description != null ? this.description.hashCode() : 0);
result = 31 * result + (this.environment != null ? this.environment.hashCode() : 0);
result = 31 * result + (this.environmentEncryption != null ? this.environmentEncryption.hashCode() : 0);
result = 31 * result + (this.ephemeralStorageSize != null ? this.ephemeralStorageSize.hashCode() : 0);
result = 31 * result + (this.events != null ? this.events.hashCode() : 0);
result = 31 * result + (this.filesystem != null ? this.filesystem.hashCode() : 0);
result = 31 * result + (this.functionName != null ? this.functionName.hashCode() : 0);
result = 31 * result + (this.initialPolicy != null ? this.initialPolicy.hashCode() : 0);
result = 31 * result + (this.insightsVersion != null ? this.insightsVersion.hashCode() : 0);
result = 31 * result + (this.layers != null ? this.layers.hashCode() : 0);
result = 31 * result + (this.logFormat != null ? this.logFormat.hashCode() : 0);
result = 31 * result + (this.logGroup != null ? this.logGroup.hashCode() : 0);
result = 31 * result + (this.logRetention != null ? this.logRetention.hashCode() : 0);
result = 31 * result + (this.logRetentionRetryOptions != null ? this.logRetentionRetryOptions.hashCode() : 0);
result = 31 * result + (this.logRetentionRole != null ? this.logRetentionRole.hashCode() : 0);
result = 31 * result + (this.memorySize != null ? this.memorySize.hashCode() : 0);
result = 31 * result + (this.paramsAndSecrets != null ? this.paramsAndSecrets.hashCode() : 0);
result = 31 * result + (this.profiling != null ? this.profiling.hashCode() : 0);
result = 31 * result + (this.profilingGroup != null ? this.profilingGroup.hashCode() : 0);
result = 31 * result + (this.reservedConcurrentExecutions != null ? this.reservedConcurrentExecutions.hashCode() : 0);
result = 31 * result + (this.role != null ? this.role.hashCode() : 0);
result = 31 * result + (this.runtimeManagementMode != null ? this.runtimeManagementMode.hashCode() : 0);
result = 31 * result + (this.securityGroups != null ? this.securityGroups.hashCode() : 0);
result = 31 * result + (this.snapStart != null ? this.snapStart.hashCode() : 0);
result = 31 * result + (this.systemLogLevel != null ? this.systemLogLevel.hashCode() : 0);
result = 31 * result + (this.timeout != null ? this.timeout.hashCode() : 0);
result = 31 * result + (this.tracing != null ? this.tracing.hashCode() : 0);
result = 31 * result + (this.vpc != null ? this.vpc.hashCode() : 0);
result = 31 * result + (this.vpcSubnets != null ? this.vpcSubnets.hashCode() : 0);
result = 31 * result + (this.maxEventAge != null ? this.maxEventAge.hashCode() : 0);
result = 31 * result + (this.onFailure != null ? this.onFailure.hashCode() : 0);
result = 31 * result + (this.onSuccess != null ? this.onSuccess.hashCode() : 0);
result = 31 * result + (this.retryAttempts != null ? this.retryAttempts.hashCode() : 0);
return result;
}
}
}