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

aws.sdk.kotlin.services.amplify.model.Webhook.kt Maven / Gradle / Ivy

There is a newer version: 1.3.99
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.amplify.model

import aws.smithy.kotlin.runtime.time.Instant

/**
 * Describes a webhook that connects repository events to an Amplify app.
 */
class Webhook private constructor(builder: Builder) {
    /**
     * The name for a branch that is part of an Amplify app.
     */
    val branchName: kotlin.String? = builder.branchName
    /**
     * The create date and time for a webhook.
     */
    val createTime: aws.smithy.kotlin.runtime.time.Instant? = builder.createTime
    /**
     * The description for a webhook.
     */
    val description: kotlin.String? = builder.description
    /**
     * Updates the date and time for a webhook.
     */
    val updateTime: aws.smithy.kotlin.runtime.time.Instant? = builder.updateTime
    /**
     * The Amazon Resource Name (ARN) for the webhook.
     */
    val webhookArn: kotlin.String? = builder.webhookArn
    /**
     * The ID of the webhook.
     */
    val webhookId: kotlin.String? = builder.webhookId
    /**
     * The URL of the webhook.
     */
    val webhookUrl: kotlin.String? = builder.webhookUrl

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

    override fun toString(): kotlin.String = buildString {
        append("Webhook(")
        append("branchName=$branchName,")
        append("createTime=$createTime,")
        append("description=$description,")
        append("updateTime=$updateTime,")
        append("webhookArn=$webhookArn,")
        append("webhookId=$webhookId,")
        append("webhookUrl=$webhookUrl)")
    }

    override fun hashCode(): kotlin.Int {
        var result = branchName?.hashCode() ?: 0
        result = 31 * result + (createTime?.hashCode() ?: 0)
        result = 31 * result + (description?.hashCode() ?: 0)
        result = 31 * result + (updateTime?.hashCode() ?: 0)
        result = 31 * result + (webhookArn?.hashCode() ?: 0)
        result = 31 * result + (webhookId?.hashCode() ?: 0)
        result = 31 * result + (webhookUrl?.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 Webhook

        if (branchName != other.branchName) return false
        if (createTime != other.createTime) return false
        if (description != other.description) return false
        if (updateTime != other.updateTime) return false
        if (webhookArn != other.webhookArn) return false
        if (webhookId != other.webhookId) return false
        if (webhookUrl != other.webhookUrl) return false

        return true
    }

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

    class Builder {
        /**
         * The name for a branch that is part of an Amplify app.
         */
        var branchName: kotlin.String? = null
        /**
         * The create date and time for a webhook.
         */
        var createTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The description for a webhook.
         */
        var description: kotlin.String? = null
        /**
         * Updates the date and time for a webhook.
         */
        var updateTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The Amazon Resource Name (ARN) for the webhook.
         */
        var webhookArn: kotlin.String? = null
        /**
         * The ID of the webhook.
         */
        var webhookId: kotlin.String? = null
        /**
         * The URL of the webhook.
         */
        var webhookUrl: kotlin.String? = null

        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.amplify.model.Webhook) : this() {
            this.branchName = x.branchName
            this.createTime = x.createTime
            this.description = x.description
            this.updateTime = x.updateTime
            this.webhookArn = x.webhookArn
            this.webhookId = x.webhookId
            this.webhookUrl = x.webhookUrl
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.amplify.model.Webhook = Webhook(this)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy