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

software.crldev.elrondspringbootstarterreactive.api.model.ContractQueryResultString Maven / Gradle / Ivy

Go to download

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 smart contract for string value
 *
 * @author carlo_stanciu
 */
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = ContractQueryResultString.ContractQueryResultStringBuilder.class)
public final class ContractQueryResultString {
    @JsonProperty("data")
    private final String value;

    ContractQueryResultString(final String value) {
        this.value = value;
    }


    @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "", buildMethodName = "build")
    public static class ContractQueryResultStringBuilder {
        private String value;

        ContractQueryResultStringBuilder() {
        }

        /**
         * @return {@code this}.
         */
        @JsonProperty("data")
        public ContractQueryResultString.ContractQueryResultStringBuilder value(final String value) {
            this.value = value;
            return this;
        }

        public ContractQueryResultString build() {
            return new ContractQueryResultString(this.value);
        }

        @Override
        public String toString() {
            return "ContractQueryResultString.ContractQueryResultStringBuilder(value=" + this.value + ")";
        }
    }

    public static ContractQueryResultString.ContractQueryResultStringBuilder builder() {
        return new ContractQueryResultString.ContractQueryResultStringBuilder();
    }

    public String getValue() {
        return this.value;
    }

    @Override
    public boolean equals(final Object o) {
        if (o == this) return true;
        if (!(o instanceof ContractQueryResultString)) return false;
        final ContractQueryResultString other = (ContractQueryResultString) o;
        final Object this$value = this.getValue();
        final Object other$value = other.getValue();
        if (this$value == null ? other$value != null : !this$value.equals(other$value)) return false;
        return true;
    }

    @Override
    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final Object $value = this.getValue();
        result = result * PRIME + ($value == null ? 43 : $value.hashCode());
        return result;
    }

    @Override
    public String toString() {
        return "ContractQueryResultString(value=" + this.getValue() + ")";
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy