
main.app.cash.backfila.protos.service.CreateBackfillRequest Maven / Gradle / Ivy
// Code generated by Wire protocol buffer compiler, do not edit.
// Source: app.cash.backfila.protos.service.CreateBackfillRequest in app/cash/backfila/service.proto
package app.cash.backfila.protos.service;
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.Boolean;
import java.lang.Integer;
import java.lang.Long;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.lang.StringBuilder;
import java.util.Map;
import okio.ByteString;
public final class CreateBackfillRequest extends Message {
public static final ProtoAdapter ADAPTER = new ProtoAdapter_CreateBackfillRequest();
private static final long serialVersionUID = 0L;
public static final String DEFAULT_BACKFILL_NAME = "";
public static final Long DEFAULT_SCAN_SIZE = 0L;
public static final Long DEFAULT_BATCH_SIZE = 0L;
public static final Integer DEFAULT_NUM_THREADS = 0;
public static final ByteString DEFAULT_PKEY_RANGE_START = ByteString.EMPTY;
public static final ByteString DEFAULT_PKEY_RANGE_END = ByteString.EMPTY;
public static final Boolean DEFAULT_DRY_RUN = false;
public static final String DEFAULT_BACKOFF_SCHEDULE = "";
public static final Long DEFAULT_EXTRA_SLEEP_MS = 0L;
@WireField(
tag = 1,
adapter = "com.squareup.wire.ProtoAdapter#STRING"
)
public final String backfill_name;
@WireField(
tag = 2,
adapter = "com.squareup.wire.ProtoAdapter#UINT64"
)
public final Long scan_size;
@WireField(
tag = 3,
adapter = "com.squareup.wire.ProtoAdapter#UINT64"
)
public final Long batch_size;
@WireField(
tag = 4,
adapter = "com.squareup.wire.ProtoAdapter#UINT32"
)
public final Integer num_threads;
@WireField(
tag = 5,
adapter = "com.squareup.wire.ProtoAdapter#BYTES"
)
public final ByteString pkey_range_start;
@WireField(
tag = 6,
adapter = "com.squareup.wire.ProtoAdapter#BYTES"
)
public final ByteString pkey_range_end;
/**
* Parameters that go to the client service.
*/
@WireField(
tag = 7,
keyAdapter = "com.squareup.wire.ProtoAdapter#STRING",
adapter = "com.squareup.wire.ProtoAdapter#BYTES"
)
public final Map parameter_map;
@WireField(
tag = 8,
adapter = "com.squareup.wire.ProtoAdapter#BOOL"
)
public final Boolean dry_run;
@WireField(
tag = 9,
adapter = "com.squareup.wire.ProtoAdapter#STRING"
)
public final String backoff_schedule;
@WireField(
tag = 10,
adapter = "com.squareup.wire.ProtoAdapter#UINT64"
)
public final Long extra_sleep_ms;
public CreateBackfillRequest(String backfill_name, Long scan_size, Long batch_size,
Integer num_threads, ByteString pkey_range_start, ByteString pkey_range_end,
Map parameter_map, Boolean dry_run, String backoff_schedule,
Long extra_sleep_ms) {
this(backfill_name, scan_size, batch_size, num_threads, pkey_range_start, pkey_range_end, parameter_map, dry_run, backoff_schedule, extra_sleep_ms, ByteString.EMPTY);
}
public CreateBackfillRequest(String backfill_name, Long scan_size, Long batch_size,
Integer num_threads, ByteString pkey_range_start, ByteString pkey_range_end,
Map parameter_map, Boolean dry_run, String backoff_schedule,
Long extra_sleep_ms, ByteString unknownFields) {
super(ADAPTER, unknownFields);
this.backfill_name = backfill_name;
this.scan_size = scan_size;
this.batch_size = batch_size;
this.num_threads = num_threads;
this.pkey_range_start = pkey_range_start;
this.pkey_range_end = pkey_range_end;
this.parameter_map = Internal.immutableCopyOf("parameter_map", parameter_map);
this.dry_run = dry_run;
this.backoff_schedule = backoff_schedule;
this.extra_sleep_ms = extra_sleep_ms;
}
@Override
public Builder newBuilder() {
Builder builder = new Builder();
builder.backfill_name = backfill_name;
builder.scan_size = scan_size;
builder.batch_size = batch_size;
builder.num_threads = num_threads;
builder.pkey_range_start = pkey_range_start;
builder.pkey_range_end = pkey_range_end;
builder.parameter_map = Internal.copyOf(parameter_map);
builder.dry_run = dry_run;
builder.backoff_schedule = backoff_schedule;
builder.extra_sleep_ms = extra_sleep_ms;
builder.addUnknownFields(unknownFields());
return builder;
}
@Override
public boolean equals(Object other) {
if (other == this) return true;
if (!(other instanceof CreateBackfillRequest)) return false;
CreateBackfillRequest o = (CreateBackfillRequest) other;
return unknownFields().equals(o.unknownFields())
&& Internal.equals(backfill_name, o.backfill_name)
&& Internal.equals(scan_size, o.scan_size)
&& Internal.equals(batch_size, o.batch_size)
&& Internal.equals(num_threads, o.num_threads)
&& Internal.equals(pkey_range_start, o.pkey_range_start)
&& Internal.equals(pkey_range_end, o.pkey_range_end)
&& parameter_map.equals(o.parameter_map)
&& Internal.equals(dry_run, o.dry_run)
&& Internal.equals(backoff_schedule, o.backoff_schedule)
&& Internal.equals(extra_sleep_ms, o.extra_sleep_ms);
}
@Override
public int hashCode() {
int result = super.hashCode;
if (result == 0) {
result = unknownFields().hashCode();
result = result * 37 + (backfill_name != null ? backfill_name.hashCode() : 0);
result = result * 37 + (scan_size != null ? scan_size.hashCode() : 0);
result = result * 37 + (batch_size != null ? batch_size.hashCode() : 0);
result = result * 37 + (num_threads != null ? num_threads.hashCode() : 0);
result = result * 37 + (pkey_range_start != null ? pkey_range_start.hashCode() : 0);
result = result * 37 + (pkey_range_end != null ? pkey_range_end.hashCode() : 0);
result = result * 37 + parameter_map.hashCode();
result = result * 37 + (dry_run != null ? dry_run.hashCode() : 0);
result = result * 37 + (backoff_schedule != null ? backoff_schedule.hashCode() : 0);
result = result * 37 + (extra_sleep_ms != null ? extra_sleep_ms.hashCode() : 0);
super.hashCode = result;
}
return result;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
if (backfill_name != null) builder.append(", backfill_name=").append(Internal.sanitize(backfill_name));
if (scan_size != null) builder.append(", scan_size=").append(scan_size);
if (batch_size != null) builder.append(", batch_size=").append(batch_size);
if (num_threads != null) builder.append(", num_threads=").append(num_threads);
if (pkey_range_start != null) builder.append(", pkey_range_start=").append(pkey_range_start);
if (pkey_range_end != null) builder.append(", pkey_range_end=").append(pkey_range_end);
if (!parameter_map.isEmpty()) builder.append(", parameter_map=").append(parameter_map);
if (dry_run != null) builder.append(", dry_run=").append(dry_run);
if (backoff_schedule != null) builder.append(", backoff_schedule=").append(Internal.sanitize(backoff_schedule));
if (extra_sleep_ms != null) builder.append(", extra_sleep_ms=").append(extra_sleep_ms);
return builder.replace(0, 2, "CreateBackfillRequest{").append('}').toString();
}
public static final class Builder extends Message.Builder {
public String backfill_name;
public Long scan_size;
public Long batch_size;
public Integer num_threads;
public ByteString pkey_range_start;
public ByteString pkey_range_end;
public Map parameter_map;
public Boolean dry_run;
public String backoff_schedule;
public Long extra_sleep_ms;
public Builder() {
parameter_map = Internal.newMutableMap();
}
public Builder backfill_name(String backfill_name) {
this.backfill_name = backfill_name;
return this;
}
public Builder scan_size(Long scan_size) {
this.scan_size = scan_size;
return this;
}
public Builder batch_size(Long batch_size) {
this.batch_size = batch_size;
return this;
}
public Builder num_threads(Integer num_threads) {
this.num_threads = num_threads;
return this;
}
public Builder pkey_range_start(ByteString pkey_range_start) {
this.pkey_range_start = pkey_range_start;
return this;
}
public Builder pkey_range_end(ByteString pkey_range_end) {
this.pkey_range_end = pkey_range_end;
return this;
}
/**
* Parameters that go to the client service.
*/
public Builder parameter_map(Map parameter_map) {
Internal.checkElementsNotNull(parameter_map);
this.parameter_map = parameter_map;
return this;
}
public Builder dry_run(Boolean dry_run) {
this.dry_run = dry_run;
return this;
}
public Builder backoff_schedule(String backoff_schedule) {
this.backoff_schedule = backoff_schedule;
return this;
}
public Builder extra_sleep_ms(Long extra_sleep_ms) {
this.extra_sleep_ms = extra_sleep_ms;
return this;
}
@Override
public CreateBackfillRequest build() {
return new CreateBackfillRequest(backfill_name, scan_size, batch_size, num_threads, pkey_range_start, pkey_range_end, parameter_map, dry_run, backoff_schedule, extra_sleep_ms, super.buildUnknownFields());
}
}
private static final class ProtoAdapter_CreateBackfillRequest extends ProtoAdapter {
private ProtoAdapter
© 2015 - 2025 Weber Informatics LLC | Privacy Policy