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;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* Parameters of notification rule
*/
@ApiModel(description = "Parameters of notification rule")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-02-05T12:19:21.458Z")
public class NotificationRuleParams {
/**
* Trigger event type
*/
@JsonAdapter(TriggerEventEnum.Adapter.class)
public enum TriggerEventEnum {
NEW_ACCOUNT_BALANCE("NEW_ACCOUNT_BALANCE"),
NEW_TRANSACTIONS("NEW_TRANSACTIONS"),
BANK_LOGIN_ERROR("BANK_LOGIN_ERROR"),
FOREIGN_MONEY_TRANSFER("FOREIGN_MONEY_TRANSFER"),
LOW_ACCOUNT_BALANCE("LOW_ACCOUNT_BALANCE"),
HIGH_TRANSACTION_AMOUNT("HIGH_TRANSACTION_AMOUNT"),
CATEGORY_CASH_FLOW("CATEGORY_CASH_FLOW"),
NEW_TERMS_AND_CONDITIONS("NEW_TERMS_AND_CONDITIONS");
private String value;
TriggerEventEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static TriggerEventEnum fromValue(String text) {
for (TriggerEventEnum b : TriggerEventEnum.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 TriggerEventEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public TriggerEventEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return TriggerEventEnum.fromValue(String.valueOf(value));
}
}
}
@SerializedName("triggerEvent")
private TriggerEventEnum triggerEvent = null;
@SerializedName("params")
private Map params = null;
@SerializedName("callbackHandle")
private String callbackHandle = null;
@SerializedName("includeDetails")
private Boolean includeDetails = false;
public NotificationRuleParams triggerEvent(TriggerEventEnum triggerEvent) {
this.triggerEvent = triggerEvent;
return this;
}
/**
* Trigger event type
* @return triggerEvent
**/
@ApiModelProperty(example = "NEW_ACCOUNT_BALANCE", required = true, value = "Trigger event type")
public TriggerEventEnum getTriggerEvent() {
return triggerEvent;
}
public void setTriggerEvent(TriggerEventEnum triggerEvent) {
this.triggerEvent = triggerEvent;
}
public NotificationRuleParams params(Map params) {
this.params = params;
return this;
}
public NotificationRuleParams putParamsItem(String key, String paramsItem) {
if (this.params == null) {
this.params = new HashMap();
}
this.params.put(key, paramsItem);
return this;
}
/**
* Additional parameters that are specific to the chosen trigger event type. Please refer to the documentation for details.
* @return params
**/
@ApiModelProperty(example = "{\"accountIds\":\"1,2,3\"}", value = "Additional parameters that are specific to the chosen trigger event type. Please refer to the documentation for details.")
public Map getParams() {
return params;
}
public void setParams(Map params) {
this.params = params;
}
public NotificationRuleParams callbackHandle(String callbackHandle) {
this.callbackHandle = callbackHandle;
return this;
}
/**
* An arbitrary string that finAPI will include into the notifications that it sends based on this rule and that you can use to identify the notification in your application. For instance, you could include the identifier of the user that you create this rule for. Maximum allowed length of the string is 512 characters.<br/><br/>Note that for this parameter, you can pass the symbols '/', '=', '%' and '\"' in addition to the symbols that are generally allowed in finAPI (see https://finapi.zendesk.com/hc/en-us/articles/222013148). This was done to enable you to set Base64 encoded strings and JSON structures for the callback handle.
* @return callbackHandle
**/
@ApiModelProperty(example = "handle", value = "An arbitrary string that finAPI will include into the notifications that it sends based on this rule and that you can use to identify the notification in your application. For instance, you could include the identifier of the user that you create this rule for. Maximum allowed length of the string is 512 characters.
Note that for this parameter, you can pass the symbols '/', '=', '%' and '\"' in addition to the symbols that are generally allowed in finAPI (see https://finapi.zendesk.com/hc/en-us/articles/222013148). This was done to enable you to set Base64 encoded strings and JSON structures for the callback handle.")
public String getCallbackHandle() {
return callbackHandle;
}
public void setCallbackHandle(String callbackHandle) {
this.callbackHandle = callbackHandle;
}
public NotificationRuleParams includeDetails(Boolean includeDetails) {
this.includeDetails = includeDetails;
return this;
}
/**
* Whether the notification messages that will be sent based on this rule should contain encrypted detailed data or not
* @return includeDetails
**/
@ApiModelProperty(example = "true", value = "Whether the notification messages that will be sent based on this rule should contain encrypted detailed data or not")
public Boolean isIncludeDetails() {
return includeDetails;
}
public void setIncludeDetails(Boolean includeDetails) {
this.includeDetails = includeDetails;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
NotificationRuleParams notificationRuleParams = (NotificationRuleParams) o;
return Objects.equals(this.triggerEvent, notificationRuleParams.triggerEvent) &&
Objects.equals(this.params, notificationRuleParams.params) &&
Objects.equals(this.callbackHandle, notificationRuleParams.callbackHandle) &&
Objects.equals(this.includeDetails, notificationRuleParams.includeDetails);
}
@Override
public int hashCode() {
return Objects.hash(triggerEvent, params, callbackHandle, includeDetails);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class NotificationRuleParams {\n");
sb.append(" triggerEvent: ").append(toIndentedString(triggerEvent)).append("\n");
sb.append(" params: ").append(toIndentedString(params)).append("\n");
sb.append(" callbackHandle: ").append(toIndentedString(callbackHandle)).append("\n");
sb.append(" includeDetails: ").append(toIndentedString(includeDetails)).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 ");
}
}