All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.adorsys.multibanking.xs2a_adapter.model.AccountAccess Maven / Gradle / Ivy

There is a newer version: 5.5.43
Show newest version
/*
 * NextGenPSD2 XS2A Framework
 * # Summary The **NextGenPSD2** *Framework Version 1.3.4* offers a modern, open, harmonised and interoperable set of  Application Programming Interfaces (APIs) as the safest and most efficient way to provide data securely.  The NextGenPSD2 Framework reduces XS2A complexity and costs, addresses the problem of multiple competing standards  in Europe and, aligned with the goals of the Euro Retail Payments Board, enables European banking customers to benefit from innovative products and services ('Banking as a Service')  by granting TPPs safe and secure (authenticated and authorised) access to their bank accounts and financial data.  The possible Approaches are:   * Redirect SCA Approach   * OAuth SCA Approach   * Decoupled SCA Approach   * Embedded SCA Approach without SCA method   * Embedded SCA Approach with only one SCA method available   * Embedded SCA Approach with Selection of a SCA method    Not every message defined in this API definition is necessary for all approaches.    Furthermore this API definition does not differ between methods which are mandatory, conditional, or optional   Therefore for a particular implementation of a Berlin Group PSD2 compliant API it is only necessary to support    a certain subset of the methods defined in this API definition.    **Please have a look at the implementation guidelines if you are not sure    which message has to be used for the approach you are going to use.**  ## Some General Remarks Related to this version of the OpenAPI Specification: * **This API definition is based on the Implementation Guidelines of the Berlin Group PSD2 API.**    It is not an replacement in any sense.   The main specification is (at the moment) always the Implementation Guidelines of the Berlin Group PSD2 API. * **This API definition contains the REST-API for requests from the PISP to the ASPSP.** * **This API definition contains the messages for all different approaches defined in the Implementation Guidelines.** * According to the OpenAPI-Specification [https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md]        \"If in is \"header\" and the name field is \"Accept\", \"Content-Type\" or \"Authorization\", the parameter definition SHALL be ignored.\"      The element \"Accept\" will not be defined in this file at any place.      The elements \"Content-Type\" and \"Authorization\" are implicitly defined by the OpenApi tags \"content\" and \"security\".    * There are several predefined types which might occur in payment initiation messages,    but are not used in the standard JSON messages in the Implementation Guidelines.   Therefore they are not used in the corresponding messages in this file either.   We added them for the convenience of the user.   If there is a payment product, which need these field, one can easily use the predefined types.   But the ASPSP need not to accept them in general.    * **We omit the definition of all standard HTTP header elements (mandatory/optional/conditional)    except they are mention in the Implementation Guidelines.**   Therefore the implementer might add the in his own realisation of a PSD2 comlient API in addition to the elements define in this file.     ## General Remarks on Data Types  The Berlin Group definition of UTF-8 strings in context of the PSD2 API have to support at least the following characters  a b c d e f g h i j k l m n o p q r s t u v w x y z  A B C D E F G H I J K L M N O P Q R S T U V W X Y Z  0 1 2 3 4 5 6 7 8 9  / - ? : ( ) . , ' +  Space 
 *
 * OpenAPI spec version: 1.3.4_2019-07-17v1
 * Contact: [email protected]
 *
 * 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.xs2a_adapter.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.xs2a_adapter.model.AccountReference;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
/**
 * Requested access services for a consent. 
 */
@Schema(description = "Requested access services for a consent. ")
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2020-07-01T12:18:07.183Z[UTC]")
public class AccountAccess {
  @SerializedName("accounts")
  private List accounts = null;

  @SerializedName("balances")
  private List balances = null;

  @SerializedName("transactions")
  private List transactions = null;

  /**
   * Optional if supported by API provider.  Only the value \"allAccounts\" is admitted. 
   */
  @JsonAdapter(AvailableAccountsEnum.Adapter.class)
  public enum AvailableAccountsEnum {
    ALLACCOUNTS("allAccounts");

    private String value;

    AvailableAccountsEnum(String value) {
      this.value = value;
    }
    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }
    public static AvailableAccountsEnum fromValue(String text) {
      for (AvailableAccountsEnum b : AvailableAccountsEnum.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 AvailableAccountsEnum enumeration) throws IOException {
        jsonWriter.value(enumeration.getValue());
      }

      @Override
      public AvailableAccountsEnum read(final JsonReader jsonReader) throws IOException {
        String value = jsonReader.nextString();
        return AvailableAccountsEnum.fromValue(String.valueOf(value));
      }
    }
  }  @SerializedName("availableAccounts")
  private AvailableAccountsEnum availableAccounts = null;

  /**
   * Optional if supported by API provider.  Only the value \"allAccounts\" is admitted. 
   */
  @JsonAdapter(AvailableAccountsWithBalanceEnum.Adapter.class)
  public enum AvailableAccountsWithBalanceEnum {
    ALLACCOUNTS("allAccounts");

    private String value;

    AvailableAccountsWithBalanceEnum(String value) {
      this.value = value;
    }
    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }
    public static AvailableAccountsWithBalanceEnum fromValue(String text) {
      for (AvailableAccountsWithBalanceEnum b : AvailableAccountsWithBalanceEnum.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 AvailableAccountsWithBalanceEnum enumeration) throws IOException {
        jsonWriter.value(enumeration.getValue());
      }

      @Override
      public AvailableAccountsWithBalanceEnum read(final JsonReader jsonReader) throws IOException {
        String value = jsonReader.nextString();
        return AvailableAccountsWithBalanceEnum.fromValue(String.valueOf(value));
      }
    }
  }  @SerializedName("availableAccountsWithBalance")
  private AvailableAccountsWithBalanceEnum availableAccountsWithBalance = null;

  /**
   * Optional if supported by API provider.  Only the value \"allAccounts\" is admitted. 
   */
  @JsonAdapter(AllPsd2Enum.Adapter.class)
  public enum AllPsd2Enum {
    ALLACCOUNTS("allAccounts");

    private String value;

    AllPsd2Enum(String value) {
      this.value = value;
    }
    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }
    public static AllPsd2Enum fromValue(String text) {
      for (AllPsd2Enum b : AllPsd2Enum.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 AllPsd2Enum enumeration) throws IOException {
        jsonWriter.value(enumeration.getValue());
      }

      @Override
      public AllPsd2Enum read(final JsonReader jsonReader) throws IOException {
        String value = jsonReader.nextString();
        return AllPsd2Enum.fromValue(String.valueOf(value));
      }
    }
  }  @SerializedName("allPsd2")
  private AllPsd2Enum allPsd2 = null;

  public AccountAccess accounts(List accounts) {
    this.accounts = accounts;
    return this;
  }

  public AccountAccess addAccountsItem(AccountReference accountsItem) {
    if (this.accounts == null) {
      this.accounts = new ArrayList<>();
    }
    this.accounts.add(accountsItem);
    return this;
  }

   /**
   * Is asking for detailed account information.   If the array is empty, the TPP is asking for an accessible account list.  This may be restricted in a PSU/ASPSP authorization dialogue. If the array is empty, also the arrays for balances or transactions shall be empty, if used. 
   * @return accounts
  **/
  @Schema(description = "Is asking for detailed account information.   If the array is empty, the TPP is asking for an accessible account list.  This may be restricted in a PSU/ASPSP authorization dialogue. If the array is empty, also the arrays for balances or transactions shall be empty, if used. ")
  public List getAccounts() {
    return accounts;
  }

  public void setAccounts(List accounts) {
    this.accounts = accounts;
  }

  public AccountAccess balances(List balances) {
    this.balances = balances;
    return this;
  }

  public AccountAccess addBalancesItem(AccountReference balancesItem) {
    if (this.balances == null) {
      this.balances = new ArrayList<>();
    }
    this.balances.add(balancesItem);
    return this;
  }

   /**
   * Is asking for balances of the addressed accounts.  If the array is empty, the TPP is asking for the balances of all accessible account lists.  This may be restricted in a PSU/ASPSP authorization dialogue. If the array is empty, also the arrays for accounts or transactions shall be empty, if used. 
   * @return balances
  **/
  @Schema(description = "Is asking for balances of the addressed accounts.  If the array is empty, the TPP is asking for the balances of all accessible account lists.  This may be restricted in a PSU/ASPSP authorization dialogue. If the array is empty, also the arrays for accounts or transactions shall be empty, if used. ")
  public List getBalances() {
    return balances;
  }

  public void setBalances(List balances) {
    this.balances = balances;
  }

  public AccountAccess transactions(List transactions) {
    this.transactions = transactions;
    return this;
  }

  public AccountAccess addTransactionsItem(AccountReference transactionsItem) {
    if (this.transactions == null) {
      this.transactions = new ArrayList<>();
    }
    this.transactions.add(transactionsItem);
    return this;
  }

   /**
   * Is asking for transactions of the addressed accounts.   If the array is empty, the TPP is asking for the transactions of all accessible account lists.  This may be restricted in a PSU/ASPSP authorization dialogue. If the array is empty, also the arrays for accounts or balances shall be empty, if used. 
   * @return transactions
  **/
  @Schema(description = "Is asking for transactions of the addressed accounts.   If the array is empty, the TPP is asking for the transactions of all accessible account lists.  This may be restricted in a PSU/ASPSP authorization dialogue. If the array is empty, also the arrays for accounts or balances shall be empty, if used. ")
  public List getTransactions() {
    return transactions;
  }

  public void setTransactions(List transactions) {
    this.transactions = transactions;
  }

  public AccountAccess availableAccounts(AvailableAccountsEnum availableAccounts) {
    this.availableAccounts = availableAccounts;
    return this;
  }

   /**
   * Optional if supported by API provider.  Only the value \"allAccounts\" is admitted. 
   * @return availableAccounts
  **/
  @Schema(description = "Optional if supported by API provider.  Only the value \"allAccounts\" is admitted. ")
  public AvailableAccountsEnum getAvailableAccounts() {
    return availableAccounts;
  }

  public void setAvailableAccounts(AvailableAccountsEnum availableAccounts) {
    this.availableAccounts = availableAccounts;
  }

  public AccountAccess availableAccountsWithBalance(AvailableAccountsWithBalanceEnum availableAccountsWithBalance) {
    this.availableAccountsWithBalance = availableAccountsWithBalance;
    return this;
  }

   /**
   * Optional if supported by API provider.  Only the value \"allAccounts\" is admitted. 
   * @return availableAccountsWithBalance
  **/
  @Schema(description = "Optional if supported by API provider.  Only the value \"allAccounts\" is admitted. ")
  public AvailableAccountsWithBalanceEnum getAvailableAccountsWithBalance() {
    return availableAccountsWithBalance;
  }

  public void setAvailableAccountsWithBalance(AvailableAccountsWithBalanceEnum availableAccountsWithBalance) {
    this.availableAccountsWithBalance = availableAccountsWithBalance;
  }

  public AccountAccess allPsd2(AllPsd2Enum allPsd2) {
    this.allPsd2 = allPsd2;
    return this;
  }

   /**
   * Optional if supported by API provider.  Only the value \"allAccounts\" is admitted. 
   * @return allPsd2
  **/
  @Schema(description = "Optional if supported by API provider.  Only the value \"allAccounts\" is admitted. ")
  public AllPsd2Enum getAllPsd2() {
    return allPsd2;
  }

  public void setAllPsd2(AllPsd2Enum allPsd2) {
    this.allPsd2 = allPsd2;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    AccountAccess accountAccess = (AccountAccess) o;
    return Objects.equals(this.accounts, accountAccess.accounts) &&
        Objects.equals(this.balances, accountAccess.balances) &&
        Objects.equals(this.transactions, accountAccess.transactions) &&
        Objects.equals(this.availableAccounts, accountAccess.availableAccounts) &&
        Objects.equals(this.availableAccountsWithBalance, accountAccess.availableAccountsWithBalance) &&
        Objects.equals(this.allPsd2, accountAccess.allPsd2);
  }

  @Override
  public int hashCode() {
    return Objects.hash(accounts, balances, transactions, availableAccounts, availableAccountsWithBalance, allPsd2);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class AccountAccess {\n");
    
    sb.append("    accounts: ").append(toIndentedString(accounts)).append("\n");
    sb.append("    balances: ").append(toIndentedString(balances)).append("\n");
    sb.append("    transactions: ").append(toIndentedString(transactions)).append("\n");
    sb.append("    availableAccounts: ").append(toIndentedString(availableAccounts)).append("\n");
    sb.append("    availableAccountsWithBalance: ").append(toIndentedString(availableAccountsWithBalance)).append("\n");
    sb.append("    allPsd2: ").append(toIndentedString(allPsd2)).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 - 2024 Weber Informatics LLC | Privacy Policy