commonMain.aws.sdk.kotlin.services.appflow.model.CreateFlowRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of appflow-jvm Show documentation
Show all versions of appflow-jvm Show documentation
The AWS SDK for Kotlin client for Appflow
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.appflow.model
import aws.smithy.kotlin.runtime.SdkDsl
public class CreateFlowRequest private constructor(builder: Builder) {
/**
* The `clientToken` parameter is an idempotency token. It ensures that your `CreateFlow` request completes only once. You choose the value to pass. For example, if you don't receive a response from your request, you can safely retry the request with the same `clientToken` parameter value.
*
* If you omit a `clientToken` value, the Amazon Web Services SDK that you are using inserts a value for you. This way, the SDK can safely retry requests multiple times after a network error. You must provide your own value for other use cases.
*
* If you specify input parameters that differ from your first request, an error occurs. If you use a different value for `clientToken`, Amazon AppFlow considers it a new call to `CreateFlow`. The token is active for 8 hours.
*/
public val clientToken: kotlin.String? = builder.clientToken
/**
* A description of the flow you want to create.
*/
public val description: kotlin.String? = builder.description
/**
* The configuration that controls how Amazon AppFlow places data in the destination connector.
*/
public val destinationFlowConfigList: List? = builder.destinationFlowConfigList
/**
* The specified name of the flow. Spaces are not allowed. Use underscores (_) or hyphens (-) only.
*/
public val flowName: kotlin.String? = builder.flowName
/**
* The ARN (Amazon Resource Name) of the Key Management Service (KMS) key you provide for encryption. This is required if you do not want to use the Amazon AppFlow-managed KMS key. If you don't provide anything here, Amazon AppFlow uses the Amazon AppFlow-managed KMS key.
*/
public val kmsArn: kotlin.String? = builder.kmsArn
/**
* Specifies the configuration that Amazon AppFlow uses when it catalogs the data that's transferred by the associated flow. When Amazon AppFlow catalogs the data from a flow, it stores metadata in a data catalog.
*/
public val metadataCatalogConfig: aws.sdk.kotlin.services.appflow.model.MetadataCatalogConfig? = builder.metadataCatalogConfig
/**
* The configuration that controls how Amazon AppFlow retrieves data from the source connector.
*/
public val sourceFlowConfig: aws.sdk.kotlin.services.appflow.model.SourceFlowConfig? = builder.sourceFlowConfig
/**
* The tags used to organize, track, or control access for your flow.
*/
public val tags: Map? = builder.tags
/**
* A list of tasks that Amazon AppFlow performs while transferring the data in the flow run.
*/
public val tasks: List? = builder.tasks
/**
* The trigger settings that determine how and when the flow runs.
*/
public val triggerConfig: aws.sdk.kotlin.services.appflow.model.TriggerConfig? = builder.triggerConfig
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.appflow.model.CreateFlowRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateFlowRequest(")
append("clientToken=$clientToken,")
append("description=$description,")
append("destinationFlowConfigList=$destinationFlowConfigList,")
append("flowName=$flowName,")
append("kmsArn=$kmsArn,")
append("metadataCatalogConfig=$metadataCatalogConfig,")
append("sourceFlowConfig=$sourceFlowConfig,")
append("tags=$tags,")
append("tasks=$tasks,")
append("triggerConfig=$triggerConfig")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = clientToken?.hashCode() ?: 0
result = 31 * result + (description?.hashCode() ?: 0)
result = 31 * result + (destinationFlowConfigList?.hashCode() ?: 0)
result = 31 * result + (flowName?.hashCode() ?: 0)
result = 31 * result + (kmsArn?.hashCode() ?: 0)
result = 31 * result + (metadataCatalogConfig?.hashCode() ?: 0)
result = 31 * result + (sourceFlowConfig?.hashCode() ?: 0)
result = 31 * result + (tags?.hashCode() ?: 0)
result = 31 * result + (tasks?.hashCode() ?: 0)
result = 31 * result + (triggerConfig?.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 (description != other.description) return false
if (destinationFlowConfigList != other.destinationFlowConfigList) return false
if (flowName != other.flowName) return false
if (kmsArn != other.kmsArn) return false
if (metadataCatalogConfig != other.metadataCatalogConfig) return false
if (sourceFlowConfig != other.sourceFlowConfig) return false
if (tags != other.tags) return false
if (tasks != other.tasks) return false
if (triggerConfig != other.triggerConfig) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.appflow.model.CreateFlowRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The `clientToken` parameter is an idempotency token. It ensures that your `CreateFlow` request completes only once. You choose the value to pass. For example, if you don't receive a response from your request, you can safely retry the request with the same `clientToken` parameter value.
*
* If you omit a `clientToken` value, the Amazon Web Services SDK that you are using inserts a value for you. This way, the SDK can safely retry requests multiple times after a network error. You must provide your own value for other use cases.
*
* If you specify input parameters that differ from your first request, an error occurs. If you use a different value for `clientToken`, Amazon AppFlow considers it a new call to `CreateFlow`. The token is active for 8 hours.
*/
public var clientToken: kotlin.String? = null
/**
* A description of the flow you want to create.
*/
public var description: kotlin.String? = null
/**
* The configuration that controls how Amazon AppFlow places data in the destination connector.
*/
public var destinationFlowConfigList: List? = null
/**
* The specified name of the flow. Spaces are not allowed. Use underscores (_) or hyphens (-) only.
*/
public var flowName: kotlin.String? = null
/**
* The ARN (Amazon Resource Name) of the Key Management Service (KMS) key you provide for encryption. This is required if you do not want to use the Amazon AppFlow-managed KMS key. If you don't provide anything here, Amazon AppFlow uses the Amazon AppFlow-managed KMS key.
*/
public var kmsArn: kotlin.String? = null
/**
* Specifies the configuration that Amazon AppFlow uses when it catalogs the data that's transferred by the associated flow. When Amazon AppFlow catalogs the data from a flow, it stores metadata in a data catalog.
*/
public var metadataCatalogConfig: aws.sdk.kotlin.services.appflow.model.MetadataCatalogConfig? = null
/**
* The configuration that controls how Amazon AppFlow retrieves data from the source connector.
*/
public var sourceFlowConfig: aws.sdk.kotlin.services.appflow.model.SourceFlowConfig? = null
/**
* The tags used to organize, track, or control access for your flow.
*/
public var tags: Map? = null
/**
* A list of tasks that Amazon AppFlow performs while transferring the data in the flow run.
*/
public var tasks: List? = null
/**
* The trigger settings that determine how and when the flow runs.
*/
public var triggerConfig: aws.sdk.kotlin.services.appflow.model.TriggerConfig? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.appflow.model.CreateFlowRequest) : this() {
this.clientToken = x.clientToken
this.description = x.description
this.destinationFlowConfigList = x.destinationFlowConfigList
this.flowName = x.flowName
this.kmsArn = x.kmsArn
this.metadataCatalogConfig = x.metadataCatalogConfig
this.sourceFlowConfig = x.sourceFlowConfig
this.tags = x.tags
this.tasks = x.tasks
this.triggerConfig = x.triggerConfig
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.appflow.model.CreateFlowRequest = CreateFlowRequest(this)
/**
* construct an [aws.sdk.kotlin.services.appflow.model.MetadataCatalogConfig] inside the given [block]
*/
public fun metadataCatalogConfig(block: aws.sdk.kotlin.services.appflow.model.MetadataCatalogConfig.Builder.() -> kotlin.Unit) {
this.metadataCatalogConfig = aws.sdk.kotlin.services.appflow.model.MetadataCatalogConfig.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.appflow.model.SourceFlowConfig] inside the given [block]
*/
public fun sourceFlowConfig(block: aws.sdk.kotlin.services.appflow.model.SourceFlowConfig.Builder.() -> kotlin.Unit) {
this.sourceFlowConfig = aws.sdk.kotlin.services.appflow.model.SourceFlowConfig.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.appflow.model.TriggerConfig] inside the given [block]
*/
public fun triggerConfig(block: aws.sdk.kotlin.services.appflow.model.TriggerConfig.Builder.() -> kotlin.Unit) {
this.triggerConfig = aws.sdk.kotlin.services.appflow.model.TriggerConfig.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}