com.palantir.atlasdb.timelock.api.ConjureUnlockRequestV2 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.Preconditions;
import com.palantir.logsafe.Safe;
import java.util.Collections;
import java.util.Set;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.annotation.processing.Generated;
@Safe
@Generated("com.palantir.conjure.java.types.AliasGenerator")
public final class ConjureUnlockRequestV2 {
private static final ConjureUnlockRequestV2 EMPTY = new ConjureUnlockRequestV2();
private final Set value;
private ConjureUnlockRequestV2(@Nonnull Set value) {
this.value = Preconditions.checkNotNull(value, "value cannot be null");
}
private ConjureUnlockRequestV2() {
this(Collections.emptySet());
}
@JsonValue
public Set get() {
return value;
}
@Override
public String toString() {
return value.toString();
}
@Override
public boolean equals(@Nullable Object other) {
return this == other
|| (other instanceof ConjureUnlockRequestV2
&& this.value.equals(((ConjureUnlockRequestV2) other).value));
}
@Override
public int hashCode() {
return value.hashCode();
}
@JsonCreator(mode = JsonCreator.Mode.DELEGATING)
public static ConjureUnlockRequestV2 of(@Nonnull Set value) {
return new ConjureUnlockRequestV2(value);
}
public static ConjureUnlockRequestV2 empty() {
return EMPTY;
}
}