io.github.jogold.cloudstructs.MjmlTemplate Maven / Gradle / Ivy
Show all versions of cloudstructs Show documentation
package io.github.jogold.cloudstructs;
/**
* SES email template from MJML.
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-23T12:43:48.157Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Jsii(module = io.github.jogold.cloudstructs.$Module.class, fqn = "cloudstructs.MjmlTemplate")
public class MjmlTemplate extends software.constructs.Construct {
protected MjmlTemplate(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected MjmlTemplate(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
/**
* @param scope This parameter is required.
* @param id This parameter is required.
* @param props This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public MjmlTemplate(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull io.github.jogold.cloudstructs.MjmlTemplateProps props) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(props, "props is required") });
}
/**
* The name of the template.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.lang.String getTemplateName() {
return software.amazon.jsii.Kernel.get(this, "templateName", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* A fluent builder for {@link io.github.jogold.cloudstructs.MjmlTemplate}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
/**
* @return a new instance of {@link Builder}.
* @param scope This parameter is required.
* @param id This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static Builder create(final software.constructs.Construct scope, final java.lang.String id) {
return new Builder(scope, id);
}
private final software.constructs.Construct scope;
private final java.lang.String id;
private final io.github.jogold.cloudstructs.MjmlTemplateProps.Builder props;
private Builder(final software.constructs.Construct scope, final java.lang.String id) {
this.scope = scope;
this.id = id;
this.props = new io.github.jogold.cloudstructs.MjmlTemplateProps.Builder();
}
/**
* The MJML for the email.
*
* @return {@code this}
* @param mjml The MJML for the email. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder mjml(final java.lang.String mjml) {
this.props.mjml(mjml);
return this;
}
/**
* The subject line of the email.
*
* @return {@code this}
* @param subject The subject line of the email. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder subject(final java.lang.String subject) {
this.props.subject(subject);
return this;
}
/**
* The name of the template.
*
* Default: - a CloudFormation generated name
*
* @return {@code this}
* @param templateName The name of the template. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder templateName(final java.lang.String templateName) {
this.props.templateName(templateName);
return this;
}
/**
* @return a newly built instance of {@link io.github.jogold.cloudstructs.MjmlTemplate}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public io.github.jogold.cloudstructs.MjmlTemplate build() {
return new io.github.jogold.cloudstructs.MjmlTemplate(
this.scope,
this.id,
this.props.build()
);
}
}
}