commonMain.aws.sdk.kotlin.services.cloudwatch.model.PutDashboardRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cloudwatch-jvm Show documentation
Show all versions of cloudwatch-jvm Show documentation
The AWS SDK for Kotlin client for CloudWatch
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.cloudwatch.model
import aws.smithy.kotlin.runtime.SdkDsl
public class PutDashboardRequest private constructor(builder: Builder) {
/**
* The detailed information about the dashboard in JSON format, including the widgets to include and their location on the dashboard. This parameter is required.
*
* For more information about the syntax, see [Dashboard Body Structure and Syntax](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/CloudWatch-Dashboard-Body-Structure.html).
*/
public val dashboardBody: kotlin.String? = builder.dashboardBody
/**
* The name of the dashboard. If a dashboard with this name already exists, this call modifies that dashboard, replacing its current contents. Otherwise, a new dashboard is created. The maximum length is 255, and valid characters are A-Z, a-z, 0-9, "-", and "_". This parameter is required.
*/
public val dashboardName: kotlin.String? = builder.dashboardName
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.cloudwatch.model.PutDashboardRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PutDashboardRequest(")
append("dashboardBody=$dashboardBody,")
append("dashboardName=$dashboardName")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = dashboardBody?.hashCode() ?: 0
result = 31 * result + (dashboardName?.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 PutDashboardRequest
if (dashboardBody != other.dashboardBody) return false
if (dashboardName != other.dashboardName) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.cloudwatch.model.PutDashboardRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The detailed information about the dashboard in JSON format, including the widgets to include and their location on the dashboard. This parameter is required.
*
* For more information about the syntax, see [Dashboard Body Structure and Syntax](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/CloudWatch-Dashboard-Body-Structure.html).
*/
public var dashboardBody: kotlin.String? = null
/**
* The name of the dashboard. If a dashboard with this name already exists, this call modifies that dashboard, replacing its current contents. Otherwise, a new dashboard is created. The maximum length is 255, and valid characters are A-Z, a-z, 0-9, "-", and "_". This parameter is required.
*/
public var dashboardName: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.cloudwatch.model.PutDashboardRequest) : this() {
this.dashboardBody = x.dashboardBody
this.dashboardName = x.dashboardName
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.cloudwatch.model.PutDashboardRequest = PutDashboardRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}