
software.crldev.elrondspringbootstarterreactive.api.model.ContractQueryResult Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of elrond-spring-boot-starter-reactive Show documentation
Show all versions of elrond-spring-boot-starter-reactive Show documentation
A SpringBoot Starter solution designed to ensure easy and efficient integration with the Elrond Network using a Reactive API layer.
The newest version!
package software.crldev.elrondspringbootstarterreactive.api.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.math.BigInteger;
import java.util.Base64;
import java.util.List;
/**
* part of API response used in smart contract query results
*
* @author carlo_stanciu
*/
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = ContractQueryResult.ContractQueryResultBuilder.class)
public final class ContractQueryResult {
@JsonProperty("returnData")
private final List data;
@JsonProperty("returnCode")
private final String code;
@JsonProperty("returnMessage")
private final String message;
ContractQueryResult(final List data, final String code, final String message) {
this.data = data;
this.code = code;
this.message = message;
}
@com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "", buildMethodName = "build")
public static class ContractQueryResultBuilder {
private List data;
private String code;
private String message;
ContractQueryResultBuilder() {
}
/**
* @return {@code this}.
*/
@JsonProperty("returnData")
public ContractQueryResult.ContractQueryResultBuilder data(final List data) {
this.data = data;
return this;
}
/**
* @return {@code this}.
*/
@JsonProperty("returnCode")
public ContractQueryResult.ContractQueryResultBuilder code(final String code) {
this.code = code;
return this;
}
/**
* @return {@code this}.
*/
@JsonProperty("returnMessage")
public ContractQueryResult.ContractQueryResultBuilder message(final String message) {
this.message = message;
return this;
}
public ContractQueryResult build() {
return new ContractQueryResult(this.data, this.code, this.message);
}
@Override
public String toString() {
return "ContractQueryResult.ContractQueryResultBuilder(data=" + this.data + ", code=" + this.code + ", message=" + this.message + ")";
}
}
public static ContractQueryResult.ContractQueryResultBuilder builder() {
return new ContractQueryResult.ContractQueryResultBuilder();
}
public List getData() {
return this.data;
}
public String getCode() {
return this.code;
}
public String getMessage() {
return this.message;
}
@Override
public boolean equals(final Object o) {
if (o == this) return true;
if (!(o instanceof ContractQueryResult)) return false;
final ContractQueryResult other = (ContractQueryResult) o;
final Object this$data = this.getData();
final Object other$data = other.getData();
if (this$data == null ? other$data != null : !this$data.equals(other$data)) return false;
final Object this$code = this.getCode();
final Object other$code = other.getCode();
if (this$code == null ? other$code != null : !this$code.equals(other$code)) return false;
final Object this$message = this.getMessage();
final Object other$message = other.getMessage();
if (this$message == null ? other$message != null : !this$message.equals(other$message)) return false;
return true;
}
@Override
public int hashCode() {
final int PRIME = 59;
int result = 1;
final Object $data = this.getData();
result = result * PRIME + ($data == null ? 43 : $data.hashCode());
final Object $code = this.getCode();
result = result * PRIME + ($code == null ? 43 : $code.hashCode());
final Object $message = this.getMessage();
result = result * PRIME + ($message == null ? 43 : $message.hashCode());
return result;
}
@Override
public String toString() {
return "ContractQueryResult(data=" + this.getData() + ", code=" + this.getCode() + ", message=" + this.getMessage() + ")";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy