/*
 * The Plaid API
 * The Plaid REST API. Please see https://plaid.com/docs/api for more details.
 *
 * The version of the OpenAPI document: 2020-09-14_1.680.0
 * 
 *
 * 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.plaid.client.model;

import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import com.plaid.client.model.YieldRate;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.time.LocalDate;

/**
 * Details about the fixed income security.
 */
@ApiModel(description = "Details about the fixed income security.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-12-11T18:58:39.328614Z[Etc/UTC]")
public class FixedIncome {
  public static final String SERIALIZED_NAME_YIELD_RATE = "yield_rate";
  @SerializedName(SERIALIZED_NAME_YIELD_RATE)
  private YieldRate yieldRate;

  public static final String SERIALIZED_NAME_MATURITY_DATE = "maturity_date";
  @SerializedName(SERIALIZED_NAME_MATURITY_DATE)
  private LocalDate maturityDate;

  public static final String SERIALIZED_NAME_ISSUE_DATE = "issue_date";
  @SerializedName(SERIALIZED_NAME_ISSUE_DATE)
  private LocalDate issueDate;

  public static final String SERIALIZED_NAME_FACE_VALUE = "face_value";
  @SerializedName(SERIALIZED_NAME_FACE_VALUE)
  private Double faceValue;


  public FixedIncome yieldRate(YieldRate yieldRate) {
    
    this.yieldRate = yieldRate;
    return this;
  }

   /**
   * Get yieldRate
   * @return yieldRate
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(required = true, value = "")

  public YieldRate getYieldRate() {
    return yieldRate;
  }


  public void setYieldRate(YieldRate yieldRate) {
    this.yieldRate = yieldRate;
  }


  public FixedIncome maturityDate(LocalDate maturityDate) {
    
    this.maturityDate = maturityDate;
    return this;
  }

   /**
   * The maturity date for this fixed income security, in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format.
   * @return maturityDate
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(required = true, value = "The maturity date for this fixed income security, in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format.")

  public LocalDate getMaturityDate() {
    return maturityDate;
  }


  public void setMaturityDate(LocalDate maturityDate) {
    this.maturityDate = maturityDate;
  }


  public FixedIncome issueDate(LocalDate issueDate) {
    
    this.issueDate = issueDate;
    return this;
  }

   /**
   * The issue date for this fixed income security, in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format.
   * @return issueDate
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(required = true, value = "The issue date for this fixed income security, in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format.")

  public LocalDate getIssueDate() {
    return issueDate;
  }


  public void setIssueDate(LocalDate issueDate) {
    this.issueDate = issueDate;
  }


  public FixedIncome faceValue(Double faceValue) {
    
    this.faceValue = faceValue;
    return this;
  }

   /**
   * The face value that is paid upon maturity of the fixed income security, per unit of security.
   * @return faceValue
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(required = true, value = "The face value that is paid upon maturity of the fixed income security, per unit of security.")

  public Double getFaceValue() {
    return faceValue;
  }


  public void setFaceValue(Double faceValue) {
    this.faceValue = faceValue;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    FixedIncome fixedIncome = (FixedIncome) o;
    return Objects.equals(this.yieldRate, fixedIncome.yieldRate) &&
        Objects.equals(this.maturityDate, fixedIncome.maturityDate) &&
        Objects.equals(this.issueDate, fixedIncome.issueDate) &&
        Objects.equals(this.faceValue, fixedIncome.faceValue);
  }

  @Override
  public int hashCode() {
    return Objects.hash(yieldRate, maturityDate, issueDate, faceValue);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class FixedIncome {\n");
    sb.append("    yieldRate: ").append(toIndentedString(yieldRate)).append("\n");
    sb.append("    maturityDate: ").append(toIndentedString(maturityDate)).append("\n");
    sb.append("    issueDate: ").append(toIndentedString(issueDate)).append("\n");
    sb.append("    faceValue: ").append(toIndentedString(faceValue)).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    ");
  }

}

