
com.infobip.model.WhatsAppEmail 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;
/**
* Array of emails information.
*/
public class WhatsAppEmail {
private String email;
private String type;
/**
* Sets email.
*
* Field description:
* Contact's email.
*
* @param email
* @return This {@link WhatsAppEmail instance}.
*/
public WhatsAppEmail email(String email) {
this.email = email;
return this;
}
/**
* Returns email.
*
* Field description:
* Contact's email.
*
* @return email
*/
@JsonProperty("email")
public String getEmail() {
return email;
}
/**
* Sets email.
*
* Field description:
* Contact's email.
*
* @param email
*/
@JsonProperty("email")
public void setEmail(String email) {
this.email = email;
}
/**
* Sets type.
*
* Field description:
* Type of the email. Can be `HOME` or `WORK`.
*
* @param type
* @return This {@link WhatsAppEmail instance}.
*/
public WhatsAppEmail type(String type) {
this.type = type;
return this;
}
/**
* Returns type.
*
* Field description:
* Type of the email. Can be `HOME` or `WORK`.
*
* @return type
*/
@JsonProperty("type")
public String getType() {
return type;
}
/**
* Sets type.
*
* Field description:
* Type of the email. Can be `HOME` or `WORK`.
*
* @param type
*/
@JsonProperty("type")
public void setType(String type) {
this.type = type;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
WhatsAppEmail whatsAppEmail = (WhatsAppEmail) o;
return Objects.equals(this.email, whatsAppEmail.email) && Objects.equals(this.type, whatsAppEmail.type);
}
@Override
public int hashCode() {
return Objects.hash(email, type);
}
@Override
public String toString() {
String newLine = System.lineSeparator();
return new StringBuilder()
.append("class WhatsAppEmail {")
.append(newLine)
.append(" email: ")
.append(toIndentedString(email))
.append(newLine)
.append(" type: ")
.append(toIndentedString(type))
.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);
}
}