
commonMain.aws.sdk.kotlin.services.opensearchserverless.model.LifecyclePolicyDetail.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.opensearchserverless.model
import aws.smithy.kotlin.runtime.content.Document
/**
* Details about an OpenSearch Serverless lifecycle policy.
*/
public class LifecyclePolicyDetail private constructor(builder: Builder) {
/**
* The date the lifecycle policy was created.
*/
public val createdDate: kotlin.Long? = builder.createdDate
/**
* The description of the lifecycle policy.
*/
public val description: kotlin.String? = builder.description
/**
* The timestamp of when the lifecycle policy was last modified.
*/
public val lastModifiedDate: kotlin.Long? = builder.lastModifiedDate
/**
* The name of the lifecycle policy.
*/
public val name: kotlin.String? = builder.name
/**
* The JSON policy document without any whitespaces.
*/
public val policy: aws.smithy.kotlin.runtime.content.Document? = builder.policy
/**
* The version of the lifecycle policy.
*/
public val policyVersion: kotlin.String? = builder.policyVersion
/**
* The type of lifecycle policy.
*/
public val type: aws.sdk.kotlin.services.opensearchserverless.model.LifecyclePolicyType? = builder.type
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.opensearchserverless.model.LifecyclePolicyDetail = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("LifecyclePolicyDetail(")
append("createdDate=$createdDate,")
append("description=$description,")
append("lastModifiedDate=$lastModifiedDate,")
append("name=$name,")
append("policy=$policy,")
append("policyVersion=$policyVersion,")
append("type=$type")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = createdDate?.hashCode() ?: 0
result = 31 * result + (description?.hashCode() ?: 0)
result = 31 * result + (lastModifiedDate?.hashCode() ?: 0)
result = 31 * result + (name?.hashCode() ?: 0)
result = 31 * result + (policy?.hashCode() ?: 0)
result = 31 * result + (policyVersion?.hashCode() ?: 0)
result = 31 * result + (type?.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 LifecyclePolicyDetail
if (createdDate != other.createdDate) return false
if (description != other.description) return false
if (lastModifiedDate != other.lastModifiedDate) return false
if (name != other.name) return false
if (policy != other.policy) return false
if (policyVersion != other.policyVersion) return false
if (type != other.type) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.opensearchserverless.model.LifecyclePolicyDetail = Builder(this).apply(block).build()
public class Builder {
/**
* The date the lifecycle policy was created.
*/
public var createdDate: kotlin.Long? = null
/**
* The description of the lifecycle policy.
*/
public var description: kotlin.String? = null
/**
* The timestamp of when the lifecycle policy was last modified.
*/
public var lastModifiedDate: kotlin.Long? = null
/**
* The name of the lifecycle policy.
*/
public var name: kotlin.String? = null
/**
* The JSON policy document without any whitespaces.
*/
public var policy: aws.smithy.kotlin.runtime.content.Document? = null
/**
* The version of the lifecycle policy.
*/
public var policyVersion: kotlin.String? = null
/**
* The type of lifecycle policy.
*/
public var type: aws.sdk.kotlin.services.opensearchserverless.model.LifecyclePolicyType? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.opensearchserverless.model.LifecyclePolicyDetail) : this() {
this.createdDate = x.createdDate
this.description = x.description
this.lastModifiedDate = x.lastModifiedDate
this.name = x.name
this.policy = x.policy
this.policyVersion = x.policyVersion
this.type = x.type
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.opensearchserverless.model.LifecyclePolicyDetail = LifecyclePolicyDetail(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy