
main.app.cash.backfila.protos.clientservice.GetNextBatchRangeResponse Maven / Gradle / Ivy
// Code generated by Wire protocol buffer compiler, do not edit.
// Source: app.cash.backfila.protos.clientservice.GetNextBatchRangeResponse in app/cash/backfila/client_service.proto
package app.cash.backfila.protos.clientservice;
import com.squareup.wire.FieldEncoding;
import com.squareup.wire.Message;
import com.squareup.wire.ProtoAdapter;
import com.squareup.wire.ProtoReader;
import com.squareup.wire.ProtoWriter;
import com.squareup.wire.ReverseProtoWriter;
import com.squareup.wire.Syntax;
import com.squareup.wire.WireField;
import com.squareup.wire.internal.Internal;
import java.io.IOException;
import java.lang.Long;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.lang.StringBuilder;
import java.util.List;
import okio.ByteString;
public final class GetNextBatchRangeResponse extends Message {
public static final ProtoAdapter ADAPTER = new ProtoAdapter_GetNextBatchRangeResponse();
private static final long serialVersionUID = 0L;
@WireField(
tag = 1,
adapter = "app.cash.backfila.protos.clientservice.GetNextBatchRangeResponse$Batch#ADAPTER",
label = WireField.Label.REPEATED
)
public final List batches;
public GetNextBatchRangeResponse(List batches) {
this(batches, ByteString.EMPTY);
}
public GetNextBatchRangeResponse(List batches, ByteString unknownFields) {
super(ADAPTER, unknownFields);
this.batches = Internal.immutableCopyOf("batches", batches);
}
@Override
public Builder newBuilder() {
Builder builder = new Builder();
builder.batches = Internal.copyOf(batches);
builder.addUnknownFields(unknownFields());
return builder;
}
@Override
public boolean equals(Object other) {
if (other == this) return true;
if (!(other instanceof GetNextBatchRangeResponse)) return false;
GetNextBatchRangeResponse o = (GetNextBatchRangeResponse) other;
return unknownFields().equals(o.unknownFields())
&& batches.equals(o.batches);
}
@Override
public int hashCode() {
int result = super.hashCode;
if (result == 0) {
result = unknownFields().hashCode();
result = result * 37 + batches.hashCode();
super.hashCode = result;
}
return result;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
if (!batches.isEmpty()) builder.append(", batches=").append(batches);
return builder.replace(0, 2, "GetNextBatchRangeResponse{").append('}').toString();
}
public static final class Builder extends Message.Builder {
public List batches;
public Builder() {
batches = Internal.newMutableList();
}
public Builder batches(List batches) {
Internal.checkElementsNotNull(batches);
this.batches = batches;
return this;
}
@Override
public GetNextBatchRangeResponse build() {
return new GetNextBatchRangeResponse(batches, super.buildUnknownFields());
}
}
public static final class Batch extends Message {
public static final ProtoAdapter ADAPTER = new ProtoAdapter_Batch();
private static final long serialVersionUID = 0L;
public static final Long DEFAULT_SCANNED_RECORD_COUNT = 0L;
public static final Long DEFAULT_MATCHING_RECORD_COUNT = 0L;
@WireField(
tag = 1,
adapter = "app.cash.backfila.protos.clientservice.KeyRange#ADAPTER"
)
public final KeyRange batch_range;
@WireField(
tag = 2,
adapter = "com.squareup.wire.ProtoAdapter#UINT64"
)
public final Long scanned_record_count;
@WireField(
tag = 3,
adapter = "com.squareup.wire.ProtoAdapter#UINT64"
)
public final Long matching_record_count;
public Batch(KeyRange batch_range, Long scanned_record_count, Long matching_record_count) {
this(batch_range, scanned_record_count, matching_record_count, ByteString.EMPTY);
}
public Batch(KeyRange batch_range, Long scanned_record_count, Long matching_record_count,
ByteString unknownFields) {
super(ADAPTER, unknownFields);
this.batch_range = batch_range;
this.scanned_record_count = scanned_record_count;
this.matching_record_count = matching_record_count;
}
@Override
public Builder newBuilder() {
Builder builder = new Builder();
builder.batch_range = batch_range;
builder.scanned_record_count = scanned_record_count;
builder.matching_record_count = matching_record_count;
builder.addUnknownFields(unknownFields());
return builder;
}
@Override
public boolean equals(Object other) {
if (other == this) return true;
if (!(other instanceof Batch)) return false;
Batch o = (Batch) other;
return unknownFields().equals(o.unknownFields())
&& Internal.equals(batch_range, o.batch_range)
&& Internal.equals(scanned_record_count, o.scanned_record_count)
&& Internal.equals(matching_record_count, o.matching_record_count);
}
@Override
public int hashCode() {
int result = super.hashCode;
if (result == 0) {
result = unknownFields().hashCode();
result = result * 37 + (batch_range != null ? batch_range.hashCode() : 0);
result = result * 37 + (scanned_record_count != null ? scanned_record_count.hashCode() : 0);
result = result * 37 + (matching_record_count != null ? matching_record_count.hashCode() : 0);
super.hashCode = result;
}
return result;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
if (batch_range != null) builder.append(", batch_range=").append(batch_range);
if (scanned_record_count != null) builder.append(", scanned_record_count=").append(scanned_record_count);
if (matching_record_count != null) builder.append(", matching_record_count=").append(matching_record_count);
return builder.replace(0, 2, "Batch{").append('}').toString();
}
public static final class Builder extends Message.Builder {
public KeyRange batch_range;
public Long scanned_record_count;
public Long matching_record_count;
public Builder() {
}
public Builder batch_range(KeyRange batch_range) {
this.batch_range = batch_range;
return this;
}
public Builder scanned_record_count(Long scanned_record_count) {
this.scanned_record_count = scanned_record_count;
return this;
}
public Builder matching_record_count(Long matching_record_count) {
this.matching_record_count = matching_record_count;
return this;
}
@Override
public Batch build() {
return new Batch(batch_range, scanned_record_count, matching_record_count, super.buildUnknownFields());
}
}
private static final class ProtoAdapter_Batch extends ProtoAdapter {
public ProtoAdapter_Batch() {
super(FieldEncoding.LENGTH_DELIMITED, Batch.class, "type.googleapis.com/app.cash.backfila.protos.clientservice.GetNextBatchRangeResponse.Batch", Syntax.PROTO_2, null, "app/cash/backfila/client_service.proto");
}
@Override
public int encodedSize(Batch value) {
int result = 0;
result += KeyRange.ADAPTER.encodedSizeWithTag(1, value.batch_range);
result += ProtoAdapter.UINT64.encodedSizeWithTag(2, value.scanned_record_count);
result += ProtoAdapter.UINT64.encodedSizeWithTag(3, value.matching_record_count);
result += value.unknownFields().size();
return result;
}
@Override
public void encode(ProtoWriter writer, Batch value) throws IOException {
KeyRange.ADAPTER.encodeWithTag(writer, 1, value.batch_range);
ProtoAdapter.UINT64.encodeWithTag(writer, 2, value.scanned_record_count);
ProtoAdapter.UINT64.encodeWithTag(writer, 3, value.matching_record_count);
writer.writeBytes(value.unknownFields());
}
@Override
public void encode(ReverseProtoWriter writer, Batch value) throws IOException {
writer.writeBytes(value.unknownFields());
ProtoAdapter.UINT64.encodeWithTag(writer, 3, value.matching_record_count);
ProtoAdapter.UINT64.encodeWithTag(writer, 2, value.scanned_record_count);
KeyRange.ADAPTER.encodeWithTag(writer, 1, value.batch_range);
}
@Override
public Batch decode(ProtoReader reader) throws IOException {
Builder builder = new Builder();
long token = reader.beginMessage();
for (int tag; (tag = reader.nextTag()) != -1;) {
switch (tag) {
case 1: builder.batch_range(KeyRange.ADAPTER.decode(reader)); break;
case 2: builder.scanned_record_count(ProtoAdapter.UINT64.decode(reader)); break;
case 3: builder.matching_record_count(ProtoAdapter.UINT64.decode(reader)); break;
default: {
reader.readUnknownField(tag);
}
}
}
builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token));
return builder.build();
}
@Override
public Batch redact(Batch value) {
Builder builder = value.newBuilder();
if (builder.batch_range != null) builder.batch_range = KeyRange.ADAPTER.redact(builder.batch_range);
builder.clearUnknownFields();
return builder.build();
}
}
}
private static final class ProtoAdapter_GetNextBatchRangeResponse extends ProtoAdapter {
public ProtoAdapter_GetNextBatchRangeResponse() {
super(FieldEncoding.LENGTH_DELIMITED, GetNextBatchRangeResponse.class, "type.googleapis.com/app.cash.backfila.protos.clientservice.GetNextBatchRangeResponse", Syntax.PROTO_2, null, "app/cash/backfila/client_service.proto");
}
@Override
public int encodedSize(GetNextBatchRangeResponse value) {
int result = 0;
result += Batch.ADAPTER.asRepeated().encodedSizeWithTag(1, value.batches);
result += value.unknownFields().size();
return result;
}
@Override
public void encode(ProtoWriter writer, GetNextBatchRangeResponse value) throws IOException {
Batch.ADAPTER.asRepeated().encodeWithTag(writer, 1, value.batches);
writer.writeBytes(value.unknownFields());
}
@Override
public void encode(ReverseProtoWriter writer, GetNextBatchRangeResponse value) throws
IOException {
writer.writeBytes(value.unknownFields());
Batch.ADAPTER.asRepeated().encodeWithTag(writer, 1, value.batches);
}
@Override
public GetNextBatchRangeResponse decode(ProtoReader reader) throws IOException {
Builder builder = new Builder();
long token = reader.beginMessage();
for (int tag; (tag = reader.nextTag()) != -1;) {
switch (tag) {
case 1: builder.batches.add(Batch.ADAPTER.decode(reader)); break;
default: {
reader.readUnknownField(tag);
}
}
}
builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token));
return builder.build();
}
@Override
public GetNextBatchRangeResponse redact(GetNextBatchRangeResponse value) {
Builder builder = value.newBuilder();
Internal.redactElements(builder.batches, Batch.ADAPTER);
builder.clearUnknownFields();
return builder.build();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy