com.salesforce.einsteinbot.sdk.model.Error Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of einstein-bot-sdk-java Show documentation
Show all versions of einstein-bot-sdk-java Show documentation
Java SDK to interact with Einstein Bots Runtime.
This SDK is a wrapper around the Einstein Bots Runtime API that provides a few added features out of the box like Auth support, Session management
/*
* Einstein Bots API (BETA)
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v4
*
*
* 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.salesforce.einsteinbot.sdk.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
/**
* Error
*/
@JsonPropertyOrder({
Error.JSON_PROPERTY_STATUS,
Error.JSON_PROPERTY_PATH,
Error.JSON_PROPERTY_REQUEST_ID,
Error.JSON_PROPERTY_ERROR,
Error.JSON_PROPERTY_MESSAGE,
Error.JSON_PROPERTY_TIMESTAMP
})
@JsonTypeName("Error")
@javax.annotation.Generated(value = "com.salesforce.einsteinbot.openapi.codegen.EinsteinBotCodeGenerator", date = "2022-03-24T00:55:11.933462Z[Etc/UTC]")
public class Error {
public static final String JSON_PROPERTY_STATUS = "status";
private Integer status;
public static final String JSON_PROPERTY_PATH = "path";
private String path;
public static final String JSON_PROPERTY_REQUEST_ID = "requestId";
private String requestId;
public static final String JSON_PROPERTY_ERROR = "error";
private String error;
public static final String JSON_PROPERTY_MESSAGE = "message";
private String message;
public static final String JSON_PROPERTY_TIMESTAMP = "timestamp";
private Long timestamp;
public Error() {
}
public Error status(Integer status) {
this.status = status;
return this;
}
/**
* HTTP status
* @return status
**/
@javax.annotation.Nonnull
@ApiModelProperty(example = "500", required = true, value = "HTTP status")
@JsonProperty(JSON_PROPERTY_STATUS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public Integer getStatus() {
return status;
}
@JsonProperty(JSON_PROPERTY_STATUS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setStatus(Integer status) {
this.status = status;
}
public Error path(String path) {
this.path = path;
return this;
}
/**
* Request path
* @return path
**/
@javax.annotation.Nonnull
@ApiModelProperty(example = "/v1/00DRM00000067To/chatbots/HelloWorldBot/messages", required = true, value = "Request path")
@JsonProperty(JSON_PROPERTY_PATH)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getPath() {
return path;
}
@JsonProperty(JSON_PROPERTY_PATH)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setPath(String path) {
this.path = path;
}
public Error requestId(String requestId) {
this.requestId = requestId;
return this;
}
/**
* Request ID used for searching exception logs
* @return requestId
**/
@javax.annotation.Nonnull
@ApiModelProperty(example = "19c056ab-d909-49df-b976-65e56b6ab214", required = true, value = "Request ID used for searching exception logs")
@JsonProperty(JSON_PROPERTY_REQUEST_ID)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getRequestId() {
return requestId;
}
@JsonProperty(JSON_PROPERTY_REQUEST_ID)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setRequestId(String requestId) {
this.requestId = requestId;
}
public Error error(String error) {
this.error = error;
return this;
}
/**
* Error class name
* @return error
**/
@javax.annotation.Nonnull
@ApiModelProperty(example = "NullPointerException", required = true, value = "Error class name")
@JsonProperty(JSON_PROPERTY_ERROR)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getError() {
return error;
}
@JsonProperty(JSON_PROPERTY_ERROR)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setError(String error) {
this.error = error;
}
public Error message(String message) {
this.message = message;
return this;
}
/**
* Exception message
* @return message
**/
@javax.annotation.Nonnull
@ApiModelProperty(example = "Something went wrong", required = true, value = "Exception message")
@JsonProperty(JSON_PROPERTY_MESSAGE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getMessage() {
return message;
}
@JsonProperty(JSON_PROPERTY_MESSAGE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setMessage(String message) {
this.message = message;
}
public Error timestamp(Long timestamp) {
this.timestamp = timestamp;
return this;
}
/**
* Get timestamp
* @return timestamp
**/
@javax.annotation.Nonnull
@ApiModelProperty(example = "1531245973799", required = true, value = "")
@JsonProperty(JSON_PROPERTY_TIMESTAMP)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public Long getTimestamp() {
return timestamp;
}
@JsonProperty(JSON_PROPERTY_TIMESTAMP)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setTimestamp(Long timestamp) {
this.timestamp = timestamp;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Error error = (Error) o;
return Objects.equals(this.status, error.status) &&
Objects.equals(this.path, error.path) &&
Objects.equals(this.requestId, error.requestId) &&
Objects.equals(this.error, error.error) &&
Objects.equals(this.message, error.message) &&
Objects.equals(this.timestamp, error.timestamp);
}
@Override
public int hashCode() {
return Objects.hash(status, path, requestId, error, message, timestamp);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Error {\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append(" path: ").append(toIndentedString(path)).append("\n");
sb.append(" requestId: ").append(toIndentedString(requestId)).append("\n");
sb.append(" error: ").append(toIndentedString(error)).append("\n");
sb.append(" message: ").append(toIndentedString(message)).append("\n");
sb.append(" timestamp: ").append(toIndentedString(timestamp)).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 - 2025 Weber Informatics LLC | Privacy Policy