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

com.google.gerrit.server.project.AutoValue_PermissionCollection_SeenRule Maven / Gradle / Ivy



package com.google.gerrit.server.project;

import com.google.gerrit.common.Nullable;
import com.google.gerrit.reviewdb.client.AccountGroup;
import javax.annotation.Generated;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_PermissionCollection_SeenRule extends PermissionCollection.SeenRule {

  private final String refPattern;

  private final String permissionName;

  private final AccountGroup.UUID group;

  AutoValue_PermissionCollection_SeenRule(
      String refPattern,
      String permissionName,
      @Nullable AccountGroup.UUID group) {
    if (refPattern == null) {
      throw new NullPointerException("Null refPattern");
    }
    this.refPattern = refPattern;
    if (permissionName == null) {
      throw new NullPointerException("Null permissionName");
    }
    this.permissionName = permissionName;
    this.group = group;
  }

  @Override
  public String refPattern() {
    return refPattern;
  }

  @Override
  public String permissionName() {
    return permissionName;
  }

  @Nullable
  @Override
  public AccountGroup.UUID group() {
    return group;
  }

  @Override
  public String toString() {
    return "SeenRule{"
         + "refPattern=" + refPattern + ", "
         + "permissionName=" + permissionName + ", "
         + "group=" + group
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof PermissionCollection.SeenRule) {
      PermissionCollection.SeenRule that = (PermissionCollection.SeenRule) o;
      return (this.refPattern.equals(that.refPattern()))
           && (this.permissionName.equals(that.permissionName()))
           && ((this.group == null) ? (that.group() == null) : this.group.equals(that.group()));
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= refPattern.hashCode();
    h$ *= 1000003;
    h$ ^= permissionName.hashCode();
    h$ *= 1000003;
    h$ ^= (group == null) ? 0 : group.hashCode();
    return h$;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy