
commonMain.aws.sdk.kotlin.services.medialive.model.PurchaseOfferingRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.medialive.model
/**
* Placeholder documentation for PurchaseOfferingRequest
*/
public class PurchaseOfferingRequest private constructor(builder: Builder) {
/**
* Number of resources
*/
public val count: kotlin.Int = builder.count
/**
* Name for the new reservation
*/
public val name: kotlin.String? = builder.name
/**
* Offering to purchase, e.g. '87654321'
*/
public val offeringId: kotlin.String? = requireNotNull(builder.offeringId) { "A non-null value must be provided for offeringId" }
/**
* Renewal settings for the reservation
*/
public val renewalSettings: aws.sdk.kotlin.services.medialive.model.RenewalSettings? = builder.renewalSettings
/**
* Unique request ID to be specified. This is needed to prevent retries from creating multiple resources.
*/
public val requestId: kotlin.String? = builder.requestId
/**
* Requested reservation start time (UTC) in ISO-8601 format. The specified time must be between the first day of the current month and one year from now. If no value is given, the default is now.
*/
public val start: kotlin.String? = builder.start
/**
* A collection of key-value pairs
*/
public val tags: Map? = builder.tags
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.medialive.model.PurchaseOfferingRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PurchaseOfferingRequest(")
append("count=$count,")
append("name=$name,")
append("offeringId=$offeringId,")
append("renewalSettings=$renewalSettings,")
append("requestId=$requestId,")
append("start=$start,")
append("tags=$tags")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = count
result = 31 * result + (name?.hashCode() ?: 0)
result = 31 * result + (offeringId?.hashCode() ?: 0)
result = 31 * result + (renewalSettings?.hashCode() ?: 0)
result = 31 * result + (requestId?.hashCode() ?: 0)
result = 31 * result + (start?.hashCode() ?: 0)
result = 31 * result + (tags?.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 PurchaseOfferingRequest
if (count != other.count) return false
if (name != other.name) return false
if (offeringId != other.offeringId) return false
if (renewalSettings != other.renewalSettings) return false
if (requestId != other.requestId) return false
if (start != other.start) return false
if (tags != other.tags) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.medialive.model.PurchaseOfferingRequest = Builder(this).apply(block).build()
public class Builder {
/**
* Number of resources
*/
public var count: kotlin.Int = 0
/**
* Name for the new reservation
*/
public var name: kotlin.String? = null
/**
* Offering to purchase, e.g. '87654321'
*/
public var offeringId: kotlin.String? = null
/**
* Renewal settings for the reservation
*/
public var renewalSettings: aws.sdk.kotlin.services.medialive.model.RenewalSettings? = null
/**
* Unique request ID to be specified. This is needed to prevent retries from creating multiple resources.
*/
public var requestId: kotlin.String? = null
/**
* Requested reservation start time (UTC) in ISO-8601 format. The specified time must be between the first day of the current month and one year from now. If no value is given, the default is now.
*/
public var start: kotlin.String? = null
/**
* A collection of key-value pairs
*/
public var tags: Map? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.medialive.model.PurchaseOfferingRequest) : this() {
this.count = x.count
this.name = x.name
this.offeringId = x.offeringId
this.renewalSettings = x.renewalSettings
this.requestId = x.requestId
this.start = x.start
this.tags = x.tags
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.medialive.model.PurchaseOfferingRequest = PurchaseOfferingRequest(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