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

org.graylog2.telemetry.rest.AutoValue_TelemetryUserSettings Maven / Gradle / Ivy

There is a newer version: 6.1.4
Show newest version
package org.graylog2.telemetry.rest;

import com.fasterxml.jackson.annotation.JsonProperty;
import javax.annotation.processing.Generated;

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

  private final Boolean telemetryEnabled;

  private final Boolean telemetryPermissionAsked;

  private AutoValue_TelemetryUserSettings(
      Boolean telemetryEnabled,
      Boolean telemetryPermissionAsked) {
    this.telemetryEnabled = telemetryEnabled;
    this.telemetryPermissionAsked = telemetryPermissionAsked;
  }

  @JsonProperty
  @Override
  public Boolean telemetryEnabled() {
    return telemetryEnabled;
  }

  @JsonProperty
  @Override
  public Boolean telemetryPermissionAsked() {
    return telemetryPermissionAsked;
  }

  @Override
  public String toString() {
    return "TelemetryUserSettings{"
        + "telemetryEnabled=" + telemetryEnabled + ", "
        + "telemetryPermissionAsked=" + telemetryPermissionAsked
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof TelemetryUserSettings) {
      TelemetryUserSettings that = (TelemetryUserSettings) o;
      return this.telemetryEnabled.equals(that.telemetryEnabled())
          && this.telemetryPermissionAsked.equals(that.telemetryPermissionAsked());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= telemetryEnabled.hashCode();
    h$ *= 1000003;
    h$ ^= telemetryPermissionAsked.hashCode();
    return h$;
  }

  static final class Builder extends TelemetryUserSettings.Builder {
    private Boolean telemetryEnabled;
    private Boolean telemetryPermissionAsked;
    Builder() {
    }
    @Override
    public TelemetryUserSettings.Builder telemetryEnabled(Boolean telemetryEnabled) {
      if (telemetryEnabled == null) {
        throw new NullPointerException("Null telemetryEnabled");
      }
      this.telemetryEnabled = telemetryEnabled;
      return this;
    }
    @Override
    public TelemetryUserSettings.Builder telemetryPermissionAsked(Boolean telemetryPermissionAsked) {
      if (telemetryPermissionAsked == null) {
        throw new NullPointerException("Null telemetryPermissionAsked");
      }
      this.telemetryPermissionAsked = telemetryPermissionAsked;
      return this;
    }
    @Override
    public TelemetryUserSettings build() {
      if (this.telemetryEnabled == null
          || this.telemetryPermissionAsked == null) {
        StringBuilder missing = new StringBuilder();
        if (this.telemetryEnabled == null) {
          missing.append(" telemetryEnabled");
        }
        if (this.telemetryPermissionAsked == null) {
          missing.append(" telemetryPermissionAsked");
        }
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_TelemetryUserSettings(
          this.telemetryEnabled,
          this.telemetryPermissionAsked);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy