/*
 * Copyright 2015 Netflix, Inc.
 *
 * 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.netflix.spinnaker.clouddriver.titus.client.model;

import java.util.Date;
import java.util.Map;

public class Task {

    private String id;
    private String jobId;
    private TaskState state;
    private String applicationName;
    private int cpu;
    private int gpu;
    private int memory;
    private int disk;
    private Map<Integer, Integer> ports;
    private Map<String, String> env;
    private String version;
    private String entryPoint;
    private String iamProfile;
    private String capacityGroup;
    private String host;
    private Date submittedAt;
    private Date launchedAt;
    private Date startedAt;
    private Date finishedAt;
    private String message;
    private String stdoutLive;
    private String logs;
    private String snapshots;

    public Task(com.netflix.titus.grpc.protogen.Task grpcTask) {
      this.id = grpcTask.getId();
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getJobId() {
        return jobId;
    }

    public void setJobId(String jobId) {
        this.jobId = jobId;
    }

    public TaskState getState() {
        return state;
    }

    public void setState(TaskState state) {
        this.state = state;
    }

    public String getApplicationName() {
        return applicationName;
    }

    public void setApplicationName(String applicationName) {
        this.applicationName = applicationName;
    }

    public int getCpu() {
        return cpu;
    }

    public void setCpu(int cpu) {
        this.cpu = cpu;
    }

    public int getGpu() {
      return gpu;
    }

    public void setGpu(int gpu) {
      this.gpu = gpu;
    }

    public int getMemory() {
        return memory;
    }

    public void setMemory(int memory) {
        this.memory = memory;
    }

    public int getDisk() {
        return disk;
    }

    public void setDisk(int disk) {
        this.disk = disk;
    }

    public Map<Integer, Integer> getPorts() {
        return ports;
    }

    public void setPorts(Map<Integer, Integer> ports) {
        this.ports = ports;
    }

    public Map<String, String> getEnv() {
        return env;
    }

    public void setEnv(Map<String, String> env) {
        this.env = env;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public String getEntryPoint() {
        return entryPoint;
    }

    public void setEntryPoint(String entryPoint) {
        this.entryPoint = entryPoint;
    }

    public String getIamProfile() { return iamProfile; }

    public void setIamProfile(String iamProfile) { this.iamProfile = iamProfile; }

    public String getCapacityGroup() { return capacityGroup; }

    public void setCapacityGroup(String capacityGroup) { this.capacityGroup = capacityGroup; }

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public Date getSubmittedAt() {
        return submittedAt;
    }

    public void setSubmittedAt(Date submittedAt) {
        this.submittedAt = submittedAt;
    }

    public Date getLaunchedAt() {
        return launchedAt;
    }

    public void setLaunchedAt(Date launchedAt) {
        this.launchedAt = launchedAt;
    }

    public Date getStartedAt() {
        return startedAt;
    }

    public void setStartedAt(Date startedAt) {
        this.startedAt = startedAt;
    }

    public Date getFinishedAt() {
        return finishedAt;
    }

    public void setFinishedAt(Date finishedAt) {
        this.finishedAt = finishedAt;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getStdoutLive() {
        return stdoutLive;
    }

    public void setStdoutLive(String stdoutLive) {
        this.stdoutLive = stdoutLive;
    }

    public String getLogs() {
        return logs;
    }

    public void setLogs(String logs) {
        this.logs = logs;
    }

    public String getSnapshots() {
        return snapshots;
    }

    public void setSnapshots(String snapshots) {
        this.snapshots = snapshots;
    }

}

@@ -1384,114 +1384,8 @@
 s;%0A%0A
-    public Task(com.netflix.titus.grpc.protogen.Task grpcTask) %7B%0A      this.id = grpcTask.getId();%0A    %7D%0A%0A
     

enable v3 api for clouddriver.yml