/*
 * Copyright 2018 Google LLC
 *
 * 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
 *
 *     https://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.google.android.ground.model.submission;

import com.google.android.ground.model.AuditInfo;
import com.google.android.ground.model.Survey;
import com.google.android.ground.model.locationofinterest.LocationOfInterest;
import com.google.android.ground.model.task.Task;
import com.google.auto.value.AutoValue;

/** Represents a single instance of data collected about a specific {@link LocationOfInterest}. */
@AutoValue
public abstract class Submission {

  public abstract String getId();

  public abstract Survey getSurvey();

  public abstract LocationOfInterest getLocationOfInterest();

  public abstract Task getTask();

  /**
   * Returns the user and time audit info pertaining to the creation of this submission.
   */
  public abstract AuditInfo getCreated();

  /**
   * Returns the user and time audit info pertaining to the last modification of this submission.
   */
  public abstract AuditInfo getLastModified();

  public abstract ResponseMap getResponses();

  public static Builder newBuilder() {
    return new AutoValue_Submission.Builder().setResponses(ResponseMap.builder().build());
  }

  public abstract Submission.Builder toBuilder();

  @AutoValue.Builder
  public abstract static class Builder {

    public abstract Builder setId(String newId);

    public abstract Builder setSurvey(Survey survey);

    public abstract Builder setLocationOfInterest(LocationOfInterest locationOfInterest);

    public abstract Builder setTask(Task task);

    public abstract Builder setCreated(AuditInfo newCreated);

    public abstract Builder setLastModified(AuditInfo newLastModified);

    public abstract Builder setResponses(ResponseMap responses);

    public abstract Submission build();
  }
}

@@ -782,45 +782,15 @@
 del.
-locationofinterest.LocationOfInterest
+job.Job
 ;%0Aim
@@ -830,17 +830,45 @@
 del.
-task.Task
+locationofinterest.LocationOfInterest
 ;%0Aim
@@ -1211,20 +1211,18 @@
 act 
-Task getTask
+Job getJob
 ();%0A
@@ -1219,37 +1219,32 @@
 getJob();%0A%0A  /**
-%0A   *
  Returns the use
@@ -1303,35 +1303,32 @@
 this submission.
-%0A  
  */%0A  public abs
@@ -2043,22 +2043,19 @@
  set
-Task(Task task
+Job(Job job
 );%0A%0A

Use `job` instead of `task` in submissions in model