jp.co.freee.accounting.models.ExpenseApplicationActionCreateParams 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 org.openapitools.jackson.nullable.JsonNullable;
/**
* ExpenseApplicationActionCreateParams
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class ExpenseApplicationActionCreateParams {
/**
* 操作(approve: 承認する、force_approve: 代理承認する、cancel: 申請を取り消す、reject: 却下する、feedback: 申請者へ差し戻す、force_feedback: 承認済み・却下済みを取り消す)
*/
@JsonAdapter(ApprovalActionEnum.Adapter.class)
public enum ApprovalActionEnum {
APPROVE("approve"),
FORCE_APPROVE("force_approve"),
CANCEL("cancel"),
REJECT("reject"),
FEEDBACK("feedback"),
FORCE_FEEDBACK("force_feedback");
private String value;
ApprovalActionEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static ApprovalActionEnum fromValue(String value) {
for (ApprovalActionEnum b : ApprovalActionEnum.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 ApprovalActionEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public ApprovalActionEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return ApprovalActionEnum.fromValue(value);
}
}
}
public static final String SERIALIZED_NAME_APPROVAL_ACTION = "approval_action";
@SerializedName(SERIALIZED_NAME_APPROVAL_ACTION)
private ApprovalActionEnum approvalAction;
public static final String SERIALIZED_NAME_COMPANY_ID = "company_id";
@SerializedName(SERIALIZED_NAME_COMPANY_ID)
private Integer companyId;
public static final String SERIALIZED_NAME_NEXT_APPROVER_ID = "next_approver_id";
@SerializedName(SERIALIZED_NAME_NEXT_APPROVER_ID)
private Integer nextApproverId;
public static final String SERIALIZED_NAME_TARGET_ROUND = "target_round";
@SerializedName(SERIALIZED_NAME_TARGET_ROUND)
private Integer targetRound;
public static final String SERIALIZED_NAME_TARGET_STEP_ID = "target_step_id";
@SerializedName(SERIALIZED_NAME_TARGET_STEP_ID)
private Integer targetStepId;
public ExpenseApplicationActionCreateParams() {
}
public ExpenseApplicationActionCreateParams approvalAction(ApprovalActionEnum approvalAction) {
this.approvalAction = approvalAction;
return this;
}
/**
* 操作(approve: 承認する、force_approve: 代理承認する、cancel: 申請を取り消す、reject: 却下する、feedback: 申請者へ差し戻す、force_feedback: 承認済み・却下済みを取り消す)
* @return approvalAction
**/
@javax.annotation.Nonnull
@ApiModelProperty(example = "approve", required = true, value = "操作(approve: 承認する、force_approve: 代理承認する、cancel: 申請を取り消す、reject: 却下する、feedback: 申請者へ差し戻す、force_feedback: 承認済み・却下済みを取り消す)")
public ApprovalActionEnum getApprovalAction() {
return approvalAction;
}
public void setApprovalAction(ApprovalActionEnum approvalAction) {
this.approvalAction = approvalAction;
}
public ExpenseApplicationActionCreateParams 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 ExpenseApplicationActionCreateParams nextApproverId(Integer nextApproverId) {
this.nextApproverId = nextApproverId;
return this;
}
/**
* 次ステップの承認者のユーザーID
* minimum: 1
* maximum: 2147483647
* @return nextApproverId
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "1", value = "次ステップの承認者のユーザーID")
public Integer getNextApproverId() {
return nextApproverId;
}
public void setNextApproverId(Integer nextApproverId) {
this.nextApproverId = nextApproverId;
}
public ExpenseApplicationActionCreateParams targetRound(Integer targetRound) {
this.targetRound = targetRound;
return this;
}
/**
* 対象round。差し戻し等により申請がstepの最初からやり直しになるとroundの値が増えます。経費申請の取得APIレスポンス.current_roundを送信してください。
* minimum: 0
* maximum: 2147483647
* @return targetRound
**/
@javax.annotation.Nonnull
@ApiModelProperty(example = "1", required = true, value = "対象round。差し戻し等により申請がstepの最初からやり直しになるとroundの値が増えます。経費申請の取得APIレスポンス.current_roundを送信してください。")
public Integer getTargetRound() {
return targetRound;
}
public void setTargetRound(Integer targetRound) {
this.targetRound = targetRound;
}
public ExpenseApplicationActionCreateParams targetStepId(Integer targetStepId) {
this.targetStepId = targetStepId;
return this;
}
/**
* 対象承認ステップID 経費申請の取得APIレスポンス.current_step_idを送信してください。
* minimum: 1
* maximum: 2147483647
* @return targetStepId
**/
@javax.annotation.Nonnull
@ApiModelProperty(example = "1", required = true, value = "対象承認ステップID 経費申請の取得APIレスポンス.current_step_idを送信してください。")
public Integer getTargetStepId() {
return targetStepId;
}
public void setTargetStepId(Integer targetStepId) {
this.targetStepId = targetStepId;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ExpenseApplicationActionCreateParams expenseApplicationActionCreateParams = (ExpenseApplicationActionCreateParams) o;
return Objects.equals(this.approvalAction, expenseApplicationActionCreateParams.approvalAction) &&
Objects.equals(this.companyId, expenseApplicationActionCreateParams.companyId) &&
Objects.equals(this.nextApproverId, expenseApplicationActionCreateParams.nextApproverId) &&
Objects.equals(this.targetRound, expenseApplicationActionCreateParams.targetRound) &&
Objects.equals(this.targetStepId, expenseApplicationActionCreateParams.targetStepId);
}
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(approvalAction, companyId, nextApproverId, targetRound, targetStepId);
}
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 ExpenseApplicationActionCreateParams {\n");
sb.append(" approvalAction: ").append(toIndentedString(approvalAction)).append("\n");
sb.append(" companyId: ").append(toIndentedString(companyId)).append("\n");
sb.append(" nextApproverId: ").append(toIndentedString(nextApproverId)).append("\n");
sb.append(" targetRound: ").append(toIndentedString(targetRound)).append("\n");
sb.append(" targetStepId: ").append(toIndentedString(targetStepId)).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 ");
}
}