
commonMain.aws.sdk.kotlin.services.s3control.model.PutAccessGrantsInstanceResourcePolicyRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.s3control.model
public class PutAccessGrantsInstanceResourcePolicyRequest private constructor(builder: Builder) {
/**
* The ID of the Amazon Web Services account that is making this request.
*/
public val accountId: kotlin.String? = builder.accountId
/**
* The Organization of the resource policy of the S3 Access Grants instance.
*/
public val organization: kotlin.String? = builder.organization
/**
* The resource policy of the S3 Access Grants instance that you are updating.
*/
public val policy: kotlin.String? = builder.policy
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.s3control.model.PutAccessGrantsInstanceResourcePolicyRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PutAccessGrantsInstanceResourcePolicyRequest(")
append("accountId=$accountId,")
append("organization=$organization,")
append("policy=$policy")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = accountId?.hashCode() ?: 0
result = 31 * result + (organization?.hashCode() ?: 0)
result = 31 * result + (policy?.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 PutAccessGrantsInstanceResourcePolicyRequest
if (accountId != other.accountId) return false
if (organization != other.organization) return false
if (policy != other.policy) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.s3control.model.PutAccessGrantsInstanceResourcePolicyRequest = Builder(this).apply(block).build()
public class Builder {
/**
* The ID of the Amazon Web Services account that is making this request.
*/
public var accountId: kotlin.String? = null
/**
* The Organization of the resource policy of the S3 Access Grants instance.
*/
public var organization: kotlin.String? = null
/**
* The resource policy of the S3 Access Grants instance that you are updating.
*/
public var policy: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.s3control.model.PutAccessGrantsInstanceResourcePolicyRequest) : this() {
this.accountId = x.accountId
this.organization = x.organization
this.policy = x.policy
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.s3control.model.PutAccessGrantsInstanceResourcePolicyRequest = PutAccessGrantsInstanceResourcePolicyRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy