commonMain.aws.sdk.kotlin.services.bedrockagent.model.UpdateFlowRequest.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 UpdateFlowRequest private constructor(builder: Builder) {
/**
* 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 the connections between the 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
/**
* The unique identifier of the flow.
*/
public val flowIdentifier: kotlin.String? = builder.flowIdentifier
/**
* A name for the flow.
*/
public val name: kotlin.String? = builder.name
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.bedrockagent.model.UpdateFlowRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdateFlowRequest(")
append("customerEncryptionKeyArn=$customerEncryptionKeyArn,")
append("definition=$definition,")
append("description=$description,")
append("executionRoleArn=$executionRoleArn,")
append("flowIdentifier=$flowIdentifier,")
append("name=$name")
append(")")
}
override fun hashCode(): kotlin.Int {
var 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 + (flowIdentifier?.hashCode() ?: 0)
result = 31 * result + (name?.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 UpdateFlowRequest
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 (flowIdentifier != other.flowIdentifier) return false
if (name != other.name) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.bedrockagent.model.UpdateFlowRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* 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 the connections between the 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
/**
* The unique identifier of the flow.
*/
public var flowIdentifier: kotlin.String? = null
/**
* A name for the flow.
*/
public var name: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.bedrockagent.model.UpdateFlowRequest) : this() {
this.customerEncryptionKeyArn = x.customerEncryptionKeyArn
this.definition = x.definition
this.description = x.description
this.executionRoleArn = x.executionRoleArn
this.flowIdentifier = x.flowIdentifier
this.name = x.name
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.bedrockagent.model.UpdateFlowRequest = UpdateFlowRequest(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
}
}
}