org.finra.herd.sdk.model.JdbcStatement Maven / Gradle / Ivy
/*
* herd-external
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* OpenAPI spec version: 0.125.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.finra.herd.sdk.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.finra.herd.sdk.model.JdbcStatementResultSet;
/**
* JdbcStatement
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2020-07-16T17:44:47.669-04:00[America/New_York]")
public class JdbcStatement {
/**
* Gets or Sets type
*/
public enum TypeEnum {
UPDATE("UPDATE"),
QUERY("QUERY");
private String value;
TypeEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static TypeEnum fromValue(String text) {
for (TypeEnum b : TypeEnum.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + text + "'");
}
}
@JsonProperty("type")
private TypeEnum type = null;
@JsonProperty("sql")
private String sql = null;
@JsonProperty("continueOnError")
private Boolean continueOnError = null;
/**
* Gets or Sets status
*/
public enum StatusEnum {
SUCCESS("SUCCESS"),
ERROR("ERROR"),
SKIPPED("SKIPPED");
private String value;
StatusEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static StatusEnum fromValue(String text) {
for (StatusEnum b : StatusEnum.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + text + "'");
}
}
@JsonProperty("status")
private StatusEnum status = null;
@JsonProperty("result")
private String result = null;
@JsonProperty("resultSet")
private JdbcStatementResultSet resultSet = null;
@JsonProperty("errorMessage")
private String errorMessage = null;
public JdbcStatement type(TypeEnum type) {
this.type = type;
return this;
}
/**
* Get type
* @return type
**/
@ApiModelProperty(required = true, value = "")
public TypeEnum getType() {
return type;
}
public void setType(TypeEnum type) {
this.type = type;
}
public JdbcStatement sql(String sql) {
this.sql = sql;
return this;
}
/**
* Get sql
* @return sql
**/
@ApiModelProperty(required = true, value = "")
public String getSql() {
return sql;
}
public void setSql(String sql) {
this.sql = sql;
}
public JdbcStatement continueOnError(Boolean continueOnError) {
this.continueOnError = continueOnError;
return this;
}
/**
* Get continueOnError
* @return continueOnError
**/
@ApiModelProperty(value = "")
public Boolean getContinueOnError() {
return continueOnError;
}
public void setContinueOnError(Boolean continueOnError) {
this.continueOnError = continueOnError;
}
public JdbcStatement status(StatusEnum status) {
this.status = status;
return this;
}
/**
* Get status
* @return status
**/
@ApiModelProperty(value = "")
public StatusEnum getStatus() {
return status;
}
public void setStatus(StatusEnum status) {
this.status = status;
}
public JdbcStatement result(String result) {
this.result = result;
return this;
}
/**
* Get result
* @return result
**/
@ApiModelProperty(value = "")
public String getResult() {
return result;
}
public void setResult(String result) {
this.result = result;
}
public JdbcStatement resultSet(JdbcStatementResultSet resultSet) {
this.resultSet = resultSet;
return this;
}
/**
* Get resultSet
* @return resultSet
**/
@ApiModelProperty(value = "")
public JdbcStatementResultSet getResultSet() {
return resultSet;
}
public void setResultSet(JdbcStatementResultSet resultSet) {
this.resultSet = resultSet;
}
public JdbcStatement errorMessage(String errorMessage) {
this.errorMessage = errorMessage;
return this;
}
/**
* Get errorMessage
* @return errorMessage
**/
@ApiModelProperty(value = "")
public String getErrorMessage() {
return errorMessage;
}
public void setErrorMessage(String errorMessage) {
this.errorMessage = errorMessage;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
JdbcStatement jdbcStatement = (JdbcStatement) o;
return Objects.equals(this.type, jdbcStatement.type) &&
Objects.equals(this.sql, jdbcStatement.sql) &&
Objects.equals(this.continueOnError, jdbcStatement.continueOnError) &&
Objects.equals(this.status, jdbcStatement.status) &&
Objects.equals(this.result, jdbcStatement.result) &&
Objects.equals(this.resultSet, jdbcStatement.resultSet) &&
Objects.equals(this.errorMessage, jdbcStatement.errorMessage);
}
@Override
public int hashCode() {
return Objects.hash(type, sql, continueOnError, status, result, resultSet, errorMessage);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class JdbcStatement {\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" sql: ").append(toIndentedString(sql)).append("\n");
sb.append(" continueOnError: ").append(toIndentedString(continueOnError)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append(" result: ").append(toIndentedString(result)).append("\n");
sb.append(" resultSet: ").append(toIndentedString(resultSet)).append("\n");
sb.append(" errorMessage: ").append(toIndentedString(errorMessage)).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 ");
}
}