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

org.graylog2.rest.models.users.responses.$AutoValue_Token Maven / Gradle / Ivy

There is a newer version: 6.0.1
Show newest version
package org.graylog2.rest.models.users.responses;

import com.fasterxml.jackson.annotation.JsonProperty;
import javax.annotation.processing.Generated;
import org.joda.time.DateTime;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
abstract class $AutoValue_Token extends Token {

  private final String id;

  private final String name;

  private final String token;

  private final DateTime lastAccess;

  $AutoValue_Token(
      String id,
      String name,
      String token,
      DateTime lastAccess) {
    if (id == null) {
      throw new NullPointerException("Null id");
    }
    this.id = id;
    if (name == null) {
      throw new NullPointerException("Null name");
    }
    this.name = name;
    if (token == null) {
      throw new NullPointerException("Null token");
    }
    this.token = token;
    if (lastAccess == null) {
      throw new NullPointerException("Null lastAccess");
    }
    this.lastAccess = lastAccess;
  }

  @JsonProperty
  @Override
  public String id() {
    return id;
  }

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

  @JsonProperty
  @Override
  public String token() {
    return token;
  }

  @JsonProperty
  @Override
  public DateTime lastAccess() {
    return lastAccess;
  }

  @Override
  public String toString() {
    return "Token{"
        + "id=" + id + ", "
        + "name=" + name + ", "
        + "token=" + token + ", "
        + "lastAccess=" + lastAccess
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof Token) {
      Token that = (Token) o;
      return this.id.equals(that.id())
          && this.name.equals(that.name())
          && this.token.equals(that.token())
          && this.lastAccess.equals(that.lastAccess());
    }
    return false;
  }

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy