
commonMain.aws.sdk.kotlin.services.iam.model.CreatePolicyVersionResponse.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.iam.model
/**
* Contains the response to a successful CreatePolicyVersion request.
*/
public class CreatePolicyVersionResponse private constructor(builder: Builder) {
/**
* A structure containing details about the new policy version.
*/
public val policyVersion: aws.sdk.kotlin.services.iam.model.PolicyVersion? = builder.policyVersion
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iam.model.CreatePolicyVersionResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreatePolicyVersionResponse(")
append("policyVersion=$policyVersion")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = policyVersion?.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 CreatePolicyVersionResponse
if (policyVersion != other.policyVersion) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iam.model.CreatePolicyVersionResponse = Builder(this).apply(block).build()
public class Builder {
/**
* A structure containing details about the new policy version.
*/
public var policyVersion: aws.sdk.kotlin.services.iam.model.PolicyVersion? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iam.model.CreatePolicyVersionResponse) : this() {
this.policyVersion = x.policyVersion
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iam.model.CreatePolicyVersionResponse = CreatePolicyVersionResponse(this)
/**
* construct an [aws.sdk.kotlin.services.iam.model.PolicyVersion] inside the given [block]
*/
public fun policyVersion(block: aws.sdk.kotlin.services.iam.model.PolicyVersion.Builder.() -> kotlin.Unit) {
this.policyVersion = aws.sdk.kotlin.services.iam.model.PolicyVersion.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy