
commonMain.aws.sdk.kotlin.services.rolesanywhere.model.UpdateTrustAnchorRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.rolesanywhere.model
public class UpdateTrustAnchorRequest private constructor(builder: Builder) {
/**
* The name of the trust anchor.
*/
public val name: kotlin.String? = builder.name
/**
* The trust anchor type and its related certificate data.
*/
public val source: aws.sdk.kotlin.services.rolesanywhere.model.Source? = builder.source
/**
* The unique identifier of the trust anchor.
*/
public val trustAnchorId: kotlin.String? = requireNotNull(builder.trustAnchorId) { "A non-null value must be provided for trustAnchorId" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.rolesanywhere.model.UpdateTrustAnchorRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdateTrustAnchorRequest(")
append("name=$name,")
append("source=$source,")
append("trustAnchorId=$trustAnchorId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = name?.hashCode() ?: 0
result = 31 * result + (source?.hashCode() ?: 0)
result = 31 * result + (trustAnchorId?.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 UpdateTrustAnchorRequest
if (name != other.name) return false
if (source != other.source) return false
if (trustAnchorId != other.trustAnchorId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.rolesanywhere.model.UpdateTrustAnchorRequest = Builder(this).apply(block).build()
public class Builder {
/**
* The name of the trust anchor.
*/
public var name: kotlin.String? = null
/**
* The trust anchor type and its related certificate data.
*/
public var source: aws.sdk.kotlin.services.rolesanywhere.model.Source? = null
/**
* The unique identifier of the trust anchor.
*/
public var trustAnchorId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.rolesanywhere.model.UpdateTrustAnchorRequest) : this() {
this.name = x.name
this.source = x.source
this.trustAnchorId = x.trustAnchorId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.rolesanywhere.model.UpdateTrustAnchorRequest = UpdateTrustAnchorRequest(this)
/**
* construct an [aws.sdk.kotlin.services.rolesanywhere.model.Source] inside the given [block]
*/
public fun source(block: aws.sdk.kotlin.services.rolesanywhere.model.Source.Builder.() -> kotlin.Unit) {
this.source = aws.sdk.kotlin.services.rolesanywhere.model.Source.invoke(block)
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy