uk.org.openbanking.datamodel.payment.OBPostalAddress6 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.payment;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.validation.annotation.Validated;
import javax.validation.Valid;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
/**
* Information that locates and identifies a specific address, as defined by postal services.
*/
@ApiModel(description = "Information that locates and identifies a specific address, as defined by postal services.")
@Validated
@javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2018-10-10T14:05:22.993+01:00")
public class OBPostalAddress6 {
@JsonProperty("AddressType")
private OBAddressTypeCode addressType = null;
@JsonProperty("Department")
private String department = null;
@JsonProperty("SubDepartment")
private String subDepartment = null;
@JsonProperty("StreetName")
private String streetName = null;
@JsonProperty("BuildingNumber")
private String buildingNumber = null;
@JsonProperty("PostCode")
private String postCode = null;
@JsonProperty("TownName")
private String townName = null;
@JsonProperty("CountrySubDivision")
private String countrySubDivision = null;
@JsonProperty("Country")
private String country = null;
@JsonProperty("AddressLine")
@Valid
private List addressLine = null;
public OBPostalAddress6 addressType(OBAddressTypeCode addressType) {
this.addressType = addressType;
return this;
}
/**
* Get addressType
* @return addressType
**/
@ApiModelProperty(value = "")
@Valid
public OBAddressTypeCode getAddressType() {
return addressType;
}
public void setAddressType(OBAddressTypeCode addressType) {
this.addressType = addressType;
}
public OBPostalAddress6 department(String department) {
this.department = department;
return this;
}
/**
* Identification of a division of a large organisation or building.
* @return department
**/
@ApiModelProperty(value = "Identification of a division of a large organisation or building.")
@Size(min=1,max=70)
public String getDepartment() {
return department;
}
public void setDepartment(String department) {
this.department = department;
}
public OBPostalAddress6 subDepartment(String subDepartment) {
this.subDepartment = subDepartment;
return this;
}
/**
* Identification of a sub-division of a large organisation or building.
* @return subDepartment
**/
@ApiModelProperty(value = "Identification of a sub-division of a large organisation or building.")
@Size(min=1,max=70)
public String getSubDepartment() {
return subDepartment;
}
public void setSubDepartment(String subDepartment) {
this.subDepartment = subDepartment;
}
public OBPostalAddress6 streetName(String streetName) {
this.streetName = streetName;
return this;
}
/**
* Name of a street or thoroughfare.
* @return streetName
**/
@ApiModelProperty(value = "Name of a street or thoroughfare.")
@Size(min=1,max=70)
public String getStreetName() {
return streetName;
}
public void setStreetName(String streetName) {
this.streetName = streetName;
}
public OBPostalAddress6 buildingNumber(String buildingNumber) {
this.buildingNumber = buildingNumber;
return this;
}
/**
* Number that identifies the position of a building on a street.
* @return buildingNumber
**/
@ApiModelProperty(value = "Number that identifies the position of a building on a street.")
@Size(min=1,max=16)
public String getBuildingNumber() {
return buildingNumber;
}
public void setBuildingNumber(String buildingNumber) {
this.buildingNumber = buildingNumber;
}
public OBPostalAddress6 postCode(String postCode) {
this.postCode = postCode;
return this;
}
/**
* Identifier consisting of a group of letters and/or numbers that is added to a postal address to assist the sorting of mail.
* @return postCode
**/
@ApiModelProperty(value = "Identifier consisting of a group of letters and/or numbers that is added to a postal address to assist the sorting of mail.")
@Size(min=1,max=16)
public String getPostCode() {
return postCode;
}
public void setPostCode(String postCode) {
this.postCode = postCode;
}
public OBPostalAddress6 townName(String townName) {
this.townName = townName;
return this;
}
/**
* Name of a built-up area, with defined boundaries, and a local government.
* @return townName
**/
@ApiModelProperty(value = "Name of a built-up area, with defined boundaries, and a local government.")
@Size(min=1,max=35)
public String getTownName() {
return townName;
}
public void setTownName(String townName) {
this.townName = townName;
}
public OBPostalAddress6 countrySubDivision(String countrySubDivision) {
this.countrySubDivision = countrySubDivision;
return this;
}
/**
* Identifies a subdivision of a country such as state, region, county.
* @return countrySubDivision
**/
@ApiModelProperty(value = "Identifies a subdivision of a country such as state, region, county.")
@Size(min=1,max=35)
public String getCountrySubDivision() {
return countrySubDivision;
}
public void setCountrySubDivision(String countrySubDivision) {
this.countrySubDivision = countrySubDivision;
}
public OBPostalAddress6 country(String country) {
this.country = country;
return this;
}
/**
* Nation with its own government.
* @return country
**/
@ApiModelProperty(value = "Nation with its own government.")
@Pattern(regexp="^[A-Z]{2,2}$")
public String getCountry() {
return country;
}
public void setCountry(String country) {
this.country = country;
}
public OBPostalAddress6 addressLine(List addressLine) {
this.addressLine = addressLine;
return this;
}
public OBPostalAddress6 addAddressLineItem(String addressLineItem) {
if (this.addressLine == null) {
this.addressLine = new ArrayList();
}
this.addressLine.add(addressLineItem);
return this;
}
/**
* Information that locates and identifies a specific address, as defined by postal services, presented in free format text.
* @return addressLine
**/
@ApiModelProperty(value = "Information that locates and identifies a specific address, as defined by postal services, presented in free format text.")
@Size(min=0,max=7)
public List getAddressLine() {
return addressLine;
}
public void setAddressLine(List addressLine) {
this.addressLine = addressLine;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
OBPostalAddress6 obPostalAddress6 = (OBPostalAddress6) o;
return Objects.equals(this.addressType, obPostalAddress6.addressType) &&
Objects.equals(this.department, obPostalAddress6.department) &&
Objects.equals(this.subDepartment, obPostalAddress6.subDepartment) &&
Objects.equals(this.streetName, obPostalAddress6.streetName) &&
Objects.equals(this.buildingNumber, obPostalAddress6.buildingNumber) &&
Objects.equals(this.postCode, obPostalAddress6.postCode) &&
Objects.equals(this.townName, obPostalAddress6.townName) &&
Objects.equals(this.countrySubDivision, obPostalAddress6.countrySubDivision) &&
Objects.equals(this.country, obPostalAddress6.country) &&
Objects.equals(this.addressLine, obPostalAddress6.addressLine);
}
@Override
public int hashCode() {
return Objects.hash(addressType, department, subDepartment, streetName, buildingNumber, postCode, townName, countrySubDivision, country, addressLine);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class OBPostalAddress6 {\n");
sb.append(" addressType: ").append(toIndentedString(addressType)).append("\n");
sb.append(" department: ").append(toIndentedString(department)).append("\n");
sb.append(" subDepartment: ").append(toIndentedString(subDepartment)).append("\n");
sb.append(" streetName: ").append(toIndentedString(streetName)).append("\n");
sb.append(" buildingNumber: ").append(toIndentedString(buildingNumber)).append("\n");
sb.append(" postCode: ").append(toIndentedString(postCode)).append("\n");
sb.append(" townName: ").append(toIndentedString(townName)).append("\n");
sb.append(" countrySubDivision: ").append(toIndentedString(countrySubDivision)).append("\n");
sb.append(" country: ").append(toIndentedString(country)).append("\n");
sb.append(" addressLine: ").append(toIndentedString(addressLine)).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 ");
}
}