
commonMain.aws.sdk.kotlin.services.qbusiness.model.PrincipalGroup.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.qbusiness.model
/**
* Provides information about a group associated with the principal.
*/
public class PrincipalGroup private constructor(builder: Builder) {
/**
* Provides information about whether to allow or deny access to the principal.
*/
public val access: aws.sdk.kotlin.services.qbusiness.model.ReadAccessType = requireNotNull(builder.access) { "A non-null value must be provided for access" }
/**
* The type of group.
*/
public val membershipType: aws.sdk.kotlin.services.qbusiness.model.MembershipType? = builder.membershipType
/**
* The name of the group.
*/
public val name: kotlin.String? = builder.name
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.qbusiness.model.PrincipalGroup = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PrincipalGroup(")
append("access=$access,")
append("membershipType=$membershipType,")
append("name=$name")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = access.hashCode()
result = 31 * result + (membershipType?.hashCode() ?: 0)
result = 31 * result + (name?.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 PrincipalGroup
if (access != other.access) return false
if (membershipType != other.membershipType) return false
if (name != other.name) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.qbusiness.model.PrincipalGroup = Builder(this).apply(block).build()
public class Builder {
/**
* Provides information about whether to allow or deny access to the principal.
*/
public var access: aws.sdk.kotlin.services.qbusiness.model.ReadAccessType? = null
/**
* The type of group.
*/
public var membershipType: aws.sdk.kotlin.services.qbusiness.model.MembershipType? = null
/**
* The name of the group.
*/
public var name: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.qbusiness.model.PrincipalGroup) : this() {
this.access = x.access
this.membershipType = x.membershipType
this.name = x.name
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.qbusiness.model.PrincipalGroup = PrincipalGroup(this)
internal fun correctErrors(): Builder {
if (access == null) access = ReadAccessType.SdkUnknown("no value provided")
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy