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

src.main.java.com.smartbear.readyapi.client.model.JsonPathCountAssertion 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 io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;



/**
 * Data structure for the <a herf=\"http://readyapi.smartbear.com/structure/assertions/property/json/count/introduction\">JSONPath Count</a> assertion.
 **/

@ApiModel(description = "Data structure for the JSONPath Count assertion.")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-07-21T13:20:07.368+02:00")
public class JsonPathCountAssertion extends Assertion  {
  
  private String type = null;
  private String jsonPath = null;
  private Integer expectedCount = null;
  private Boolean allowWildcards = false;

  
  /**
   * Assertion type. Possible values: 
  • AssertionStruct
  • Contains
  • Invalid HTTP Status Codes
  • JDBC Status
  • JDBC Timeout
  • JsonPath Count
  • JsonPath Match
  • Not Contains
  • Response SLA
  • Script Assertion
  • Valid HTTP Status Codes
  • XPath Match
  • XQuery Match
**/ public JsonPathCountAssertion type(String type) { this.type = type; return this; } @ApiModelProperty(example = "null", value = "Assertion type. Possible values:
  • AssertionStruct
  • Contains
  • Invalid HTTP Status Codes
  • JDBC Status
  • JDBC Timeout
  • JsonPath Count
  • JsonPath Match
  • Not Contains
  • Response SLA
  • Script Assertion
  • Valid HTTP Status Codes
  • XPath Match
  • XQuery Match
") @JsonProperty("type") public String getType() { return type; } public void setType(String type) { this.type = type; } /** * JSONPath expression used to select content from the test step results. **/ public JsonPathCountAssertion jsonPath(String jsonPath) { this.jsonPath = jsonPath; return this; } @ApiModelProperty(example = "null", value = "JSONPath expression used to select content from the test step results.") @JsonProperty("jsonPath") public String getJsonPath() { return jsonPath; } public void setJsonPath(String jsonPath) { this.jsonPath = jsonPath; } /** * Expected number of matched results. **/ public JsonPathCountAssertion expectedCount(Integer expectedCount) { this.expectedCount = expectedCount; return this; } @ApiModelProperty(example = "null", value = "Expected number of matched results.") @JsonProperty("expectedCount") public Integer getExpectedCount() { return expectedCount; } public void setExpectedCount(Integer expectedCount) { this.expectedCount = expectedCount; } /** * Treat * as wildcard in a match. **/ public JsonPathCountAssertion allowWildcards(Boolean allowWildcards) { this.allowWildcards = allowWildcards; return this; } @ApiModelProperty(example = "null", value = "Treat * as wildcard in a match.") @JsonProperty("allowWildcards") public Boolean getAllowWildcards() { return allowWildcards; } public void setAllowWildcards(Boolean allowWildcards) { this.allowWildcards = allowWildcards; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } JsonPathCountAssertion jsonPathCountAssertion = (JsonPathCountAssertion) o; return Objects.equals(this.type, jsonPathCountAssertion.type) && Objects.equals(this.jsonPath, jsonPathCountAssertion.jsonPath) && Objects.equals(this.expectedCount, jsonPathCountAssertion.expectedCount) && Objects.equals(this.allowWildcards, jsonPathCountAssertion.allowWildcards) && super.equals(o); } @Override public int hashCode() { return Objects.hash(type, jsonPath, expectedCount, allowWildcards, super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class JsonPathCountAssertion {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" jsonPath: ").append(toIndentedString(jsonPath)).append("\n"); sb.append(" expectedCount: ").append(toIndentedString(expectedCount)).append("\n"); sb.append(" allowWildcards: ").append(toIndentedString(allowWildcards)).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