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

org.graylog.security.authzroles.AutoValue_BuiltinRole Maven / Gradle / Ivy

There is a newer version: 6.1.4
Show newest version
package org.graylog.security.authzroles;

import java.util.Set;
import javax.annotation.processing.Generated;

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

  private final String name;

  private final String description;

  private final Set permissions;

  AutoValue_BuiltinRole(
      String name,
      String description,
      Set permissions) {
    if (name == null) {
      throw new NullPointerException("Null name");
    }
    this.name = name;
    if (description == null) {
      throw new NullPointerException("Null description");
    }
    this.description = description;
    if (permissions == null) {
      throw new NullPointerException("Null permissions");
    }
    this.permissions = permissions;
  }

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

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

  @Override
  public Set permissions() {
    return permissions;
  }

  @Override
  public String toString() {
    return "BuiltinRole{"
        + "name=" + name + ", "
        + "description=" + description + ", "
        + "permissions=" + permissions
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof BuiltinRole) {
      BuiltinRole that = (BuiltinRole) o;
      return this.name.equals(that.name())
          && this.description.equals(that.description())
          && this.permissions.equals(that.permissions());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= name.hashCode();
    h$ *= 1000003;
    h$ ^= description.hashCode();
    h$ *= 1000003;
    h$ ^= permissions.hashCode();
    return h$;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy