
com.unblu.webapi.model.v4.BotDialogClosedRequest Maven / Gradle / Ivy
package com.unblu.webapi.model.v4;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* Request sent when a dialog between a person and a bot closes. <br> After this request has been received, no further messages can be sent in this
* dialog.<br> It should be used to clean up all resources related to this dialog. <p> <b>Note:</b> This request may be sent before the
* bot actively hands off the dialog, for example, if the conversation is ended beforehand or the counterpart leaves the conversation. <p> The request is
* only delivered to the dialog bots that accepted the dialog offer for this dialog.
*/
@ApiModel(description = "Request sent when a dialog between a person and a bot closes.
After this request has been received, no further messages can be sent in this dialog.
It should be used to clean up all resources related to this dialog. Note: This request may be sent before the bot actively hands off the dialog, for example, if the conversation is ended beforehand or the counterpart leaves the conversation.
The request is only delivered to the dialog bots that accepted the dialog offer for this dialog.")
@JsonPropertyOrder({
BotDialogClosedRequest.JSON_PROPERTY_$_TYPE,
BotDialogClosedRequest.JSON_PROPERTY_ACCOUNT_ID,
BotDialogClosedRequest.JSON_PROPERTY_SERVICE_NAME,
BotDialogClosedRequest.JSON_PROPERTY_DIALOG_TOKEN,
BotDialogClosedRequest.JSON_PROPERTY_CONVERSATION_ID,
BotDialogClosedRequest.JSON_PROPERTY_COUNTERPART_PERSON_ID,
})
@JsonAutoDetect(creatorVisibility = Visibility.NONE, fieldVisibility = Visibility.NONE, getterVisibility = Visibility.NONE, isGetterVisibility = Visibility.NONE, setterVisibility = Visibility.NONE)
public class BotDialogClosedRequest {
/**
* Gets or Sets $type
*/
public enum TypeEnum {
BOTDIALOGCLOSEDREQUEST("BotDialogClosedRequest");
private String value;
TypeEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static TypeEnum fromValue(String value) {
for (TypeEnum b : TypeEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
return TypeEnum.BOTDIALOGCLOSEDREQUEST;
}
}
public static final String JSON_PROPERTY_$_TYPE = "$_type";
@JsonProperty(JSON_PROPERTY_$_TYPE)
private TypeEnum $type = TypeEnum.BOTDIALOGCLOSEDREQUEST;
public static final String JSON_PROPERTY_ACCOUNT_ID = "accountId";
@JsonProperty(JSON_PROPERTY_ACCOUNT_ID)
private String accountId;
public static final String JSON_PROPERTY_SERVICE_NAME = "serviceName";
@JsonProperty(JSON_PROPERTY_SERVICE_NAME)
private String serviceName;
public static final String JSON_PROPERTY_DIALOG_TOKEN = "dialogToken";
@JsonProperty(JSON_PROPERTY_DIALOG_TOKEN)
private String dialogToken;
public static final String JSON_PROPERTY_CONVERSATION_ID = "conversationId";
@JsonProperty(JSON_PROPERTY_CONVERSATION_ID)
private String conversationId;
public static final String JSON_PROPERTY_COUNTERPART_PERSON_ID = "counterpartPersonId";
@JsonProperty(JSON_PROPERTY_COUNTERPART_PERSON_ID)
private String counterpartPersonId;
public BotDialogClosedRequest $type(TypeEnum $type) {
this.$type = $type;
return this;
}
/**
* Get $type
*
* @return $type
**/
@ApiModelProperty(value = "")
public TypeEnum get$Type() {
return $type;
}
public void set$Type(TypeEnum $type) {
this.$type = $type;
}
public BotDialogClosedRequest accountId(String accountId) {
this.accountId = accountId;
return this;
}
/**
* Get accountId
*
* @return accountId
**/
@ApiModelProperty(value = "")
public String getAccountId() {
return accountId;
}
public void setAccountId(String accountId) {
this.accountId = accountId;
}
public BotDialogClosedRequest serviceName(String serviceName) {
this.serviceName = serviceName;
return this;
}
/**
* Get serviceName
*
* @return serviceName
**/
@ApiModelProperty(value = "")
public String getServiceName() {
return serviceName;
}
public void setServiceName(String serviceName) {
this.serviceName = serviceName;
}
public BotDialogClosedRequest dialogToken(String dialogToken) {
this.dialogToken = dialogToken;
return this;
}
/**
* Token for this dialog. It is present in every dialog webhook and must be passed to all bot web API service calls to identify the dialog.
*
* @return dialogToken
**/
@ApiModelProperty(value = "Token for this dialog. It is present in every dialog webhook and must be passed to all bot web API service calls to identify the dialog.")
public String getDialogToken() {
return dialogToken;
}
public void setDialogToken(String dialogToken) {
this.dialogToken = dialogToken;
}
public BotDialogClosedRequest conversationId(String conversationId) {
this.conversationId = conversationId;
return this;
}
/**
* The ID of the conversation this dialog belongs to.
*
* @return conversationId
**/
@ApiModelProperty(value = "The ID of the conversation this dialog belongs to.")
public String getConversationId() {
return conversationId;
}
public void setConversationId(String conversationId) {
this.conversationId = conversationId;
}
public BotDialogClosedRequest counterpartPersonId(String counterpartPersonId) {
this.counterpartPersonId = counterpartPersonId;
return this;
}
/**
* The ID of the person the bot is talking to.
*
* @return counterpartPersonId
**/
@ApiModelProperty(value = "The ID of the person the bot is talking to.")
public String getCounterpartPersonId() {
return counterpartPersonId;
}
public void setCounterpartPersonId(String counterpartPersonId) {
this.counterpartPersonId = counterpartPersonId;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
BotDialogClosedRequest botDialogClosedRequest = (BotDialogClosedRequest) o;
return Objects.equals(this.$type, botDialogClosedRequest.$type) &&
Objects.equals(this.accountId, botDialogClosedRequest.accountId) &&
Objects.equals(this.serviceName, botDialogClosedRequest.serviceName) &&
Objects.equals(this.dialogToken, botDialogClosedRequest.dialogToken) &&
Objects.equals(this.conversationId, botDialogClosedRequest.conversationId) &&
Objects.equals(this.counterpartPersonId, botDialogClosedRequest.counterpartPersonId);
}
@Override
public int hashCode() {
return Objects.hash($type, accountId, serviceName, dialogToken, conversationId, counterpartPersonId);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class BotDialogClosedRequest {\n");
sb.append(" $type: ").append(toIndentedString($type)).append("\n");
sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n");
sb.append(" serviceName: ").append(toIndentedString(serviceName)).append("\n");
sb.append(" dialogToken: ").append(toIndentedString(dialogToken)).append("\n");
sb.append(" conversationId: ").append(toIndentedString(conversationId)).append("\n");
sb.append(" counterpartPersonId: ").append(toIndentedString(counterpartPersonId)).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 ");
}
}