
commonMain.aws.sdk.kotlin.services.verifiedpermissions.model.UpdateStaticPolicyDefinition.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.verifiedpermissions.model
/**
* Contains information about an update to a static policy.
*/
public class UpdateStaticPolicyDefinition private constructor(builder: Builder) {
/**
* Specifies the description to be added to or replaced on the static policy.
*/
public val description: kotlin.String? = builder.description
/**
* Specifies the Cedar policy language text to be added to or replaced on the static policy.
*
* You can change only the following elements from the original content:
* + The `action` referenced by the policy.
* + Any conditional clauses, such as `when` or `unless` clauses.
* You **can't** change the following elements:
* + Changing from `StaticPolicy` to `TemplateLinkedPolicy`.
* + The effect (`permit` or `forbid`) of the policy.
* + The `principal` referenced by the policy.
* + The `resource` referenced by the policy.
*/
public val statement: kotlin.String = requireNotNull(builder.statement) { "A non-null value must be provided for statement" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.verifiedpermissions.model.UpdateStaticPolicyDefinition = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdateStaticPolicyDefinition(")
append("description=*** Sensitive Data Redacted ***,")
append("statement=*** Sensitive Data Redacted ***")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = description?.hashCode() ?: 0
result = 31 * result + (statement.hashCode())
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 UpdateStaticPolicyDefinition
if (description != other.description) return false
if (statement != other.statement) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.verifiedpermissions.model.UpdateStaticPolicyDefinition = Builder(this).apply(block).build()
public class Builder {
/**
* Specifies the description to be added to or replaced on the static policy.
*/
public var description: kotlin.String? = null
/**
* Specifies the Cedar policy language text to be added to or replaced on the static policy.
*
* You can change only the following elements from the original content:
* + The `action` referenced by the policy.
* + Any conditional clauses, such as `when` or `unless` clauses.
* You **can't** change the following elements:
* + Changing from `StaticPolicy` to `TemplateLinkedPolicy`.
* + The effect (`permit` or `forbid`) of the policy.
* + The `principal` referenced by the policy.
* + The `resource` referenced by the policy.
*/
public var statement: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.verifiedpermissions.model.UpdateStaticPolicyDefinition) : this() {
this.description = x.description
this.statement = x.statement
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.verifiedpermissions.model.UpdateStaticPolicyDefinition = UpdateStaticPolicyDefinition(this)
internal fun correctErrors(): Builder {
if (statement == null) statement = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy