
commonMain.aws.sdk.kotlin.services.opensearch.model.UpdatePackageRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.opensearch.model
/**
* Container for request parameters to the `UpdatePackage` operation.
*/
public class UpdatePackageRequest private constructor(builder: Builder) {
/**
* Commit message for the updated file, which is shown as part of `GetPackageVersionHistoryResponse`.
*/
public val commitMessage: kotlin.String? = builder.commitMessage
/**
* A new description of the package.
*/
public val packageDescription: kotlin.String? = builder.packageDescription
/**
* The unique identifier for the package.
*/
public val packageId: kotlin.String? = builder.packageId
/**
* Amazon S3 bucket and key for the package.
*/
public val packageSource: aws.sdk.kotlin.services.opensearch.model.PackageSource? = builder.packageSource
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.opensearch.model.UpdatePackageRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdatePackageRequest(")
append("commitMessage=$commitMessage,")
append("packageDescription=$packageDescription,")
append("packageId=$packageId,")
append("packageSource=$packageSource")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = commitMessage?.hashCode() ?: 0
result = 31 * result + (packageDescription?.hashCode() ?: 0)
result = 31 * result + (packageId?.hashCode() ?: 0)
result = 31 * result + (packageSource?.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 UpdatePackageRequest
if (commitMessage != other.commitMessage) return false
if (packageDescription != other.packageDescription) return false
if (packageId != other.packageId) return false
if (packageSource != other.packageSource) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.opensearch.model.UpdatePackageRequest = Builder(this).apply(block).build()
public class Builder {
/**
* Commit message for the updated file, which is shown as part of `GetPackageVersionHistoryResponse`.
*/
public var commitMessage: kotlin.String? = null
/**
* A new description of the package.
*/
public var packageDescription: kotlin.String? = null
/**
* The unique identifier for the package.
*/
public var packageId: kotlin.String? = null
/**
* Amazon S3 bucket and key for the package.
*/
public var packageSource: aws.sdk.kotlin.services.opensearch.model.PackageSource? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.opensearch.model.UpdatePackageRequest) : this() {
this.commitMessage = x.commitMessage
this.packageDescription = x.packageDescription
this.packageId = x.packageId
this.packageSource = x.packageSource
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.opensearch.model.UpdatePackageRequest = UpdatePackageRequest(this)
/**
* construct an [aws.sdk.kotlin.services.opensearch.model.PackageSource] inside the given [block]
*/
public fun packageSource(block: aws.sdk.kotlin.services.opensearch.model.PackageSource.Builder.() -> kotlin.Unit) {
this.packageSource = aws.sdk.kotlin.services.opensearch.model.PackageSource.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy