
commonMain.aws.sdk.kotlin.services.verifiedpermissions.model.UpdatePolicyTemplateRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.verifiedpermissions.model
public class UpdatePolicyTemplateRequest private constructor(builder: Builder) {
/**
* Specifies a new description to apply to the policy template.
*/
public val description: kotlin.String? = builder.description
/**
* Specifies the ID of the policy store that contains the policy template that you want to update.
*/
public val policyStoreId: kotlin.String? = builder.policyStoreId
/**
* Specifies the ID of the policy template that you want to update.
*/
public val policyTemplateId: kotlin.String? = builder.policyTemplateId
/**
* Specifies new statement content written in Cedar policy language to replace the current body of the policy template.
*
* You can change only the following elements of the policy body:
* + The `action` referenced by the policy template.
* + Any conditional clauses, such as `when` or `unless` clauses.
*
* You **can't** change the following elements:
* + The effect (`permit` or `forbid`) of the policy template.
* + The `principal` referenced by the policy template.
* + The `resource` referenced by the policy template.
*/
public val statement: kotlin.String? = builder.statement
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.verifiedpermissions.model.UpdatePolicyTemplateRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdatePolicyTemplateRequest(")
append("description=*** Sensitive Data Redacted ***,")
append("policyStoreId=$policyStoreId,")
append("policyTemplateId=$policyTemplateId,")
append("statement=*** Sensitive Data Redacted ***")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = description?.hashCode() ?: 0
result = 31 * result + (policyStoreId?.hashCode() ?: 0)
result = 31 * result + (policyTemplateId?.hashCode() ?: 0)
result = 31 * result + (statement?.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 UpdatePolicyTemplateRequest
if (description != other.description) return false
if (policyStoreId != other.policyStoreId) return false
if (policyTemplateId != other.policyTemplateId) return false
if (statement != other.statement) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.verifiedpermissions.model.UpdatePolicyTemplateRequest = Builder(this).apply(block).build()
public class Builder {
/**
* Specifies a new description to apply to the policy template.
*/
public var description: kotlin.String? = null
/**
* Specifies the ID of the policy store that contains the policy template that you want to update.
*/
public var policyStoreId: kotlin.String? = null
/**
* Specifies the ID of the policy template that you want to update.
*/
public var policyTemplateId: kotlin.String? = null
/**
* Specifies new statement content written in Cedar policy language to replace the current body of the policy template.
*
* You can change only the following elements of the policy body:
* + The `action` referenced by the policy template.
* + Any conditional clauses, such as `when` or `unless` clauses.
*
* You **can't** change the following elements:
* + The effect (`permit` or `forbid`) of the policy template.
* + The `principal` referenced by the policy template.
* + The `resource` referenced by the policy template.
*/
public var statement: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.verifiedpermissions.model.UpdatePolicyTemplateRequest) : this() {
this.description = x.description
this.policyStoreId = x.policyStoreId
this.policyTemplateId = x.policyTemplateId
this.statement = x.statement
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.verifiedpermissions.model.UpdatePolicyTemplateRequest = UpdatePolicyTemplateRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy