
com.infobip.model.CallsErrorCodeInfo Maven / Gradle / Ivy
/*
* 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.Objects;
/**
* Reason why the call has finished.
*/
public class CallsErrorCodeInfo {
private Integer id;
private String name;
private String description;
/**
* Sets id.
*
* Field description:
* Unique ErrorCode ID.
*
* @param id
* @return This {@link CallsErrorCodeInfo instance}.
*/
public CallsErrorCodeInfo id(Integer id) {
this.id = id;
return this;
}
/**
* Returns id.
*
* Field description:
* Unique ErrorCode ID.
*
* @return id
*/
@JsonProperty("id")
public Integer getId() {
return id;
}
/**
* Sets id.
*
* Field description:
* Unique ErrorCode ID.
*
* @param id
*/
@JsonProperty("id")
public void setId(Integer id) {
this.id = id;
}
/**
* Sets name.
*
* Field description:
* Unique ErrorCode name in machine-readable format.
*
* @param name
* @return This {@link CallsErrorCodeInfo instance}.
*/
public CallsErrorCodeInfo name(String name) {
this.name = name;
return this;
}
/**
* Returns name.
*
* Field description:
* Unique ErrorCode name in machine-readable format.
*
* @return name
*/
@JsonProperty("name")
public String getName() {
return name;
}
/**
* Sets name.
*
* Field description:
* Unique ErrorCode name in machine-readable format.
*
* @param name
*/
@JsonProperty("name")
public void setName(String name) {
this.name = name;
}
/**
* Sets description.
*
* Field description:
* ErrorCode description in human-readable format.
*
* @param description
* @return This {@link CallsErrorCodeInfo instance}.
*/
public CallsErrorCodeInfo description(String description) {
this.description = description;
return this;
}
/**
* Returns description.
*
* Field description:
* ErrorCode description in human-readable format.
*
* @return description
*/
@JsonProperty("description")
public String getDescription() {
return description;
}
/**
* Sets description.
*
* Field description:
* ErrorCode description in human-readable format.
*
* @param description
*/
@JsonProperty("description")
public void setDescription(String description) {
this.description = description;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CallsErrorCodeInfo callsErrorCodeInfo = (CallsErrorCodeInfo) o;
return Objects.equals(this.id, callsErrorCodeInfo.id)
&& Objects.equals(this.name, callsErrorCodeInfo.name)
&& Objects.equals(this.description, callsErrorCodeInfo.description);
}
@Override
public int hashCode() {
return Objects.hash(id, name, description);
}
@Override
public String toString() {
String newLine = System.lineSeparator();
return new StringBuilder()
.append("class CallsErrorCodeInfo {")
.append(newLine)
.append(" id: ")
.append(toIndentedString(id))
.append(newLine)
.append(" name: ")
.append(toIndentedString(name))
.append(newLine)
.append(" description: ")
.append(toIndentedString(description))
.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);
}
}