
com.xero.models.accounting.Phone Maven / Gradle / Ivy
/*
* Xero Accounting API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* 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.xero.models.accounting;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonValue;
import com.xero.api.StringUtil;
import io.swagger.annotations.ApiModelProperty;
import java.util.Objects;
/** Phone */
public class Phone {
StringUtil util = new StringUtil();
/** Gets or Sets phoneType */
public enum PhoneTypeEnum {
/** DEFAULT */
DEFAULT("DEFAULT"),
/** DDI */
DDI("DDI"),
/** MOBILE */
MOBILE("MOBILE"),
/** FAX */
FAX("FAX"),
/** OFFICE */
OFFICE("OFFICE");
private String value;
PhoneTypeEnum(String value) {
this.value = value;
}
/**
* getValue
*
* @return String value
*/
@JsonValue
public String getValue() {
return value;
}
/**
* toString
*
* @return String value
*/
@Override
public String toString() {
return String.valueOf(value);
}
/**
* fromValue
*
* @param value String
*/
@JsonCreator
public static PhoneTypeEnum fromValue(String value) {
for (PhoneTypeEnum b : PhoneTypeEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
@JsonProperty("PhoneType")
private PhoneTypeEnum phoneType;
@JsonProperty("PhoneNumber")
private String phoneNumber;
@JsonProperty("PhoneAreaCode")
private String phoneAreaCode;
@JsonProperty("PhoneCountryCode")
private String phoneCountryCode;
/**
* phoneType
*
* @param phoneType PhoneTypeEnum
* @return Phone
*/
public Phone phoneType(PhoneTypeEnum phoneType) {
this.phoneType = phoneType;
return this;
}
/**
* Get phoneType
*
* @return phoneType
*/
@ApiModelProperty(value = "")
/**
* phoneType
*
* @return phoneType PhoneTypeEnum
*/
public PhoneTypeEnum getPhoneType() {
return phoneType;
}
/**
* phoneType
*
* @param phoneType PhoneTypeEnum
*/
public void setPhoneType(PhoneTypeEnum phoneType) {
this.phoneType = phoneType;
}
/**
* max length = 50
*
* @param phoneNumber String
* @return Phone
*/
public Phone phoneNumber(String phoneNumber) {
this.phoneNumber = phoneNumber;
return this;
}
/**
* max length = 50
*
* @return phoneNumber
*/
@ApiModelProperty(value = "max length = 50")
/**
* max length = 50
*
* @return phoneNumber String
*/
public String getPhoneNumber() {
return phoneNumber;
}
/**
* max length = 50
*
* @param phoneNumber String
*/
public void setPhoneNumber(String phoneNumber) {
this.phoneNumber = phoneNumber;
}
/**
* max length = 10
*
* @param phoneAreaCode String
* @return Phone
*/
public Phone phoneAreaCode(String phoneAreaCode) {
this.phoneAreaCode = phoneAreaCode;
return this;
}
/**
* max length = 10
*
* @return phoneAreaCode
*/
@ApiModelProperty(value = "max length = 10")
/**
* max length = 10
*
* @return phoneAreaCode String
*/
public String getPhoneAreaCode() {
return phoneAreaCode;
}
/**
* max length = 10
*
* @param phoneAreaCode String
*/
public void setPhoneAreaCode(String phoneAreaCode) {
this.phoneAreaCode = phoneAreaCode;
}
/**
* max length = 20
*
* @param phoneCountryCode String
* @return Phone
*/
public Phone phoneCountryCode(String phoneCountryCode) {
this.phoneCountryCode = phoneCountryCode;
return this;
}
/**
* max length = 20
*
* @return phoneCountryCode
*/
@ApiModelProperty(value = "max length = 20")
/**
* max length = 20
*
* @return phoneCountryCode String
*/
public String getPhoneCountryCode() {
return phoneCountryCode;
}
/**
* max length = 20
*
* @param phoneCountryCode String
*/
public void setPhoneCountryCode(String phoneCountryCode) {
this.phoneCountryCode = phoneCountryCode;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Phone phone = (Phone) o;
return Objects.equals(this.phoneType, phone.phoneType)
&& Objects.equals(this.phoneNumber, phone.phoneNumber)
&& Objects.equals(this.phoneAreaCode, phone.phoneAreaCode)
&& Objects.equals(this.phoneCountryCode, phone.phoneCountryCode);
}
@Override
public int hashCode() {
return Objects.hash(phoneType, phoneNumber, phoneAreaCode, phoneCountryCode);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Phone {\n");
sb.append(" phoneType: ").append(toIndentedString(phoneType)).append("\n");
sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n");
sb.append(" phoneAreaCode: ").append(toIndentedString(phoneAreaCode)).append("\n");
sb.append(" phoneCountryCode: ").append(toIndentedString(phoneCountryCode)).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(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy