
commonMain.aws.sdk.kotlin.services.opensearch.model.PurchaseReservedInstanceOfferingRequest.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 `PurchaseReservedInstanceOffering` operation.
*/
public class PurchaseReservedInstanceOfferingRequest private constructor(builder: Builder) {
/**
* The number of OpenSearch instances to reserve.
*/
public val instanceCount: kotlin.Int? = builder.instanceCount
/**
* A customer-specified identifier to track this reservation.
*/
public val reservationName: kotlin.String? = builder.reservationName
/**
* The ID of the Reserved Instance offering to purchase.
*/
public val reservedInstanceOfferingId: kotlin.String? = builder.reservedInstanceOfferingId
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.opensearch.model.PurchaseReservedInstanceOfferingRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PurchaseReservedInstanceOfferingRequest(")
append("instanceCount=$instanceCount,")
append("reservationName=$reservationName,")
append("reservedInstanceOfferingId=$reservedInstanceOfferingId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = instanceCount ?: 0
result = 31 * result + (reservationName?.hashCode() ?: 0)
result = 31 * result + (reservedInstanceOfferingId?.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 PurchaseReservedInstanceOfferingRequest
if (instanceCount != other.instanceCount) return false
if (reservationName != other.reservationName) return false
if (reservedInstanceOfferingId != other.reservedInstanceOfferingId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.opensearch.model.PurchaseReservedInstanceOfferingRequest = Builder(this).apply(block).build()
public class Builder {
/**
* The number of OpenSearch instances to reserve.
*/
public var instanceCount: kotlin.Int? = null
/**
* A customer-specified identifier to track this reservation.
*/
public var reservationName: kotlin.String? = null
/**
* The ID of the Reserved Instance offering to purchase.
*/
public var reservedInstanceOfferingId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.opensearch.model.PurchaseReservedInstanceOfferingRequest) : this() {
this.instanceCount = x.instanceCount
this.reservationName = x.reservationName
this.reservedInstanceOfferingId = x.reservedInstanceOfferingId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.opensearch.model.PurchaseReservedInstanceOfferingRequest = PurchaseReservedInstanceOfferingRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy