commonMain.aws.sdk.kotlin.services.bedrockagent.model.ActionGroupSummary.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
import aws.smithy.kotlin.runtime.time.Instant
/**
* Contains details about an action group.
*/
public class ActionGroupSummary private constructor(builder: Builder) {
/**
* The unique identifier of the action group.
*/
public val actionGroupId: kotlin.String = requireNotNull(builder.actionGroupId) { "A non-null value must be provided for actionGroupId" }
/**
* The name of the action group.
*/
public val actionGroupName: kotlin.String = requireNotNull(builder.actionGroupName) { "A non-null value must be provided for actionGroupName" }
/**
* Specifies whether the action group is available for the agent to invoke or not when sending an [InvokeAgent](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeAgent.html) request.
*/
public val actionGroupState: aws.sdk.kotlin.services.bedrockagent.model.ActionGroupState = requireNotNull(builder.actionGroupState) { "A non-null value must be provided for actionGroupState" }
/**
* The description of the action group.
*/
public val description: kotlin.String? = builder.description
/**
* The time at which the action group was last updated.
*/
public val updatedAt: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.updatedAt) { "A non-null value must be provided for updatedAt" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.bedrockagent.model.ActionGroupSummary = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ActionGroupSummary(")
append("actionGroupId=$actionGroupId,")
append("actionGroupName=$actionGroupName,")
append("actionGroupState=$actionGroupState,")
append("description=$description,")
append("updatedAt=$updatedAt")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = actionGroupId.hashCode()
result = 31 * result + (actionGroupName.hashCode())
result = 31 * result + (actionGroupState.hashCode())
result = 31 * result + (description?.hashCode() ?: 0)
result = 31 * result + (updatedAt.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 ActionGroupSummary
if (actionGroupId != other.actionGroupId) return false
if (actionGroupName != other.actionGroupName) return false
if (actionGroupState != other.actionGroupState) return false
if (description != other.description) return false
if (updatedAt != other.updatedAt) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.bedrockagent.model.ActionGroupSummary = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The unique identifier of the action group.
*/
public var actionGroupId: kotlin.String? = null
/**
* The name of the action group.
*/
public var actionGroupName: kotlin.String? = null
/**
* Specifies whether the action group is available for the agent to invoke or not when sending an [InvokeAgent](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeAgent.html) request.
*/
public var actionGroupState: aws.sdk.kotlin.services.bedrockagent.model.ActionGroupState? = null
/**
* The description of the action group.
*/
public var description: kotlin.String? = null
/**
* The time at which the action group was last updated.
*/
public var updatedAt: aws.smithy.kotlin.runtime.time.Instant? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.bedrockagent.model.ActionGroupSummary) : this() {
this.actionGroupId = x.actionGroupId
this.actionGroupName = x.actionGroupName
this.actionGroupState = x.actionGroupState
this.description = x.description
this.updatedAt = x.updatedAt
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.bedrockagent.model.ActionGroupSummary = ActionGroupSummary(this)
internal fun correctErrors(): Builder {
if (actionGroupId == null) actionGroupId = ""
if (actionGroupName == null) actionGroupName = ""
if (actionGroupState == null) actionGroupState = ActionGroupState.SdkUnknown("no value provided")
if (updatedAt == null) updatedAt = Instant.fromEpochSeconds(0)
return this
}
}
}