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

software.amazon.awscdk.services.ses.actions.BounceTemplateProps Maven / Gradle / Ivy

package software.amazon.awscdk.services.ses.actions;

/**
 * (experimental) Construction properties for a BounceTemplate.
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.24.0 (build b722f66)", date = "2021-03-11T13:46:51.627Z")
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.ses.actions.$Module.class, fqn = "@aws-cdk/aws-ses-actions.BounceTemplateProps")
@software.amazon.jsii.Jsii.Proxy(BounceTemplateProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface BounceTemplateProps extends software.amazon.jsii.JsiiSerializable {

    /**
     * (experimental) Human-readable text to include in the bounce message.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    @org.jetbrains.annotations.NotNull java.lang.String getMessage();

    /**
     * (experimental) The SMTP reply code, as defined by RFC 5321.
     * 

* @see https://tools.ietf.org/html/rfc5321 */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @org.jetbrains.annotations.NotNull java.lang.String getSmtpReplyCode(); /** * (experimental) The SMTP enhanced status code, as defined by RFC 3463. *

* @see https://tools.ietf.org/html/rfc3463 */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.lang.String getStatusCode() { return null; } /** * @return a {@link Builder} of {@link BounceTemplateProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) static Builder builder() { return new Builder(); } /** * A builder for {@link BounceTemplateProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static final class Builder implements software.amazon.jsii.Builder { private java.lang.String message; private java.lang.String smtpReplyCode; private java.lang.String statusCode; /** * Sets the value of {@link BounceTemplateProps#getMessage} * @param message Human-readable text to include in the bounce message. This parameter is required. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder message(java.lang.String message) { this.message = message; return this; } /** * Sets the value of {@link BounceTemplateProps#getSmtpReplyCode} * @param smtpReplyCode The SMTP reply code, as defined by RFC 5321. This parameter is required. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder smtpReplyCode(java.lang.String smtpReplyCode) { this.smtpReplyCode = smtpReplyCode; return this; } /** * Sets the value of {@link BounceTemplateProps#getStatusCode} * @param statusCode The SMTP enhanced status code, as defined by RFC 3463. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder statusCode(java.lang.String statusCode) { this.statusCode = statusCode; return this; } /** * Builds the configured instance. * @return a new instance of {@link BounceTemplateProps} * @throws NullPointerException if any required attribute was not provided */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public BounceTemplateProps build() { return new Jsii$Proxy(message, smtpReplyCode, statusCode); } } /** * An implementation for {@link BounceTemplateProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements BounceTemplateProps { private final java.lang.String message; private final java.lang.String smtpReplyCode; private final java.lang.String statusCode; /** * 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.message = software.amazon.jsii.Kernel.get(this, "message", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.smtpReplyCode = software.amazon.jsii.Kernel.get(this, "smtpReplyCode", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.statusCode = software.amazon.jsii.Kernel.get(this, "statusCode", 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.String message, final java.lang.String smtpReplyCode, final java.lang.String statusCode) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.message = java.util.Objects.requireNonNull(message, "message is required"); this.smtpReplyCode = java.util.Objects.requireNonNull(smtpReplyCode, "smtpReplyCode is required"); this.statusCode = statusCode; } @Override public final java.lang.String getMessage() { return this.message; } @Override public final java.lang.String getSmtpReplyCode() { return this.smtpReplyCode; } @Override public final java.lang.String getStatusCode() { return this.statusCode; } @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("message", om.valueToTree(this.getMessage())); data.set("smtpReplyCode", om.valueToTree(this.getSmtpReplyCode())); if (this.getStatusCode() != null) { data.set("statusCode", om.valueToTree(this.getStatusCode())); } final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); struct.set("fqn", om.valueToTree("@aws-cdk/aws-ses-actions.BounceTemplateProps")); 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; BounceTemplateProps.Jsii$Proxy that = (BounceTemplateProps.Jsii$Proxy) o; if (!message.equals(that.message)) return false; if (!smtpReplyCode.equals(that.smtpReplyCode)) return false; return this.statusCode != null ? this.statusCode.equals(that.statusCode) : that.statusCode == null; } @Override public final int hashCode() { int result = this.message.hashCode(); result = 31 * result + (this.smtpReplyCode.hashCode()); result = 31 * result + (this.statusCode != null ? this.statusCode.hashCode() : 0); return result; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy