
commonMain.aws.sdk.kotlin.services.schemas.model.PutResourcePolicyRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of schemas-jvm Show documentation
Show all versions of schemas-jvm Show documentation
The AWS SDK for Kotlin client for schemas
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.schemas.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The name of the policy.
*/
public class PutResourcePolicyRequest private constructor(builder: Builder) {
/**
* The resource-based policy.
*/
public val policy: kotlin.String? = builder.policy
/**
* The name of the registry.
*/
public val registryName: kotlin.String? = builder.registryName
/**
* The revision ID of the policy.
*/
public val revisionId: kotlin.String? = builder.revisionId
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.schemas.model.PutResourcePolicyRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PutResourcePolicyRequest(")
append("policy=$policy,")
append("registryName=$registryName,")
append("revisionId=$revisionId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = policy?.hashCode() ?: 0
result = 31 * result + (registryName?.hashCode() ?: 0)
result = 31 * result + (revisionId?.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 PutResourcePolicyRequest
if (policy != other.policy) return false
if (registryName != other.registryName) return false
if (revisionId != other.revisionId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.schemas.model.PutResourcePolicyRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The resource-based policy.
*/
public var policy: kotlin.String? = null
/**
* The name of the registry.
*/
public var registryName: kotlin.String? = null
/**
* The revision ID of the policy.
*/
public var revisionId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.schemas.model.PutResourcePolicyRequest) : this() {
this.policy = x.policy
this.registryName = x.registryName
this.revisionId = x.revisionId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.schemas.model.PutResourcePolicyRequest = PutResourcePolicyRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy