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

com.google.gerrit.server.group.AutoValue_InternalGroup Maven / Gradle / Ivy

There is a newer version: 3.11.0
Show newest version

package com.google.gerrit.server.group;

import com.google.common.collect.ImmutableSet;
import com.google.gerrit.common.Nullable;
import com.google.gerrit.reviewdb.client.Account;
import com.google.gerrit.reviewdb.client.AccountGroup;
import java.sql.Timestamp;
import javax.annotation.Generated;

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

  private final AccountGroup.Id id;
  private final AccountGroup.NameKey nameKey;
  private final String description;
  private final AccountGroup.UUID ownerGroupUUID;
  private final boolean visibleToAll;
  private final AccountGroup.UUID groupUUID;
  private final Timestamp createdOn;
  private final ImmutableSet members;
  private final ImmutableSet subgroups;

  AutoValue_InternalGroup(
      AccountGroup.Id id,
      AccountGroup.NameKey nameKey,
      @Nullable String description,
      AccountGroup.UUID ownerGroupUUID,
      boolean visibleToAll,
      AccountGroup.UUID groupUUID,
      Timestamp createdOn,
      ImmutableSet members,
      ImmutableSet subgroups) {
    if (id == null) {
      throw new NullPointerException("Null id");
    }
    this.id = id;
    if (nameKey == null) {
      throw new NullPointerException("Null nameKey");
    }
    this.nameKey = nameKey;
    this.description = description;
    if (ownerGroupUUID == null) {
      throw new NullPointerException("Null ownerGroupUUID");
    }
    this.ownerGroupUUID = ownerGroupUUID;
    this.visibleToAll = visibleToAll;
    if (groupUUID == null) {
      throw new NullPointerException("Null groupUUID");
    }
    this.groupUUID = groupUUID;
    if (createdOn == null) {
      throw new NullPointerException("Null createdOn");
    }
    this.createdOn = createdOn;
    if (members == null) {
      throw new NullPointerException("Null members");
    }
    this.members = members;
    if (subgroups == null) {
      throw new NullPointerException("Null subgroups");
    }
    this.subgroups = subgroups;
  }

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

  @Override
  public AccountGroup.NameKey getNameKey() {
    return nameKey;
  }

  @Nullable
  @Override
  public String getDescription() {
    return description;
  }

  @Override
  public AccountGroup.UUID getOwnerGroupUUID() {
    return ownerGroupUUID;
  }

  @Override
  public boolean isVisibleToAll() {
    return visibleToAll;
  }

  @Override
  public AccountGroup.UUID getGroupUUID() {
    return groupUUID;
  }

  @Override
  public Timestamp getCreatedOn() {
    return createdOn;
  }

  @Override
  public ImmutableSet getMembers() {
    return members;
  }

  @Override
  public ImmutableSet getSubgroups() {
    return subgroups;
  }

  @Override
  public String toString() {
    return "InternalGroup{"
        + "id=" + id + ", "
        + "nameKey=" + nameKey + ", "
        + "description=" + description + ", "
        + "ownerGroupUUID=" + ownerGroupUUID + ", "
        + "visibleToAll=" + visibleToAll + ", "
        + "groupUUID=" + groupUUID + ", "
        + "createdOn=" + createdOn + ", "
        + "members=" + members + ", "
        + "subgroups=" + subgroups
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof InternalGroup) {
      InternalGroup that = (InternalGroup) o;
      return (this.id.equals(that.getId()))
           && (this.nameKey.equals(that.getNameKey()))
           && ((this.description == null) ? (that.getDescription() == null) : this.description.equals(that.getDescription()))
           && (this.ownerGroupUUID.equals(that.getOwnerGroupUUID()))
           && (this.visibleToAll == that.isVisibleToAll())
           && (this.groupUUID.equals(that.getGroupUUID()))
           && (this.createdOn.equals(that.getCreatedOn()))
           && (this.members.equals(that.getMembers()))
           && (this.subgroups.equals(that.getSubgroups()));
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h = 1;
    h *= 1000003;
    h ^= this.id.hashCode();
    h *= 1000003;
    h ^= this.nameKey.hashCode();
    h *= 1000003;
    h ^= (description == null) ? 0 : this.description.hashCode();
    h *= 1000003;
    h ^= this.ownerGroupUUID.hashCode();
    h *= 1000003;
    h ^= this.visibleToAll ? 1231 : 1237;
    h *= 1000003;
    h ^= this.groupUUID.hashCode();
    h *= 1000003;
    h ^= this.createdOn.hashCode();
    h *= 1000003;
    h ^= this.members.hashCode();
    h *= 1000003;
    h ^= this.subgroups.hashCode();
    return h;
  }

  private static final long serialVersionUID = 1L;

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy