commonMain.aws.sdk.kotlin.services.route53domains.model.DnssecKey.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of route53domains-jvm Show documentation
Show all versions of route53domains-jvm Show documentation
The AWS SDK for Kotlin client for Route 53 Domains
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.route53domains.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Information about the DNSSEC key.
*
* You get this from your DNS provider and then give it to Route 53 (by using [AssociateDelegationSignerToDomain](https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_AssociateDelegationSignerToDomain.html)) to pass it to the registry to establish the chain of trust.
*/
public class DnssecKey private constructor(builder: Builder) {
/**
* The number of the public key’s cryptographic algorithm according to an [IANA](https://www.iana.org/assignments/dns-sec-alg-numbers/dns-sec-alg-numbers.xml) assignment.
*
* If Route 53 is your DNS service, set this to 13.
*
* For more information about enabling DNSSEC signing, see [Enabling DNSSEC signing and establishing a chain of trust](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-configuring-dnssec-enable-signing.html).
*/
public val algorithm: kotlin.Int? = builder.algorithm
/**
* The delegation signer digest.
*
* Digest is calculated from the public key provided using specified digest algorithm and this digest is the actual value returned from the registry nameservers as the value of DS records.
*/
public val digest: kotlin.String? = builder.digest
/**
* The number of the DS digest algorithm according to an IANA assignment.
*
* For more information, see [IANA](https://www.iana.org/assignments/ds-rr-types/ds-rr-types.xhtml) for DNSSEC Delegation Signer (DS) Resource Record (RR) Type Digest Algorithms.
*/
public val digestType: kotlin.Int? = builder.digestType
/**
* Defines the type of key. It can be either a KSK (key-signing-key, value 257) or ZSK (zone-signing-key, value 256). Using KSK is always encouraged. Only use ZSK if your DNS provider isn't Route 53 and you don’t have KSK available.
*
* If you have KSK and ZSK keys, always use KSK to create a delegations signer (DS) record. If you have ZSK keys only – use ZSK to create a DS record.
*/
public val flags: kotlin.Int? = builder.flags
/**
* An ID assigned to each DS record created by [AssociateDelegationSignerToDomain](https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_AssociateDelegationSignerToDomain.html).
*/
public val id: kotlin.String? = builder.id
/**
* A numeric identification of the DNSKEY record referred to by this DS record.
*/
public val keyTag: kotlin.Int? = builder.keyTag
/**
* The base64-encoded public key part of the key pair that is passed to the registry .
*/
public val publicKey: kotlin.String? = builder.publicKey
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.route53domains.model.DnssecKey = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("DnssecKey(")
append("algorithm=$algorithm,")
append("digest=$digest,")
append("digestType=$digestType,")
append("flags=$flags,")
append("id=$id,")
append("keyTag=$keyTag,")
append("publicKey=$publicKey")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = algorithm ?: 0
result = 31 * result + (digest?.hashCode() ?: 0)
result = 31 * result + (digestType ?: 0)
result = 31 * result + (flags ?: 0)
result = 31 * result + (id?.hashCode() ?: 0)
result = 31 * result + (keyTag ?: 0)
result = 31 * result + (publicKey?.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 DnssecKey
if (algorithm != other.algorithm) return false
if (digest != other.digest) return false
if (digestType != other.digestType) return false
if (flags != other.flags) return false
if (id != other.id) return false
if (keyTag != other.keyTag) return false
if (publicKey != other.publicKey) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.route53domains.model.DnssecKey = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The number of the public key’s cryptographic algorithm according to an [IANA](https://www.iana.org/assignments/dns-sec-alg-numbers/dns-sec-alg-numbers.xml) assignment.
*
* If Route 53 is your DNS service, set this to 13.
*
* For more information about enabling DNSSEC signing, see [Enabling DNSSEC signing and establishing a chain of trust](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-configuring-dnssec-enable-signing.html).
*/
public var algorithm: kotlin.Int? = null
/**
* The delegation signer digest.
*
* Digest is calculated from the public key provided using specified digest algorithm and this digest is the actual value returned from the registry nameservers as the value of DS records.
*/
public var digest: kotlin.String? = null
/**
* The number of the DS digest algorithm according to an IANA assignment.
*
* For more information, see [IANA](https://www.iana.org/assignments/ds-rr-types/ds-rr-types.xhtml) for DNSSEC Delegation Signer (DS) Resource Record (RR) Type Digest Algorithms.
*/
public var digestType: kotlin.Int? = null
/**
* Defines the type of key. It can be either a KSK (key-signing-key, value 257) or ZSK (zone-signing-key, value 256). Using KSK is always encouraged. Only use ZSK if your DNS provider isn't Route 53 and you don’t have KSK available.
*
* If you have KSK and ZSK keys, always use KSK to create a delegations signer (DS) record. If you have ZSK keys only – use ZSK to create a DS record.
*/
public var flags: kotlin.Int? = null
/**
* An ID assigned to each DS record created by [AssociateDelegationSignerToDomain](https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_AssociateDelegationSignerToDomain.html).
*/
public var id: kotlin.String? = null
/**
* A numeric identification of the DNSKEY record referred to by this DS record.
*/
public var keyTag: kotlin.Int? = null
/**
* The base64-encoded public key part of the key pair that is passed to the registry .
*/
public var publicKey: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.route53domains.model.DnssecKey) : this() {
this.algorithm = x.algorithm
this.digest = x.digest
this.digestType = x.digestType
this.flags = x.flags
this.id = x.id
this.keyTag = x.keyTag
this.publicKey = x.publicKey
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.route53domains.model.DnssecKey = DnssecKey(this)
internal fun correctErrors(): Builder {
return this
}
}
}