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

src.main.java.com.smartbear.readyapi.client.model.RestTestRequestStep 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.Assertion;
import com.smartbear.readyapi.client.model.Authentication;
import com.smartbear.readyapi.client.model.RequestTestStepBase;
import com.smartbear.readyapi.client.model.RestParameter;
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;



/**
 * Data structure for the <a href=\"http://readyapi.smartbear.com/structure/requests/rest/step/start\" target=\"_blank\">REST Request</a> test step.
 **/

@ApiModel(description = "Data structure for the REST Request test step.")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-07-29T13:25:49.703+02:00")
public class RestTestRequestStep extends RequestTestStepBase  {
  
  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;
  private String clientCertificateFileName = null;
  private String clientCertificatePassword = null;
  private String method = null;
  private List parameters = new ArrayList();
  private String mediaType = null;
  private Boolean postQueryString = false;

  
  /**
   * Test step type. Possible values: 
  • DataSource
  • Groovy
  • JDBC Request
  • Property Transfer
  • REST Request
  • TestStepStruct
**/ public RestTestRequestStep 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 RestTestRequestStep 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 RestTestRequestStep 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 RestTestRequestStep 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 RestTestRequestStep 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 RestTestRequestStep 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 RestTestRequestStep 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 RestTestRequestStep 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 RestTestRequestStep 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 RestTestRequestStep 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 RestTestRequestStep 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; } /** * Path of the test step specific client certificate file **/ public RestTestRequestStep clientCertificateFileName(String clientCertificateFileName) { this.clientCertificateFileName = clientCertificateFileName; return this; } @ApiModelProperty(example = "null", value = "Path of the test step specific client certificate file") @JsonProperty("clientCertificateFileName") public String getClientCertificateFileName() { return clientCertificateFileName; } public void setClientCertificateFileName(String clientCertificateFileName) { this.clientCertificateFileName = clientCertificateFileName; } /** * Password of the test step specific client certificate **/ public RestTestRequestStep clientCertificatePassword(String clientCertificatePassword) { this.clientCertificatePassword = clientCertificatePassword; return this; } @ApiModelProperty(example = "null", value = "Password of the test step specific client certificate") @JsonProperty("clientCertificatePassword") public String getClientCertificatePassword() { return clientCertificatePassword; } public void setClientCertificatePassword(String clientCertificatePassword) { this.clientCertificatePassword = clientCertificatePassword; } /** * The request type: GET, POST, DELETE, PUT and so on. **/ public RestTestRequestStep method(String method) { this.method = method; return this; } @ApiModelProperty(example = "null", value = "The request type: GET, POST, DELETE, PUT and so on.") @JsonProperty("method") public String getMethod() { return method; } public void setMethod(String method) { this.method = method; } /** * An array of request parameters. **/ public RestTestRequestStep parameters(List parameters) { this.parameters = parameters; return this; } @ApiModelProperty(example = "null", value = "An array of request parameters.") @JsonProperty("parameters") public List getParameters() { return parameters; } public void setParameters(List parameters) { this.parameters = parameters; } /** * The request data media type, for example, multipart/form-data. **/ public RestTestRequestStep mediaType(String mediaType) { this.mediaType = mediaType; return this; } @ApiModelProperty(example = "null", value = "The request data media type, for example, multipart/form-data.") @JsonProperty("mediaType") public String getMediaType() { return mediaType; } public void setMediaType(String mediaType) { this.mediaType = mediaType; } /** * Specifies if the TestServer includes the query string parameters to the request body or not. **/ public RestTestRequestStep postQueryString(Boolean postQueryString) { this.postQueryString = postQueryString; return this; } @ApiModelProperty(example = "null", value = "Specifies if the TestServer includes the query string parameters to the request body or not.") @JsonProperty("postQueryString") public Boolean getPostQueryString() { return postQueryString; } public void setPostQueryString(Boolean postQueryString) { this.postQueryString = postQueryString; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } RestTestRequestStep restTestRequestStep = (RestTestRequestStep) o; return Objects.equals(this.type, restTestRequestStep.type) && Objects.equals(this.name, restTestRequestStep.name) && Objects.equals(this.URI, restTestRequestStep.URI) && Objects.equals(this.requestBody, restTestRequestStep.requestBody) && Objects.equals(this.authentication, restTestRequestStep.authentication) && Objects.equals(this.assertions, restTestRequestStep.assertions) && Objects.equals(this.headers, restTestRequestStep.headers) && Objects.equals(this.encoding, restTestRequestStep.encoding) && Objects.equals(this.timeout, restTestRequestStep.timeout) && Objects.equals(this.followRedirects, restTestRequestStep.followRedirects) && Objects.equals(this.entitizeParameters, restTestRequestStep.entitizeParameters) && Objects.equals(this.clientCertificateFileName, restTestRequestStep.clientCertificateFileName) && Objects.equals(this.clientCertificatePassword, restTestRequestStep.clientCertificatePassword) && Objects.equals(this.method, restTestRequestStep.method) && Objects.equals(this.parameters, restTestRequestStep.parameters) && Objects.equals(this.mediaType, restTestRequestStep.mediaType) && Objects.equals(this.postQueryString, restTestRequestStep.postQueryString) && super.equals(o); } @Override public int hashCode() { return Objects.hash(type, name, URI, requestBody, authentication, assertions, headers, encoding, timeout, followRedirects, entitizeParameters, clientCertificateFileName, clientCertificatePassword, method, parameters, mediaType, postQueryString, super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class RestTestRequestStep {\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(" clientCertificateFileName: ").append(toIndentedString(clientCertificateFileName)).append("\n"); sb.append(" clientCertificatePassword: ").append(toIndentedString(clientCertificatePassword)).append("\n"); sb.append(" method: ").append(toIndentedString(method)).append("\n"); sb.append(" parameters: ").append(toIndentedString(parameters)).append("\n"); sb.append(" mediaType: ").append(toIndentedString(mediaType)).append("\n"); sb.append(" postQueryString: ").append(toIndentedString(postQueryString)).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