
commonMain.aws.sdk.kotlin.services.ssm.model.GetResourcePoliciesResponseEntry.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.ssm.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* A resource policy helps you to define the IAM entity (for example, an Amazon Web Services account) that can manage your Systems Manager resources. Currently, `OpsItemGroup` is the only resource that supports Systems Manager resource policies. The resource policy for `OpsItemGroup` enables Amazon Web Services accounts to view and interact with OpsCenter operational work items (OpsItems).
*/
public class GetResourcePoliciesResponseEntry private constructor(builder: Builder) {
/**
* A resource policy helps you to define the IAM entity (for example, an Amazon Web Services account) that can manage your Systems Manager resources. Currently, `OpsItemGroup` is the only resource that supports Systems Manager resource policies. The resource policy for `OpsItemGroup` enables Amazon Web Services accounts to view and interact with OpsCenter operational work items (OpsItems).
*/
public val policy: kotlin.String? = builder.policy
/**
* ID of the current policy version. The hash helps to prevent a situation where multiple users attempt to overwrite a policy. You must provide this hash when updating or deleting a policy.
*/
public val policyHash: kotlin.String? = builder.policyHash
/**
* A policy ID.
*/
public val policyId: kotlin.String? = builder.policyId
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.ssm.model.GetResourcePoliciesResponseEntry = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GetResourcePoliciesResponseEntry(")
append("policy=$policy,")
append("policyHash=$policyHash,")
append("policyId=$policyId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = policy?.hashCode() ?: 0
result = 31 * result + (policyHash?.hashCode() ?: 0)
result = 31 * result + (policyId?.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 GetResourcePoliciesResponseEntry
if (policy != other.policy) return false
if (policyHash != other.policyHash) return false
if (policyId != other.policyId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.ssm.model.GetResourcePoliciesResponseEntry = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A resource policy helps you to define the IAM entity (for example, an Amazon Web Services account) that can manage your Systems Manager resources. Currently, `OpsItemGroup` is the only resource that supports Systems Manager resource policies. The resource policy for `OpsItemGroup` enables Amazon Web Services accounts to view and interact with OpsCenter operational work items (OpsItems).
*/
public var policy: kotlin.String? = null
/**
* ID of the current policy version. The hash helps to prevent a situation where multiple users attempt to overwrite a policy. You must provide this hash when updating or deleting a policy.
*/
public var policyHash: kotlin.String? = null
/**
* A policy ID.
*/
public var policyId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.ssm.model.GetResourcePoliciesResponseEntry) : this() {
this.policy = x.policy
this.policyHash = x.policyHash
this.policyId = x.policyId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.ssm.model.GetResourcePoliciesResponseEntry = GetResourcePoliciesResponseEntry(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy