commonMain.aws.sdk.kotlin.services.backup.model.CreateFrameworkRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.backup.model
import aws.smithy.kotlin.runtime.SdkDsl
public class CreateFrameworkRequest private constructor(builder: Builder) {
/**
* A list of the controls that make up the framework. Each control in the list has a name, input parameters, and scope.
*/
public val frameworkControls: List? = builder.frameworkControls
/**
* An optional description of the framework with a maximum of 1,024 characters.
*/
public val frameworkDescription: kotlin.String? = builder.frameworkDescription
/**
* The unique name of the framework. The name must be between 1 and 256 characters, starting with a letter, and consisting of letters (a-z, A-Z), numbers (0-9), and underscores (_).
*/
public val frameworkName: kotlin.String? = builder.frameworkName
/**
* Metadata that you can assign to help organize the frameworks that you create. Each tag is a key-value pair.
*/
public val frameworkTags: Map? = builder.frameworkTags
/**
* A customer-chosen string that you can use to distinguish between otherwise identical calls to `CreateFrameworkInput`. Retrying a successful request with the same idempotency token results in a success message with no action taken.
*/
public val idempotencyToken: kotlin.String? = builder.idempotencyToken
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.backup.model.CreateFrameworkRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateFrameworkRequest(")
append("frameworkControls=$frameworkControls,")
append("frameworkDescription=$frameworkDescription,")
append("frameworkName=$frameworkName,")
append("frameworkTags=$frameworkTags,")
append("idempotencyToken=$idempotencyToken")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = frameworkControls?.hashCode() ?: 0
result = 31 * result + (frameworkDescription?.hashCode() ?: 0)
result = 31 * result + (frameworkName?.hashCode() ?: 0)
result = 31 * result + (frameworkTags?.hashCode() ?: 0)
result = 31 * result + (idempotencyToken?.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 CreateFrameworkRequest
if (frameworkControls != other.frameworkControls) return false
if (frameworkDescription != other.frameworkDescription) return false
if (frameworkName != other.frameworkName) return false
if (frameworkTags != other.frameworkTags) return false
if (idempotencyToken != other.idempotencyToken) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.backup.model.CreateFrameworkRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A list of the controls that make up the framework. Each control in the list has a name, input parameters, and scope.
*/
public var frameworkControls: List? = null
/**
* An optional description of the framework with a maximum of 1,024 characters.
*/
public var frameworkDescription: kotlin.String? = null
/**
* The unique name of the framework. The name must be between 1 and 256 characters, starting with a letter, and consisting of letters (a-z, A-Z), numbers (0-9), and underscores (_).
*/
public var frameworkName: kotlin.String? = null
/**
* Metadata that you can assign to help organize the frameworks that you create. Each tag is a key-value pair.
*/
public var frameworkTags: Map? = null
/**
* A customer-chosen string that you can use to distinguish between otherwise identical calls to `CreateFrameworkInput`. Retrying a successful request with the same idempotency token results in a success message with no action taken.
*/
public var idempotencyToken: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.backup.model.CreateFrameworkRequest) : this() {
this.frameworkControls = x.frameworkControls
this.frameworkDescription = x.frameworkDescription
this.frameworkName = x.frameworkName
this.frameworkTags = x.frameworkTags
this.idempotencyToken = x.idempotencyToken
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.backup.model.CreateFrameworkRequest = CreateFrameworkRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}