
com.infobip.model.WhatsAppWebhookInboundImageContent 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;
/**
* Represents WhatsAppWebhookInboundImageContent model.
*/
public class WhatsAppWebhookInboundImageContent extends WhatsAppWebhookInboundContent {
private String url;
private String caption;
private WhatsAppContext context;
private WhatsAppReferral referral;
/**
* Constructs a new {@link WhatsAppWebhookInboundImageContent} instance.
*/
public WhatsAppWebhookInboundImageContent() {
super("IMAGE");
}
/**
* Sets url.
*
* Field description:
* URL for media download.
*
* The field is required.
*
* @param url
* @return This {@link WhatsAppWebhookInboundImageContent instance}.
*/
public WhatsAppWebhookInboundImageContent url(String url) {
this.url = url;
return this;
}
/**
* Returns url.
*
* Field description:
* URL for media download.
*
* The field is required.
*
* @return url
*/
@JsonProperty("url")
public String getUrl() {
return url;
}
/**
* Sets url.
*
* Field description:
* URL for media download.
*
* The field is required.
*
* @param url
*/
@JsonProperty("url")
public void setUrl(String url) {
this.url = url;
}
/**
* Sets caption.
*
* Field description:
* Media Caption.
*
* @param caption
* @return This {@link WhatsAppWebhookInboundImageContent instance}.
*/
public WhatsAppWebhookInboundImageContent caption(String caption) {
this.caption = caption;
return this;
}
/**
* Returns caption.
*
* Field description:
* Media Caption.
*
* @return caption
*/
@JsonProperty("caption")
public String getCaption() {
return caption;
}
/**
* Sets caption.
*
* Field description:
* Media Caption.
*
* @param caption
*/
@JsonProperty("caption")
public void setCaption(String caption) {
this.caption = caption;
}
/**
* Sets context.
*
* @param context
* @return This {@link WhatsAppWebhookInboundImageContent instance}.
*/
public WhatsAppWebhookInboundImageContent context(WhatsAppContext context) {
this.context = context;
return this;
}
/**
* Returns context.
*
* @return context
*/
@JsonProperty("context")
public WhatsAppContext getContext() {
return context;
}
/**
* Sets context.
*
* @param context
*/
@JsonProperty("context")
public void setContext(WhatsAppContext context) {
this.context = context;
}
/**
* Sets referral.
*
* @param referral
* @return This {@link WhatsAppWebhookInboundImageContent instance}.
*/
public WhatsAppWebhookInboundImageContent referral(WhatsAppReferral referral) {
this.referral = referral;
return this;
}
/**
* Returns referral.
*
* @return referral
*/
@JsonProperty("referral")
public WhatsAppReferral getReferral() {
return referral;
}
/**
* Sets referral.
*
* @param referral
*/
@JsonProperty("referral")
public void setReferral(WhatsAppReferral referral) {
this.referral = referral;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
WhatsAppWebhookInboundImageContent whatsAppWebhookInboundImageContent = (WhatsAppWebhookInboundImageContent) o;
return Objects.equals(this.url, whatsAppWebhookInboundImageContent.url)
&& Objects.equals(this.caption, whatsAppWebhookInboundImageContent.caption)
&& Objects.equals(this.context, whatsAppWebhookInboundImageContent.context)
&& Objects.equals(this.referral, whatsAppWebhookInboundImageContent.referral)
&& super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(url, caption, context, referral, super.hashCode());
}
@Override
public String toString() {
String newLine = System.lineSeparator();
return new StringBuilder()
.append("class WhatsAppWebhookInboundImageContent {")
.append(newLine)
.append(" ")
.append(toIndentedString(super.toString()))
.append(newLine)
.append(" url: ")
.append(toIndentedString(url))
.append(newLine)
.append(" caption: ")
.append(toIndentedString(caption))
.append(newLine)
.append(" context: ")
.append(toIndentedString(context))
.append(newLine)
.append(" referral: ")
.append(toIndentedString(referral))
.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);
}
}