
commonMain.aws.sdk.kotlin.services.auditmanager.model.CreateDelegationRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.auditmanager.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* A collection of attributes that's used to create a delegation for an assessment in Audit Manager.
*/
public class CreateDelegationRequest private constructor(builder: Builder) {
/**
* A comment that's related to the delegation request.
*/
public val comment: kotlin.String? = builder.comment
/**
* The unique identifier for the control set.
*/
public val controlSetId: kotlin.String? = builder.controlSetId
/**
* The Amazon Resource Name (ARN) of the IAM role.
*/
public val roleArn: kotlin.String? = builder.roleArn
/**
* The type of customer persona.
*
* In `CreateAssessment`, `roleType` can only be `PROCESS_OWNER`.
*
* In `UpdateSettings`, `roleType` can only be `PROCESS_OWNER`.
*
* In `BatchCreateDelegationByAssessment`, `roleType` can only be `RESOURCE_OWNER`.
*/
public val roleType: aws.sdk.kotlin.services.auditmanager.model.RoleType? = builder.roleType
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.auditmanager.model.CreateDelegationRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateDelegationRequest(")
append("comment=*** Sensitive Data Redacted ***,")
append("controlSetId=$controlSetId,")
append("roleArn=$roleArn,")
append("roleType=$roleType")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = comment?.hashCode() ?: 0
result = 31 * result + (controlSetId?.hashCode() ?: 0)
result = 31 * result + (roleArn?.hashCode() ?: 0)
result = 31 * result + (roleType?.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 CreateDelegationRequest
if (comment != other.comment) return false
if (controlSetId != other.controlSetId) return false
if (roleArn != other.roleArn) return false
if (roleType != other.roleType) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.auditmanager.model.CreateDelegationRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A comment that's related to the delegation request.
*/
public var comment: kotlin.String? = null
/**
* The unique identifier for the control set.
*/
public var controlSetId: kotlin.String? = null
/**
* The Amazon Resource Name (ARN) of the IAM role.
*/
public var roleArn: kotlin.String? = null
/**
* The type of customer persona.
*
* In `CreateAssessment`, `roleType` can only be `PROCESS_OWNER`.
*
* In `UpdateSettings`, `roleType` can only be `PROCESS_OWNER`.
*
* In `BatchCreateDelegationByAssessment`, `roleType` can only be `RESOURCE_OWNER`.
*/
public var roleType: aws.sdk.kotlin.services.auditmanager.model.RoleType? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.auditmanager.model.CreateDelegationRequest) : this() {
this.comment = x.comment
this.controlSetId = x.controlSetId
this.roleArn = x.roleArn
this.roleType = x.roleType
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.auditmanager.model.CreateDelegationRequest = CreateDelegationRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy