
commonMain.aws.sdk.kotlin.services.codecommit.model.CreatePullRequestApprovalRuleResponse.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 CreatePullRequestApprovalRuleResponse private constructor(builder: Builder) {
/**
* Information about the created 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.CreatePullRequestApprovalRuleResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreatePullRequestApprovalRuleResponse(")
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 CreatePullRequestApprovalRuleResponse
if (approvalRule != other.approvalRule) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codecommit.model.CreatePullRequestApprovalRuleResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Information about the created 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.CreatePullRequestApprovalRuleResponse) : this() {
this.approvalRule = x.approvalRule
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.codecommit.model.CreatePullRequestApprovalRuleResponse = CreatePullRequestApprovalRuleResponse(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