
commonMain.aws.sdk.kotlin.services.codecommit.model.File.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
/**
* Returns information about a file in a repository.
*/
public class File private constructor(builder: Builder) {
/**
* The fully qualified path to the file in the repository.
*/
public val absolutePath: kotlin.String? = builder.absolutePath
/**
* The blob ID that contains the file information.
*/
public val blobId: kotlin.String? = builder.blobId
/**
* The extrapolated file mode permissions for the file. Valid values include EXECUTABLE and NORMAL.
*/
public val fileMode: aws.sdk.kotlin.services.codecommit.model.FileModeTypeEnum? = builder.fileMode
/**
* The relative path of the file from the folder where the query originated.
*/
public val relativePath: kotlin.String? = builder.relativePath
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codecommit.model.File = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("File(")
append("absolutePath=$absolutePath,")
append("blobId=$blobId,")
append("fileMode=$fileMode,")
append("relativePath=$relativePath")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = absolutePath?.hashCode() ?: 0
result = 31 * result + (blobId?.hashCode() ?: 0)
result = 31 * result + (fileMode?.hashCode() ?: 0)
result = 31 * result + (relativePath?.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 File
if (absolutePath != other.absolutePath) return false
if (blobId != other.blobId) return false
if (fileMode != other.fileMode) return false
if (relativePath != other.relativePath) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codecommit.model.File = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The fully qualified path to the file in the repository.
*/
public var absolutePath: kotlin.String? = null
/**
* The blob ID that contains the file information.
*/
public var blobId: kotlin.String? = null
/**
* The extrapolated file mode permissions for the file. Valid values include EXECUTABLE and NORMAL.
*/
public var fileMode: aws.sdk.kotlin.services.codecommit.model.FileModeTypeEnum? = null
/**
* The relative path of the file from the folder where the query originated.
*/
public var relativePath: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.codecommit.model.File) : this() {
this.absolutePath = x.absolutePath
this.blobId = x.blobId
this.fileMode = x.fileMode
this.relativePath = x.relativePath
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.codecommit.model.File = File(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy