commonMain.aws.sdk.kotlin.services.codebuild.model.UpdateWebhookRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of codebuild-jvm Show documentation
Show all versions of codebuild-jvm Show documentation
The AWS SDK for Kotlin client for CodeBuild
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.codebuild.model
import aws.smithy.kotlin.runtime.SdkDsl
public class UpdateWebhookRequest 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`.
*/
public val branchFilter: kotlin.String? = builder.branchFilter
/**
* Specifies the type of build this webhook will trigger.
*/
public val buildType: aws.sdk.kotlin.services.codebuild.model.WebhookBuildType? = builder.buildType
/**
* An array of arrays of `WebhookFilter` objects used to determine if a webhook event can trigger a build. A filter group must contain at least one `EVENT``WebhookFilter`.
*/
public val filterGroups: List>? = builder.filterGroups
/**
* The name of the CodeBuild project.
*/
public val projectName: kotlin.String? = builder.projectName
/**
* A boolean value that specifies whether the associated GitHub repository's secret token should be updated. If you use Bitbucket for your repository, `rotateSecret` is ignored.
*/
public val rotateSecret: kotlin.Boolean? = builder.rotateSecret
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codebuild.model.UpdateWebhookRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdateWebhookRequest(")
append("branchFilter=$branchFilter,")
append("buildType=$buildType,")
append("filterGroups=$filterGroups,")
append("projectName=$projectName,")
append("rotateSecret=$rotateSecret")
append(")")
}
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)
result = 31 * result + (rotateSecret?.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 UpdateWebhookRequest
if (branchFilter != other.branchFilter) return false
if (buildType != other.buildType) return false
if (filterGroups != other.filterGroups) return false
if (projectName != other.projectName) return false
if (rotateSecret != other.rotateSecret) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codebuild.model.UpdateWebhookRequest = Builder(this).apply(block).build()
@SdkDsl
public 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`.
*/
public var branchFilter: kotlin.String? = null
/**
* Specifies the type of build this webhook will trigger.
*/
public var buildType: aws.sdk.kotlin.services.codebuild.model.WebhookBuildType? = null
/**
* An array of arrays of `WebhookFilter` objects used to determine if a webhook event can trigger a build. A filter group must contain at least one `EVENT``WebhookFilter`.
*/
public var filterGroups: List>? = null
/**
* The name of the CodeBuild project.
*/
public var projectName: kotlin.String? = null
/**
* A boolean value that specifies whether the associated GitHub repository's secret token should be updated. If you use Bitbucket for your repository, `rotateSecret` is ignored.
*/
public var rotateSecret: kotlin.Boolean? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.codebuild.model.UpdateWebhookRequest) : this() {
this.branchFilter = x.branchFilter
this.buildType = x.buildType
this.filterGroups = x.filterGroups
this.projectName = x.projectName
this.rotateSecret = x.rotateSecret
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.codebuild.model.UpdateWebhookRequest = UpdateWebhookRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}