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

software.amazon.awscdk.cxapi.MetadataEntry Maven / Gradle / Ivy

There is a newer version: 2.167.1
Show newest version
package software.amazon.awscdk.cxapi;

/**
 * (deprecated) Backwards compatibility for when MetadataEntry was defined here.
 * 

* This is necessary because its used as an input in the stable *

* Example: *

*

 * // The code below shows an example of how to instantiate this type.
 * // The values are placeholders you should change.
 * import software.amazon.awscdk.cxapi.*;
 * MetadataEntry metadataEntry = MetadataEntry.builder()
 *         .type("type")
 *         // the properties below are optional
 *         .data("data")
 *         .trace(List.of("trace"))
 *         .build();
 * 
*

* @see core.ConstructNode.metadata * @deprecated moved to package 'cloud-assembly-schema' */ @javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-18T22:16:50.422Z") @software.amazon.jsii.Jsii(module = software.amazon.awscdk.cxapi.$Module.class, fqn = "@aws-cdk/cx-api.MetadataEntry") @software.amazon.jsii.Jsii.Proxy(MetadataEntry.Jsii$Proxy.class) @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) @Deprecated public interface MetadataEntry extends software.amazon.jsii.JsiiSerializable, software.amazon.awscdk.cloudassembly.schema.MetadataEntry { /** * @return a {@link Builder} of {@link MetadataEntry} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) @Deprecated static Builder builder() { return new Builder(); } /** * A builder for {@link MetadataEntry} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) @Deprecated public static final class Builder implements software.amazon.jsii.Builder { java.lang.String type; java.lang.Object data; java.util.List trace; /** * Sets the value of {@link MetadataEntry#getType} * @param type The type of the metadata entry. This parameter is required. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder type(java.lang.String type) { this.type = type; return this; } /** * Sets the value of {@link MetadataEntry#getData} * @param data The data. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder data(java.lang.String data) { this.data = data; return this; } /** * Sets the value of {@link MetadataEntry#getData} * @param data The data. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder data(software.amazon.awscdk.cloudassembly.schema.FileAssetMetadataEntry data) { this.data = data; return this; } /** * Sets the value of {@link MetadataEntry#getData} * @param data The data. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder data(software.amazon.awscdk.cloudassembly.schema.ContainerImageAssetMetadataEntry data) { this.data = data; return this; } /** * Sets the value of {@link MetadataEntry#getData} * @param data The data. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder data(java.util.List data) { this.data = data; return this; } /** * Sets the value of {@link MetadataEntry#getTrace} * @param trace A stack trace for when the entry was created. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder trace(java.util.List trace) { this.trace = trace; return this; } /** * Builds the configured instance. * @return a new instance of {@link MetadataEntry} * @throws NullPointerException if any required attribute was not provided */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) @Deprecated @Override public MetadataEntry build() { return new Jsii$Proxy(this); } } /** * An implementation for {@link MetadataEntry} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) @Deprecated @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements MetadataEntry { private final java.lang.String type; private final java.lang.Object data; private final java.util.List trace; /** * 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.type = software.amazon.jsii.Kernel.get(this, "type", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.data = software.amazon.jsii.Kernel.get(this, "data", software.amazon.jsii.NativeType.forClass(java.lang.Object.class)); this.trace = software.amazon.jsii.Kernel.get(this, "trace", software.amazon.jsii.NativeType.listOf(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 Builder builder) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.type = java.util.Objects.requireNonNull(builder.type, "type is required"); this.data = builder.data; this.trace = builder.trace; } @Override public final java.lang.String getType() { return this.type; } @Override public final java.lang.Object getData() { return this.data; } @Override public final java.util.List getTrace() { return this.trace; } @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("type", om.valueToTree(this.getType())); if (this.getData() != null) { data.set("data", om.valueToTree(this.getData())); } if (this.getTrace() != null) { data.set("trace", om.valueToTree(this.getTrace())); } final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); struct.set("fqn", om.valueToTree("@aws-cdk/cx-api.MetadataEntry")); 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; MetadataEntry.Jsii$Proxy that = (MetadataEntry.Jsii$Proxy) o; if (!type.equals(that.type)) return false; if (this.data != null ? !this.data.equals(that.data) : that.data != null) return false; return this.trace != null ? this.trace.equals(that.trace) : that.trace == null; } @Override public final int hashCode() { int result = this.type.hashCode(); result = 31 * result + (this.data != null ? this.data.hashCode() : 0); result = 31 * result + (this.trace != null ? this.trace.hashCode() : 0); return result; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy