All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.finmath.smartcontract.model.CashflowPeriod Maven / Gradle / Ivy

There is a newer version: 1.0.6
Show newest version
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.time.OffsetDateTime;
import net.finmath.smartcontract.model.ValueResult;
import org.springframework.format.annotation.DateTimeFormat;
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;

/**
 * CashflowPeriod
 */

@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-05T10:54:28.421239+01:00[Europe/Berlin]")
public class CashflowPeriod {

  @JsonProperty("periodStart")
  @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
  private OffsetDateTime periodStart;

  @JsonProperty("periodEnd")
  @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
  private OffsetDateTime periodEnd;

  @JsonProperty("fixingDate")
  @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
  private OffsetDateTime fixingDate;

  @JsonProperty("paymentDate")
  @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
  private OffsetDateTime paymentDate;

  @JsonProperty("cashflow")
  private ValueResult cashflow;

  @JsonProperty("rate")
  private Double rate;

  public CashflowPeriod periodStart(OffsetDateTime periodStart) {
    this.periodStart = periodStart;
    return this;
  }

  /**
   * Get periodStart
   * @return periodStart
  */
  @NotNull @Valid 
  @Schema(name = "periodStart", requiredMode = Schema.RequiredMode.REQUIRED)
  public OffsetDateTime getPeriodStart() {
    return periodStart;
  }

  public void setPeriodStart(OffsetDateTime periodStart) {
    this.periodStart = periodStart;
  }

  public CashflowPeriod periodEnd(OffsetDateTime periodEnd) {
    this.periodEnd = periodEnd;
    return this;
  }

  /**
   * Get periodEnd
   * @return periodEnd
  */
  @NotNull @Valid 
  @Schema(name = "periodEnd", requiredMode = Schema.RequiredMode.REQUIRED)
  public OffsetDateTime getPeriodEnd() {
    return periodEnd;
  }

  public void setPeriodEnd(OffsetDateTime periodEnd) {
    this.periodEnd = periodEnd;
  }

  public CashflowPeriod fixingDate(OffsetDateTime fixingDate) {
    this.fixingDate = fixingDate;
    return this;
  }

  /**
   * Get fixingDate
   * @return fixingDate
  */
  @NotNull @Valid 
  @Schema(name = "fixingDate", requiredMode = Schema.RequiredMode.REQUIRED)
  public OffsetDateTime getFixingDate() {
    return fixingDate;
  }

  public void setFixingDate(OffsetDateTime fixingDate) {
    this.fixingDate = fixingDate;
  }

  public CashflowPeriod paymentDate(OffsetDateTime paymentDate) {
    this.paymentDate = paymentDate;
    return this;
  }

  /**
   * Get paymentDate
   * @return paymentDate
  */
  @NotNull @Valid 
  @Schema(name = "paymentDate", requiredMode = Schema.RequiredMode.REQUIRED)
  public OffsetDateTime getPaymentDate() {
    return paymentDate;
  }

  public void setPaymentDate(OffsetDateTime paymentDate) {
    this.paymentDate = paymentDate;
  }

  public CashflowPeriod cashflow(ValueResult cashflow) {
    this.cashflow = cashflow;
    return this;
  }

  /**
   * Get cashflow
   * @return cashflow
  */
  @NotNull @Valid 
  @Schema(name = "cashflow", requiredMode = Schema.RequiredMode.REQUIRED)
  public ValueResult getCashflow() {
    return cashflow;
  }

  public void setCashflow(ValueResult cashflow) {
    this.cashflow = cashflow;
  }

  public CashflowPeriod rate(Double rate) {
    this.rate = rate;
    return this;
  }

  /**
   * Get rate
   * @return rate
  */
  @NotNull 
  @Schema(name = "rate", requiredMode = Schema.RequiredMode.REQUIRED)
  public Double getRate() {
    return rate;
  }

  public void setRate(Double rate) {
    this.rate = rate;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    CashflowPeriod cashflowPeriod = (CashflowPeriod) o;
    return Objects.equals(this.periodStart, cashflowPeriod.periodStart) &&
        Objects.equals(this.periodEnd, cashflowPeriod.periodEnd) &&
        Objects.equals(this.fixingDate, cashflowPeriod.fixingDate) &&
        Objects.equals(this.paymentDate, cashflowPeriod.paymentDate) &&
        Objects.equals(this.cashflow, cashflowPeriod.cashflow) &&
        Objects.equals(this.rate, cashflowPeriod.rate);
  }

  @Override
  public int hashCode() {
    return Objects.hash(periodStart, periodEnd, fixingDate, paymentDate, cashflow, rate);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class CashflowPeriod {\n");
    sb.append("    periodStart: ").append(toIndentedString(periodStart)).append("\n");
    sb.append("    periodEnd: ").append(toIndentedString(periodEnd)).append("\n");
    sb.append("    fixingDate: ").append(toIndentedString(fixingDate)).append("\n");
    sb.append("    paymentDate: ").append(toIndentedString(paymentDate)).append("\n");
    sb.append("    cashflow: ").append(toIndentedString(cashflow)).append("\n");
    sb.append("    rate: ").append(toIndentedString(rate)).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