
commonMain.aws.sdk.kotlin.services.codecommit.model.UpdateApprovalRuleTemplateContentRequest.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 UpdateApprovalRuleTemplateContentRequest private constructor(builder: Builder) {
/**
* The name of the approval rule template where you want to update the content of the rule.
*/
public val approvalRuleTemplateName: kotlin.String? = builder.approvalRuleTemplateName
/**
* The SHA-256 hash signature for the content of the approval rule. You can retrieve this information by using GetPullRequest.
*/
public val existingRuleContentSha256: kotlin.String? = builder.existingRuleContentSha256
/**
* The content that replaces the existing content of the rule. Content statements must be complete. You cannot provide only the changes.
*/
public val newRuleContent: kotlin.String? = builder.newRuleContent
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codecommit.model.UpdateApprovalRuleTemplateContentRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdateApprovalRuleTemplateContentRequest(")
append("approvalRuleTemplateName=$approvalRuleTemplateName,")
append("existingRuleContentSha256=$existingRuleContentSha256,")
append("newRuleContent=$newRuleContent")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = approvalRuleTemplateName?.hashCode() ?: 0
result = 31 * result + (existingRuleContentSha256?.hashCode() ?: 0)
result = 31 * result + (newRuleContent?.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 UpdateApprovalRuleTemplateContentRequest
if (approvalRuleTemplateName != other.approvalRuleTemplateName) return false
if (existingRuleContentSha256 != other.existingRuleContentSha256) return false
if (newRuleContent != other.newRuleContent) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codecommit.model.UpdateApprovalRuleTemplateContentRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The name of the approval rule template where you want to update the content of the rule.
*/
public var approvalRuleTemplateName: kotlin.String? = null
/**
* The SHA-256 hash signature for the content of the approval rule. You can retrieve this information by using GetPullRequest.
*/
public var existingRuleContentSha256: kotlin.String? = null
/**
* The content that replaces the existing content of the rule. Content statements must be complete. You cannot provide only the changes.
*/
public var newRuleContent: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.codecommit.model.UpdateApprovalRuleTemplateContentRequest) : this() {
this.approvalRuleTemplateName = x.approvalRuleTemplateName
this.existingRuleContentSha256 = x.existingRuleContentSha256
this.newRuleContent = x.newRuleContent
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.codecommit.model.UpdateApprovalRuleTemplateContentRequest = UpdateApprovalRuleTemplateContentRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy