com.infobip.model.CallsDialogPage Maven / Gradle / Ivy
Show all versions of infobip-api-java-client Show documentation
/*
* This class is auto generated from the Infobip OpenAPI specification
* through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR),
* powered by the OpenAPI Generator (https://openapi-generator.tech).
*
* Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide
* or contact us @ [email protected].
*/
package com.infobip.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
/**
* Represents CallsDialogPage model.
*/
public class CallsDialogPage {
private List results = null;
private PageInfo paging;
/**
* Sets results.
*
* Field description:
* The list of the results for this page.
*
* @param results
* @return This {@link CallsDialogPage instance}.
*/
public CallsDialogPage results(List results) {
this.results = results;
return this;
}
/**
* Adds and item into results.
*
* Field description:
* The list of the results for this page.
*
* @param resultsItem The item to be added to the list.
* @return This {@link CallsDialogPage instance}.
*/
public CallsDialogPage addResultsItem(CallsDialogResponse resultsItem) {
if (this.results == null) {
this.results = new ArrayList<>();
}
this.results.add(resultsItem);
return this;
}
/**
* Returns results.
*
* Field description:
* The list of the results for this page.
*
* @return results
*/
@JsonProperty("results")
public List getResults() {
return results;
}
/**
* Sets results.
*
* Field description:
* The list of the results for this page.
*
* @param results
*/
@JsonProperty("results")
public void setResults(List results) {
this.results = results;
}
/**
* Sets paging.
*
* @param paging
* @return This {@link CallsDialogPage instance}.
*/
public CallsDialogPage paging(PageInfo paging) {
this.paging = paging;
return this;
}
/**
* Returns paging.
*
* @return paging
*/
@JsonProperty("paging")
public PageInfo getPaging() {
return paging;
}
/**
* Sets paging.
*
* @param paging
*/
@JsonProperty("paging")
public void setPaging(PageInfo paging) {
this.paging = paging;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CallsDialogPage callsDialogPage = (CallsDialogPage) o;
return Objects.equals(this.results, callsDialogPage.results)
&& Objects.equals(this.paging, callsDialogPage.paging);
}
@Override
public int hashCode() {
return Objects.hash(results, paging);
}
@Override
public String toString() {
String newLine = System.lineSeparator();
return new StringBuilder()
.append("class CallsDialogPage {")
.append(newLine)
.append(" results: ")
.append(toIndentedString(results))
.append(newLine)
.append(" paging: ")
.append(toIndentedString(paging))
.append(newLine)
.append("}")
.toString();
}
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
String lineSeparator = System.lineSeparator();
String lineSeparatorFollowedByIndentation = lineSeparator + " ";
return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation);
}
}