commonMain.aws.sdk.kotlin.services.ssoadmin.model.ScopeDetails.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ssoadmin-jvm Show documentation
Show all versions of ssoadmin-jvm Show documentation
The AWS SDK for Kotlin client for SSO Admin
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.ssoadmin.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* A structure that describes an IAM Identity Center access scope and its authorized targets.
*/
public class ScopeDetails private constructor(builder: Builder) {
/**
* An array list of ARNs of applications.
*/
public val authorizedTargets: List? = builder.authorizedTargets
/**
* The name of the access scope.
*/
public val scope: kotlin.String = requireNotNull(builder.scope) { "A non-null value must be provided for scope" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.ssoadmin.model.ScopeDetails = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ScopeDetails(")
append("authorizedTargets=$authorizedTargets,")
append("scope=$scope")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = authorizedTargets?.hashCode() ?: 0
result = 31 * result + (scope.hashCode())
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 ScopeDetails
if (authorizedTargets != other.authorizedTargets) return false
if (scope != other.scope) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.ssoadmin.model.ScopeDetails = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* An array list of ARNs of applications.
*/
public var authorizedTargets: List? = null
/**
* The name of the access scope.
*/
public var scope: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.ssoadmin.model.ScopeDetails) : this() {
this.authorizedTargets = x.authorizedTargets
this.scope = x.scope
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.ssoadmin.model.ScopeDetails = ScopeDetails(this)
internal fun correctErrors(): Builder {
if (scope == null) scope = ""
return this
}
}
}