com.palantir.atlasdb.timelock.paxos.api.DialogueNamespaceLeadershipTakeoverEndpoints Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of timelock-api-dialogue Show documentation
Show all versions of timelock-api-dialogue Show documentation
Palantir open source project
package com.palantir.atlasdb.timelock.paxos.api;
import com.palantir.dialogue.Endpoint;
import com.palantir.dialogue.HttpMethod;
import com.palantir.dialogue.PathTemplate;
import com.palantir.dialogue.UrlBuilder;
import java.lang.Override;
import java.lang.String;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Generated;
@Generated("com.palantir.conjure.java.services.dialogue.DialogueEndpointsGenerator")
enum DialogueNamespaceLeadershipTakeoverEndpoints implements Endpoint {
takeover {
private final PathTemplate pathTemplate = PathTemplate.builder()
.fixed("tl")
.fixed("paxos")
.fixed("takeover")
.variable("namespace")
.build();
@Override
public void renderPath(Map params, UrlBuilder url) {
pathTemplate.fill(params, url);
}
@Override
public HttpMethod httpMethod() {
return HttpMethod.POST;
}
@Override
public String serviceName() {
return "NamespaceLeadershipTakeoverService";
}
@Override
public String endpointName() {
return "takeover";
}
@Override
public String version() {
return VERSION;
}
},
takeoverNamespaces {
private final PathTemplate pathTemplate = PathTemplate.builder()
.fixed("tl")
.fixed("paxos")
.fixed("takeoverNamespaces")
.build();
@Override
public void renderPath(Map params, UrlBuilder url) {
pathTemplate.fill(params, url);
}
@Override
public HttpMethod httpMethod() {
return HttpMethod.POST;
}
@Override
public String serviceName() {
return "NamespaceLeadershipTakeoverService";
}
@Override
public String endpointName() {
return "takeoverNamespaces";
}
@Override
public String version() {
return VERSION;
}
};
private static final String VERSION = Optional.ofNullable(DialogueNamespaceLeadershipTakeoverEndpoints.class
.getPackage()
.getImplementationVersion())
.orElse("0.0.0");
}