commonMain.aws.sdk.kotlin.services.configservice.model.PutConfigRuleRequest.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
public class PutConfigRuleRequest private constructor(builder: Builder) {
/**
* The rule that you want to add to your account.
*/
public val configRule: aws.sdk.kotlin.services.configservice.model.ConfigRule? = builder.configRule
/**
* An array of tag object.
*/
public val tags: List? = builder.tags
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.configservice.model.PutConfigRuleRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PutConfigRuleRequest(")
append("configRule=$configRule,")
append("tags=$tags")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = configRule?.hashCode() ?: 0
result = 31 * result + (tags?.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 PutConfigRuleRequest
if (configRule != other.configRule) return false
if (tags != other.tags) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.configservice.model.PutConfigRuleRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The rule that you want to add to your account.
*/
public var configRule: aws.sdk.kotlin.services.configservice.model.ConfigRule? = null
/**
* An array of tag object.
*/
public var tags: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.configservice.model.PutConfigRuleRequest) : this() {
this.configRule = x.configRule
this.tags = x.tags
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.configservice.model.PutConfigRuleRequest = PutConfigRuleRequest(this)
/**
* construct an [aws.sdk.kotlin.services.configservice.model.ConfigRule] inside the given [block]
*/
public fun configRule(block: aws.sdk.kotlin.services.configservice.model.ConfigRule.Builder.() -> kotlin.Unit) {
this.configRule = aws.sdk.kotlin.services.configservice.model.ConfigRule.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy