software.amazon.awscdk.services.lambda.CfnLayerVersionProps Maven / Gradle / Ivy
package software.amazon.awscdk.services.lambda;
/**
* Properties for defining a `AWS::Lambda::LayerVersion`.
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.24.0 (build b722f66)", date = "2021-03-16T15:04:57.344Z")
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.lambda.$Module.class, fqn = "@aws-cdk/aws-lambda.CfnLayerVersionProps")
@software.amazon.jsii.Jsii.Proxy(CfnLayerVersionProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface CfnLayerVersionProps extends software.amazon.jsii.JsiiSerializable {
/**
* `AWS::Lambda::LayerVersion.Content`.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@org.jetbrains.annotations.NotNull java.lang.Object getContent();
/**
* `AWS::Lambda::LayerVersion.CompatibleRuntimes`.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.util.List getCompatibleRuntimes() {
return null;
}
/**
* `AWS::Lambda::LayerVersion.Description`.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getDescription() {
return null;
}
/**
* `AWS::Lambda::LayerVersion.LayerName`.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getLayerName() {
return null;
}
/**
* `AWS::Lambda::LayerVersion.LicenseInfo`.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getLicenseInfo() {
return null;
}
/**
* @return a {@link Builder} of {@link CfnLayerVersionProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link CfnLayerVersionProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
private java.lang.Object content;
private java.util.List compatibleRuntimes;
private java.lang.String description;
private java.lang.String layerName;
private java.lang.String licenseInfo;
/**
* Sets the value of {@link CfnLayerVersionProps#getContent}
* @param content `AWS::Lambda::LayerVersion.Content`. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder content(software.amazon.awscdk.core.IResolvable content) {
this.content = content;
return this;
}
/**
* Sets the value of {@link CfnLayerVersionProps#getContent}
* @param content `AWS::Lambda::LayerVersion.Content`. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder content(software.amazon.awscdk.services.lambda.CfnLayerVersion.ContentProperty content) {
this.content = content;
return this;
}
/**
* Sets the value of {@link CfnLayerVersionProps#getCompatibleRuntimes}
* @param compatibleRuntimes `AWS::Lambda::LayerVersion.CompatibleRuntimes`.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder compatibleRuntimes(java.util.List compatibleRuntimes) {
this.compatibleRuntimes = compatibleRuntimes;
return this;
}
/**
* Sets the value of {@link CfnLayerVersionProps#getDescription}
* @param description `AWS::Lambda::LayerVersion.Description`.
* @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 CfnLayerVersionProps#getLayerName}
* @param layerName `AWS::Lambda::LayerVersion.LayerName`.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder layerName(java.lang.String layerName) {
this.layerName = layerName;
return this;
}
/**
* Sets the value of {@link CfnLayerVersionProps#getLicenseInfo}
* @param licenseInfo `AWS::Lambda::LayerVersion.LicenseInfo`.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder licenseInfo(java.lang.String licenseInfo) {
this.licenseInfo = licenseInfo;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link CfnLayerVersionProps}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public CfnLayerVersionProps build() {
return new Jsii$Proxy(content, compatibleRuntimes, description, layerName, licenseInfo);
}
}
/**
* An implementation for {@link CfnLayerVersionProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements CfnLayerVersionProps {
private final java.lang.Object content;
private final java.util.List compatibleRuntimes;
private final java.lang.String description;
private final java.lang.String layerName;
private final java.lang.String licenseInfo;
/**
* 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.content = software.amazon.jsii.Kernel.get(this, "content", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
this.compatibleRuntimes = software.amazon.jsii.Kernel.get(this, "compatibleRuntimes", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)));
this.description = software.amazon.jsii.Kernel.get(this, "description", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.layerName = software.amazon.jsii.Kernel.get(this, "layerName", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.licenseInfo = software.amazon.jsii.Kernel.get(this, "licenseInfo", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* Constructor that initializes the object based on literal property values passed by the {@link Builder}.
*/
protected Jsii$Proxy(final java.lang.Object content, final java.util.List compatibleRuntimes, final java.lang.String description, final java.lang.String layerName, final java.lang.String licenseInfo) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
this.content = java.util.Objects.requireNonNull(content, "content is required");
this.compatibleRuntimes = compatibleRuntimes;
this.description = description;
this.layerName = layerName;
this.licenseInfo = licenseInfo;
}
@Override
public final java.lang.Object getContent() {
return this.content;
}
@Override
public final java.util.List getCompatibleRuntimes() {
return this.compatibleRuntimes;
}
@Override
public final java.lang.String getDescription() {
return this.description;
}
@Override
public final java.lang.String getLayerName() {
return this.layerName;
}
@Override
public final java.lang.String getLicenseInfo() {
return this.licenseInfo;
}
@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();
data.set("content", om.valueToTree(this.getContent()));
if (this.getCompatibleRuntimes() != null) {
data.set("compatibleRuntimes", om.valueToTree(this.getCompatibleRuntimes()));
}
if (this.getDescription() != null) {
data.set("description", om.valueToTree(this.getDescription()));
}
if (this.getLayerName() != null) {
data.set("layerName", om.valueToTree(this.getLayerName()));
}
if (this.getLicenseInfo() != null) {
data.set("licenseInfo", om.valueToTree(this.getLicenseInfo()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("@aws-cdk/aws-lambda.CfnLayerVersionProps"));
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;
CfnLayerVersionProps.Jsii$Proxy that = (CfnLayerVersionProps.Jsii$Proxy) o;
if (!content.equals(that.content)) return false;
if (this.compatibleRuntimes != null ? !this.compatibleRuntimes.equals(that.compatibleRuntimes) : that.compatibleRuntimes != null) return false;
if (this.description != null ? !this.description.equals(that.description) : that.description != null) return false;
if (this.layerName != null ? !this.layerName.equals(that.layerName) : that.layerName != null) return false;
return this.licenseInfo != null ? this.licenseInfo.equals(that.licenseInfo) : that.licenseInfo == null;
}
@Override
public final int hashCode() {
int result = this.content.hashCode();
result = 31 * result + (this.compatibleRuntimes != null ? this.compatibleRuntimes.hashCode() : 0);
result = 31 * result + (this.description != null ? this.description.hashCode() : 0);
result = 31 * result + (this.layerName != null ? this.layerName.hashCode() : 0);
result = 31 * result + (this.licenseInfo != null ? this.licenseInfo.hashCode() : 0);
return result;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy