content: /*
   * Copyright (c) 2024, Alibaba Cloud;
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   *
   *    http://www.apache.org/licenses/LICENSE-2.0
   *
   * Unless required by applicable law or agreed to in writing, software
   * distributed under the License is distributed on an "AS IS" BASIS,
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   * See the License for the specific language governing permissions and
   * limitations under the License.
   */
  
  package com.aliyun.dataworks.migrationx.domain.dataworks.dolphinscheduler.v2;
  
  import java.util.Date;
  import java.util.List;
  import java.util.Map;
  
  import com.aliyun.dataworks.migrationx.domain.dataworks.dolphinscheduler.v2.enums.Flag;
  import com.aliyun.dataworks.migrationx.domain.dataworks.dolphinscheduler.v2.enums.Priority;
  import com.aliyun.dataworks.migrationx.domain.dataworks.dolphinscheduler.v2.enums.TaskTimeoutStrategy;
  import com.aliyun.dataworks.migrationx.domain.dataworks.dolphinscheduler.v2.enums.TimeoutFlag;
  import com.aliyun.dataworks.migrationx.domain.dataworks.dolphinscheduler.v2.process.Property;
  import com.aliyun.migrationx.common.utils.JSONUtils;
  
  import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
  import com.fasterxml.jackson.databind.annotation.JsonSerialize;
  import lombok.Data;
  import lombok.EqualsAndHashCode;
  import lombok.ToString;
  import lombok.experimental.Accessors;
  
  /**
   * @author 聿剑
   * @date 2022/10/12
   */
  @Data
  @ToString
  @Accessors(chain = true)
  @EqualsAndHashCode
  public class TaskDefinition {
  
      /**
       * id
       */
      private int id;
  
      /**
       * code
       */
      private long code;
  
      /**
       * name
       */
      private String name;
  
      /**
       * version
       */
      private int version;
  
      /**
       * description
       */
      private String description;
  
      /**
       * project code
       */
      private long projectCode;
  
      /**
       * task user id
       */
      private int userId;
  
      /**
       * task type
       */
      private String taskType;
  
      /**
       * user defined parameters
       */
      @JsonDeserialize(using = JSONUtils.JsonDataDeserializer.class)
      @JsonSerialize(using = JSONUtils.JsonDataSerializer.class)
      private String taskParams;
  
      /**
       * user defined parameter list
       */
      private List<Property> taskParamList;
  
      /**
       * user defined parameter map
       */
      private Map<String, String> taskParamMap;
  
      /**
       * task is valid: yes/no
       */
      private Flag flag;
  
      /**
       * task priority
       */
      private Priority taskPriority;
  
      /**
       * username
       */
      private String userName;
  
      /**
       * project name
       */
      private String projectName;
  
      /**
       * worker group
       */
      private String workerGroup;
  
      /**
       * environment code
       */
      private long environmentCode;
  
      /**
       * fail retry times
       */
      private int failRetryTimes;
  
      /**
       * fail retry interval
       */
      private int failRetryInterval;
  
      /**
       * timeout flag
       */
      private TimeoutFlag timeoutFlag;
  
      /**
       * timeout notify strategy
       */
      private TaskTimeoutStrategy timeoutNotifyStrategy;
  
      /**
       * task warning time out. unit: minute
       */
      private int timeout;
  
      /**
       * delay execution time.
       */
      private int delayTime;
  
      /**
       * resource ids
       */
      private String resourceIds;
  
      /**
       * create time
       */
      private Date createTime;
  
      /**
       * update time
       */
      private Date updateTime;
  
      /**
       * modify user name
       */
      private String modifyBy;
  
      /**
       * task group id
       */
      private int taskGroupId;
      /**
       * task group id
       */
      private int taskGroupPriority;
  }
  