jp.co.freee.accounting.models.ApprovalFlowRouteResponseApprovalFlowRoute 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.ApprovalFlowRouteResponseApprovalFlowRouteSteps;
import org.openapitools.jackson.nullable.JsonNullable;
/**
* ApprovalFlowRouteResponseApprovalFlowRoute
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class ApprovalFlowRouteResponseApprovalFlowRoute {
public static final String SERIALIZED_NAME_DEFINITION_SYSTEM = "definition_system";
@SerializedName(SERIALIZED_NAME_DEFINITION_SYSTEM)
private Boolean definitionSystem;
public static final String SERIALIZED_NAME_DESCRIPTION = "description";
@SerializedName(SERIALIZED_NAME_DESCRIPTION)
private String description;
public static final String SERIALIZED_NAME_FIRST_STEP_ID = "first_step_id";
@SerializedName(SERIALIZED_NAME_FIRST_STEP_ID)
private Integer firstStepId;
public static final String SERIALIZED_NAME_ID = "id";
@SerializedName(SERIALIZED_NAME_ID)
private Integer id;
public static final String SERIALIZED_NAME_NAME = "name";
@SerializedName(SERIALIZED_NAME_NAME)
private String name;
public static final String SERIALIZED_NAME_REQUEST_FORM_IDS = "request_form_ids";
@SerializedName(SERIALIZED_NAME_REQUEST_FORM_IDS)
private List requestFormIds = new ArrayList<>();
public static final String SERIALIZED_NAME_STEPS = "steps";
@SerializedName(SERIALIZED_NAME_STEPS)
private List steps = null;
/**
* Gets or Sets usages
*/
@JsonAdapter(UsagesEnum.Adapter.class)
public enum UsagesEnum {
TXNAPPROVAL("TxnApproval"),
EXPENSEAPPLICATION("ExpenseApplication"),
PAYMENTREQUEST("PaymentRequest"),
APPROVALREQUEST("ApprovalRequest"),
DOCAPPROVAL("DocApproval");
private String value;
UsagesEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static UsagesEnum fromValue(String value) {
for (UsagesEnum b : UsagesEnum.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 UsagesEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public UsagesEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return UsagesEnum.fromValue(value);
}
}
}
public static final String SERIALIZED_NAME_USAGES = "usages";
@SerializedName(SERIALIZED_NAME_USAGES)
private List usages = null;
public static final String SERIALIZED_NAME_USER_ID = "user_id";
@SerializedName(SERIALIZED_NAME_USER_ID)
private Integer userId;
public ApprovalFlowRouteResponseApprovalFlowRoute() {
}
public ApprovalFlowRouteResponseApprovalFlowRoute definitionSystem(Boolean definitionSystem) {
this.definitionSystem = definitionSystem;
return this;
}
/**
* システム作成の申請経路かどうか
* @return definitionSystem
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "true", value = "システム作成の申請経路かどうか")
public Boolean getDefinitionSystem() {
return definitionSystem;
}
public void setDefinitionSystem(Boolean definitionSystem) {
this.definitionSystem = definitionSystem;
}
public ApprovalFlowRouteResponseApprovalFlowRoute description(String description) {
this.description = description;
return this;
}
/**
* 申請経路の説明
* @return description
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "申請経路の説明", value = "申請経路の説明")
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public ApprovalFlowRouteResponseApprovalFlowRoute firstStepId(Integer firstStepId) {
this.firstStepId = firstStepId;
return this;
}
/**
* 最初の承認ステップのID
* minimum: 1
* maximum: 2147483647
* @return firstStepId
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "1", value = "最初の承認ステップのID")
public Integer getFirstStepId() {
return firstStepId;
}
public void setFirstStepId(Integer firstStepId) {
this.firstStepId = firstStepId;
}
public ApprovalFlowRouteResponseApprovalFlowRoute 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 ApprovalFlowRouteResponseApprovalFlowRoute name(String name) {
this.name = name;
return this;
}
/**
* 申請経路名
* @return name
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "申請経路", value = "申請経路名")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public ApprovalFlowRouteResponseApprovalFlowRoute requestFormIds(List requestFormIds) {
this.requestFormIds = requestFormIds;
return this;
}
public ApprovalFlowRouteResponseApprovalFlowRoute addRequestFormIdsItem(Integer requestFormIdsItem) {
this.requestFormIds.add(requestFormIdsItem);
return this;
}
/**
* 申請経路で利用できる申請フォームID配列
* @return requestFormIds
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "申請経路で利用できる申請フォームID配列")
public List getRequestFormIds() {
return requestFormIds;
}
public void setRequestFormIds(List requestFormIds) {
this.requestFormIds = requestFormIds;
}
public ApprovalFlowRouteResponseApprovalFlowRoute steps(List steps) {
this.steps = steps;
return this;
}
public ApprovalFlowRouteResponseApprovalFlowRoute addStepsItem(ApprovalFlowRouteResponseApprovalFlowRouteSteps stepsItem) {
if (this.steps == null) {
this.steps = new ArrayList<>();
}
this.steps.add(stepsItem);
return this;
}
/**
* 承認ステップ(配列)
* @return steps
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "承認ステップ(配列)")
public List getSteps() {
return steps;
}
public void setSteps(List steps) {
this.steps = steps;
}
public ApprovalFlowRouteResponseApprovalFlowRoute usages(List usages) {
this.usages = usages;
return this;
}
public ApprovalFlowRouteResponseApprovalFlowRoute addUsagesItem(UsagesEnum usagesItem) {
if (this.usages == null) {
this.usages = new ArrayList<>();
}
this.usages.add(usagesItem);
return this;
}
/**
* 申請種別(申請経路を使用できる申請種別を示します。例えば、ApprovalRequest の場合は、各種申請で使用できる申請経路です。) * `TxnApproval` - 仕訳承認 * `ExpenseApplication` - 経費精算 * `PaymentRequest` - 支払依頼 * `ApprovalRequest` - 各種申請 * `DocApproval` - 請求書等 (見積書・納品書・請求書・発注書)
* @return usages
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "申請種別(申請経路を使用できる申請種別を示します。例えば、ApprovalRequest の場合は、各種申請で使用できる申請経路です。) * `TxnApproval` - 仕訳承認 * `ExpenseApplication` - 経費精算 * `PaymentRequest` - 支払依頼 * `ApprovalRequest` - 各種申請 * `DocApproval` - 請求書等 (見積書・納品書・請求書・発注書)")
public List getUsages() {
return usages;
}
public void setUsages(List usages) {
this.usages = usages;
}
public ApprovalFlowRouteResponseApprovalFlowRoute userId(Integer userId) {
this.userId = userId;
return this;
}
/**
* 更新したユーザーのユーザーID
* minimum: 1
* maximum: 2147483647
* @return userId
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "1", value = "更新したユーザーのユーザーID")
public Integer getUserId() {
return userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ApprovalFlowRouteResponseApprovalFlowRoute approvalFlowRouteResponseApprovalFlowRoute = (ApprovalFlowRouteResponseApprovalFlowRoute) o;
return Objects.equals(this.definitionSystem, approvalFlowRouteResponseApprovalFlowRoute.definitionSystem) &&
Objects.equals(this.description, approvalFlowRouteResponseApprovalFlowRoute.description) &&
Objects.equals(this.firstStepId, approvalFlowRouteResponseApprovalFlowRoute.firstStepId) &&
Objects.equals(this.id, approvalFlowRouteResponseApprovalFlowRoute.id) &&
Objects.equals(this.name, approvalFlowRouteResponseApprovalFlowRoute.name) &&
Objects.equals(this.requestFormIds, approvalFlowRouteResponseApprovalFlowRoute.requestFormIds) &&
Objects.equals(this.steps, approvalFlowRouteResponseApprovalFlowRoute.steps) &&
Objects.equals(this.usages, approvalFlowRouteResponseApprovalFlowRoute.usages) &&
Objects.equals(this.userId, approvalFlowRouteResponseApprovalFlowRoute.userId);
}
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(definitionSystem, description, firstStepId, id, name, requestFormIds, steps, usages, userId);
}
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 ApprovalFlowRouteResponseApprovalFlowRoute {\n");
sb.append(" definitionSystem: ").append(toIndentedString(definitionSystem)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" firstStepId: ").append(toIndentedString(firstStepId)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" requestFormIds: ").append(toIndentedString(requestFormIds)).append("\n");
sb.append(" steps: ").append(toIndentedString(steps)).append("\n");
sb.append(" usages: ").append(toIndentedString(usages)).append("\n");
sb.append(" userId: ").append(toIndentedString(userId)).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 ");
}
}