package org.wfc.omada.api.batch.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotNull;
import java.util.Objects;

/**
 * List of OpenAPIs that require batch execution. Up to 20 entries are allowed for the action list
 */
@ApiModel(description = "List of OpenAPIs that require batch execution. Up to 20 entries are allowed for the action list")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T11:47:33.899+08:00[Asia/Shanghai]")

public class RequestActionEntity   {
  @JsonProperty("path")
  private String path;

  @JsonProperty("method")
  private String method;

  @JsonProperty("body")
  private String body;

  @JsonProperty("query")
  private String query;

  public RequestActionEntity path(String path) {
    this.path = path;
    return this;
  }

  /**
   * OpenAPI request path. Same as regular OpenAPI, file upload and download are not supported.
   * @return path
  */
  @ApiModelProperty(required = true, value = "OpenAPI request path. Same as regular OpenAPI, file upload and download are not supported.")
  @NotNull


  public String getPath() {
    return path;
  }

  public void setPath(String path) {
    this.path = path;
  }

  public RequestActionEntity method(String method) {
    this.method = method;
    return this;
  }

  /**
   * OpenAPI request method. Same as regular OpenAPI, it should be a value as follows: POST, PATCH, PUT, DELETE.
   * @return method
  */
  @ApiModelProperty(required = true, value = "OpenAPI request method. Same as regular OpenAPI, it should be a value as follows: POST, PATCH, PUT, DELETE.")
  @NotNull


  public String getMethod() {
    return method;
  }

  public void setMethod(String method) {
    this.method = method;
  }

  public RequestActionEntity body(String body) {
    this.body = body;
    return this;
  }

  /**
   * OpenAPI request body, same as regular OpenAPI. Should be a JSON object but not a string.
   * @return body
  */
  @ApiModelProperty(value = "OpenAPI request body, same as regular OpenAPI. Should be a JSON object but not a string.")


  public String getBody() {
    return body;
  }

  public void setBody(String body) {
    this.body = body;
  }

  public RequestActionEntity query(String query) {
    this.query = query;
    return this;
  }

  /**
   * OpenAPI request query of the path, same as regular OpenAPI.
   * @return query
  */
  @ApiModelProperty(value = "OpenAPI request query of the path, same as regular OpenAPI.")


  public String getQuery() {
    return query;
  }

  public void setQuery(String query) {
    this.query = query;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    RequestActionEntity requestActionEntity = (RequestActionEntity) o;
    return Objects.equals(this.path, requestActionEntity.path) &&
        Objects.equals(this.method, requestActionEntity.method) &&
        Objects.equals(this.body, requestActionEntity.body) &&
        Objects.equals(this.query, requestActionEntity.query);
  }

  @Override
  public int hashCode() {
    return Objects.hash(path, method, body, query);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class RequestActionEntity {\n");
    
    sb.append("    path: ").append(toIndentedString(path)).append("\n");
    sb.append("    method: ").append(toIndentedString(method)).append("\n");
    sb.append("    body: ").append(toIndentedString(body)).append("\n");
    sb.append("    query: ").append(toIndentedString(query)).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    ");
  }
}

