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