All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.codecommit.model.ApprovalRuleEventMetadata.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 an event for an approval rule.
 */
public class ApprovalRuleEventMetadata private constructor(builder: Builder) {
    /**
     * The content of the approval rule.
     */
    public val approvalRuleContent: kotlin.String? = builder.approvalRuleContent
    /**
     * The system-generated ID of the approval rule.
     */
    public val approvalRuleId: kotlin.String? = builder.approvalRuleId
    /**
     * The name of the approval rule.
     */
    public val approvalRuleName: kotlin.String? = builder.approvalRuleName

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codecommit.model.ApprovalRuleEventMetadata = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("ApprovalRuleEventMetadata(")
        append("approvalRuleContent=$approvalRuleContent,")
        append("approvalRuleId=$approvalRuleId,")
        append("approvalRuleName=$approvalRuleName")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = approvalRuleContent?.hashCode() ?: 0
        result = 31 * result + (approvalRuleId?.hashCode() ?: 0)
        result = 31 * result + (approvalRuleName?.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 ApprovalRuleEventMetadata

        if (approvalRuleContent != other.approvalRuleContent) return false
        if (approvalRuleId != other.approvalRuleId) return false
        if (approvalRuleName != other.approvalRuleName) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codecommit.model.ApprovalRuleEventMetadata = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * The content of the approval rule.
         */
        public var approvalRuleContent: kotlin.String? = null
        /**
         * The system-generated ID of the approval rule.
         */
        public var approvalRuleId: kotlin.String? = null
        /**
         * The name of the approval rule.
         */
        public var approvalRuleName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codecommit.model.ApprovalRuleEventMetadata) : this() {
            this.approvalRuleContent = x.approvalRuleContent
            this.approvalRuleId = x.approvalRuleId
            this.approvalRuleName = x.approvalRuleName
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.codecommit.model.ApprovalRuleEventMetadata = ApprovalRuleEventMetadata(this)

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy