
commonMain.aws.sdk.kotlin.services.medialive.model.UpdateReservationRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.medialive.model
/**
* Request to update a reservation
*/
public class UpdateReservationRequest private constructor(builder: Builder) {
/**
* Name of the reservation
*/
public val name: kotlin.String? = builder.name
/**
* Renewal settings for the reservation
*/
public val renewalSettings: aws.sdk.kotlin.services.medialive.model.RenewalSettings? = builder.renewalSettings
/**
* Unique reservation ID, e.g. '1234567'
*/
public val reservationId: kotlin.String? = requireNotNull(builder.reservationId) { "A non-null value must be provided for reservationId" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.medialive.model.UpdateReservationRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdateReservationRequest(")
append("name=$name,")
append("renewalSettings=$renewalSettings,")
append("reservationId=$reservationId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = name?.hashCode() ?: 0
result = 31 * result + (renewalSettings?.hashCode() ?: 0)
result = 31 * result + (reservationId?.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 UpdateReservationRequest
if (name != other.name) return false
if (renewalSettings != other.renewalSettings) return false
if (reservationId != other.reservationId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.medialive.model.UpdateReservationRequest = Builder(this).apply(block).build()
public class Builder {
/**
* Name of the reservation
*/
public var name: kotlin.String? = null
/**
* Renewal settings for the reservation
*/
public var renewalSettings: aws.sdk.kotlin.services.medialive.model.RenewalSettings? = null
/**
* Unique reservation ID, e.g. '1234567'
*/
public var reservationId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.medialive.model.UpdateReservationRequest) : this() {
this.name = x.name
this.renewalSettings = x.renewalSettings
this.reservationId = x.reservationId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.medialive.model.UpdateReservationRequest = UpdateReservationRequest(this)
/**
* construct an [aws.sdk.kotlin.services.medialive.model.RenewalSettings] inside the given [block]
*/
public fun renewalSettings(block: aws.sdk.kotlin.services.medialive.model.RenewalSettings.Builder.() -> kotlin.Unit) {
this.renewalSettings = aws.sdk.kotlin.services.medialive.model.RenewalSettings.invoke(block)
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy