
commonMain.aws.sdk.kotlin.services.licensemanagerlinuxsubscriptions.model.Subscription.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.licensemanagerlinuxsubscriptions.model
/**
* An object which details a discovered Linux subscription.
*/
public class Subscription private constructor(builder: Builder) {
/**
* The total amount of running instances using this subscription.
*/
public val instanceCount: kotlin.Long? = builder.instanceCount
/**
* The name of the subscription.
*/
public val name: kotlin.String? = builder.name
/**
* The type of subscription. The type can be subscription-included with Amazon EC2, Bring Your Own Subscription model (BYOS), or from the Amazon Web Services Marketplace. Certain subscriptions may use licensing from the Amazon Web Services Marketplace as well as OS licensing from Amazon EC2 or BYOS.
*/
public val type: kotlin.String? = builder.type
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.licensemanagerlinuxsubscriptions.model.Subscription = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Subscription(")
append("instanceCount=$instanceCount,")
append("name=$name,")
append("type=$type")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = instanceCount?.hashCode() ?: 0
result = 31 * result + (name?.hashCode() ?: 0)
result = 31 * result + (type?.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 Subscription
if (instanceCount != other.instanceCount) return false
if (name != other.name) return false
if (type != other.type) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.licensemanagerlinuxsubscriptions.model.Subscription = Builder(this).apply(block).build()
public class Builder {
/**
* The total amount of running instances using this subscription.
*/
public var instanceCount: kotlin.Long? = null
/**
* The name of the subscription.
*/
public var name: kotlin.String? = null
/**
* The type of subscription. The type can be subscription-included with Amazon EC2, Bring Your Own Subscription model (BYOS), or from the Amazon Web Services Marketplace. Certain subscriptions may use licensing from the Amazon Web Services Marketplace as well as OS licensing from Amazon EC2 or BYOS.
*/
public var type: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.licensemanagerlinuxsubscriptions.model.Subscription) : this() {
this.instanceCount = x.instanceCount
this.name = x.name
this.type = x.type
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.licensemanagerlinuxsubscriptions.model.Subscription = Subscription(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy