
commonMain.aws.sdk.kotlin.services.iam.model.CreateRoleResponse.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.iam.model
/**
* Contains the response to a successful CreateRole request.
*/
public class CreateRoleResponse private constructor(builder: Builder) {
/**
* A structure containing details about the new 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.CreateRoleResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateRoleResponse(")
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 CreateRoleResponse
if (role != other.role) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iam.model.CreateRoleResponse = Builder(this).apply(block).build()
public class Builder {
/**
* A structure containing details about the new 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.CreateRoleResponse) : this() {
this.role = x.role
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iam.model.CreateRoleResponse = CreateRoleResponse(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