
commonMain.aws.sdk.kotlin.services.iam.model.CreateServiceLinkedRoleResponse.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.iam.model
public class CreateServiceLinkedRoleResponse private constructor(builder: Builder) {
/**
* A Role object that contains details about the newly created role.
*/
public val role: aws.sdk.kotlin.services.iam.model.Role? = builder.role
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iam.model.CreateServiceLinkedRoleResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateServiceLinkedRoleResponse(")
append("role=$role")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = role?.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 CreateServiceLinkedRoleResponse
if (role != other.role) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iam.model.CreateServiceLinkedRoleResponse = Builder(this).apply(block).build()
public class Builder {
/**
* A Role object that contains details about the newly created role.
*/
public var role: aws.sdk.kotlin.services.iam.model.Role? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iam.model.CreateServiceLinkedRoleResponse) : this() {
this.role = x.role
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iam.model.CreateServiceLinkedRoleResponse = CreateServiceLinkedRoleResponse(this)
/**
* construct an [aws.sdk.kotlin.services.iam.model.Role] inside the given [block]
*/
public fun role(block: aws.sdk.kotlin.services.iam.model.Role.Builder.() -> kotlin.Unit) {
this.role = aws.sdk.kotlin.services.iam.model.Role.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy