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

com.clinia.model.common.V1Address Maven / Gradle / Ivy

// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost
// - read more on https://github.com/clinia/api-clients-generation. DO NOT EDIT.

package com.clinia.model.common;

import com.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.databind.annotation.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/**
 * An address expressed using postal conventions (as opposed to GPS or other location definition
 * formats). This data type may be used to convey addresses for use in delivering mail as well as
 * for visiting locations which might not be valid for mail delivery. There are a variety of postal
 * address formats defined around the world.
 */
public class V1Address {

  @JsonProperty("id")
  private String id;

  @JsonProperty("use")
  private String use;

  @JsonProperty("type")
  private String type;

  @JsonProperty("text")
  private String text;

  @JsonProperty("line")
  private List line;

  @JsonProperty("city")
  private String city;

  @JsonProperty("district")
  private String district;

  @JsonProperty("state")
  private String state;

  @JsonProperty("postalCode")
  private String postalCode;

  @JsonProperty("country")
  private String country;

  @JsonProperty("period")
  private V1Period period;

  public V1Address setId(String id) {
    this.id = id;
    return this;
  }

  /** A sequence of Unicode characters. */
  @javax.annotation.Nullable
  public String getId() {
    return id;
  }

  public V1Address setUse(String use) {
    this.use = use;
    return this;
  }

  /**
   * A string which has at least one character and no leading or trailing whitespace and where there
   * is no whitespace other than single spaces in the contents.
   */
  @javax.annotation.Nullable
  public String getUse() {
    return use;
  }

  public V1Address setType(String type) {
    this.type = type;
    return this;
  }

  /**
   * A string which has at least one character and no leading or trailing whitespace and where there
   * is no whitespace other than single spaces in the contents.
   */
  @javax.annotation.Nullable
  public String getType() {
    return type;
  }

  public V1Address setText(String text) {
    this.text = text;
    return this;
  }

  /** A sequence of Unicode characters. */
  @javax.annotation.Nullable
  public String getText() {
    return text;
  }

  public V1Address setLine(List line) {
    this.line = line;
    return this;
  }

  public V1Address addLine(String lineItem) {
    if (this.line == null) {
      this.line = new ArrayList<>();
    }
    this.line.add(lineItem);
    return this;
  }

  /**
   * Street name, number, direction, P.O. Box etc. The line order is the order in which lines
   * should appear in an address label.
   */
  @javax.annotation.Nullable
  public List getLine() {
    return line;
  }

  public V1Address setCity(String city) {
    this.city = city;
    return this;
  }

  /** A sequence of Unicode characters. */
  @javax.annotation.Nullable
  public String getCity() {
    return city;
  }

  public V1Address setDistrict(String district) {
    this.district = district;
    return this;
  }

  /** A sequence of Unicode characters. */
  @javax.annotation.Nullable
  public String getDistrict() {
    return district;
  }

  public V1Address setState(String state) {
    this.state = state;
    return this;
  }

  /** A sequence of Unicode characters. */
  @javax.annotation.Nullable
  public String getState() {
    return state;
  }

  public V1Address setPostalCode(String postalCode) {
    this.postalCode = postalCode;
    return this;
  }

  /** A sequence of Unicode characters. */
  @javax.annotation.Nullable
  public String getPostalCode() {
    return postalCode;
  }

  public V1Address setCountry(String country) {
    this.country = country;
    return this;
  }

  /** A sequence of Unicode characters. */
  @javax.annotation.Nullable
  public String getCountry() {
    return country;
  }

  public V1Address setPeriod(V1Period period) {
    this.period = period;
    return this;
  }

  /** Get period */
  @javax.annotation.Nullable
  public V1Period getPeriod() {
    return period;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    V1Address v1Address = (V1Address) o;
    return (
      Objects.equals(this.id, v1Address.id) &&
      Objects.equals(this.use, v1Address.use) &&
      Objects.equals(this.type, v1Address.type) &&
      Objects.equals(this.text, v1Address.text) &&
      Objects.equals(this.line, v1Address.line) &&
      Objects.equals(this.city, v1Address.city) &&
      Objects.equals(this.district, v1Address.district) &&
      Objects.equals(this.state, v1Address.state) &&
      Objects.equals(this.postalCode, v1Address.postalCode) &&
      Objects.equals(this.country, v1Address.country) &&
      Objects.equals(this.period, v1Address.period)
    );
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, use, type, text, line, city, district, state, postalCode, country, period);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class V1Address {\n");
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    use: ").append(toIndentedString(use)).append("\n");
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
    sb.append("    text: ").append(toIndentedString(text)).append("\n");
    sb.append("    line: ").append(toIndentedString(line)).append("\n");
    sb.append("    city: ").append(toIndentedString(city)).append("\n");
    sb.append("    district: ").append(toIndentedString(district)).append("\n");
    sb.append("    state: ").append(toIndentedString(state)).append("\n");
    sb.append("    postalCode: ").append(toIndentedString(postalCode)).append("\n");
    sb.append("    country: ").append(toIndentedString(country)).append("\n");
    sb.append("    period: ").append(toIndentedString(period)).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    ");
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy