package com.bocloud.cmp.model.hmc.sdk.module;

import com.alibaba.fastjson.JSONObject;
import com.bocloud.cmp.model.hmc.sdk.common.Atom;
import com.bocloud.cmp.model.hmc.sdk.common.Metadata;

public class ServerAdapter {
    private Metadata metadata;
    private String adapterType;
    private String dynamicReconfigurationConnectorName;
    private String locationCode;
    private String localPartitionId;
    private String requiredAdapter;
    private String variedOn;
    private String virtualSlotNumber;
    private String adapterName;
    private String connectingPartitionID;
    private String connectingVirtualSlotNumber;
    private String backingDeviceName;
    private String remoteLogicalPartitionId;
    private String remoteSlotNumber;
    private String serverLocationCode;
    private String uniqueDeviceId;
    private String mapPort;
    private PhysicalPort physicalPort;

    public Metadata getMetadata() {
        return metadata;
    }

    public void setMetadata(Metadata metadata) {
        this.metadata = metadata;
    }

    public String getAdapterType() {
        return adapterType;
    }

    public void setAdapterType(String adapterType) {
        this.adapterType = adapterType;
    }

    public String getDynamicReconfigurationConnectorName() {
        return dynamicReconfigurationConnectorName;
    }

    public void setDynamicReconfigurationConnectorName(String dynamicReconfigurationConnectorName) {
        this.dynamicReconfigurationConnectorName = dynamicReconfigurationConnectorName;
    }

    public String getLocationCode() {
        return locationCode;
    }

    public void setLocationCode(String locationCode) {
        this.locationCode = locationCode;
    }

    public String getLocalPartitionId() {
        return localPartitionId;
    }

    public void setLocalPartitionId(String localPartitionId) {
        this.localPartitionId = localPartitionId;
    }

    public String getRequiredAdapter() {
        return requiredAdapter;
    }

    public void setRequiredAdapter(String requiredAdapter) {
        this.requiredAdapter = requiredAdapter;
    }

    public String getVariedOn() {
        return variedOn;
    }

    public void setVariedOn(String variedOn) {
        this.variedOn = variedOn;
    }

    public String getVirtualSlotNumber() {
        return virtualSlotNumber;
    }

    public void setVirtualSlotNumber(String virtualSlotNumber) {
        this.virtualSlotNumber = virtualSlotNumber;
    }

    public String getRemoteLogicalPartitionId() {
        return remoteLogicalPartitionId;
    }

    public void setRemoteLogicalPartitionId(String remoteLogicalPartitionId) {
        this.remoteLogicalPartitionId = remoteLogicalPartitionId;
    }

    public String getRemoteSlotNumber() {
        return remoteSlotNumber;
    }

    public void setRemoteSlotNumber(String remoteSlotNumber) {
        this.remoteSlotNumber = remoteSlotNumber;
    }

    /**
     * @return the adapterName
     */
    public String getAdapterName() {
        return adapterName;
    }

    /**
     * @param adapterName the adapterName to set
     */
    public void setAdapterName(String adapterName) {
        this.adapterName = adapterName;
    }

    /**
     * @return the backingDeviceName
     */
    public String getBackingDeviceName() {
        return backingDeviceName;
    }

    /**
     * @param backingDeviceName the backingDeviceName to set
     */
    public void setBackingDeviceName(String backingDeviceName) {
        this.backingDeviceName = backingDeviceName;
    }

    /**
     * @return the serverLocationCode
     */
    public String getServerLocationCode() {
        return serverLocationCode;
    }

    /**
     * @param serverLocationCode the serverLocationCode to set
     */
    public void setServerLocationCode(String serverLocationCode) {
        this.serverLocationCode = serverLocationCode;
    }

    /**
     * @return the uniqueDeviceId
     */
    public String getUniqueDeviceId() {
        return uniqueDeviceId;
    }

    /**
     * @param uniqueDeviceId the uniqueDeviceId to set
     */
    public void setUniqueDeviceId(String uniqueDeviceId) {
        this.uniqueDeviceId = uniqueDeviceId;
    }

    public ServerAdapter() {
    }

    public ServerAdapter(String localPartitionId, String remoteLogicalPartitionId, String requiredAdapter) {
        this.metadata = new Metadata(new Atom());
        this.adapterType = "Server";
        this.localPartitionId = localPartitionId;
        this.remoteLogicalPartitionId = remoteLogicalPartitionId;
        this.requiredAdapter = requiredAdapter;
    }

    public String getConnectingPartitionID() {
        return connectingPartitionID;
    }

    public void setConnectingPartitionID(String connectingPartitionID) {
        this.connectingPartitionID = connectingPartitionID;
    }

    public String getConnectingVirtualSlotNumber() {
        return connectingVirtualSlotNumber;
    }

    public void setConnectingVirtualSlotNumber(String connectingVirtualSlotNumber) {
        this.connectingVirtualSlotNumber = connectingVirtualSlotNumber;
    }

    public String getMapPort() {
        return mapPort;
    }

    public void setMapPort(String mapPort) {
        this.mapPort = mapPort;
    }

    public PhysicalPort getPhysicalPort() {
        return physicalPort;
    }

    public void setPhysicalPort(PhysicalPort physicalPort) {
        this.physicalPort = physicalPort;
    }

    @Override
    public String toString() {
        return JSONObject.toJSONString(this);
    }
}
