|
| 1 | +package com.platzi.jobsearch; |
| 2 | + |
| 3 | +import com.google.gson.annotations.SerializedName; |
| 4 | + |
| 5 | +import java.util.Objects; |
| 6 | + |
| 7 | +/** |
| 8 | + * Clase que representa los resultados de una busqueda |
| 9 | + */ |
| 10 | +public final class JobPosition { |
| 11 | + private String id; |
| 12 | + |
| 13 | + private String type; |
| 14 | + |
| 15 | + private String ulr; |
| 16 | + |
| 17 | + @SerializedName("created_at") |
| 18 | + private String createdAt; |
| 19 | + |
| 20 | + private String company; |
| 21 | + |
| 22 | + @SerializedName("company_url") |
| 23 | + private String companyUrl; |
| 24 | + |
| 25 | + private String location; |
| 26 | + |
| 27 | + private String title; |
| 28 | + |
| 29 | + private String description; |
| 30 | + |
| 31 | + @SerializedName("how_to_apply") |
| 32 | + private String howToApply; |
| 33 | + |
| 34 | + @SerializedName("company_logo") |
| 35 | + private String companyLogo; |
| 36 | + |
| 37 | + public String getId() { |
| 38 | + return id; |
| 39 | + } |
| 40 | + |
| 41 | + public void setId(String id) { |
| 42 | + this.id = id; |
| 43 | + } |
| 44 | + |
| 45 | + public String getType() { |
| 46 | + return type; |
| 47 | + } |
| 48 | + |
| 49 | + public void setType(String type) { |
| 50 | + this.type = type; |
| 51 | + } |
| 52 | + |
| 53 | + public String getUlr() { |
| 54 | + return ulr; |
| 55 | + } |
| 56 | + |
| 57 | + public void setUlr(String ulr) { |
| 58 | + this.ulr = ulr; |
| 59 | + } |
| 60 | + |
| 61 | + public String getCreatedAt() { |
| 62 | + return createdAt; |
| 63 | + } |
| 64 | + |
| 65 | + public void setCreatedAt(String createdAt) { |
| 66 | + this.createdAt = createdAt; |
| 67 | + } |
| 68 | + |
| 69 | + public String getCompany() { |
| 70 | + return company; |
| 71 | + } |
| 72 | + |
| 73 | + public void setCompany(String company) { |
| 74 | + this.company = company; |
| 75 | + } |
| 76 | + |
| 77 | + public String getCompanyUrl() { |
| 78 | + return companyUrl; |
| 79 | + } |
| 80 | + |
| 81 | + public void setCompanyUrl(String companyUrl) { |
| 82 | + this.companyUrl = companyUrl; |
| 83 | + } |
| 84 | + |
| 85 | + public String getLocation() { |
| 86 | + return location; |
| 87 | + } |
| 88 | + |
| 89 | + public void setLocation(String location) { |
| 90 | + this.location = location; |
| 91 | + } |
| 92 | + |
| 93 | + public String getTitle() { |
| 94 | + return title; |
| 95 | + } |
| 96 | + |
| 97 | + public void setTitle(String title) { |
| 98 | + this.title = title; |
| 99 | + } |
| 100 | + |
| 101 | + public String getDescription() { |
| 102 | + return description; |
| 103 | + } |
| 104 | + |
| 105 | + public void setDescription(String description) { |
| 106 | + this.description = description; |
| 107 | + } |
| 108 | + |
| 109 | + public String getHowToApply() { |
| 110 | + return howToApply; |
| 111 | + } |
| 112 | + |
| 113 | + public void setHowToApply(String howToApply) { |
| 114 | + this.howToApply = howToApply; |
| 115 | + } |
| 116 | + |
| 117 | + public String getCompanyLogo() { |
| 118 | + return companyLogo; |
| 119 | + } |
| 120 | + |
| 121 | + public void setCompanyLogo(String companyLogo) { |
| 122 | + this.companyLogo = companyLogo; |
| 123 | + } |
| 124 | + |
| 125 | + @Override |
| 126 | + public boolean equals(Object o) { |
| 127 | + if (this == o) return true; |
| 128 | + if (o == null || getClass() != o.getClass()) return false; |
| 129 | + JobPosition that = (JobPosition) o; |
| 130 | + return getId().equals(that.getId()) && |
| 131 | + getType().equals(that.getType()) && |
| 132 | + getUlr().equals(that.getUlr()) && |
| 133 | + getCreatedAt().equals(that.getCreatedAt()) && |
| 134 | + getCompany().equals(that.getCompany()) && |
| 135 | + Objects.equals(getCompanyUrl(), that.getCompanyUrl()) && |
| 136 | + Objects.equals(getLocation(), that.getLocation()) && |
| 137 | + getTitle().equals(that.getTitle()) && |
| 138 | + Objects.equals(getDescription(), that.getDescription()) && |
| 139 | + Objects.equals(getHowToApply(), that.getHowToApply()) && |
| 140 | + Objects.equals(getCompanyLogo(), that.getCompanyLogo()); |
| 141 | + } |
| 142 | + |
| 143 | + @Override |
| 144 | + public int hashCode() { |
| 145 | + return Objects.hash(getId(), getType(), getUlr(), getCreatedAt(), getCompany(), getCompanyUrl(), getLocation(), getTitle(), getDescription(), getHowToApply(), getCompanyLogo()); |
| 146 | + } |
| 147 | + |
| 148 | + @Override |
| 149 | + public String toString() { |
| 150 | + return "JobPosition{" + |
| 151 | + "id='" + id + '\'' + |
| 152 | + ", type='" + type + '\'' + |
| 153 | + ", ulr='" + ulr + '\'' + |
| 154 | + ", createdAt='" + createdAt + '\'' + |
| 155 | + ", company='" + company + '\'' + |
| 156 | + ", companyUrl='" + companyUrl + '\'' + |
| 157 | + ", location='" + location + '\'' + |
| 158 | + ", title='" + title + '\'' + |
| 159 | + ", description='" + description + '\'' + |
| 160 | + ", howToApply='" + howToApply + '\'' + |
| 161 | + ", companyLogo='" + companyLogo + '\'' + |
| 162 | + '}'; |
| 163 | + } |
| 164 | +} |
0 commit comments