commonMain.aws.sdk.kotlin.services.datasync.model.CreateTaskRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of datasync-jvm Show documentation
Show all versions of datasync-jvm Show documentation
The AWS SDK for Kotlin client for DataSync
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.datasync.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* CreateTaskRequest
*/
public class CreateTaskRequest private constructor(builder: Builder) {
/**
* Specifies the Amazon Resource Name (ARN) of an Amazon CloudWatch log group for monitoring your task.
*/
public val cloudWatchLogGroupArn: kotlin.String? = builder.cloudWatchLogGroupArn
/**
* Specifies the ARN of your transfer's destination location.
*/
public val destinationLocationArn: kotlin.String? = builder.destinationLocationArn
/**
* Specifies exclude filters that define the files, objects, and folders in your source location that you don't want DataSync to transfer. For more information and examples, see [Specifying what DataSync transfers by using filters](https://docs.aws.amazon.com/datasync/latest/userguide/filtering.html).
*/
public val excludes: List? = builder.excludes
/**
* Specifies include filters define the files, objects, and folders in your source location that you want DataSync to transfer. For more information and examples, see [Specifying what DataSync transfers by using filters](https://docs.aws.amazon.com/datasync/latest/userguide/filtering.html).
*/
public val includes: List? = builder.includes
/**
* Configures a manifest, which is a list of files or objects that you want DataSync to transfer. For more information and configuration examples, see [Specifying what DataSync transfers by using a manifest](https://docs.aws.amazon.com/datasync/latest/userguide/transferring-with-manifest.html).
*
* When using this parameter, your caller identity (the role that you're using DataSync with) must have the `iam:PassRole` permission. The [AWSDataSyncFullAccess](https://docs.aws.amazon.com/datasync/latest/userguide/security-iam-awsmanpol.html#security-iam-awsmanpol-awsdatasyncfullaccess) policy includes this permission.
*/
public val manifestConfig: aws.sdk.kotlin.services.datasync.model.ManifestConfig? = builder.manifestConfig
/**
* Specifies the name of your task.
*/
public val name: kotlin.String? = builder.name
/**
* Specifies your task's settings, such as preserving file metadata, verifying data integrity, among other options.
*/
public val options: aws.sdk.kotlin.services.datasync.model.Options? = builder.options
/**
* Specifies a schedule for when you want your task to run. For more information, see [Scheduling your task](https://docs.aws.amazon.com/datasync/latest/userguide/task-scheduling.html).
*/
public val schedule: aws.sdk.kotlin.services.datasync.model.TaskSchedule? = builder.schedule
/**
* Specifies the ARN of your transfer's source location.
*/
public val sourceLocationArn: kotlin.String? = builder.sourceLocationArn
/**
* Specifies the tags that you want to apply to your task.
*
* *Tags* are key-value pairs that help you manage, filter, and search for your DataSync resources.
*/
public val tags: List? = builder.tags
/**
* Specifies how you want to configure a task report, which provides detailed information about your DataSync transfer. For more information, see [Monitoring your DataSync transfers with task reports](https://docs.aws.amazon.com/datasync/latest/userguide/task-reports.html).
*
* When using this parameter, your caller identity (the role that you're using DataSync with) must have the `iam:PassRole` permission. The [AWSDataSyncFullAccess](https://docs.aws.amazon.com/datasync/latest/userguide/security-iam-awsmanpol.html#security-iam-awsmanpol-awsdatasyncfullaccess) policy includes this permission.
*/
public val taskReportConfig: aws.sdk.kotlin.services.datasync.model.TaskReportConfig? = builder.taskReportConfig
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.datasync.model.CreateTaskRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateTaskRequest(")
append("cloudWatchLogGroupArn=$cloudWatchLogGroupArn,")
append("destinationLocationArn=$destinationLocationArn,")
append("excludes=$excludes,")
append("includes=$includes,")
append("manifestConfig=$manifestConfig,")
append("name=$name,")
append("options=$options,")
append("schedule=$schedule,")
append("sourceLocationArn=$sourceLocationArn,")
append("tags=$tags,")
append("taskReportConfig=$taskReportConfig")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = cloudWatchLogGroupArn?.hashCode() ?: 0
result = 31 * result + (destinationLocationArn?.hashCode() ?: 0)
result = 31 * result + (excludes?.hashCode() ?: 0)
result = 31 * result + (includes?.hashCode() ?: 0)
result = 31 * result + (manifestConfig?.hashCode() ?: 0)
result = 31 * result + (name?.hashCode() ?: 0)
result = 31 * result + (options?.hashCode() ?: 0)
result = 31 * result + (schedule?.hashCode() ?: 0)
result = 31 * result + (sourceLocationArn?.hashCode() ?: 0)
result = 31 * result + (tags?.hashCode() ?: 0)
result = 31 * result + (taskReportConfig?.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 CreateTaskRequest
if (cloudWatchLogGroupArn != other.cloudWatchLogGroupArn) return false
if (destinationLocationArn != other.destinationLocationArn) return false
if (excludes != other.excludes) return false
if (includes != other.includes) return false
if (manifestConfig != other.manifestConfig) return false
if (name != other.name) return false
if (options != other.options) return false
if (schedule != other.schedule) return false
if (sourceLocationArn != other.sourceLocationArn) return false
if (tags != other.tags) return false
if (taskReportConfig != other.taskReportConfig) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.datasync.model.CreateTaskRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Specifies the Amazon Resource Name (ARN) of an Amazon CloudWatch log group for monitoring your task.
*/
public var cloudWatchLogGroupArn: kotlin.String? = null
/**
* Specifies the ARN of your transfer's destination location.
*/
public var destinationLocationArn: kotlin.String? = null
/**
* Specifies exclude filters that define the files, objects, and folders in your source location that you don't want DataSync to transfer. For more information and examples, see [Specifying what DataSync transfers by using filters](https://docs.aws.amazon.com/datasync/latest/userguide/filtering.html).
*/
public var excludes: List? = null
/**
* Specifies include filters define the files, objects, and folders in your source location that you want DataSync to transfer. For more information and examples, see [Specifying what DataSync transfers by using filters](https://docs.aws.amazon.com/datasync/latest/userguide/filtering.html).
*/
public var includes: List? = null
/**
* Configures a manifest, which is a list of files or objects that you want DataSync to transfer. For more information and configuration examples, see [Specifying what DataSync transfers by using a manifest](https://docs.aws.amazon.com/datasync/latest/userguide/transferring-with-manifest.html).
*
* When using this parameter, your caller identity (the role that you're using DataSync with) must have the `iam:PassRole` permission. The [AWSDataSyncFullAccess](https://docs.aws.amazon.com/datasync/latest/userguide/security-iam-awsmanpol.html#security-iam-awsmanpol-awsdatasyncfullaccess) policy includes this permission.
*/
public var manifestConfig: aws.sdk.kotlin.services.datasync.model.ManifestConfig? = null
/**
* Specifies the name of your task.
*/
public var name: kotlin.String? = null
/**
* Specifies your task's settings, such as preserving file metadata, verifying data integrity, among other options.
*/
public var options: aws.sdk.kotlin.services.datasync.model.Options? = null
/**
* Specifies a schedule for when you want your task to run. For more information, see [Scheduling your task](https://docs.aws.amazon.com/datasync/latest/userguide/task-scheduling.html).
*/
public var schedule: aws.sdk.kotlin.services.datasync.model.TaskSchedule? = null
/**
* Specifies the ARN of your transfer's source location.
*/
public var sourceLocationArn: kotlin.String? = null
/**
* Specifies the tags that you want to apply to your task.
*
* *Tags* are key-value pairs that help you manage, filter, and search for your DataSync resources.
*/
public var tags: List? = null
/**
* Specifies how you want to configure a task report, which provides detailed information about your DataSync transfer. For more information, see [Monitoring your DataSync transfers with task reports](https://docs.aws.amazon.com/datasync/latest/userguide/task-reports.html).
*
* When using this parameter, your caller identity (the role that you're using DataSync with) must have the `iam:PassRole` permission. The [AWSDataSyncFullAccess](https://docs.aws.amazon.com/datasync/latest/userguide/security-iam-awsmanpol.html#security-iam-awsmanpol-awsdatasyncfullaccess) policy includes this permission.
*/
public var taskReportConfig: aws.sdk.kotlin.services.datasync.model.TaskReportConfig? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.datasync.model.CreateTaskRequest) : this() {
this.cloudWatchLogGroupArn = x.cloudWatchLogGroupArn
this.destinationLocationArn = x.destinationLocationArn
this.excludes = x.excludes
this.includes = x.includes
this.manifestConfig = x.manifestConfig
this.name = x.name
this.options = x.options
this.schedule = x.schedule
this.sourceLocationArn = x.sourceLocationArn
this.tags = x.tags
this.taskReportConfig = x.taskReportConfig
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.datasync.model.CreateTaskRequest = CreateTaskRequest(this)
/**
* construct an [aws.sdk.kotlin.services.datasync.model.ManifestConfig] inside the given [block]
*/
public fun manifestConfig(block: aws.sdk.kotlin.services.datasync.model.ManifestConfig.Builder.() -> kotlin.Unit) {
this.manifestConfig = aws.sdk.kotlin.services.datasync.model.ManifestConfig.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.datasync.model.Options] inside the given [block]
*/
public fun options(block: aws.sdk.kotlin.services.datasync.model.Options.Builder.() -> kotlin.Unit) {
this.options = aws.sdk.kotlin.services.datasync.model.Options.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.datasync.model.TaskSchedule] inside the given [block]
*/
public fun schedule(block: aws.sdk.kotlin.services.datasync.model.TaskSchedule.Builder.() -> kotlin.Unit) {
this.schedule = aws.sdk.kotlin.services.datasync.model.TaskSchedule.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.datasync.model.TaskReportConfig] inside the given [block]
*/
public fun taskReportConfig(block: aws.sdk.kotlin.services.datasync.model.TaskReportConfig.Builder.() -> kotlin.Unit) {
this.taskReportConfig = aws.sdk.kotlin.services.datasync.model.TaskReportConfig.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy