commonMain.aws.sdk.kotlin.services.dataexchange.model.RevisionEntry.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dataexchange-jvm Show documentation
Show all versions of dataexchange-jvm Show documentation
The AWS Kotlin client for DataExchange
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.dataexchange.model
import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant
/**
* A revision is a container for one or more assets.
*/
public class RevisionEntry private constructor(builder: Builder) {
/**
* The ARN for the revision.
*/
public val arn: kotlin.String = requireNotNull(builder.arn) { "A non-null value must be provided for arn" }
/**
* An optional comment about the revision.
*/
public val comment: kotlin.String? = builder.comment
/**
* The date and time that the revision was created, in ISO 8601 format.
*/
public val createdAt: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.createdAt) { "A non-null value must be provided for createdAt" }
/**
* The unique identifier for the data set associated with the data set revision.
*/
public val dataSetId: kotlin.String = requireNotNull(builder.dataSetId) { "A non-null value must be provided for dataSetId" }
/**
* To publish a revision to a data set in a product, the revision must first be finalized. Finalizing a revision tells AWS Data Exchange that your changes to the assets in the revision are complete. After it's in this read-only state, you can publish the revision to your products. Finalized revisions can be published through the AWS Data Exchange console or the AWS Marketplace Catalog API, using the StartChangeSet AWS Marketplace Catalog API action. When using the API, revisions are uniquely identified by their ARN.
*/
public val finalized: kotlin.Boolean = builder.finalized
/**
* The unique identifier for the revision.
*/
public val id: kotlin.String = requireNotNull(builder.id) { "A non-null value must be provided for id" }
/**
* A required comment to inform subscribers of the reason their access to the revision was revoked.
*/
public val revocationComment: kotlin.String? = builder.revocationComment
/**
* A status indicating that subscribers' access to the revision was revoked.
*/
public val revoked: kotlin.Boolean = builder.revoked
/**
* The date and time that the revision was revoked, in ISO 8601 format.
*/
public val revokedAt: aws.smithy.kotlin.runtime.time.Instant? = builder.revokedAt
/**
* The revision ID of the owned revision corresponding to the entitled revision being viewed. This parameter is returned when a revision owner is viewing the entitled copy of its owned revision.
*/
public val sourceId: kotlin.String? = builder.sourceId
/**
* The date and time that the revision was last updated, in ISO 8601 format.
*/
public val updatedAt: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.updatedAt) { "A non-null value must be provided for updatedAt" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.dataexchange.model.RevisionEntry = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("RevisionEntry(")
append("arn=$arn,")
append("comment=$comment,")
append("createdAt=$createdAt,")
append("dataSetId=$dataSetId,")
append("finalized=$finalized,")
append("id=$id,")
append("revocationComment=$revocationComment,")
append("revoked=$revoked,")
append("revokedAt=$revokedAt,")
append("sourceId=$sourceId,")
append("updatedAt=$updatedAt")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = arn.hashCode()
result = 31 * result + (comment?.hashCode() ?: 0)
result = 31 * result + (createdAt.hashCode())
result = 31 * result + (dataSetId.hashCode())
result = 31 * result + (finalized.hashCode())
result = 31 * result + (id.hashCode())
result = 31 * result + (revocationComment?.hashCode() ?: 0)
result = 31 * result + (revoked.hashCode())
result = 31 * result + (revokedAt?.hashCode() ?: 0)
result = 31 * result + (sourceId?.hashCode() ?: 0)
result = 31 * result + (updatedAt.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 RevisionEntry
if (arn != other.arn) return false
if (comment != other.comment) return false
if (createdAt != other.createdAt) return false
if (dataSetId != other.dataSetId) return false
if (finalized != other.finalized) return false
if (id != other.id) return false
if (revocationComment != other.revocationComment) return false
if (revoked != other.revoked) return false
if (revokedAt != other.revokedAt) return false
if (sourceId != other.sourceId) return false
if (updatedAt != other.updatedAt) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.dataexchange.model.RevisionEntry = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The ARN for the revision.
*/
public var arn: kotlin.String? = null
/**
* An optional comment about the revision.
*/
public var comment: kotlin.String? = null
/**
* The date and time that the revision was created, in ISO 8601 format.
*/
public var createdAt: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The unique identifier for the data set associated with the data set revision.
*/
public var dataSetId: kotlin.String? = null
/**
* To publish a revision to a data set in a product, the revision must first be finalized. Finalizing a revision tells AWS Data Exchange that your changes to the assets in the revision are complete. After it's in this read-only state, you can publish the revision to your products. Finalized revisions can be published through the AWS Data Exchange console or the AWS Marketplace Catalog API, using the StartChangeSet AWS Marketplace Catalog API action. When using the API, revisions are uniquely identified by their ARN.
*/
public var finalized: kotlin.Boolean = false
/**
* The unique identifier for the revision.
*/
public var id: kotlin.String? = null
/**
* A required comment to inform subscribers of the reason their access to the revision was revoked.
*/
public var revocationComment: kotlin.String? = null
/**
* A status indicating that subscribers' access to the revision was revoked.
*/
public var revoked: kotlin.Boolean = false
/**
* The date and time that the revision was revoked, in ISO 8601 format.
*/
public var revokedAt: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The revision ID of the owned revision corresponding to the entitled revision being viewed. This parameter is returned when a revision owner is viewing the entitled copy of its owned revision.
*/
public var sourceId: kotlin.String? = null
/**
* The date and time that the revision was last updated, in ISO 8601 format.
*/
public var updatedAt: aws.smithy.kotlin.runtime.time.Instant? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.dataexchange.model.RevisionEntry) : this() {
this.arn = x.arn
this.comment = x.comment
this.createdAt = x.createdAt
this.dataSetId = x.dataSetId
this.finalized = x.finalized
this.id = x.id
this.revocationComment = x.revocationComment
this.revoked = x.revoked
this.revokedAt = x.revokedAt
this.sourceId = x.sourceId
this.updatedAt = x.updatedAt
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.dataexchange.model.RevisionEntry = RevisionEntry(this)
internal fun correctErrors(): Builder {
if (arn == null) arn = ""
if (createdAt == null) createdAt = Instant.fromEpochSeconds(0)
if (dataSetId == null) dataSetId = ""
if (id == null) id = ""
if (updatedAt == null) updatedAt = Instant.fromEpochSeconds(0)
return this
}
}
}