com.adyen.model.posterminalmanagement.Address Maven / Gradle / Ivy
/*
* POS Terminal Management API
*
* The version of the OpenAPI document: 1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.adyen.model.posterminalmanagement;
import java.util.Objects;
import java.util.Arrays;
import java.util.Map;
import java.util.HashMap;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.core.JsonProcessingException;
/**
* Address
*/
@JsonPropertyOrder({
Address.JSON_PROPERTY_CITY,
Address.JSON_PROPERTY_COUNTRY_CODE,
Address.JSON_PROPERTY_POSTAL_CODE,
Address.JSON_PROPERTY_STATE_OR_PROVINCE,
Address.JSON_PROPERTY_STREET_ADDRESS,
Address.JSON_PROPERTY_STREET_ADDRESS2
})
public class Address {
public static final String JSON_PROPERTY_CITY = "city";
private String city;
public static final String JSON_PROPERTY_COUNTRY_CODE = "countryCode";
private String countryCode;
public static final String JSON_PROPERTY_POSTAL_CODE = "postalCode";
private String postalCode;
public static final String JSON_PROPERTY_STATE_OR_PROVINCE = "stateOrProvince";
private String stateOrProvince;
public static final String JSON_PROPERTY_STREET_ADDRESS = "streetAddress";
private String streetAddress;
public static final String JSON_PROPERTY_STREET_ADDRESS2 = "streetAddress2";
private String streetAddress2;
public Address() {
}
public Address city(String city) {
this.city = city;
return this;
}
/**
* Get city
* @return city
**/
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_CITY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getCity() {
return city;
}
/**
* city
*
* @param city
*/
@JsonProperty(JSON_PROPERTY_CITY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCity(String city) {
this.city = city;
}
public Address countryCode(String countryCode) {
this.countryCode = countryCode;
return this;
}
/**
* Get countryCode
* @return countryCode
**/
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_COUNTRY_CODE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getCountryCode() {
return countryCode;
}
/**
* countryCode
*
* @param countryCode
*/
@JsonProperty(JSON_PROPERTY_COUNTRY_CODE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCountryCode(String countryCode) {
this.countryCode = countryCode;
}
public Address postalCode(String postalCode) {
this.postalCode = postalCode;
return this;
}
/**
* Get postalCode
* @return postalCode
**/
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_POSTAL_CODE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getPostalCode() {
return postalCode;
}
/**
* postalCode
*
* @param postalCode
*/
@JsonProperty(JSON_PROPERTY_POSTAL_CODE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPostalCode(String postalCode) {
this.postalCode = postalCode;
}
public Address stateOrProvince(String stateOrProvince) {
this.stateOrProvince = stateOrProvince;
return this;
}
/**
* Get stateOrProvince
* @return stateOrProvince
**/
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_STATE_OR_PROVINCE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getStateOrProvince() {
return stateOrProvince;
}
/**
* stateOrProvince
*
* @param stateOrProvince
*/
@JsonProperty(JSON_PROPERTY_STATE_OR_PROVINCE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setStateOrProvince(String stateOrProvince) {
this.stateOrProvince = stateOrProvince;
}
public Address streetAddress(String streetAddress) {
this.streetAddress = streetAddress;
return this;
}
/**
* Get streetAddress
* @return streetAddress
**/
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_STREET_ADDRESS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getStreetAddress() {
return streetAddress;
}
/**
* streetAddress
*
* @param streetAddress
*/
@JsonProperty(JSON_PROPERTY_STREET_ADDRESS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setStreetAddress(String streetAddress) {
this.streetAddress = streetAddress;
}
public Address streetAddress2(String streetAddress2) {
this.streetAddress2 = streetAddress2;
return this;
}
/**
* Get streetAddress2
* @return streetAddress2
**/
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_STREET_ADDRESS2)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getStreetAddress2() {
return streetAddress2;
}
/**
* streetAddress2
*
* @param streetAddress2
*/
@JsonProperty(JSON_PROPERTY_STREET_ADDRESS2)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setStreetAddress2(String streetAddress2) {
this.streetAddress2 = streetAddress2;
}
/**
* Return true if this Address object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Address address = (Address) o;
return Objects.equals(this.city, address.city) &&
Objects.equals(this.countryCode, address.countryCode) &&
Objects.equals(this.postalCode, address.postalCode) &&
Objects.equals(this.stateOrProvince, address.stateOrProvince) &&
Objects.equals(this.streetAddress, address.streetAddress) &&
Objects.equals(this.streetAddress2, address.streetAddress2);
}
@Override
public int hashCode() {
return Objects.hash(city, countryCode, postalCode, stateOrProvince, streetAddress, streetAddress2);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Address {\n");
sb.append(" city: ").append(toIndentedString(city)).append("\n");
sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n");
sb.append(" postalCode: ").append(toIndentedString(postalCode)).append("\n");
sb.append(" stateOrProvince: ").append(toIndentedString(stateOrProvince)).append("\n");
sb.append(" streetAddress: ").append(toIndentedString(streetAddress)).append("\n");
sb.append(" streetAddress2: ").append(toIndentedString(streetAddress2)).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 ");
}
/**
* Create an instance of Address given an JSON string
*
* @param jsonString JSON string
* @return An instance of Address
* @throws JsonProcessingException if the JSON string is invalid with respect to Address
*/
public static Address fromJson(String jsonString) throws JsonProcessingException {
return JSON.getMapper().readValue(jsonString, Address.class);
}
/**
* Convert an instance of Address to an JSON string
*
* @return JSON string
*/
public String toJson() throws JsonProcessingException {
return JSON.getMapper().writeValueAsString(this);
}
}