/*
 * 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.displayvideo.v2.model;

/**
 * A single user in Display & Video 360.
 *
 * <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 Display & Video 360 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 User extends com.google.api.client.json.GenericJson {

  /**
   * The assigned user roles. Required in CreateUser. Output only in UpdateUser. Can only be updated
   * through BulkEditAssignedUserRoles.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<AssignedUserRole> assignedUserRoles;

  static {
    // hack to force ProGuard to consider AssignedUserRole used, since otherwise it would be stripped out
    // see https://github.com/google/google-api-java-client/issues/543
    com.google.api.client.util.Data.nullOf(AssignedUserRole.class);
  }

  /**
   * Required. The display name of the user. Must be UTF-8 encoded with a maximum size of 240 bytes.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String displayName;

  /**
   * Required. Immutable. The email address used to identify the user.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String email;

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

  /**
   * Output only. The unique ID of the user. Assigned by the system.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key @com.google.api.client.json.JsonString
  private java.lang.Long userId;

  /**
   * The assigned user roles. Required in CreateUser. Output only in UpdateUser. Can only be updated
   * through BulkEditAssignedUserRoles.
   * @return value or {@code null} for none
   */
  public java.util.List<AssignedUserRole> getAssignedUserRoles() {
    return assignedUserRoles;
  }

  /**
   * The assigned user roles. Required in CreateUser. Output only in UpdateUser. Can only be updated
   * through BulkEditAssignedUserRoles.
   * @param assignedUserRoles assignedUserRoles or {@code null} for none
   */
  public User setAssignedUserRoles(java.util.List<AssignedUserRole> assignedUserRoles) {
    this.assignedUserRoles = assignedUserRoles;
    return this;
  }

  /**
   * Required. The display name of the user. Must be UTF-8 encoded with a maximum size of 240 bytes.
   * @return value or {@code null} for none
   */
  public java.lang.String getDisplayName() {
    return displayName;
  }

  /**
   * Required. The display name of the user. Must be UTF-8 encoded with a maximum size of 240 bytes.
   * @param displayName displayName or {@code null} for none
   */
  public User setDisplayName(java.lang.String displayName) {
    this.displayName = displayName;
    return this;
  }

  /**
   * Required. Immutable. The email address used to identify the user.
   * @return value or {@code null} for none
   */
  public java.lang.String getEmail() {
    return email;
  }

  /**
   * Required. Immutable. The email address used to identify the user.
   * @param email email or {@code null} for none
   */
  public User setEmail(java.lang.String email) {
    this.email = email;
    return this;
  }

  /**
   * Output only. The resource name of the user.
   * @return value or {@code null} for none
   */
  public java.lang.String getName() {
    return name;
  }

  /**
   * Output only. The resource name of the user.
   * @param name name or {@code null} for none
   */
  public User setName(java.lang.String name) {
    this.name = name;
    return this;
  }

  /**
   * Output only. The unique ID of the user. Assigned by the system.
   * @return value or {@code null} for none
   */
  public java.lang.Long getUserId() {
    return userId;
  }

  /**
   * Output only. The unique ID of the user. Assigned by the system.
   * @param userId userId or {@code null} for none
   */
  public User setUserId(java.lang.Long userId) {
    this.userId = userId;
    return this;
  }

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

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

}
