commonMain.aws.sdk.kotlin.services.fms.model.GetPolicyResponse.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.fms.model
public class GetPolicyResponse private constructor(builder: Builder) {
/**
* Information about the specified Firewall Manager policy.
*/
public val policy: aws.sdk.kotlin.services.fms.model.Policy? = builder.policy
/**
* The Amazon Resource Name (ARN) of the specified 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.GetPolicyResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GetPolicyResponse(")
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 GetPolicyResponse
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.GetPolicyResponse = Builder(this).apply(block).build()
public class Builder {
/**
* Information about the specified Firewall Manager policy.
*/
public var policy: aws.sdk.kotlin.services.fms.model.Policy? = null
/**
* The Amazon Resource Name (ARN) of the specified policy.
*/
public var policyArn: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.fms.model.GetPolicyResponse) : this() {
this.policy = x.policy
this.policyArn = x.policyArn
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.fms.model.GetPolicyResponse = GetPolicyResponse(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