
commonMain.aws.sdk.kotlin.services.s3.model.CreateSessionRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.s3.model
public class CreateSessionRequest private constructor(builder: Builder) {
/**
* The name of the bucket that you create a session for.
*/
public val bucket: kotlin.String? = builder.bucket
/**
* Specifies the mode of the session that will be created, either `ReadWrite` or `ReadOnly`. By default, a `ReadWrite` session is created. A `ReadWrite` session is capable of executing all the Zonal endpoint APIs on a directory bucket. A `ReadOnly` session is constrained to execute the following Zonal endpoint APIs: `GetObject`, `HeadObject`, `ListObjectsV2`, `GetObjectAttributes`, `ListParts`, and `ListMultipartUploads`.
*/
public val sessionMode: aws.sdk.kotlin.services.s3.model.SessionMode? = builder.sessionMode
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.s3.model.CreateSessionRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateSessionRequest(")
append("bucket=$bucket,")
append("sessionMode=$sessionMode")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = bucket?.hashCode() ?: 0
result = 31 * result + (sessionMode?.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 CreateSessionRequest
if (bucket != other.bucket) return false
if (sessionMode != other.sessionMode) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.s3.model.CreateSessionRequest = Builder(this).apply(block).build()
public class Builder {
/**
* The name of the bucket that you create a session for.
*/
public var bucket: kotlin.String? = null
/**
* Specifies the mode of the session that will be created, either `ReadWrite` or `ReadOnly`. By default, a `ReadWrite` session is created. A `ReadWrite` session is capable of executing all the Zonal endpoint APIs on a directory bucket. A `ReadOnly` session is constrained to execute the following Zonal endpoint APIs: `GetObject`, `HeadObject`, `ListObjectsV2`, `GetObjectAttributes`, `ListParts`, and `ListMultipartUploads`.
*/
public var sessionMode: aws.sdk.kotlin.services.s3.model.SessionMode? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.s3.model.CreateSessionRequest) : this() {
this.bucket = x.bucket
this.sessionMode = x.sessionMode
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.s3.model.CreateSessionRequest = CreateSessionRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy