com.factset.sdk.FixedIncomeCalculation.models.FIReferenceSecurity Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fixedincomecalculation Show documentation
Show all versions of fixedincomecalculation Show documentation
FactSet SDK for Java - fixedincomecalculation
The newest version!
/*
* FI API
* Allow clients to fetch Analytics through APIs.
*
* The version of the OpenAPI document: 3.13.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.FixedIncomeCalculation.models;
import java.util.Objects;
import java.util.Arrays;
import java.util.Map;
import java.util.HashMap;
import com.factset.sdk.FixedIncomeCalculation.models.FIReferencePrepay;
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.FixedIncomeCalculation.JSON;
/**
* FIReferenceSecurity
*/
@JsonPropertyOrder({
FIReferenceSecurity.JSON_PROPERTY_SECURITY_TYPE,
FIReferenceSecurity.JSON_PROPERTY_SECURITY_NAME,
FIReferenceSecurity.JSON_PROPERTY_CALC_FROM_METHOD,
FIReferenceSecurity.JSON_PROPERTY_CALC_FROM_VALUE,
FIReferenceSecurity.JSON_PROPERTY_PREPAY,
FIReferenceSecurity.JSON_PROPERTY_SETTLEMENT
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class FIReferenceSecurity implements Serializable {
private static final long serialVersionUID = 1L;
public static final String JSON_PROPERTY_SECURITY_TYPE = "securityType";
private JsonNullable securityType = JsonNullable.undefined();
public static final String JSON_PROPERTY_SECURITY_NAME = "securityName";
private JsonNullable securityName = JsonNullable.undefined();
public static final String JSON_PROPERTY_CALC_FROM_METHOD = "calcFromMethod";
private JsonNullable calcFromMethod = JsonNullable.undefined();
public static final String JSON_PROPERTY_CALC_FROM_VALUE = "calcFromValue";
private JsonNullable calcFromValue = JsonNullable.undefined();
public static final String JSON_PROPERTY_PREPAY = "prepay";
private FIReferencePrepay prepay;
public static final String JSON_PROPERTY_SETTLEMENT = "settlement";
private JsonNullable settlement = JsonNullable.undefined();
public FIReferenceSecurity() {
}
public FIReferenceSecurity securityType(String securityType) {
this.securityType = JsonNullable.of(securityType);
return this;
}
/**
* Reference Security Type
* @return securityType
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = "Reference Security Type")
@JsonIgnore
public String getSecurityType() {
return securityType.orElse(null);
}
@JsonProperty(JSON_PROPERTY_SECURITY_TYPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getSecurityType_JsonNullable() {
return securityType;
}
@JsonProperty(JSON_PROPERTY_SECURITY_TYPE)
public void setSecurityType_JsonNullable(JsonNullable securityType) {
this.securityType = securityType;
}
public void setSecurityType(String securityType) {
this.securityType = JsonNullable.of(securityType);
}
public FIReferenceSecurity securityName(String securityName) {
this.securityName = JsonNullable.of(securityName);
return this;
}
/**
* Reference Security Name
* @return securityName
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = "Reference Security Name")
@JsonIgnore
public String getSecurityName() {
return securityName.orElse(null);
}
@JsonProperty(JSON_PROPERTY_SECURITY_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getSecurityName_JsonNullable() {
return securityName;
}
@JsonProperty(JSON_PROPERTY_SECURITY_NAME)
public void setSecurityName_JsonNullable(JsonNullable securityName) {
this.securityName = securityName;
}
public void setSecurityName(String securityName) {
this.securityName = JsonNullable.of(securityName);
}
public FIReferenceSecurity calcFromMethod(String calcFromMethod) {
this.calcFromMethod = JsonNullable.of(calcFromMethod);
return this;
}
/**
* Reference Calculation Method. Methods : Active Spread, Actual Spread, Actual Spread To Worst Call, OAS, Price, Yield, Yield To No Call, Act/Act Yield To No Call, Bond Equivalent Yield, Yield To Worst Call, Discount Yield, Discount Margin, Implied Volatility, Bullet Spread, Bullet Spread To Worst Call, Pricing Matrix
* @return calcFromMethod
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = "Reference Calculation Method. Methods : Active Spread, Actual Spread, Actual Spread To Worst Call, OAS, Price, Yield, Yield To No Call, Act/Act Yield To No Call, Bond Equivalent Yield, Yield To Worst Call, Discount Yield, Discount Margin, Implied Volatility, Bullet Spread, Bullet Spread To Worst Call, Pricing Matrix")
@JsonIgnore
public String getCalcFromMethod() {
return calcFromMethod.orElse(null);
}
@JsonProperty(JSON_PROPERTY_CALC_FROM_METHOD)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getCalcFromMethod_JsonNullable() {
return calcFromMethod;
}
@JsonProperty(JSON_PROPERTY_CALC_FROM_METHOD)
public void setCalcFromMethod_JsonNullable(JsonNullable calcFromMethod) {
this.calcFromMethod = calcFromMethod;
}
public void setCalcFromMethod(String calcFromMethod) {
this.calcFromMethod = JsonNullable.of(calcFromMethod);
}
public FIReferenceSecurity calcFromValue(Double calcFromValue) {
this.calcFromValue = JsonNullable.of(calcFromValue);
return this;
}
/**
* Reference CalcFromValue
* @return calcFromValue
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = "Reference CalcFromValue")
@JsonIgnore
public Double getCalcFromValue() {
return calcFromValue.orElse(null);
}
@JsonProperty(JSON_PROPERTY_CALC_FROM_VALUE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getCalcFromValue_JsonNullable() {
return calcFromValue;
}
@JsonProperty(JSON_PROPERTY_CALC_FROM_VALUE)
public void setCalcFromValue_JsonNullable(JsonNullable calcFromValue) {
this.calcFromValue = calcFromValue;
}
public void setCalcFromValue(Double calcFromValue) {
this.calcFromValue = JsonNullable.of(calcFromValue);
}
public FIReferenceSecurity prepay(FIReferencePrepay prepay) {
this.prepay = prepay;
return this;
}
/**
* Get prepay
* @return prepay
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_PREPAY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public FIReferencePrepay getPrepay() {
return prepay;
}
@JsonProperty(JSON_PROPERTY_PREPAY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPrepay(FIReferencePrepay prepay) {
this.prepay = prepay;
}
public FIReferenceSecurity settlement(String settlement) {
this.settlement = JsonNullable.of(settlement);
return this;
}
/**
* Reference Settlement Date
* @return settlement
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = "Reference Settlement Date")
@JsonIgnore
public String getSettlement() {
return settlement.orElse(null);
}
@JsonProperty(JSON_PROPERTY_SETTLEMENT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getSettlement_JsonNullable() {
return settlement;
}
@JsonProperty(JSON_PROPERTY_SETTLEMENT)
public void setSettlement_JsonNullable(JsonNullable settlement) {
this.settlement = settlement;
}
public void setSettlement(String settlement) {
this.settlement = JsonNullable.of(settlement);
}
/**
* Return true if this FIReferenceSecurity object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
FIReferenceSecurity fiReferenceSecurity = (FIReferenceSecurity) o;
return equalsNullable(this.securityType, fiReferenceSecurity.securityType) &&
equalsNullable(this.securityName, fiReferenceSecurity.securityName) &&
equalsNullable(this.calcFromMethod, fiReferenceSecurity.calcFromMethod) &&
equalsNullable(this.calcFromValue, fiReferenceSecurity.calcFromValue) &&
Objects.equals(this.prepay, fiReferenceSecurity.prepay) &&
equalsNullable(this.settlement, fiReferenceSecurity.settlement);
}
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(securityType), hashCodeNullable(securityName), hashCodeNullable(calcFromMethod), hashCodeNullable(calcFromValue), prepay, hashCodeNullable(settlement));
}
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 FIReferenceSecurity {\n");
sb.append(" securityType: ").append(toIndentedString(securityType)).append("\n");
sb.append(" securityName: ").append(toIndentedString(securityName)).append("\n");
sb.append(" calcFromMethod: ").append(toIndentedString(calcFromMethod)).append("\n");
sb.append(" calcFromValue: ").append(toIndentedString(calcFromValue)).append("\n");
sb.append(" prepay: ").append(toIndentedString(prepay)).append("\n");
sb.append(" settlement: ").append(toIndentedString(settlement)).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 ");
}
}