
com.adyen.model.management.ListWebhooksResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of adyen-java-api-library Show documentation
Show all versions of adyen-java-api-library Show documentation
Adyen API Client Library for Java
/*
* Management API
*
* The version of the OpenAPI document: 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 com.adyen.model.management;
import java.util.Objects;
import java.util.Map;
import java.util.HashMap;
import com.adyen.model.management.PaginationLinks;
import com.adyen.model.management.Webhook;
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 java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.core.JsonProcessingException;
/**
* ListWebhooksResponse
*/
@JsonPropertyOrder({
ListWebhooksResponse.JSON_PROPERTY_LINKS,
ListWebhooksResponse.JSON_PROPERTY_ACCOUNT_REFERENCE,
ListWebhooksResponse.JSON_PROPERTY_DATA,
ListWebhooksResponse.JSON_PROPERTY_ITEMS_TOTAL,
ListWebhooksResponse.JSON_PROPERTY_PAGES_TOTAL
})
public class ListWebhooksResponse {
public static final String JSON_PROPERTY_LINKS = "_links";
private PaginationLinks links;
public static final String JSON_PROPERTY_ACCOUNT_REFERENCE = "accountReference";
private String accountReference;
public static final String JSON_PROPERTY_DATA = "data";
private List data;
public static final String JSON_PROPERTY_ITEMS_TOTAL = "itemsTotal";
private Integer itemsTotal;
public static final String JSON_PROPERTY_PAGES_TOTAL = "pagesTotal";
private Integer pagesTotal;
public ListWebhooksResponse() {
}
/**
* links
*
* @param links
* @return the current {@code ListWebhooksResponse} instance, allowing for method chaining
*/
public ListWebhooksResponse links(PaginationLinks links) {
this.links = links;
return this;
}
/**
* Get links
* @return links
*/
@JsonProperty(JSON_PROPERTY_LINKS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public PaginationLinks getLinks() {
return links;
}
/**
* links
*
* @param links
*/
@JsonProperty(JSON_PROPERTY_LINKS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setLinks(PaginationLinks links) {
this.links = links;
}
/**
* Reference to the account.
*
* @param accountReference Reference to the account.
* @return the current {@code ListWebhooksResponse} instance, allowing for method chaining
*/
public ListWebhooksResponse accountReference(String accountReference) {
this.accountReference = accountReference;
return this;
}
/**
* Reference to the account.
* @return accountReference Reference to the account.
*/
@JsonProperty(JSON_PROPERTY_ACCOUNT_REFERENCE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getAccountReference() {
return accountReference;
}
/**
* Reference to the account.
*
* @param accountReference Reference to the account.
*/
@JsonProperty(JSON_PROPERTY_ACCOUNT_REFERENCE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAccountReference(String accountReference) {
this.accountReference = accountReference;
}
/**
* The list of webhooks configured for this account.
*
* @param data The list of webhooks configured for this account.
* @return the current {@code ListWebhooksResponse} instance, allowing for method chaining
*/
public ListWebhooksResponse data(List data) {
this.data = data;
return this;
}
public ListWebhooksResponse addDataItem(Webhook dataItem) {
if (this.data == null) {
this.data = new ArrayList<>();
}
this.data.add(dataItem);
return this;
}
/**
* The list of webhooks configured for this account.
* @return data The list of webhooks configured for this account.
*/
@JsonProperty(JSON_PROPERTY_DATA)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List getData() {
return data;
}
/**
* The list of webhooks configured for this account.
*
* @param data The list of webhooks configured for this account.
*/
@JsonProperty(JSON_PROPERTY_DATA)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setData(List data) {
this.data = data;
}
/**
* Total number of items.
*
* @param itemsTotal Total number of items.
* @return the current {@code ListWebhooksResponse} instance, allowing for method chaining
*/
public ListWebhooksResponse itemsTotal(Integer itemsTotal) {
this.itemsTotal = itemsTotal;
return this;
}
/**
* Total number of items.
* @return itemsTotal Total number of items.
*/
@JsonProperty(JSON_PROPERTY_ITEMS_TOTAL)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Integer getItemsTotal() {
return itemsTotal;
}
/**
* Total number of items.
*
* @param itemsTotal Total number of items.
*/
@JsonProperty(JSON_PROPERTY_ITEMS_TOTAL)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setItemsTotal(Integer itemsTotal) {
this.itemsTotal = itemsTotal;
}
/**
* Total number of pages.
*
* @param pagesTotal Total number of pages.
* @return the current {@code ListWebhooksResponse} instance, allowing for method chaining
*/
public ListWebhooksResponse pagesTotal(Integer pagesTotal) {
this.pagesTotal = pagesTotal;
return this;
}
/**
* Total number of pages.
* @return pagesTotal Total number of pages.
*/
@JsonProperty(JSON_PROPERTY_PAGES_TOTAL)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Integer getPagesTotal() {
return pagesTotal;
}
/**
* Total number of pages.
*
* @param pagesTotal Total number of pages.
*/
@JsonProperty(JSON_PROPERTY_PAGES_TOTAL)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPagesTotal(Integer pagesTotal) {
this.pagesTotal = pagesTotal;
}
/**
* Return true if this ListWebhooksResponse object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ListWebhooksResponse listWebhooksResponse = (ListWebhooksResponse) o;
return Objects.equals(this.links, listWebhooksResponse.links) &&
Objects.equals(this.accountReference, listWebhooksResponse.accountReference) &&
Objects.equals(this.data, listWebhooksResponse.data) &&
Objects.equals(this.itemsTotal, listWebhooksResponse.itemsTotal) &&
Objects.equals(this.pagesTotal, listWebhooksResponse.pagesTotal);
}
@Override
public int hashCode() {
return Objects.hash(links, accountReference, data, itemsTotal, pagesTotal);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ListWebhooksResponse {\n");
sb.append(" links: ").append(toIndentedString(links)).append("\n");
sb.append(" accountReference: ").append(toIndentedString(accountReference)).append("\n");
sb.append(" data: ").append(toIndentedString(data)).append("\n");
sb.append(" itemsTotal: ").append(toIndentedString(itemsTotal)).append("\n");
sb.append(" pagesTotal: ").append(toIndentedString(pagesTotal)).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 ");
}
/**
* Create an instance of ListWebhooksResponse given an JSON string
*
* @param jsonString JSON string
* @return An instance of ListWebhooksResponse
* @throws JsonProcessingException if the JSON string is invalid with respect to ListWebhooksResponse
*/
public static ListWebhooksResponse fromJson(String jsonString) throws JsonProcessingException {
return JSON.getMapper().readValue(jsonString, ListWebhooksResponse.class);
}
/**
* Convert an instance of ListWebhooksResponse to an JSON string
*
* @return JSON string
*/
public String toJson() throws JsonProcessingException {
return JSON.getMapper().writeValueAsString(this);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy