commonMain.aws.sdk.kotlin.services.codepipeline.model.WebhookAuthConfiguration.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of codepipeline-jvm Show documentation
Show all versions of codepipeline-jvm Show documentation
The AWS SDK for Kotlin client for CodePipeline
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.codepipeline.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The authentication applied to incoming webhook trigger requests.
*/
public class WebhookAuthConfiguration private constructor(builder: Builder) {
/**
* The property used to configure acceptance of webhooks in an IP address range. For IP, only the `AllowedIPRange` property must be set. This property must be set to a valid CIDR range.
*/
public val allowedIpRange: kotlin.String? = builder.allowedIpRange
/**
* The property used to configure GitHub authentication. For GITHUB_HMAC, only the `SecretToken` property must be set.
*
* When creating CodePipeline webhooks, do not use your own credentials or reuse the same secret token across multiple webhooks. For optimal security, generate a unique secret token for each webhook you create. The secret token is an arbitrary string that you provide, which GitHub uses to compute and sign the webhook payloads sent to CodePipeline, for protecting the integrity and authenticity of the webhook payloads. Using your own credentials or reusing the same token across multiple webhooks can lead to security vulnerabilities.
*
* If a secret token was provided, it will be redacted in the response.
*/
public val secretToken: kotlin.String? = builder.secretToken
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codepipeline.model.WebhookAuthConfiguration = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("WebhookAuthConfiguration(")
append("allowedIpRange=$allowedIpRange,")
append("secretToken=$secretToken")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = allowedIpRange?.hashCode() ?: 0
result = 31 * result + (secretToken?.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 WebhookAuthConfiguration
if (allowedIpRange != other.allowedIpRange) return false
if (secretToken != other.secretToken) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codepipeline.model.WebhookAuthConfiguration = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The property used to configure acceptance of webhooks in an IP address range. For IP, only the `AllowedIPRange` property must be set. This property must be set to a valid CIDR range.
*/
public var allowedIpRange: kotlin.String? = null
/**
* The property used to configure GitHub authentication. For GITHUB_HMAC, only the `SecretToken` property must be set.
*
* When creating CodePipeline webhooks, do not use your own credentials or reuse the same secret token across multiple webhooks. For optimal security, generate a unique secret token for each webhook you create. The secret token is an arbitrary string that you provide, which GitHub uses to compute and sign the webhook payloads sent to CodePipeline, for protecting the integrity and authenticity of the webhook payloads. Using your own credentials or reusing the same token across multiple webhooks can lead to security vulnerabilities.
*
* If a secret token was provided, it will be redacted in the response.
*/
public var secretToken: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.codepipeline.model.WebhookAuthConfiguration) : this() {
this.allowedIpRange = x.allowedIpRange
this.secretToken = x.secretToken
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.codepipeline.model.WebhookAuthConfiguration = WebhookAuthConfiguration(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy