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

org.graylog.integrations.dataadapters.AutoValue_GreyNoiseCommunityIpLookupAdapter_Config Maven / Gradle / Ivy

There is a newer version: 6.1.4
Show newest version
package org.graylog.integrations.dataadapters;

import com.fasterxml.jackson.annotation.JsonProperty;
import javax.annotation.processing.Generated;
import javax.validation.constraints.NotEmpty;
import org.graylog2.security.encryption.EncryptedValue;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_GreyNoiseCommunityIpLookupAdapter_Config extends GreyNoiseCommunityIpLookupAdapter.Config {

  private final String type;

  private final @NotEmpty EncryptedValue apiToken;

  private AutoValue_GreyNoiseCommunityIpLookupAdapter_Config(
      String type,
      @NotEmpty EncryptedValue apiToken) {
    this.type = type;
    this.apiToken = apiToken;
  }

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

  @JsonProperty("api_token")
  @Override
  public @NotEmpty EncryptedValue apiToken() {
    return apiToken;
  }

  @Override
  public String toString() {
    return "Config{"
        + "type=" + type + ", "
        + "apiToken=" + apiToken
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof GreyNoiseCommunityIpLookupAdapter.Config) {
      GreyNoiseCommunityIpLookupAdapter.Config that = (GreyNoiseCommunityIpLookupAdapter.Config) o;
      return this.type.equals(that.type())
          && this.apiToken.equals(that.apiToken());
    }
    return false;
  }

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

  static final class Builder extends GreyNoiseCommunityIpLookupAdapter.Config.Builder {
    private String type;
    private @NotEmpty EncryptedValue apiToken;
    Builder() {
    }
    @Override
    public GreyNoiseCommunityIpLookupAdapter.Config.Builder type(String type) {
      if (type == null) {
        throw new NullPointerException("Null type");
      }
      this.type = type;
      return this;
    }
    @Override
    public GreyNoiseCommunityIpLookupAdapter.Config.Builder apiToken(EncryptedValue apiToken) {
      if (apiToken == null) {
        throw new NullPointerException("Null apiToken");
      }
      this.apiToken = apiToken;
      return this;
    }
    @Override
    public GreyNoiseCommunityIpLookupAdapter.Config build() {
      if (this.type == null
          || this.apiToken == null) {
        StringBuilder missing = new StringBuilder();
        if (this.type == null) {
          missing.append(" type");
        }
        if (this.apiToken == null) {
          missing.append(" apiToken");
        }
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_GreyNoiseCommunityIpLookupAdapter_Config(
          this.type,
          this.apiToken);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy