commonMain.aws.sdk.kotlin.services.bedrockagent.model.ParameterDetail.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
/**
* Contains details about a parameter in a function for an action group.
*
* This data type is used in the following API operations:
* + [CreateAgentActionGroup request](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_CreateAgentActionGroup.html#API_agent_CreateAgentActionGroup_RequestSyntax)
* + [CreateAgentActionGroup response](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_CreateAgentActionGroup.html#API_agent_CreateAgentActionGroup_ResponseSyntax)
* + [UpdateAgentActionGroup request](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_UpdateAgentActionGroup.html#API_agent_UpdateAgentActionGroup_RequestSyntax)
* + [UpdateAgentActionGroup response](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_UpdateAgentActionGroup.html#API_agent_UpdateAgentActionGroup_ResponseSyntax)
* + [GetAgentActionGroup response](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_GetAgentActionGroup.html#API_agent_GetAgentActionGroup_ResponseSyntax)
*/
public class ParameterDetail private constructor(builder: Builder) {
/**
* A description of the parameter. Helps the foundation model determine how to elicit the parameters from the user.
*/
public val description: kotlin.String? = builder.description
/**
* Whether the parameter is required for the agent to complete the function for action group invocation.
*/
public val required: kotlin.Boolean? = builder.required
/**
* The data type of the parameter.
*/
public val type: aws.sdk.kotlin.services.bedrockagent.model.Type = requireNotNull(builder.type) { "A non-null value must be provided for type" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.bedrockagent.model.ParameterDetail = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ParameterDetail(")
append("description=$description,")
append("required=$required,")
append("type=$type")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = description?.hashCode() ?: 0
result = 31 * result + (required?.hashCode() ?: 0)
result = 31 * result + (type.hashCode())
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 ParameterDetail
if (description != other.description) return false
if (required != other.required) return false
if (type != other.type) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.bedrockagent.model.ParameterDetail = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A description of the parameter. Helps the foundation model determine how to elicit the parameters from the user.
*/
public var description: kotlin.String? = null
/**
* Whether the parameter is required for the agent to complete the function for action group invocation.
*/
public var required: kotlin.Boolean? = null
/**
* The data type of the parameter.
*/
public var type: aws.sdk.kotlin.services.bedrockagent.model.Type? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.bedrockagent.model.ParameterDetail) : this() {
this.description = x.description
this.required = x.required
this.type = x.type
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.bedrockagent.model.ParameterDetail = ParameterDetail(this)
internal fun correctErrors(): Builder {
if (type == null) type = Type.SdkUnknown("no value provided")
return this
}
}
}