de.adorsys.multibanking.banking_gateway_b2c.model.ConsentTO Maven / Gradle / Ivy
/*
* Bankinggateway B2C Rest API
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: 0.2-SNAPSHOT
*
*
* 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 de.adorsys.multibanking.banking_gateway_b2c.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 de.adorsys.multibanking.banking_gateway_b2c.model.AccountAccessTO;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.IOException;
import java.time.LocalDate;
/**
* ConsentTO
*/
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2020-03-31T11:42:30.614Z[UTC]")
public class ConsentTO {
@SerializedName("consentId")
private String consentId = null;
@SerializedName("access")
private AccountAccessTO access = null;
@SerializedName("recurringIndicator")
private Boolean recurringIndicator = null;
@SerializedName("validUntil")
private LocalDate validUntil = null;
@SerializedName("frequencyPerDay")
private Integer frequencyPerDay = null;
/**
* Gets or Sets consentStatus
*/
@JsonAdapter(ConsentStatusEnum.Adapter.class)
public enum ConsentStatusEnum {
RECEIVED("RECEIVED"),
REJECTED("REJECTED"),
VALID("VALID"),
REVOKEDBYPSU("REVOKEDBYPSU"),
EXPIRED("EXPIRED"),
TERMINATEDBYTPP("TERMINATEDBYTPP"),
TERMINATED_BY_ASPSP("TERMINATED_BY_ASPSP"),
PARTIALLY_AUTHORISED("PARTIALLY_AUTHORISED");
private String value;
ConsentStatusEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static ConsentStatusEnum fromValue(String text) {
for (ConsentStatusEnum b : ConsentStatusEnum.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 ConsentStatusEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public ConsentStatusEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return ConsentStatusEnum.fromValue(String.valueOf(value));
}
}
} @SerializedName("consentStatus")
private ConsentStatusEnum consentStatus = null;
@SerializedName("psuAccount")
private String psuAccount = null;
/**
* Get consentId
* @return consentId
**/
@Schema(description = "")
public String getConsentId() {
return consentId;
}
public ConsentTO access(AccountAccessTO access) {
this.access = access;
return this;
}
/**
* Get access
* @return access
**/
@Schema(description = "")
public AccountAccessTO getAccess() {
return access;
}
public void setAccess(AccountAccessTO access) {
this.access = access;
}
public ConsentTO recurringIndicator(Boolean recurringIndicator) {
this.recurringIndicator = recurringIndicator;
return this;
}
/**
* Get recurringIndicator
* @return recurringIndicator
**/
@Schema(description = "")
public Boolean isRecurringIndicator() {
return recurringIndicator;
}
public void setRecurringIndicator(Boolean recurringIndicator) {
this.recurringIndicator = recurringIndicator;
}
public ConsentTO validUntil(LocalDate validUntil) {
this.validUntil = validUntil;
return this;
}
/**
* Get validUntil
* @return validUntil
**/
@Schema(description = "")
public LocalDate getValidUntil() {
return validUntil;
}
public void setValidUntil(LocalDate validUntil) {
this.validUntil = validUntil;
}
public ConsentTO frequencyPerDay(Integer frequencyPerDay) {
this.frequencyPerDay = frequencyPerDay;
return this;
}
/**
* Get frequencyPerDay
* @return frequencyPerDay
**/
@Schema(description = "")
public Integer getFrequencyPerDay() {
return frequencyPerDay;
}
public void setFrequencyPerDay(Integer frequencyPerDay) {
this.frequencyPerDay = frequencyPerDay;
}
/**
* Get consentStatus
* @return consentStatus
**/
@Schema(description = "")
public ConsentStatusEnum getConsentStatus() {
return consentStatus;
}
public ConsentTO psuAccount(String psuAccount) {
this.psuAccount = psuAccount;
return this;
}
/**
* Get psuAccount
* @return psuAccount
**/
@Schema(description = "")
public String getPsuAccount() {
return psuAccount;
}
public void setPsuAccount(String psuAccount) {
this.psuAccount = psuAccount;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ConsentTO consentTO = (ConsentTO) o;
return Objects.equals(this.consentId, consentTO.consentId) &&
Objects.equals(this.access, consentTO.access) &&
Objects.equals(this.recurringIndicator, consentTO.recurringIndicator) &&
Objects.equals(this.validUntil, consentTO.validUntil) &&
Objects.equals(this.frequencyPerDay, consentTO.frequencyPerDay) &&
Objects.equals(this.consentStatus, consentTO.consentStatus) &&
Objects.equals(this.psuAccount, consentTO.psuAccount);
}
@Override
public int hashCode() {
return Objects.hash(consentId, access, recurringIndicator, validUntil, frequencyPerDay, consentStatus, psuAccount);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ConsentTO {\n");
sb.append(" consentId: ").append(toIndentedString(consentId)).append("\n");
sb.append(" access: ").append(toIndentedString(access)).append("\n");
sb.append(" recurringIndicator: ").append(toIndentedString(recurringIndicator)).append("\n");
sb.append(" validUntil: ").append(toIndentedString(validUntil)).append("\n");
sb.append(" frequencyPerDay: ").append(toIndentedString(frequencyPerDay)).append("\n");
sb.append(" consentStatus: ").append(toIndentedString(consentStatus)).append("\n");
sb.append(" psuAccount: ").append(toIndentedString(psuAccount)).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 ");
}
}