com.factset.sdk.OpenRisk.models.SuccessResponseMeta Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of openrisk Show documentation
Show all versions of openrisk Show documentation
FactSet SDK for Java - openrisk
/*
* Open:Risk API
* Service to calculate parametric linear risk statistics and generate risk model asset identifier mappings.
*
* The version of the OpenAPI document: 1.24.0
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.factset.sdk.OpenRisk.models;
import java.util.Objects;
import java.util.Arrays;
import java.util.Map;
import java.util.HashMap;
import com.factset.sdk.OpenRisk.models.Labels;
import com.factset.sdk.OpenRisk.models.ResolvedDates;
import com.factset.sdk.OpenRisk.models.WarningItem;
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 org.openapitools.jackson.nullable.JsonNullable;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.openapitools.jackson.nullable.JsonNullable;
import java.util.NoSuchElementException;
import java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.factset.sdk.OpenRisk.JSON;
/**
* The 'meta' object in HTTP 200 success responses
*/
@ApiModel(description = "The 'meta' object in HTTP 200 success responses")
@JsonPropertyOrder({
SuccessResponseMeta.JSON_PROPERTY_LABELS,
SuccessResponseMeta.JSON_PROPERTY_RESOLVED_DATES,
SuccessResponseMeta.JSON_PROPERTY_WARNINGS
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class SuccessResponseMeta implements Serializable {
private static final long serialVersionUID = 1L;
public static final String JSON_PROPERTY_LABELS = "labels";
private JsonNullable labels = JsonNullable.undefined();
public static final String JSON_PROPERTY_RESOLVED_DATES = "resolvedDates";
private ResolvedDates resolvedDates;
public static final String JSON_PROPERTY_WARNINGS = "warnings";
private java.util.List warnings = null;
public SuccessResponseMeta() {
}
@JsonCreator
public SuccessResponseMeta(
@JsonProperty(value=JSON_PROPERTY_RESOLVED_DATES, required=true) ResolvedDates resolvedDates
) {
this();
this.resolvedDates = resolvedDates;
}
public SuccessResponseMeta labels(Labels labels) {
this.labels = JsonNullable.of(labels);
return this;
}
/**
* Get labels
* @return labels
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonIgnore
public Labels getLabels() {
return labels.orElse(null);
}
@JsonProperty(JSON_PROPERTY_LABELS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getLabels_JsonNullable() {
return labels;
}
@JsonProperty(JSON_PROPERTY_LABELS)
public void setLabels_JsonNullable(JsonNullable labels) {
this.labels = labels;
}
public void setLabels(Labels labels) {
this.labels = JsonNullable.of(labels);
}
public SuccessResponseMeta resolvedDates(ResolvedDates resolvedDates) {
this.resolvedDates = resolvedDates;
return this;
}
/**
* Get resolvedDates
* @return resolvedDates
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "")
@JsonProperty(JSON_PROPERTY_RESOLVED_DATES)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public ResolvedDates getResolvedDates() {
return resolvedDates;
}
@JsonProperty(JSON_PROPERTY_RESOLVED_DATES)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setResolvedDates(ResolvedDates resolvedDates) {
this.resolvedDates = resolvedDates;
}
public SuccessResponseMeta warnings(java.util.List warnings) {
this.warnings = warnings;
return this;
}
public SuccessResponseMeta addWarningsItem(WarningItem warningsItem) {
if (this.warnings == null) {
this.warnings = new java.util.ArrayList<>();
}
this.warnings.add(warningsItem);
return this;
}
/**
* Get warnings
* @return warnings
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_WARNINGS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public java.util.List getWarnings() {
return warnings;
}
@JsonProperty(JSON_PROPERTY_WARNINGS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setWarnings(java.util.List warnings) {
this.warnings = warnings;
}
/**
* Return true if this SuccessResponseMeta object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
SuccessResponseMeta successResponseMeta = (SuccessResponseMeta) o;
return equalsNullable(this.labels, successResponseMeta.labels) &&
Objects.equals(this.resolvedDates, successResponseMeta.resolvedDates) &&
Objects.equals(this.warnings, successResponseMeta.warnings);
}
private static boolean equalsNullable(JsonNullable a, JsonNullable b) {
return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get()));
}
@Override
public int hashCode() {
return Objects.hash(hashCodeNullable(labels), resolvedDates, warnings);
}
private static int hashCodeNullable(JsonNullable a) {
if (a == null) {
return 1;
}
return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class SuccessResponseMeta {\n");
sb.append(" labels: ").append(toIndentedString(labels)).append("\n");
sb.append(" resolvedDates: ").append(toIndentedString(resolvedDates)).append("\n");
sb.append(" warnings: ").append(toIndentedString(warnings)).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 ");
}
}