
commonMain.aws.sdk.kotlin.services.guardduty.model.PermissionConfiguration.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.guardduty.model
/**
* Contains information about how permissions are configured for the S3 bucket.
*/
class PermissionConfiguration private constructor(builder: Builder) {
/**
* Contains information about the account level permissions on the S3 bucket.
*/
val accountLevelPermissions: aws.sdk.kotlin.services.guardduty.model.AccountLevelPermissions? = builder.accountLevelPermissions
/**
* Contains information about the bucket level permissions for the S3 bucket.
*/
val bucketLevelPermissions: aws.sdk.kotlin.services.guardduty.model.BucketLevelPermissions? = builder.bucketLevelPermissions
companion object {
operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.guardduty.model.PermissionConfiguration = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PermissionConfiguration(")
append("accountLevelPermissions=$accountLevelPermissions,")
append("bucketLevelPermissions=$bucketLevelPermissions)")
}
override fun hashCode(): kotlin.Int {
var result = accountLevelPermissions?.hashCode() ?: 0
result = 31 * result + (bucketLevelPermissions?.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 PermissionConfiguration
if (accountLevelPermissions != other.accountLevelPermissions) return false
if (bucketLevelPermissions != other.bucketLevelPermissions) return false
return true
}
inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.guardduty.model.PermissionConfiguration = Builder(this).apply(block).build()
class Builder {
/**
* Contains information about the account level permissions on the S3 bucket.
*/
var accountLevelPermissions: aws.sdk.kotlin.services.guardduty.model.AccountLevelPermissions? = null
/**
* Contains information about the bucket level permissions for the S3 bucket.
*/
var bucketLevelPermissions: aws.sdk.kotlin.services.guardduty.model.BucketLevelPermissions? = null
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.guardduty.model.PermissionConfiguration) : this() {
this.accountLevelPermissions = x.accountLevelPermissions
this.bucketLevelPermissions = x.bucketLevelPermissions
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.guardduty.model.PermissionConfiguration = PermissionConfiguration(this)
/**
* construct an [aws.sdk.kotlin.services.guardduty.model.AccountLevelPermissions] inside the given [block]
*/
fun accountLevelPermissions(block: aws.sdk.kotlin.services.guardduty.model.AccountLevelPermissions.Builder.() -> kotlin.Unit) {
this.accountLevelPermissions = aws.sdk.kotlin.services.guardduty.model.AccountLevelPermissions.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.guardduty.model.BucketLevelPermissions] inside the given [block]
*/
fun bucketLevelPermissions(block: aws.sdk.kotlin.services.guardduty.model.BucketLevelPermissions.Builder.() -> kotlin.Unit) {
this.bucketLevelPermissions = aws.sdk.kotlin.services.guardduty.model.BucketLevelPermissions.invoke(block)
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy