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

src.main.java.com.smartbear.readyapi.client.model.HarRequest Maven / Gradle / Ivy

Go to download

Java client library for creating and executing test recipes against Ready!API TestServer

The newest version!
package com.smartbear.readyapi.client.model;

import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.smartbear.readyapi.client.model.HarCookie;
import com.smartbear.readyapi.client.model.HarHeader;
import com.smartbear.readyapi.client.model.HarPostData;
import com.smartbear.readyapi.client.model.HarQueryString;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;





@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-07-29T13:25:49.703+02:00")
public class HarRequest   {
  
  private String method = null;
  private String url = null;
  private String httpVersion = null;
  private List cookies = new ArrayList();
  private List headers = new ArrayList();
  private List queryString = new ArrayList();
  private HarPostData postData = null;
  private Long headersSize = null;
  private Long bodySize = null;
  private String comment = null;

  
  /**
   **/
  public HarRequest method(String method) {
    this.method = method;
    return this;
  }
  
  @ApiModelProperty(example = "null", value = "")
  @JsonProperty("method")
  public String getMethod() {
    return method;
  }
  public void setMethod(String method) {
    this.method = method;
  }

  
  /**
   **/
  public HarRequest url(String url) {
    this.url = url;
    return this;
  }
  
  @ApiModelProperty(example = "null", value = "")
  @JsonProperty("url")
  public String getUrl() {
    return url;
  }
  public void setUrl(String url) {
    this.url = url;
  }

  
  /**
   **/
  public HarRequest httpVersion(String httpVersion) {
    this.httpVersion = httpVersion;
    return this;
  }
  
  @ApiModelProperty(example = "null", value = "")
  @JsonProperty("httpVersion")
  public String getHttpVersion() {
    return httpVersion;
  }
  public void setHttpVersion(String httpVersion) {
    this.httpVersion = httpVersion;
  }

  
  /**
   **/
  public HarRequest cookies(List cookies) {
    this.cookies = cookies;
    return this;
  }
  
  @ApiModelProperty(example = "null", value = "")
  @JsonProperty("cookies")
  public List getCookies() {
    return cookies;
  }
  public void setCookies(List cookies) {
    this.cookies = cookies;
  }

  
  /**
   **/
  public HarRequest headers(List headers) {
    this.headers = headers;
    return this;
  }
  
  @ApiModelProperty(example = "null", value = "")
  @JsonProperty("headers")
  public List getHeaders() {
    return headers;
  }
  public void setHeaders(List headers) {
    this.headers = headers;
  }

  
  /**
   **/
  public HarRequest queryString(List queryString) {
    this.queryString = queryString;
    return this;
  }
  
  @ApiModelProperty(example = "null", value = "")
  @JsonProperty("queryString")
  public List getQueryString() {
    return queryString;
  }
  public void setQueryString(List queryString) {
    this.queryString = queryString;
  }

  
  /**
   **/
  public HarRequest postData(HarPostData postData) {
    this.postData = postData;
    return this;
  }
  
  @ApiModelProperty(example = "null", value = "")
  @JsonProperty("postData")
  public HarPostData getPostData() {
    return postData;
  }
  public void setPostData(HarPostData postData) {
    this.postData = postData;
  }

  
  /**
   **/
  public HarRequest headersSize(Long headersSize) {
    this.headersSize = headersSize;
    return this;
  }
  
  @ApiModelProperty(example = "null", value = "")
  @JsonProperty("headersSize")
  public Long getHeadersSize() {
    return headersSize;
  }
  public void setHeadersSize(Long headersSize) {
    this.headersSize = headersSize;
  }

  
  /**
   **/
  public HarRequest bodySize(Long bodySize) {
    this.bodySize = bodySize;
    return this;
  }
  
  @ApiModelProperty(example = "null", value = "")
  @JsonProperty("bodySize")
  public Long getBodySize() {
    return bodySize;
  }
  public void setBodySize(Long bodySize) {
    this.bodySize = bodySize;
  }

  
  /**
   **/
  public HarRequest comment(String comment) {
    this.comment = comment;
    return this;
  }
  
  @ApiModelProperty(example = "null", value = "")
  @JsonProperty("comment")
  public String getComment() {
    return comment;
  }
  public void setComment(String comment) {
    this.comment = comment;
  }

  

  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    HarRequest harRequest = (HarRequest) o;
    return Objects.equals(this.method, harRequest.method) &&
        Objects.equals(this.url, harRequest.url) &&
        Objects.equals(this.httpVersion, harRequest.httpVersion) &&
        Objects.equals(this.cookies, harRequest.cookies) &&
        Objects.equals(this.headers, harRequest.headers) &&
        Objects.equals(this.queryString, harRequest.queryString) &&
        Objects.equals(this.postData, harRequest.postData) &&
        Objects.equals(this.headersSize, harRequest.headersSize) &&
        Objects.equals(this.bodySize, harRequest.bodySize) &&
        Objects.equals(this.comment, harRequest.comment);
  }

  @Override
  public int hashCode() {
    return Objects.hash(method, url, httpVersion, cookies, headers, queryString, postData, headersSize, bodySize, comment);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class HarRequest {\n");
    
    sb.append("    method: ").append(toIndentedString(method)).append("\n");
    sb.append("    url: ").append(toIndentedString(url)).append("\n");
    sb.append("    httpVersion: ").append(toIndentedString(httpVersion)).append("\n");
    sb.append("    cookies: ").append(toIndentedString(cookies)).append("\n");
    sb.append("    headers: ").append(toIndentedString(headers)).append("\n");
    sb.append("    queryString: ").append(toIndentedString(queryString)).append("\n");
    sb.append("    postData: ").append(toIndentedString(postData)).append("\n");
    sb.append("    headersSize: ").append(toIndentedString(headersSize)).append("\n");
    sb.append("    bodySize: ").append(toIndentedString(bodySize)).append("\n");
    sb.append("    comment: ").append(toIndentedString(comment)).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(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy