com.cognite.client.config.AutoValue_ClientConfig Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cdf-sdk-java Show documentation
Show all versions of cdf-sdk-java Show documentation
Java SDK for reading and writing from/to CDF resources.
package com.cognite.client.config;
import javax.annotation.processing.Generated;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_ClientConfig extends ClientConfig {
private final String sdkIdentifier;
private final String appIdentifier;
private final String sessionIdentifier;
private final int maxRetries;
private final int noWorkers;
private final int noListPartitions;
private final UpsertMode upsertMode;
private final int entityMatchingMaxBatchSize;
private AutoValue_ClientConfig(
String sdkIdentifier,
String appIdentifier,
String sessionIdentifier,
int maxRetries,
int noWorkers,
int noListPartitions,
UpsertMode upsertMode,
int entityMatchingMaxBatchSize) {
this.sdkIdentifier = sdkIdentifier;
this.appIdentifier = appIdentifier;
this.sessionIdentifier = sessionIdentifier;
this.maxRetries = maxRetries;
this.noWorkers = noWorkers;
this.noListPartitions = noListPartitions;
this.upsertMode = upsertMode;
this.entityMatchingMaxBatchSize = entityMatchingMaxBatchSize;
}
@Override
public String getSdkIdentifier() {
return sdkIdentifier;
}
@Override
public String getAppIdentifier() {
return appIdentifier;
}
@Override
public String getSessionIdentifier() {
return sessionIdentifier;
}
@Override
public int getMaxRetries() {
return maxRetries;
}
@Override
public int getNoWorkers() {
return noWorkers;
}
@Override
public int getNoListPartitions() {
return noListPartitions;
}
@Override
public UpsertMode getUpsertMode() {
return upsertMode;
}
@Override
public int getEntityMatchingMaxBatchSize() {
return entityMatchingMaxBatchSize;
}
@Override
public String toString() {
return "ClientConfig{"
+ "sdkIdentifier=" + sdkIdentifier + ", "
+ "appIdentifier=" + appIdentifier + ", "
+ "sessionIdentifier=" + sessionIdentifier + ", "
+ "maxRetries=" + maxRetries + ", "
+ "noWorkers=" + noWorkers + ", "
+ "noListPartitions=" + noListPartitions + ", "
+ "upsertMode=" + upsertMode + ", "
+ "entityMatchingMaxBatchSize=" + entityMatchingMaxBatchSize
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof ClientConfig) {
ClientConfig that = (ClientConfig) o;
return this.sdkIdentifier.equals(that.getSdkIdentifier())
&& this.appIdentifier.equals(that.getAppIdentifier())
&& this.sessionIdentifier.equals(that.getSessionIdentifier())
&& this.maxRetries == that.getMaxRetries()
&& this.noWorkers == that.getNoWorkers()
&& this.noListPartitions == that.getNoListPartitions()
&& this.upsertMode.equals(that.getUpsertMode())
&& this.entityMatchingMaxBatchSize == that.getEntityMatchingMaxBatchSize();
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= sdkIdentifier.hashCode();
h$ *= 1000003;
h$ ^= appIdentifier.hashCode();
h$ *= 1000003;
h$ ^= sessionIdentifier.hashCode();
h$ *= 1000003;
h$ ^= maxRetries;
h$ *= 1000003;
h$ ^= noWorkers;
h$ *= 1000003;
h$ ^= noListPartitions;
h$ *= 1000003;
h$ ^= upsertMode.hashCode();
h$ *= 1000003;
h$ ^= entityMatchingMaxBatchSize;
return h$;
}
@Override
ClientConfig.Builder toBuilder() {
return new Builder(this);
}
static final class Builder extends ClientConfig.Builder {
private String sdkIdentifier;
private String appIdentifier;
private String sessionIdentifier;
private Integer maxRetries;
private Integer noWorkers;
private Integer noListPartitions;
private UpsertMode upsertMode;
private Integer entityMatchingMaxBatchSize;
Builder() {
}
private Builder(ClientConfig source) {
this.sdkIdentifier = source.getSdkIdentifier();
this.appIdentifier = source.getAppIdentifier();
this.sessionIdentifier = source.getSessionIdentifier();
this.maxRetries = source.getMaxRetries();
this.noWorkers = source.getNoWorkers();
this.noListPartitions = source.getNoListPartitions();
this.upsertMode = source.getUpsertMode();
this.entityMatchingMaxBatchSize = source.getEntityMatchingMaxBatchSize();
}
@Override
ClientConfig.Builder setSdkIdentifier(String sdkIdentifier) {
if (sdkIdentifier == null) {
throw new NullPointerException("Null sdkIdentifier");
}
this.sdkIdentifier = sdkIdentifier;
return this;
}
@Override
ClientConfig.Builder setAppIdentifier(String appIdentifier) {
if (appIdentifier == null) {
throw new NullPointerException("Null appIdentifier");
}
this.appIdentifier = appIdentifier;
return this;
}
@Override
ClientConfig.Builder setSessionIdentifier(String sessionIdentifier) {
if (sessionIdentifier == null) {
throw new NullPointerException("Null sessionIdentifier");
}
this.sessionIdentifier = sessionIdentifier;
return this;
}
@Override
ClientConfig.Builder setMaxRetries(int maxRetries) {
this.maxRetries = maxRetries;
return this;
}
@Override
ClientConfig.Builder setNoWorkers(int noWorkers) {
this.noWorkers = noWorkers;
return this;
}
@Override
ClientConfig.Builder setNoListPartitions(int noListPartitions) {
this.noListPartitions = noListPartitions;
return this;
}
@Override
ClientConfig.Builder setUpsertMode(UpsertMode upsertMode) {
if (upsertMode == null) {
throw new NullPointerException("Null upsertMode");
}
this.upsertMode = upsertMode;
return this;
}
@Override
ClientConfig.Builder setEntityMatchingMaxBatchSize(int entityMatchingMaxBatchSize) {
this.entityMatchingMaxBatchSize = entityMatchingMaxBatchSize;
return this;
}
@Override
ClientConfig build() {
if (this.sdkIdentifier == null
|| this.appIdentifier == null
|| this.sessionIdentifier == null
|| this.maxRetries == null
|| this.noWorkers == null
|| this.noListPartitions == null
|| this.upsertMode == null
|| this.entityMatchingMaxBatchSize == null) {
StringBuilder missing = new StringBuilder();
if (this.sdkIdentifier == null) {
missing.append(" sdkIdentifier");
}
if (this.appIdentifier == null) {
missing.append(" appIdentifier");
}
if (this.sessionIdentifier == null) {
missing.append(" sessionIdentifier");
}
if (this.maxRetries == null) {
missing.append(" maxRetries");
}
if (this.noWorkers == null) {
missing.append(" noWorkers");
}
if (this.noListPartitions == null) {
missing.append(" noListPartitions");
}
if (this.upsertMode == null) {
missing.append(" upsertMode");
}
if (this.entityMatchingMaxBatchSize == null) {
missing.append(" entityMatchingMaxBatchSize");
}
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_ClientConfig(
this.sdkIdentifier,
this.appIdentifier,
this.sessionIdentifier,
this.maxRetries,
this.noWorkers,
this.noListPartitions,
this.upsertMode,
this.entityMatchingMaxBatchSize);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy