Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* finAPI RESTful Services
* finAPI RESTful Services
*
* OpenAPI spec version: v1.64.0
*
*
* 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 io.swagger.client.model;
import java.util.Objects;
import java.util.Arrays;
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;
/**
* Container for a status of bank connection update
*/
@ApiModel(description = "Container for a status of bank connection update")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-02-05T12:19:21.458Z")
public class UpdateResult {
/**
* Note that 'OK' just means that finAPI could successfully connect and log in to the bank server. However, it does not necessarily mean that all accounts could be updated successfully. For the latter, please refer to the 'status' field of the Account resource.
*/
@JsonAdapter(ResultEnum.Adapter.class)
public enum ResultEnum {
OK("OK"),
BANK_SERVER_REJECTION("BANK_SERVER_REJECTION"),
INTERNAL_SERVER_ERROR("INTERNAL_SERVER_ERROR");
private String value;
ResultEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static ResultEnum fromValue(String text) {
for (ResultEnum b : ResultEnum.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 ResultEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public ResultEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return ResultEnum.fromValue(String.valueOf(value));
}
}
}
@SerializedName("result")
private ResultEnum result = null;
@SerializedName("errorMessage")
private String errorMessage = null;
/**
* In case the update result is not <code>OK</code>, this field contains the type of the error that occurred. BUSINESS means that the bank server responded with a non-technical error message for the user. TECHNICAL means that some internal error has occurred in finAPI or at the bank server.
*/
@JsonAdapter(ErrorTypeEnum.Adapter.class)
public enum ErrorTypeEnum {
BUSINESS("BUSINESS"),
TECHNICAL("TECHNICAL");
private String value;
ErrorTypeEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static ErrorTypeEnum fromValue(String text) {
for (ErrorTypeEnum b : ErrorTypeEnum.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 ErrorTypeEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public ErrorTypeEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return ErrorTypeEnum.fromValue(String.valueOf(value));
}
}
}
@SerializedName("errorType")
private ErrorTypeEnum errorType = null;
@SerializedName("timestamp")
private String timestamp = null;
public UpdateResult result(ResultEnum result) {
this.result = result;
return this;
}
/**
* Note that 'OK' just means that finAPI could successfully connect and log in to the bank server. However, it does not necessarily mean that all accounts could be updated successfully. For the latter, please refer to the 'status' field of the Account resource.
* @return result
**/
@ApiModelProperty(example = "INTERNAL_SERVER_ERROR", required = true, value = "Note that 'OK' just means that finAPI could successfully connect and log in to the bank server. However, it does not necessarily mean that all accounts could be updated successfully. For the latter, please refer to the 'status' field of the Account resource.")
public ResultEnum getResult() {
return result;
}
public void setResult(ResultEnum result) {
this.result = result;
}
public UpdateResult errorMessage(String errorMessage) {
this.errorMessage = errorMessage;
return this;
}
/**
* In case the update result is not <code>OK</code>, this field may contain an error message with details about why the update failed (it is not guaranteed that a message is available though). In case the update result is <code>OK</code>, the field will always be null.
* @return errorMessage
**/
@ApiModelProperty(example = "Internal server error", value = "In case the update result is not OK, this field may contain an error message with details about why the update failed (it is not guaranteed that a message is available though). In case the update result is OK, the field will always be null.")
public String getErrorMessage() {
return errorMessage;
}
public void setErrorMessage(String errorMessage) {
this.errorMessage = errorMessage;
}
public UpdateResult errorType(ErrorTypeEnum errorType) {
this.errorType = errorType;
return this;
}
/**
* In case the update result is not <code>OK</code>, this field contains the type of the error that occurred. BUSINESS means that the bank server responded with a non-technical error message for the user. TECHNICAL means that some internal error has occurred in finAPI or at the bank server.
* @return errorType
**/
@ApiModelProperty(example = "TECHNICAL", value = "In case the update result is not OK, this field contains the type of the error that occurred. BUSINESS means that the bank server responded with a non-technical error message for the user. TECHNICAL means that some internal error has occurred in finAPI or at the bank server.")
public ErrorTypeEnum getErrorType() {
return errorType;
}
public void setErrorType(ErrorTypeEnum errorType) {
this.errorType = errorType;
}
public UpdateResult timestamp(String timestamp) {
this.timestamp = timestamp;
return this;
}
/**
* Time of the update. The value is returned in the format 'YYYY-MM-DD HH:MM:SS.SSS' (german time).
* @return timestamp
**/
@ApiModelProperty(example = "2018-01-01 00:00:00.000", required = true, value = "Time of the update. The value is returned in the format 'YYYY-MM-DD HH:MM:SS.SSS' (german time).")
public String getTimestamp() {
return timestamp;
}
public void setTimestamp(String timestamp) {
this.timestamp = timestamp;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
UpdateResult updateResult = (UpdateResult) o;
return Objects.equals(this.result, updateResult.result) &&
Objects.equals(this.errorMessage, updateResult.errorMessage) &&
Objects.equals(this.errorType, updateResult.errorType) &&
Objects.equals(this.timestamp, updateResult.timestamp);
}
@Override
public int hashCode() {
return Objects.hash(result, errorMessage, errorType, timestamp);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class UpdateResult {\n");
sb.append(" result: ").append(toIndentedString(result)).append("\n");
sb.append(" errorMessage: ").append(toIndentedString(errorMessage)).append("\n");
sb.append(" errorType: ").append(toIndentedString(errorType)).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(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}