commonMain.aws.sdk.kotlin.services.codestarconnections.model.RepositorySyncDefinition.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
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The definition for a repository with a sync configuration.
*/
public class RepositorySyncDefinition private constructor(builder: Builder) {
/**
* The branch specified for a repository sync definition.
*/
public val branch: kotlin.String = requireNotNull(builder.branch) { "A non-null value must be provided for branch" }
/**
* The configuration file for a repository sync definition. This value comes from creating or updating the `config-file` field of a `sync-configuration`.
*/
public val directory: kotlin.String = requireNotNull(builder.directory) { "A non-null value must be provided for directory" }
/**
* The parent resource specified for a repository sync definition.
*/
public val parent: kotlin.String = requireNotNull(builder.parent) { "A non-null value must be provided for parent" }
/**
* The target resource specified for a repository sync definition. In some cases, such as CFN_STACK_SYNC, the parent and target resource are the same.
*/
public val target: kotlin.String = requireNotNull(builder.target) { "A non-null value must be provided for target" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codestarconnections.model.RepositorySyncDefinition = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("RepositorySyncDefinition(")
append("branch=$branch,")
append("directory=$directory,")
append("parent=$parent,")
append("target=$target")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = branch.hashCode()
result = 31 * result + (directory.hashCode())
result = 31 * result + (parent.hashCode())
result = 31 * result + (target.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 RepositorySyncDefinition
if (branch != other.branch) return false
if (directory != other.directory) return false
if (parent != other.parent) return false
if (target != other.target) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codestarconnections.model.RepositorySyncDefinition = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The branch specified for a repository sync definition.
*/
public var branch: kotlin.String? = null
/**
* The configuration file for a repository sync definition. This value comes from creating or updating the `config-file` field of a `sync-configuration`.
*/
public var directory: kotlin.String? = null
/**
* The parent resource specified for a repository sync definition.
*/
public var parent: kotlin.String? = null
/**
* The target resource specified for a repository sync definition. In some cases, such as CFN_STACK_SYNC, the parent and target resource are the same.
*/
public var target: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.codestarconnections.model.RepositorySyncDefinition) : this() {
this.branch = x.branch
this.directory = x.directory
this.parent = x.parent
this.target = x.target
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.codestarconnections.model.RepositorySyncDefinition = RepositorySyncDefinition(this)
internal fun correctErrors(): Builder {
if (branch == null) branch = ""
if (directory == null) directory = ""
if (parent == null) parent = ""
if (target == null) target = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy