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

commonMain.aws.sdk.kotlin.services.codebuild.model.CreateWebhookRequest.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.codebuild.model



class CreateWebhookRequest private constructor(builder: Builder) {
    /**
     * A regular expression used to determine which repository branches are built when a webhook is triggered. If the name of a branch matches the regular expression, then it is built. If `branchFilter` is empty, then all branches are built.
     *
     * It is recommended that you use `filterGroups` instead of `branchFilter`.
     */
    val branchFilter: kotlin.String? = builder.branchFilter
    /**
     * Specifies the type of build this webhook will trigger.
     */
    val buildType: aws.sdk.kotlin.services.codebuild.model.WebhookBuildType? = builder.buildType
    /**
     * An array of arrays of `WebhookFilter` objects used to determine which webhooks are triggered. At least one `WebhookFilter` in the array must specify `EVENT` as its `type`.
     *
     * For a build to be triggered, at least one filter group in the `filterGroups` array must pass. For a filter group to pass, each of its filters must pass.
     */
    val filterGroups: List>? = builder.filterGroups
    /**
     * The name of the CodeBuild project.
     */
    val projectName: kotlin.String? = builder.projectName

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

    override fun toString(): kotlin.String = buildString {
        append("CreateWebhookRequest(")
        append("branchFilter=$branchFilter,")
        append("buildType=$buildType,")
        append("filterGroups=$filterGroups,")
        append("projectName=$projectName)")
    }

    override fun hashCode(): kotlin.Int {
        var result = branchFilter?.hashCode() ?: 0
        result = 31 * result + (buildType?.hashCode() ?: 0)
        result = 31 * result + (filterGroups?.hashCode() ?: 0)
        result = 31 * result + (projectName?.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 CreateWebhookRequest

        if (branchFilter != other.branchFilter) return false
        if (buildType != other.buildType) return false
        if (filterGroups != other.filterGroups) return false
        if (projectName != other.projectName) return false

        return true
    }

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

    class Builder {
        /**
         * A regular expression used to determine which repository branches are built when a webhook is triggered. If the name of a branch matches the regular expression, then it is built. If `branchFilter` is empty, then all branches are built.
         *
         * It is recommended that you use `filterGroups` instead of `branchFilter`.
         */
        var branchFilter: kotlin.String? = null
        /**
         * Specifies the type of build this webhook will trigger.
         */
        var buildType: aws.sdk.kotlin.services.codebuild.model.WebhookBuildType? = null
        /**
         * An array of arrays of `WebhookFilter` objects used to determine which webhooks are triggered. At least one `WebhookFilter` in the array must specify `EVENT` as its `type`.
         *
         * For a build to be triggered, at least one filter group in the `filterGroups` array must pass. For a filter group to pass, each of its filters must pass.
         */
        var filterGroups: List>? = null
        /**
         * The name of the CodeBuild project.
         */
        var projectName: kotlin.String? = null

        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codebuild.model.CreateWebhookRequest) : this() {
            this.branchFilter = x.branchFilter
            this.buildType = x.buildType
            this.filterGroups = x.filterGroups
            this.projectName = x.projectName
        }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy