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

org.graylog.events.processor.storage.AutoValue_EventStorageHandlerCheckResult Maven / Gradle / Ivy

There is a newer version: 6.0.1
Show newest version
package org.graylog.events.processor.storage;

import java.util.Optional;
import javax.annotation.Generated;
import javax.annotation.Nullable;

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

  private final boolean canExecute;

  private final Optional message;

  private AutoValue_EventStorageHandlerCheckResult(
      boolean canExecute,
      Optional message) {
    this.canExecute = canExecute;
    this.message = message;
  }

  @Override
  public boolean canExecute() {
    return canExecute;
  }

  @Override
  public Optional message() {
    return message;
  }

  @Override
  public String toString() {
    return "EventStorageHandlerCheckResult{"
        + "canExecute=" + canExecute + ", "
        + "message=" + message
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof EventStorageHandlerCheckResult) {
      EventStorageHandlerCheckResult that = (EventStorageHandlerCheckResult) o;
      return this.canExecute == that.canExecute()
          && this.message.equals(that.message());
    }
    return false;
  }

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

  @Override
  public EventStorageHandlerCheckResult.Builder toBuilder() {
    return new Builder(this);
  }

  static final class Builder extends EventStorageHandlerCheckResult.Builder {
    private Boolean canExecute;
    private Optional message = Optional.empty();
    Builder() {
    }
    private Builder(EventStorageHandlerCheckResult source) {
      this.canExecute = source.canExecute();
      this.message = source.message();
    }
    @Override
    public EventStorageHandlerCheckResult.Builder canExecute(boolean canExecute) {
      this.canExecute = canExecute;
      return this;
    }
    @Override
    public EventStorageHandlerCheckResult.Builder message(@Nullable String message) {
      this.message = Optional.ofNullable(message);
      return this;
    }
    @Override
    public EventStorageHandlerCheckResult build() {
      String missing = "";
      if (this.canExecute == null) {
        missing += " canExecute";
      }
      if (!missing.isEmpty()) {
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_EventStorageHandlerCheckResult(
          this.canExecute,
          this.message);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy