commonMain.aws.sdk.kotlin.services.codeartifact.model.PutDomainPermissionsPolicyRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of codeartifact-jvm Show documentation
Show all versions of codeartifact-jvm Show documentation
The AWS SDK for Kotlin client for codeartifact
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.codeartifact.model
import aws.smithy.kotlin.runtime.SdkDsl
public class PutDomainPermissionsPolicyRequest private constructor(builder: Builder) {
/**
* The name of the domain on which to set the resource policy.
*/
public val domain: kotlin.String? = builder.domain
/**
* The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.
*/
public val domainOwner: kotlin.String? = builder.domainOwner
/**
* A valid displayable JSON Aspen policy string to be set as the access control resource policy on the provided domain.
*/
public val policyDocument: kotlin.String? = builder.policyDocument
/**
* The current revision of the resource policy to be set. This revision is used for optimistic locking, which prevents others from overwriting your changes to the domain's resource policy.
*/
public val policyRevision: kotlin.String? = builder.policyRevision
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codeartifact.model.PutDomainPermissionsPolicyRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PutDomainPermissionsPolicyRequest(")
append("domain=$domain,")
append("domainOwner=$domainOwner,")
append("policyDocument=$policyDocument,")
append("policyRevision=$policyRevision")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = domain?.hashCode() ?: 0
result = 31 * result + (domainOwner?.hashCode() ?: 0)
result = 31 * result + (policyDocument?.hashCode() ?: 0)
result = 31 * result + (policyRevision?.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 PutDomainPermissionsPolicyRequest
if (domain != other.domain) return false
if (domainOwner != other.domainOwner) return false
if (policyDocument != other.policyDocument) return false
if (policyRevision != other.policyRevision) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codeartifact.model.PutDomainPermissionsPolicyRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The name of the domain on which to set the resource policy.
*/
public var domain: kotlin.String? = null
/**
* The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.
*/
public var domainOwner: kotlin.String? = null
/**
* A valid displayable JSON Aspen policy string to be set as the access control resource policy on the provided domain.
*/
public var policyDocument: kotlin.String? = null
/**
* The current revision of the resource policy to be set. This revision is used for optimistic locking, which prevents others from overwriting your changes to the domain's resource policy.
*/
public var policyRevision: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.codeartifact.model.PutDomainPermissionsPolicyRequest) : this() {
this.domain = x.domain
this.domainOwner = x.domainOwner
this.policyDocument = x.policyDocument
this.policyRevision = x.policyRevision
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.codeartifact.model.PutDomainPermissionsPolicyRequest = PutDomainPermissionsPolicyRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}