
commonMain.aws.sdk.kotlin.services.iam.model.SetDefaultPolicyVersionRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.iam.model
public class SetDefaultPolicyVersionRequest private constructor(builder: Builder) {
/**
* The Amazon Resource Name (ARN) of the IAM policy whose default version you want to set.
*
* For more information about ARNs, see [Amazon Resource Names (ARNs)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) in the *Amazon Web Services General Reference*.
*/
public val policyArn: kotlin.String? = builder.policyArn
/**
* The version of the policy to set as the default (operative) version.
*
* For more information about managed policy versions, see [Versioning for managed policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html) in the *IAM User Guide*.
*/
public val versionId: kotlin.String? = builder.versionId
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iam.model.SetDefaultPolicyVersionRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("SetDefaultPolicyVersionRequest(")
append("policyArn=$policyArn,")
append("versionId=$versionId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = policyArn?.hashCode() ?: 0
result = 31 * result + (versionId?.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 SetDefaultPolicyVersionRequest
if (policyArn != other.policyArn) return false
if (versionId != other.versionId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iam.model.SetDefaultPolicyVersionRequest = Builder(this).apply(block).build()
public class Builder {
/**
* The Amazon Resource Name (ARN) of the IAM policy whose default version you want to set.
*
* For more information about ARNs, see [Amazon Resource Names (ARNs)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) in the *Amazon Web Services General Reference*.
*/
public var policyArn: kotlin.String? = null
/**
* The version of the policy to set as the default (operative) version.
*
* For more information about managed policy versions, see [Versioning for managed policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html) in the *IAM User Guide*.
*/
public var versionId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iam.model.SetDefaultPolicyVersionRequest) : this() {
this.policyArn = x.policyArn
this.versionId = x.versionId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iam.model.SetDefaultPolicyVersionRequest = SetDefaultPolicyVersionRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy