package com.xhpc.evcs.dto;

import com.fasterxml.jackson.annotation.*;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.builder.ToStringBuilder;

import java.util.HashMap;
import java.util.Map;

@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
        "ConnectorID",
        "ConnectorName",
        "ConnectorType",
        "VoltageUpperLimits",
        "VoltageLowerLimits",
        "Current",
        "Power",
        "ParkNo",
        "NationalStandard"
})
@Setter
@Getter
public class ConnectorInfo {

    @JsonProperty("ConnectorID")
    public String connectorID;
    @JsonProperty("ConnectorName")
    public String connectorName;
    // 1：家用插座（模式 2）
    // 2：交流接口插座（模式 3， 连接方式 B ）
    // 3：交流接口插头（带枪线， 模式 3，连接方式 C）
    // 4：直流接口枪头（带枪线， 模式 4）
    // 5：无线充电座
    // 6：其他
    @JsonProperty("ConnectorType")
    public Integer connectorType;
    @JsonProperty("VoltageUpperLimits")
    public Integer voltageUpperLimits;
    @JsonProperty("VoltageLowerLimits")
    public Integer voltageLowerLimits;
    @JsonProperty("Current")
    public Integer current;
    @JsonProperty("Power")
    public Double power;
    @JsonProperty("ParkNo")
    public String ParkNo;
    @JsonProperty("NationalStandard")
    public Integer nationalStandard;
    @JsonIgnore
    private Map<String, Object> additionalProperties = new HashMap<String, Object>();

    @JsonAnyGetter
    public Map<String, Object> getAdditionalProperties() {

        return this.additionalProperties;
    }

    @JsonAnySetter
    public void setAdditionalProperty(String name, Object value) {

        this.additionalProperties.put(name, value);
    }

    @Override
    public String toString() {

        return new ToStringBuilder(this).append("nationalStandard", nationalStandard).append("connectorID", connectorID).append("connectorName", connectorName).append("connectorType", connectorType).append("voltageUpperLimits", voltageUpperLimits).append("voltageLowerLimits", voltageLowerLimits).append("current", current).append("power", power).append("additionalProperties", additionalProperties).toString();
    }

}
