
commonMain.aws.sdk.kotlin.services.codecommit.model.GetFileRequest.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
public class GetFileRequest private constructor(builder: Builder) {
/**
* The fully quaified reference that identifies the commit that contains the file. For example, you can specify a full commit ID, a tag, a branch name, or a reference such as refs/heads/main. If none is provided, the head commit is used.
*/
public val commitSpecifier: kotlin.String? = builder.commitSpecifier
/**
* The fully qualified path to the file, including the full name and extension of the file. For example, /examples/file.md is the fully qualified path to a file named file.md in a folder named examples.
*/
public val filePath: kotlin.String? = builder.filePath
/**
* The name of the repository that contains the file.
*/
public val repositoryName: kotlin.String? = builder.repositoryName
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codecommit.model.GetFileRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GetFileRequest(")
append("commitSpecifier=$commitSpecifier,")
append("filePath=$filePath,")
append("repositoryName=$repositoryName")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = commitSpecifier?.hashCode() ?: 0
result = 31 * result + (filePath?.hashCode() ?: 0)
result = 31 * result + (repositoryName?.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 GetFileRequest
if (commitSpecifier != other.commitSpecifier) return false
if (filePath != other.filePath) return false
if (repositoryName != other.repositoryName) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codecommit.model.GetFileRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The fully quaified reference that identifies the commit that contains the file. For example, you can specify a full commit ID, a tag, a branch name, or a reference such as refs/heads/main. If none is provided, the head commit is used.
*/
public var commitSpecifier: kotlin.String? = null
/**
* The fully qualified path to the file, including the full name and extension of the file. For example, /examples/file.md is the fully qualified path to a file named file.md in a folder named examples.
*/
public var filePath: kotlin.String? = null
/**
* The name of the repository that contains the file.
*/
public var repositoryName: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.codecommit.model.GetFileRequest) : this() {
this.commitSpecifier = x.commitSpecifier
this.filePath = x.filePath
this.repositoryName = x.repositoryName
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.codecommit.model.GetFileRequest = GetFileRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy