
commonMain.aws.sdk.kotlin.services.codecommit.model.SetFileModeEntry.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.codecommit.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Information about the file mode changes.
*/
public class SetFileModeEntry private constructor(builder: Builder) {
/**
* The file mode for the file.
*/
public val fileMode: aws.sdk.kotlin.services.codecommit.model.FileModeTypeEnum = requireNotNull(builder.fileMode) { "A non-null value must be provided for fileMode" }
/**
* The full path to the file, including the name of the file.
*/
public val filePath: kotlin.String = requireNotNull(builder.filePath) { "A non-null value must be provided for filePath" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codecommit.model.SetFileModeEntry = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("SetFileModeEntry(")
append("fileMode=$fileMode,")
append("filePath=$filePath")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = fileMode.hashCode()
result = 31 * result + (filePath.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 SetFileModeEntry
if (fileMode != other.fileMode) return false
if (filePath != other.filePath) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codecommit.model.SetFileModeEntry = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The file mode for the file.
*/
public var fileMode: aws.sdk.kotlin.services.codecommit.model.FileModeTypeEnum? = null
/**
* The full path to the file, including the name of the file.
*/
public var filePath: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.codecommit.model.SetFileModeEntry) : this() {
this.fileMode = x.fileMode
this.filePath = x.filePath
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.codecommit.model.SetFileModeEntry = SetFileModeEntry(this)
internal fun correctErrors(): Builder {
if (fileMode == null) fileMode = FileModeTypeEnum.SdkUnknown("no value provided")
if (filePath == null) filePath = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy