live.radix.gateway.model.AccountDepositPreValidationDecidingFactorsResourceSpecificDetailsItem Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of babylon-gateway-client Show documentation
Show all versions of babylon-gateway-client Show documentation
A generated Client library for Radix Babylon Gateway API.
The newest version!
/*
* Radix Gateway API - Babylon
* This API is exposed by the Babylon Radix Gateway to enable clients to efficiently query current and historic state on the RadixDLT ledger, and intelligently handle transaction submission. It is designed for use by wallets and explorers, and for light queries from front-end dApps. For exchange/asset integrations, back-end dApp integrations, or simple use cases, you should consider using the Core API on a Node. A Gateway is only needed for reading historic snapshots of ledger states or a more robust set-up. The Gateway API is implemented by the [Network Gateway](https://github.com/radixdlt/babylon-gateway), which is configured to read from [full node(s)](https://github.com/radixdlt/babylon-node) to extract and index data from the network. This document is an API reference documentation, visit [User Guide](https://docs.radixdlt.com/) to learn more about how to run a Gateway of your own. ## Migration guide Please see [the latest release notes](https://github.com/radixdlt/babylon-gateway/releases). ## Integration and forward compatibility guarantees All responses may have additional fields added at any release, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. When the Radix protocol is updated, new functionality may be added, and so discriminated unions returned by the API may need to be updated to have new variants added, corresponding to the updated data. Clients may need to update in advance to be able to handle these new variants when a protocol update comes out. On the very rare occasions we need to make breaking changes to the API, these will be warned in advance with deprecation notices on previous versions. These deprecation notices will include a safe migration path. Deprecation notes or breaking changes will be flagged clearly in release notes for new versions of the Gateway. The Gateway DB schema is not subject to any compatibility guarantees, and may be changed at any release. DB changes will be flagged in the release notes so clients doing custom DB integrations can prepare.
*
* The version of the OpenAPI document: v1.6.3
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package live.radix.gateway.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import live.radix.gateway.model.AccountResourcePreferenceRule;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.StringJoiner;
/**
* AccountDepositPreValidationDecidingFactorsResourceSpecificDetailsItem
*/
@JsonPropertyOrder({
AccountDepositPreValidationDecidingFactorsResourceSpecificDetailsItem.JSON_PROPERTY_RESOURCE_ADDRESS,
AccountDepositPreValidationDecidingFactorsResourceSpecificDetailsItem.JSON_PROPERTY_VAULT_EXISTS,
AccountDepositPreValidationDecidingFactorsResourceSpecificDetailsItem.JSON_PROPERTY_IS_XRD,
AccountDepositPreValidationDecidingFactorsResourceSpecificDetailsItem.JSON_PROPERTY_RESOURCE_PREFERENCE_RULE
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-15T00:18:13.130575900+03:00[Europe/Kiev]", comments = "Generator version: 7.7.0")
public class AccountDepositPreValidationDecidingFactorsResourceSpecificDetailsItem {
public static final String JSON_PROPERTY_RESOURCE_ADDRESS = "resource_address";
private String resourceAddress;
public static final String JSON_PROPERTY_VAULT_EXISTS = "vault_exists";
private Boolean vaultExists;
public static final String JSON_PROPERTY_IS_XRD = "is_xrd";
private Boolean isXrd;
public static final String JSON_PROPERTY_RESOURCE_PREFERENCE_RULE = "resource_preference_rule";
private AccountResourcePreferenceRule resourcePreferenceRule;
public AccountDepositPreValidationDecidingFactorsResourceSpecificDetailsItem() {
}
public AccountDepositPreValidationDecidingFactorsResourceSpecificDetailsItem resourceAddress(String resourceAddress) {
this.resourceAddress = resourceAddress;
return this;
}
/**
* Bech32m-encoded human readable version of the address.
* @return resourceAddress
*/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_RESOURCE_ADDRESS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getResourceAddress() {
return resourceAddress;
}
@JsonProperty(JSON_PROPERTY_RESOURCE_ADDRESS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setResourceAddress(String resourceAddress) {
this.resourceAddress = resourceAddress;
}
public AccountDepositPreValidationDecidingFactorsResourceSpecificDetailsItem vaultExists(Boolean vaultExists) {
this.vaultExists = vaultExists;
return this;
}
/**
* Get vaultExists
* @return vaultExists
*/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_VAULT_EXISTS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public Boolean isVaultExists() {
return vaultExists;
}
@JsonProperty(JSON_PROPERTY_VAULT_EXISTS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setVaultExists(Boolean vaultExists) {
this.vaultExists = vaultExists;
}
public AccountDepositPreValidationDecidingFactorsResourceSpecificDetailsItem isXrd(Boolean isXrd) {
this.isXrd = isXrd;
return this;
}
/**
* Get isXrd
* @return isXrd
*/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_IS_XRD)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public Boolean isIsXrd() {
return isXrd;
}
@JsonProperty(JSON_PROPERTY_IS_XRD)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setIsXrd(Boolean isXrd) {
this.isXrd = isXrd;
}
public AccountDepositPreValidationDecidingFactorsResourceSpecificDetailsItem resourcePreferenceRule(AccountResourcePreferenceRule resourcePreferenceRule) {
this.resourcePreferenceRule = resourcePreferenceRule;
return this;
}
/**
* Get resourcePreferenceRule
* @return resourcePreferenceRule
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_RESOURCE_PREFERENCE_RULE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public AccountResourcePreferenceRule getResourcePreferenceRule() {
return resourcePreferenceRule;
}
@JsonProperty(JSON_PROPERTY_RESOURCE_PREFERENCE_RULE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setResourcePreferenceRule(AccountResourcePreferenceRule resourcePreferenceRule) {
this.resourcePreferenceRule = resourcePreferenceRule;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AccountDepositPreValidationDecidingFactorsResourceSpecificDetailsItem accountDepositPreValidationDecidingFactorsResourceSpecificDetailsItem = (AccountDepositPreValidationDecidingFactorsResourceSpecificDetailsItem) o;
return Objects.equals(this.resourceAddress, accountDepositPreValidationDecidingFactorsResourceSpecificDetailsItem.resourceAddress) &&
Objects.equals(this.vaultExists, accountDepositPreValidationDecidingFactorsResourceSpecificDetailsItem.vaultExists) &&
Objects.equals(this.isXrd, accountDepositPreValidationDecidingFactorsResourceSpecificDetailsItem.isXrd) &&
Objects.equals(this.resourcePreferenceRule, accountDepositPreValidationDecidingFactorsResourceSpecificDetailsItem.resourcePreferenceRule);
}
@Override
public int hashCode() {
return Objects.hash(resourceAddress, vaultExists, isXrd, resourcePreferenceRule);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AccountDepositPreValidationDecidingFactorsResourceSpecificDetailsItem {\n");
sb.append(" resourceAddress: ").append(toIndentedString(resourceAddress)).append("\n");
sb.append(" vaultExists: ").append(toIndentedString(vaultExists)).append("\n");
sb.append(" isXrd: ").append(toIndentedString(isXrd)).append("\n");
sb.append(" resourcePreferenceRule: ").append(toIndentedString(resourcePreferenceRule)).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(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
/**
* Convert the instance into URL query string.
*
* @return URL query string
*/
public String toUrlQueryString() {
return toUrlQueryString(null);
}
/**
* Convert the instance into URL query string.
*
* @param prefix prefix of the query string
* @return URL query string
*/
public String toUrlQueryString(String prefix) {
String suffix = "";
String containerSuffix = "";
String containerPrefix = "";
if (prefix == null) {
// style=form, explode=true, e.g. /pet?name=cat&type=manx
prefix = "";
} else {
// deepObject style e.g. /pet?id[name]=cat&id[type]=manx
prefix = prefix + "[";
suffix = "]";
containerSuffix = "]";
containerPrefix = "[";
}
StringJoiner joiner = new StringJoiner("&");
// add `resource_address` to the URL query string
if (getResourceAddress() != null) {
try {
joiner.add(String.format("%sresource_address%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getResourceAddress()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `vault_exists` to the URL query string
if (isVaultExists() != null) {
try {
joiner.add(String.format("%svault_exists%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(isVaultExists()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `is_xrd` to the URL query string
if (isIsXrd() != null) {
try {
joiner.add(String.format("%sis_xrd%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(isIsXrd()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `resource_preference_rule` to the URL query string
if (getResourcePreferenceRule() != null) {
try {
joiner.add(String.format("%sresource_preference_rule%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getResourcePreferenceRule()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
return joiner.toString();
}
}