
commonMain.aws.sdk.kotlin.services.ses.model.CreateTemplateRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.ses.model
/**
* Represents a request to create an email template. For more information, see the [Amazon SES Developer Guide](https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-personalized-email-api.html).
*/
public class CreateTemplateRequest private constructor(builder: Builder) {
/**
* The content of the email, composed of a subject line, an HTML part, and a text-only part.
*/
public val template: aws.sdk.kotlin.services.ses.model.Template? = builder.template
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.ses.model.CreateTemplateRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateTemplateRequest(")
append("template=$template)")
}
override fun hashCode(): kotlin.Int {
var result = template?.hashCode() ?: 0
return result
}
override fun equals(other: kotlin.Any?): kotlin.Boolean {
if (this === other) return true
if (other == null || this::class != other::class) return false
other as CreateTemplateRequest
if (template != other.template) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.ses.model.CreateTemplateRequest = Builder(this).apply(block).build()
public class Builder {
/**
* The content of the email, composed of a subject line, an HTML part, and a text-only part.
*/
public var template: aws.sdk.kotlin.services.ses.model.Template? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.ses.model.CreateTemplateRequest) : this() {
this.template = x.template
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.ses.model.CreateTemplateRequest = CreateTemplateRequest(this)
/**
* construct an [aws.sdk.kotlin.services.ses.model.Template] inside the given [block]
*/
public fun template(block: aws.sdk.kotlin.services.ses.model.Template.Builder.() -> kotlin.Unit) {
this.template = aws.sdk.kotlin.services.ses.model.Template.invoke(block)
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy