![JAR search and dependency download from the Maven repository](/logo.png)
Model.InlineResponse4005 Maven / Gradle / Ivy
/*
* CyberSource Merged Spec
* All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html
*
* OpenAPI spec version: 0.0.1
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package Model;
import java.util.Objects;
import java.util.Arrays;
import Model.InlineResponse4005Details;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import org.joda.time.LocalDate;
/**
* InlineResponse4005
*/
public class InlineResponse4005 {
@SerializedName("submitTimeUtc")
private LocalDate submitTimeUtc = null;
@SerializedName("status")
private String status = null;
/**
* Documented reason codes. Client should be able to use the key for generating their own error message Possible Values: - 'INVALID_DATA' - 'SYSTEM_ERROR' - 'RESOURCE_NOT_FOUND'
*/
@JsonAdapter(ReasonEnum.Adapter.class)
public enum ReasonEnum {
INVALID_DATA("INVALID_DATA"),
SYSTEM_ERROR("SYSTEM_ERROR"),
RESOURCE_NOT_FOUND("RESOURCE_NOT_FOUND");
private String value;
ReasonEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static ReasonEnum fromValue(String text) {
for (ReasonEnum b : ReasonEnum.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
}
}
return null;
}
public static class Adapter extends TypeAdapter {
@Override
public void write(final JsonWriter jsonWriter, final ReasonEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public ReasonEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return ReasonEnum.fromValue(String.valueOf(value));
}
}
}
@SerializedName("reason")
private ReasonEnum reason = null;
@SerializedName("message")
private String message = null;
@SerializedName("details")
private List details = null;
public InlineResponse4005 submitTimeUtc(LocalDate submitTimeUtc) {
this.submitTimeUtc = submitTimeUtc;
return this;
}
/**
* Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC.
* @return submitTimeUtc
**/
@ApiModelProperty(example = "2019-06-11T22:47:57.000Z", value = "Time of request in UTC. `Format: YYYY-MM-DDThh:mm:ssZ` Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. ")
public LocalDate getSubmitTimeUtc() {
return submitTimeUtc;
}
public void setSubmitTimeUtc(LocalDate submitTimeUtc) {
this.submitTimeUtc = submitTimeUtc;
}
public InlineResponse4005 status(String status) {
this.status = status;
return this;
}
/**
* The http status description of the submitted request.
* @return status
**/
@ApiModelProperty(example = "BAD_REQUEST", value = "The http status description of the submitted request.")
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public InlineResponse4005 reason(ReasonEnum reason) {
this.reason = reason;
return this;
}
/**
* Documented reason codes. Client should be able to use the key for generating their own error message Possible Values: - 'INVALID_DATA' - 'SYSTEM_ERROR' - 'RESOURCE_NOT_FOUND'
* @return reason
**/
@ApiModelProperty(value = "Documented reason codes. Client should be able to use the key for generating their own error message Possible Values: - 'INVALID_DATA' - 'SYSTEM_ERROR' - 'RESOURCE_NOT_FOUND' ")
public ReasonEnum getReason() {
return reason;
}
public void setReason(ReasonEnum reason) {
this.reason = reason;
}
public InlineResponse4005 message(String message) {
this.message = message;
return this;
}
/**
* Descriptive message for the error.
* @return message
**/
@ApiModelProperty(value = "Descriptive message for the error.")
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public InlineResponse4005 details(List details) {
this.details = details;
return this;
}
public InlineResponse4005 addDetailsItem(InlineResponse4005Details detailsItem) {
if (this.details == null) {
this.details = new ArrayList();
}
this.details.add(detailsItem);
return this;
}
/**
* Get details
* @return details
**/
@ApiModelProperty(value = "")
public List getDetails() {
return details;
}
public void setDetails(List details) {
this.details = details;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
InlineResponse4005 inlineResponse4005 = (InlineResponse4005) o;
return Objects.equals(this.submitTimeUtc, inlineResponse4005.submitTimeUtc) &&
Objects.equals(this.status, inlineResponse4005.status) &&
Objects.equals(this.reason, inlineResponse4005.reason) &&
Objects.equals(this.message, inlineResponse4005.message) &&
Objects.equals(this.details, inlineResponse4005.details);
}
@Override
public int hashCode() {
return Objects.hash(submitTimeUtc, status, reason, message, details);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class InlineResponse4005 {\n");
sb.append(" submitTimeUtc: ").append(toIndentedString(submitTimeUtc)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append(" reason: ").append(toIndentedString(reason)).append("\n");
sb.append(" message: ").append(toIndentedString(message)).append("\n");
sb.append(" details: ").append(toIndentedString(details)).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 ");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy