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

commonMain.aws.sdk.kotlin.services.codeguruprofiler.model.GetPolicyResponse.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.codeguruprofiler.model



/**
 * The structure representing the `getPolicyResponse`.
 */
public class GetPolicyResponse private constructor(builder: Builder) {
    /**
     * The JSON-formatted resource-based policy attached to the `ProfilingGroup`.
     */
    public val policy: kotlin.String? = builder.policy
    /**
     * A unique identifier for the current revision of the returned policy.
     */
    public val revisionId: kotlin.String? = builder.revisionId

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

    override fun toString(): kotlin.String = buildString {
        append("GetPolicyResponse(")
        append("policy=$policy,")
        append("revisionId=$revisionId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = policy?.hashCode() ?: 0
        result = 31 * result + (revisionId?.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 GetPolicyResponse

        if (policy != other.policy) return false
        if (revisionId != other.revisionId) return false

        return true
    }

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

    public class Builder {
        /**
         * The JSON-formatted resource-based policy attached to the `ProfilingGroup`.
         */
        public var policy: kotlin.String? = null
        /**
         * A unique identifier for the current revision of the returned policy.
         */
        public var revisionId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codeguruprofiler.model.GetPolicyResponse) : this() {
            this.policy = x.policy
            this.revisionId = x.revisionId
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.codeguruprofiler.model.GetPolicyResponse = GetPolicyResponse(this)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy