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

com.xero.models.accounting.AddressForOrganisation Maven / Gradle / Ivy

/*
 * Xero Accounting API
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * Contact: [email protected]
 *
 * 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.xero.models.accounting;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonValue;
import com.xero.api.StringUtil;
import io.swagger.annotations.ApiModelProperty;
import java.util.Objects;

/** AddressForOrganisation */
public class AddressForOrganisation {
  StringUtil util = new StringUtil();
  /** define the type of address */
  public enum AddressTypeEnum {
    /** POBOX */
    POBOX("POBOX"),

    /** STREET */
    STREET("STREET"),

    /** DELIVERY */
    DELIVERY("DELIVERY");

    private String value;

    AddressTypeEnum(String value) {
      this.value = value;
    }

    /**
     * getValue
     *
     * @return String value
     */
    @JsonValue
    public String getValue() {
      return value;
    }

    /**
     * toString
     *
     * @return String value
     */
    @Override
    public String toString() {
      return String.valueOf(value);
    }

    /**
     * fromValue
     *
     * @param value String
     */
    @JsonCreator
    public static AddressTypeEnum fromValue(String value) {
      for (AddressTypeEnum b : AddressTypeEnum.values()) {
        if (b.value.equals(value)) {
          return b;
        }
      }
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
    }
  }

  @JsonProperty("AddressType")
  private AddressTypeEnum addressType;

  @JsonProperty("AddressLine1")
  private String addressLine1;

  @JsonProperty("AddressLine2")
  private String addressLine2;

  @JsonProperty("AddressLine3")
  private String addressLine3;

  @JsonProperty("AddressLine4")
  private String addressLine4;

  @JsonProperty("City")
  private String city;

  @JsonProperty("Region")
  private String region;

  @JsonProperty("PostalCode")
  private String postalCode;

  @JsonProperty("Country")
  private String country;

  @JsonProperty("AttentionTo")
  private String attentionTo;
  /**
   * define the type of address
   *
   * @param addressType AddressTypeEnum
   * @return AddressForOrganisation
   */
  public AddressForOrganisation addressType(AddressTypeEnum addressType) {
    this.addressType = addressType;
    return this;
  }

  /**
   * define the type of address
   *
   * @return addressType
   */
  @ApiModelProperty(value = "define the type of address")
  /**
   * define the type of address
   *
   * @return addressType AddressTypeEnum
   */
  public AddressTypeEnum getAddressType() {
    return addressType;
  }

  /**
   * define the type of address
   *
   * @param addressType AddressTypeEnum
   */
  public void setAddressType(AddressTypeEnum addressType) {
    this.addressType = addressType;
  }

  /**
   * max length = 500
   *
   * @param addressLine1 String
   * @return AddressForOrganisation
   */
  public AddressForOrganisation addressLine1(String addressLine1) {
    this.addressLine1 = addressLine1;
    return this;
  }

  /**
   * max length = 500
   *
   * @return addressLine1
   */
  @ApiModelProperty(value = "max length = 500")
  /**
   * max length = 500
   *
   * @return addressLine1 String
   */
  public String getAddressLine1() {
    return addressLine1;
  }

  /**
   * max length = 500
   *
   * @param addressLine1 String
   */
  public void setAddressLine1(String addressLine1) {
    this.addressLine1 = addressLine1;
  }

  /**
   * max length = 500
   *
   * @param addressLine2 String
   * @return AddressForOrganisation
   */
  public AddressForOrganisation addressLine2(String addressLine2) {
    this.addressLine2 = addressLine2;
    return this;
  }

  /**
   * max length = 500
   *
   * @return addressLine2
   */
  @ApiModelProperty(value = "max length = 500")
  /**
   * max length = 500
   *
   * @return addressLine2 String
   */
  public String getAddressLine2() {
    return addressLine2;
  }

  /**
   * max length = 500
   *
   * @param addressLine2 String
   */
  public void setAddressLine2(String addressLine2) {
    this.addressLine2 = addressLine2;
  }

  /**
   * max length = 500
   *
   * @param addressLine3 String
   * @return AddressForOrganisation
   */
  public AddressForOrganisation addressLine3(String addressLine3) {
    this.addressLine3 = addressLine3;
    return this;
  }

  /**
   * max length = 500
   *
   * @return addressLine3
   */
  @ApiModelProperty(value = "max length = 500")
  /**
   * max length = 500
   *
   * @return addressLine3 String
   */
  public String getAddressLine3() {
    return addressLine3;
  }

  /**
   * max length = 500
   *
   * @param addressLine3 String
   */
  public void setAddressLine3(String addressLine3) {
    this.addressLine3 = addressLine3;
  }

  /**
   * max length = 500
   *
   * @param addressLine4 String
   * @return AddressForOrganisation
   */
  public AddressForOrganisation addressLine4(String addressLine4) {
    this.addressLine4 = addressLine4;
    return this;
  }

  /**
   * max length = 500
   *
   * @return addressLine4
   */
  @ApiModelProperty(value = "max length = 500")
  /**
   * max length = 500
   *
   * @return addressLine4 String
   */
  public String getAddressLine4() {
    return addressLine4;
  }

  /**
   * max length = 500
   *
   * @param addressLine4 String
   */
  public void setAddressLine4(String addressLine4) {
    this.addressLine4 = addressLine4;
  }

  /**
   * max length = 255
   *
   * @param city String
   * @return AddressForOrganisation
   */
  public AddressForOrganisation city(String city) {
    this.city = city;
    return this;
  }

  /**
   * max length = 255
   *
   * @return city
   */
  @ApiModelProperty(value = "max length = 255")
  /**
   * max length = 255
   *
   * @return city String
   */
  public String getCity() {
    return city;
  }

  /**
   * max length = 255
   *
   * @param city String
   */
  public void setCity(String city) {
    this.city = city;
  }

  /**
   * max length = 255
   *
   * @param region String
   * @return AddressForOrganisation
   */
  public AddressForOrganisation region(String region) {
    this.region = region;
    return this;
  }

  /**
   * max length = 255
   *
   * @return region
   */
  @ApiModelProperty(value = "max length = 255")
  /**
   * max length = 255
   *
   * @return region String
   */
  public String getRegion() {
    return region;
  }

  /**
   * max length = 255
   *
   * @param region String
   */
  public void setRegion(String region) {
    this.region = region;
  }

  /**
   * max length = 50
   *
   * @param postalCode String
   * @return AddressForOrganisation
   */
  public AddressForOrganisation postalCode(String postalCode) {
    this.postalCode = postalCode;
    return this;
  }

  /**
   * max length = 50
   *
   * @return postalCode
   */
  @ApiModelProperty(value = "max length = 50")
  /**
   * max length = 50
   *
   * @return postalCode String
   */
  public String getPostalCode() {
    return postalCode;
  }

  /**
   * max length = 50
   *
   * @param postalCode String
   */
  public void setPostalCode(String postalCode) {
    this.postalCode = postalCode;
  }

  /**
   * max length = 50, [A-Z], [a-z] only
   *
   * @param country String
   * @return AddressForOrganisation
   */
  public AddressForOrganisation country(String country) {
    this.country = country;
    return this;
  }

  /**
   * max length = 50, [A-Z], [a-z] only
   *
   * @return country
   */
  @ApiModelProperty(value = "max length = 50, [A-Z], [a-z] only")
  /**
   * max length = 50, [A-Z], [a-z] only
   *
   * @return country String
   */
  public String getCountry() {
    return country;
  }

  /**
   * max length = 50, [A-Z], [a-z] only
   *
   * @param country String
   */
  public void setCountry(String country) {
    this.country = country;
  }

  /**
   * max length = 255
   *
   * @param attentionTo String
   * @return AddressForOrganisation
   */
  public AddressForOrganisation attentionTo(String attentionTo) {
    this.attentionTo = attentionTo;
    return this;
  }

  /**
   * max length = 255
   *
   * @return attentionTo
   */
  @ApiModelProperty(value = "max length = 255")
  /**
   * max length = 255
   *
   * @return attentionTo String
   */
  public String getAttentionTo() {
    return attentionTo;
  }

  /**
   * max length = 255
   *
   * @param attentionTo String
   */
  public void setAttentionTo(String attentionTo) {
    this.attentionTo = attentionTo;
  }

  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    AddressForOrganisation addressForOrganisation = (AddressForOrganisation) o;
    return Objects.equals(this.addressType, addressForOrganisation.addressType)
        && Objects.equals(this.addressLine1, addressForOrganisation.addressLine1)
        && Objects.equals(this.addressLine2, addressForOrganisation.addressLine2)
        && Objects.equals(this.addressLine3, addressForOrganisation.addressLine3)
        && Objects.equals(this.addressLine4, addressForOrganisation.addressLine4)
        && Objects.equals(this.city, addressForOrganisation.city)
        && Objects.equals(this.region, addressForOrganisation.region)
        && Objects.equals(this.postalCode, addressForOrganisation.postalCode)
        && Objects.equals(this.country, addressForOrganisation.country)
        && Objects.equals(this.attentionTo, addressForOrganisation.attentionTo);
  }

  @Override
  public int hashCode() {
    return Objects.hash(
        addressType,
        addressLine1,
        addressLine2,
        addressLine3,
        addressLine4,
        city,
        region,
        postalCode,
        country,
        attentionTo);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class AddressForOrganisation {\n");
    sb.append("    addressType: ").append(toIndentedString(addressType)).append("\n");
    sb.append("    addressLine1: ").append(toIndentedString(addressLine1)).append("\n");
    sb.append("    addressLine2: ").append(toIndentedString(addressLine2)).append("\n");
    sb.append("    addressLine3: ").append(toIndentedString(addressLine3)).append("\n");
    sb.append("    addressLine4: ").append(toIndentedString(addressLine4)).append("\n");
    sb.append("    city: ").append(toIndentedString(city)).append("\n");
    sb.append("    region: ").append(toIndentedString(region)).append("\n");
    sb.append("    postalCode: ").append(toIndentedString(postalCode)).append("\n");
    sb.append("    country: ").append(toIndentedString(country)).append("\n");
    sb.append("    attentionTo: ").append(toIndentedString(attentionTo)).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 - 2025 Weber Informatics LLC | Privacy Policy