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

org.graylog.security.shares.AutoValue_EntityShareResponse_ActiveShare Maven / Gradle / Ivy

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

import com.fasterxml.jackson.annotation.JsonProperty;
import javax.annotation.processing.Generated;
import org.graylog.grn.GRN;
import org.graylog.security.Capability;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_EntityShareResponse_ActiveShare extends EntityShareResponse.ActiveShare {

  private final String grant;

  private final GRN grantee;

  private final Capability capability;

  AutoValue_EntityShareResponse_ActiveShare(
      String grant,
      GRN grantee,
      Capability capability) {
    if (grant == null) {
      throw new NullPointerException("Null grant");
    }
    this.grant = grant;
    if (grantee == null) {
      throw new NullPointerException("Null grantee");
    }
    this.grantee = grantee;
    if (capability == null) {
      throw new NullPointerException("Null capability");
    }
    this.capability = capability;
  }

  @JsonProperty("grant")
  @Override
  public String grant() {
    return grant;
  }

  @JsonProperty("grantee")
  @Override
  public GRN grantee() {
    return grantee;
  }

  @JsonProperty("capability")
  @Override
  public Capability capability() {
    return capability;
  }

  @Override
  public String toString() {
    return "ActiveShare{"
        + "grant=" + grant + ", "
        + "grantee=" + grantee + ", "
        + "capability=" + capability
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof EntityShareResponse.ActiveShare) {
      EntityShareResponse.ActiveShare that = (EntityShareResponse.ActiveShare) o;
      return this.grant.equals(that.grant())
          && this.grantee.equals(that.grantee())
          && this.capability.equals(that.capability());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= grant.hashCode();
    h$ *= 1000003;
    h$ ^= grantee.hashCode();
    h$ *= 1000003;
    h$ ^= capability.hashCode();
    return h$;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy