commonMain.aws.sdk.kotlin.services.grafana.model.ServiceAccountSummary.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of grafana-jvm Show documentation
Show all versions of grafana-jvm Show documentation
The AWS SDK for Kotlin client for grafana
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.grafana.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* A structure that contains the information about one service account.
*/
public class ServiceAccountSummary private constructor(builder: Builder) {
/**
* The role of the service account, which sets the permission level used when calling Grafana APIs.
*/
public val grafanaRole: aws.sdk.kotlin.services.grafana.model.Role = requireNotNull(builder.grafanaRole) { "A non-null value must be provided for grafanaRole" }
/**
* The unique ID of the service account.
*/
public val id: kotlin.String = requireNotNull(builder.id) { "A non-null value must be provided for id" }
/**
* Returns true if the service account is disabled. Service accounts can be disabled and enabled in the Amazon Managed Grafana console.
*/
public val isDisabled: kotlin.String = requireNotNull(builder.isDisabled) { "A non-null value must be provided for isDisabled" }
/**
* The name of the service account.
*/
public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.grafana.model.ServiceAccountSummary = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ServiceAccountSummary(")
append("grafanaRole=$grafanaRole,")
append("id=$id,")
append("isDisabled=$isDisabled,")
append("name=$name")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = grafanaRole.hashCode()
result = 31 * result + (id.hashCode())
result = 31 * result + (isDisabled.hashCode())
result = 31 * result + (name.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 ServiceAccountSummary
if (grafanaRole != other.grafanaRole) return false
if (id != other.id) return false
if (isDisabled != other.isDisabled) return false
if (name != other.name) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.grafana.model.ServiceAccountSummary = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The role of the service account, which sets the permission level used when calling Grafana APIs.
*/
public var grafanaRole: aws.sdk.kotlin.services.grafana.model.Role? = null
/**
* The unique ID of the service account.
*/
public var id: kotlin.String? = null
/**
* Returns true if the service account is disabled. Service accounts can be disabled and enabled in the Amazon Managed Grafana console.
*/
public var isDisabled: kotlin.String? = null
/**
* The name of the service account.
*/
public var name: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.grafana.model.ServiceAccountSummary) : this() {
this.grafanaRole = x.grafanaRole
this.id = x.id
this.isDisabled = x.isDisabled
this.name = x.name
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.grafana.model.ServiceAccountSummary = ServiceAccountSummary(this)
internal fun correctErrors(): Builder {
if (grafanaRole == null) grafanaRole = Role.SdkUnknown("no value provided")
if (id == null) id = ""
if (isDisabled == null) isDisabled = ""
if (name == null) name = ""
return this
}
}
}