com.google.cloud.pubsub.v1.AutoValue_SubscriberStats Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of google-cloud-pubsub Show documentation
Show all versions of google-cloud-pubsub Show documentation
Java idiomatic client for Google Cloud Pub/Sub
package com.google.cloud.pubsub.v1;
import javax.annotation.Generated;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_SubscriberStats extends SubscriberStats {
private final long receivedMessages;
private final long ackedMessages;
private final long totalReceivedMessages;
private final long totalAckedMessages;
private final SubscriberStats.Stats endToEndLatency;
private final SubscriberStats.Stats ackLatency;
private final long numberOfAutoExtendedAckDeadlines;
private AutoValue_SubscriberStats(
long receivedMessages,
long ackedMessages,
long totalReceivedMessages,
long totalAckedMessages,
SubscriberStats.Stats endToEndLatency,
SubscriberStats.Stats ackLatency,
long numberOfAutoExtendedAckDeadlines) {
this.receivedMessages = receivedMessages;
this.ackedMessages = ackedMessages;
this.totalReceivedMessages = totalReceivedMessages;
this.totalAckedMessages = totalAckedMessages;
this.endToEndLatency = endToEndLatency;
this.ackLatency = ackLatency;
this.numberOfAutoExtendedAckDeadlines = numberOfAutoExtendedAckDeadlines;
}
@Override
long getReceivedMessages() {
return receivedMessages;
}
@Override
long getAckedMessages() {
return ackedMessages;
}
@Override
long getTotalReceivedMessages() {
return totalReceivedMessages;
}
@Override
long getTotalAckedMessages() {
return totalAckedMessages;
}
@Override
SubscriberStats.Stats getEndToEndLatency() {
return endToEndLatency;
}
@Override
SubscriberStats.Stats getAckLatency() {
return ackLatency;
}
@Override
long getNumberOfAutoExtendedAckDeadlines() {
return numberOfAutoExtendedAckDeadlines;
}
@Override
public String toString() {
return "SubscriberStats{"
+ "receivedMessages=" + receivedMessages + ", "
+ "ackedMessages=" + ackedMessages + ", "
+ "totalReceivedMessages=" + totalReceivedMessages + ", "
+ "totalAckedMessages=" + totalAckedMessages + ", "
+ "endToEndLatency=" + endToEndLatency + ", "
+ "ackLatency=" + ackLatency + ", "
+ "numberOfAutoExtendedAckDeadlines=" + numberOfAutoExtendedAckDeadlines
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof SubscriberStats) {
SubscriberStats that = (SubscriberStats) o;
return (this.receivedMessages == that.getReceivedMessages())
&& (this.ackedMessages == that.getAckedMessages())
&& (this.totalReceivedMessages == that.getTotalReceivedMessages())
&& (this.totalAckedMessages == that.getTotalAckedMessages())
&& (this.endToEndLatency.equals(that.getEndToEndLatency()))
&& (this.ackLatency.equals(that.getAckLatency()))
&& (this.numberOfAutoExtendedAckDeadlines == that.getNumberOfAutoExtendedAckDeadlines());
}
return false;
}
@Override
public int hashCode() {
int h = 1;
h *= 1000003;
h ^= (this.receivedMessages >>> 32) ^ this.receivedMessages;
h *= 1000003;
h ^= (this.ackedMessages >>> 32) ^ this.ackedMessages;
h *= 1000003;
h ^= (this.totalReceivedMessages >>> 32) ^ this.totalReceivedMessages;
h *= 1000003;
h ^= (this.totalAckedMessages >>> 32) ^ this.totalAckedMessages;
h *= 1000003;
h ^= this.endToEndLatency.hashCode();
h *= 1000003;
h ^= this.ackLatency.hashCode();
h *= 1000003;
h ^= (this.numberOfAutoExtendedAckDeadlines >>> 32) ^ this.numberOfAutoExtendedAckDeadlines;
return h;
}
static final class Builder extends SubscriberStats.Builder {
private Long receivedMessages;
private Long ackedMessages;
private Long totalReceivedMessages;
private Long totalAckedMessages;
private SubscriberStats.Stats endToEndLatency;
private SubscriberStats.Stats ackLatency;
private Long numberOfAutoExtendedAckDeadlines;
Builder() {
}
@Override
SubscriberStats.Builder setReceivedMessages(long receivedMessages) {
this.receivedMessages = receivedMessages;
return this;
}
@Override
SubscriberStats.Builder setAckedMessages(long ackedMessages) {
this.ackedMessages = ackedMessages;
return this;
}
@Override
SubscriberStats.Builder setTotalReceivedMessages(long totalReceivedMessages) {
this.totalReceivedMessages = totalReceivedMessages;
return this;
}
@Override
SubscriberStats.Builder setTotalAckedMessages(long totalAckedMessages) {
this.totalAckedMessages = totalAckedMessages;
return this;
}
@Override
SubscriberStats.Builder setEndToEndLatency(SubscriberStats.Stats endToEndLatency) {
if (endToEndLatency == null) {
throw new NullPointerException("Null endToEndLatency");
}
this.endToEndLatency = endToEndLatency;
return this;
}
@Override
SubscriberStats.Builder setAckLatency(SubscriberStats.Stats ackLatency) {
if (ackLatency == null) {
throw new NullPointerException("Null ackLatency");
}
this.ackLatency = ackLatency;
return this;
}
@Override
SubscriberStats.Builder setNumberOfAutoExtendedAckDeadlines(long numberOfAutoExtendedAckDeadlines) {
this.numberOfAutoExtendedAckDeadlines = numberOfAutoExtendedAckDeadlines;
return this;
}
@Override
SubscriberStats build() {
String missing = "";
if (this.receivedMessages == null) {
missing += " receivedMessages";
}
if (this.ackedMessages == null) {
missing += " ackedMessages";
}
if (this.totalReceivedMessages == null) {
missing += " totalReceivedMessages";
}
if (this.totalAckedMessages == null) {
missing += " totalAckedMessages";
}
if (this.endToEndLatency == null) {
missing += " endToEndLatency";
}
if (this.ackLatency == null) {
missing += " ackLatency";
}
if (this.numberOfAutoExtendedAckDeadlines == null) {
missing += " numberOfAutoExtendedAckDeadlines";
}
if (!missing.isEmpty()) {
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_SubscriberStats(
this.receivedMessages,
this.ackedMessages,
this.totalReceivedMessages,
this.totalAckedMessages,
this.endToEndLatency,
this.ackLatency,
this.numberOfAutoExtendedAckDeadlines);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy