com.factset.sdk.FactSetOwnershipReportBuilder.models.Meta Maven / Gradle / Ivy
/*
* FactSet Ownership API
* description.md
*
* The version of the OpenAPI document: 1.1.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.FactSetOwnershipReportBuilder.models;
import java.util.Objects;
import java.util.Arrays;
import java.util.Map;
import java.util.HashMap;
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.FactSetOwnershipReportBuilder.JSON;
/**
* Standard Ownership response meta object. Contains metadata about the response at the root level.
*/
@ApiModel(description = "Standard Ownership response meta object. Contains metadata about the response at the root level.")
@JsonPropertyOrder({
Meta.JSON_PROPERTY_CURRENCY,
Meta.JSON_PROPERTY_FSYM_ID,
Meta.JSON_PROPERTY_NO_DATA,
Meta.JSON_PROPERTY_REQUEST_ID
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class Meta implements Serializable {
private static final long serialVersionUID = 1L;
public static final String JSON_PROPERTY_CURRENCY = "currency";
private JsonNullable currency = JsonNullable.undefined();
public static final String JSON_PROPERTY_FSYM_ID = "fsymId";
private JsonNullable fsymId = JsonNullable.undefined();
public static final String JSON_PROPERTY_NO_DATA = "noData";
private JsonNullable noData = JsonNullable.undefined();
public static final String JSON_PROPERTY_REQUEST_ID = "requestId";
private String requestId;
public Meta() {
}
public Meta currency(String currency) {
this.currency = JsonNullable.of(currency);
return this;
}
/**
* The currency ISO of the data which was returned
* @return currency
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = "The currency ISO of the data which was returned")
@JsonIgnore
public String getCurrency() {
return currency.orElse(null);
}
@JsonProperty(JSON_PROPERTY_CURRENCY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getCurrency_JsonNullable() {
return currency;
}
@JsonProperty(JSON_PROPERTY_CURRENCY)
public void setCurrency_JsonNullable(JsonNullable currency) {
this.currency = currency;
}
public void setCurrency(String currency) {
this.currency = JsonNullable.of(currency);
}
public Meta fsymId(String fsymId) {
this.fsymId = JsonNullable.of(fsymId);
return this;
}
/**
* The resolved fsymId that corresponds to the provided requestId
* @return fsymId
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = "The resolved fsymId that corresponds to the provided requestId")
@JsonIgnore
public String getFsymId() {
return fsymId.orElse(null);
}
@JsonProperty(JSON_PROPERTY_FSYM_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getFsymId_JsonNullable() {
return fsymId;
}
@JsonProperty(JSON_PROPERTY_FSYM_ID)
public void setFsymId_JsonNullable(JsonNullable fsymId) {
this.fsymId = fsymId;
}
public void setFsymId(String fsymId) {
this.fsymId = JsonNullable.of(fsymId);
}
public Meta noData(Boolean noData) {
this.noData = JsonNullable.of(noData);
return this;
}
/**
* Indicator of whether FactSet had data for this request
* @return noData
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = "Indicator of whether FactSet had data for this request")
@JsonIgnore
public Boolean getNoData() {
return noData.orElse(null);
}
@JsonProperty(JSON_PROPERTY_NO_DATA)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getNoData_JsonNullable() {
return noData;
}
@JsonProperty(JSON_PROPERTY_NO_DATA)
public void setNoData_JsonNullable(JsonNullable noData) {
this.noData = noData;
}
public void setNoData(Boolean noData) {
this.noData = JsonNullable.of(noData);
}
public Meta requestId(String requestId) {
this.requestId = requestId;
return this;
}
/**
* The identifier which was requested by the client
* @return requestId
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = "The identifier which was requested by the client")
@JsonProperty(JSON_PROPERTY_REQUEST_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getRequestId() {
return requestId;
}
@JsonProperty(JSON_PROPERTY_REQUEST_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setRequestId(String requestId) {
this.requestId = requestId;
}
/**
* Return true if this Meta object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Meta meta = (Meta) o;
return equalsNullable(this.currency, meta.currency) &&
equalsNullable(this.fsymId, meta.fsymId) &&
equalsNullable(this.noData, meta.noData) &&
Objects.equals(this.requestId, meta.requestId);
}
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(currency), hashCodeNullable(fsymId), hashCodeNullable(noData), requestId);
}
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 Meta {\n");
sb.append(" currency: ").append(toIndentedString(currency)).append("\n");
sb.append(" fsymId: ").append(toIndentedString(fsymId)).append("\n");
sb.append(" noData: ").append(toIndentedString(noData)).append("\n");
sb.append(" requestId: ").append(toIndentedString(requestId)).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 ");
}
}