All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.bedrockagent.model.FlowAliasSummary.kt Maven / Gradle / Ivy

There is a newer version: 1.3.77
Show newest version
// 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 information about an alias of a flow.
 *
 * This data type is used in the following API operations:
 * + [ListFlowAliases response](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_ListFlowAliases.html#API_agent_ListFlowAliases_ResponseSyntax)
 */
public class FlowAliasSummary private constructor(builder: Builder) {
    /**
     * The Amazon Resource Name (ARN) of the alias.
     */
    public val arn: kotlin.String = requireNotNull(builder.arn) { "A non-null value must be provided for arn" }
    /**
     * The time at which the alias was created.
     */
    public val createdAt: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.createdAt) { "A non-null value must be provided for createdAt" }
    /**
     * A description of the alias.
     */
    public val description: kotlin.String? = builder.description
    /**
     * The unique identifier of the flow.
     */
    public val flowId: kotlin.String = requireNotNull(builder.flowId) { "A non-null value must be provided for flowId" }
    /**
     * The unique identifier of the alias of the flow.
     */
    public val id: kotlin.String = requireNotNull(builder.id) { "A non-null value must be provided for id" }
    /**
     * The name of the alias.
     */
    public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
    /**
     * A list of configurations about the versions that the alias maps to. Currently, you can only specify one.
     */
    public val routingConfiguration: List = requireNotNull(builder.routingConfiguration) { "A non-null value must be provided for routingConfiguration" }
    /**
     * The time at which the alias 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.FlowAliasSummary = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("FlowAliasSummary(")
        append("arn=$arn,")
        append("createdAt=$createdAt,")
        append("description=$description,")
        append("flowId=$flowId,")
        append("id=$id,")
        append("name=$name,")
        append("routingConfiguration=$routingConfiguration,")
        append("updatedAt=$updatedAt")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = arn.hashCode()
        result = 31 * result + (createdAt.hashCode())
        result = 31 * result + (description?.hashCode() ?: 0)
        result = 31 * result + (flowId.hashCode())
        result = 31 * result + (id.hashCode())
        result = 31 * result + (name.hashCode())
        result = 31 * result + (routingConfiguration.hashCode())
        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 FlowAliasSummary

        if (arn != other.arn) return false
        if (createdAt != other.createdAt) return false
        if (description != other.description) return false
        if (flowId != other.flowId) return false
        if (id != other.id) return false
        if (name != other.name) return false
        if (routingConfiguration != other.routingConfiguration) return false
        if (updatedAt != other.updatedAt) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.bedrockagent.model.FlowAliasSummary = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * The Amazon Resource Name (ARN) of the alias.
         */
        public var arn: kotlin.String? = null
        /**
         * The time at which the alias was created.
         */
        public var createdAt: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * A description of the alias.
         */
        public var description: kotlin.String? = null
        /**
         * The unique identifier of the flow.
         */
        public var flowId: kotlin.String? = null
        /**
         * The unique identifier of the alias of the flow.
         */
        public var id: kotlin.String? = null
        /**
         * The name of the alias.
         */
        public var name: kotlin.String? = null
        /**
         * A list of configurations about the versions that the alias maps to. Currently, you can only specify one.
         */
        public var routingConfiguration: List? = null
        /**
         * The time at which the alias 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.FlowAliasSummary) : this() {
            this.arn = x.arn
            this.createdAt = x.createdAt
            this.description = x.description
            this.flowId = x.flowId
            this.id = x.id
            this.name = x.name
            this.routingConfiguration = x.routingConfiguration
            this.updatedAt = x.updatedAt
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.bedrockagent.model.FlowAliasSummary = FlowAliasSummary(this)

        internal fun correctErrors(): Builder {
            if (arn == null) arn = ""
            if (createdAt == null) createdAt = Instant.fromEpochSeconds(0)
            if (flowId == null) flowId = ""
            if (id == null) id = ""
            if (name == null) name = ""
            if (routingConfiguration == null) routingConfiguration = emptyList()
            if (updatedAt == null) updatedAt = Instant.fromEpochSeconds(0)
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy