commonMain.aws.sdk.kotlin.services.codegurureviewer.model.EventInfo.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of codegurureviewer-jvm Show documentation
Show all versions of codegurureviewer-jvm Show documentation
The AWS SDK for Kotlin client for CodeGuru Reviewer
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.codegurureviewer.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Information about an event. The event might be a push, pull request, scheduled request, or another type of event.
*/
public class EventInfo private constructor(builder: Builder) {
/**
* The name of the event. The possible names are `pull_request`, `workflow_dispatch`, `schedule`, and `push`
*/
public val name: kotlin.String? = builder.name
/**
* The state of an event. The state might be open, closed, or another state.
*/
public val state: kotlin.String? = builder.state
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codegurureviewer.model.EventInfo = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("EventInfo(")
append("name=$name,")
append("state=$state")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = name?.hashCode() ?: 0
result = 31 * result + (state?.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 EventInfo
if (name != other.name) return false
if (state != other.state) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codegurureviewer.model.EventInfo = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The name of the event. The possible names are `pull_request`, `workflow_dispatch`, `schedule`, and `push`
*/
public var name: kotlin.String? = null
/**
* The state of an event. The state might be open, closed, or another state.
*/
public var state: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.codegurureviewer.model.EventInfo) : this() {
this.name = x.name
this.state = x.state
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.codegurureviewer.model.EventInfo = EventInfo(this)
internal fun correctErrors(): Builder {
return this
}
}
}