// Copyright 2019 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.sps.data;

import java.util.ArrayList;

/**
 * A class to make a User type, containing an optional 
 * email String and a list of trip IDs the user can have. 
 * Users that are not logged in can only have one trip ID.
 */
public final class User {

  private String email;
  private ArrayList<String> tripIds;

  public User(String email, ArrayList<String> tripIds) {
    this.email = email;
    this.tripIds = tripIds;
  }

  public String getEmail() {
      return this.email;
  }

  public ArrayList<String> getTripIds() {
      return this.tripIds;
  }
} 
@@ -639,16 +639,110 @@
 rayList;
+%0Aimport java.util.Collection;%0Aimport static com.google.common.base.Preconditions.checkNotNull;
 %0A%0A/**%0A *
@@ -968,16 +968,41 @@
  email;%0A
+  private String userId;%0A
   privat
@@ -1059,25 +1059,41 @@
  email, 
-ArrayList
+String userId, Collection
 %3CString%3E
@@ -1121,21 +1121,94 @@
 email = 
-email
+checkNotNull(email, %22email%22);%0A    this.userId = checkNotNull(userId, %22userId%22)
 ;%0A    th
@@ -1220,23 +1220,40 @@
 ipIds = 
+new ArrayList%3C%3E(
 tripIds
+)
 ;%0A  %7D%0A%0A 
@@ -1276,26 +1276,24 @@
 etEmail() %7B%0A
-  
     return t
@@ -1303,16 +1303,16 @@
 .email;%0A
+
   %7D%0A%0A  p
@@ -1358,29 +1358,135 @@
     
-  return this.tripIds
+ArrayList%3CString%3E tripIdsCopy = this.tripIds;%0A    return tripIdsCopy;%0A  %7D%0A%0A  public String getUserId() %7B%0A    return this.userId
 ;%0A  

Add userId and check for null params inside User class