com.factset.sdk.FixedIncomeCalculation.models.FIJobSettings 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.FIAttributionForJobSettings;
import com.factset.sdk.FixedIncomeCalculation.models.FIBankLoans;
import com.factset.sdk.FixedIncomeCalculation.models.FIMarketEnvironment;
import com.factset.sdk.FixedIncomeCalculation.models.FIMunicipalBondsForJobSettings;
import com.factset.sdk.FixedIncomeCalculation.models.FIStructuredProductsForJobSettings;
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;
/**
* FIJobSettings
*/
@JsonPropertyOrder({
FIJobSettings.JSON_PROPERTY_AS_OF_DATE,
FIJobSettings.JSON_PROPERTY_PARTIAL_DURATION_MONTHS,
FIJobSettings.JSON_PROPERTY_CALL_METHOD,
FIJobSettings.JSON_PROPERTY_SETTLEMENT,
FIJobSettings.JSON_PROPERTY_CALC_FROM_METHOD,
FIJobSettings.JSON_PROPERTY_BANK_LOANS,
FIJobSettings.JSON_PROPERTY_MUNICIPAL_BONDS,
FIJobSettings.JSON_PROPERTY_MARKET_ENVIRONMENT,
FIJobSettings.JSON_PROPERTY_STRUCTURED_PRODUCTS,
FIJobSettings.JSON_PROPERTY_ATTRIBUTION
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class FIJobSettings implements Serializable {
private static final long serialVersionUID = 1L;
public static final String JSON_PROPERTY_AS_OF_DATE = "asOfDate";
private String asOfDate;
public static final String JSON_PROPERTY_PARTIAL_DURATION_MONTHS = "partialDurationMonths";
private JsonNullable> partialDurationMonths = JsonNullable.>undefined();
/**
* Call Method
*/
public enum CallMethodEnum {
NO_CALL("No Call"),
INTRINSIC_VALUE("Intrinsic Value"),
FIRST_CALL("First Call"),
FIRST_PAR("First Par");
private String value;
CallMethodEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static CallMethodEnum fromValue(String value) {
for (CallMethodEnum b : CallMethodEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
return null;
}
}
public static final String JSON_PROPERTY_CALL_METHOD = "callMethod";
private JsonNullable callMethod = JsonNullable.undefined();
public static final String JSON_PROPERTY_SETTLEMENT = "settlement";
private JsonNullable settlement = JsonNullable.undefined();
public static final String JSON_PROPERTY_CALC_FROM_METHOD = "calcFromMethod";
private JsonNullable calcFromMethod = JsonNullable.undefined();
public static final String JSON_PROPERTY_BANK_LOANS = "bankLoans";
private FIBankLoans bankLoans;
public static final String JSON_PROPERTY_MUNICIPAL_BONDS = "municipalBonds";
private FIMunicipalBondsForJobSettings municipalBonds;
public static final String JSON_PROPERTY_MARKET_ENVIRONMENT = "marketEnvironment";
private FIMarketEnvironment marketEnvironment;
public static final String JSON_PROPERTY_STRUCTURED_PRODUCTS = "structuredProducts";
private FIStructuredProductsForJobSettings structuredProducts;
public static final String JSON_PROPERTY_ATTRIBUTION = "attribution";
private FIAttributionForJobSettings attribution;
public FIJobSettings() {
}
@JsonCreator
public FIJobSettings(
@JsonProperty(value=JSON_PROPERTY_AS_OF_DATE, required=true) String asOfDate
) {
this();
this.asOfDate = asOfDate;
}
public FIJobSettings asOfDate(String asOfDate) {
this.asOfDate = asOfDate;
return this;
}
/**
* As of date
* @return asOfDate
**/
@jakarta.annotation.Nonnull
@ApiModelProperty(required = true, value = "As of date")
@JsonProperty(JSON_PROPERTY_AS_OF_DATE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getAsOfDate() {
return asOfDate;
}
@JsonProperty(JSON_PROPERTY_AS_OF_DATE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setAsOfDate(String asOfDate) {
this.asOfDate = asOfDate;
}
public FIJobSettings partialDurationMonths(java.util.List partialDurationMonths) {
this.partialDurationMonths = JsonNullable.>of(partialDurationMonths);
return this;
}
public FIJobSettings addPartialDurationMonthsItem(Integer partialDurationMonthsItem) {
if (this.partialDurationMonths == null || !this.partialDurationMonths.isPresent()) {
this.partialDurationMonths = JsonNullable.>of(new java.util.ArrayList<>());
}
try {
this.partialDurationMonths.get().add(partialDurationMonthsItem);
} catch (java.util.NoSuchElementException e) {
// this can never happen, as we make sure above that the value is present
}
return this;
}
/**
* Partial duration months
* @return partialDurationMonths
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = "Partial duration months")
@JsonIgnore
public java.util.List getPartialDurationMonths() {
return partialDurationMonths.orElse(null);
}
@JsonProperty(JSON_PROPERTY_PARTIAL_DURATION_MONTHS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable> getPartialDurationMonths_JsonNullable() {
return partialDurationMonths;
}
@JsonProperty(JSON_PROPERTY_PARTIAL_DURATION_MONTHS)
public void setPartialDurationMonths_JsonNullable(JsonNullable> partialDurationMonths) {
this.partialDurationMonths = partialDurationMonths;
}
public void setPartialDurationMonths(java.util.List partialDurationMonths) {
this.partialDurationMonths = JsonNullable.>of(partialDurationMonths);
}
public FIJobSettings callMethod(CallMethodEnum callMethod) {
this.callMethod = JsonNullable.of(callMethod);
return this;
}
/**
* Call Method
* @return callMethod
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = "Call Method")
@JsonIgnore
public CallMethodEnum getCallMethod() {
return callMethod.orElse(null);
}
@JsonProperty(JSON_PROPERTY_CALL_METHOD)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getCallMethod_JsonNullable() {
return callMethod;
}
@JsonProperty(JSON_PROPERTY_CALL_METHOD)
public void setCallMethod_JsonNullable(JsonNullable callMethod) {
this.callMethod = callMethod;
}
public void setCallMethod(CallMethodEnum callMethod) {
this.callMethod = JsonNullable.of(callMethod);
}
public FIJobSettings settlement(String settlement) {
this.settlement = JsonNullable.of(settlement);
return this;
}
/**
* Settlement Date
* @return settlement
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = "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);
}
public FIJobSettings calcFromMethod(String calcFromMethod) {
this.calcFromMethod = JsonNullable.of(calcFromMethod);
return this;
}
/**
* 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 = "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 FIJobSettings bankLoans(FIBankLoans bankLoans) {
this.bankLoans = bankLoans;
return this;
}
/**
* Get bankLoans
* @return bankLoans
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_BANK_LOANS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public FIBankLoans getBankLoans() {
return bankLoans;
}
@JsonProperty(JSON_PROPERTY_BANK_LOANS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setBankLoans(FIBankLoans bankLoans) {
this.bankLoans = bankLoans;
}
public FIJobSettings municipalBonds(FIMunicipalBondsForJobSettings municipalBonds) {
this.municipalBonds = municipalBonds;
return this;
}
/**
* Get municipalBonds
* @return municipalBonds
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_MUNICIPAL_BONDS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public FIMunicipalBondsForJobSettings getMunicipalBonds() {
return municipalBonds;
}
@JsonProperty(JSON_PROPERTY_MUNICIPAL_BONDS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMunicipalBonds(FIMunicipalBondsForJobSettings municipalBonds) {
this.municipalBonds = municipalBonds;
}
public FIJobSettings marketEnvironment(FIMarketEnvironment marketEnvironment) {
this.marketEnvironment = marketEnvironment;
return this;
}
/**
* Get marketEnvironment
* @return marketEnvironment
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_MARKET_ENVIRONMENT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public FIMarketEnvironment getMarketEnvironment() {
return marketEnvironment;
}
@JsonProperty(JSON_PROPERTY_MARKET_ENVIRONMENT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMarketEnvironment(FIMarketEnvironment marketEnvironment) {
this.marketEnvironment = marketEnvironment;
}
public FIJobSettings structuredProducts(FIStructuredProductsForJobSettings structuredProducts) {
this.structuredProducts = structuredProducts;
return this;
}
/**
* Get structuredProducts
* @return structuredProducts
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_STRUCTURED_PRODUCTS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public FIStructuredProductsForJobSettings getStructuredProducts() {
return structuredProducts;
}
@JsonProperty(JSON_PROPERTY_STRUCTURED_PRODUCTS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setStructuredProducts(FIStructuredProductsForJobSettings structuredProducts) {
this.structuredProducts = structuredProducts;
}
public FIJobSettings attribution(FIAttributionForJobSettings attribution) {
this.attribution = attribution;
return this;
}
/**
* Get attribution
* @return attribution
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_ATTRIBUTION)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public FIAttributionForJobSettings getAttribution() {
return attribution;
}
@JsonProperty(JSON_PROPERTY_ATTRIBUTION)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAttribution(FIAttributionForJobSettings attribution) {
this.attribution = attribution;
}
/**
* Return true if this FIJobSettings object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
FIJobSettings fiJobSettings = (FIJobSettings) o;
return Objects.equals(this.asOfDate, fiJobSettings.asOfDate) &&
equalsNullable(this.partialDurationMonths, fiJobSettings.partialDurationMonths) &&
equalsNullable(this.callMethod, fiJobSettings.callMethod) &&
equalsNullable(this.settlement, fiJobSettings.settlement) &&
equalsNullable(this.calcFromMethod, fiJobSettings.calcFromMethod) &&
Objects.equals(this.bankLoans, fiJobSettings.bankLoans) &&
Objects.equals(this.municipalBonds, fiJobSettings.municipalBonds) &&
Objects.equals(this.marketEnvironment, fiJobSettings.marketEnvironment) &&
Objects.equals(this.structuredProducts, fiJobSettings.structuredProducts) &&
Objects.equals(this.attribution, fiJobSettings.attribution);
}
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(asOfDate, hashCodeNullable(partialDurationMonths), hashCodeNullable(callMethod), hashCodeNullable(settlement), hashCodeNullable(calcFromMethod), bankLoans, municipalBonds, marketEnvironment, structuredProducts, attribution);
}
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 FIJobSettings {\n");
sb.append(" asOfDate: ").append(toIndentedString(asOfDate)).append("\n");
sb.append(" partialDurationMonths: ").append(toIndentedString(partialDurationMonths)).append("\n");
sb.append(" callMethod: ").append(toIndentedString(callMethod)).append("\n");
sb.append(" settlement: ").append(toIndentedString(settlement)).append("\n");
sb.append(" calcFromMethod: ").append(toIndentedString(calcFromMethod)).append("\n");
sb.append(" bankLoans: ").append(toIndentedString(bankLoans)).append("\n");
sb.append(" municipalBonds: ").append(toIndentedString(municipalBonds)).append("\n");
sb.append(" marketEnvironment: ").append(toIndentedString(marketEnvironment)).append("\n");
sb.append(" structuredProducts: ").append(toIndentedString(structuredProducts)).append("\n");
sb.append(" attribution: ").append(toIndentedString(attribution)).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 ");
}
}