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

org.kiwiproject.consul.model.health.Service Maven / Gradle / Ivy

package org.kiwiproject.consul.model.health;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.google.common.collect.ImmutableList;
import org.immutables.value.Value;
import org.kiwiproject.consul.model.catalog.ServiceWeights;

import java.util.List;
import java.util.Map;
import java.util.Optional;

@Value.Immutable
@Value.Style(jakarta = true)
@JsonSerialize(as = ImmutableService.class)
@JsonDeserialize(as = ImmutableService.class)
@JsonIgnoreProperties(ignoreUnknown = true)
public abstract class Service {

    @JsonProperty("ID")
    public abstract String getId();

    @JsonProperty("Service")
    public abstract String getService();

    @JsonProperty("EnableTagOverride")
    public abstract Optional getEnableTagOverride();

    @JsonProperty("Tags")
    @JsonDeserialize(as = ImmutableList.class, contentAs = String.class)
    public abstract List getTags();

    @JsonProperty("Address")
    public abstract String getAddress();

    @JsonProperty("Meta")
    public abstract Map getMeta();

    @JsonProperty("Port")
    public abstract int getPort();

    @JsonProperty("Weights")
    public abstract Optional getWeights();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy