
commonMain.aws.sdk.kotlin.services.iam.model.PolicyDetail.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.iam.model
/**
* Contains information about an IAM policy, including the policy document.
*
* This data type is used as a response element in the GetAccountAuthorizationDetails operation.
*/
public class PolicyDetail private constructor(builder: Builder) {
/**
* The policy document.
*/
public val policyDocument: kotlin.String? = builder.policyDocument
/**
* The name of the policy.
*/
public val policyName: kotlin.String? = builder.policyName
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iam.model.PolicyDetail = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PolicyDetail(")
append("policyDocument=$policyDocument,")
append("policyName=$policyName")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = policyDocument?.hashCode() ?: 0
result = 31 * result + (policyName?.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 PolicyDetail
if (policyDocument != other.policyDocument) return false
if (policyName != other.policyName) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iam.model.PolicyDetail = Builder(this).apply(block).build()
public class Builder {
/**
* The policy document.
*/
public var policyDocument: kotlin.String? = null
/**
* The name of the policy.
*/
public var policyName: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iam.model.PolicyDetail) : this() {
this.policyDocument = x.policyDocument
this.policyName = x.policyName
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iam.model.PolicyDetail = PolicyDetail(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy