org.opendatadiscovery.client.model.MetricFamily Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ingestion-contract-client Show documentation
Show all versions of ingestion-contract-client Show documentation
Ingestion Contract WebFlux Client defines OpenDataDiscovery APIs and models for Spring WebClient
/*
* OpenDataDiscovery API Contract
* OpenDataDiscovery API Contract
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.opendatadiscovery.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
import org.opendatadiscovery.client.model.Metric;
import org.opendatadiscovery.client.model.MetricType;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* MetricFamily
*/
@JsonPropertyOrder({
MetricFamily.JSON_PROPERTY_NAME,
MetricFamily.JSON_PROPERTY_TYPE,
MetricFamily.JSON_PROPERTY_UNIT,
MetricFamily.JSON_PROPERTY_HELP,
MetricFamily.JSON_PROPERTY_METRICS
})
@JsonTypeName("MetricFamily")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-03T09:54:52.207338Z[Etc/UTC]")
public class MetricFamily {
public static final String JSON_PROPERTY_NAME = "name";
private String name;
public static final String JSON_PROPERTY_TYPE = "type";
private MetricType type;
public static final String JSON_PROPERTY_UNIT = "unit";
private String unit;
public static final String JSON_PROPERTY_HELP = "help";
private String help;
public static final String JSON_PROPERTY_METRICS = "metrics";
private List metrics = new ArrayList<>();
public MetricFamily name(String name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
**/
@ApiModelProperty(required = true, value = "")
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getName() {
return name;
}
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setName(String name) {
this.name = name;
}
public MetricFamily type(MetricType type) {
this.type = type;
return this;
}
/**
* Get type
* @return type
**/
@ApiModelProperty(required = true, value = "")
@JsonProperty(JSON_PROPERTY_TYPE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public MetricType getType() {
return type;
}
@JsonProperty(JSON_PROPERTY_TYPE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setType(MetricType type) {
this.type = type;
}
public MetricFamily unit(String unit) {
this.unit = unit;
return this;
}
/**
* Get unit
* @return unit
**/
@ApiModelProperty(required = true, value = "")
@JsonProperty(JSON_PROPERTY_UNIT)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getUnit() {
return unit;
}
@JsonProperty(JSON_PROPERTY_UNIT)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setUnit(String unit) {
this.unit = unit;
}
public MetricFamily help(String help) {
this.help = help;
return this;
}
/**
* Get help
* @return help
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_HELP)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getHelp() {
return help;
}
@JsonProperty(JSON_PROPERTY_HELP)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setHelp(String help) {
this.help = help;
}
public MetricFamily metrics(List metrics) {
this.metrics = metrics;
return this;
}
public MetricFamily addMetricsItem(Metric metricsItem) {
this.metrics.add(metricsItem);
return this;
}
/**
* Get metrics
* @return metrics
**/
@ApiModelProperty(required = true, value = "")
@JsonProperty(JSON_PROPERTY_METRICS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public List getMetrics() {
return metrics;
}
@JsonProperty(JSON_PROPERTY_METRICS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setMetrics(List metrics) {
this.metrics = metrics;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
MetricFamily metricFamily = (MetricFamily) o;
return Objects.equals(this.name, metricFamily.name) &&
Objects.equals(this.type, metricFamily.type) &&
Objects.equals(this.unit, metricFamily.unit) &&
Objects.equals(this.help, metricFamily.help) &&
Objects.equals(this.metrics, metricFamily.metrics);
}
@Override
public int hashCode() {
return Objects.hash(name, type, unit, help, metrics);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class MetricFamily {\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" unit: ").append(toIndentedString(unit)).append("\n");
sb.append(" help: ").append(toIndentedString(help)).append("\n");
sb.append(" metrics: ").append(toIndentedString(metrics)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy