commonMain.aws.sdk.kotlin.services.servicequotas.model.QuotaContextInfo.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of servicequotas-jvm Show documentation
Show all versions of servicequotas-jvm Show documentation
The AWS SDK for Kotlin client for Service Quotas
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.servicequotas.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* A structure that describes the context for a service quota. The context identifies what the quota applies to.
*/
public class QuotaContextInfo private constructor(builder: Builder) {
/**
* Specifies the Amazon Web Services account or resource to which the quota applies. The value in this field depends on the context scope associated with the specified service quota.
*/
public val contextId: kotlin.String? = builder.contextId
/**
* Specifies whether the quota applies to an Amazon Web Services account, or to a resource.
*/
public val contextScope: aws.sdk.kotlin.services.servicequotas.model.QuotaContextScope? = builder.contextScope
/**
* When the `ContextScope` is `RESOURCE`, then this specifies the resource type of the specified resource.
*/
public val contextScopeType: kotlin.String? = builder.contextScopeType
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.servicequotas.model.QuotaContextInfo = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("QuotaContextInfo(")
append("contextId=$contextId,")
append("contextScope=$contextScope,")
append("contextScopeType=$contextScopeType")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = contextId?.hashCode() ?: 0
result = 31 * result + (contextScope?.hashCode() ?: 0)
result = 31 * result + (contextScopeType?.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 QuotaContextInfo
if (contextId != other.contextId) return false
if (contextScope != other.contextScope) return false
if (contextScopeType != other.contextScopeType) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.servicequotas.model.QuotaContextInfo = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Specifies the Amazon Web Services account or resource to which the quota applies. The value in this field depends on the context scope associated with the specified service quota.
*/
public var contextId: kotlin.String? = null
/**
* Specifies whether the quota applies to an Amazon Web Services account, or to a resource.
*/
public var contextScope: aws.sdk.kotlin.services.servicequotas.model.QuotaContextScope? = null
/**
* When the `ContextScope` is `RESOURCE`, then this specifies the resource type of the specified resource.
*/
public var contextScopeType: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.servicequotas.model.QuotaContextInfo) : this() {
this.contextId = x.contextId
this.contextScope = x.contextScope
this.contextScopeType = x.contextScopeType
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.servicequotas.model.QuotaContextInfo = QuotaContextInfo(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy