
commonMain.aws.sdk.kotlin.services.codecommit.model.UpdatePullRequestStatusRequest.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 UpdatePullRequestStatusRequest private constructor(builder: Builder) {
/**
* The system-generated ID of the pull request. To get this ID, use ListPullRequests.
*/
public val pullRequestId: kotlin.String? = builder.pullRequestId
/**
* The status of the pull request. The only valid operations are to update the status from `OPEN` to `OPEN`, `OPEN` to `CLOSED` or from `CLOSED` to `CLOSED`.
*/
public val pullRequestStatus: aws.sdk.kotlin.services.codecommit.model.PullRequestStatusEnum? = builder.pullRequestStatus
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codecommit.model.UpdatePullRequestStatusRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdatePullRequestStatusRequest(")
append("pullRequestId=$pullRequestId,")
append("pullRequestStatus=$pullRequestStatus")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = pullRequestId?.hashCode() ?: 0
result = 31 * result + (pullRequestStatus?.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 UpdatePullRequestStatusRequest
if (pullRequestId != other.pullRequestId) return false
if (pullRequestStatus != other.pullRequestStatus) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codecommit.model.UpdatePullRequestStatusRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The system-generated ID of the pull request. To get this ID, use ListPullRequests.
*/
public var pullRequestId: kotlin.String? = null
/**
* The status of the pull request. The only valid operations are to update the status from `OPEN` to `OPEN`, `OPEN` to `CLOSED` or from `CLOSED` to `CLOSED`.
*/
public var pullRequestStatus: aws.sdk.kotlin.services.codecommit.model.PullRequestStatusEnum? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.codecommit.model.UpdatePullRequestStatusRequest) : this() {
this.pullRequestId = x.pullRequestId
this.pullRequestStatus = x.pullRequestStatus
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.codecommit.model.UpdatePullRequestStatusRequest = UpdatePullRequestStatusRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy