commonMain.aws.sdk.kotlin.services.deadline.model.PathMappingRule.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of deadline-jvm Show documentation
Show all versions of deadline-jvm Show documentation
The AWS SDK for Kotlin client for deadline
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.deadline.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The details of a source and destination path.
*/
public class PathMappingRule private constructor(builder: Builder) {
/**
* The destination path.
*/
public val destinationPath: kotlin.String = requireNotNull(builder.destinationPath) { "A non-null value must be provided for destinationPath" }
/**
* The source path.
*/
public val sourcePath: kotlin.String = requireNotNull(builder.sourcePath) { "A non-null value must be provided for sourcePath" }
/**
* The source path format.
*/
public val sourcePathFormat: aws.sdk.kotlin.services.deadline.model.PathFormat = requireNotNull(builder.sourcePathFormat) { "A non-null value must be provided for sourcePathFormat" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.deadline.model.PathMappingRule = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PathMappingRule(")
append("*** Sensitive Data Redacted ***")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = destinationPath.hashCode()
result = 31 * result + (sourcePath.hashCode())
result = 31 * result + (sourcePathFormat.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 PathMappingRule
if (destinationPath != other.destinationPath) return false
if (sourcePath != other.sourcePath) return false
if (sourcePathFormat != other.sourcePathFormat) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.deadline.model.PathMappingRule = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The destination path.
*/
public var destinationPath: kotlin.String? = null
/**
* The source path.
*/
public var sourcePath: kotlin.String? = null
/**
* The source path format.
*/
public var sourcePathFormat: aws.sdk.kotlin.services.deadline.model.PathFormat? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.deadline.model.PathMappingRule) : this() {
this.destinationPath = x.destinationPath
this.sourcePath = x.sourcePath
this.sourcePathFormat = x.sourcePathFormat
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.deadline.model.PathMappingRule = PathMappingRule(this)
internal fun correctErrors(): Builder {
if (destinationPath == null) destinationPath = ""
if (sourcePath == null) sourcePath = ""
if (sourcePathFormat == null) sourcePathFormat = PathFormat.SdkUnknown("no value provided")
return this
}
}
}