commonMain.aws.sdk.kotlin.services.fms.model.PutPolicyRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.fms.model
public class PutPolicyRequest private constructor(builder: Builder) {
/**
* The details of the Firewall Manager policy to be created.
*/
public val policy: aws.sdk.kotlin.services.fms.model.Policy? = builder.policy
/**
* The tags to add to the Amazon Web Services resource.
*/
public val tagList: List? = builder.tagList
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.fms.model.PutPolicyRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PutPolicyRequest(")
append("policy=$policy,")
append("tagList=$tagList")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = policy?.hashCode() ?: 0
result = 31 * result + (tagList?.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 PutPolicyRequest
if (policy != other.policy) return false
if (tagList != other.tagList) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.fms.model.PutPolicyRequest = Builder(this).apply(block).build()
public class Builder {
/**
* The details of the Firewall Manager policy to be created.
*/
public var policy: aws.sdk.kotlin.services.fms.model.Policy? = null
/**
* The tags to add to the Amazon Web Services resource.
*/
public var tagList: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.fms.model.PutPolicyRequest) : this() {
this.policy = x.policy
this.tagList = x.tagList
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.fms.model.PutPolicyRequest = PutPolicyRequest(this)
/**
* construct an [aws.sdk.kotlin.services.fms.model.Policy] inside the given [block]
*/
public fun policy(block: aws.sdk.kotlin.services.fms.model.Policy.Builder.() -> kotlin.Unit) {
this.policy = aws.sdk.kotlin.services.fms.model.Policy.invoke(block)
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy