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