
commonMain.aws.sdk.kotlin.services.iottwinmaker.model.PricingPlan.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.iottwinmaker.model
import aws.smithy.kotlin.runtime.time.Instant
/**
* The pricing plan.
*/
public class PricingPlan private constructor(builder: Builder) {
/**
* The billable entity count.
*/
public val billableEntityCount: kotlin.Long? = builder.billableEntityCount
/**
* The pricing plan's bundle information.
*/
public val bundleInformation: aws.sdk.kotlin.services.iottwinmaker.model.BundleInformation? = builder.bundleInformation
/**
* The effective date and time of the pricing plan.
*/
public val effectiveDateTime: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.effectiveDateTime) { "A non-null value must be provided for effectiveDateTime" }
/**
* The pricing mode.
*/
public val pricingMode: aws.sdk.kotlin.services.iottwinmaker.model.PricingMode = requireNotNull(builder.pricingMode) { "A non-null value must be provided for pricingMode" }
/**
* The set date and time for updating a pricing plan.
*/
public val updateDateTime: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.updateDateTime) { "A non-null value must be provided for updateDateTime" }
/**
* The update reason for changing a pricing plan.
*/
public val updateReason: aws.sdk.kotlin.services.iottwinmaker.model.UpdateReason = requireNotNull(builder.updateReason) { "A non-null value must be provided for updateReason" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iottwinmaker.model.PricingPlan = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PricingPlan(")
append("billableEntityCount=$billableEntityCount,")
append("bundleInformation=$bundleInformation,")
append("effectiveDateTime=$effectiveDateTime,")
append("pricingMode=$pricingMode,")
append("updateDateTime=$updateDateTime,")
append("updateReason=$updateReason")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = billableEntityCount?.hashCode() ?: 0
result = 31 * result + (bundleInformation?.hashCode() ?: 0)
result = 31 * result + (effectiveDateTime.hashCode())
result = 31 * result + (pricingMode.hashCode())
result = 31 * result + (updateDateTime.hashCode())
result = 31 * result + (updateReason.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 PricingPlan
if (billableEntityCount != other.billableEntityCount) return false
if (bundleInformation != other.bundleInformation) return false
if (effectiveDateTime != other.effectiveDateTime) return false
if (pricingMode != other.pricingMode) return false
if (updateDateTime != other.updateDateTime) return false
if (updateReason != other.updateReason) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iottwinmaker.model.PricingPlan = Builder(this).apply(block).build()
public class Builder {
/**
* The billable entity count.
*/
public var billableEntityCount: kotlin.Long? = null
/**
* The pricing plan's bundle information.
*/
public var bundleInformation: aws.sdk.kotlin.services.iottwinmaker.model.BundleInformation? = null
/**
* The effective date and time of the pricing plan.
*/
public var effectiveDateTime: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The pricing mode.
*/
public var pricingMode: aws.sdk.kotlin.services.iottwinmaker.model.PricingMode? = null
/**
* The set date and time for updating a pricing plan.
*/
public var updateDateTime: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The update reason for changing a pricing plan.
*/
public var updateReason: aws.sdk.kotlin.services.iottwinmaker.model.UpdateReason? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iottwinmaker.model.PricingPlan) : this() {
this.billableEntityCount = x.billableEntityCount
this.bundleInformation = x.bundleInformation
this.effectiveDateTime = x.effectiveDateTime
this.pricingMode = x.pricingMode
this.updateDateTime = x.updateDateTime
this.updateReason = x.updateReason
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iottwinmaker.model.PricingPlan = PricingPlan(this)
/**
* construct an [aws.sdk.kotlin.services.iottwinmaker.model.BundleInformation] inside the given [block]
*/
public fun bundleInformation(block: aws.sdk.kotlin.services.iottwinmaker.model.BundleInformation.Builder.() -> kotlin.Unit) {
this.bundleInformation = aws.sdk.kotlin.services.iottwinmaker.model.BundleInformation.invoke(block)
}
internal fun correctErrors(): Builder {
if (effectiveDateTime == null) effectiveDateTime = Instant.fromEpochSeconds(0)
if (pricingMode == null) pricingMode = PricingMode.SdkUnknown("no value provided")
if (updateDateTime == null) updateDateTime = Instant.fromEpochSeconds(0)
if (updateReason == null) updateReason = UpdateReason.SdkUnknown("no value provided")
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy