Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.alipay.v3.model.CloudResumeWorkExperience Maven / Gradle / Ivy
/*
* 支付宝开放平台API
* 支付宝开放平台v3协议文档
*
* The version of the OpenAPI document: 2024-11-12
*
*
* 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.alipay.v3.model;
import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonArray;
import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonDeserializer;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParseException;
import com.google.gson.TypeAdapterFactory;
import com.google.gson.reflect.TypeToken;
import java.lang.reflect.Type;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import com.alipay.v3.JSON;
/**
* CloudResumeWorkExperience
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class CloudResumeWorkExperience {
public static final String SERIALIZED_NAME_COMPANY_NAME = "company_name";
@SerializedName(SERIALIZED_NAME_COMPANY_NAME)
private String companyName;
public static final String SERIALIZED_NAME_JOB_ID = "job_id";
@SerializedName(SERIALIZED_NAME_JOB_ID)
private String jobId;
public static final String SERIALIZED_NAME_JOB_NAME = "job_name";
@SerializedName(SERIALIZED_NAME_JOB_NAME)
private String jobName;
public static final String SERIALIZED_NAME_POSITION_NAME = "position_name";
@SerializedName(SERIALIZED_NAME_POSITION_NAME)
private String positionName;
public static final String SERIALIZED_NAME_PROFESSION_ID = "profession_id";
@SerializedName(SERIALIZED_NAME_PROFESSION_ID)
private String professionId;
public static final String SERIALIZED_NAME_PROFESSION_NAME = "profession_name";
@SerializedName(SERIALIZED_NAME_PROFESSION_NAME)
private String professionName;
public static final String SERIALIZED_NAME_WORK_DESC = "work_desc";
@SerializedName(SERIALIZED_NAME_WORK_DESC)
private String workDesc;
public static final String SERIALIZED_NAME_WORK_END_TIME = "work_end_time";
@SerializedName(SERIALIZED_NAME_WORK_END_TIME)
private Integer workEndTime;
public static final String SERIALIZED_NAME_WORK_START_TIME = "work_start_time";
@SerializedName(SERIALIZED_NAME_WORK_START_TIME)
private Integer workStartTime;
public CloudResumeWorkExperience() {
}
public CloudResumeWorkExperience companyName(String companyName) {
this.companyName = companyName;
return this;
}
/**
* 公司名称
* @return companyName
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "xxx有限公司", value = "公司名称")
public String getCompanyName() {
return companyName;
}
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
public CloudResumeWorkExperience jobId(String jobId) {
this.jobId = jobId;
return this;
}
/**
* 职业id
* @return jobId
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "47f5c014", value = "职业id")
public String getJobId() {
return jobId;
}
public void setJobId(String jobId) {
this.jobId = jobId;
}
public CloudResumeWorkExperience jobName(String jobName) {
this.jobName = jobName;
return this;
}
/**
* 职业
* @return jobName
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "送餐员", value = "职业")
public String getJobName() {
return jobName;
}
public void setJobName(String jobName) {
this.jobName = jobName;
}
public CloudResumeWorkExperience positionName(String positionName) {
this.positionName = positionName;
return this;
}
/**
* 用户在求职意向页面自主录入
* @return positionName
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "开发工程师", value = "用户在求职意向页面自主录入")
public String getPositionName() {
return positionName;
}
public void setPositionName(String positionName) {
this.positionName = positionName;
}
public CloudResumeWorkExperience professionId(String professionId) {
this.professionId = professionId;
return this;
}
/**
* 行业id
* @return professionId
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "47f5c", value = "行业id")
public String getProfessionId() {
return professionId;
}
public void setProfessionId(String professionId) {
this.professionId = professionId;
}
public CloudResumeWorkExperience professionName(String professionName) {
this.professionName = professionName;
return this;
}
/**
* 行业名称
* @return professionName
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "餐饮服务", value = "行业名称")
public String getProfessionName() {
return professionName;
}
public void setProfessionName(String professionName) {
this.professionName = professionName;
}
public CloudResumeWorkExperience workDesc(String workDesc) {
this.workDesc = workDesc;
return this;
}
/**
* 工作描述
* @return workDesc
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "工作描述", value = "工作描述")
public String getWorkDesc() {
return workDesc;
}
public void setWorkDesc(String workDesc) {
this.workDesc = workDesc;
}
public CloudResumeWorkExperience workEndTime(Integer workEndTime) {
this.workEndTime = workEndTime;
return this;
}
/**
* 工作结束时间
* @return workEndTime
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "1667232000000", value = "工作结束时间")
public Integer getWorkEndTime() {
return workEndTime;
}
public void setWorkEndTime(Integer workEndTime) {
this.workEndTime = workEndTime;
}
public CloudResumeWorkExperience workStartTime(Integer workStartTime) {
this.workStartTime = workStartTime;
return this;
}
/**
* 工作开始日期
* @return workStartTime
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "1666159991000", value = "工作开始日期")
public Integer getWorkStartTime() {
return workStartTime;
}
public void setWorkStartTime(Integer workStartTime) {
this.workStartTime = workStartTime;
}
/**
* A container for additional, undeclared properties.
* This is a holder for any undeclared properties as specified with
* the 'additionalProperties' keyword in the OAS document.
*/
private Map additionalProperties;
/**
* Set the additional (undeclared) property with the specified name and value.
* If the property does not already exist, create it otherwise replace it.
*
* @param key name of the property
* @param value value of the property
* @return the CloudResumeWorkExperience instance itself
*/
public CloudResumeWorkExperience putAdditionalProperty(String key, Object value) {
if (this.additionalProperties == null) {
this.additionalProperties = new HashMap();
}
this.additionalProperties.put(key, value);
return this;
}
/**
* Return the additional (undeclared) property.
*
* @return a map of objects
*/
public Map getAdditionalProperties() {
return additionalProperties;
}
/**
* Return the additional (undeclared) property with the specified name.
*
* @param key name of the property
* @return an object
*/
public Object getAdditionalProperty(String key) {
if (this.additionalProperties == null) {
return null;
}
return this.additionalProperties.get(key);
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CloudResumeWorkExperience cloudResumeWorkExperience = (CloudResumeWorkExperience) o;
return Objects.equals(this.companyName, cloudResumeWorkExperience.companyName) &&
Objects.equals(this.jobId, cloudResumeWorkExperience.jobId) &&
Objects.equals(this.jobName, cloudResumeWorkExperience.jobName) &&
Objects.equals(this.positionName, cloudResumeWorkExperience.positionName) &&
Objects.equals(this.professionId, cloudResumeWorkExperience.professionId) &&
Objects.equals(this.professionName, cloudResumeWorkExperience.professionName) &&
Objects.equals(this.workDesc, cloudResumeWorkExperience.workDesc) &&
Objects.equals(this.workEndTime, cloudResumeWorkExperience.workEndTime) &&
Objects.equals(this.workStartTime, cloudResumeWorkExperience.workStartTime)&&
Objects.equals(this.additionalProperties, cloudResumeWorkExperience.additionalProperties);
}
@Override
public int hashCode() {
return Objects.hash(companyName, jobId, jobName, positionName, professionId, professionName, workDesc, workEndTime, workStartTime, additionalProperties);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CloudResumeWorkExperience {\n");
sb.append(" companyName: ").append(toIndentedString(companyName)).append("\n");
sb.append(" jobId: ").append(toIndentedString(jobId)).append("\n");
sb.append(" jobName: ").append(toIndentedString(jobName)).append("\n");
sb.append(" positionName: ").append(toIndentedString(positionName)).append("\n");
sb.append(" professionId: ").append(toIndentedString(professionId)).append("\n");
sb.append(" professionName: ").append(toIndentedString(professionName)).append("\n");
sb.append(" workDesc: ").append(toIndentedString(workDesc)).append("\n");
sb.append(" workEndTime: ").append(toIndentedString(workEndTime)).append("\n");
sb.append(" workStartTime: ").append(toIndentedString(workStartTime)).append("\n");
sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).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 ");
}
public static HashSet openapiFields;
public static HashSet openapiRequiredFields;
static {
// a set of all properties/fields (JSON key names)
openapiFields = new HashSet();
openapiFields.add("company_name");
openapiFields.add("job_id");
openapiFields.add("job_name");
openapiFields.add("position_name");
openapiFields.add("profession_id");
openapiFields.add("profession_name");
openapiFields.add("work_desc");
openapiFields.add("work_end_time");
openapiFields.add("work_start_time");
// a set of required properties/fields (JSON key names)
openapiRequiredFields = new HashSet();
}
/**
* Validates the JSON Object and throws an exception if issues found
*
* @param jsonObj JSON Object
* @throws IOException if the JSON Object is invalid with respect to CloudResumeWorkExperience
*/
public static void validateJsonObject(JsonObject jsonObj) throws IOException {
if (jsonObj == null) {
if (CloudResumeWorkExperience.openapiRequiredFields.isEmpty()) {
return;
} else { // has required fields
throw new IllegalArgumentException(String.format("The required field(s) %s in CloudResumeWorkExperience is not found in the empty JSON string", CloudResumeWorkExperience.openapiRequiredFields.toString()));
}
}
if (jsonObj.get("company_name") != null && !jsonObj.get("company_name").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `company_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("company_name").toString()));
}
if (jsonObj.get("job_id") != null && !jsonObj.get("job_id").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `job_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("job_id").toString()));
}
if (jsonObj.get("job_name") != null && !jsonObj.get("job_name").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `job_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("job_name").toString()));
}
if (jsonObj.get("position_name") != null && !jsonObj.get("position_name").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `position_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("position_name").toString()));
}
if (jsonObj.get("profession_id") != null && !jsonObj.get("profession_id").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `profession_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("profession_id").toString()));
}
if (jsonObj.get("profession_name") != null && !jsonObj.get("profession_name").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `profession_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("profession_name").toString()));
}
if (jsonObj.get("work_desc") != null && !jsonObj.get("work_desc").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `work_desc` to be a primitive type in the JSON string but got `%s`", jsonObj.get("work_desc").toString()));
}
}
public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
@SuppressWarnings("unchecked")
@Override
public TypeAdapter create(Gson gson, TypeToken type) {
if (!CloudResumeWorkExperience.class.isAssignableFrom(type.getRawType())) {
return null; // this class only serializes 'CloudResumeWorkExperience' and its subtypes
}
final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
final TypeAdapter thisAdapter
= gson.getDelegateAdapter(this, TypeToken.get(CloudResumeWorkExperience.class));
return (TypeAdapter) new TypeAdapter() {
@Override
public void write(JsonWriter out, CloudResumeWorkExperience value) throws IOException {
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
obj.remove("additionalProperties");
// serialize additonal properties
if (value.getAdditionalProperties() != null) {
for (Map.Entry entry : value.getAdditionalProperties().entrySet()) {
if (entry.getValue() instanceof String)
obj.addProperty(entry.getKey(), (String) entry.getValue());
else if (entry.getValue() instanceof Number)
obj.addProperty(entry.getKey(), (Number) entry.getValue());
else if (entry.getValue() instanceof Boolean)
obj.addProperty(entry.getKey(), (Boolean) entry.getValue());
else if (entry.getValue() instanceof Character)
obj.addProperty(entry.getKey(), (Character) entry.getValue());
else {
obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject());
}
}
}
elementAdapter.write(out, obj);
}
@Override
public CloudResumeWorkExperience read(JsonReader in) throws IOException {
JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();
validateJsonObject(jsonObj);
// store additional fields in the deserialized instance
CloudResumeWorkExperience instance = thisAdapter.fromJsonTree(jsonObj);
for (Map.Entry entry : jsonObj.entrySet()) {
if (!openapiFields.contains(entry.getKey())) {
if (entry.getValue().isJsonPrimitive()) { // primitive type
if (entry.getValue().getAsJsonPrimitive().isString())
instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString());
else if (entry.getValue().getAsJsonPrimitive().isNumber())
instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber());
else if (entry.getValue().getAsJsonPrimitive().isBoolean())
instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean());
else
throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString()));
} else { // non-primitive type
instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class));
}
}
}
return instance;
}
}.nullSafe();
}
}
/**
* Create an instance of CloudResumeWorkExperience given an JSON string
*
* @param jsonString JSON string
* @return An instance of CloudResumeWorkExperience
* @throws IOException if the JSON string is invalid with respect to CloudResumeWorkExperience
*/
public static CloudResumeWorkExperience fromJson(String jsonString) throws IOException {
return JSON.getGson().fromJson(jsonString, CloudResumeWorkExperience.class);
}
/**
* Convert an instance of CloudResumeWorkExperience to an JSON string
*
* @return JSON string
*/
public String toJson() {
return JSON.getGson().toJson(this);
}
}