All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.palantir.atlasdb.timelock.api.ConjureGetFreshTimestampsRequestV2 Maven / Gradle / Ivy

There is a newer version: 0.1152.0
Show newest version
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);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy