
software.crldev.elrondspringbootstarterreactive.api.model.AccountNonce 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;
/**
* API response when querying for address nonce
*
* @author carlo_stanciu
*/
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = AccountNonce.AccountNonceBuilder.class)
public final class AccountNonce {
@JsonProperty("nonce")
private final Long nonce;
AccountNonce(final Long nonce) {
this.nonce = nonce;
}
@com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "", buildMethodName = "build")
public static class AccountNonceBuilder {
private Long nonce;
AccountNonceBuilder() {
}
/**
* @return {@code this}.
*/
@JsonProperty("nonce")
public AccountNonce.AccountNonceBuilder nonce(final Long nonce) {
this.nonce = nonce;
return this;
}
public AccountNonce build() {
return new AccountNonce(this.nonce);
}
@Override
public String toString() {
return "AccountNonce.AccountNonceBuilder(nonce=" + this.nonce + ")";
}
}
public static AccountNonce.AccountNonceBuilder builder() {
return new AccountNonce.AccountNonceBuilder();
}
public Long getNonce() {
return this.nonce;
}
@Override
public boolean equals(final Object o) {
if (o == this) return true;
if (!(o instanceof AccountNonce)) return false;
final AccountNonce other = (AccountNonce) o;
final Object this$nonce = this.getNonce();
final Object other$nonce = other.getNonce();
if (this$nonce == null ? other$nonce != null : !this$nonce.equals(other$nonce)) return false;
return true;
}
@Override
public int hashCode() {
final int PRIME = 59;
int result = 1;
final Object $nonce = this.getNonce();
result = result * PRIME + ($nonce == null ? 43 : $nonce.hashCode());
return result;
}
@Override
public String toString() {
return "AccountNonce(nonce=" + this.getNonce() + ")";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy