uk.org.openbanking.datamodel.account.OBReadData1 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.
*/
package uk.org.openbanking.datamodel.account;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import org.joda.time.DateTime;
import org.springframework.validation.annotation.Validated;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
/**
* OBReadData1
*/
@Validated
@javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2018-10-01T11:26:57.876+01:00")
public class OBReadData1 {
@JsonProperty("Permissions")
@Valid
private List permissions = new ArrayList();
@JsonProperty("ExpirationDateTime")
private DateTime expirationDateTime = null;
@JsonProperty("TransactionFromDateTime")
private DateTime transactionFromDateTime = null;
@JsonProperty("TransactionToDateTime")
private DateTime transactionToDateTime = null;
public OBReadData1 permissions(List permissions) {
this.permissions = permissions;
return this;
}
public OBReadData1 addPermissionsItem(OBExternalPermissions1Code permissionsItem) {
this.permissions.add(permissionsItem);
return this;
}
/**
* 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.
* @return permissions
**/
@ApiModelProperty(required = true, value = "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.")
@NotNull
@Valid
@Size(min=1)
public List getPermissions() {
return permissions;
}
public void setPermissions(List permissions) {
this.permissions = permissions;
}
public OBReadData1 expirationDateTime(DateTime 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")
@Valid
public DateTime getExpirationDateTime() {
return expirationDateTime;
}
public void setExpirationDateTime(DateTime expirationDateTime) {
this.expirationDateTime = expirationDateTime;
}
public OBReadData1 transactionFromDateTime(DateTime 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")
@Valid
public DateTime getTransactionFromDateTime() {
return transactionFromDateTime;
}
public void setTransactionFromDateTime(DateTime transactionFromDateTime) {
this.transactionFromDateTime = transactionFromDateTime;
}
public OBReadData1 transactionToDateTime(DateTime 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")
@Valid
public DateTime getTransactionToDateTime() {
return transactionToDateTime;
}
public void setTransactionToDateTime(DateTime transactionToDateTime) {
this.transactionToDateTime = transactionToDateTime;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
OBReadData1 obReadData1 = (OBReadData1) o;
return Objects.equals(this.permissions, obReadData1.permissions) &&
Objects.equals(this.expirationDateTime, obReadData1.expirationDateTime) &&
Objects.equals(this.transactionFromDateTime, obReadData1.transactionFromDateTime) &&
Objects.equals(this.transactionToDateTime, obReadData1.transactionToDateTime);
}
@Override
public int hashCode() {
return Objects.hash(permissions, expirationDateTime, transactionFromDateTime, transactionToDateTime);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class OBReadData1 {\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(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}