tech.deepdreams.worker.api.dtos.LocalityDTO Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of worker-api Show documentation
Show all versions of worker-api Show documentation
Payroll Worker API project for Java 17
package tech.deepdreams.worker.api.dtos;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import tech.deepdreams.worker.api.dtos.CountryDTO;
import tech.deepdreams.worker.api.dtos.StateDTO;
import org.openapitools.jackson.nullable.JsonNullable;
/**
* LocalityDTO
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-09-14T12:54:23.701675700-04:00[America/Toronto]")
public class LocalityDTO {
@JsonProperty("id")
private Long id;
@JsonProperty("label")
private String label;
@JsonProperty("country")
private CountryDTO country;
@JsonProperty("state")
private StateDTO state;
public LocalityDTO id(Long id) {
this.id = id;
return this;
}
/**
* Get id
* @return id
*/
@ApiModelProperty(value = "")
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public LocalityDTO label(String label) {
this.label = label;
return this;
}
/**
* Get label
* @return label
*/
@ApiModelProperty(value = "")
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
public LocalityDTO country(CountryDTO country) {
this.country = country;
return this;
}
/**
* Get country
* @return country
*/
@ApiModelProperty(value = "")
public CountryDTO getCountry() {
return country;
}
public void setCountry(CountryDTO country) {
this.country = country;
}
public LocalityDTO state(StateDTO state) {
this.state = state;
return this;
}
/**
* Get state
* @return state
*/
@ApiModelProperty(value = "")
public StateDTO getState() {
return state;
}
public void setState(StateDTO state) {
this.state = state;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
LocalityDTO locality = (LocalityDTO) o;
return Objects.equals(this.id, locality.id) &&
Objects.equals(this.label, locality.label) &&
Objects.equals(this.country, locality.country) &&
Objects.equals(this.state, locality.state);
}
@Override
public int hashCode() {
return Objects.hash(id, label, country, state);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class LocalityDTO {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" label: ").append(toIndentedString(label)).append("\n");
sb.append(" country: ").append(toIndentedString(country)).append("\n");
sb.append(" state: ").append(toIndentedString(state)).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 ");
}
}