
commonMain.aws.sdk.kotlin.services.codecommit.model.OriginApprovalRuleTemplate.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 template that created the approval rule for a pull request.
*/
public class OriginApprovalRuleTemplate private constructor(builder: Builder) {
/**
* The ID of the template that created the approval rule.
*/
public val approvalRuleTemplateId: kotlin.String? = builder.approvalRuleTemplateId
/**
* The name of the template that created the approval rule.
*/
public val approvalRuleTemplateName: kotlin.String? = builder.approvalRuleTemplateName
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codecommit.model.OriginApprovalRuleTemplate = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("OriginApprovalRuleTemplate(")
append("approvalRuleTemplateId=$approvalRuleTemplateId,")
append("approvalRuleTemplateName=$approvalRuleTemplateName")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = approvalRuleTemplateId?.hashCode() ?: 0
result = 31 * result + (approvalRuleTemplateName?.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 OriginApprovalRuleTemplate
if (approvalRuleTemplateId != other.approvalRuleTemplateId) return false
if (approvalRuleTemplateName != other.approvalRuleTemplateName) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codecommit.model.OriginApprovalRuleTemplate = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The ID of the template that created the approval rule.
*/
public var approvalRuleTemplateId: kotlin.String? = null
/**
* The name of the template that created the approval rule.
*/
public var approvalRuleTemplateName: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.codecommit.model.OriginApprovalRuleTemplate) : this() {
this.approvalRuleTemplateId = x.approvalRuleTemplateId
this.approvalRuleTemplateName = x.approvalRuleTemplateName
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.codecommit.model.OriginApprovalRuleTemplate = OriginApprovalRuleTemplate(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy