jp.co.freee.accounting.models.JournalStatusResponseJournals 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;
/**
* JournalStatusResponseJournals
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class JournalStatusResponseJournals {
public static final String SERIALIZED_NAME_COMPANY_ID = "company_id";
@SerializedName(SERIALIZED_NAME_COMPANY_ID)
private Integer companyId;
/**
* ダウンロード形式
*/
@JsonAdapter(DownloadTypeEnum.Adapter.class)
public enum DownloadTypeEnum {
CSV("csv"),
GENERIC("generic"),
PDF("pdf");
private String value;
DownloadTypeEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static DownloadTypeEnum fromValue(String value) {
for (DownloadTypeEnum b : DownloadTypeEnum.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 DownloadTypeEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public DownloadTypeEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return DownloadTypeEnum.fromValue(value);
}
}
}
public static final String SERIALIZED_NAME_DOWNLOAD_TYPE = "download_type";
@SerializedName(SERIALIZED_NAME_DOWNLOAD_TYPE)
private DownloadTypeEnum downloadType;
public static final String SERIALIZED_NAME_DOWNLOAD_URL = "download_url";
@SerializedName(SERIALIZED_NAME_DOWNLOAD_URL)
private String downloadUrl;
public static final String SERIALIZED_NAME_END_DATE = "end_date";
@SerializedName(SERIALIZED_NAME_END_DATE)
private String endDate;
public static final String SERIALIZED_NAME_ID = "id";
@SerializedName(SERIALIZED_NAME_ID)
private Integer id;
public static final String SERIALIZED_NAME_START_DATE = "start_date";
@SerializedName(SERIALIZED_NAME_START_DATE)
private String startDate;
/**
* ダウンロードリクエストのステータス
*/
@JsonAdapter(StatusEnum.Adapter.class)
public enum StatusEnum {
ENQUEUED("enqueued"),
WORKING("working"),
UPLOADED("uploaded"),
FAILED("failed");
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;
/**
* 追加出力するID項目
*/
@JsonAdapter(VisibleIdsEnum.Adapter.class)
public enum VisibleIdsEnum {
DEAL_ID("deal_id"),
TRANSFER_ID("transfer_id"),
MANUAL_JOURNAL_ID("manual_journal_id");
private String value;
VisibleIdsEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static VisibleIdsEnum fromValue(String value) {
for (VisibleIdsEnum b : VisibleIdsEnum.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 VisibleIdsEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public VisibleIdsEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return VisibleIdsEnum.fromValue(value);
}
}
}
public static final String SERIALIZED_NAME_VISIBLE_IDS = "visible_ids";
@SerializedName(SERIALIZED_NAME_VISIBLE_IDS)
private List visibleIds = null;
/**
* 補助科目やコメントとして出力する項目
*/
@JsonAdapter(VisibleTagsEnum.Adapter.class)
public enum VisibleTagsEnum {
PARTNER("partner"),
ITEM("item"),
TAG("tag"),
SECTION("section"),
DESCRIPTION("description"),
WALLET_TXN_DESCRIPTION("wallet_txn_description"),
ALL("all"),
SEGMENT_1_TAG("segment_1_tag"),
SEGMENT_2_TAG("segment_2_tag"),
SEGMENT_3_TAG("segment_3_tag");
private String value;
VisibleTagsEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static VisibleTagsEnum fromValue(String value) {
for (VisibleTagsEnum b : VisibleTagsEnum.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 VisibleTagsEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public VisibleTagsEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return VisibleTagsEnum.fromValue(value);
}
}
}
public static final String SERIALIZED_NAME_VISIBLE_TAGS = "visible_tags";
@SerializedName(SERIALIZED_NAME_VISIBLE_TAGS)
private List visibleTags = null;
public JournalStatusResponseJournals() {
}
public JournalStatusResponseJournals 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 JournalStatusResponseJournals downloadType(DownloadTypeEnum downloadType) {
this.downloadType = downloadType;
return this;
}
/**
* ダウンロード形式
* @return downloadType
**/
@javax.annotation.Nonnull
@ApiModelProperty(example = "csv", required = true, value = "ダウンロード形式")
public DownloadTypeEnum getDownloadType() {
return downloadType;
}
public void setDownloadType(DownloadTypeEnum downloadType) {
this.downloadType = downloadType;
}
public JournalStatusResponseJournals downloadUrl(String downloadUrl) {
this.downloadUrl = downloadUrl;
return this;
}
/**
* ダウンロードURL
* @return downloadUrl
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "https://api.freee.co.jp/api/1/journals/reports/1/download", value = "ダウンロードURL")
public String getDownloadUrl() {
return downloadUrl;
}
public void setDownloadUrl(String downloadUrl) {
this.downloadUrl = downloadUrl;
}
public JournalStatusResponseJournals endDate(String endDate) {
this.endDate = endDate;
return this;
}
/**
* 取得終了日 (yyyy-mm-dd)
* @return endDate
**/
@javax.annotation.Nonnull
@ApiModelProperty(example = "2019-12-17", required = true, value = "取得終了日 (yyyy-mm-dd)")
public String getEndDate() {
return endDate;
}
public void setEndDate(String endDate) {
this.endDate = endDate;
}
public JournalStatusResponseJournals 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 JournalStatusResponseJournals startDate(String startDate) {
this.startDate = startDate;
return this;
}
/**
* 取得開始日 (yyyy-mm-dd)
* @return startDate
**/
@javax.annotation.Nonnull
@ApiModelProperty(example = "2019-12-17", required = true, value = "取得開始日 (yyyy-mm-dd)")
public String getStartDate() {
return startDate;
}
public void setStartDate(String startDate) {
this.startDate = startDate;
}
public JournalStatusResponseJournals status(StatusEnum status) {
this.status = status;
return this;
}
/**
* ダウンロードリクエストのステータス
* @return status
**/
@javax.annotation.Nonnull
@ApiModelProperty(example = "csv", required = true, value = "ダウンロードリクエストのステータス")
public StatusEnum getStatus() {
return status;
}
public void setStatus(StatusEnum status) {
this.status = status;
}
public JournalStatusResponseJournals visibleIds(List visibleIds) {
this.visibleIds = visibleIds;
return this;
}
public JournalStatusResponseJournals addVisibleIdsItem(VisibleIdsEnum visibleIdsItem) {
if (this.visibleIds == null) {
this.visibleIds = new ArrayList<>();
}
this.visibleIds.add(visibleIdsItem);
return this;
}
/**
* Get visibleIds
* @return visibleIds
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getVisibleIds() {
return visibleIds;
}
public void setVisibleIds(List visibleIds) {
this.visibleIds = visibleIds;
}
public JournalStatusResponseJournals visibleTags(List visibleTags) {
this.visibleTags = visibleTags;
return this;
}
public JournalStatusResponseJournals addVisibleTagsItem(VisibleTagsEnum visibleTagsItem) {
if (this.visibleTags == null) {
this.visibleTags = new ArrayList<>();
}
this.visibleTags.add(visibleTagsItem);
return this;
}
/**
* Get visibleTags
* @return visibleTags
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getVisibleTags() {
return visibleTags;
}
public void setVisibleTags(List visibleTags) {
this.visibleTags = visibleTags;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
JournalStatusResponseJournals journalStatusResponseJournals = (JournalStatusResponseJournals) o;
return Objects.equals(this.companyId, journalStatusResponseJournals.companyId) &&
Objects.equals(this.downloadType, journalStatusResponseJournals.downloadType) &&
Objects.equals(this.downloadUrl, journalStatusResponseJournals.downloadUrl) &&
Objects.equals(this.endDate, journalStatusResponseJournals.endDate) &&
Objects.equals(this.id, journalStatusResponseJournals.id) &&
Objects.equals(this.startDate, journalStatusResponseJournals.startDate) &&
Objects.equals(this.status, journalStatusResponseJournals.status) &&
Objects.equals(this.visibleIds, journalStatusResponseJournals.visibleIds) &&
Objects.equals(this.visibleTags, journalStatusResponseJournals.visibleTags);
}
@Override
public int hashCode() {
return Objects.hash(companyId, downloadType, downloadUrl, endDate, id, startDate, status, visibleIds, visibleTags);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class JournalStatusResponseJournals {\n");
sb.append(" companyId: ").append(toIndentedString(companyId)).append("\n");
sb.append(" downloadType: ").append(toIndentedString(downloadType)).append("\n");
sb.append(" downloadUrl: ").append(toIndentedString(downloadUrl)).append("\n");
sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append(" visibleIds: ").append(toIndentedString(visibleIds)).append("\n");
sb.append(" visibleTags: ").append(toIndentedString(visibleTags)).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 ");
}
}