
commonMain.aws.sdk.kotlin.services.neptunedata.model.GetPropertygraphStreamResponse.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.neptunedata.model
import aws.smithy.kotlin.runtime.SdkDsl
public class GetPropertygraphStreamResponse private constructor(builder: Builder) {
/**
* Serialization format for the change records being returned. Currently, the only supported value is `PG_JSON`.
*/
public val format: kotlin.String = requireNotNull(builder.format) { "A non-null value must be provided for format" }
/**
* Sequence identifier of the last change in the stream response.
*
* An event ID is composed of two fields: a `commitNum`, which identifies a transaction that changed the graph, and an `opNum`, which identifies a specific operation within that transaction:
*/
public val lastEventId: Map = requireNotNull(builder.lastEventId) { "A non-null value must be provided for lastEventId" }
/**
* The time at which the commit for the transaction was requested, in milliseconds from the Unix epoch.
*/
public val lastTrxTimestampInMillis: kotlin.Long = requireNotNull(builder.lastTrxTimestampInMillis) { "A non-null value must be provided for lastTrxTimestampInMillis" }
/**
* An array of serialized change-log stream records included in the response.
*/
public val records: List = requireNotNull(builder.records) { "A non-null value must be provided for records" }
/**
* The total number of records in the response.
*/
public val totalRecords: kotlin.Int = requireNotNull(builder.totalRecords) { "A non-null value must be provided for totalRecords" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.neptunedata.model.GetPropertygraphStreamResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GetPropertygraphStreamResponse(")
append("format=$format,")
append("lastEventId=$lastEventId,")
append("lastTrxTimestampInMillis=$lastTrxTimestampInMillis,")
append("records=$records,")
append("totalRecords=$totalRecords")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = format.hashCode()
result = 31 * result + (lastEventId.hashCode())
result = 31 * result + (lastTrxTimestampInMillis.hashCode())
result = 31 * result + (records.hashCode())
result = 31 * result + (totalRecords)
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 GetPropertygraphStreamResponse
if (format != other.format) return false
if (lastEventId != other.lastEventId) return false
if (lastTrxTimestampInMillis != other.lastTrxTimestampInMillis) return false
if (records != other.records) return false
if (totalRecords != other.totalRecords) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.neptunedata.model.GetPropertygraphStreamResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Serialization format for the change records being returned. Currently, the only supported value is `PG_JSON`.
*/
public var format: kotlin.String? = null
/**
* Sequence identifier of the last change in the stream response.
*
* An event ID is composed of two fields: a `commitNum`, which identifies a transaction that changed the graph, and an `opNum`, which identifies a specific operation within that transaction:
*/
public var lastEventId: Map? = null
/**
* The time at which the commit for the transaction was requested, in milliseconds from the Unix epoch.
*/
public var lastTrxTimestampInMillis: kotlin.Long? = null
/**
* An array of serialized change-log stream records included in the response.
*/
public var records: List? = null
/**
* The total number of records in the response.
*/
public var totalRecords: kotlin.Int? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.neptunedata.model.GetPropertygraphStreamResponse) : this() {
this.format = x.format
this.lastEventId = x.lastEventId
this.lastTrxTimestampInMillis = x.lastTrxTimestampInMillis
this.records = x.records
this.totalRecords = x.totalRecords
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.neptunedata.model.GetPropertygraphStreamResponse = GetPropertygraphStreamResponse(this)
internal fun correctErrors(): Builder {
if (format == null) format = ""
if (lastEventId == null) lastEventId = emptyMap()
if (lastTrxTimestampInMillis == null) lastTrxTimestampInMillis = 0L
if (records == null) records = emptyList()
if (totalRecords == null) totalRecords = 0
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy