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
import aws.smithy.kotlin.runtime.SdkDsl
/**
* 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.
*/
public class CustomPolicyDetails private constructor(builder: Builder) {
/**
* The boolean expression for enabling debug logging for your Config Custom Policy rule. The default value is `false`.
*/
public 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).
*/
public val policyRuntime: kotlin.String = requireNotNull(builder.policyRuntime) { "A non-null value must be provided for policyRuntime" }
/**
* The policy definition containing the logic for your Config Custom Policy rule.
*/
public val policyText: kotlin.String = requireNotNull(builder.policyText) { "A non-null value must be provided for policyText" }
public companion object {
public 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")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = enableDebugLogDelivery.hashCode()
result = 31 * result + (policyRuntime.hashCode())
result = 31 * result + (policyText.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 CustomPolicyDetails
if (enableDebugLogDelivery != other.enableDebugLogDelivery) return false
if (policyRuntime != other.policyRuntime) return false
if (policyText != other.policyText) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.configservice.model.CustomPolicyDetails = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The boolean expression for enabling debug logging for your Config Custom Policy rule. The default value is `false`.
*/
public 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).
*/
public var policyRuntime: kotlin.String? = null
/**
* The policy definition containing the logic for your Config Custom Policy rule.
*/
public var policyText: kotlin.String? = null
@PublishedApi
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)
internal fun correctErrors(): Builder {
if (policyRuntime == null) policyRuntime = ""
if (policyText == null) policyText = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy