commonMain.aws.sdk.kotlin.runtime.config.imds.Token.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aws-config-jvm Show documentation
Show all versions of aws-config-jvm Show documentation
Support for AWS configuration
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
package aws.sdk.kotlin.runtime.config.imds
import aws.smithy.kotlin.runtime.time.Instant
internal data class Token(val value: ByteArray, val expires: Instant) {
override fun equals(other: Any?): Boolean {
if (this === other) return true
if (other == null || this::class != other::class) return false
other as Token
if (!value.contentEquals(other.value)) return false
if (expires != other.expires) return false
return true
}
override fun hashCode(): Int {
var result = value.contentHashCode()
result = 31 * result + expires.hashCode()
return result
}
}