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

com.google.gerrit.server.account.AutoValue_AccountDelta Maven / Gradle / Ivy

There is a newer version: 3.11.0-rc3
Show newest version
package com.google.gerrit.server.account;

import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import com.google.gerrit.common.Nullable;
import com.google.gerrit.entities.NotifyConfig;
import com.google.gerrit.extensions.client.DiffPreferencesInfo;
import com.google.gerrit.extensions.client.EditPreferencesInfo;
import com.google.gerrit.extensions.client.GeneralPreferencesInfo;
import com.google.gerrit.server.account.externalids.ExternalId;
import java.util.Optional;
import java.util.Set;
import javax.annotation.processing.Generated;

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

  private final Optional fullName;

  private final Optional displayName;

  private final Optional preferredEmail;

  private final Optional active;

  private final Optional status;

  private final ImmutableSet createdExternalIds;

  private final ImmutableSet updatedExternalIds;

  private final ImmutableSet deletedExternalIds;

  private final ImmutableMap> updatedProjectWatches;

  private final ImmutableSet deletedProjectWatches;

  private final Optional generalPreferences;

  private final Optional diffPreferences;

  private final Optional editPreferences;

  private final Optional shouldDeleteAccount;

  private AutoValue_AccountDelta(
      Optional fullName,
      Optional displayName,
      Optional preferredEmail,
      Optional active,
      Optional status,
      ImmutableSet createdExternalIds,
      ImmutableSet updatedExternalIds,
      ImmutableSet deletedExternalIds,
      ImmutableMap> updatedProjectWatches,
      ImmutableSet deletedProjectWatches,
      Optional generalPreferences,
      Optional diffPreferences,
      Optional editPreferences,
      Optional shouldDeleteAccount) {
    this.fullName = fullName;
    this.displayName = displayName;
    this.preferredEmail = preferredEmail;
    this.active = active;
    this.status = status;
    this.createdExternalIds = createdExternalIds;
    this.updatedExternalIds = updatedExternalIds;
    this.deletedExternalIds = deletedExternalIds;
    this.updatedProjectWatches = updatedProjectWatches;
    this.deletedProjectWatches = deletedProjectWatches;
    this.generalPreferences = generalPreferences;
    this.diffPreferences = diffPreferences;
    this.editPreferences = editPreferences;
    this.shouldDeleteAccount = shouldDeleteAccount;
  }

  @Override
  public Optional getFullName() {
    return fullName;
  }

  @Override
  public Optional getDisplayName() {
    return displayName;
  }

  @Override
  public Optional getPreferredEmail() {
    return preferredEmail;
  }

  @Override
  public Optional getActive() {
    return active;
  }

  @Override
  public Optional getStatus() {
    return status;
  }

  @Override
  public ImmutableSet getCreatedExternalIds() {
    return createdExternalIds;
  }

  @Override
  public ImmutableSet getUpdatedExternalIds() {
    return updatedExternalIds;
  }

  @Override
  public ImmutableSet getDeletedExternalIds() {
    return deletedExternalIds;
  }

  @Override
  public ImmutableMap> getUpdatedProjectWatches() {
    return updatedProjectWatches;
  }

  @Override
  public ImmutableSet getDeletedProjectWatches() {
    return deletedProjectWatches;
  }

  @Override
  public Optional getGeneralPreferences() {
    return generalPreferences;
  }

  @Override
  public Optional getDiffPreferences() {
    return diffPreferences;
  }

  @Override
  public Optional getEditPreferences() {
    return editPreferences;
  }

  @Override
  public Optional getShouldDeleteAccount() {
    return shouldDeleteAccount;
  }

  @Override
  public String toString() {
    return "AccountDelta{"
        + "fullName=" + fullName + ", "
        + "displayName=" + displayName + ", "
        + "preferredEmail=" + preferredEmail + ", "
        + "active=" + active + ", "
        + "status=" + status + ", "
        + "createdExternalIds=" + createdExternalIds + ", "
        + "updatedExternalIds=" + updatedExternalIds + ", "
        + "deletedExternalIds=" + deletedExternalIds + ", "
        + "updatedProjectWatches=" + updatedProjectWatches + ", "
        + "deletedProjectWatches=" + deletedProjectWatches + ", "
        + "generalPreferences=" + generalPreferences + ", "
        + "diffPreferences=" + diffPreferences + ", "
        + "editPreferences=" + editPreferences + ", "
        + "shouldDeleteAccount=" + shouldDeleteAccount
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof AccountDelta) {
      AccountDelta that = (AccountDelta) o;
      return this.fullName.equals(that.getFullName())
          && this.displayName.equals(that.getDisplayName())
          && this.preferredEmail.equals(that.getPreferredEmail())
          && this.active.equals(that.getActive())
          && this.status.equals(that.getStatus())
          && this.createdExternalIds.equals(that.getCreatedExternalIds())
          && this.updatedExternalIds.equals(that.getUpdatedExternalIds())
          && this.deletedExternalIds.equals(that.getDeletedExternalIds())
          && this.updatedProjectWatches.equals(that.getUpdatedProjectWatches())
          && this.deletedProjectWatches.equals(that.getDeletedProjectWatches())
          && this.generalPreferences.equals(that.getGeneralPreferences())
          && this.diffPreferences.equals(that.getDiffPreferences())
          && this.editPreferences.equals(that.getEditPreferences())
          && this.shouldDeleteAccount.equals(that.getShouldDeleteAccount());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= fullName.hashCode();
    h$ *= 1000003;
    h$ ^= displayName.hashCode();
    h$ *= 1000003;
    h$ ^= preferredEmail.hashCode();
    h$ *= 1000003;
    h$ ^= active.hashCode();
    h$ *= 1000003;
    h$ ^= status.hashCode();
    h$ *= 1000003;
    h$ ^= createdExternalIds.hashCode();
    h$ *= 1000003;
    h$ ^= updatedExternalIds.hashCode();
    h$ *= 1000003;
    h$ ^= deletedExternalIds.hashCode();
    h$ *= 1000003;
    h$ ^= updatedProjectWatches.hashCode();
    h$ *= 1000003;
    h$ ^= deletedProjectWatches.hashCode();
    h$ *= 1000003;
    h$ ^= generalPreferences.hashCode();
    h$ *= 1000003;
    h$ ^= diffPreferences.hashCode();
    h$ *= 1000003;
    h$ ^= editPreferences.hashCode();
    h$ *= 1000003;
    h$ ^= shouldDeleteAccount.hashCode();
    return h$;
  }

  static final class Builder extends AccountDelta.Builder {
    private Optional fullName = Optional.empty();
    private Optional displayName = Optional.empty();
    private Optional preferredEmail = Optional.empty();
    private Optional active = Optional.empty();
    private Optional status = Optional.empty();
    private ImmutableSet.Builder createdExternalIdsBuilder$;
    private ImmutableSet createdExternalIds;
    private ImmutableSet.Builder updatedExternalIdsBuilder$;
    private ImmutableSet updatedExternalIds;
    private ImmutableSet.Builder deletedExternalIdsBuilder$;
    private ImmutableSet deletedExternalIds;
    private ImmutableMap.Builder> updatedProjectWatchesBuilder$;
    private ImmutableMap> updatedProjectWatches;
    private ImmutableSet.Builder deletedProjectWatchesBuilder$;
    private ImmutableSet deletedProjectWatches;
    private Optional generalPreferences = Optional.empty();
    private Optional diffPreferences = Optional.empty();
    private Optional editPreferences = Optional.empty();
    private Optional shouldDeleteAccount = Optional.empty();
    Builder() {
    }
    @Override
    public AccountDelta.Builder setFullName(@Nullable String fullName) {
      this.fullName = Optional.ofNullable(fullName);
      return this;
    }
    @Override
    public AccountDelta.Builder setDisplayName(@Nullable String displayName) {
      this.displayName = Optional.ofNullable(displayName);
      return this;
    }
    @Override
    public AccountDelta.Builder setPreferredEmail(@Nullable String preferredEmail) {
      this.preferredEmail = Optional.ofNullable(preferredEmail);
      return this;
    }
    @Override
    public AccountDelta.Builder setActive(boolean active) {
      this.active = Optional.of(active);
      return this;
    }
    @Override
    public AccountDelta.Builder setStatus(@Nullable String status) {
      this.status = Optional.ofNullable(status);
      return this;
    }
    @Override
    ImmutableSet.Builder createdExternalIdsBuilder() {
      if (createdExternalIdsBuilder$ == null) {
        createdExternalIdsBuilder$ = ImmutableSet.builder();
      }
      return createdExternalIdsBuilder$;
    }
    @Override
    ImmutableSet.Builder updatedExternalIdsBuilder() {
      if (updatedExternalIdsBuilder$ == null) {
        updatedExternalIdsBuilder$ = ImmutableSet.builder();
      }
      return updatedExternalIdsBuilder$;
    }
    @Override
    ImmutableSet.Builder deletedExternalIdsBuilder() {
      if (deletedExternalIdsBuilder$ == null) {
        deletedExternalIdsBuilder$ = ImmutableSet.builder();
      }
      return deletedExternalIdsBuilder$;
    }
    @Override
    ImmutableMap.Builder> updatedProjectWatchesBuilder() {
      if (updatedProjectWatchesBuilder$ == null) {
        updatedProjectWatchesBuilder$ = ImmutableMap.builder();
      }
      return updatedProjectWatchesBuilder$;
    }
    @Override
    ImmutableSet.Builder deletedProjectWatchesBuilder() {
      if (deletedProjectWatchesBuilder$ == null) {
        deletedProjectWatchesBuilder$ = ImmutableSet.builder();
      }
      return deletedProjectWatchesBuilder$;
    }
    @Override
    public AccountDelta.Builder setGeneralPreferences(GeneralPreferencesInfo generalPreferences) {
      this.generalPreferences = Optional.of(generalPreferences);
      return this;
    }
    @Override
    public AccountDelta.Builder setDiffPreferences(DiffPreferencesInfo diffPreferences) {
      this.diffPreferences = Optional.of(diffPreferences);
      return this;
    }
    @Override
    public AccountDelta.Builder setEditPreferences(EditPreferencesInfo editPreferences) {
      this.editPreferences = Optional.of(editPreferences);
      return this;
    }
    @Override
    public AccountDelta.Builder setShouldDeleteAccount(boolean shouldDeleteAccount) {
      this.shouldDeleteAccount = Optional.of(shouldDeleteAccount);
      return this;
    }
    @Override
    public AccountDelta build() {
      if (createdExternalIdsBuilder$ != null) {
        this.createdExternalIds = createdExternalIdsBuilder$.build();
      } else if (this.createdExternalIds == null) {
        this.createdExternalIds = ImmutableSet.of();
      }
      if (updatedExternalIdsBuilder$ != null) {
        this.updatedExternalIds = updatedExternalIdsBuilder$.build();
      } else if (this.updatedExternalIds == null) {
        this.updatedExternalIds = ImmutableSet.of();
      }
      if (deletedExternalIdsBuilder$ != null) {
        this.deletedExternalIds = deletedExternalIdsBuilder$.build();
      } else if (this.deletedExternalIds == null) {
        this.deletedExternalIds = ImmutableSet.of();
      }
      if (updatedProjectWatchesBuilder$ != null) {
        this.updatedProjectWatches = updatedProjectWatchesBuilder$.buildOrThrow();
      } else if (this.updatedProjectWatches == null) {
        this.updatedProjectWatches = ImmutableMap.of();
      }
      if (deletedProjectWatchesBuilder$ != null) {
        this.deletedProjectWatches = deletedProjectWatchesBuilder$.build();
      } else if (this.deletedProjectWatches == null) {
        this.deletedProjectWatches = ImmutableSet.of();
      }
      return new AutoValue_AccountDelta(
          this.fullName,
          this.displayName,
          this.preferredEmail,
          this.active,
          this.status,
          this.createdExternalIds,
          this.updatedExternalIds,
          this.deletedExternalIds,
          this.updatedProjectWatches,
          this.deletedProjectWatches,
          this.generalPreferences,
          this.diffPreferences,
          this.editPreferences,
          this.shouldDeleteAccount);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy