package com.bocloud.ims.entity.resource.azure.automation;

import com.bocloud.common.utils.DateDeserializer;
import com.bocloud.common.utils.DateSerializer;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

/**
 * @Company: 博云 www.bocloud.com
 * @ClassName: DeploymentPlan
 * @Description:
 * @author: zhenpingLi/李振平
 * @date: 2020/8/11 18:35
 */
@Data
public class DeploymentPlan {

    private String uuid;
    private String name;
    private String resourceGroupName;
    private String automationAccountName;
    private List<String> virtualMachines;//软件更新配置所针对的Azure云主机的Azure资源ID列表
    private List<String> regionIds;//要将查询范围范围到的位置列表
    private List<String> resourceGroupUuids;//订阅或资源组ARM ID的列表
    private String operatingSystem;//目标机器的操作系统 Linux/Windows
    private Long vendorId;
    private String frequency;//获取或设置计划的频率 Day/Hour/Minute/Month/OneTime/Week
    private Integer interval;//获取或设置计划的时间间隔
    @JsonSerialize(
            using = DateSerializer.class
    )
    @JsonDeserialize(
            using = DateDeserializer.class
    )
    @DateTimeFormat(
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    private Date startTime;//获取或设置计划的开始时间
    @JsonSerialize(
            using = DateSerializer.class
    )
    @JsonDeserialize(
            using = DateDeserializer.class
    )
    @DateTimeFormat(
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    private Date expiryTime;//获取或设置计划的结束时间
    private Boolean single;
}