
commonMain.aws.sdk.kotlin.services.amplify.model.Certificate.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.amplify.model
/**
* Describes the current SSL/TLS certificate that is in use for the domain. If you are using `CreateDomainAssociation` to create a new domain association, `Certificate` describes the new certificate that you are creating.
*/
public class Certificate private constructor(builder: Builder) {
/**
* The DNS record for certificate verification.
*/
public val certificateVerificationDnsRecord: kotlin.String? = builder.certificateVerificationDnsRecord
/**
* The Amazon resource name (ARN) for a custom certificate that you have already added to Certificate Manager in your Amazon Web Services account.
*
* This field is required only when the certificate type is `CUSTOM`.
*/
public val customCertificateArn: kotlin.String? = builder.customCertificateArn
/**
* The type of SSL/TLS certificate that you want to use.
*
* Specify `AMPLIFY_MANAGED` to use the default certificate that Amplify provisions for you.
*
* Specify `CUSTOM` to use your own certificate that you have already added to Certificate Manager in your Amazon Web Services account. Make sure you request (or import) the certificate in the US East (N. Virginia) Region (us-east-1). For more information about using ACM, see [Importing certificates into Certificate Manager](https://docs.aws.amazon.com/acm/latest/userguide/import-certificate.html) in the *ACM User guide* .
*/
public val type: aws.sdk.kotlin.services.amplify.model.CertificateType = requireNotNull(builder.type) { "A non-null value must be provided for type" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.amplify.model.Certificate = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Certificate(")
append("certificateVerificationDnsRecord=$certificateVerificationDnsRecord,")
append("customCertificateArn=$customCertificateArn,")
append("type=$type")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = certificateVerificationDnsRecord?.hashCode() ?: 0
result = 31 * result + (customCertificateArn?.hashCode() ?: 0)
result = 31 * result + (type.hashCode())
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 Certificate
if (certificateVerificationDnsRecord != other.certificateVerificationDnsRecord) return false
if (customCertificateArn != other.customCertificateArn) return false
if (type != other.type) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.amplify.model.Certificate = Builder(this).apply(block).build()
public class Builder {
/**
* The DNS record for certificate verification.
*/
public var certificateVerificationDnsRecord: kotlin.String? = null
/**
* The Amazon resource name (ARN) for a custom certificate that you have already added to Certificate Manager in your Amazon Web Services account.
*
* This field is required only when the certificate type is `CUSTOM`.
*/
public var customCertificateArn: kotlin.String? = null
/**
* The type of SSL/TLS certificate that you want to use.
*
* Specify `AMPLIFY_MANAGED` to use the default certificate that Amplify provisions for you.
*
* Specify `CUSTOM` to use your own certificate that you have already added to Certificate Manager in your Amazon Web Services account. Make sure you request (or import) the certificate in the US East (N. Virginia) Region (us-east-1). For more information about using ACM, see [Importing certificates into Certificate Manager](https://docs.aws.amazon.com/acm/latest/userguide/import-certificate.html) in the *ACM User guide* .
*/
public var type: aws.sdk.kotlin.services.amplify.model.CertificateType? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.amplify.model.Certificate) : this() {
this.certificateVerificationDnsRecord = x.certificateVerificationDnsRecord
this.customCertificateArn = x.customCertificateArn
this.type = x.type
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.amplify.model.Certificate = Certificate(this)
internal fun correctErrors(): Builder {
if (type == null) type = CertificateType.SdkUnknown("no value provided")
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy