org.graylog.aws.config.AutoValue_AWSPluginConfiguration Maven / Gradle / Ivy
package org.graylog.aws.config;
import com.fasterxml.jackson.annotation.JsonProperty;
import javax.annotation.Nullable;
import javax.annotation.processing.Generated;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_AWSPluginConfiguration extends AWSPluginConfiguration {
private final boolean lookupsEnabled;
private final String lookupRegions;
private final String accessKey;
@Nullable
private final String encryptedSecretKey;
@Nullable
private final String secretKeySalt;
private final boolean proxyEnabled;
private AutoValue_AWSPluginConfiguration(
boolean lookupsEnabled,
String lookupRegions,
String accessKey,
@Nullable String encryptedSecretKey,
@Nullable String secretKeySalt,
boolean proxyEnabled) {
this.lookupsEnabled = lookupsEnabled;
this.lookupRegions = lookupRegions;
this.accessKey = accessKey;
this.encryptedSecretKey = encryptedSecretKey;
this.secretKeySalt = secretKeySalt;
this.proxyEnabled = proxyEnabled;
}
@JsonProperty("lookups_enabled")
@Override
public boolean lookupsEnabled() {
return lookupsEnabled;
}
@JsonProperty("lookup_regions")
@Override
public String lookupRegions() {
return lookupRegions;
}
@JsonProperty("access_key")
@Override
public String accessKey() {
return accessKey;
}
@JsonProperty("secret_key")
@Nullable
@Override
public String encryptedSecretKey() {
return encryptedSecretKey;
}
@JsonProperty("secret_key_salt")
@Nullable
@Override
public String secretKeySalt() {
return secretKeySalt;
}
@JsonProperty("proxy_enabled")
@Override
public boolean proxyEnabled() {
return proxyEnabled;
}
@Override
public String toString() {
return "AWSPluginConfiguration{"
+ "lookupsEnabled=" + lookupsEnabled + ", "
+ "lookupRegions=" + lookupRegions + ", "
+ "accessKey=" + accessKey + ", "
+ "encryptedSecretKey=" + encryptedSecretKey + ", "
+ "secretKeySalt=" + secretKeySalt + ", "
+ "proxyEnabled=" + proxyEnabled
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof AWSPluginConfiguration) {
AWSPluginConfiguration that = (AWSPluginConfiguration) o;
return this.lookupsEnabled == that.lookupsEnabled()
&& this.lookupRegions.equals(that.lookupRegions())
&& this.accessKey.equals(that.accessKey())
&& (this.encryptedSecretKey == null ? that.encryptedSecretKey() == null : this.encryptedSecretKey.equals(that.encryptedSecretKey()))
&& (this.secretKeySalt == null ? that.secretKeySalt() == null : this.secretKeySalt.equals(that.secretKeySalt()))
&& this.proxyEnabled == that.proxyEnabled();
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= lookupsEnabled ? 1231 : 1237;
h$ *= 1000003;
h$ ^= lookupRegions.hashCode();
h$ *= 1000003;
h$ ^= accessKey.hashCode();
h$ *= 1000003;
h$ ^= (encryptedSecretKey == null) ? 0 : encryptedSecretKey.hashCode();
h$ *= 1000003;
h$ ^= (secretKeySalt == null) ? 0 : secretKeySalt.hashCode();
h$ *= 1000003;
h$ ^= proxyEnabled ? 1231 : 1237;
return h$;
}
@Override
public AWSPluginConfiguration.Builder toBuilder() {
return new Builder(this);
}
static final class Builder extends AWSPluginConfiguration.Builder {
private boolean lookupsEnabled;
private String lookupRegions;
private String accessKey;
private String encryptedSecretKey;
private String secretKeySalt;
private boolean proxyEnabled;
private byte set$0;
Builder() {
}
private Builder(AWSPluginConfiguration source) {
this.lookupsEnabled = source.lookupsEnabled();
this.lookupRegions = source.lookupRegions();
this.accessKey = source.accessKey();
this.encryptedSecretKey = source.encryptedSecretKey();
this.secretKeySalt = source.secretKeySalt();
this.proxyEnabled = source.proxyEnabled();
set$0 = (byte) 3;
}
@Override
public AWSPluginConfiguration.Builder lookupsEnabled(boolean lookupsEnabled) {
this.lookupsEnabled = lookupsEnabled;
set$0 |= (byte) 1;
return this;
}
@Override
public AWSPluginConfiguration.Builder lookupRegions(String lookupRegions) {
if (lookupRegions == null) {
throw new NullPointerException("Null lookupRegions");
}
this.lookupRegions = lookupRegions;
return this;
}
@Override
public AWSPluginConfiguration.Builder accessKey(String accessKey) {
if (accessKey == null) {
throw new NullPointerException("Null accessKey");
}
this.accessKey = accessKey;
return this;
}
@Override
AWSPluginConfiguration.Builder encryptedSecretKey(String encryptedSecretKey) {
this.encryptedSecretKey = encryptedSecretKey;
return this;
}
@Override
AWSPluginConfiguration.Builder secretKeySalt(String secretKeySalt) {
this.secretKeySalt = secretKeySalt;
return this;
}
@Override
public AWSPluginConfiguration.Builder proxyEnabled(boolean proxyEnabled) {
this.proxyEnabled = proxyEnabled;
set$0 |= (byte) 2;
return this;
}
@Override
public AWSPluginConfiguration build() {
if (set$0 != 3
|| this.lookupRegions == null
|| this.accessKey == null) {
StringBuilder missing = new StringBuilder();
if ((set$0 & 1) == 0) {
missing.append(" lookupsEnabled");
}
if (this.lookupRegions == null) {
missing.append(" lookupRegions");
}
if (this.accessKey == null) {
missing.append(" accessKey");
}
if ((set$0 & 2) == 0) {
missing.append(" proxyEnabled");
}
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_AWSPluginConfiguration(
this.lookupsEnabled,
this.lookupRegions,
this.accessKey,
this.encryptedSecretKey,
this.secretKeySalt,
this.proxyEnabled);
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy