com.factset.sdk.FactSetGlobalPrices.models.Price Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of factsetglobalprices Show documentation
Show all versions of factsetglobalprices Show documentation
FactSet SDK for Java - factsetglobalprices
/*
* FactSet Global Prices API
* The FactSet Global Prices API provides end of day market pricing content using cloud and microservices technology, encompassing both pricing as well as corporate actions and events data.
*
* The version of the OpenAPI document: 1.7.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.FactSetGlobalPrices.models;
import java.util.Map;
import java.util.HashMap;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
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 java.time.LocalDate;
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.FactSetGlobalPrices.JSON;
/**
* Price
*/
@JsonPropertyOrder({
Price.JSON_PROPERTY_FSYM_ID,
Price.JSON_PROPERTY_DATE,
Price.JSON_PROPERTY_CURRENCY,
Price.JSON_PROPERTY_REQUEST_ID
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class Price implements Serializable {
private static final long serialVersionUID = 1L;
public static final String JSON_PROPERTY_FSYM_ID = "fsymId";
private JsonNullable fsymId = JsonNullable.undefined();
public static final String JSON_PROPERTY_DATE = "date";
private JsonNullable date = JsonNullable.undefined();
public static final String JSON_PROPERTY_CURRENCY = "currency";
private JsonNullable currency = JsonNullable.undefined();
public static final String JSON_PROPERTY_REQUEST_ID = "requestId";
private String requestId;
public Price() {
}
public Price fsymId(String fsymId) {
this.fsymId = JsonNullable.of(fsymId);
return this;
}
/**
* FactSet Permanent Identifier. Six alpha-numeric characters, excluding vowels, with an -R suffix (XXXXXX-R) or a -L Suffix (XXXXXX-L).
* @return fsymId
**/
@jakarta.annotation.Nullable
@ApiModelProperty(example = "LCV42P-L", value = "FactSet Permanent Identifier. Six alpha-numeric characters, excluding vowels, with an -R suffix (XXXXXX-R) or a -L Suffix (XXXXXX-L).")
@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 Price date(LocalDate date) {
this.date = JsonNullable.of(date);
return this;
}
/**
* Ending date for the period expressed in YYYY-MM-DD format.
* @return date
**/
@jakarta.annotation.Nullable
@ApiModelProperty(example = "Thu Nov 19 00:00:00 UTC 2020", value = "Ending date for the period expressed in YYYY-MM-DD format.")
@JsonIgnore
public LocalDate getDate() {
return date.orElse(null);
}
@JsonProperty(JSON_PROPERTY_DATE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getDate_JsonNullable() {
return date;
}
@JsonProperty(JSON_PROPERTY_DATE)
public void setDate_JsonNullable(JsonNullable date) {
this.date = date;
}
public void setDate(LocalDate date) {
this.date = JsonNullable.of(date);
}
public Price currency(String currency) {
this.currency = JsonNullable.of(currency);
return this;
}
/**
* Currency ISO code. For more details, visit [Online Assistant Page #1470](https://oa.apps.factset.com/pages/1470).
* @return currency
**/
@jakarta.annotation.Nullable
@ApiModelProperty(example = "USD", value = "Currency ISO code. For more details, visit [Online Assistant Page #1470](https://oa.apps.factset.com/pages/1470).")
@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 Price requestId(String requestId) {
this.requestId = requestId;
return this;
}
/**
* Identifier that was used for the request.
* @return requestId
**/
@jakarta.annotation.Nullable
@ApiModelProperty(example = "DDD-USA", value = "Identifier that was used for the request.")
@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;
}
/**
* A container for additional, undeclared properties.
* This is a holder for any undeclared properties as specified with
* the 'additionalProperties' keyword in the OAS document.
*/
private Map additionalProperties;
/**
* Set the additional (undeclared) property with the specified name and value.
* If the property does not already exist, create it otherwise replace it.
*/
@JsonAnySetter
public Price putAdditionalProperty(String key, Object value) {
if (this.additionalProperties == null) {
this.additionalProperties = new HashMap();
}
this.additionalProperties.put(key, value);
return this;
}
/**
* Return the additional (undeclared) property.
*/
@JsonAnyGetter
public Map getAdditionalProperties() {
return additionalProperties;
}
/**
* Return the additional (undeclared) property with the specified name.
*/
public Object getAdditionalProperty(String key) {
if (this.additionalProperties == null) {
return null;
}
return this.additionalProperties.get(key);
}
/**
* Return true if this price object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Price price = (Price) o;
return equalsNullable(this.fsymId, price.fsymId) &&
equalsNullable(this.date, price.date) &&
equalsNullable(this.currency, price.currency) &&
Objects.equals(this.requestId, price.requestId)&&
Objects.equals(this.additionalProperties, price.additionalProperties);
}
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(fsymId), hashCodeNullable(date), hashCodeNullable(currency), requestId, additionalProperties);
}
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 Price {\n");
sb.append(" fsymId: ").append(toIndentedString(fsymId)).append("\n");
sb.append(" date: ").append(toIndentedString(date)).append("\n");
sb.append(" currency: ").append(toIndentedString(currency)).append("\n");
sb.append(" requestId: ").append(toIndentedString(requestId)).append("\n");
sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).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 ");
}
}