package com.bocloud.cmp.model.smart;

import com.bocloud.cmp.model.*;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

@Data
@NoArgsConstructor
public class SyncModel {

    private List<HostModel> hostModels;
    private List<SwitcherModel> switcherModels;
    private List<ServerModel> serverModels;
    private List<VolumeModel> volumeModels;
    private List<ServerModel> serverTemplateModels;
    private List<SnapshotModel> serverSnapshotModels;
    private List<SnapshotModel> volumeSnapshotModels;
    private List<VolumeTemplateModel> volumeTemplateModels;
    private List<ImageModel> imageModels;
    private List<TaskMsgModel> taskMsgModels;
    private List<ClusterModel> clusterModels;

    public List<ServerModel> getServerAndServerTemplateModels() {
        List<ServerModel> resultModels = new ArrayList<>(this.serverModels);
        resultModels.addAll(serverTemplateModels);
        return resultModels;
    }

    public List<SnapshotModel> getServerAndVolumeSnapshotModels() {
        List<SnapshotModel> resultModels = new ArrayList<>(this.serverSnapshotModels);
        resultModels.addAll(volumeSnapshotModels);
        return resultModels;
    }

}
