commonMain.aws.sdk.kotlin.services.grafana.model.CreateWorkspaceServiceAccountRequest.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
public class CreateWorkspaceServiceAccountRequest private constructor(builder: Builder) {
/**
* The permission level to use for this service account.
*
* For more information about the roles and the permissions each has, see [User roles](https://docs.aws.amazon.com/grafana/latest/userguide/Grafana-user-roles.html) in the *Amazon Managed Grafana User Guide*.
*/
public val grafanaRole: aws.sdk.kotlin.services.grafana.model.Role? = builder.grafanaRole
/**
* A name for the service account. The name must be unique within the workspace, as it determines the ID associated with the service account.
*/
public val name: kotlin.String? = builder.name
/**
* The ID of the workspace within which to create the service account.
*/
public val workspaceId: kotlin.String? = builder.workspaceId
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.grafana.model.CreateWorkspaceServiceAccountRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateWorkspaceServiceAccountRequest(")
append("grafanaRole=$grafanaRole,")
append("name=$name,")
append("workspaceId=$workspaceId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = grafanaRole?.hashCode() ?: 0
result = 31 * result + (name?.hashCode() ?: 0)
result = 31 * result + (workspaceId?.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 CreateWorkspaceServiceAccountRequest
if (grafanaRole != other.grafanaRole) return false
if (name != other.name) return false
if (workspaceId != other.workspaceId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.grafana.model.CreateWorkspaceServiceAccountRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The permission level to use for this service account.
*
* For more information about the roles and the permissions each has, see [User roles](https://docs.aws.amazon.com/grafana/latest/userguide/Grafana-user-roles.html) in the *Amazon Managed Grafana User Guide*.
*/
public var grafanaRole: aws.sdk.kotlin.services.grafana.model.Role? = null
/**
* A name for the service account. The name must be unique within the workspace, as it determines the ID associated with the service account.
*/
public var name: kotlin.String? = null
/**
* The ID of the workspace within which to create the service account.
*/
public var workspaceId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.grafana.model.CreateWorkspaceServiceAccountRequest) : this() {
this.grafanaRole = x.grafanaRole
this.name = x.name
this.workspaceId = x.workspaceId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.grafana.model.CreateWorkspaceServiceAccountRequest = CreateWorkspaceServiceAccountRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}