io.github.cdklabs.cdk.amazonmq.BrokerConfigurationAttributes Maven / Gradle / Ivy
package io.github.cdklabs.cdk.amazonmq;
/**
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.102.0 (build e354887)", date = "2024-08-08T22:30:31.774Z")
@software.amazon.jsii.Jsii(module = io.github.cdklabs.cdk.amazonmq.$Module.class, fqn = "@cdklabs/cdk-amazonmq.BrokerConfigurationAttributes")
@software.amazon.jsii.Jsii.Proxy(BrokerConfigurationAttributes.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface BrokerConfigurationAttributes extends software.amazon.jsii.JsiiSerializable {
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@org.jetbrains.annotations.NotNull java.lang.Number getRevision();
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.String getArn() {
return null;
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.String getId() {
return null;
}
/**
* @return a {@link Builder} of {@link BrokerConfigurationAttributes}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link BrokerConfigurationAttributes}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static final class Builder implements software.amazon.jsii.Builder {
java.lang.Number revision;
java.lang.String arn;
java.lang.String id;
/**
* Sets the value of {@link BrokerConfigurationAttributes#getRevision}
* @param revision the value to be set. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder revision(java.lang.Number revision) {
this.revision = revision;
return this;
}
/**
* Sets the value of {@link BrokerConfigurationAttributes#getArn}
* @param arn the value to be set.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder arn(java.lang.String arn) {
this.arn = arn;
return this;
}
/**
* Sets the value of {@link BrokerConfigurationAttributes#getId}
* @param id the value to be set.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder id(java.lang.String id) {
this.id = id;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link BrokerConfigurationAttributes}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public BrokerConfigurationAttributes build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link BrokerConfigurationAttributes}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements BrokerConfigurationAttributes {
private final java.lang.Number revision;
private final java.lang.String arn;
private final java.lang.String id;
/**
* 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.revision = software.amazon.jsii.Kernel.get(this, "revision", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));
this.arn = software.amazon.jsii.Kernel.get(this, "arn", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.id = software.amazon.jsii.Kernel.get(this, "id", 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.revision = java.util.Objects.requireNonNull(builder.revision, "revision is required");
this.arn = builder.arn;
this.id = builder.id;
}
@Override
public final java.lang.Number getRevision() {
return this.revision;
}
@Override
public final java.lang.String getArn() {
return this.arn;
}
@Override
public final java.lang.String getId() {
return this.id;
}
@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("revision", om.valueToTree(this.getRevision()));
if (this.getArn() != null) {
data.set("arn", om.valueToTree(this.getArn()));
}
if (this.getId() != null) {
data.set("id", om.valueToTree(this.getId()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("@cdklabs/cdk-amazonmq.BrokerConfigurationAttributes"));
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;
BrokerConfigurationAttributes.Jsii$Proxy that = (BrokerConfigurationAttributes.Jsii$Proxy) o;
if (!revision.equals(that.revision)) return false;
if (this.arn != null ? !this.arn.equals(that.arn) : that.arn != null) return false;
return this.id != null ? this.id.equals(that.id) : that.id == null;
}
@Override
public final int hashCode() {
int result = this.revision.hashCode();
result = 31 * result + (this.arn != null ? this.arn.hashCode() : 0);
result = 31 * result + (this.id != null ? this.id.hashCode() : 0);
return result;
}
}
}