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

commonMain.aws.sdk.kotlin.services.codecommit.model.ApprovalRuleTemplate.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
import aws.smithy.kotlin.runtime.time.Instant

/**
 * Returns information about an approval rule template.
 */
public class ApprovalRuleTemplate private constructor(builder: Builder) {
    /**
     * The content of the approval rule template.
     */
    public val approvalRuleTemplateContent: kotlin.String? = builder.approvalRuleTemplateContent
    /**
     * The description of the approval rule template.
     */
    public val approvalRuleTemplateDescription: kotlin.String? = builder.approvalRuleTemplateDescription
    /**
     * The system-generated ID of the approval rule template.
     */
    public val approvalRuleTemplateId: kotlin.String? = builder.approvalRuleTemplateId
    /**
     * The name of the approval rule template.
     */
    public val approvalRuleTemplateName: kotlin.String? = builder.approvalRuleTemplateName
    /**
     * The date the approval rule template was created, in timestamp format.
     */
    public val creationDate: aws.smithy.kotlin.runtime.time.Instant? = builder.creationDate
    /**
     * The date the approval rule template was most recently changed, in timestamp format.
     */
    public val lastModifiedDate: aws.smithy.kotlin.runtime.time.Instant? = builder.lastModifiedDate
    /**
     * The Amazon Resource Name (ARN) of the user who made the most recent changes to the approval rule template.
     */
    public val lastModifiedUser: kotlin.String? = builder.lastModifiedUser
    /**
     * The SHA-256 hash signature for the content of the approval rule template.
     */
    public val ruleContentSha256: kotlin.String? = builder.ruleContentSha256

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

    override fun toString(): kotlin.String = buildString {
        append("ApprovalRuleTemplate(")
        append("approvalRuleTemplateContent=$approvalRuleTemplateContent,")
        append("approvalRuleTemplateDescription=$approvalRuleTemplateDescription,")
        append("approvalRuleTemplateId=$approvalRuleTemplateId,")
        append("approvalRuleTemplateName=$approvalRuleTemplateName,")
        append("creationDate=$creationDate,")
        append("lastModifiedDate=$lastModifiedDate,")
        append("lastModifiedUser=$lastModifiedUser,")
        append("ruleContentSha256=$ruleContentSha256")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = approvalRuleTemplateContent?.hashCode() ?: 0
        result = 31 * result + (approvalRuleTemplateDescription?.hashCode() ?: 0)
        result = 31 * result + (approvalRuleTemplateId?.hashCode() ?: 0)
        result = 31 * result + (approvalRuleTemplateName?.hashCode() ?: 0)
        result = 31 * result + (creationDate?.hashCode() ?: 0)
        result = 31 * result + (lastModifiedDate?.hashCode() ?: 0)
        result = 31 * result + (lastModifiedUser?.hashCode() ?: 0)
        result = 31 * result + (ruleContentSha256?.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 ApprovalRuleTemplate

        if (approvalRuleTemplateContent != other.approvalRuleTemplateContent) return false
        if (approvalRuleTemplateDescription != other.approvalRuleTemplateDescription) return false
        if (approvalRuleTemplateId != other.approvalRuleTemplateId) return false
        if (approvalRuleTemplateName != other.approvalRuleTemplateName) return false
        if (creationDate != other.creationDate) return false
        if (lastModifiedDate != other.lastModifiedDate) return false
        if (lastModifiedUser != other.lastModifiedUser) return false
        if (ruleContentSha256 != other.ruleContentSha256) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The content of the approval rule template.
         */
        public var approvalRuleTemplateContent: kotlin.String? = null
        /**
         * The description of the approval rule template.
         */
        public var approvalRuleTemplateDescription: kotlin.String? = null
        /**
         * The system-generated ID of the approval rule template.
         */
        public var approvalRuleTemplateId: kotlin.String? = null
        /**
         * The name of the approval rule template.
         */
        public var approvalRuleTemplateName: kotlin.String? = null
        /**
         * The date the approval rule template was created, in timestamp format.
         */
        public var creationDate: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The date the approval rule template was most recently changed, in timestamp format.
         */
        public var lastModifiedDate: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The Amazon Resource Name (ARN) of the user who made the most recent changes to the approval rule template.
         */
        public var lastModifiedUser: kotlin.String? = null
        /**
         * The SHA-256 hash signature for the content of the approval rule template.
         */
        public var ruleContentSha256: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codecommit.model.ApprovalRuleTemplate) : this() {
            this.approvalRuleTemplateContent = x.approvalRuleTemplateContent
            this.approvalRuleTemplateDescription = x.approvalRuleTemplateDescription
            this.approvalRuleTemplateId = x.approvalRuleTemplateId
            this.approvalRuleTemplateName = x.approvalRuleTemplateName
            this.creationDate = x.creationDate
            this.lastModifiedDate = x.lastModifiedDate
            this.lastModifiedUser = x.lastModifiedUser
            this.ruleContentSha256 = x.ruleContentSha256
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy