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

commonMain.aws.sdk.kotlin.services.bedrockagent.model.CreateFlowRequest.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

public class CreateFlowRequest 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
    /**
     * The Amazon Resource Name (ARN) of the KMS key to encrypt the flow.
     */
    public val customerEncryptionKeyArn: kotlin.String? = builder.customerEncryptionKeyArn
    /**
     * A definition of the nodes and connections between nodes in the flow.
     */
    public val definition: aws.sdk.kotlin.services.bedrockagent.model.FlowDefinition? = builder.definition
    /**
     * A description for the flow.
     */
    public val description: kotlin.String? = builder.description
    /**
     * The Amazon Resource Name (ARN) of the service role with permissions to create and manage a flow. For more information, see [Create a service role for flows in Amazon Bedrock](https://docs.aws.amazon.com/bedrock/latest/userguide/flows-permissions.html) in the Amazon Bedrock User Guide.
     */
    public val executionRoleArn: kotlin.String? = builder.executionRoleArn
    /**
     * A name for the flow.
     */
    public val name: kotlin.String? = builder.name
    /**
     * Any tags that you want to attach to the flow. 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.CreateFlowRequest = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("CreateFlowRequest(")
        append("clientToken=$clientToken,")
        append("customerEncryptionKeyArn=$customerEncryptionKeyArn,")
        append("definition=$definition,")
        append("description=$description,")
        append("executionRoleArn=$executionRoleArn,")
        append("name=$name,")
        append("tags=$tags")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = clientToken?.hashCode() ?: 0
        result = 31 * result + (customerEncryptionKeyArn?.hashCode() ?: 0)
        result = 31 * result + (definition?.hashCode() ?: 0)
        result = 31 * result + (description?.hashCode() ?: 0)
        result = 31 * result + (executionRoleArn?.hashCode() ?: 0)
        result = 31 * result + (name?.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 CreateFlowRequest

        if (clientToken != other.clientToken) return false
        if (customerEncryptionKeyArn != other.customerEncryptionKeyArn) return false
        if (definition != other.definition) return false
        if (description != other.description) return false
        if (executionRoleArn != other.executionRoleArn) return false
        if (name != other.name) return false
        if (tags != other.tags) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.bedrockagent.model.CreateFlowRequest = 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
        /**
         * The Amazon Resource Name (ARN) of the KMS key to encrypt the flow.
         */
        public var customerEncryptionKeyArn: kotlin.String? = null
        /**
         * A definition of the nodes and connections between nodes in the flow.
         */
        public var definition: aws.sdk.kotlin.services.bedrockagent.model.FlowDefinition? = null
        /**
         * A description for the flow.
         */
        public var description: kotlin.String? = null
        /**
         * The Amazon Resource Name (ARN) of the service role with permissions to create and manage a flow. For more information, see [Create a service role for flows in Amazon Bedrock](https://docs.aws.amazon.com/bedrock/latest/userguide/flows-permissions.html) in the Amazon Bedrock User Guide.
         */
        public var executionRoleArn: kotlin.String? = null
        /**
         * A name for the flow.
         */
        public var name: kotlin.String? = null
        /**
         * Any tags that you want to attach to the flow. 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.CreateFlowRequest) : this() {
            this.clientToken = x.clientToken
            this.customerEncryptionKeyArn = x.customerEncryptionKeyArn
            this.definition = x.definition
            this.description = x.description
            this.executionRoleArn = x.executionRoleArn
            this.name = x.name
            this.tags = x.tags
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.bedrockagent.model.FlowDefinition] inside the given [block]
         */
        public fun definition(block: aws.sdk.kotlin.services.bedrockagent.model.FlowDefinition.Builder.() -> kotlin.Unit) {
            this.definition = aws.sdk.kotlin.services.bedrockagent.model.FlowDefinition.invoke(block)
        }

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy