com.huaweicloud.sdk.koomessage.v1.model.Callback Maven / Gradle / Ivy
package com.huaweicloud.sdk.koomessage.v1.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Objects;
/**
* 注册详情。
*/
public class Callback {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "callback_url")
private String callbackUrl;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "id")
private String id;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "url_type")
private Integer urlType;
public Callback withCallbackUrl(String callbackUrl) {
this.callbackUrl = callbackUrl;
return this;
}
/**
* 回调地址。
* @return callbackUrl
*/
public String getCallbackUrl() {
return callbackUrl;
}
public void setCallbackUrl(String callbackUrl) {
this.callbackUrl = callbackUrl;
}
public Callback withId(String id) {
this.id = id;
return this;
}
/**
* 注册回调的唯一标识ID。
* @return id
*/
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public Callback withUrlType(Integer urlType) {
this.urlType = urlType;
return this;
}
/**
* 回调类型。 - 0:智能信息单条发送回调 - 1:模板状态回调 - 2:智能信息批量发送回调
* @return urlType
*/
public Integer getUrlType() {
return urlType;
}
public void setUrlType(Integer urlType) {
this.urlType = urlType;
}
@Override
public boolean equals(java.lang.Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
Callback that = (Callback) obj;
return Objects.equals(this.callbackUrl, that.callbackUrl) && Objects.equals(this.id, that.id)
&& Objects.equals(this.urlType, that.urlType);
}
@Override
public int hashCode() {
return Objects.hash(callbackUrl, id, urlType);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Callback {\n");
sb.append(" callbackUrl: ").append(toIndentedString(callbackUrl)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" urlType: ").append(toIndentedString(urlType)).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 ");
}
}