jp.co.freee.accounting.models.DealUpdateParams Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of freee-accounting-sdk Show documentation
Show all versions of freee-accounting-sdk Show documentation
freee accounting client SDK for Java
/*
* 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.DealUpdateParamsDetails;
import org.openapitools.jackson.nullable.JsonNullable;
/**
* DealUpdateParams
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class DealUpdateParams {
public static final String SERIALIZED_NAME_COMPANY_ID = "company_id";
@SerializedName(SERIALIZED_NAME_COMPANY_ID)
private Integer companyId;
public static final String SERIALIZED_NAME_DETAILS = "details";
@SerializedName(SERIALIZED_NAME_DETAILS)
private List details = new ArrayList<>();
public static final String SERIALIZED_NAME_DUE_DATE = "due_date";
@SerializedName(SERIALIZED_NAME_DUE_DATE)
private String dueDate;
public static final String SERIALIZED_NAME_ISSUE_DATE = "issue_date";
@SerializedName(SERIALIZED_NAME_ISSUE_DATE)
private String issueDate;
public static final String SERIALIZED_NAME_PARTNER_CODE = "partner_code";
@SerializedName(SERIALIZED_NAME_PARTNER_CODE)
private String partnerCode;
public static final String SERIALIZED_NAME_PARTNER_ID = "partner_id";
@SerializedName(SERIALIZED_NAME_PARTNER_ID)
private Integer partnerId;
public static final String SERIALIZED_NAME_RECEIPT_IDS = "receipt_ids";
@SerializedName(SERIALIZED_NAME_RECEIPT_IDS)
private List receiptIds = null;
public static final String SERIALIZED_NAME_REF_NUMBER = "ref_number";
@SerializedName(SERIALIZED_NAME_REF_NUMBER)
private String refNumber;
/**
* 収支区分 (収入: income, 支出: expense)
*/
@JsonAdapter(TypeEnum.Adapter.class)
public enum TypeEnum {
INCOME("income"),
EXPENSE("expense");
private String value;
TypeEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static TypeEnum fromValue(String value) {
for (TypeEnum b : TypeEnum.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 TypeEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public TypeEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return TypeEnum.fromValue(value);
}
}
}
public static final String SERIALIZED_NAME_TYPE = "type";
@SerializedName(SERIALIZED_NAME_TYPE)
private TypeEnum type;
public DealUpdateParams() {
}
public DealUpdateParams 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 DealUpdateParams details(List details) {
this.details = details;
return this;
}
public DealUpdateParams addDetailsItem(DealUpdateParamsDetails detailsItem) {
this.details.add(detailsItem);
return this;
}
/**
* Get details
* @return details
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "")
public List getDetails() {
return details;
}
public void setDetails(List details) {
this.details = details;
}
public DealUpdateParams dueDate(String dueDate) {
this.dueDate = dueDate;
return this;
}
/**
* 支払期日(yyyy-mm-dd)
* @return dueDate
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "2019-12-17", value = "支払期日(yyyy-mm-dd)")
public String getDueDate() {
return dueDate;
}
public void setDueDate(String dueDate) {
this.dueDate = dueDate;
}
public DealUpdateParams 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 DealUpdateParams partnerCode(String partnerCode) {
this.partnerCode = partnerCode;
return this;
}
/**
* 取引先コード
* @return partnerCode
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "code001", value = "取引先コード")
public String getPartnerCode() {
return partnerCode;
}
public void setPartnerCode(String partnerCode) {
this.partnerCode = partnerCode;
}
public DealUpdateParams partnerId(Integer partnerId) {
this.partnerId = partnerId;
return this;
}
/**
* 取引先ID
* minimum: 1
* maximum: 2147483647
* @return partnerId
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "1", value = "取引先ID")
public Integer getPartnerId() {
return partnerId;
}
public void setPartnerId(Integer partnerId) {
this.partnerId = partnerId;
}
public DealUpdateParams receiptIds(List receiptIds) {
this.receiptIds = receiptIds;
return this;
}
public DealUpdateParams addReceiptIdsItem(Integer receiptIdsItem) {
if (this.receiptIds == null) {
this.receiptIds = new ArrayList<>();
}
this.receiptIds.add(receiptIdsItem);
return this;
}
/**
* 証憑ファイルID(ファイルボックスのファイルID)(配列)
* @return receiptIds
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "証憑ファイルID(ファイルボックスのファイルID)(配列)")
public List getReceiptIds() {
return receiptIds;
}
public void setReceiptIds(List receiptIds) {
this.receiptIds = receiptIds;
}
public DealUpdateParams refNumber(String refNumber) {
this.refNumber = refNumber;
return this;
}
/**
* 管理番号
* @return refNumber
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "1", value = "管理番号")
public String getRefNumber() {
return refNumber;
}
public void setRefNumber(String refNumber) {
this.refNumber = refNumber;
}
public DealUpdateParams type(TypeEnum type) {
this.type = type;
return this;
}
/**
* 収支区分 (収入: income, 支出: expense)
* @return type
**/
@javax.annotation.Nonnull
@ApiModelProperty(example = "income", required = true, value = "収支区分 (収入: income, 支出: expense)")
public TypeEnum getType() {
return type;
}
public void setType(TypeEnum type) {
this.type = type;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DealUpdateParams dealUpdateParams = (DealUpdateParams) o;
return Objects.equals(this.companyId, dealUpdateParams.companyId) &&
Objects.equals(this.details, dealUpdateParams.details) &&
Objects.equals(this.dueDate, dealUpdateParams.dueDate) &&
Objects.equals(this.issueDate, dealUpdateParams.issueDate) &&
Objects.equals(this.partnerCode, dealUpdateParams.partnerCode) &&
Objects.equals(this.partnerId, dealUpdateParams.partnerId) &&
Objects.equals(this.receiptIds, dealUpdateParams.receiptIds) &&
Objects.equals(this.refNumber, dealUpdateParams.refNumber) &&
Objects.equals(this.type, dealUpdateParams.type);
}
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(companyId, details, dueDate, issueDate, partnerCode, partnerId, receiptIds, refNumber, type);
}
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 DealUpdateParams {\n");
sb.append(" companyId: ").append(toIndentedString(companyId)).append("\n");
sb.append(" details: ").append(toIndentedString(details)).append("\n");
sb.append(" dueDate: ").append(toIndentedString(dueDate)).append("\n");
sb.append(" issueDate: ").append(toIndentedString(issueDate)).append("\n");
sb.append(" partnerCode: ").append(toIndentedString(partnerCode)).append("\n");
sb.append(" partnerId: ").append(toIndentedString(partnerId)).append("\n");
sb.append(" receiptIds: ").append(toIndentedString(receiptIds)).append("\n");
sb.append(" refNumber: ").append(toIndentedString(refNumber)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).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 ");
}
}