commonMain.aws.sdk.kotlin.services.amplifybackend.model.CreateBackendStorageResourceConfig.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 creating backend storage.
*/
public class CreateBackendStorageResourceConfig private constructor(builder: Builder) {
/**
* The name of the S3 bucket.
*/
public val bucketName: kotlin.String? = builder.bucketName
/**
* 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.CreateBackendStorageResourceConfig = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateBackendStorageResourceConfig(")
append("bucketName=$bucketName,")
append("permissions=$permissions,")
append("serviceName=$serviceName")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = bucketName?.hashCode() ?: 0
result = 31 * 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 CreateBackendStorageResourceConfig
if (bucketName != other.bucketName) return false
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.CreateBackendStorageResourceConfig = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The name of the S3 bucket.
*/
public var bucketName: kotlin.String? = null
/**
* 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.CreateBackendStorageResourceConfig) : this() {
this.bucketName = x.bucketName
this.permissions = x.permissions
this.serviceName = x.serviceName
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.amplifybackend.model.CreateBackendStorageResourceConfig = CreateBackendStorageResourceConfig(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
}
}
}