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

org.graylog.security.authservice.test.AutoValue_AuthServiceBackendTestResult Maven / Gradle / Ivy

There is a newer version: 6.0.1
Show newest version
package org.graylog.security.authservice.test;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Generated;

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

  private final boolean isSuccess;

  private final String message;

  private final ImmutableList errors;

  private final ImmutableMap result;

  private AutoValue_AuthServiceBackendTestResult(
      boolean isSuccess,
      String message,
      ImmutableList errors,
      ImmutableMap result) {
    this.isSuccess = isSuccess;
    this.message = message;
    this.errors = errors;
    this.result = result;
  }

  @JsonProperty("success")
  @Override
  public boolean isSuccess() {
    return isSuccess;
  }

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

  @JsonProperty("errors")
  @Override
  public ImmutableList errors() {
    return errors;
  }

  @JsonProperty("result")
  @Override
  public ImmutableMap result() {
    return result;
  }

  @Override
  public String toString() {
    return "AuthServiceBackendTestResult{"
        + "isSuccess=" + isSuccess + ", "
        + "message=" + message + ", "
        + "errors=" + errors + ", "
        + "result=" + result
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof AuthServiceBackendTestResult) {
      AuthServiceBackendTestResult that = (AuthServiceBackendTestResult) o;
      return this.isSuccess == that.isSuccess()
          && this.message.equals(that.message())
          && this.errors.equals(that.errors())
          && this.result.equals(that.result());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= isSuccess ? 1231 : 1237;
    h$ *= 1000003;
    h$ ^= message.hashCode();
    h$ *= 1000003;
    h$ ^= errors.hashCode();
    h$ *= 1000003;
    h$ ^= result.hashCode();
    return h$;
  }

  static final class Builder extends AuthServiceBackendTestResult.Builder {
    private Boolean isSuccess;
    private String message;
    private ImmutableList errors;
    private ImmutableMap result;
    Builder() {
    }
    @Override
    public AuthServiceBackendTestResult.Builder isSuccess(boolean isSuccess) {
      this.isSuccess = isSuccess;
      return this;
    }
    @Override
    public AuthServiceBackendTestResult.Builder message(String message) {
      if (message == null) {
        throw new NullPointerException("Null message");
      }
      this.message = message;
      return this;
    }
    @Override
    public AuthServiceBackendTestResult.Builder errors(List errors) {
      this.errors = ImmutableList.copyOf(errors);
      return this;
    }
    @Override
    public AuthServiceBackendTestResult.Builder result(Map result) {
      this.result = ImmutableMap.copyOf(result);
      return this;
    }
    @Override
    public AuthServiceBackendTestResult build() {
      String missing = "";
      if (this.isSuccess == null) {
        missing += " isSuccess";
      }
      if (this.message == null) {
        missing += " message";
      }
      if (this.errors == null) {
        missing += " errors";
      }
      if (this.result == null) {
        missing += " result";
      }
      if (!missing.isEmpty()) {
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_AuthServiceBackendTestResult(
          this.isSuccess,
          this.message,
          this.errors,
          this.result);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy