jp.co.freee.accounting.models.ApprovalRequestCreateParamsRequestItems 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;
/**
* ApprovalRequestCreateParamsRequestItems
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class ApprovalRequestCreateParamsRequestItems {
public static final String SERIALIZED_NAME_ID = "id";
@SerializedName(SERIALIZED_NAME_ID)
private Integer id;
/**
* 項目タイプ(title: 申請タイトル, single_line: 自由記述形式 1行, multi_line: 自由記述形式 複数行, select: プルダウン, date: 日付, amount: 金額, receipt: 添付ファイル, section: 部門ID, partner: 取引先ID)
*/
@JsonAdapter(TypeEnum.Adapter.class)
public enum TypeEnum {
TITLE("title"),
SINGLE_LINE("single_line"),
MULTI_LINE("multi_line"),
SELECT("select"),
DATE("date"),
AMOUNT("amount"),
RECEIPT("receipt"),
SECTION("section"),
PARTNER("partner");
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 static final String SERIALIZED_NAME_VALUE = "value";
@SerializedName(SERIALIZED_NAME_VALUE)
private String value;
public ApprovalRequestCreateParamsRequestItems() {
}
public ApprovalRequestCreateParamsRequestItems id(Integer id) {
this.id = id;
return this;
}
/**
* 項目ID
* minimum: 1
* maximum: 2147483647
* @return id
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "1", value = "項目ID")
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public ApprovalRequestCreateParamsRequestItems type(TypeEnum type) {
this.type = type;
return this;
}
/**
* 項目タイプ(title: 申請タイトル, single_line: 自由記述形式 1行, multi_line: 自由記述形式 複数行, select: プルダウン, date: 日付, amount: 金額, receipt: 添付ファイル, section: 部門ID, partner: 取引先ID)
* @return type
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "項目タイプ(title: 申請タイトル, single_line: 自由記述形式 1行, multi_line: 自由記述形式 複数行, select: プルダウン, date: 日付, amount: 金額, receipt: 添付ファイル, section: 部門ID, partner: 取引先ID)")
public TypeEnum getType() {
return type;
}
public void setType(TypeEnum type) {
this.type = type;
}
public ApprovalRequestCreateParamsRequestItems value(String value) {
this.value = value;
return this;
}
/**
* 項目の値
* @return value
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "申請理由", value = "項目の値")
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ApprovalRequestCreateParamsRequestItems approvalRequestCreateParamsRequestItems = (ApprovalRequestCreateParamsRequestItems) o;
return Objects.equals(this.id, approvalRequestCreateParamsRequestItems.id) &&
Objects.equals(this.type, approvalRequestCreateParamsRequestItems.type) &&
Objects.equals(this.value, approvalRequestCreateParamsRequestItems.value);
}
@Override
public int hashCode() {
return Objects.hash(id, type, value);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ApprovalRequestCreateParamsRequestItems {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" value: ").append(toIndentedString(value)).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 ");
}
}