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

commonMain.aws.sdk.kotlin.services.configservice.model.CustomPolicyDetails.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.configservice.model



/**
 * Provides the runtime system, policy definition, and whether debug logging enabled. You can specify the following CustomPolicyDetails parameter values only for Config Custom Policy rules.
 */
class CustomPolicyDetails private constructor(builder: Builder) {
    /**
     * The boolean expression for enabling debug logging for your Config Custom Policy rule. The default value is `false`.
     */
    val enableDebugLogDelivery: kotlin.Boolean = builder.enableDebugLogDelivery
    /**
     * The runtime system for your Config Custom Policy rule. Guard is a policy-as-code language that allows you to write policies that are enforced by Config Custom Policy rules. For more information about Guard, see the [Guard GitHub Repository](https://github.com/aws-cloudformation/cloudformation-guard).
     */
    val policyRuntime: kotlin.String? = builder.policyRuntime
    /**
     * The policy definition containing the logic for your Config Custom Policy rule.
     */
    val policyText: kotlin.String? = builder.policyText

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

    override fun toString(): kotlin.String = buildString {
        append("CustomPolicyDetails(")
        append("enableDebugLogDelivery=$enableDebugLogDelivery,")
        append("policyRuntime=$policyRuntime,")
        append("policyText=$policyText)")
    }

    override fun hashCode(): kotlin.Int {
        var result = enableDebugLogDelivery.hashCode()
        result = 31 * result + (policyRuntime?.hashCode() ?: 0)
        result = 31 * result + (policyText?.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 CustomPolicyDetails

        if (enableDebugLogDelivery != other.enableDebugLogDelivery) return false
        if (policyRuntime != other.policyRuntime) return false
        if (policyText != other.policyText) return false

        return true
    }

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

    class Builder {
        /**
         * The boolean expression for enabling debug logging for your Config Custom Policy rule. The default value is `false`.
         */
        var enableDebugLogDelivery: kotlin.Boolean = false
        /**
         * The runtime system for your Config Custom Policy rule. Guard is a policy-as-code language that allows you to write policies that are enforced by Config Custom Policy rules. For more information about Guard, see the [Guard GitHub Repository](https://github.com/aws-cloudformation/cloudformation-guard).
         */
        var policyRuntime: kotlin.String? = null
        /**
         * The policy definition containing the logic for your Config Custom Policy rule.
         */
        var policyText: kotlin.String? = null

        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.configservice.model.CustomPolicyDetails) : this() {
            this.enableDebugLogDelivery = x.enableDebugLogDelivery
            this.policyRuntime = x.policyRuntime
            this.policyText = x.policyText
        }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy