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

org.graylog2.rest.models.system.sessions.responses.$AutoValue_DefaultSessionResponse Maven / Gradle / Ivy

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

import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Date;
import javax.annotation.processing.Generated;

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

  private final Date validUntil;

  private final String sessionId;

  private final String username;

  private final String userId;

  $AutoValue_DefaultSessionResponse(
      Date validUntil,
      String sessionId,
      String username,
      String userId) {
    if (validUntil == null) {
      throw new NullPointerException("Null validUntil");
    }
    this.validUntil = validUntil;
    if (sessionId == null) {
      throw new NullPointerException("Null sessionId");
    }
    this.sessionId = sessionId;
    if (username == null) {
      throw new NullPointerException("Null username");
    }
    this.username = username;
    if (userId == null) {
      throw new NullPointerException("Null userId");
    }
    this.userId = userId;
  }

  @JsonProperty("valid_until")
  @Override
  public Date validUntil() {
    return validUntil;
  }

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

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

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

  @Override
  public String toString() {
    return "DefaultSessionResponse{"
        + "validUntil=" + validUntil + ", "
        + "sessionId=" + sessionId + ", "
        + "username=" + username + ", "
        + "userId=" + userId
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof DefaultSessionResponse) {
      DefaultSessionResponse that = (DefaultSessionResponse) o;
      return this.validUntil.equals(that.validUntil())
          && this.sessionId.equals(that.sessionId())
          && this.username.equals(that.username())
          && this.userId.equals(that.userId());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= validUntil.hashCode();
    h$ *= 1000003;
    h$ ^= sessionId.hashCode();
    h$ *= 1000003;
    h$ ^= username.hashCode();
    h$ *= 1000003;
    h$ ^= userId.hashCode();
    return h$;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy