commonMain.aws.sdk.kotlin.services.amplifybackend.model.CreateBackendRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of amplifybackend-jvm Show documentation
Show all versions of amplifybackend-jvm Show documentation
The AWS SDK for Kotlin client for AmplifyBackend
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.amplifybackend.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The request body for CreateBackend.
*/
public class CreateBackendRequest private constructor(builder: Builder) {
/**
* The app ID.
*/
public val appId: kotlin.String? = builder.appId
/**
* The name of the app.
*/
public val appName: kotlin.String? = builder.appName
/**
* The name of the backend environment.
*/
public val backendEnvironmentName: kotlin.String? = builder.backendEnvironmentName
/**
* The resource configuration for creating a backend.
*/
public val resourceConfig: aws.sdk.kotlin.services.amplifybackend.model.ResourceConfig? = builder.resourceConfig
/**
* The name of the resource.
*/
public val resourceName: kotlin.String? = builder.resourceName
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.amplifybackend.model.CreateBackendRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateBackendRequest(")
append("appId=$appId,")
append("appName=$appName,")
append("backendEnvironmentName=$backendEnvironmentName,")
append("resourceConfig=$resourceConfig,")
append("resourceName=$resourceName")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = appId?.hashCode() ?: 0
result = 31 * result + (appName?.hashCode() ?: 0)
result = 31 * result + (backendEnvironmentName?.hashCode() ?: 0)
result = 31 * result + (resourceConfig?.hashCode() ?: 0)
result = 31 * result + (resourceName?.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 CreateBackendRequest
if (appId != other.appId) return false
if (appName != other.appName) return false
if (backendEnvironmentName != other.backendEnvironmentName) return false
if (resourceConfig != other.resourceConfig) return false
if (resourceName != other.resourceName) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.amplifybackend.model.CreateBackendRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The app ID.
*/
public var appId: kotlin.String? = null
/**
* The name of the app.
*/
public var appName: kotlin.String? = null
/**
* The name of the backend environment.
*/
public var backendEnvironmentName: kotlin.String? = null
/**
* The resource configuration for creating a backend.
*/
public var resourceConfig: aws.sdk.kotlin.services.amplifybackend.model.ResourceConfig? = null
/**
* The name of the resource.
*/
public var resourceName: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.amplifybackend.model.CreateBackendRequest) : this() {
this.appId = x.appId
this.appName = x.appName
this.backendEnvironmentName = x.backendEnvironmentName
this.resourceConfig = x.resourceConfig
this.resourceName = x.resourceName
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.amplifybackend.model.CreateBackendRequest = CreateBackendRequest(this)
/**
* construct an [aws.sdk.kotlin.services.amplifybackend.model.ResourceConfig] inside the given [block]
*/
public fun resourceConfig(block: aws.sdk.kotlin.services.amplifybackend.model.ResourceConfig.Builder.() -> kotlin.Unit) {
this.resourceConfig = aws.sdk.kotlin.services.amplifybackend.model.ResourceConfig.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}