net.finmath.smartcontract.model.MarginResult Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of finmath-smart-derivative-contract Show documentation
Show all versions of finmath-smart-derivative-contract Show documentation
Project to support the implementation a of smart derivative contract.
package net.finmath.smartcontract.model;
import java.net.URI;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import java.math.BigDecimal;
import org.openapitools.jackson.nullable.JsonNullable;
import java.time.OffsetDateTime;
import jakarta.validation.Valid;
import jakarta.validation.constraints.*;
import io.swagger.v3.oas.annotations.media.Schema;
import java.util.*;
import jakarta.annotation.Generated;
/**
* MarginResult
*/
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-05T10:54:28.421239+01:00[Europe/Berlin]")
public class MarginResult {
@JsonProperty("value")
private BigDecimal value;
@JsonProperty("currency")
private String currency;
@JsonProperty("valuationDate")
private String valuationDate;
public MarginResult value(BigDecimal value) {
this.value = value;
return this;
}
/**
* Get value
* @return value
*/
@NotNull @Valid
@Schema(name = "value", requiredMode = Schema.RequiredMode.REQUIRED)
public BigDecimal getValue() {
return value;
}
public void setValue(BigDecimal value) {
this.value = value;
}
public MarginResult currency(String currency) {
this.currency = currency;
return this;
}
/**
* Get currency
* @return currency
*/
@NotNull
@Schema(name = "currency", requiredMode = Schema.RequiredMode.REQUIRED)
public String getCurrency() {
return currency;
}
public void setCurrency(String currency) {
this.currency = currency;
}
public MarginResult valuationDate(String valuationDate) {
this.valuationDate = valuationDate;
return this;
}
/**
* Get valuationDate
* @return valuationDate
*/
@NotNull
@Schema(name = "valuationDate", requiredMode = Schema.RequiredMode.REQUIRED)
public String getValuationDate() {
return valuationDate;
}
public void setValuationDate(String valuationDate) {
this.valuationDate = valuationDate;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
MarginResult marginResult = (MarginResult) o;
return Objects.equals(this.value, marginResult.value) &&
Objects.equals(this.currency, marginResult.currency) &&
Objects.equals(this.valuationDate, marginResult.valuationDate);
}
@Override
public int hashCode() {
return Objects.hash(value, currency, valuationDate);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class MarginResult {\n");
sb.append(" value: ").append(toIndentedString(value)).append("\n");
sb.append(" currency: ").append(toIndentedString(currency)).append("\n");
sb.append(" valuationDate: ").append(toIndentedString(valuationDate)).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 ");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy