live.radix.gateway.model.StateEntityDetailsResponseComponentDetails 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.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import live.radix.gateway.model.ComponentEntityRoleAssignments;
import live.radix.gateway.model.ComponentRoyaltyConfig;
import live.radix.gateway.model.StateEntityDetailsResponseItemDetails;
import live.radix.gateway.model.StateEntityDetailsResponseItemDetailsType;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.StringJoiner;
/**
* StateEntityDetailsResponseComponentDetails
*/
@JsonPropertyOrder({
StateEntityDetailsResponseComponentDetails.JSON_PROPERTY_PACKAGE_ADDRESS,
StateEntityDetailsResponseComponentDetails.JSON_PROPERTY_BLUEPRINT_NAME,
StateEntityDetailsResponseComponentDetails.JSON_PROPERTY_BLUEPRINT_VERSION,
StateEntityDetailsResponseComponentDetails.JSON_PROPERTY_STATE,
StateEntityDetailsResponseComponentDetails.JSON_PROPERTY_ROLE_ASSIGNMENTS,
StateEntityDetailsResponseComponentDetails.JSON_PROPERTY_ROYALTY_VAULT_BALANCE,
StateEntityDetailsResponseComponentDetails.JSON_PROPERTY_ROYALTY_CONFIG
})
@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")
@JsonIgnoreProperties(
value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization
allowSetters = true // allows the type to be set during deserialization
)
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true)
public class StateEntityDetailsResponseComponentDetails extends StateEntityDetailsResponseItemDetails {
public static final String JSON_PROPERTY_PACKAGE_ADDRESS = "package_address";
private String packageAddress;
public static final String JSON_PROPERTY_BLUEPRINT_NAME = "blueprint_name";
private String blueprintName;
public static final String JSON_PROPERTY_BLUEPRINT_VERSION = "blueprint_version";
private String blueprintVersion;
public static final String JSON_PROPERTY_STATE = "state";
private Object state;
public static final String JSON_PROPERTY_ROLE_ASSIGNMENTS = "role_assignments";
private ComponentEntityRoleAssignments roleAssignments;
public static final String JSON_PROPERTY_ROYALTY_VAULT_BALANCE = "royalty_vault_balance";
private String royaltyVaultBalance;
public static final String JSON_PROPERTY_ROYALTY_CONFIG = "royalty_config";
private ComponentRoyaltyConfig royaltyConfig;
public StateEntityDetailsResponseComponentDetails() {
}
public StateEntityDetailsResponseComponentDetails packageAddress(String packageAddress) {
this.packageAddress = packageAddress;
return this;
}
/**
* Bech32m-encoded human readable version of the address.
* @return packageAddress
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_PACKAGE_ADDRESS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getPackageAddress() {
return packageAddress;
}
@JsonProperty(JSON_PROPERTY_PACKAGE_ADDRESS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPackageAddress(String packageAddress) {
this.packageAddress = packageAddress;
}
public StateEntityDetailsResponseComponentDetails blueprintName(String blueprintName) {
this.blueprintName = blueprintName;
return this;
}
/**
* Get blueprintName
* @return blueprintName
*/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_BLUEPRINT_NAME)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getBlueprintName() {
return blueprintName;
}
@JsonProperty(JSON_PROPERTY_BLUEPRINT_NAME)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setBlueprintName(String blueprintName) {
this.blueprintName = blueprintName;
}
public StateEntityDetailsResponseComponentDetails blueprintVersion(String blueprintVersion) {
this.blueprintVersion = blueprintVersion;
return this;
}
/**
* Get blueprintVersion
* @return blueprintVersion
*/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_BLUEPRINT_VERSION)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getBlueprintVersion() {
return blueprintVersion;
}
@JsonProperty(JSON_PROPERTY_BLUEPRINT_VERSION)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setBlueprintVersion(String blueprintVersion) {
this.blueprintVersion = blueprintVersion;
}
public StateEntityDetailsResponseComponentDetails state(Object state) {
this.state = state;
return this;
}
/**
* A representation of a component's inner state. If this entity is a `GenericComponent`, this field will be in a programmatic JSON structure (you can deserialize it as a `ProgrammaticScryptoSborValue`). Otherwise, for \"native\" components such as `Account`, `Validator`, `AccessController`, `OneResourcePool`, `TwoResourcePool`, and `MultiResourcePool`, this field will be a custom JSON model defined in the Core API schema.
* @return state
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_STATE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Object getState() {
return state;
}
@JsonProperty(JSON_PROPERTY_STATE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setState(Object state) {
this.state = state;
}
public StateEntityDetailsResponseComponentDetails roleAssignments(ComponentEntityRoleAssignments roleAssignments) {
this.roleAssignments = roleAssignments;
return this;
}
/**
* Get roleAssignments
* @return roleAssignments
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_ROLE_ASSIGNMENTS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public ComponentEntityRoleAssignments getRoleAssignments() {
return roleAssignments;
}
@JsonProperty(JSON_PROPERTY_ROLE_ASSIGNMENTS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setRoleAssignments(ComponentEntityRoleAssignments roleAssignments) {
this.roleAssignments = roleAssignments;
}
public StateEntityDetailsResponseComponentDetails royaltyVaultBalance(String royaltyVaultBalance) {
this.royaltyVaultBalance = royaltyVaultBalance;
return this;
}
/**
* String-encoded decimal representing the amount of a related fungible resource.
* @return royaltyVaultBalance
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_ROYALTY_VAULT_BALANCE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getRoyaltyVaultBalance() {
return royaltyVaultBalance;
}
@JsonProperty(JSON_PROPERTY_ROYALTY_VAULT_BALANCE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setRoyaltyVaultBalance(String royaltyVaultBalance) {
this.royaltyVaultBalance = royaltyVaultBalance;
}
public StateEntityDetailsResponseComponentDetails royaltyConfig(ComponentRoyaltyConfig royaltyConfig) {
this.royaltyConfig = royaltyConfig;
return this;
}
/**
* Get royaltyConfig
* @return royaltyConfig
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_ROYALTY_CONFIG)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public ComponentRoyaltyConfig getRoyaltyConfig() {
return royaltyConfig;
}
@JsonProperty(JSON_PROPERTY_ROYALTY_CONFIG)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setRoyaltyConfig(ComponentRoyaltyConfig royaltyConfig) {
this.royaltyConfig = royaltyConfig;
}
@Override
public StateEntityDetailsResponseComponentDetails type(StateEntityDetailsResponseItemDetailsType type) {
this.setType(type);
return this;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
StateEntityDetailsResponseComponentDetails stateEntityDetailsResponseComponentDetails = (StateEntityDetailsResponseComponentDetails) o;
return Objects.equals(this.packageAddress, stateEntityDetailsResponseComponentDetails.packageAddress) &&
Objects.equals(this.blueprintName, stateEntityDetailsResponseComponentDetails.blueprintName) &&
Objects.equals(this.blueprintVersion, stateEntityDetailsResponseComponentDetails.blueprintVersion) &&
Objects.equals(this.state, stateEntityDetailsResponseComponentDetails.state) &&
Objects.equals(this.roleAssignments, stateEntityDetailsResponseComponentDetails.roleAssignments) &&
Objects.equals(this.royaltyVaultBalance, stateEntityDetailsResponseComponentDetails.royaltyVaultBalance) &&
Objects.equals(this.royaltyConfig, stateEntityDetailsResponseComponentDetails.royaltyConfig) &&
super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(packageAddress, blueprintName, blueprintVersion, state, roleAssignments, royaltyVaultBalance, royaltyConfig, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class StateEntityDetailsResponseComponentDetails {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" packageAddress: ").append(toIndentedString(packageAddress)).append("\n");
sb.append(" blueprintName: ").append(toIndentedString(blueprintName)).append("\n");
sb.append(" blueprintVersion: ").append(toIndentedString(blueprintVersion)).append("\n");
sb.append(" state: ").append(toIndentedString(state)).append("\n");
sb.append(" roleAssignments: ").append(toIndentedString(roleAssignments)).append("\n");
sb.append(" royaltyVaultBalance: ").append(toIndentedString(royaltyVaultBalance)).append("\n");
sb.append(" royaltyConfig: ").append(toIndentedString(royaltyConfig)).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 `type` to the URL query string
if (getType() != null) {
try {
joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `package_address` to the URL query string
if (getPackageAddress() != null) {
try {
joiner.add(String.format("%spackage_address%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPackageAddress()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `blueprint_name` to the URL query string
if (getBlueprintName() != null) {
try {
joiner.add(String.format("%sblueprint_name%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getBlueprintName()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `blueprint_version` to the URL query string
if (getBlueprintVersion() != null) {
try {
joiner.add(String.format("%sblueprint_version%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getBlueprintVersion()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `state` to the URL query string
if (getState() != null) {
try {
joiner.add(String.format("%sstate%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getState()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `role_assignments` to the URL query string
if (getRoleAssignments() != null) {
joiner.add(getRoleAssignments().toUrlQueryString(prefix + "role_assignments" + suffix));
}
// add `royalty_vault_balance` to the URL query string
if (getRoyaltyVaultBalance() != null) {
try {
joiner.add(String.format("%sroyalty_vault_balance%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getRoyaltyVaultBalance()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `royalty_config` to the URL query string
if (getRoyaltyConfig() != null) {
joiner.add(getRoyaltyConfig().toUrlQueryString(prefix + "royalty_config" + suffix));
}
return joiner.toString();
}
}