
commonMain.aws.sdk.kotlin.services.codecommit.model.Evaluation.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
/**
* Returns information about the approval rules applied to a pull request and whether conditions have been met.
*/
public class Evaluation private constructor(builder: Builder) {
/**
* The names of the approval rules that have not had their conditions met.
*/
public val approvalRulesNotSatisfied: List? = builder.approvalRulesNotSatisfied
/**
* The names of the approval rules that have had their conditions met.
*/
public val approvalRulesSatisfied: List? = builder.approvalRulesSatisfied
/**
* Whether the state of the pull request is approved.
*/
public val approved: kotlin.Boolean = builder.approved
/**
* Whether the approval rule requirements for the pull request have been overridden and no longer need to be met.
*/
public val overridden: kotlin.Boolean = builder.overridden
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codecommit.model.Evaluation = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Evaluation(")
append("approvalRulesNotSatisfied=$approvalRulesNotSatisfied,")
append("approvalRulesSatisfied=$approvalRulesSatisfied,")
append("approved=$approved,")
append("overridden=$overridden")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = approvalRulesNotSatisfied?.hashCode() ?: 0
result = 31 * result + (approvalRulesSatisfied?.hashCode() ?: 0)
result = 31 * result + (approved.hashCode())
result = 31 * result + (overridden.hashCode())
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 Evaluation
if (approvalRulesNotSatisfied != other.approvalRulesNotSatisfied) return false
if (approvalRulesSatisfied != other.approvalRulesSatisfied) return false
if (approved != other.approved) return false
if (overridden != other.overridden) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codecommit.model.Evaluation = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The names of the approval rules that have not had their conditions met.
*/
public var approvalRulesNotSatisfied: List? = null
/**
* The names of the approval rules that have had their conditions met.
*/
public var approvalRulesSatisfied: List? = null
/**
* Whether the state of the pull request is approved.
*/
public var approved: kotlin.Boolean = false
/**
* Whether the approval rule requirements for the pull request have been overridden and no longer need to be met.
*/
public var overridden: kotlin.Boolean = false
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.codecommit.model.Evaluation) : this() {
this.approvalRulesNotSatisfied = x.approvalRulesNotSatisfied
this.approvalRulesSatisfied = x.approvalRulesSatisfied
this.approved = x.approved
this.overridden = x.overridden
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.codecommit.model.Evaluation = Evaluation(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy