commonMain.aws.sdk.kotlin.services.bedrockagent.model.DeleteAgentVersionRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bedrockagent-jvm Show documentation
Show all versions of bedrockagent-jvm Show documentation
The AWS SDK for Kotlin client for Bedrock Agent
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.bedrockagent.model
import aws.smithy.kotlin.runtime.SdkDsl
public class DeleteAgentVersionRequest private constructor(builder: Builder) {
/**
* The unique identifier of the agent that the version belongs to.
*/
public val agentId: kotlin.String? = builder.agentId
/**
* The version of the agent to delete.
*/
public val agentVersion: kotlin.String? = builder.agentVersion
/**
* By default, this value is `false` and deletion is stopped if the resource is in use. If you set it to `true`, the resource will be deleted even if the resource is in use.
*/
public val skipResourceInUseCheck: kotlin.Boolean? = builder.skipResourceInUseCheck
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.bedrockagent.model.DeleteAgentVersionRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("DeleteAgentVersionRequest(")
append("agentId=$agentId,")
append("agentVersion=$agentVersion,")
append("skipResourceInUseCheck=$skipResourceInUseCheck")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = agentId?.hashCode() ?: 0
result = 31 * result + (agentVersion?.hashCode() ?: 0)
result = 31 * result + (skipResourceInUseCheck?.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 DeleteAgentVersionRequest
if (agentId != other.agentId) return false
if (agentVersion != other.agentVersion) return false
if (skipResourceInUseCheck != other.skipResourceInUseCheck) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.bedrockagent.model.DeleteAgentVersionRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The unique identifier of the agent that the version belongs to.
*/
public var agentId: kotlin.String? = null
/**
* The version of the agent to delete.
*/
public var agentVersion: kotlin.String? = null
/**
* By default, this value is `false` and deletion is stopped if the resource is in use. If you set it to `true`, the resource will be deleted even if the resource is in use.
*/
public var skipResourceInUseCheck: kotlin.Boolean? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.bedrockagent.model.DeleteAgentVersionRequest) : this() {
this.agentId = x.agentId
this.agentVersion = x.agentVersion
this.skipResourceInUseCheck = x.skipResourceInUseCheck
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.bedrockagent.model.DeleteAgentVersionRequest = DeleteAgentVersionRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}