/*
 * 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.
 */
/*
 * This code was generated by https://github.com/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.aiplatform.v1beta1.model;

/**
 * The runtime detail of a task execution.
 *
 * <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
 * transmitted over HTTP when working with the Vertex AI API. For a detailed explanation see:
 * <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a>
 * </p>
 *
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public final class GoogleCloudAiplatformV1beta1PipelineTaskDetail extends com.google.api.client.json.GenericJson {

  /**
   * Output only. Task create time.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private String createTime;

  /**
   * Output only. Task end time.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private String endTime;

  /**
   * Output only. The error that occurred during task execution. Only populated when the task's
   * state is FAILED or CANCELLED.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private GoogleRpcStatus error;

  /**
   * Output only. The execution metadata of the task.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private GoogleCloudAiplatformV1beta1Execution execution;

  /**
   * Output only. The detailed execution info.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private GoogleCloudAiplatformV1beta1PipelineTaskExecutorDetail executorDetail;

  /**
   * Output only. The runtime input artifacts of the task.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.Map<String, GoogleCloudAiplatformV1beta1PipelineTaskDetailArtifactList> inputs;

  /**
   * Output only. The runtime output artifacts of the task.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.Map<String, GoogleCloudAiplatformV1beta1PipelineTaskDetailArtifactList> outputs;

  /**
   * Output only. The id of the parent task if the task is within a component scope. Empty if the
   * task is at the root level.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key @com.google.api.client.json.JsonString
  private java.lang.Long parentTaskId;

  /**
   * Output only. A list of task status. This field keeps a record of task status evolving over
   * time.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<GoogleCloudAiplatformV1beta1PipelineTaskDetailPipelineTaskStatus> pipelineTaskStatus;

  /**
   * Output only. Task start time.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private String startTime;

  /**
   * Output only. State of the task.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String state;

  /**
   * Output only. The system generated ID of the task.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key @com.google.api.client.json.JsonString
  private java.lang.Long taskId;

  /**
   * Output only. The user specified name of the task that is defined in pipeline_spec.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String taskName;

  /**
   * Output only. Task create time.
   * @return value or {@code null} for none
   */
  public String getCreateTime() {
    return createTime;
  }

  /**
   * Output only. Task create time.
   * @param createTime createTime or {@code null} for none
   */
  public GoogleCloudAiplatformV1beta1PipelineTaskDetail setCreateTime(String createTime) {
    this.createTime = createTime;
    return this;
  }

  /**
   * Output only. Task end time.
   * @return value or {@code null} for none
   */
  public String getEndTime() {
    return endTime;
  }

  /**
   * Output only. Task end time.
   * @param endTime endTime or {@code null} for none
   */
  public GoogleCloudAiplatformV1beta1PipelineTaskDetail setEndTime(String endTime) {
    this.endTime = endTime;
    return this;
  }

  /**
   * Output only. The error that occurred during task execution. Only populated when the task's
   * state is FAILED or CANCELLED.
   * @return value or {@code null} for none
   */
  public GoogleRpcStatus getError() {
    return error;
  }

  /**
   * Output only. The error that occurred during task execution. Only populated when the task's
   * state is FAILED or CANCELLED.
   * @param error error or {@code null} for none
   */
  public GoogleCloudAiplatformV1beta1PipelineTaskDetail setError(GoogleRpcStatus error) {
    this.error = error;
    return this;
  }

  /**
   * Output only. The execution metadata of the task.
   * @return value or {@code null} for none
   */
  public GoogleCloudAiplatformV1beta1Execution getExecution() {
    return execution;
  }

  /**
   * Output only. The execution metadata of the task.
   * @param execution execution or {@code null} for none
   */
  public GoogleCloudAiplatformV1beta1PipelineTaskDetail setExecution(GoogleCloudAiplatformV1beta1Execution execution) {
    this.execution = execution;
    return this;
  }

  /**
   * Output only. The detailed execution info.
   * @return value or {@code null} for none
   */
  public GoogleCloudAiplatformV1beta1PipelineTaskExecutorDetail getExecutorDetail() {
    return executorDetail;
  }

  /**
   * Output only. The detailed execution info.
   * @param executorDetail executorDetail or {@code null} for none
   */
  public GoogleCloudAiplatformV1beta1PipelineTaskDetail setExecutorDetail(GoogleCloudAiplatformV1beta1PipelineTaskExecutorDetail executorDetail) {
    this.executorDetail = executorDetail;
    return this;
  }

  /**
   * Output only. The runtime input artifacts of the task.
   * @return value or {@code null} for none
   */
  public java.util.Map<String, GoogleCloudAiplatformV1beta1PipelineTaskDetailArtifactList> getInputs() {
    return inputs;
  }

  /**
   * Output only. The runtime input artifacts of the task.
   * @param inputs inputs or {@code null} for none
   */
  public GoogleCloudAiplatformV1beta1PipelineTaskDetail setInputs(java.util.Map<String, GoogleCloudAiplatformV1beta1PipelineTaskDetailArtifactList> inputs) {
    this.inputs = inputs;
    return this;
  }

  /**
   * Output only. The runtime output artifacts of the task.
   * @return value or {@code null} for none
   */
  public java.util.Map<String, GoogleCloudAiplatformV1beta1PipelineTaskDetailArtifactList> getOutputs() {
    return outputs;
  }

  /**
   * Output only. The runtime output artifacts of the task.
   * @param outputs outputs or {@code null} for none
   */
  public GoogleCloudAiplatformV1beta1PipelineTaskDetail setOutputs(java.util.Map<String, GoogleCloudAiplatformV1beta1PipelineTaskDetailArtifactList> outputs) {
    this.outputs = outputs;
    return this;
  }

  /**
   * Output only. The id of the parent task if the task is within a component scope. Empty if the
   * task is at the root level.
   * @return value or {@code null} for none
   */
  public java.lang.Long getParentTaskId() {
    return parentTaskId;
  }

  /**
   * Output only. The id of the parent task if the task is within a component scope. Empty if the
   * task is at the root level.
   * @param parentTaskId parentTaskId or {@code null} for none
   */
  public GoogleCloudAiplatformV1beta1PipelineTaskDetail setParentTaskId(java.lang.Long parentTaskId) {
    this.parentTaskId = parentTaskId;
    return this;
  }

  /**
   * Output only. A list of task status. This field keeps a record of task status evolving over
   * time.
   * @return value or {@code null} for none
   */
  public java.util.List<GoogleCloudAiplatformV1beta1PipelineTaskDetailPipelineTaskStatus> getPipelineTaskStatus() {
    return pipelineTaskStatus;
  }

  /**
   * Output only. A list of task status. This field keeps a record of task status evolving over
   * time.
   * @param pipelineTaskStatus pipelineTaskStatus or {@code null} for none
   */
  public GoogleCloudAiplatformV1beta1PipelineTaskDetail setPipelineTaskStatus(java.util.List<GoogleCloudAiplatformV1beta1PipelineTaskDetailPipelineTaskStatus> pipelineTaskStatus) {
    this.pipelineTaskStatus = pipelineTaskStatus;
    return this;
  }

  /**
   * Output only. Task start time.
   * @return value or {@code null} for none
   */
  public String getStartTime() {
    return startTime;
  }

  /**
   * Output only. Task start time.
   * @param startTime startTime or {@code null} for none
   */
  public GoogleCloudAiplatformV1beta1PipelineTaskDetail setStartTime(String startTime) {
    this.startTime = startTime;
    return this;
  }

  /**
   * Output only. State of the task.
   * @return value or {@code null} for none
   */
  public java.lang.String getState() {
    return state;
  }

  /**
   * Output only. State of the task.
   * @param state state or {@code null} for none
   */
  public GoogleCloudAiplatformV1beta1PipelineTaskDetail setState(java.lang.String state) {
    this.state = state;
    return this;
  }

  /**
   * Output only. The system generated ID of the task.
   * @return value or {@code null} for none
   */
  public java.lang.Long getTaskId() {
    return taskId;
  }

  /**
   * Output only. The system generated ID of the task.
   * @param taskId taskId or {@code null} for none
   */
  public GoogleCloudAiplatformV1beta1PipelineTaskDetail setTaskId(java.lang.Long taskId) {
    this.taskId = taskId;
    return this;
  }

  /**
   * Output only. The user specified name of the task that is defined in pipeline_spec.
   * @return value or {@code null} for none
   */
  public java.lang.String getTaskName() {
    return taskName;
  }

  /**
   * Output only. The user specified name of the task that is defined in pipeline_spec.
   * @param taskName taskName or {@code null} for none
   */
  public GoogleCloudAiplatformV1beta1PipelineTaskDetail setTaskName(java.lang.String taskName) {
    this.taskName = taskName;
    return this;
  }

  @Override
  public GoogleCloudAiplatformV1beta1PipelineTaskDetail set(String fieldName, Object value) {
    return (GoogleCloudAiplatformV1beta1PipelineTaskDetail) super.set(fieldName, value);
  }

  @Override
  public GoogleCloudAiplatformV1beta1PipelineTaskDetail clone() {
    return (GoogleCloudAiplatformV1beta1PipelineTaskDetail) super.clone();
  }

}
