All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.iam.model.SimulateCustomPolicyResponse.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.iam.model



/**
 * Contains the response to a successful SimulatePrincipalPolicy or SimulateCustomPolicy request.
 */
public class SimulateCustomPolicyResponse private constructor(builder: Builder) {
    /**
     * The results of the simulation.
     */
    public val evaluationResults: List? = builder.evaluationResults
    /**
     * A flag that indicates whether there are more items to return. If your results were truncated, you can make a subsequent pagination request using the `Marker` request parameter to retrieve more items. Note that IAM might return fewer than the `MaxItems` number of results even when there are more results available. We recommend that you check `IsTruncated` after every call to ensure that you receive all your results.
     */
    public val isTruncated: kotlin.Boolean = builder.isTruncated
    /**
     * When `IsTruncated` is `true`, this element is present and contains the value to use for the `Marker` parameter in a subsequent pagination request.
     */
    public val marker: kotlin.String? = builder.marker

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iam.model.SimulateCustomPolicyResponse = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("SimulateCustomPolicyResponse(")
        append("evaluationResults=$evaluationResults,")
        append("isTruncated=$isTruncated,")
        append("marker=$marker")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = evaluationResults?.hashCode() ?: 0
        result = 31 * result + (isTruncated.hashCode())
        result = 31 * result + (marker?.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 SimulateCustomPolicyResponse

        if (evaluationResults != other.evaluationResults) return false
        if (isTruncated != other.isTruncated) return false
        if (marker != other.marker) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iam.model.SimulateCustomPolicyResponse = Builder(this).apply(block).build()

    public class Builder {
        /**
         * The results of the simulation.
         */
        public var evaluationResults: List? = null
        /**
         * A flag that indicates whether there are more items to return. If your results were truncated, you can make a subsequent pagination request using the `Marker` request parameter to retrieve more items. Note that IAM might return fewer than the `MaxItems` number of results even when there are more results available. We recommend that you check `IsTruncated` after every call to ensure that you receive all your results.
         */
        public var isTruncated: kotlin.Boolean = false
        /**
         * When `IsTruncated` is `true`, this element is present and contains the value to use for the `Marker` parameter in a subsequent pagination request.
         */
        public var marker: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iam.model.SimulateCustomPolicyResponse) : this() {
            this.evaluationResults = x.evaluationResults
            this.isTruncated = x.isTruncated
            this.marker = x.marker
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.iam.model.SimulateCustomPolicyResponse = SimulateCustomPolicyResponse(this)

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy