commonMain.aws.sdk.kotlin.services.entityresolution.model.AddPolicyStatementRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of entityresolution-jvm Show documentation
Show all versions of entityresolution-jvm Show documentation
The AWS SDK for Kotlin client for EntityResolution
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.entityresolution.model
import aws.smithy.kotlin.runtime.SdkDsl
public class AddPolicyStatementRequest private constructor(builder: Builder) {
/**
* The action that the principal can use on the resource.
*
* For example, `entityresolution:GetIdMappingJob`, `entityresolution:GetMatchingJob`.
*/
public val action: List? = builder.action
/**
* The Amazon Resource Name (ARN) of the resource that will be accessed by the principal.
*/
public val arn: kotlin.String? = builder.arn
/**
* A set of condition keys that you can use in key policies.
*/
public val condition: kotlin.String? = builder.condition
/**
* Determines whether the permissions specified in the policy are to be allowed (`Allow`) or denied (`Deny`).
*
* If you set the value of the `effect` parameter to `Deny` for the `AddPolicyStatement` operation, you must also set the value of the `effect` parameter in the `policy` to `Deny` for the `PutPolicy` operation.
*/
public val effect: aws.sdk.kotlin.services.entityresolution.model.StatementEffect? = builder.effect
/**
* The Amazon Web Services service or Amazon Web Services account that can access the resource defined as ARN.
*/
public val principal: List? = builder.principal
/**
* A statement identifier that differentiates the statement from others in the same policy.
*/
public val statementId: kotlin.String? = builder.statementId
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.entityresolution.model.AddPolicyStatementRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("AddPolicyStatementRequest(")
append("action=$action,")
append("arn=$arn,")
append("condition=$condition,")
append("effect=$effect,")
append("principal=$principal,")
append("statementId=$statementId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = action?.hashCode() ?: 0
result = 31 * result + (arn?.hashCode() ?: 0)
result = 31 * result + (condition?.hashCode() ?: 0)
result = 31 * result + (effect?.hashCode() ?: 0)
result = 31 * result + (principal?.hashCode() ?: 0)
result = 31 * result + (statementId?.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 AddPolicyStatementRequest
if (action != other.action) return false
if (arn != other.arn) return false
if (condition != other.condition) return false
if (effect != other.effect) return false
if (principal != other.principal) return false
if (statementId != other.statementId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.entityresolution.model.AddPolicyStatementRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The action that the principal can use on the resource.
*
* For example, `entityresolution:GetIdMappingJob`, `entityresolution:GetMatchingJob`.
*/
public var action: List? = null
/**
* The Amazon Resource Name (ARN) of the resource that will be accessed by the principal.
*/
public var arn: kotlin.String? = null
/**
* A set of condition keys that you can use in key policies.
*/
public var condition: kotlin.String? = null
/**
* Determines whether the permissions specified in the policy are to be allowed (`Allow`) or denied (`Deny`).
*
* If you set the value of the `effect` parameter to `Deny` for the `AddPolicyStatement` operation, you must also set the value of the `effect` parameter in the `policy` to `Deny` for the `PutPolicy` operation.
*/
public var effect: aws.sdk.kotlin.services.entityresolution.model.StatementEffect? = null
/**
* The Amazon Web Services service or Amazon Web Services account that can access the resource defined as ARN.
*/
public var principal: List? = null
/**
* A statement identifier that differentiates the statement from others in the same policy.
*/
public var statementId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.entityresolution.model.AddPolicyStatementRequest) : this() {
this.action = x.action
this.arn = x.arn
this.condition = x.condition
this.effect = x.effect
this.principal = x.principal
this.statementId = x.statementId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.entityresolution.model.AddPolicyStatementRequest = AddPolicyStatementRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy