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.AlipayEcoMycarParkingChargeinfoSyncModel 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;
/**
* AlipayEcoMycarParkingChargeinfoSyncModel
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class AlipayEcoMycarParkingChargeinfoSyncModel {
public static final String SERIALIZED_NAME_BUSINESS_HOURS = "business_hours";
@SerializedName(SERIALIZED_NAME_BUSINESS_HOURS)
private String businessHours;
public static final String SERIALIZED_NAME_CAR_DAYLIGHT_ADVANCED_PRICE = "car_daylight_advanced_price";
@SerializedName(SERIALIZED_NAME_CAR_DAYLIGHT_ADVANCED_PRICE)
private String carDaylightAdvancedPrice;
public static final String SERIALIZED_NAME_CAR_DAYLIGHT_BASE_PRICE = "car_daylight_base_price";
@SerializedName(SERIALIZED_NAME_CAR_DAYLIGHT_BASE_PRICE)
private String carDaylightBasePrice;
public static final String SERIALIZED_NAME_CAR_NIGHT_ADVANCED_PRICE = "car_night_advanced_price";
@SerializedName(SERIALIZED_NAME_CAR_NIGHT_ADVANCED_PRICE)
private String carNightAdvancedPrice;
public static final String SERIALIZED_NAME_CAR_NIGHT_BASE_PRICE = "car_night_base_price";
@SerializedName(SERIALIZED_NAME_CAR_NIGHT_BASE_PRICE)
private String carNightBasePrice;
public static final String SERIALIZED_NAME_CAR_ONETIME_PRICE = "car_onetime_price";
@SerializedName(SERIALIZED_NAME_CAR_ONETIME_PRICE)
private String carOnetimePrice;
public static final String SERIALIZED_NAME_DAILY_PRICE_UPPERBOUND = "daily_price_upperbound";
@SerializedName(SERIALIZED_NAME_DAILY_PRICE_UPPERBOUND)
private String dailyPriceUpperbound;
public static final String SERIALIZED_NAME_DAYLIGHT_BUSINESS_HOURS = "daylight_business_hours";
@SerializedName(SERIALIZED_NAME_DAYLIGHT_BUSINESS_HOURS)
private String daylightBusinessHours;
public static final String SERIALIZED_NAME_FREE_PERIOD = "free_period";
@SerializedName(SERIALIZED_NAME_FREE_PERIOD)
private String freePeriod;
public static final String SERIALIZED_NAME_HAS_CHARGING_PILE = "has_charging_pile";
@SerializedName(SERIALIZED_NAME_HAS_CHARGING_PILE)
private String hasChargingPile;
public static final String SERIALIZED_NAME_IS_CHARGE = "is_charge";
@SerializedName(SERIALIZED_NAME_IS_CHARGE)
private String isCharge;
public static final String SERIALIZED_NAME_NIGHT_BUSINESS_HOURS = "night_business_hours";
@SerializedName(SERIALIZED_NAME_NIGHT_BUSINESS_HOURS)
private String nightBusinessHours;
public static final String SERIALIZED_NAME_PARKING_ID = "parking_id";
@SerializedName(SERIALIZED_NAME_PARKING_ID)
private String parkingId;
public static final String SERIALIZED_NAME_PARKING_SPACE_COUNT = "parking_space_count";
@SerializedName(SERIALIZED_NAME_PARKING_SPACE_COUNT)
private Integer parkingSpaceCount;
public static final String SERIALIZED_NAME_REMARK = "remark";
@SerializedName(SERIALIZED_NAME_REMARK)
private String remark;
public static final String SERIALIZED_NAME_TRUCK_DAYLIGHT_ADVANCED_PRICE = "truck_daylight_advanced_price";
@SerializedName(SERIALIZED_NAME_TRUCK_DAYLIGHT_ADVANCED_PRICE)
private String truckDaylightAdvancedPrice;
public static final String SERIALIZED_NAME_TRUCK_DAYLIGHT_BASE_PRICE = "truck_daylight_base_price";
@SerializedName(SERIALIZED_NAME_TRUCK_DAYLIGHT_BASE_PRICE)
private String truckDaylightBasePrice;
public static final String SERIALIZED_NAME_TRUCK_NIGHT_ADVANCED_PRICE = "truck_night_advanced_price";
@SerializedName(SERIALIZED_NAME_TRUCK_NIGHT_ADVANCED_PRICE)
private String truckNightAdvancedPrice;
public static final String SERIALIZED_NAME_TRUCK_NIGHT_BASE_PRICE = "truck_night_base_price";
@SerializedName(SERIALIZED_NAME_TRUCK_NIGHT_BASE_PRICE)
private String truckNightBasePrice;
public static final String SERIALIZED_NAME_TRUCK_ONETIME_PRICE = "truck_onetime_price";
@SerializedName(SERIALIZED_NAME_TRUCK_ONETIME_PRICE)
private String truckOnetimePrice;
public AlipayEcoMycarParkingChargeinfoSyncModel() {
}
public AlipayEcoMycarParkingChargeinfoSyncModel businessHours(String businessHours) {
this.businessHours = businessHours;
return this;
}
/**
* 营业时间
* @return businessHours
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "24小时", value = "营业时间")
public String getBusinessHours() {
return businessHours;
}
public void setBusinessHours(String businessHours) {
this.businessHours = businessHours;
}
public AlipayEcoMycarParkingChargeinfoSyncModel carDaylightAdvancedPrice(String carDaylightAdvancedPrice) {
this.carDaylightAdvancedPrice = carDaylightAdvancedPrice;
return this;
}
/**
* 小车-白天 非首个计费单元价格
* @return carDaylightAdvancedPrice
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "3元/小时或1.5元/30分钟", value = "小车-白天 非首个计费单元价格")
public String getCarDaylightAdvancedPrice() {
return carDaylightAdvancedPrice;
}
public void setCarDaylightAdvancedPrice(String carDaylightAdvancedPrice) {
this.carDaylightAdvancedPrice = carDaylightAdvancedPrice;
}
public AlipayEcoMycarParkingChargeinfoSyncModel carDaylightBasePrice(String carDaylightBasePrice) {
this.carDaylightBasePrice = carDaylightBasePrice;
return this;
}
/**
* 小车-白天 首个计费单元价格
* @return carDaylightBasePrice
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "10元/1小时或5元/30分钟", value = "小车-白天 首个计费单元价格")
public String getCarDaylightBasePrice() {
return carDaylightBasePrice;
}
public void setCarDaylightBasePrice(String carDaylightBasePrice) {
this.carDaylightBasePrice = carDaylightBasePrice;
}
public AlipayEcoMycarParkingChargeinfoSyncModel carNightAdvancedPrice(String carNightAdvancedPrice) {
this.carNightAdvancedPrice = carNightAdvancedPrice;
return this;
}
/**
* 小车-夜间 非首个计费单元价格
* @return carNightAdvancedPrice
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "3元/小时或1.5元/30分钟", value = "小车-夜间 非首个计费单元价格")
public String getCarNightAdvancedPrice() {
return carNightAdvancedPrice;
}
public void setCarNightAdvancedPrice(String carNightAdvancedPrice) {
this.carNightAdvancedPrice = carNightAdvancedPrice;
}
public AlipayEcoMycarParkingChargeinfoSyncModel carNightBasePrice(String carNightBasePrice) {
this.carNightBasePrice = carNightBasePrice;
return this;
}
/**
* 小车-夜间 首个计费单元价格
* @return carNightBasePrice
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "10元/1小时或5元/30分钟", value = "小车-夜间 首个计费单元价格")
public String getCarNightBasePrice() {
return carNightBasePrice;
}
public void setCarNightBasePrice(String carNightBasePrice) {
this.carNightBasePrice = carNightBasePrice;
}
public AlipayEcoMycarParkingChargeinfoSyncModel carOnetimePrice(String carOnetimePrice) {
this.carOnetimePrice = carOnetimePrice;
return this;
}
/**
* 小车 计次收费价格 xx元 / 次,按次收费的车场填写
* @return carOnetimePrice
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "20元/次", value = "小车 计次收费价格 xx元 / 次,按次收费的车场填写")
public String getCarOnetimePrice() {
return carOnetimePrice;
}
public void setCarOnetimePrice(String carOnetimePrice) {
this.carOnetimePrice = carOnetimePrice;
}
public AlipayEcoMycarParkingChargeinfoSyncModel dailyPriceUpperbound(String dailyPriceUpperbound) {
this.dailyPriceUpperbound = dailyPriceUpperbound;
return this;
}
/**
* 单日停车封顶价格:具体值或“不封顶”
* @return dailyPriceUpperbound
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "260元或不封顶", value = "单日停车封顶价格:具体值或“不封顶”")
public String getDailyPriceUpperbound() {
return dailyPriceUpperbound;
}
public void setDailyPriceUpperbound(String dailyPriceUpperbound) {
this.dailyPriceUpperbound = dailyPriceUpperbound;
}
public AlipayEcoMycarParkingChargeinfoSyncModel daylightBusinessHours(String daylightBusinessHours) {
this.daylightBusinessHours = daylightBusinessHours;
return this;
}
/**
* 车场白天(收费)营业时间段
* @return daylightBusinessHours
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "9:00-21:00", value = "车场白天(收费)营业时间段")
public String getDaylightBusinessHours() {
return daylightBusinessHours;
}
public void setDaylightBusinessHours(String daylightBusinessHours) {
this.daylightBusinessHours = daylightBusinessHours;
}
public AlipayEcoMycarParkingChargeinfoSyncModel freePeriod(String freePeriod) {
this.freePeriod = freePeriod;
return this;
}
/**
* 单次停车免费时长
* @return freePeriod
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "30分钟", value = "单次停车免费时长")
public String getFreePeriod() {
return freePeriod;
}
public void setFreePeriod(String freePeriod) {
this.freePeriod = freePeriod;
}
public AlipayEcoMycarParkingChargeinfoSyncModel hasChargingPile(String hasChargingPile) {
this.hasChargingPile = hasChargingPile;
return this;
}
/**
* 是否有充电桩: -1 未知,0 否,1 是
* @return hasChargingPile
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "1", value = "是否有充电桩: -1 未知,0 否,1 是")
public String getHasChargingPile() {
return hasChargingPile;
}
public void setHasChargingPile(String hasChargingPile) {
this.hasChargingPile = hasChargingPile;
}
public AlipayEcoMycarParkingChargeinfoSyncModel isCharge(String isCharge) {
this.isCharge = isCharge;
return this;
}
/**
* 是否收费:-1 未知,0 否,1 是
* @return isCharge
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "1", value = "是否收费:-1 未知,0 否,1 是")
public String getIsCharge() {
return isCharge;
}
public void setIsCharge(String isCharge) {
this.isCharge = isCharge;
}
public AlipayEcoMycarParkingChargeinfoSyncModel nightBusinessHours(String nightBusinessHours) {
this.nightBusinessHours = nightBusinessHours;
return this;
}
/**
* 车场夜间(收费)营业时间段
* @return nightBusinessHours
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "21:00-9:00", value = "车场夜间(收费)营业时间段")
public String getNightBusinessHours() {
return nightBusinessHours;
}
public void setNightBusinessHours(String nightBusinessHours) {
this.nightBusinessHours = nightBusinessHours;
}
public AlipayEcoMycarParkingChargeinfoSyncModel parkingId(String parkingId) {
this.parkingId = parkingId;
return this;
}
/**
* 停车场ID
* @return parkingId
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "PI20190506152394234234", value = "停车场ID")
public String getParkingId() {
return parkingId;
}
public void setParkingId(String parkingId) {
this.parkingId = parkingId;
}
public AlipayEcoMycarParkingChargeinfoSyncModel parkingSpaceCount(Integer parkingSpaceCount) {
this.parkingSpaceCount = parkingSpaceCount;
return this;
}
/**
* 总车位数
* @return parkingSpaceCount
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "1600", value = "总车位数")
public Integer getParkingSpaceCount() {
return parkingSpaceCount;
}
public void setParkingSpaceCount(Integer parkingSpaceCount) {
this.parkingSpaceCount = parkingSpaceCount;
}
public AlipayEcoMycarParkingChargeinfoSyncModel remark(String remark) {
this.remark = remark;
return this;
}
/**
* 复杂计费补充描述 收费复杂无法格式化的车场填写,以文本形式表述
* @return remark
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "前3小时XXX,3-6小时之间XXX,超过6小时XXXX", value = "复杂计费补充描述 收费复杂无法格式化的车场填写,以文本形式表述")
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public AlipayEcoMycarParkingChargeinfoSyncModel truckDaylightAdvancedPrice(String truckDaylightAdvancedPrice) {
this.truckDaylightAdvancedPrice = truckDaylightAdvancedPrice;
return this;
}
/**
* 大车-白天 非首个计费单元价格
* @return truckDaylightAdvancedPrice
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "3元/小时或1.5元/30分钟", value = "大车-白天 非首个计费单元价格")
public String getTruckDaylightAdvancedPrice() {
return truckDaylightAdvancedPrice;
}
public void setTruckDaylightAdvancedPrice(String truckDaylightAdvancedPrice) {
this.truckDaylightAdvancedPrice = truckDaylightAdvancedPrice;
}
public AlipayEcoMycarParkingChargeinfoSyncModel truckDaylightBasePrice(String truckDaylightBasePrice) {
this.truckDaylightBasePrice = truckDaylightBasePrice;
return this;
}
/**
* 大车-白天 首个计费单元价格
* @return truckDaylightBasePrice
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "10元/1小时或5元/30分钟", value = "大车-白天 首个计费单元价格")
public String getTruckDaylightBasePrice() {
return truckDaylightBasePrice;
}
public void setTruckDaylightBasePrice(String truckDaylightBasePrice) {
this.truckDaylightBasePrice = truckDaylightBasePrice;
}
public AlipayEcoMycarParkingChargeinfoSyncModel truckNightAdvancedPrice(String truckNightAdvancedPrice) {
this.truckNightAdvancedPrice = truckNightAdvancedPrice;
return this;
}
/**
* 大车-夜间 非首个计费单元价格
* @return truckNightAdvancedPrice
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "4元/次", value = "大车-夜间 非首个计费单元价格")
public String getTruckNightAdvancedPrice() {
return truckNightAdvancedPrice;
}
public void setTruckNightAdvancedPrice(String truckNightAdvancedPrice) {
this.truckNightAdvancedPrice = truckNightAdvancedPrice;
}
public AlipayEcoMycarParkingChargeinfoSyncModel truckNightBasePrice(String truckNightBasePrice) {
this.truckNightBasePrice = truckNightBasePrice;
return this;
}
/**
* 大车-夜间 首个计费单元价格
* @return truckNightBasePrice
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "3元/小时或1.5元/30分钟", value = "大车-夜间 首个计费单元价格")
public String getTruckNightBasePrice() {
return truckNightBasePrice;
}
public void setTruckNightBasePrice(String truckNightBasePrice) {
this.truckNightBasePrice = truckNightBasePrice;
}
public AlipayEcoMycarParkingChargeinfoSyncModel truckOnetimePrice(String truckOnetimePrice) {
this.truckOnetimePrice = truckOnetimePrice;
return this;
}
/**
* 大车 计次收费价格 xx元 / 次,按次收费的车场填写
* @return truckOnetimePrice
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "30元/次", value = "大车 计次收费价格 xx元 / 次,按次收费的车场填写")
public String getTruckOnetimePrice() {
return truckOnetimePrice;
}
public void setTruckOnetimePrice(String truckOnetimePrice) {
this.truckOnetimePrice = truckOnetimePrice;
}
/**
* 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 AlipayEcoMycarParkingChargeinfoSyncModel instance itself
*/
public AlipayEcoMycarParkingChargeinfoSyncModel 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;
}
AlipayEcoMycarParkingChargeinfoSyncModel alipayEcoMycarParkingChargeinfoSyncModel = (AlipayEcoMycarParkingChargeinfoSyncModel) o;
return Objects.equals(this.businessHours, alipayEcoMycarParkingChargeinfoSyncModel.businessHours) &&
Objects.equals(this.carDaylightAdvancedPrice, alipayEcoMycarParkingChargeinfoSyncModel.carDaylightAdvancedPrice) &&
Objects.equals(this.carDaylightBasePrice, alipayEcoMycarParkingChargeinfoSyncModel.carDaylightBasePrice) &&
Objects.equals(this.carNightAdvancedPrice, alipayEcoMycarParkingChargeinfoSyncModel.carNightAdvancedPrice) &&
Objects.equals(this.carNightBasePrice, alipayEcoMycarParkingChargeinfoSyncModel.carNightBasePrice) &&
Objects.equals(this.carOnetimePrice, alipayEcoMycarParkingChargeinfoSyncModel.carOnetimePrice) &&
Objects.equals(this.dailyPriceUpperbound, alipayEcoMycarParkingChargeinfoSyncModel.dailyPriceUpperbound) &&
Objects.equals(this.daylightBusinessHours, alipayEcoMycarParkingChargeinfoSyncModel.daylightBusinessHours) &&
Objects.equals(this.freePeriod, alipayEcoMycarParkingChargeinfoSyncModel.freePeriod) &&
Objects.equals(this.hasChargingPile, alipayEcoMycarParkingChargeinfoSyncModel.hasChargingPile) &&
Objects.equals(this.isCharge, alipayEcoMycarParkingChargeinfoSyncModel.isCharge) &&
Objects.equals(this.nightBusinessHours, alipayEcoMycarParkingChargeinfoSyncModel.nightBusinessHours) &&
Objects.equals(this.parkingId, alipayEcoMycarParkingChargeinfoSyncModel.parkingId) &&
Objects.equals(this.parkingSpaceCount, alipayEcoMycarParkingChargeinfoSyncModel.parkingSpaceCount) &&
Objects.equals(this.remark, alipayEcoMycarParkingChargeinfoSyncModel.remark) &&
Objects.equals(this.truckDaylightAdvancedPrice, alipayEcoMycarParkingChargeinfoSyncModel.truckDaylightAdvancedPrice) &&
Objects.equals(this.truckDaylightBasePrice, alipayEcoMycarParkingChargeinfoSyncModel.truckDaylightBasePrice) &&
Objects.equals(this.truckNightAdvancedPrice, alipayEcoMycarParkingChargeinfoSyncModel.truckNightAdvancedPrice) &&
Objects.equals(this.truckNightBasePrice, alipayEcoMycarParkingChargeinfoSyncModel.truckNightBasePrice) &&
Objects.equals(this.truckOnetimePrice, alipayEcoMycarParkingChargeinfoSyncModel.truckOnetimePrice)&&
Objects.equals(this.additionalProperties, alipayEcoMycarParkingChargeinfoSyncModel.additionalProperties);
}
@Override
public int hashCode() {
return Objects.hash(businessHours, carDaylightAdvancedPrice, carDaylightBasePrice, carNightAdvancedPrice, carNightBasePrice, carOnetimePrice, dailyPriceUpperbound, daylightBusinessHours, freePeriod, hasChargingPile, isCharge, nightBusinessHours, parkingId, parkingSpaceCount, remark, truckDaylightAdvancedPrice, truckDaylightBasePrice, truckNightAdvancedPrice, truckNightBasePrice, truckOnetimePrice, additionalProperties);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AlipayEcoMycarParkingChargeinfoSyncModel {\n");
sb.append(" businessHours: ").append(toIndentedString(businessHours)).append("\n");
sb.append(" carDaylightAdvancedPrice: ").append(toIndentedString(carDaylightAdvancedPrice)).append("\n");
sb.append(" carDaylightBasePrice: ").append(toIndentedString(carDaylightBasePrice)).append("\n");
sb.append(" carNightAdvancedPrice: ").append(toIndentedString(carNightAdvancedPrice)).append("\n");
sb.append(" carNightBasePrice: ").append(toIndentedString(carNightBasePrice)).append("\n");
sb.append(" carOnetimePrice: ").append(toIndentedString(carOnetimePrice)).append("\n");
sb.append(" dailyPriceUpperbound: ").append(toIndentedString(dailyPriceUpperbound)).append("\n");
sb.append(" daylightBusinessHours: ").append(toIndentedString(daylightBusinessHours)).append("\n");
sb.append(" freePeriod: ").append(toIndentedString(freePeriod)).append("\n");
sb.append(" hasChargingPile: ").append(toIndentedString(hasChargingPile)).append("\n");
sb.append(" isCharge: ").append(toIndentedString(isCharge)).append("\n");
sb.append(" nightBusinessHours: ").append(toIndentedString(nightBusinessHours)).append("\n");
sb.append(" parkingId: ").append(toIndentedString(parkingId)).append("\n");
sb.append(" parkingSpaceCount: ").append(toIndentedString(parkingSpaceCount)).append("\n");
sb.append(" remark: ").append(toIndentedString(remark)).append("\n");
sb.append(" truckDaylightAdvancedPrice: ").append(toIndentedString(truckDaylightAdvancedPrice)).append("\n");
sb.append(" truckDaylightBasePrice: ").append(toIndentedString(truckDaylightBasePrice)).append("\n");
sb.append(" truckNightAdvancedPrice: ").append(toIndentedString(truckNightAdvancedPrice)).append("\n");
sb.append(" truckNightBasePrice: ").append(toIndentedString(truckNightBasePrice)).append("\n");
sb.append(" truckOnetimePrice: ").append(toIndentedString(truckOnetimePrice)).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("business_hours");
openapiFields.add("car_daylight_advanced_price");
openapiFields.add("car_daylight_base_price");
openapiFields.add("car_night_advanced_price");
openapiFields.add("car_night_base_price");
openapiFields.add("car_onetime_price");
openapiFields.add("daily_price_upperbound");
openapiFields.add("daylight_business_hours");
openapiFields.add("free_period");
openapiFields.add("has_charging_pile");
openapiFields.add("is_charge");
openapiFields.add("night_business_hours");
openapiFields.add("parking_id");
openapiFields.add("parking_space_count");
openapiFields.add("remark");
openapiFields.add("truck_daylight_advanced_price");
openapiFields.add("truck_daylight_base_price");
openapiFields.add("truck_night_advanced_price");
openapiFields.add("truck_night_base_price");
openapiFields.add("truck_onetime_price");
// 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 AlipayEcoMycarParkingChargeinfoSyncModel
*/
public static void validateJsonObject(JsonObject jsonObj) throws IOException {
if (jsonObj == null) {
if (AlipayEcoMycarParkingChargeinfoSyncModel.openapiRequiredFields.isEmpty()) {
return;
} else { // has required fields
throw new IllegalArgumentException(String.format("The required field(s) %s in AlipayEcoMycarParkingChargeinfoSyncModel is not found in the empty JSON string", AlipayEcoMycarParkingChargeinfoSyncModel.openapiRequiredFields.toString()));
}
}
if (jsonObj.get("business_hours") != null && !jsonObj.get("business_hours").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `business_hours` to be a primitive type in the JSON string but got `%s`", jsonObj.get("business_hours").toString()));
}
if (jsonObj.get("car_daylight_advanced_price") != null && !jsonObj.get("car_daylight_advanced_price").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `car_daylight_advanced_price` to be a primitive type in the JSON string but got `%s`", jsonObj.get("car_daylight_advanced_price").toString()));
}
if (jsonObj.get("car_daylight_base_price") != null && !jsonObj.get("car_daylight_base_price").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `car_daylight_base_price` to be a primitive type in the JSON string but got `%s`", jsonObj.get("car_daylight_base_price").toString()));
}
if (jsonObj.get("car_night_advanced_price") != null && !jsonObj.get("car_night_advanced_price").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `car_night_advanced_price` to be a primitive type in the JSON string but got `%s`", jsonObj.get("car_night_advanced_price").toString()));
}
if (jsonObj.get("car_night_base_price") != null && !jsonObj.get("car_night_base_price").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `car_night_base_price` to be a primitive type in the JSON string but got `%s`", jsonObj.get("car_night_base_price").toString()));
}
if (jsonObj.get("car_onetime_price") != null && !jsonObj.get("car_onetime_price").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `car_onetime_price` to be a primitive type in the JSON string but got `%s`", jsonObj.get("car_onetime_price").toString()));
}
if (jsonObj.get("daily_price_upperbound") != null && !jsonObj.get("daily_price_upperbound").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `daily_price_upperbound` to be a primitive type in the JSON string but got `%s`", jsonObj.get("daily_price_upperbound").toString()));
}
if (jsonObj.get("daylight_business_hours") != null && !jsonObj.get("daylight_business_hours").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `daylight_business_hours` to be a primitive type in the JSON string but got `%s`", jsonObj.get("daylight_business_hours").toString()));
}
if (jsonObj.get("free_period") != null && !jsonObj.get("free_period").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `free_period` to be a primitive type in the JSON string but got `%s`", jsonObj.get("free_period").toString()));
}
if (jsonObj.get("has_charging_pile") != null && !jsonObj.get("has_charging_pile").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `has_charging_pile` to be a primitive type in the JSON string but got `%s`", jsonObj.get("has_charging_pile").toString()));
}
if (jsonObj.get("is_charge") != null && !jsonObj.get("is_charge").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `is_charge` to be a primitive type in the JSON string but got `%s`", jsonObj.get("is_charge").toString()));
}
if (jsonObj.get("night_business_hours") != null && !jsonObj.get("night_business_hours").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `night_business_hours` to be a primitive type in the JSON string but got `%s`", jsonObj.get("night_business_hours").toString()));
}
if (jsonObj.get("parking_id") != null && !jsonObj.get("parking_id").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `parking_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parking_id").toString()));
}
if (jsonObj.get("remark") != null && !jsonObj.get("remark").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `remark` to be a primitive type in the JSON string but got `%s`", jsonObj.get("remark").toString()));
}
if (jsonObj.get("truck_daylight_advanced_price") != null && !jsonObj.get("truck_daylight_advanced_price").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `truck_daylight_advanced_price` to be a primitive type in the JSON string but got `%s`", jsonObj.get("truck_daylight_advanced_price").toString()));
}
if (jsonObj.get("truck_daylight_base_price") != null && !jsonObj.get("truck_daylight_base_price").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `truck_daylight_base_price` to be a primitive type in the JSON string but got `%s`", jsonObj.get("truck_daylight_base_price").toString()));
}
if (jsonObj.get("truck_night_advanced_price") != null && !jsonObj.get("truck_night_advanced_price").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `truck_night_advanced_price` to be a primitive type in the JSON string but got `%s`", jsonObj.get("truck_night_advanced_price").toString()));
}
if (jsonObj.get("truck_night_base_price") != null && !jsonObj.get("truck_night_base_price").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `truck_night_base_price` to be a primitive type in the JSON string but got `%s`", jsonObj.get("truck_night_base_price").toString()));
}
if (jsonObj.get("truck_onetime_price") != null && !jsonObj.get("truck_onetime_price").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `truck_onetime_price` to be a primitive type in the JSON string but got `%s`", jsonObj.get("truck_onetime_price").toString()));
}
}
public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
@SuppressWarnings("unchecked")
@Override
public TypeAdapter create(Gson gson, TypeToken type) {
if (!AlipayEcoMycarParkingChargeinfoSyncModel.class.isAssignableFrom(type.getRawType())) {
return null; // this class only serializes 'AlipayEcoMycarParkingChargeinfoSyncModel' and its subtypes
}
final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
final TypeAdapter thisAdapter
= gson.getDelegateAdapter(this, TypeToken.get(AlipayEcoMycarParkingChargeinfoSyncModel.class));
return (TypeAdapter) new TypeAdapter() {
@Override
public void write(JsonWriter out, AlipayEcoMycarParkingChargeinfoSyncModel 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 AlipayEcoMycarParkingChargeinfoSyncModel read(JsonReader in) throws IOException {
JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();
validateJsonObject(jsonObj);
// store additional fields in the deserialized instance
AlipayEcoMycarParkingChargeinfoSyncModel 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 AlipayEcoMycarParkingChargeinfoSyncModel given an JSON string
*
* @param jsonString JSON string
* @return An instance of AlipayEcoMycarParkingChargeinfoSyncModel
* @throws IOException if the JSON string is invalid with respect to AlipayEcoMycarParkingChargeinfoSyncModel
*/
public static AlipayEcoMycarParkingChargeinfoSyncModel fromJson(String jsonString) throws IOException {
return JSON.getGson().fromJson(jsonString, AlipayEcoMycarParkingChargeinfoSyncModel.class);
}
/**
* Convert an instance of AlipayEcoMycarParkingChargeinfoSyncModel to an JSON string
*
* @return JSON string
*/
public String toJson() {
return JSON.getGson().toJson(this);
}
}