com.sinch.sdk.domains.numbers.models.dto.v1.CallbackPayloadDto Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sinch-sdk-java Show documentation
Show all versions of sinch-sdk-java Show documentation
SDK providing a Java API for the Sinch REST APIs.
/*
* Numbers | Sinch
* An API service for getting, listing and managing Sinch virtual numbers.
*
* The version of the OpenAPI document: 1.0.2
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.sinch.sdk.domains.numbers.models.dto.v1;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonFilter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.Objects;
/** CallbackPayloadDto */
@JsonPropertyOrder({
CallbackPayloadDto.JSON_PROPERTY_EVENT_ID,
CallbackPayloadDto.JSON_PROPERTY_TIMESTAMP,
CallbackPayloadDto.JSON_PROPERTY_PROJECT_ID,
CallbackPayloadDto.JSON_PROPERTY_RESOURCE_ID,
CallbackPayloadDto.JSON_PROPERTY_RESOURCE_TYPE,
CallbackPayloadDto.JSON_PROPERTY_EVENT_TYPE,
CallbackPayloadDto.JSON_PROPERTY_STATUS,
CallbackPayloadDto.JSON_PROPERTY_FAILURE_CODE
})
@JsonFilter("uninitializedFilter")
@JsonInclude(value = JsonInclude.Include.CUSTOM)
public class CallbackPayloadDto {
private static final long serialVersionUID = 1L;
public static final String JSON_PROPERTY_EVENT_ID = "eventId";
private String eventId;
private boolean eventIdDefined = false;
public static final String JSON_PROPERTY_TIMESTAMP = "timestamp";
private String timestamp;
private boolean timestampDefined = false;
public static final String JSON_PROPERTY_PROJECT_ID = "projectId";
private String projectId;
private boolean projectIdDefined = false;
public static final String JSON_PROPERTY_RESOURCE_ID = "resourceId";
private String resourceId;
private boolean resourceIdDefined = false;
public static final String JSON_PROPERTY_RESOURCE_TYPE = "resourceType";
private String resourceType;
private boolean resourceTypeDefined = false;
public static final String JSON_PROPERTY_EVENT_TYPE = "eventType";
private String eventType;
private boolean eventTypeDefined = false;
public static final String JSON_PROPERTY_STATUS = "status";
private String status;
private boolean statusDefined = false;
/**
* If the status is FAILED, a failure code will be provided. For numbers provisioning to SMS
* platform, there won't be any extra `failureCode`, as the result is binary. For
* campaign provisioning-related failures, refer to the list for the possible values.
*/
public enum FailureCodeEnum {
CAMPAIGN_NOT_AVAILABLE("CAMPAIGN_NOT_AVAILABLE"),
EXCEEDED_10DLC_LIMIT("EXCEEDED_10DLC_LIMIT"),
NUMBER_PROVISIONING_FAILED("NUMBER_PROVISIONING_FAILED"),
PARTNER_SERVICE_UNAVAILABLE("PARTNER_SERVICE_UNAVAILABLE"),
CAMPAIGN_PENDING_ACCEPTANCE("CAMPAIGN_PENDING_ACCEPTANCE"),
MNO_SHARING_ERROR("MNO_SHARING_ERROR"),
CAMPAIGN_PROVISIONING_FAILED("CAMPAIGN_PROVISIONING_FAILED"),
CAMPAIGN_EXPIRED("CAMPAIGN_EXPIRED"),
CAMPAIGN_MNO_REJECTED("CAMPAIGN_MNO_REJECTED"),
CAMPAIGN_MNO_SUSPENDED("CAMPAIGN_MNO_SUSPENDED"),
CAMPAIGN_MNO_REVIEW("CAMPAIGN_MNO_REVIEW"),
INSUFFICIENT_BALANCE("INSUFFICIENT_BALANCE"),
MOCK_CAMPAIGN_NOT_ALLOWED("MOCK_CAMPAIGN_NOT_ALLOWED"),
TFN_NOT_ALLOWED("TFN_NOT_ALLOWED"),
INVALID_NNID("INVALID_NNID"),
UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");
private String value;
FailureCodeEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static FailureCodeEnum fromValue(String value) {
for (FailureCodeEnum b : FailureCodeEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
return UNKNOWN_DEFAULT_OPEN_API;
}
}
public static final String JSON_PROPERTY_FAILURE_CODE = "failureCode";
private String failureCode;
private boolean failureCodeDefined = false;
public CallbackPayloadDto() {}
public CallbackPayloadDto eventId(String eventId) {
this.eventId = eventId;
this.eventIdDefined = true;
return this;
}
/**
* The ID of the event.
*
* @return eventId
*/
@JsonProperty(JSON_PROPERTY_EVENT_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getEventId() {
return eventId;
}
@JsonIgnore
public boolean getEventIdDefined() {
return eventIdDefined;
}
@JsonProperty(JSON_PROPERTY_EVENT_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setEventId(String eventId) {
this.eventId = eventId;
this.eventIdDefined = true;
}
public CallbackPayloadDto timestamp(String timestamp) {
this.timestamp = timestamp;
this.timestampDefined = true;
return this;
}
/**
* The date and time when the callback was created and added to the callbacks queue.
*
* @return timestamp
*/
@JsonProperty(JSON_PROPERTY_TIMESTAMP)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getTimestamp() {
return timestamp;
}
@JsonIgnore
public boolean getTimestampDefined() {
return timestampDefined;
}
@JsonProperty(JSON_PROPERTY_TIMESTAMP)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setTimestamp(String timestamp) {
this.timestamp = timestamp;
this.timestampDefined = true;
}
public CallbackPayloadDto projectId(String projectId) {
this.projectId = projectId;
this.projectIdDefined = true;
return this;
}
/**
* The ID of the project to which the event belongs.
*
* @return projectId
*/
@JsonProperty(JSON_PROPERTY_PROJECT_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getProjectId() {
return projectId;
}
@JsonIgnore
public boolean getProjectIdDefined() {
return projectIdDefined;
}
@JsonProperty(JSON_PROPERTY_PROJECT_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setProjectId(String projectId) {
this.projectId = projectId;
this.projectIdDefined = true;
}
public CallbackPayloadDto resourceId(String resourceId) {
this.resourceId = resourceId;
this.resourceIdDefined = true;
return this;
}
/**
* The unique identifier of the resource, depending on the resource type. For example, a phone
* number, a hosting order ID, or a brand ID.
*
* @return resourceId
*/
@JsonProperty(JSON_PROPERTY_RESOURCE_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getResourceId() {
return resourceId;
}
@JsonIgnore
public boolean getResourceIdDefined() {
return resourceIdDefined;
}
@JsonProperty(JSON_PROPERTY_RESOURCE_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setResourceId(String resourceId) {
this.resourceId = resourceId;
this.resourceIdDefined = true;
}
public CallbackPayloadDto resourceType(String resourceType) {
this.resourceType = resourceType;
this.resourceTypeDefined = true;
return this;
}
/**
* The type of the resource.
*
* @return resourceType
*/
@JsonProperty(JSON_PROPERTY_RESOURCE_TYPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getResourceType() {
return resourceType;
}
@JsonIgnore
public boolean getResourceTypeDefined() {
return resourceTypeDefined;
}
@JsonProperty(JSON_PROPERTY_RESOURCE_TYPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setResourceType(String resourceType) {
this.resourceType = resourceType;
this.resourceTypeDefined = true;
}
public CallbackPayloadDto eventType(String eventType) {
this.eventType = eventType;
this.eventTypeDefined = true;
return this;
}
/**
* The type of the event.
*
* @return eventType
*/
@JsonProperty(JSON_PROPERTY_EVENT_TYPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getEventType() {
return eventType;
}
@JsonIgnore
public boolean getEventTypeDefined() {
return eventTypeDefined;
}
@JsonProperty(JSON_PROPERTY_EVENT_TYPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setEventType(String eventType) {
this.eventType = eventType;
this.eventTypeDefined = true;
}
public CallbackPayloadDto status(String status) {
this.status = status;
this.statusDefined = true;
return this;
}
/**
* The status of the event. For example, `SUCCEEDED` or `FAILED`.
*
* @return status
*/
@JsonProperty(JSON_PROPERTY_STATUS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getStatus() {
return status;
}
@JsonIgnore
public boolean getStatusDefined() {
return statusDefined;
}
@JsonProperty(JSON_PROPERTY_STATUS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setStatus(String status) {
this.status = status;
this.statusDefined = true;
}
public CallbackPayloadDto failureCode(String failureCode) {
this.failureCode = failureCode;
this.failureCodeDefined = true;
return this;
}
/**
* If the status is FAILED, a failure code will be provided. For numbers provisioning to SMS
* platform, there won't be any extra `failureCode`, as the result is binary. For
* campaign provisioning-related failures, refer to the list for the possible values.
*
* @return failureCode
*/
@JsonProperty(JSON_PROPERTY_FAILURE_CODE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getFailureCode() {
return failureCode;
}
@JsonIgnore
public boolean getFailureCodeDefined() {
return failureCodeDefined;
}
@JsonProperty(JSON_PROPERTY_FAILURE_CODE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setFailureCode(String failureCode) {
this.failureCode = failureCode;
this.failureCodeDefined = true;
}
/** Return true if this CallbackPayload object is equal to o. */
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CallbackPayloadDto callbackPayload = (CallbackPayloadDto) o;
return Objects.equals(this.eventId, callbackPayload.eventId)
&& Objects.equals(this.timestamp, callbackPayload.timestamp)
&& Objects.equals(this.projectId, callbackPayload.projectId)
&& Objects.equals(this.resourceId, callbackPayload.resourceId)
&& Objects.equals(this.resourceType, callbackPayload.resourceType)
&& Objects.equals(this.eventType, callbackPayload.eventType)
&& Objects.equals(this.status, callbackPayload.status)
&& Objects.equals(this.failureCode, callbackPayload.failureCode);
}
@Override
public int hashCode() {
return Objects.hash(
eventId, timestamp, projectId, resourceId, resourceType, eventType, status, failureCode);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CallbackPayloadDto {\n");
sb.append(" eventId: ").append(toIndentedString(eventId)).append("\n");
sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n");
sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n");
sb.append(" resourceId: ").append(toIndentedString(resourceId)).append("\n");
sb.append(" resourceType: ").append(toIndentedString(resourceType)).append("\n");
sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append(" failureCode: ").append(toIndentedString(failureCode)).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(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy