
com.infobip.model.ViberWebhooks 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;
/**
* Provides options for configuring message webhooks.
*/
public class ViberWebhooks {
private ViberMessageDeliveryReporting delivery;
private String contentType;
private String callbackData;
/**
* Sets delivery.
*
* @param delivery
* @return This {@link ViberWebhooks instance}.
*/
public ViberWebhooks delivery(ViberMessageDeliveryReporting delivery) {
this.delivery = delivery;
return this;
}
/**
* Returns delivery.
*
* @return delivery
*/
@JsonProperty("delivery")
public ViberMessageDeliveryReporting getDelivery() {
return delivery;
}
/**
* Sets delivery.
*
* @param delivery
*/
@JsonProperty("delivery")
public void setDelivery(ViberMessageDeliveryReporting delivery) {
this.delivery = delivery;
}
/**
* Sets contentType.
*
* Field description:
* Preferred delivery report content type, `application/json` or `application/xml`.
*
* @param contentType
* @return This {@link ViberWebhooks instance}.
*/
public ViberWebhooks contentType(String contentType) {
this.contentType = contentType;
return this;
}
/**
* Returns contentType.
*
* Field description:
* Preferred delivery report content type, `application/json` or `application/xml`.
*
* @return contentType
*/
@JsonProperty("contentType")
public String getContentType() {
return contentType;
}
/**
* Sets contentType.
*
* Field description:
* Preferred delivery report content type, `application/json` or `application/xml`.
*
* @param contentType
*/
@JsonProperty("contentType")
public void setContentType(String contentType) {
this.contentType = contentType;
}
/**
* Sets callbackData.
*
* Field description:
* Additional data that can be used for identifying, managing, or monitoring a message. Data included here will also be automatically included in the message Delivery Report. The maximum value is 4000 characters.
*
* @param callbackData
* @return This {@link ViberWebhooks instance}.
*/
public ViberWebhooks callbackData(String callbackData) {
this.callbackData = callbackData;
return this;
}
/**
* Returns callbackData.
*
* Field description:
* Additional data that can be used for identifying, managing, or monitoring a message. Data included here will also be automatically included in the message Delivery Report. The maximum value is 4000 characters.
*
* @return callbackData
*/
@JsonProperty("callbackData")
public String getCallbackData() {
return callbackData;
}
/**
* Sets callbackData.
*
* Field description:
* Additional data that can be used for identifying, managing, or monitoring a message. Data included here will also be automatically included in the message Delivery Report. The maximum value is 4000 characters.
*
* @param callbackData
*/
@JsonProperty("callbackData")
public void setCallbackData(String callbackData) {
this.callbackData = callbackData;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ViberWebhooks viberWebhooks = (ViberWebhooks) o;
return Objects.equals(this.delivery, viberWebhooks.delivery)
&& Objects.equals(this.contentType, viberWebhooks.contentType)
&& Objects.equals(this.callbackData, viberWebhooks.callbackData);
}
@Override
public int hashCode() {
return Objects.hash(delivery, contentType, callbackData);
}
@Override
public String toString() {
String newLine = System.lineSeparator();
return new StringBuilder()
.append("class ViberWebhooks {")
.append(newLine)
.append(" delivery: ")
.append(toIndentedString(delivery))
.append(newLine)
.append(" contentType: ")
.append(toIndentedString(contentType))
.append(newLine)
.append(" callbackData: ")
.append(toIndentedString(callbackData))
.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);
}
}