Skip to content

add weights field to NewService model #206

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def doUploadArchives = project.hasProperty('sonatypeUsername') && project.hasPro
if (doUploadArchives) {
group = "com.ecwid.consul"
archivesBaseName = "consul-api"
version = "1.4.5"
version = "1.4.6"

signing {
sign configurations.archives
Expand Down
44 changes: 44 additions & 0 deletions src/main/java/com/ecwid/consul/v1/agent/model/NewService.java
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,38 @@ public String toString() {
}
}

public static class Weights {
@SerializedName("Passing")
private Integer passing;

@SerializedName("Warning")
private Integer warning;

public Integer getPassing() {
return passing;
}

public void setPassing(Integer passing) {
this.passing = passing;
}

public Integer getWarning() {
return warning;
}

public void setWarning(Integer warning) {
this.warning = warning;
}

@Override
public String toString() {
return "Weights{" +
"passing=" + passing +
", warning=" + warning +
'}';
}
}

@SerializedName("ID")
private String id;

Expand Down Expand Up @@ -219,6 +251,9 @@ public String toString() {
@SerializedName("Checks")
private List<Check> checks;

@SerializedName("Weights")
private Weights weights;

public String getId() {
return id;
}
Expand Down Expand Up @@ -291,6 +326,14 @@ public void setChecks(List<Check> checks) {
this.checks = checks;
}

public Weights getWeights() {
return weights;
}

public void setWeights(Weights weights) {
this.weights = weights;
}

@Override
public String toString() {
return "NewService{" +
Expand All @@ -303,6 +346,7 @@ public String toString() {
", enableTagOverride=" + enableTagOverride +
", check=" + check +
", checks=" + checks +
", weights=" + weights +
'}';
}
}