com.palantir.atlasdb.timelock.api.ConjureGetFreshTimestampsRequestV2 Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of timelock-api-objects Show documentation
Show all versions of timelock-api-objects Show documentation
Palantir open source project
package com.palantir.atlasdb.timelock.api;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.palantir.logsafe.Safe;
import javax.annotation.Nullable;
import javax.annotation.processing.Generated;
@Safe
@Generated("com.palantir.conjure.java.types.AliasGenerator")
public final class ConjureGetFreshTimestampsRequestV2 implements Comparable {
private final @Safe int value;
private ConjureGetFreshTimestampsRequestV2(@Safe int value) {
this.value = value;
}
@JsonValue
public @Safe int get() {
return value;
}
@Override
@Safe
public String toString() {
return String.valueOf(value);
}
@Override
public boolean equals(@Nullable Object other) {
return this == other
|| (other instanceof ConjureGetFreshTimestampsRequestV2
&& equalTo((ConjureGetFreshTimestampsRequestV2) other));
}
private boolean equalTo(ConjureGetFreshTimestampsRequestV2 other) {
return this.value == other.value;
}
@Override
public int hashCode() {
return Integer.hashCode(this.value);
}
@Override
public int compareTo(ConjureGetFreshTimestampsRequestV2 other) {
return Integer.compare(value, other.get());
}
public static ConjureGetFreshTimestampsRequestV2 valueOf(@Safe String value) {
return of(Integer.parseInt(value));
}
@JsonCreator(mode = JsonCreator.Mode.DELEGATING)
public static ConjureGetFreshTimestampsRequestV2 of(@Safe int value) {
return new ConjureGetFreshTimestampsRequestV2(value);
}
}