All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jp.co.freee.accounting.models.ApprovalRequestResponseApprovalRequestApprovers Maven / Gradle / Ivy

There is a newer version: 2.29.0
Show newest version
/*
 * 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;

/**
 * ApprovalRequestResponseApprovalRequestApprovers
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class ApprovalRequestResponseApprovalRequestApprovers {
  public static final String SERIALIZED_NAME_IS_FORCE_ACTION = "is_force_action";
  @SerializedName(SERIALIZED_NAME_IS_FORCE_ACTION)
  private Boolean isForceAction;

  /**
   * 承認ステップの承認方法 * ` predefined_user` - メンバー指定 (1人), * ` selected_user` - 申請時にメンバー指定 * ` unspecified` - 指定なし * ` and_resource` - メンバー指定 (複数、全員の承認), * ` or_resource` - メンバー指定 (複数、1人の承認) * ` and_position` - 役職指定 (複数、全員の承認) * ` or_position` - 役職指定 (複数、1人の承認)
   */
  @JsonAdapter(ResourceTypeEnum.Adapter.class)
  public enum ResourceTypeEnum {
    PREDEFINED_USER("predefined_user"),
    
    SELECTED_USER("selected_user"),
    
    UNSPECIFIED("unspecified"),
    
    AND_RESOURCE("and_resource"),
    
    OR_RESOURCE("or_resource"),
    
    AND_POSITION("and_position"),
    
    OR_POSITION("or_position");

    private String value;

    ResourceTypeEnum(String value) {
      this.value = value;
    }

    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    public static ResourceTypeEnum fromValue(String value) {
      for (ResourceTypeEnum b : ResourceTypeEnum.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 ResourceTypeEnum enumeration) throws IOException {
        jsonWriter.value(enumeration.getValue());
      }

      @Override
      public ResourceTypeEnum read(final JsonReader jsonReader) throws IOException {
        String value =  jsonReader.nextString();
        return ResourceTypeEnum.fromValue(value);
      }
    }
  }

  public static final String SERIALIZED_NAME_RESOURCE_TYPE = "resource_type";
  @SerializedName(SERIALIZED_NAME_RESOURCE_TYPE)
  private ResourceTypeEnum resourceType;

  /**
   * 承認者の承認状態 * `initial` - 初期状態 * `approved` - 承認済 * `rejected` - 却下 * `feedback` - 差戻し
   */
  @JsonAdapter(StatusEnum.Adapter.class)
  public enum StatusEnum {
    INITIAL("initial"),
    
    APPROVED("approved"),
    
    REJECTED("rejected"),
    
    FEEDBACK("feedback");

    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;

  public static final String SERIALIZED_NAME_STEP_ID = "step_id";
  @SerializedName(SERIALIZED_NAME_STEP_ID)
  private Integer stepId;

  public static final String SERIALIZED_NAME_USER_ID = "user_id";
  @SerializedName(SERIALIZED_NAME_USER_ID)
  private Integer userId;

  public ApprovalRequestResponseApprovalRequestApprovers() { 
  }

  public ApprovalRequestResponseApprovalRequestApprovers isForceAction(Boolean isForceAction) {
    
    this.isForceAction = isForceAction;
    return this;
  }

   /**
   * 代理承認済みかどうか
   * @return isForceAction
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(example = "true", required = true, value = "代理承認済みかどうか")

  public Boolean getIsForceAction() {
    return isForceAction;
  }


  public void setIsForceAction(Boolean isForceAction) {
    this.isForceAction = isForceAction;
  }


  public ApprovalRequestResponseApprovalRequestApprovers resourceType(ResourceTypeEnum resourceType) {
    
    this.resourceType = resourceType;
    return this;
  }

   /**
   * 承認ステップの承認方法 * ` predefined_user` - メンバー指定 (1人), * ` selected_user` - 申請時にメンバー指定 * ` unspecified` - 指定なし * ` and_resource` - メンバー指定 (複数、全員の承認), * ` or_resource` - メンバー指定 (複数、1人の承認) * ` and_position` - 役職指定 (複数、全員の承認) * ` or_position` - 役職指定 (複数、1人の承認)
   * @return resourceType
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(example = "predefined_user", required = true, value = "承認ステップの承認方法 * ` predefined_user` - メンバー指定 (1人), * ` selected_user` - 申請時にメンバー指定 * ` unspecified` - 指定なし * ` and_resource` - メンバー指定 (複数、全員の承認), * ` or_resource` - メンバー指定 (複数、1人の承認) * ` and_position` - 役職指定 (複数、全員の承認) * ` or_position` - 役職指定 (複数、1人の承認)")

  public ResourceTypeEnum getResourceType() {
    return resourceType;
  }


  public void setResourceType(ResourceTypeEnum resourceType) {
    this.resourceType = resourceType;
  }


  public ApprovalRequestResponseApprovalRequestApprovers status(StatusEnum status) {
    
    this.status = status;
    return this;
  }

   /**
   * 承認者の承認状態 * `initial` - 初期状態 * `approved` - 承認済 * `rejected` - 却下 * `feedback` - 差戻し
   * @return status
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(example = "initial", required = true, value = "承認者の承認状態 * `initial` - 初期状態 * `approved` - 承認済 * `rejected` - 却下 * `feedback` - 差戻し")

  public StatusEnum getStatus() {
    return status;
  }


  public void setStatus(StatusEnum status) {
    this.status = status;
  }


  public ApprovalRequestResponseApprovalRequestApprovers stepId(Integer stepId) {
    
    this.stepId = stepId;
    return this;
  }

   /**
   * 承認ステップID
   * minimum: 1
   * maximum: 2147483647
   * @return stepId
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(example = "1", required = true, value = "承認ステップID")

  public Integer getStepId() {
    return stepId;
  }


  public void setStepId(Integer stepId) {
    this.stepId = stepId;
  }


  public ApprovalRequestResponseApprovalRequestApprovers userId(Integer userId) {
    
    this.userId = userId;
    return this;
  }

   /**
   * 承認者のユーザーID 下記の場合はnullになります。 <ul>   <li>resource_type:selected_userの場合で承認者未指定時</li>   <li>resource_type:or_positionで前stepで部門未指定の場合</li> </ul>
   * minimum: 1
   * maximum: 2147483647
   * @return userId
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "1", required = true, value = "承認者のユーザーID 下記の場合はnullになります。 
  • resource_type:selected_userの場合で承認者未指定時
  • resource_type:or_positionで前stepで部門未指定の場合
") 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; } ApprovalRequestResponseApprovalRequestApprovers approvalRequestResponseApprovalRequestApprovers = (ApprovalRequestResponseApprovalRequestApprovers) o; return Objects.equals(this.isForceAction, approvalRequestResponseApprovalRequestApprovers.isForceAction) && Objects.equals(this.resourceType, approvalRequestResponseApprovalRequestApprovers.resourceType) && Objects.equals(this.status, approvalRequestResponseApprovalRequestApprovers.status) && Objects.equals(this.stepId, approvalRequestResponseApprovalRequestApprovers.stepId) && Objects.equals(this.userId, approvalRequestResponseApprovalRequestApprovers.userId); } @Override public int hashCode() { return Objects.hash(isForceAction, resourceType, status, stepId, userId); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ApprovalRequestResponseApprovalRequestApprovers {\n"); sb.append(" isForceAction: ").append(toIndentedString(isForceAction)).append("\n"); sb.append(" resourceType: ").append(toIndentedString(resourceType)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" stepId: ").append(toIndentedString(stepId)).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 "); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy