All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.fireblocks.sdk.model.ExchangeAccountsPaged Maven / Gradle / Ivy
/*
* Fireblocks API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.6.2
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.fireblocks.sdk.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.StringJoiner;
/** ExchangeAccountsPaged */
@JsonPropertyOrder({
ExchangeAccountsPaged.JSON_PROPERTY_EXCHANGE_ACCOUNT,
ExchangeAccountsPaged.JSON_PROPERTY_PAGING,
ExchangeAccountsPaged.JSON_PROPERTY_PREV_URL,
ExchangeAccountsPaged.JSON_PROPERTY_NEXT_URL
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class ExchangeAccountsPaged {
public static final String JSON_PROPERTY_EXCHANGE_ACCOUNT = "ExchangeAccount";
private List exchangeAccount;
public static final String JSON_PROPERTY_PAGING = "paging";
private ExchangeAccountsPagedPaging paging;
public static final String JSON_PROPERTY_PREV_URL = "prevUrl";
private String prevUrl;
public static final String JSON_PROPERTY_NEXT_URL = "nextUrl";
private String nextUrl;
public ExchangeAccountsPaged() {}
public ExchangeAccountsPaged exchangeAccount(List exchangeAccount) {
this.exchangeAccount = exchangeAccount;
return this;
}
public ExchangeAccountsPaged addExchangeAccountItem(ExchangeAccount exchangeAccountItem) {
if (this.exchangeAccount == null) {
this.exchangeAccount = new ArrayList<>();
}
this.exchangeAccount.add(exchangeAccountItem);
return this;
}
/**
* Get exchangeAccount
*
* @return exchangeAccount
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_EXCHANGE_ACCOUNT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List getExchangeAccount() {
return exchangeAccount;
}
@JsonProperty(JSON_PROPERTY_EXCHANGE_ACCOUNT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setExchangeAccount(List exchangeAccount) {
this.exchangeAccount = exchangeAccount;
}
public ExchangeAccountsPaged paging(ExchangeAccountsPagedPaging paging) {
this.paging = paging;
return this;
}
/**
* Get paging
*
* @return paging
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_PAGING)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public ExchangeAccountsPagedPaging getPaging() {
return paging;
}
@JsonProperty(JSON_PROPERTY_PAGING)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPaging(ExchangeAccountsPagedPaging paging) {
this.paging = paging;
}
public ExchangeAccountsPaged prevUrl(String prevUrl) {
this.prevUrl = prevUrl;
return this;
}
/**
* Get prevUrl
*
* @return prevUrl
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_PREV_URL)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getPrevUrl() {
return prevUrl;
}
@JsonProperty(JSON_PROPERTY_PREV_URL)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPrevUrl(String prevUrl) {
this.prevUrl = prevUrl;
}
public ExchangeAccountsPaged nextUrl(String nextUrl) {
this.nextUrl = nextUrl;
return this;
}
/**
* Get nextUrl
*
* @return nextUrl
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_NEXT_URL)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getNextUrl() {
return nextUrl;
}
@JsonProperty(JSON_PROPERTY_NEXT_URL)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setNextUrl(String nextUrl) {
this.nextUrl = nextUrl;
}
/** Return true if this ExchangeAccountsPaged object is equal to o. */
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ExchangeAccountsPaged exchangeAccountsPaged = (ExchangeAccountsPaged) o;
return Objects.equals(this.exchangeAccount, exchangeAccountsPaged.exchangeAccount)
&& Objects.equals(this.paging, exchangeAccountsPaged.paging)
&& Objects.equals(this.prevUrl, exchangeAccountsPaged.prevUrl)
&& Objects.equals(this.nextUrl, exchangeAccountsPaged.nextUrl);
}
@Override
public int hashCode() {
return Objects.hash(exchangeAccount, paging, prevUrl, nextUrl);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ExchangeAccountsPaged {\n");
sb.append(" exchangeAccount: ").append(toIndentedString(exchangeAccount)).append("\n");
sb.append(" paging: ").append(toIndentedString(paging)).append("\n");
sb.append(" prevUrl: ").append(toIndentedString(prevUrl)).append("\n");
sb.append(" nextUrl: ").append(toIndentedString(nextUrl)).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 `ExchangeAccount` to the URL query string
if (getExchangeAccount() != null) {
for (int i = 0; i < getExchangeAccount().size(); i++) {
if (getExchangeAccount().get(i) != null) {
joiner.add(
getExchangeAccount()
.get(i)
.toUrlQueryString(
String.format(
"%sExchangeAccount%s%s",
prefix,
suffix,
"".equals(suffix)
? ""
: String.format(
"%s%d%s",
containerPrefix,
i,
containerSuffix))));
}
}
}
// add `paging` to the URL query string
if (getPaging() != null) {
joiner.add(getPaging().toUrlQueryString(prefix + "paging" + suffix));
}
// add `prevUrl` to the URL query string
if (getPrevUrl() != null) {
joiner.add(
String.format(
"%sprevUrl%s=%s",
prefix,
suffix,
URLEncoder.encode(String.valueOf(getPrevUrl()), StandardCharsets.UTF_8)
.replaceAll("\\+", "%20")));
}
// add `nextUrl` to the URL query string
if (getNextUrl() != null) {
joiner.add(
String.format(
"%snextUrl%s=%s",
prefix,
suffix,
URLEncoder.encode(String.valueOf(getNextUrl()), StandardCharsets.UTF_8)
.replaceAll("\\+", "%20")));
}
return joiner.toString();
}
}