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

org.graylog.security.permissions.AutoValue_GRNPermission Maven / Gradle / Ivy

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

import javax.annotation.processing.Generated;
import org.graylog.grn.GRN;

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

  private final String type;

  private final GRN target;

  AutoValue_GRNPermission(
      String type,
      GRN target) {
    if (type == null) {
      throw new NullPointerException("Null type");
    }
    this.type = type;
    if (target == null) {
      throw new NullPointerException("Null target");
    }
    this.target = target;
  }

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

  @Override
  public GRN target() {
    return target;
  }

  @Override
  public String toString() {
    return "GRNPermission{"
        + "type=" + type + ", "
        + "target=" + target
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof GRNPermission) {
      GRNPermission that = (GRNPermission) o;
      return this.type.equals(that.type())
          && this.target.equals(that.target());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= type.hashCode();
    h$ *= 1000003;
    h$ ^= target.hashCode();
    return h$;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy