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

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

Go to download

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

There is a newer version: 1.2.1
Show newest version
package com.smartbear.readyapi.client.model;

import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.smartbear.readyapi.client.model.Assertion;
import com.smartbear.readyapi.client.model.Authentication;
import com.smartbear.readyapi.client.model.TestStep;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;





@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-24T08:38:08.699-04:00")
public class RequestTestStepBase extends TestStep  {
  
  private String type = null;
  private String name = null;
  private String URI = null;
  private String requestBody = null;
  private Authentication authentication = null;
  private List assertions = new ArrayList();
  private Map headers = new HashMap();
  private String encoding = null;
  private String timeout = null;
  private Boolean followRedirects = false;
  private Boolean entitizeParameters = false;

  
  /**
   * Test step type. Possible values: 
  • DataSource
  • Groovy
  • JDBC Request
  • Property Transfer
  • REST Request
  • TestStepStruct
**/ public RequestTestStepBase type(String type) { this.type = type; return this; } @ApiModelProperty(example = "null", value = "Test step type. Possible values:
  • DataSource
  • Groovy
  • JDBC Request
  • Property Transfer
  • REST Request
  • TestStepStruct
") @JsonProperty("type") public String getType() { return type; } public void setType(String type) { this.type = type; } /** * Test step name. This name is used to refer to the test step in the test recipe. **/ public RequestTestStepBase name(String name) { this.name = name; return this; } @ApiModelProperty(example = "null", value = "Test step name. This name is used to refer to the test step in the test recipe.") @JsonProperty("name") public String getName() { return name; } public void setName(String name) { this.name = name; } /** * The URL, to which TestServer send the request. **/ public RequestTestStepBase URI(String URI) { this.URI = URI; return this; } @ApiModelProperty(example = "null", value = "The URL, to which TestServer send the request.") @JsonProperty("URI") public String getURI() { return URI; } public void setURI(String URI) { this.URI = URI; } /** * The request body contents. **/ public RequestTestStepBase requestBody(String requestBody) { this.requestBody = requestBody; return this; } @ApiModelProperty(example = "null", value = "The request body contents.") @JsonProperty("requestBody") public String getRequestBody() { return requestBody; } public void setRequestBody(String requestBody) { this.requestBody = requestBody; } /** **/ public RequestTestStepBase authentication(Authentication authentication) { this.authentication = authentication; return this; } @ApiModelProperty(example = "null", value = "") @JsonProperty("authentication") public Authentication getAuthentication() { return authentication; } public void setAuthentication(Authentication authentication) { this.authentication = authentication; } /** * An array of assertions that verify the response to the request. **/ public RequestTestStepBase assertions(List assertions) { this.assertions = assertions; return this; } @ApiModelProperty(example = "null", value = "An array of assertions that verify the response to the request.") @JsonProperty("assertions") public List getAssertions() { return assertions; } public void setAssertions(List assertions) { this.assertions = assertions; } /** * Custom headers to be added to the request. **/ public RequestTestStepBase headers(Map headers) { this.headers = headers; return this; } @ApiModelProperty(example = "null", value = "Custom headers to be added to the request.") @JsonProperty("headers") public Map getHeaders() { return headers; } public void setHeaders(Map headers) { this.headers = headers; } /** * The request data encoding, for example, utf-8. **/ public RequestTestStepBase encoding(String encoding) { this.encoding = encoding; return this; } @ApiModelProperty(example = "null", value = "The request data encoding, for example, utf-8.") @JsonProperty("encoding") public String getEncoding() { return encoding; } public void setEncoding(String encoding) { this.encoding = encoding; } /** * The maximum allowed execution time for the request in milliseconds. **/ public RequestTestStepBase timeout(String timeout) { this.timeout = timeout; return this; } @ApiModelProperty(example = "null", value = "The maximum allowed execution time for the request in milliseconds.") @JsonProperty("timeout") public String getTimeout() { return timeout; } public void setTimeout(String timeout) { this.timeout = timeout; } /** * Specifies how TestServer handles redirects. If this property is false and a redirect occurs, TestServer processes the response as it is. If the property is true, it waits for the response from the new location. **/ public RequestTestStepBase followRedirects(Boolean followRedirects) { this.followRedirects = followRedirects; return this; } @ApiModelProperty(example = "null", value = "Specifies how TestServer handles redirects. If this property is false and a redirect occurs, TestServer processes the response as it is. If the property is true, it waits for the response from the new location.") @JsonProperty("followRedirects") public Boolean getFollowRedirects() { return followRedirects; } public void setFollowRedirects(Boolean followRedirects) { this.followRedirects = followRedirects; } /** * Specifies if TestServer escapes special characters like > or & in the request body. Set this property to false if data is already escaped. **/ public RequestTestStepBase entitizeParameters(Boolean entitizeParameters) { this.entitizeParameters = entitizeParameters; return this; } @ApiModelProperty(example = "null", value = "Specifies if TestServer escapes special characters like > or & in the request body. Set this property to false if data is already escaped.") @JsonProperty("entitizeParameters") public Boolean getEntitizeParameters() { return entitizeParameters; } public void setEntitizeParameters(Boolean entitizeParameters) { this.entitizeParameters = entitizeParameters; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } RequestTestStepBase requestTestStepBase = (RequestTestStepBase) o; return Objects.equals(this.type, requestTestStepBase.type) && Objects.equals(this.name, requestTestStepBase.name) && Objects.equals(this.URI, requestTestStepBase.URI) && Objects.equals(this.requestBody, requestTestStepBase.requestBody) && Objects.equals(this.authentication, requestTestStepBase.authentication) && Objects.equals(this.assertions, requestTestStepBase.assertions) && Objects.equals(this.headers, requestTestStepBase.headers) && Objects.equals(this.encoding, requestTestStepBase.encoding) && Objects.equals(this.timeout, requestTestStepBase.timeout) && Objects.equals(this.followRedirects, requestTestStepBase.followRedirects) && Objects.equals(this.entitizeParameters, requestTestStepBase.entitizeParameters) && super.equals(o); } @Override public int hashCode() { return Objects.hash(type, name, URI, requestBody, authentication, assertions, headers, encoding, timeout, followRedirects, entitizeParameters, super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class RequestTestStepBase {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" URI: ").append(toIndentedString(URI)).append("\n"); sb.append(" requestBody: ").append(toIndentedString(requestBody)).append("\n"); sb.append(" authentication: ").append(toIndentedString(authentication)).append("\n"); sb.append(" assertions: ").append(toIndentedString(assertions)).append("\n"); sb.append(" headers: ").append(toIndentedString(headers)).append("\n"); sb.append(" encoding: ").append(toIndentedString(encoding)).append("\n"); sb.append(" timeout: ").append(toIndentedString(timeout)).append("\n"); sb.append(" followRedirects: ").append(toIndentedString(followRedirects)).append("\n"); sb.append(" entitizeParameters: ").append(toIndentedString(entitizeParameters)).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