commonMain.aws.sdk.kotlin.services.glacier.model.SetDataRetrievalPolicyRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of glacier-jvm Show documentation
Show all versions of glacier-jvm Show documentation
The AWS Kotlin client for Glacier
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.glacier.model
/**
* SetDataRetrievalPolicy input.
*/
public class SetDataRetrievalPolicyRequest private constructor(builder: Builder) {
/**
* The `AccountId` value is the AWS account ID. This value must match the AWS account ID associated with the credentials used to sign the request. You can either specify an AWS account ID or optionally a single '`-`' (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you specify your account ID, do not include any hyphens ('-') in the ID.
*/
public val accountId: kotlin.String? = builder.accountId
/**
* The data retrieval policy in JSON format.
*/
public val policy: aws.sdk.kotlin.services.glacier.model.DataRetrievalPolicy? = builder.policy
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glacier.model.SetDataRetrievalPolicyRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("SetDataRetrievalPolicyRequest(")
append("accountId=$accountId,")
append("policy=$policy")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = accountId?.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 SetDataRetrievalPolicyRequest
if (accountId != other.accountId) return false
if (policy != other.policy) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glacier.model.SetDataRetrievalPolicyRequest = Builder(this).apply(block).build()
public class Builder {
/**
* The `AccountId` value is the AWS account ID. This value must match the AWS account ID associated with the credentials used to sign the request. You can either specify an AWS account ID or optionally a single '`-`' (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you specify your account ID, do not include any hyphens ('-') in the ID.
*/
public var accountId: kotlin.String? = null
/**
* The data retrieval policy in JSON format.
*/
public var policy: aws.sdk.kotlin.services.glacier.model.DataRetrievalPolicy? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glacier.model.SetDataRetrievalPolicyRequest) : this() {
this.accountId = x.accountId
this.policy = x.policy
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glacier.model.SetDataRetrievalPolicyRequest = SetDataRetrievalPolicyRequest(this)
/**
* construct an [aws.sdk.kotlin.services.glacier.model.DataRetrievalPolicy] inside the given [block]
*/
public fun policy(block: aws.sdk.kotlin.services.glacier.model.DataRetrievalPolicy.Builder.() -> kotlin.Unit) {
this.policy = aws.sdk.kotlin.services.glacier.model.DataRetrievalPolicy.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy