All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.cloudsnorkel.cdk.turbo_layers.DependencyPackagerProps Maven / Gradle / Ivy

package com.cloudsnorkel.cdk.turbo_layers;

/**
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-07T13:40:26.569Z")
@software.amazon.jsii.Jsii(module = com.cloudsnorkel.cdk.turbo_layers.$Module.class, fqn = "@cloudsnorkel/cdk-turbo-layers.DependencyPackagerProps")
@software.amazon.jsii.Jsii.Proxy(DependencyPackagerProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface DependencyPackagerProps extends software.amazon.jsii.JsiiSerializable {

    /**
     * (experimental) Target Lambda architecture.
     * 

* Packages will be installed for this architecture so make sure it fits your Lambda functions. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.lambda.Architecture getArchitecture() { return null; } /** * (experimental) Removal policy for logs of image builds. *

* If deployment fails on the custom resource, try setting this to RemovalPolicy.RETAIN. This way the CodeBuild logs can still be viewed, and you can see why the build failed. *

* We try to not leave anything behind when removed. But sometimes a log staying behind is useful. *

* Default: RemovalPolicy.DESTROY */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable software.amazon.awscdk.RemovalPolicy getLogRemovalPolicy() { return null; } /** * (experimental) 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. *

* Default: logs.RetentionDays.ONE_MONTH */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.logs.RetentionDays getLogRetention() { return null; } /** * (experimental) Additional commands to run before installing packages. *

* Use this to authenticate your package repositories like CodeArtifact. *

* Default: [] */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.util.List getPreinstallCommands() { return null; } /** * (experimental) Target Lambda runtime. *

* Packages will be installed for this runtime so make sure it fits your Lambda functions. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.lambda.Runtime getRuntime() { return null; } /** * (experimental) VPC subnets used for packager. *

* Default: default subnets, if VPC is used */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.ec2.SubnetSelection getSubnetSelection() { return null; } /** * (experimental) Type of dependency packager. *

* Use Lambda for speed and CodeBuild for complex dependencies that require building native extensions. *

* Default: {@link DependencyPackagerType.LAMBDA} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable com.cloudsnorkel.cdk.turbo_layers.DependencyPackagerType getType() { return null; } /** * (experimental) VPC used for packager. *

* Use this if your package repositories are only available from within a VPC. *

* Default: no VPC */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.ec2.IVpc getVpc() { return null; } /** * @return a {@link Builder} of {@link DependencyPackagerProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) static Builder builder() { return new Builder(); } /** * A builder for {@link DependencyPackagerProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static final class Builder implements software.amazon.jsii.Builder { software.amazon.awscdk.services.lambda.Architecture architecture; software.amazon.awscdk.RemovalPolicy logRemovalPolicy; software.amazon.awscdk.services.logs.RetentionDays logRetention; java.util.List preinstallCommands; software.amazon.awscdk.services.lambda.Runtime runtime; software.amazon.awscdk.services.ec2.SubnetSelection subnetSelection; com.cloudsnorkel.cdk.turbo_layers.DependencyPackagerType type; software.amazon.awscdk.services.ec2.IVpc vpc; /** * Sets the value of {@link DependencyPackagerProps#getArchitecture} * @param architecture Target Lambda architecture. * Packages will be installed for this architecture so make sure it fits your Lambda functions. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder architecture(software.amazon.awscdk.services.lambda.Architecture architecture) { this.architecture = architecture; return this; } /** * Sets the value of {@link DependencyPackagerProps#getLogRemovalPolicy} * @param logRemovalPolicy Removal policy for logs of image builds. * If deployment fails on the custom resource, try setting this to RemovalPolicy.RETAIN. This way the CodeBuild logs can still be viewed, and you can see why the build failed. *

* We try to not leave anything behind when removed. But sometimes a log staying behind is useful. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder logRemovalPolicy(software.amazon.awscdk.RemovalPolicy logRemovalPolicy) { this.logRemovalPolicy = logRemovalPolicy; return this; } /** * Sets the value of {@link DependencyPackagerProps#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.Experimental) public Builder logRetention(software.amazon.awscdk.services.logs.RetentionDays logRetention) { this.logRetention = logRetention; return this; } /** * Sets the value of {@link DependencyPackagerProps#getPreinstallCommands} * @param preinstallCommands Additional commands to run before installing packages. * Use this to authenticate your package repositories like CodeArtifact. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder preinstallCommands(java.util.List preinstallCommands) { this.preinstallCommands = preinstallCommands; return this; } /** * Sets the value of {@link DependencyPackagerProps#getRuntime} * @param runtime Target Lambda runtime. * Packages will be installed for this runtime so make sure it fits your Lambda functions. * @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 DependencyPackagerProps#getSubnetSelection} * @param subnetSelection VPC subnets used for packager. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder subnetSelection(software.amazon.awscdk.services.ec2.SubnetSelection subnetSelection) { this.subnetSelection = subnetSelection; return this; } /** * Sets the value of {@link DependencyPackagerProps#getType} * @param type Type of dependency packager. * Use Lambda for speed and CodeBuild for complex dependencies that require building native extensions. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder type(com.cloudsnorkel.cdk.turbo_layers.DependencyPackagerType type) { this.type = type; return this; } /** * Sets the value of {@link DependencyPackagerProps#getVpc} * @param vpc VPC used for packager. * Use this if your package repositories are only available from within a VPC. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder vpc(software.amazon.awscdk.services.ec2.IVpc vpc) { this.vpc = vpc; return this; } /** * Builds the configured instance. * @return a new instance of {@link DependencyPackagerProps} * @throws NullPointerException if any required attribute was not provided */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public DependencyPackagerProps build() { return new Jsii$Proxy(this); } } /** * An implementation for {@link DependencyPackagerProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements DependencyPackagerProps { private final software.amazon.awscdk.services.lambda.Architecture architecture; private final software.amazon.awscdk.RemovalPolicy logRemovalPolicy; private final software.amazon.awscdk.services.logs.RetentionDays logRetention; private final java.util.List preinstallCommands; private final software.amazon.awscdk.services.lambda.Runtime runtime; private final software.amazon.awscdk.services.ec2.SubnetSelection subnetSelection; private final com.cloudsnorkel.cdk.turbo_layers.DependencyPackagerType type; private final software.amazon.awscdk.services.ec2.IVpc vpc; /** * 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.architecture = software.amazon.jsii.Kernel.get(this, "architecture", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.lambda.Architecture.class)); this.logRemovalPolicy = software.amazon.jsii.Kernel.get(this, "logRemovalPolicy", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.RemovalPolicy.class)); this.logRetention = software.amazon.jsii.Kernel.get(this, "logRetention", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.logs.RetentionDays.class)); this.preinstallCommands = software.amazon.jsii.Kernel.get(this, "preinstallCommands", software.amazon.jsii.NativeType.listOf(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.subnetSelection = software.amazon.jsii.Kernel.get(this, "subnetSelection", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.SubnetSelection.class)); this.type = software.amazon.jsii.Kernel.get(this, "type", software.amazon.jsii.NativeType.forClass(com.cloudsnorkel.cdk.turbo_layers.DependencyPackagerType.class)); this.vpc = software.amazon.jsii.Kernel.get(this, "vpc", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.IVpc.class)); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ protected Jsii$Proxy(final Builder builder) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.architecture = builder.architecture; this.logRemovalPolicy = builder.logRemovalPolicy; this.logRetention = builder.logRetention; this.preinstallCommands = builder.preinstallCommands; this.runtime = builder.runtime; this.subnetSelection = builder.subnetSelection; this.type = builder.type; this.vpc = builder.vpc; } @Override public final software.amazon.awscdk.services.lambda.Architecture getArchitecture() { return this.architecture; } @Override public final software.amazon.awscdk.RemovalPolicy getLogRemovalPolicy() { return this.logRemovalPolicy; } @Override public final software.amazon.awscdk.services.logs.RetentionDays getLogRetention() { return this.logRetention; } @Override public final java.util.List getPreinstallCommands() { return this.preinstallCommands; } @Override public final software.amazon.awscdk.services.lambda.Runtime getRuntime() { return this.runtime; } @Override public final software.amazon.awscdk.services.ec2.SubnetSelection getSubnetSelection() { return this.subnetSelection; } @Override public final com.cloudsnorkel.cdk.turbo_layers.DependencyPackagerType getType() { return this.type; } @Override public final software.amazon.awscdk.services.ec2.IVpc getVpc() { return this.vpc; } @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.getArchitecture() != null) { data.set("architecture", om.valueToTree(this.getArchitecture())); } if (this.getLogRemovalPolicy() != null) { data.set("logRemovalPolicy", om.valueToTree(this.getLogRemovalPolicy())); } if (this.getLogRetention() != null) { data.set("logRetention", om.valueToTree(this.getLogRetention())); } if (this.getPreinstallCommands() != null) { data.set("preinstallCommands", om.valueToTree(this.getPreinstallCommands())); } if (this.getRuntime() != null) { data.set("runtime", om.valueToTree(this.getRuntime())); } if (this.getSubnetSelection() != null) { data.set("subnetSelection", om.valueToTree(this.getSubnetSelection())); } if (this.getType() != null) { data.set("type", om.valueToTree(this.getType())); } if (this.getVpc() != null) { data.set("vpc", om.valueToTree(this.getVpc())); } final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); struct.set("fqn", om.valueToTree("@cloudsnorkel/cdk-turbo-layers.DependencyPackagerProps")); 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; DependencyPackagerProps.Jsii$Proxy that = (DependencyPackagerProps.Jsii$Proxy) o; if (this.architecture != null ? !this.architecture.equals(that.architecture) : that.architecture != null) return false; if (this.logRemovalPolicy != null ? !this.logRemovalPolicy.equals(that.logRemovalPolicy) : that.logRemovalPolicy != null) return false; if (this.logRetention != null ? !this.logRetention.equals(that.logRetention) : that.logRetention != null) return false; if (this.preinstallCommands != null ? !this.preinstallCommands.equals(that.preinstallCommands) : that.preinstallCommands != null) return false; if (this.runtime != null ? !this.runtime.equals(that.runtime) : that.runtime != null) return false; if (this.subnetSelection != null ? !this.subnetSelection.equals(that.subnetSelection) : that.subnetSelection != null) return false; if (this.type != null ? !this.type.equals(that.type) : that.type != null) return false; return this.vpc != null ? this.vpc.equals(that.vpc) : that.vpc == null; } @Override public final int hashCode() { int result = this.architecture != null ? this.architecture.hashCode() : 0; result = 31 * result + (this.logRemovalPolicy != null ? this.logRemovalPolicy.hashCode() : 0); result = 31 * result + (this.logRetention != null ? this.logRetention.hashCode() : 0); result = 31 * result + (this.preinstallCommands != null ? this.preinstallCommands.hashCode() : 0); result = 31 * result + (this.runtime != null ? this.runtime.hashCode() : 0); result = 31 * result + (this.subnetSelection != null ? this.subnetSelection.hashCode() : 0); result = 31 * result + (this.type != null ? this.type.hashCode() : 0); result = 31 * result + (this.vpc != null ? this.vpc.hashCode() : 0); return result; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy