commonMain.aws.sdk.kotlin.services.amplifybackend.model.UpdateBackendStorageResourceConfig.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 resource configuration for updating backend storage.
*/
public class UpdateBackendStorageResourceConfig private constructor(builder: Builder) {
/**
* The authorization configuration for the storage S3 bucket.
*/
public val permissions: aws.sdk.kotlin.services.amplifybackend.model.BackendStoragePermissions? = builder.permissions
/**
* The name of the storage service.
*/
public val serviceName: aws.sdk.kotlin.services.amplifybackend.model.ServiceName? = builder.serviceName
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.amplifybackend.model.UpdateBackendStorageResourceConfig = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdateBackendStorageResourceConfig(")
append("permissions=$permissions,")
append("serviceName=$serviceName")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = permissions?.hashCode() ?: 0
result = 31 * result + (serviceName?.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 UpdateBackendStorageResourceConfig
if (permissions != other.permissions) return false
if (serviceName != other.serviceName) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.amplifybackend.model.UpdateBackendStorageResourceConfig = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The authorization configuration for the storage S3 bucket.
*/
public var permissions: aws.sdk.kotlin.services.amplifybackend.model.BackendStoragePermissions? = null
/**
* The name of the storage service.
*/
public var serviceName: aws.sdk.kotlin.services.amplifybackend.model.ServiceName? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.amplifybackend.model.UpdateBackendStorageResourceConfig) : this() {
this.permissions = x.permissions
this.serviceName = x.serviceName
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.amplifybackend.model.UpdateBackendStorageResourceConfig = UpdateBackendStorageResourceConfig(this)
/**
* construct an [aws.sdk.kotlin.services.amplifybackend.model.BackendStoragePermissions] inside the given [block]
*/
public fun permissions(block: aws.sdk.kotlin.services.amplifybackend.model.BackendStoragePermissions.Builder.() -> kotlin.Unit) {
this.permissions = aws.sdk.kotlin.services.amplifybackend.model.BackendStoragePermissions.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}