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

jp.co.freee.accounting.models.ExpenseApplicationsIndexResponseExpenseApplications Maven / Gradle / Ivy

There is a newer version: 2.29.0
Show newest version
/*
 * freee API
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: v1.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 jp.co.freee.accounting.models;

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 io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import jp.co.freee.accounting.models.ExpenseApplicationsIndexResponseExpenseApplicationLines;
import org.openapitools.jackson.nullable.JsonNullable;

/**
 * ExpenseApplicationsIndexResponseExpenseApplications
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class ExpenseApplicationsIndexResponseExpenseApplications {
  public static final String SERIALIZED_NAME_APPLICANT_ID = "applicant_id";
  @SerializedName(SERIALIZED_NAME_APPLICANT_ID)
  private Integer applicantId;

  public static final String SERIALIZED_NAME_APPLICATION_NUMBER = "application_number";
  @SerializedName(SERIALIZED_NAME_APPLICATION_NUMBER)
  private String applicationNumber;

  public static final String SERIALIZED_NAME_COMPANY_ID = "company_id";
  @SerializedName(SERIALIZED_NAME_COMPANY_ID)
  private Integer companyId;

  public static final String SERIALIZED_NAME_CURRENT_ROUND = "current_round";
  @SerializedName(SERIALIZED_NAME_CURRENT_ROUND)
  private Integer currentRound;

  public static final String SERIALIZED_NAME_CURRENT_STEP_ID = "current_step_id";
  @SerializedName(SERIALIZED_NAME_CURRENT_STEP_ID)
  private Integer currentStepId;

  public static final String SERIALIZED_NAME_DEAL_ID = "deal_id";
  @SerializedName(SERIALIZED_NAME_DEAL_ID)
  private Integer dealId;

  /**
   * 取引ステータス (申請ステータス:statusがapprovedで、取引が存在する時のみdeal_statusが表示されます settled:精算済み, unsettled:清算待ち)
   */
  @JsonAdapter(DealStatusEnum.Adapter.class)
  public enum DealStatusEnum {
    SETTLED("settled"),
    
    UNSETTLED("unsettled");

    private String value;

    DealStatusEnum(String value) {
      this.value = value;
    }

    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    public static DealStatusEnum fromValue(String value) {
      for (DealStatusEnum b : DealStatusEnum.values()) {
        if (b.value.equals(value)) {
          return b;
        }
      }
      return null;
    }

    public static class Adapter extends TypeAdapter {
      @Override
      public void write(final JsonWriter jsonWriter, final DealStatusEnum enumeration) throws IOException {
        jsonWriter.value(enumeration.getValue());
      }

      @Override
      public DealStatusEnum read(final JsonReader jsonReader) throws IOException {
        String value =  jsonReader.nextString();
        return DealStatusEnum.fromValue(value);
      }
    }
  }

  public static final String SERIALIZED_NAME_DEAL_STATUS = "deal_status";
  @SerializedName(SERIALIZED_NAME_DEAL_STATUS)
  private DealStatusEnum dealStatus;

  public static final String SERIALIZED_NAME_DESCRIPTION = "description";
  @SerializedName(SERIALIZED_NAME_DESCRIPTION)
  private String description;

  public static final String SERIALIZED_NAME_EXPENSE_APPLICATION_LINES = "expense_application_lines";
  @SerializedName(SERIALIZED_NAME_EXPENSE_APPLICATION_LINES)
  private List expenseApplicationLines = new ArrayList<>();

  public static final String SERIALIZED_NAME_ID = "id";
  @SerializedName(SERIALIZED_NAME_ID)
  private Integer id;

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

  public static final String SERIALIZED_NAME_SECTION_ID = "section_id";
  @SerializedName(SERIALIZED_NAME_SECTION_ID)
  private Integer sectionId;

  public static final String SERIALIZED_NAME_SEGMENT1_TAG_ID = "segment_1_tag_id";
  @SerializedName(SERIALIZED_NAME_SEGMENT1_TAG_ID)
  private Long segment1TagId;

  public static final String SERIALIZED_NAME_SEGMENT2_TAG_ID = "segment_2_tag_id";
  @SerializedName(SERIALIZED_NAME_SEGMENT2_TAG_ID)
  private Long segment2TagId;

  public static final String SERIALIZED_NAME_SEGMENT3_TAG_ID = "segment_3_tag_id";
  @SerializedName(SERIALIZED_NAME_SEGMENT3_TAG_ID)
  private Long segment3TagId;

  /**
   * 申請ステータス(draft:下書き, in_progress:申請中, approved:承認済, rejected:却下, feedback:差戻し)
   */
  @JsonAdapter(StatusEnum.Adapter.class)
  public enum StatusEnum {
    DRAFT("draft"),
    
    IN_PROGRESS("in_progress"),
    
    APPROVED("approved"),
    
    REJECTED("rejected"),
    
    FEEDBACK("feedback");

    private String value;

    StatusEnum(String value) {
      this.value = value;
    }

    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    public static StatusEnum fromValue(String value) {
      for (StatusEnum b : StatusEnum.values()) {
        if (b.value.equals(value)) {
          return b;
        }
      }
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
    }

    public static class Adapter extends TypeAdapter {
      @Override
      public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException {
        jsonWriter.value(enumeration.getValue());
      }

      @Override
      public StatusEnum read(final JsonReader jsonReader) throws IOException {
        String value =  jsonReader.nextString();
        return StatusEnum.fromValue(value);
      }
    }
  }

  public static final String SERIALIZED_NAME_STATUS = "status";
  @SerializedName(SERIALIZED_NAME_STATUS)
  private StatusEnum status;

  public static final String SERIALIZED_NAME_TAG_IDS = "tag_ids";
  @SerializedName(SERIALIZED_NAME_TAG_IDS)
  private List tagIds = null;

  public static final String SERIALIZED_NAME_TITLE = "title";
  @SerializedName(SERIALIZED_NAME_TITLE)
  private String title;

  public static final String SERIALIZED_NAME_TOTAL_AMOUNT = "total_amount";
  @SerializedName(SERIALIZED_NAME_TOTAL_AMOUNT)
  private Integer totalAmount;

  public ExpenseApplicationsIndexResponseExpenseApplications() { 
  }

  public ExpenseApplicationsIndexResponseExpenseApplications applicantId(Integer applicantId) {
    
    this.applicantId = applicantId;
    return this;
  }

   /**
   * 申請者のユーザーID
   * minimum: 1
   * maximum: 2147483647
   * @return applicantId
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(example = "1", required = true, value = "申請者のユーザーID")

  public Integer getApplicantId() {
    return applicantId;
  }


  public void setApplicantId(Integer applicantId) {
    this.applicantId = applicantId;
  }


  public ExpenseApplicationsIndexResponseExpenseApplications applicationNumber(String applicationNumber) {
    
    this.applicationNumber = applicationNumber;
    return this;
  }

   /**
   * 申請No.
   * @return applicationNumber
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(example = "2", required = true, value = "申請No.")

  public String getApplicationNumber() {
    return applicationNumber;
  }


  public void setApplicationNumber(String applicationNumber) {
    this.applicationNumber = applicationNumber;
  }


  public ExpenseApplicationsIndexResponseExpenseApplications companyId(Integer companyId) {
    
    this.companyId = companyId;
    return this;
  }

   /**
   * 事業所ID
   * minimum: 1
   * maximum: 2147483647
   * @return companyId
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(example = "1", required = true, value = "事業所ID")

  public Integer getCompanyId() {
    return companyId;
  }


  public void setCompanyId(Integer companyId) {
    this.companyId = companyId;
  }


  public ExpenseApplicationsIndexResponseExpenseApplications currentRound(Integer currentRound) {
    
    this.currentRound = currentRound;
    return this;
  }

   /**
   * 現在のround。差し戻し等により申請がstepの最初からやり直しになるとroundの値が増えます。
   * minimum: 0
   * maximum: 2147483647
   * @return currentRound
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "1", value = "現在のround。差し戻し等により申請がstepの最初からやり直しになるとroundの値が増えます。")

  public Integer getCurrentRound() {
    return currentRound;
  }


  public void setCurrentRound(Integer currentRound) {
    this.currentRound = currentRound;
  }


  public ExpenseApplicationsIndexResponseExpenseApplications currentStepId(Integer currentStepId) {
    
    this.currentStepId = currentStepId;
    return this;
  }

   /**
   * 現在承認ステップID
   * minimum: 1
   * maximum: 2147483647
   * @return currentStepId
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "1", value = "現在承認ステップID")

  public Integer getCurrentStepId() {
    return currentStepId;
  }


  public void setCurrentStepId(Integer currentStepId) {
    this.currentStepId = currentStepId;
  }


  public ExpenseApplicationsIndexResponseExpenseApplications dealId(Integer dealId) {
    
    this.dealId = dealId;
    return this;
  }

   /**
   * 取引ID (申請ステータス:statusがapprovedで、取引が存在する時のみdeal_idが表示されます)
   * minimum: 1
   * maximum: 2147483647
   * @return dealId
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "1", required = true, value = "取引ID (申請ステータス:statusがapprovedで、取引が存在する時のみdeal_idが表示されます)")

  public Integer getDealId() {
    return dealId;
  }


  public void setDealId(Integer dealId) {
    this.dealId = dealId;
  }


  public ExpenseApplicationsIndexResponseExpenseApplications dealStatus(DealStatusEnum dealStatus) {
    
    this.dealStatus = dealStatus;
    return this;
  }

   /**
   * 取引ステータス (申請ステータス:statusがapprovedで、取引が存在する時のみdeal_statusが表示されます settled:精算済み, unsettled:清算待ち)
   * @return dealStatus
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "settled", required = true, value = "取引ステータス (申請ステータス:statusがapprovedで、取引が存在する時のみdeal_statusが表示されます settled:精算済み, unsettled:清算待ち)")

  public DealStatusEnum getDealStatus() {
    return dealStatus;
  }


  public void setDealStatus(DealStatusEnum dealStatus) {
    this.dealStatus = dealStatus;
  }


  public ExpenseApplicationsIndexResponseExpenseApplications description(String description) {
    
    this.description = description;
    return this;
  }

   /**
   * 備考
   * @return description
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "◯◯連携先ID: cx12345", value = "備考")

  public String getDescription() {
    return description;
  }


  public void setDescription(String description) {
    this.description = description;
  }


  public ExpenseApplicationsIndexResponseExpenseApplications expenseApplicationLines(List expenseApplicationLines) {
    
    this.expenseApplicationLines = expenseApplicationLines;
    return this;
  }

  public ExpenseApplicationsIndexResponseExpenseApplications addExpenseApplicationLinesItem(ExpenseApplicationsIndexResponseExpenseApplicationLines expenseApplicationLinesItem) {
    this.expenseApplicationLines.add(expenseApplicationLinesItem);
    return this;
  }

   /**
   * 経費申請の項目行一覧(配列)
   * @return expenseApplicationLines
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(required = true, value = "経費申請の項目行一覧(配列)")

  public List getExpenseApplicationLines() {
    return expenseApplicationLines;
  }


  public void setExpenseApplicationLines(List expenseApplicationLines) {
    this.expenseApplicationLines = expenseApplicationLines;
  }


  public ExpenseApplicationsIndexResponseExpenseApplications id(Integer id) {
    
    this.id = id;
    return this;
  }

   /**
   * 経費申請ID
   * minimum: 1
   * maximum: 2147483647
   * @return id
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(example = "1", required = true, value = "経費申請ID")

  public Integer getId() {
    return id;
  }


  public void setId(Integer id) {
    this.id = id;
  }


  public ExpenseApplicationsIndexResponseExpenseApplications issueDate(String issueDate) {
    
    this.issueDate = issueDate;
    return this;
  }

   /**
   * 申請日 (yyyy-mm-dd)
   * @return issueDate
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(example = "2019-12-17", required = true, value = "申請日 (yyyy-mm-dd)")

  public String getIssueDate() {
    return issueDate;
  }


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


  public ExpenseApplicationsIndexResponseExpenseApplications sectionId(Integer sectionId) {
    
    this.sectionId = sectionId;
    return this;
  }

   /**
   * 部門ID
   * minimum: 1
   * maximum: 2147483647
   * @return sectionId
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "101", value = "部門ID")

  public Integer getSectionId() {
    return sectionId;
  }


  public void setSectionId(Integer sectionId) {
    this.sectionId = sectionId;
  }


  public ExpenseApplicationsIndexResponseExpenseApplications segment1TagId(Long segment1TagId) {
    
    this.segment1TagId = segment1TagId;
    return this;
  }

   /**
   * セグメント1ID
   * minimum: 1
   * maximum: 9223372036854775807
   * @return segment1TagId
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "1", value = "セグメント1ID")

  public Long getSegment1TagId() {
    return segment1TagId;
  }


  public void setSegment1TagId(Long segment1TagId) {
    this.segment1TagId = segment1TagId;
  }


  public ExpenseApplicationsIndexResponseExpenseApplications segment2TagId(Long segment2TagId) {
    
    this.segment2TagId = segment2TagId;
    return this;
  }

   /**
   * セグメント2ID
   * minimum: 1
   * maximum: 9223372036854775807
   * @return segment2TagId
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "2", value = "セグメント2ID")

  public Long getSegment2TagId() {
    return segment2TagId;
  }


  public void setSegment2TagId(Long segment2TagId) {
    this.segment2TagId = segment2TagId;
  }


  public ExpenseApplicationsIndexResponseExpenseApplications segment3TagId(Long segment3TagId) {
    
    this.segment3TagId = segment3TagId;
    return this;
  }

   /**
   * セグメント3ID
   * minimum: 1
   * maximum: 9223372036854775807
   * @return segment3TagId
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "3", value = "セグメント3ID")

  public Long getSegment3TagId() {
    return segment3TagId;
  }


  public void setSegment3TagId(Long segment3TagId) {
    this.segment3TagId = segment3TagId;
  }


  public ExpenseApplicationsIndexResponseExpenseApplications status(StatusEnum status) {
    
    this.status = status;
    return this;
  }

   /**
   * 申請ステータス(draft:下書き, in_progress:申請中, approved:承認済, rejected:却下, feedback:差戻し)
   * @return status
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(example = "draft", required = true, value = "申請ステータス(draft:下書き, in_progress:申請中, approved:承認済, rejected:却下, feedback:差戻し)")

  public StatusEnum getStatus() {
    return status;
  }


  public void setStatus(StatusEnum status) {
    this.status = status;
  }


  public ExpenseApplicationsIndexResponseExpenseApplications tagIds(List tagIds) {
    
    this.tagIds = tagIds;
    return this;
  }

  public ExpenseApplicationsIndexResponseExpenseApplications addTagIdsItem(Integer tagIdsItem) {
    if (this.tagIds == null) {
      this.tagIds = new ArrayList<>();
    }
    this.tagIds.add(tagIdsItem);
    return this;
  }

   /**
   * メモタグID
   * @return tagIds
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "メモタグID")

  public List getTagIds() {
    return tagIds;
  }


  public void setTagIds(List tagIds) {
    this.tagIds = tagIds;
  }


  public ExpenseApplicationsIndexResponseExpenseApplications title(String title) {
    
    this.title = title;
    return this;
  }

   /**
   * 申請タイトル
   * @return title
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(example = "大阪出張", required = true, value = "申請タイトル")

  public String getTitle() {
    return title;
  }


  public void setTitle(String title) {
    this.title = title;
  }


  public ExpenseApplicationsIndexResponseExpenseApplications totalAmount(Integer totalAmount) {
    
    this.totalAmount = totalAmount;
    return this;
  }

   /**
   * 合計金額
   * @return totalAmount
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "30000", value = "合計金額")

  public Integer getTotalAmount() {
    return totalAmount;
  }


  public void setTotalAmount(Integer totalAmount) {
    this.totalAmount = totalAmount;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ExpenseApplicationsIndexResponseExpenseApplications expenseApplicationsIndexResponseExpenseApplications = (ExpenseApplicationsIndexResponseExpenseApplications) o;
    return Objects.equals(this.applicantId, expenseApplicationsIndexResponseExpenseApplications.applicantId) &&
        Objects.equals(this.applicationNumber, expenseApplicationsIndexResponseExpenseApplications.applicationNumber) &&
        Objects.equals(this.companyId, expenseApplicationsIndexResponseExpenseApplications.companyId) &&
        Objects.equals(this.currentRound, expenseApplicationsIndexResponseExpenseApplications.currentRound) &&
        Objects.equals(this.currentStepId, expenseApplicationsIndexResponseExpenseApplications.currentStepId) &&
        Objects.equals(this.dealId, expenseApplicationsIndexResponseExpenseApplications.dealId) &&
        Objects.equals(this.dealStatus, expenseApplicationsIndexResponseExpenseApplications.dealStatus) &&
        Objects.equals(this.description, expenseApplicationsIndexResponseExpenseApplications.description) &&
        Objects.equals(this.expenseApplicationLines, expenseApplicationsIndexResponseExpenseApplications.expenseApplicationLines) &&
        Objects.equals(this.id, expenseApplicationsIndexResponseExpenseApplications.id) &&
        Objects.equals(this.issueDate, expenseApplicationsIndexResponseExpenseApplications.issueDate) &&
        Objects.equals(this.sectionId, expenseApplicationsIndexResponseExpenseApplications.sectionId) &&
        Objects.equals(this.segment1TagId, expenseApplicationsIndexResponseExpenseApplications.segment1TagId) &&
        Objects.equals(this.segment2TagId, expenseApplicationsIndexResponseExpenseApplications.segment2TagId) &&
        Objects.equals(this.segment3TagId, expenseApplicationsIndexResponseExpenseApplications.segment3TagId) &&
        Objects.equals(this.status, expenseApplicationsIndexResponseExpenseApplications.status) &&
        Objects.equals(this.tagIds, expenseApplicationsIndexResponseExpenseApplications.tagIds) &&
        Objects.equals(this.title, expenseApplicationsIndexResponseExpenseApplications.title) &&
        Objects.equals(this.totalAmount, expenseApplicationsIndexResponseExpenseApplications.totalAmount);
  }

  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(applicantId, applicationNumber, companyId, currentRound, currentStepId, dealId, dealStatus, description, expenseApplicationLines, id, issueDate, sectionId, segment1TagId, segment2TagId, segment3TagId, status, tagIds, title, totalAmount);
  }

  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 ExpenseApplicationsIndexResponseExpenseApplications {\n");
    sb.append("    applicantId: ").append(toIndentedString(applicantId)).append("\n");
    sb.append("    applicationNumber: ").append(toIndentedString(applicationNumber)).append("\n");
    sb.append("    companyId: ").append(toIndentedString(companyId)).append("\n");
    sb.append("    currentRound: ").append(toIndentedString(currentRound)).append("\n");
    sb.append("    currentStepId: ").append(toIndentedString(currentStepId)).append("\n");
    sb.append("    dealId: ").append(toIndentedString(dealId)).append("\n");
    sb.append("    dealStatus: ").append(toIndentedString(dealStatus)).append("\n");
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
    sb.append("    expenseApplicationLines: ").append(toIndentedString(expenseApplicationLines)).append("\n");
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    issueDate: ").append(toIndentedString(issueDate)).append("\n");
    sb.append("    sectionId: ").append(toIndentedString(sectionId)).append("\n");
    sb.append("    segment1TagId: ").append(toIndentedString(segment1TagId)).append("\n");
    sb.append("    segment2TagId: ").append(toIndentedString(segment2TagId)).append("\n");
    sb.append("    segment3TagId: ").append(toIndentedString(segment3TagId)).append("\n");
    sb.append("    status: ").append(toIndentedString(status)).append("\n");
    sb.append("    tagIds: ").append(toIndentedString(tagIds)).append("\n");
    sb.append("    title: ").append(toIndentedString(title)).append("\n");
    sb.append("    totalAmount: ").append(toIndentedString(totalAmount)).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 - 2024 Weber Informatics LLC | Privacy Policy