commonMain.aws.sdk.kotlin.services.bedrockagent.model.CreatePromptVersionRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.bedrockagent.model
import aws.smithy.kotlin.runtime.SdkDsl
public class CreatePromptVersionRequest private constructor(builder: Builder) {
/**
* A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see [Ensuring idempotency](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
*/
public val clientToken: kotlin.String? = builder.clientToken
/**
* A description for the version of the prompt.
*/
public val description: kotlin.String? = builder.description
/**
* The unique identifier of the prompt that you want to create a version of.
*/
public val promptIdentifier: kotlin.String? = builder.promptIdentifier
/**
* Any tags that you want to attach to the version of the prompt. For more information, see [Tagging resources in Amazon Bedrock](https://docs.aws.amazon.com/bedrock/latest/userguide/tagging.html).
*/
public val tags: Map? = builder.tags
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.bedrockagent.model.CreatePromptVersionRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreatePromptVersionRequest(")
append("clientToken=$clientToken,")
append("description=$description,")
append("promptIdentifier=$promptIdentifier,")
append("tags=$tags")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = clientToken?.hashCode() ?: 0
result = 31 * result + (description?.hashCode() ?: 0)
result = 31 * result + (promptIdentifier?.hashCode() ?: 0)
result = 31 * result + (tags?.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 CreatePromptVersionRequest
if (clientToken != other.clientToken) return false
if (description != other.description) return false
if (promptIdentifier != other.promptIdentifier) return false
if (tags != other.tags) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.bedrockagent.model.CreatePromptVersionRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see [Ensuring idempotency](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
*/
public var clientToken: kotlin.String? = null
/**
* A description for the version of the prompt.
*/
public var description: kotlin.String? = null
/**
* The unique identifier of the prompt that you want to create a version of.
*/
public var promptIdentifier: kotlin.String? = null
/**
* Any tags that you want to attach to the version of the prompt. For more information, see [Tagging resources in Amazon Bedrock](https://docs.aws.amazon.com/bedrock/latest/userguide/tagging.html).
*/
public var tags: Map? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.bedrockagent.model.CreatePromptVersionRequest) : this() {
this.clientToken = x.clientToken
this.description = x.description
this.promptIdentifier = x.promptIdentifier
this.tags = x.tags
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.bedrockagent.model.CreatePromptVersionRequest = CreatePromptVersionRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}