annotations.com.cognite.client.stream.AutoValue_RawPublisher 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.stream;
import com.cognite.client.RawRows;
import com.cognite.client.dto.RawRow;
import java.time.Duration;
import java.time.Instant;
import java.util.List;
import java.util.function.Consumer;
import javax.annotation.Nullable;
import javax.annotation.processing.Generated;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_RawPublisher extends RawPublisher {
private final Duration pollingInterval;
private final Duration pollingOffset;
private final Instant startTime;
private final Instant endTime;
private final RawRows rawRows;
private final String rawDbName;
private final String rawTableName;
private final Consumer> consumer;
private AutoValue_RawPublisher(
Duration pollingInterval,
Duration pollingOffset,
Instant startTime,
Instant endTime,
RawRows rawRows,
String rawDbName,
String rawTableName,
@Nullable Consumer> consumer) {
this.pollingInterval = pollingInterval;
this.pollingOffset = pollingOffset;
this.startTime = startTime;
this.endTime = endTime;
this.rawRows = rawRows;
this.rawDbName = rawDbName;
this.rawTableName = rawTableName;
this.consumer = consumer;
}
@Override
protected Duration getPollingInterval() {
return pollingInterval;
}
@Override
protected Duration getPollingOffset() {
return pollingOffset;
}
@Override
protected Instant getStartTime() {
return startTime;
}
@Override
protected Instant getEndTime() {
return endTime;
}
@Override
RawRows getRawRows() {
return rawRows;
}
@Override
String getRawDbName() {
return rawDbName;
}
@Override
String getRawTableName() {
return rawTableName;
}
@Nullable
@Override
Consumer> getConsumer() {
return consumer;
}
@Override
public String toString() {
return "RawPublisher{"
+ "pollingInterval=" + pollingInterval + ", "
+ "pollingOffset=" + pollingOffset + ", "
+ "startTime=" + startTime + ", "
+ "endTime=" + endTime + ", "
+ "rawRows=" + rawRows + ", "
+ "rawDbName=" + rawDbName + ", "
+ "rawTableName=" + rawTableName + ", "
+ "consumer=" + consumer
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof RawPublisher) {
RawPublisher that = (RawPublisher) o;
return this.pollingInterval.equals(that.getPollingInterval())
&& this.pollingOffset.equals(that.getPollingOffset())
&& this.startTime.equals(that.getStartTime())
&& this.endTime.equals(that.getEndTime())
&& this.rawRows.equals(that.getRawRows())
&& this.rawDbName.equals(that.getRawDbName())
&& this.rawTableName.equals(that.getRawTableName())
&& (this.consumer == null ? that.getConsumer() == null : this.consumer.equals(that.getConsumer()));
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= pollingInterval.hashCode();
h$ *= 1000003;
h$ ^= pollingOffset.hashCode();
h$ *= 1000003;
h$ ^= startTime.hashCode();
h$ *= 1000003;
h$ ^= endTime.hashCode();
h$ *= 1000003;
h$ ^= rawRows.hashCode();
h$ *= 1000003;
h$ ^= rawDbName.hashCode();
h$ *= 1000003;
h$ ^= rawTableName.hashCode();
h$ *= 1000003;
h$ ^= (consumer == null) ? 0 : consumer.hashCode();
return h$;
}
@Override
RawPublisher.Builder toBuilder() {
return new Builder(this);
}
static final class Builder extends RawPublisher.Builder {
private Duration pollingInterval;
private Duration pollingOffset;
private Instant startTime;
private Instant endTime;
private RawRows rawRows;
private String rawDbName;
private String rawTableName;
private Consumer> consumer;
Builder() {
}
private Builder(RawPublisher source) {
this.pollingInterval = source.getPollingInterval();
this.pollingOffset = source.getPollingOffset();
this.startTime = source.getStartTime();
this.endTime = source.getEndTime();
this.rawRows = source.getRawRows();
this.rawDbName = source.getRawDbName();
this.rawTableName = source.getRawTableName();
this.consumer = source.getConsumer();
}
@Override
RawPublisher.Builder setPollingInterval(Duration pollingInterval) {
if (pollingInterval == null) {
throw new NullPointerException("Null pollingInterval");
}
this.pollingInterval = pollingInterval;
return this;
}
@Override
RawPublisher.Builder setPollingOffset(Duration pollingOffset) {
if (pollingOffset == null) {
throw new NullPointerException("Null pollingOffset");
}
this.pollingOffset = pollingOffset;
return this;
}
@Override
RawPublisher.Builder setStartTime(Instant startTime) {
if (startTime == null) {
throw new NullPointerException("Null startTime");
}
this.startTime = startTime;
return this;
}
@Override
RawPublisher.Builder setEndTime(Instant endTime) {
if (endTime == null) {
throw new NullPointerException("Null endTime");
}
this.endTime = endTime;
return this;
}
@Override
RawPublisher.Builder setRawRows(RawRows rawRows) {
if (rawRows == null) {
throw new NullPointerException("Null rawRows");
}
this.rawRows = rawRows;
return this;
}
@Override
RawPublisher.Builder setRawDbName(String rawDbName) {
if (rawDbName == null) {
throw new NullPointerException("Null rawDbName");
}
this.rawDbName = rawDbName;
return this;
}
@Override
RawPublisher.Builder setRawTableName(String rawTableName) {
if (rawTableName == null) {
throw new NullPointerException("Null rawTableName");
}
this.rawTableName = rawTableName;
return this;
}
@Override
RawPublisher.Builder setConsumer(Consumer> consumer) {
this.consumer = consumer;
return this;
}
@Override
RawPublisher build() {
if (this.pollingInterval == null
|| this.pollingOffset == null
|| this.startTime == null
|| this.endTime == null
|| this.rawRows == null
|| this.rawDbName == null
|| this.rawTableName == null) {
StringBuilder missing = new StringBuilder();
if (this.pollingInterval == null) {
missing.append(" pollingInterval");
}
if (this.pollingOffset == null) {
missing.append(" pollingOffset");
}
if (this.startTime == null) {
missing.append(" startTime");
}
if (this.endTime == null) {
missing.append(" endTime");
}
if (this.rawRows == null) {
missing.append(" rawRows");
}
if (this.rawDbName == null) {
missing.append(" rawDbName");
}
if (this.rawTableName == null) {
missing.append(" rawTableName");
}
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_RawPublisher(
this.pollingInterval,
this.pollingOffset,
this.startTime,
this.endTime,
this.rawRows,
this.rawDbName,
this.rawTableName,
this.consumer);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy