org.graylog.security.authservice.test.AutoValue_AuthServiceBackendTestResult Maven / Gradle / Ivy
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.processing.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;
private byte set$0;
Builder() {
}
@Override
public AuthServiceBackendTestResult.Builder isSuccess(boolean isSuccess) {
this.isSuccess = isSuccess;
set$0 |= (byte) 1;
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() {
if (set$0 != 1
|| this.message == null
|| this.errors == null
|| this.result == null) {
StringBuilder missing = new StringBuilder();
if ((set$0 & 1) == 0) {
missing.append(" isSuccess");
}
if (this.message == null) {
missing.append(" message");
}
if (this.errors == null) {
missing.append(" errors");
}
if (this.result == null) {
missing.append(" result");
}
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