uk.org.openbanking.datamodel.account.OBReadConsent1Data Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of openbanking-sdk Show documentation
Show all versions of openbanking-sdk Show documentation
A Java SDK to help implementing the Open Banking standard : https://www.openbanking.org.uk/read-write-apis/
/**
*
* The contents of this file are subject to the terms of the Common Development and
* Distribution License (the License). You may not use this file except in compliance with the
* License.
*
* You can obtain a copy of the License at https://forgerock.org/cddlv1-0/. See the License for the
* specific language governing permission and limitations under the License.
*
* When distributing Covered Software, include this CDDL Header Notice in each file and include
* the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
* Header, with the fields enclosed by brackets [] replaced by your own identifying
* information: "Portions copyright [year] [name of copyright owner]".
*
* Copyright 2019 ForgeRock AS.
*/
/*
* Account and Transaction API Specification
* Swagger for Account and Transaction API Specification
*
* OpenAPI spec version: v3.1.2-RC1
* 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 uk.org.openbanking.datamodel.account;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
/**
* OBReadConsent1Data
*/
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-06-13T15:59:01.633+01:00")
public class OBReadConsent1Data {
@JsonProperty("Permissions")
private List permissions = new ArrayList();
@JsonProperty("ExpirationDateTime")
private String expirationDateTime = null;
@JsonProperty("TransactionFromDateTime")
private String transactionFromDateTime = null;
@JsonProperty("TransactionToDateTime")
private String transactionToDateTime = null;
public OBReadConsent1Data permissions(List permissions) {
this.permissions = permissions;
return this;
}
public OBReadConsent1Data addPermissionsItem(PermissionsEnum permissionsItem) {
this.permissions.add(permissionsItem);
return this;
}
/**
* Get permissions
*
* @return permissions
**/
@NotNull
@Size(min = 1)
@ApiModelProperty(required = true, value = "")
public List getPermissions() {
return permissions;
}
public void setPermissions(List permissions) {
this.permissions = permissions;
}
public OBReadConsent1Data expirationDateTime(String expirationDateTime) {
this.expirationDateTime = expirationDateTime;
return this;
}
/**
* Specified date and time the permissions will expire. If this is not populated, the permissions will be open ended.All dates in the JSON payloads are represented in ISO 8601 date-time format. All date-time fields in responses must include the timezone. An example is below: 2017-04-05T10:43:07+00:00
*
* @return expirationDateTime
**/
@ApiModelProperty(value = "Specified date and time the permissions will expire. If this is not populated, the permissions will be open ended.All dates in the JSON payloads are represented in ISO 8601 date-time format. All date-time fields in responses must include the timezone. An example is below: 2017-04-05T10:43:07+00:00")
public String getExpirationDateTime() {
return expirationDateTime;
}
public void setExpirationDateTime(String expirationDateTime) {
this.expirationDateTime = expirationDateTime;
}
public OBReadConsent1Data transactionFromDateTime(String transactionFromDateTime) {
this.transactionFromDateTime = transactionFromDateTime;
return this;
}
/**
* Specified start date and time for the transaction query period. If this is not populated, the start date will be open ended, and data will be returned from the earliest available transaction.All dates in the JSON payloads are represented in ISO 8601 date-time format. All date-time fields in responses must include the timezone. An example is below: 2017-04-05T10:43:07+00:00
*
* @return transactionFromDateTime
**/
@ApiModelProperty(value = "Specified start date and time for the transaction query period. If this is not populated, the start date will be open ended, and data will be returned from the earliest available transaction.All dates in the JSON payloads are represented in ISO 8601 date-time format. All date-time fields in responses must include the timezone. An example is below: 2017-04-05T10:43:07+00:00")
public String getTransactionFromDateTime() {
return transactionFromDateTime;
}
public void setTransactionFromDateTime(String transactionFromDateTime) {
this.transactionFromDateTime = transactionFromDateTime;
}
public OBReadConsent1Data transactionToDateTime(String transactionToDateTime) {
this.transactionToDateTime = transactionToDateTime;
return this;
}
/**
* Specified end date and time for the transaction query period. If this is not populated, the end date will be open ended, and data will be returned to the latest available transaction.All dates in the JSON payloads are represented in ISO 8601 date-time format. All date-time fields in responses must include the timezone. An example is below: 2017-04-05T10:43:07+00:00
*
* @return transactionToDateTime
**/
@ApiModelProperty(value = "Specified end date and time for the transaction query period. If this is not populated, the end date will be open ended, and data will be returned to the latest available transaction.All dates in the JSON payloads are represented in ISO 8601 date-time format. All date-time fields in responses must include the timezone. An example is below: 2017-04-05T10:43:07+00:00")
public String getTransactionToDateTime() {
return transactionToDateTime;
}
public void setTransactionToDateTime(String transactionToDateTime) {
this.transactionToDateTime = transactionToDateTime;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
OBReadConsent1Data obReadConsent1Data = (OBReadConsent1Data) o;
return Objects.equals(this.permissions, obReadConsent1Data.permissions) &&
Objects.equals(this.expirationDateTime, obReadConsent1Data.expirationDateTime) &&
Objects.equals(this.transactionFromDateTime, obReadConsent1Data.transactionFromDateTime) &&
Objects.equals(this.transactionToDateTime, obReadConsent1Data.transactionToDateTime);
}
@Override
public int hashCode() {
return Objects.hash(permissions, expirationDateTime, transactionFromDateTime, transactionToDateTime);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class OBReadConsent1Data {\n");
sb.append(" permissions: ").append(toIndentedString(permissions)).append("\n");
sb.append(" expirationDateTime: ").append(toIndentedString(expirationDateTime)).append("\n");
sb.append(" transactionFromDateTime: ").append(toIndentedString(transactionFromDateTime)).append("\n");
sb.append(" transactionToDateTime: ").append(toIndentedString(transactionToDateTime)).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(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
/**
* Specifies the Open Banking account access data types. This is a list of the data clusters being consented by the PSU, and requested for authorisation with the ASPSP.
*/
public enum PermissionsEnum {
READACCOUNTSBASIC("ReadAccountsBasic"),
READACCOUNTSDETAIL("ReadAccountsDetail"),
READBALANCES("ReadBalances"),
READBENEFICIARIESBASIC("ReadBeneficiariesBasic"),
READBENEFICIARIESDETAIL("ReadBeneficiariesDetail"),
READDIRECTDEBITS("ReadDirectDebits"),
READOFFERS("ReadOffers"),
READPAN("ReadPAN"),
READPARTY("ReadParty"),
READPARTYPSU("ReadPartyPSU"),
READPRODUCTS("ReadProducts"),
READSCHEDULEDPAYMENTSBASIC("ReadScheduledPaymentsBasic"),
READSCHEDULEDPAYMENTSDETAIL("ReadScheduledPaymentsDetail"),
READSTANDINGORDERSBASIC("ReadStandingOrdersBasic"),
READSTANDINGORDERSDETAIL("ReadStandingOrdersDetail"),
READSTATEMENTSBASIC("ReadStatementsBasic"),
READSTATEMENTSDETAIL("ReadStatementsDetail"),
READTRANSACTIONSBASIC("ReadTransactionsBasic"),
READTRANSACTIONSCREDITS("ReadTransactionsCredits"),
READTRANSACTIONSDEBITS("ReadTransactionsDebits"),
READTRANSACTIONSDETAIL("ReadTransactionsDetail");
private String value;
PermissionsEnum(String value) {
this.value = value;
}
@JsonCreator
public static PermissionsEnum fromValue(String text) {
for (PermissionsEnum b : PermissionsEnum.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
}
}
return null;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
}
}