commonMain.aws.sdk.kotlin.services.codestarconnections.model.Revision.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of codestarconnections-jvm Show documentation
Show all versions of codestarconnections-jvm Show documentation
The AWS SDK for Kotlin client for CodeStar connections
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.codestarconnections.model
/**
* Information about the revision for a specific sync event, such as the branch, owner ID, and name of the repository.
*/
public class Revision private constructor(builder: Builder) {
/**
* The branch name for a specific revision.
*/
public val branch: kotlin.String = requireNotNull(builder.branch) { "A non-null value must be provided for branch" }
/**
* The directory, if any, for a specific revision.
*/
public val directory: kotlin.String = requireNotNull(builder.directory) { "A non-null value must be provided for directory" }
/**
* The owner ID for a specific revision, such as the GitHub owner ID for a GitHub repository.
*/
public val ownerId: kotlin.String = requireNotNull(builder.ownerId) { "A non-null value must be provided for ownerId" }
/**
* The provider type for a revision, such as GitHub.
*/
public val providerType: aws.sdk.kotlin.services.codestarconnections.model.ProviderType = requireNotNull(builder.providerType) { "A non-null value must be provided for providerType" }
/**
* The repository name for a specific revision.
*/
public val repositoryName: kotlin.String = requireNotNull(builder.repositoryName) { "A non-null value must be provided for repositoryName" }
/**
* The SHA, such as the commit ID, for a specific revision.
*/
public val sha: kotlin.String = requireNotNull(builder.sha) { "A non-null value must be provided for sha" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codestarconnections.model.Revision = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Revision(")
append("branch=$branch,")
append("directory=$directory,")
append("ownerId=$ownerId,")
append("providerType=$providerType,")
append("repositoryName=$repositoryName,")
append("sha=$sha")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = branch.hashCode()
result = 31 * result + (directory.hashCode())
result = 31 * result + (ownerId.hashCode())
result = 31 * result + (providerType.hashCode())
result = 31 * result + (repositoryName.hashCode())
result = 31 * result + (sha.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 Revision
if (branch != other.branch) return false
if (directory != other.directory) return false
if (ownerId != other.ownerId) return false
if (providerType != other.providerType) return false
if (repositoryName != other.repositoryName) return false
if (sha != other.sha) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codestarconnections.model.Revision = Builder(this).apply(block).build()
public class Builder {
/**
* The branch name for a specific revision.
*/
public var branch: kotlin.String? = null
/**
* The directory, if any, for a specific revision.
*/
public var directory: kotlin.String? = null
/**
* The owner ID for a specific revision, such as the GitHub owner ID for a GitHub repository.
*/
public var ownerId: kotlin.String? = null
/**
* The provider type for a revision, such as GitHub.
*/
public var providerType: aws.sdk.kotlin.services.codestarconnections.model.ProviderType? = null
/**
* The repository name for a specific revision.
*/
public var repositoryName: kotlin.String? = null
/**
* The SHA, such as the commit ID, for a specific revision.
*/
public var sha: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.codestarconnections.model.Revision) : this() {
this.branch = x.branch
this.directory = x.directory
this.ownerId = x.ownerId
this.providerType = x.providerType
this.repositoryName = x.repositoryName
this.sha = x.sha
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.codestarconnections.model.Revision = Revision(this)
internal fun correctErrors(): Builder {
if (branch == null) branch = ""
if (directory == null) directory = ""
if (ownerId == null) ownerId = ""
if (providerType == null) providerType = ProviderType.SdkUnknown("no value provided")
if (repositoryName == null) repositoryName = ""
if (sha == null) sha = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy