com.hashicorp.nomad.apimodel.ObjectDiff Maven / Gradle / Ivy
package com.hashicorp.nomad.apimodel;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.hashicorp.nomad.javasdk.ApiObject;
import com.hashicorp.nomad.javasdk.NomadJson;
import java.io.IOException;
import java.util.List;
/**
* This is a generated JavaBean representing a request or response structure.
*
* @see Nomad HTTP API documentation associated with the endpoint you are using.
*/
public final class ObjectDiff extends ApiObject {
private String type;
private String name;
private List fields;
private List objects;
@JsonProperty("Type")
public String getType() {
return type;
}
public ObjectDiff setType(String type) {
this.type = type;
return this;
}
@JsonProperty("Name")
public String getName() {
return name;
}
public ObjectDiff setName(String name) {
this.name = name;
return this;
}
@JsonProperty("Fields")
public List getFields() {
return fields;
}
public ObjectDiff setFields(List fields) {
this.fields = fields;
return this;
}
public ObjectDiff addFields(FieldDiff... fields) {
if (this.fields == null)
this.fields = new java.util.ArrayList<>();
for (FieldDiff item : fields)
this.fields.add(item);
return this;
}
@JsonProperty("Objects")
public List getObjects() {
return objects;
}
public ObjectDiff setObjects(List objects) {
this.objects = objects;
return this;
}
public ObjectDiff addObjects(ObjectDiff... objects) {
if (this.objects == null)
this.objects = new java.util.ArrayList<>();
for (ObjectDiff item : objects)
this.objects.add(item);
return this;
}
@Override
public String toString() {
return NomadJson.serialize(this);
}
public static ObjectDiff fromJson(String json) throws IOException {
return NomadJson.deserialize(json, ObjectDiff.class);
}
public static List fromJsonArray(String json) throws IOException {
return NomadJson.deserializeList(json, ObjectDiff.class);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy