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

jp.co.freee.accounting.models.ApprovalFlowRouteResponseApprovalFlowRouteSteps 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;
import java.util.ArrayList;
import java.util.List;

/**
 * ApprovalFlowRouteResponseApprovalFlowRouteSteps
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class ApprovalFlowRouteResponseApprovalFlowRouteSteps {
  public static final String SERIALIZED_NAME_ID = "id";
  @SerializedName(SERIALIZED_NAME_ID)
  private Integer id;

  public static final String SERIALIZED_NAME_NEXT_STEP_ID = "next_step_id";
  @SerializedName(SERIALIZED_NAME_NEXT_STEP_ID)
  private Integer nextStepId;

  /**
   * 承認方法( 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;

  public static final String SERIALIZED_NAME_USER_IDS = "user_ids";
  @SerializedName(SERIALIZED_NAME_USER_IDS)
  private List userIds = null;

  public ApprovalFlowRouteResponseApprovalFlowRouteSteps() { 
  }

  public ApprovalFlowRouteResponseApprovalFlowRouteSteps 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 ApprovalFlowRouteResponseApprovalFlowRouteSteps nextStepId(Integer nextStepId) {
    
    this.nextStepId = nextStepId;
    return this;
  }

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

  public Integer getNextStepId() {
    return nextStepId;
  }


  public void setNextStepId(Integer nextStepId) {
    this.nextStepId = nextStepId;
  }


  public ApprovalFlowRouteResponseApprovalFlowRouteSteps 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 ApprovalFlowRouteResponseApprovalFlowRouteSteps userIds(List userIds) {
    
    this.userIds = userIds;
    return this;
  }

  public ApprovalFlowRouteResponseApprovalFlowRouteSteps addUserIdsItem(Integer userIdsItem) {
    if (this.userIds == null) {
      this.userIds = new ArrayList<>();
    }
    this.userIds.add(userIdsItem);
    return this;
  }

   /**
   * 承認者のユーザーID (配列)
   * @return userIds
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "承認者のユーザーID (配列)")

  public List getUserIds() {
    return userIds;
  }


  public void setUserIds(List userIds) {
    this.userIds = userIds;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ApprovalFlowRouteResponseApprovalFlowRouteSteps approvalFlowRouteResponseApprovalFlowRouteSteps = (ApprovalFlowRouteResponseApprovalFlowRouteSteps) o;
    return Objects.equals(this.id, approvalFlowRouteResponseApprovalFlowRouteSteps.id) &&
        Objects.equals(this.nextStepId, approvalFlowRouteResponseApprovalFlowRouteSteps.nextStepId) &&
        Objects.equals(this.resourceType, approvalFlowRouteResponseApprovalFlowRouteSteps.resourceType) &&
        Objects.equals(this.userIds, approvalFlowRouteResponseApprovalFlowRouteSteps.userIds);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, nextStepId, resourceType, userIds);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ApprovalFlowRouteResponseApprovalFlowRouteSteps {\n");
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    nextStepId: ").append(toIndentedString(nextStepId)).append("\n");
    sb.append("    resourceType: ").append(toIndentedString(resourceType)).append("\n");
    sb.append("    userIds: ").append(toIndentedString(userIds)).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 - 2025 Weber Informatics LLC | Privacy Policy