All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.gerrit.acceptance.AutoValue_TestAccount Maven / Gradle / Ivy

There is a newer version: 3.11.0-rc4
Show newest version
package com.google.gerrit.acceptance;

import com.google.common.collect.ImmutableList;
import com.google.gerrit.common.Nullable;
import com.google.gerrit.entities.Account;
import javax.annotation.processing.Generated;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_TestAccount extends TestAccount {

  private final Account.Id id;

  @Nullable
  private final String username;

  @Nullable
  private final String email;

  @Nullable
  private final String fullName;

  @Nullable
  private final String displayName;

  @Nullable
  private final String httpPassword;

  private final ImmutableList tags;

  AutoValue_TestAccount(
      Account.Id id,
      @Nullable String username,
      @Nullable String email,
      @Nullable String fullName,
      @Nullable String displayName,
      @Nullable String httpPassword,
      ImmutableList tags) {
    if (id == null) {
      throw new NullPointerException("Null id");
    }
    this.id = id;
    this.username = username;
    this.email = email;
    this.fullName = fullName;
    this.displayName = displayName;
    this.httpPassword = httpPassword;
    if (tags == null) {
      throw new NullPointerException("Null tags");
    }
    this.tags = tags;
  }

  @Override
  public Account.Id id() {
    return id;
  }

  @Nullable
  @Override
  public String username() {
    return username;
  }

  @Nullable
  @Override
  public String email() {
    return email;
  }

  @Nullable
  @Override
  public String fullName() {
    return fullName;
  }

  @Nullable
  @Override
  public String displayName() {
    return displayName;
  }

  @Nullable
  @Override
  public String httpPassword() {
    return httpPassword;
  }

  @Override
  public ImmutableList tags() {
    return tags;
  }

  @Override
  public String toString() {
    return "TestAccount{"
        + "id=" + id + ", "
        + "username=" + username + ", "
        + "email=" + email + ", "
        + "fullName=" + fullName + ", "
        + "displayName=" + displayName + ", "
        + "httpPassword=" + httpPassword + ", "
        + "tags=" + tags
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof TestAccount) {
      TestAccount that = (TestAccount) o;
      return this.id.equals(that.id())
          && (this.username == null ? that.username() == null : this.username.equals(that.username()))
          && (this.email == null ? that.email() == null : this.email.equals(that.email()))
          && (this.fullName == null ? that.fullName() == null : this.fullName.equals(that.fullName()))
          && (this.displayName == null ? that.displayName() == null : this.displayName.equals(that.displayName()))
          && (this.httpPassword == null ? that.httpPassword() == null : this.httpPassword.equals(that.httpPassword()))
          && this.tags.equals(that.tags());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= id.hashCode();
    h$ *= 1000003;
    h$ ^= (username == null) ? 0 : username.hashCode();
    h$ *= 1000003;
    h$ ^= (email == null) ? 0 : email.hashCode();
    h$ *= 1000003;
    h$ ^= (fullName == null) ? 0 : fullName.hashCode();
    h$ *= 1000003;
    h$ ^= (displayName == null) ? 0 : displayName.hashCode();
    h$ *= 1000003;
    h$ ^= (httpPassword == null) ? 0 : httpPassword.hashCode();
    h$ *= 1000003;
    h$ ^= tags.hashCode();
    return h$;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy