commonMain.aws.sdk.kotlin.services.fms.model.PutPolicyResponse.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.fms.model
public class PutPolicyResponse private constructor(builder: Builder) {
/**
* The details of the Firewall Manager policy.
*/
public val policy: aws.sdk.kotlin.services.fms.model.Policy? = builder.policy
/**
* The Amazon Resource Name (ARN) of the policy.
*/
public val policyArn: kotlin.String? = builder.policyArn
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.fms.model.PutPolicyResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PutPolicyResponse(")
append("policy=$policy,")
append("policyArn=$policyArn")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = policy?.hashCode() ?: 0
result = 31 * result + (policyArn?.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 PutPolicyResponse
if (policy != other.policy) return false
if (policyArn != other.policyArn) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.fms.model.PutPolicyResponse = Builder(this).apply(block).build()
public class Builder {
/**
* The details of the Firewall Manager policy.
*/
public var policy: aws.sdk.kotlin.services.fms.model.Policy? = null
/**
* The Amazon Resource Name (ARN) of the policy.
*/
public var policyArn: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.fms.model.PutPolicyResponse) : this() {
this.policy = x.policy
this.policyArn = x.policyArn
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.fms.model.PutPolicyResponse = PutPolicyResponse(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