index
int64
0
0
repo_id
stringlengths
9
205
file_path
stringlengths
31
246
content
stringlengths
1
12.2M
__index_level_0__
int64
0
10k
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/squareup/options
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/squareup/options/misc/MessageExportEnabledOption.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.options.misc.message_export_enabled in options.proto package squareup.options.misc; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) public @interface MessageExportEnabledOption { boolean value(); }
7,000
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/squareup/options
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/squareup/options/misc/HttpOneOnlyOption.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.options.misc.httpOneOnly in options.proto package squareup.options.misc; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) public @interface HttpOneOnlyOption { boolean value(); }
7,001
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/squareup/options
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/squareup/options/misc/HideOption.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.options.misc.hide in options.proto package squareup.options.misc; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) public @interface HideOption { boolean value(); }
7,002
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/squareup/options
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/squareup/options/misc/TextAlignmentOption.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.options.misc.text_alignment in options.proto package squareup.options.misc; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) public @interface TextAlignmentOption { int value(); }
7,003
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/squareup/options
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/squareup/options/misc/UnusedOption.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.options.misc.unused in options.proto package squareup.options.misc; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) public @interface UnusedOption { boolean value(); }
7,004
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/squareup/options
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/squareup/options/misc/RelevantOption.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.options.misc.relevant in options.proto package squareup.options.misc; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) public @interface RelevantOption { boolean value(); }
7,005
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/squareup/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/squareup/protos/packed_encoding/OuterMessage.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.packed_encoding.OuterMessage in packed_encoding.proto package squareup.protos.packed_encoding; 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.Integer; import java.lang.Object; import java.lang.Override; import java.lang.String; import java.lang.StringBuilder; import okio.ByteString; public final class OuterMessage extends Message<OuterMessage, OuterMessage.Builder> { public static final ProtoAdapter<OuterMessage> ADAPTER = new ProtoAdapter_OuterMessage(); private static final long serialVersionUID = 0L; public static final Integer DEFAULT_OUTER_NUMBER_BEFORE = 0; @WireField( tag = 1, adapter = "com.squareup.wire.ProtoAdapter#INT32" ) public final Integer outer_number_before; @WireField( tag = 2, adapter = "squareup.protos.packed_encoding.EmbeddedMessage#ADAPTER" ) public final EmbeddedMessage embedded_message; public OuterMessage(Integer outer_number_before, EmbeddedMessage embedded_message) { this(outer_number_before, embedded_message, ByteString.EMPTY); } public OuterMessage(Integer outer_number_before, EmbeddedMessage embedded_message, ByteString unknownFields) { super(ADAPTER, unknownFields); this.outer_number_before = outer_number_before; this.embedded_message = embedded_message; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.outer_number_before = outer_number_before; builder.embedded_message = embedded_message; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof OuterMessage)) return false; OuterMessage o = (OuterMessage) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(outer_number_before, o.outer_number_before) && Internal.equals(embedded_message, o.embedded_message); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + (outer_number_before != null ? outer_number_before.hashCode() : 0); result = result * 37 + (embedded_message != null ? embedded_message.hashCode() : 0); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (outer_number_before != null) builder.append(", outer_number_before=").append(outer_number_before); if (embedded_message != null) builder.append(", embedded_message=").append(embedded_message); return builder.replace(0, 2, "OuterMessage{").append('}').toString(); } public static final class Builder extends Message.Builder<OuterMessage, Builder> { public Integer outer_number_before; public EmbeddedMessage embedded_message; public Builder() { } public Builder outer_number_before(Integer outer_number_before) { this.outer_number_before = outer_number_before; return this; } public Builder embedded_message(EmbeddedMessage embedded_message) { this.embedded_message = embedded_message; return this; } @Override public OuterMessage build() { return new OuterMessage(outer_number_before, embedded_message, super.buildUnknownFields()); } } private static final class ProtoAdapter_OuterMessage extends ProtoAdapter<OuterMessage> { public ProtoAdapter_OuterMessage() { super(FieldEncoding.LENGTH_DELIMITED, OuterMessage.class, "type.googleapis.com/squareup.protos.packed_encoding.OuterMessage", Syntax.PROTO_2, null, "packed_encoding.proto"); } @Override public int encodedSize(OuterMessage value) { int result = 0; result += ProtoAdapter.INT32.encodedSizeWithTag(1, value.outer_number_before); result += EmbeddedMessage.ADAPTER.encodedSizeWithTag(2, value.embedded_message); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, OuterMessage value) throws IOException { ProtoAdapter.INT32.encodeWithTag(writer, 1, value.outer_number_before); EmbeddedMessage.ADAPTER.encodeWithTag(writer, 2, value.embedded_message); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, OuterMessage value) throws IOException { writer.writeBytes(value.unknownFields()); EmbeddedMessage.ADAPTER.encodeWithTag(writer, 2, value.embedded_message); ProtoAdapter.INT32.encodeWithTag(writer, 1, value.outer_number_before); } @Override public OuterMessage 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.outer_number_before(ProtoAdapter.INT32.decode(reader)); break; case 2: builder.embedded_message(EmbeddedMessage.ADAPTER.decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public OuterMessage redact(OuterMessage value) { Builder builder = value.newBuilder(); if (builder.embedded_message != null) builder.embedded_message = EmbeddedMessage.ADAPTER.redact(builder.embedded_message); builder.clearUnknownFields(); return builder.build(); } } }
7,006
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/squareup/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/squareup/protos/packed_encoding/EmbeddedMessage.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.packed_encoding.EmbeddedMessage in packed_encoding.proto package squareup.protos.packed_encoding; 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.Integer; 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 EmbeddedMessage extends Message<EmbeddedMessage, EmbeddedMessage.Builder> { public static final ProtoAdapter<EmbeddedMessage> ADAPTER = new ProtoAdapter_EmbeddedMessage(); private static final long serialVersionUID = 0L; public static final Integer DEFAULT_INNER_NUMBER_AFTER = 0; @WireField( tag = 1, adapter = "com.squareup.wire.ProtoAdapter#INT32", label = WireField.Label.PACKED ) public final List<Integer> inner_repeated_number; @WireField( tag = 2, adapter = "com.squareup.wire.ProtoAdapter#INT32" ) public final Integer inner_number_after; public EmbeddedMessage(List<Integer> inner_repeated_number, Integer inner_number_after) { this(inner_repeated_number, inner_number_after, ByteString.EMPTY); } public EmbeddedMessage(List<Integer> inner_repeated_number, Integer inner_number_after, ByteString unknownFields) { super(ADAPTER, unknownFields); this.inner_repeated_number = Internal.immutableCopyOf("inner_repeated_number", inner_repeated_number); this.inner_number_after = inner_number_after; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.inner_repeated_number = Internal.copyOf(inner_repeated_number); builder.inner_number_after = inner_number_after; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof EmbeddedMessage)) return false; EmbeddedMessage o = (EmbeddedMessage) other; return unknownFields().equals(o.unknownFields()) && inner_repeated_number.equals(o.inner_repeated_number) && Internal.equals(inner_number_after, o.inner_number_after); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + inner_repeated_number.hashCode(); result = result * 37 + (inner_number_after != null ? inner_number_after.hashCode() : 0); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (!inner_repeated_number.isEmpty()) builder.append(", inner_repeated_number=").append(inner_repeated_number); if (inner_number_after != null) builder.append(", inner_number_after=").append(inner_number_after); return builder.replace(0, 2, "EmbeddedMessage{").append('}').toString(); } public static final class Builder extends Message.Builder<EmbeddedMessage, Builder> { public List<Integer> inner_repeated_number; public Integer inner_number_after; public Builder() { inner_repeated_number = Internal.newMutableList(); } public Builder inner_repeated_number(List<Integer> inner_repeated_number) { Internal.checkElementsNotNull(inner_repeated_number); this.inner_repeated_number = inner_repeated_number; return this; } public Builder inner_number_after(Integer inner_number_after) { this.inner_number_after = inner_number_after; return this; } @Override public EmbeddedMessage build() { return new EmbeddedMessage(inner_repeated_number, inner_number_after, super.buildUnknownFields()); } } private static final class ProtoAdapter_EmbeddedMessage extends ProtoAdapter<EmbeddedMessage> { public ProtoAdapter_EmbeddedMessage() { super(FieldEncoding.LENGTH_DELIMITED, EmbeddedMessage.class, "type.googleapis.com/squareup.protos.packed_encoding.EmbeddedMessage", Syntax.PROTO_2, null, "packed_encoding.proto"); } @Override public int encodedSize(EmbeddedMessage value) { int result = 0; result += ProtoAdapter.INT32.asPacked().encodedSizeWithTag(1, value.inner_repeated_number); result += ProtoAdapter.INT32.encodedSizeWithTag(2, value.inner_number_after); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, EmbeddedMessage value) throws IOException { ProtoAdapter.INT32.asPacked().encodeWithTag(writer, 1, value.inner_repeated_number); ProtoAdapter.INT32.encodeWithTag(writer, 2, value.inner_number_after); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, EmbeddedMessage value) throws IOException { writer.writeBytes(value.unknownFields()); ProtoAdapter.INT32.encodeWithTag(writer, 2, value.inner_number_after); ProtoAdapter.INT32.asPacked().encodeWithTag(writer, 1, value.inner_repeated_number); } @Override public EmbeddedMessage 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.inner_repeated_number.add(ProtoAdapter.INT32.decode(reader)); break; case 2: builder.inner_number_after(ProtoAdapter.INT32.decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public EmbeddedMessage redact(EmbeddedMessage value) { Builder builder = value.newBuilder(); builder.clearUnknownFields(); return builder.build(); } } }
7,007
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/squareup/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/squareup/protos/extension_collision_1/AOption.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.extension_collision_1.a in extension_collision_1.proto package squareup.protos.extension_collision_1; import java.lang.String; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) public @interface AOption { String value(); }
7,008
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/squareup/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/squareup/protos/extension_collision_1/BOption.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.extension_collision_1.b in extension_collision_1.proto package squareup.protos.extension_collision_1; import java.lang.String; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) public @interface BOption { String value(); }
7,009
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/squareup/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/squareup/protos/extension_collision/CollisionSubject.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.extension_collision.CollisionSubject in extension_collision.proto package squareup.protos.extension_collision; 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.Object; import java.lang.Override; import java.lang.String; import java.lang.StringBuilder; import okio.ByteString; import squareup.protos.extension_collision_1.AOption; import squareup.protos.extension_collision_1.BOption; import squareup.protos.extension_collision_2.COption; public final class CollisionSubject extends Message<CollisionSubject, CollisionSubject.Builder> { public static final ProtoAdapter<CollisionSubject> ADAPTER = new ProtoAdapter_CollisionSubject(); private static final long serialVersionUID = 0L; public static final String DEFAULT_F = ""; @AOption("1a") @BOption("1b") @squareup.protos.extension_collision_2.AOption("2a") @COption("2c") @WireField( tag = 1, adapter = "com.squareup.wire.ProtoAdapter#STRING" ) public final String f; public CollisionSubject(String f) { this(f, ByteString.EMPTY); } public CollisionSubject(String f, ByteString unknownFields) { super(ADAPTER, unknownFields); this.f = f; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.f = f; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof CollisionSubject)) return false; CollisionSubject o = (CollisionSubject) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(f, o.f); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + (f != null ? f.hashCode() : 0); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (f != null) builder.append(", f=").append(Internal.sanitize(f)); return builder.replace(0, 2, "CollisionSubject{").append('}').toString(); } public static final class Builder extends Message.Builder<CollisionSubject, Builder> { public String f; public Builder() { } public Builder f(String f) { this.f = f; return this; } @Override public CollisionSubject build() { return new CollisionSubject(f, super.buildUnknownFields()); } } private static final class ProtoAdapter_CollisionSubject extends ProtoAdapter<CollisionSubject> { public ProtoAdapter_CollisionSubject() { super(FieldEncoding.LENGTH_DELIMITED, CollisionSubject.class, "type.googleapis.com/squareup.protos.extension_collision.CollisionSubject", Syntax.PROTO_2, null, "extension_collision.proto"); } @Override public int encodedSize(CollisionSubject value) { int result = 0; result += ProtoAdapter.STRING.encodedSizeWithTag(1, value.f); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, CollisionSubject value) throws IOException { ProtoAdapter.STRING.encodeWithTag(writer, 1, value.f); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, CollisionSubject value) throws IOException { writer.writeBytes(value.unknownFields()); ProtoAdapter.STRING.encodeWithTag(writer, 1, value.f); } @Override public CollisionSubject 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.f(ProtoAdapter.STRING.decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public CollisionSubject redact(CollisionSubject value) { Builder builder = value.newBuilder(); builder.clearUnknownFields(); return builder.build(); } } }
7,010
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/squareup/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/squareup/protos/extension_collision_2/AOption.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.extension_collision_2.a in extension_collision_2.proto package squareup.protos.extension_collision_2; import java.lang.String; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) public @interface AOption { String value(); }
7,011
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/squareup/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/squareup/protos/extension_collision_2/COption.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.extension_collision_2.c in extension_collision_2.proto package squareup.protos.extension_collision_2; import java.lang.String; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) public @interface COption { String value(); }
7,012
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/differentpackage/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/differentpackage/protos/foo/Foo.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.differentpackage.foo.Foo in differentpackage/foo.proto package com.squareup.differentpackage.protos.foo; import com.squareup.differentpackage.protos.bar.Bar; 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.Object; import java.lang.Override; import java.lang.String; import java.lang.StringBuilder; import okio.ByteString; public final class Foo extends Message<Foo, Foo.Builder> { public static final ProtoAdapter<Foo> ADAPTER = new ProtoAdapter_Foo(); private static final long serialVersionUID = 0L; @WireField( tag = 1, adapter = "com.squareup.differentpackage.protos.bar.Bar$Baz$Moo#ADAPTER" ) public final Bar.Baz.Moo moo; public Foo(Bar.Baz.Moo moo) { this(moo, ByteString.EMPTY); } public Foo(Bar.Baz.Moo moo, ByteString unknownFields) { super(ADAPTER, unknownFields); this.moo = moo; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.moo = moo; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof Foo)) return false; Foo o = (Foo) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(moo, o.moo); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + (moo != null ? moo.hashCode() : 0); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (moo != null) builder.append(", moo=").append(moo); return builder.replace(0, 2, "Foo{").append('}').toString(); } public static final class Builder extends Message.Builder<Foo, Builder> { public Bar.Baz.Moo moo; public Builder() { } public Builder moo(Bar.Baz.Moo moo) { this.moo = moo; return this; } @Override public Foo build() { return new Foo(moo, super.buildUnknownFields()); } } private static final class ProtoAdapter_Foo extends ProtoAdapter<Foo> { public ProtoAdapter_Foo() { super(FieldEncoding.LENGTH_DELIMITED, Foo.class, "type.googleapis.com/squareup.differentpackage.foo.Foo", Syntax.PROTO_2, null, "differentpackage/foo.proto"); } @Override public int encodedSize(Foo value) { int result = 0; result += Bar.Baz.Moo.ADAPTER.encodedSizeWithTag(1, value.moo); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, Foo value) throws IOException { Bar.Baz.Moo.ADAPTER.encodeWithTag(writer, 1, value.moo); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, Foo value) throws IOException { writer.writeBytes(value.unknownFields()); Bar.Baz.Moo.ADAPTER.encodeWithTag(writer, 1, value.moo); } @Override public Foo 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.moo(Bar.Baz.Moo.ADAPTER.decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public Foo redact(Foo value) { Builder builder = value.newBuilder(); if (builder.moo != null) builder.moo = Bar.Baz.Moo.ADAPTER.redact(builder.moo); builder.clearUnknownFields(); return builder.build(); } } }
7,013
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/differentpackage/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/differentpackage/protos/bar/Bar.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.differentpackage.bar.Bar in differentpackage/bar.proto package com.squareup.differentpackage.protos.bar; 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.Object; import java.lang.Override; import java.lang.String; import java.lang.StringBuilder; import okio.ByteString; public final class Bar extends Message<Bar, Bar.Builder> { public static final ProtoAdapter<Bar> ADAPTER = new ProtoAdapter_Bar(); private static final long serialVersionUID = 0L; public Bar() { this(ByteString.EMPTY); } public Bar(ByteString unknownFields) { super(ADAPTER, unknownFields); } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof Bar)) return false; Bar o = (Bar) other; return unknownFields().equals(o.unknownFields()); } @Override public int hashCode() { return unknownFields().hashCode(); } @Override public String toString() { StringBuilder builder = new StringBuilder(); return builder.replace(0, 2, "Bar{").append('}').toString(); } public static final class Builder extends Message.Builder<Bar, Builder> { public Builder() { } @Override public Bar build() { return new Bar(super.buildUnknownFields()); } } public static final class Baz extends Message<Baz, Baz.Builder> { public static final ProtoAdapter<Baz> ADAPTER = new ProtoAdapter_Baz(); private static final long serialVersionUID = 0L; public Baz() { this(ByteString.EMPTY); } public Baz(ByteString unknownFields) { super(ADAPTER, unknownFields); } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof Baz)) return false; Baz o = (Baz) other; return unknownFields().equals(o.unknownFields()); } @Override public int hashCode() { return unknownFields().hashCode(); } @Override public String toString() { StringBuilder builder = new StringBuilder(); return builder.replace(0, 2, "Baz{").append('}').toString(); } public static final class Builder extends Message.Builder<Baz, Builder> { public Builder() { } @Override public Baz build() { return new Baz(super.buildUnknownFields()); } } public static final class Moo extends Message<Moo, Moo.Builder> { public static final ProtoAdapter<Moo> ADAPTER = new ProtoAdapter_Moo(); private static final long serialVersionUID = 0L; public static final String DEFAULT_BOO = ""; @WireField( tag = 1, adapter = "com.squareup.wire.ProtoAdapter#STRING" ) public final String boo; public Moo(String boo) { this(boo, ByteString.EMPTY); } public Moo(String boo, ByteString unknownFields) { super(ADAPTER, unknownFields); this.boo = boo; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.boo = boo; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof Moo)) return false; Moo o = (Moo) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(boo, o.boo); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + (boo != null ? boo.hashCode() : 0); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (boo != null) builder.append(", boo=").append(Internal.sanitize(boo)); return builder.replace(0, 2, "Moo{").append('}').toString(); } public static final class Builder extends Message.Builder<Moo, Builder> { public String boo; public Builder() { } public Builder boo(String boo) { this.boo = boo; return this; } @Override public Moo build() { return new Moo(boo, super.buildUnknownFields()); } } private static final class ProtoAdapter_Moo extends ProtoAdapter<Moo> { public ProtoAdapter_Moo() { super(FieldEncoding.LENGTH_DELIMITED, Moo.class, "type.googleapis.com/squareup.differentpackage.bar.Bar.Baz.Moo", Syntax.PROTO_2, null, "differentpackage/bar.proto"); } @Override public int encodedSize(Moo value) { int result = 0; result += ProtoAdapter.STRING.encodedSizeWithTag(1, value.boo); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, Moo value) throws IOException { ProtoAdapter.STRING.encodeWithTag(writer, 1, value.boo); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, Moo value) throws IOException { writer.writeBytes(value.unknownFields()); ProtoAdapter.STRING.encodeWithTag(writer, 1, value.boo); } @Override public Moo 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.boo(ProtoAdapter.STRING.decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public Moo redact(Moo value) { Builder builder = value.newBuilder(); builder.clearUnknownFields(); return builder.build(); } } } private static final class ProtoAdapter_Baz extends ProtoAdapter<Baz> { public ProtoAdapter_Baz() { super(FieldEncoding.LENGTH_DELIMITED, Baz.class, "type.googleapis.com/squareup.differentpackage.bar.Bar.Baz", Syntax.PROTO_2, null, "differentpackage/bar.proto"); } @Override public int encodedSize(Baz value) { int result = 0; result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, Baz value) throws IOException { writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, Baz value) throws IOException { writer.writeBytes(value.unknownFields()); } @Override public Baz decode(ProtoReader reader) throws IOException { Builder builder = new Builder(); long token = reader.beginMessage(); for (int tag; (tag = reader.nextTag()) != -1;) { switch (tag) { default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public Baz redact(Baz value) { Builder builder = value.newBuilder(); builder.clearUnknownFields(); return builder.build(); } } } private static final class ProtoAdapter_Bar extends ProtoAdapter<Bar> { public ProtoAdapter_Bar() { super(FieldEncoding.LENGTH_DELIMITED, Bar.class, "type.googleapis.com/squareup.differentpackage.bar.Bar", Syntax.PROTO_2, null, "differentpackage/bar.proto"); } @Override public int encodedSize(Bar value) { int result = 0; result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, Bar value) throws IOException { writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, Bar value) throws IOException { writer.writeBytes(value.unknownFields()); } @Override public Bar decode(ProtoReader reader) throws IOException { Builder builder = new Builder(); long token = reader.beginMessage(); for (int tag; (tag = reader.nextTag()) != -1;) { switch (tag) { default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public Bar redact(Bar value) { Builder builder = value.newBuilder(); builder.clearUnknownFields(); return builder.build(); } } }
7,014
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/ModelEvaluation.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: com.squareup.wire.ModelEvaluation in recursive_map.proto package com.squareup.wire; import com.squareup.wire.internal.Internal; import java.io.IOException; import java.lang.Double; 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 ModelEvaluation extends Message<ModelEvaluation, ModelEvaluation.Builder> { public static final ProtoAdapter<ModelEvaluation> ADAPTER = new ProtoAdapter_ModelEvaluation(); private static final long serialVersionUID = 0L; public static final String DEFAULT_NAME = ""; public static final Double DEFAULT_SCORE = 0.0d; @WireField( tag = 1, adapter = "com.squareup.wire.ProtoAdapter#STRING" ) public final String name; @WireField( tag = 2, adapter = "com.squareup.wire.ProtoAdapter#DOUBLE" ) public final Double score; @WireField( tag = 3, keyAdapter = "com.squareup.wire.ProtoAdapter#STRING", adapter = "com.squareup.wire.ModelEvaluation#ADAPTER" ) public final Map<String, ModelEvaluation> models; public ModelEvaluation(String name, Double score, Map<String, ModelEvaluation> models) { this(name, score, models, ByteString.EMPTY); } public ModelEvaluation(String name, Double score, Map<String, ModelEvaluation> models, ByteString unknownFields) { super(ADAPTER, unknownFields); this.name = name; this.score = score; this.models = Internal.immutableCopyOf("models", models); } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.name = name; builder.score = score; builder.models = Internal.copyOf(models); builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof ModelEvaluation)) return false; ModelEvaluation o = (ModelEvaluation) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(name, o.name) && Internal.equals(score, o.score) && models.equals(o.models); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + (name != null ? name.hashCode() : 0); result = result * 37 + (score != null ? score.hashCode() : 0); result = result * 37 + models.hashCode(); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (name != null) builder.append(", name=").append(Internal.sanitize(name)); if (score != null) builder.append(", score=").append(score); if (!models.isEmpty()) builder.append(", models=").append(models); return builder.replace(0, 2, "ModelEvaluation{").append('}').toString(); } public static final class Builder extends Message.Builder<ModelEvaluation, Builder> { public String name; public Double score; public Map<String, ModelEvaluation> models; public Builder() { models = Internal.newMutableMap(); } public Builder name(String name) { this.name = name; return this; } public Builder score(Double score) { this.score = score; return this; } public Builder models(Map<String, ModelEvaluation> models) { Internal.checkElementsNotNull(models); this.models = models; return this; } @Override public ModelEvaluation build() { return new ModelEvaluation(name, score, models, super.buildUnknownFields()); } } private static final class ProtoAdapter_ModelEvaluation extends ProtoAdapter<ModelEvaluation> { private ProtoAdapter<Map<String, ModelEvaluation>> models; public ProtoAdapter_ModelEvaluation() { super(FieldEncoding.LENGTH_DELIMITED, ModelEvaluation.class, "type.googleapis.com/com.squareup.wire.ModelEvaluation", Syntax.PROTO_2, null, "recursive_map.proto"); } @Override public int encodedSize(ModelEvaluation value) { int result = 0; result += ProtoAdapter.STRING.encodedSizeWithTag(1, value.name); result += ProtoAdapter.DOUBLE.encodedSizeWithTag(2, value.score); result += modelsAdapter().encodedSizeWithTag(3, value.models); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, ModelEvaluation value) throws IOException { ProtoAdapter.STRING.encodeWithTag(writer, 1, value.name); ProtoAdapter.DOUBLE.encodeWithTag(writer, 2, value.score); modelsAdapter().encodeWithTag(writer, 3, value.models); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, ModelEvaluation value) throws IOException { writer.writeBytes(value.unknownFields()); modelsAdapter().encodeWithTag(writer, 3, value.models); ProtoAdapter.DOUBLE.encodeWithTag(writer, 2, value.score); ProtoAdapter.STRING.encodeWithTag(writer, 1, value.name); } @Override public ModelEvaluation 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.name(ProtoAdapter.STRING.decode(reader)); break; case 2: builder.score(ProtoAdapter.DOUBLE.decode(reader)); break; case 3: builder.models.putAll(modelsAdapter().decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public ModelEvaluation redact(ModelEvaluation value) { Builder builder = value.newBuilder(); Internal.redactElements(builder.models, ModelEvaluation.ADAPTER); builder.clearUnknownFields(); return builder.build(); } private ProtoAdapter<Map<String, ModelEvaluation>> modelsAdapter() { ProtoAdapter<Map<String, ModelEvaluation>> result = models; if (result == null) { result = ProtoAdapter.newMapAdapter(ProtoAdapter.STRING, ModelEvaluation.ADAPTER); models = result; } return result; } } }
7,015
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/RepeatedPackedAndMap.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.alltypes.RepeatedPackedAndMap in collection_types.proto package com.squareup.wire.protos; 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.Integer; import java.lang.Object; import java.lang.Override; import java.lang.String; import java.lang.StringBuilder; import java.util.List; import java.util.Map; import okio.ByteString; public final class RepeatedPackedAndMap extends Message<RepeatedPackedAndMap, RepeatedPackedAndMap.Builder> { public static final ProtoAdapter<RepeatedPackedAndMap> ADAPTER = new ProtoAdapter_RepeatedPackedAndMap(); private static final long serialVersionUID = 0L; @WireField( tag = 201, adapter = "com.squareup.wire.ProtoAdapter#INT32", label = WireField.Label.REPEATED ) public final List<Integer> rep_int32; @WireField( tag = 301, adapter = "com.squareup.wire.ProtoAdapter#INT32", label = WireField.Label.PACKED ) public final List<Integer> pack_int32; @WireField( tag = 401, keyAdapter = "com.squareup.wire.ProtoAdapter#INT32", adapter = "com.squareup.wire.ProtoAdapter#INT32" ) public final Map<Integer, Integer> map_int32_int32; public RepeatedPackedAndMap(List<Integer> rep_int32, List<Integer> pack_int32, Map<Integer, Integer> map_int32_int32) { this(rep_int32, pack_int32, map_int32_int32, ByteString.EMPTY); } public RepeatedPackedAndMap(List<Integer> rep_int32, List<Integer> pack_int32, Map<Integer, Integer> map_int32_int32, ByteString unknownFields) { super(ADAPTER, unknownFields); this.rep_int32 = Internal.immutableCopyOf("rep_int32", rep_int32); this.pack_int32 = Internal.immutableCopyOf("pack_int32", pack_int32); this.map_int32_int32 = Internal.immutableCopyOf("map_int32_int32", map_int32_int32); } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.rep_int32 = Internal.copyOf(rep_int32); builder.pack_int32 = Internal.copyOf(pack_int32); builder.map_int32_int32 = Internal.copyOf(map_int32_int32); builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof RepeatedPackedAndMap)) return false; RepeatedPackedAndMap o = (RepeatedPackedAndMap) other; return unknownFields().equals(o.unknownFields()) && rep_int32.equals(o.rep_int32) && pack_int32.equals(o.pack_int32) && map_int32_int32.equals(o.map_int32_int32); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + rep_int32.hashCode(); result = result * 37 + pack_int32.hashCode(); result = result * 37 + map_int32_int32.hashCode(); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (!rep_int32.isEmpty()) builder.append(", rep_int32=").append(rep_int32); if (!pack_int32.isEmpty()) builder.append(", pack_int32=").append(pack_int32); if (!map_int32_int32.isEmpty()) builder.append(", map_int32_int32=").append(map_int32_int32); return builder.replace(0, 2, "RepeatedPackedAndMap{").append('}').toString(); } public static final class Builder extends Message.Builder<RepeatedPackedAndMap, Builder> { public List<Integer> rep_int32; public List<Integer> pack_int32; public Map<Integer, Integer> map_int32_int32; public Builder() { rep_int32 = Internal.newMutableList(); pack_int32 = Internal.newMutableList(); map_int32_int32 = Internal.newMutableMap(); } public Builder rep_int32(List<Integer> rep_int32) { Internal.checkElementsNotNull(rep_int32); this.rep_int32 = rep_int32; return this; } public Builder pack_int32(List<Integer> pack_int32) { Internal.checkElementsNotNull(pack_int32); this.pack_int32 = pack_int32; return this; } public Builder map_int32_int32(Map<Integer, Integer> map_int32_int32) { Internal.checkElementsNotNull(map_int32_int32); this.map_int32_int32 = map_int32_int32; return this; } @Override public RepeatedPackedAndMap build() { return new RepeatedPackedAndMap(rep_int32, pack_int32, map_int32_int32, super.buildUnknownFields()); } } private static final class ProtoAdapter_RepeatedPackedAndMap extends ProtoAdapter<RepeatedPackedAndMap> { private ProtoAdapter<Map<Integer, Integer>> map_int32_int32; public ProtoAdapter_RepeatedPackedAndMap() { super(FieldEncoding.LENGTH_DELIMITED, RepeatedPackedAndMap.class, "type.googleapis.com/squareup.protos.alltypes.RepeatedPackedAndMap", Syntax.PROTO_2, null, "collection_types.proto"); } @Override public int encodedSize(RepeatedPackedAndMap value) { int result = 0; result += ProtoAdapter.INT32.asRepeated().encodedSizeWithTag(201, value.rep_int32); result += ProtoAdapter.INT32.asPacked().encodedSizeWithTag(301, value.pack_int32); result += map_int32_int32Adapter().encodedSizeWithTag(401, value.map_int32_int32); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, RepeatedPackedAndMap value) throws IOException { ProtoAdapter.INT32.asRepeated().encodeWithTag(writer, 201, value.rep_int32); ProtoAdapter.INT32.asPacked().encodeWithTag(writer, 301, value.pack_int32); map_int32_int32Adapter().encodeWithTag(writer, 401, value.map_int32_int32); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, RepeatedPackedAndMap value) throws IOException { writer.writeBytes(value.unknownFields()); map_int32_int32Adapter().encodeWithTag(writer, 401, value.map_int32_int32); ProtoAdapter.INT32.asPacked().encodeWithTag(writer, 301, value.pack_int32); ProtoAdapter.INT32.asRepeated().encodeWithTag(writer, 201, value.rep_int32); } @Override public RepeatedPackedAndMap decode(ProtoReader reader) throws IOException { Builder builder = new Builder(); long token = reader.beginMessage(); for (int tag; (tag = reader.nextTag()) != -1;) { switch (tag) { case 201: builder.rep_int32.add(ProtoAdapter.INT32.decode(reader)); break; case 301: builder.pack_int32.add(ProtoAdapter.INT32.decode(reader)); break; case 401: builder.map_int32_int32.putAll(map_int32_int32Adapter().decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public RepeatedPackedAndMap redact(RepeatedPackedAndMap value) { Builder builder = value.newBuilder(); builder.clearUnknownFields(); return builder.build(); } private ProtoAdapter<Map<Integer, Integer>> map_int32_int32Adapter() { ProtoAdapter<Map<Integer, Integer>> result = map_int32_int32; if (result == null) { result = ProtoAdapter.newMapAdapter(ProtoAdapter.INT32, ProtoAdapter.INT32); map_int32_int32 = result; } return result; } } }
7,016
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/ChildPackage.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.ChildPackage in child_pkg.proto package com.squareup.wire.protos; 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 com.squareup.wire.protos.foreign.ForeignEnum; import java.io.IOException; import java.lang.Object; import java.lang.Override; import java.lang.String; import java.lang.StringBuilder; import okio.ByteString; public final class ChildPackage extends Message<ChildPackage, ChildPackage.Builder> { public static final ProtoAdapter<ChildPackage> ADAPTER = new ProtoAdapter_ChildPackage(); private static final long serialVersionUID = 0L; public static final ForeignEnum DEFAULT_INNER_FOREIGN_ENUM = ForeignEnum.BAV; @WireField( tag = 1, adapter = "com.squareup.wire.protos.foreign.ForeignEnum#ADAPTER" ) public final ForeignEnum inner_foreign_enum; public ChildPackage(ForeignEnum inner_foreign_enum) { this(inner_foreign_enum, ByteString.EMPTY); } public ChildPackage(ForeignEnum inner_foreign_enum, ByteString unknownFields) { super(ADAPTER, unknownFields); this.inner_foreign_enum = inner_foreign_enum; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.inner_foreign_enum = inner_foreign_enum; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof ChildPackage)) return false; ChildPackage o = (ChildPackage) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(inner_foreign_enum, o.inner_foreign_enum); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + (inner_foreign_enum != null ? inner_foreign_enum.hashCode() : 0); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (inner_foreign_enum != null) builder.append(", inner_foreign_enum=").append(inner_foreign_enum); return builder.replace(0, 2, "ChildPackage{").append('}').toString(); } public static final class Builder extends Message.Builder<ChildPackage, Builder> { public ForeignEnum inner_foreign_enum; public Builder() { } public Builder inner_foreign_enum(ForeignEnum inner_foreign_enum) { this.inner_foreign_enum = inner_foreign_enum; return this; } @Override public ChildPackage build() { return new ChildPackage(inner_foreign_enum, super.buildUnknownFields()); } } private static final class ProtoAdapter_ChildPackage extends ProtoAdapter<ChildPackage> { public ProtoAdapter_ChildPackage() { super(FieldEncoding.LENGTH_DELIMITED, ChildPackage.class, "type.googleapis.com/squareup.protos.ChildPackage", Syntax.PROTO_2, null, "child_pkg.proto"); } @Override public int encodedSize(ChildPackage value) { int result = 0; result += ForeignEnum.ADAPTER.encodedSizeWithTag(1, value.inner_foreign_enum); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, ChildPackage value) throws IOException { ForeignEnum.ADAPTER.encodeWithTag(writer, 1, value.inner_foreign_enum); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, ChildPackage value) throws IOException { writer.writeBytes(value.unknownFields()); ForeignEnum.ADAPTER.encodeWithTag(writer, 1, value.inner_foreign_enum); } @Override public ChildPackage decode(ProtoReader reader) throws IOException { Builder builder = new Builder(); long token = reader.beginMessage(); for (int tag; (tag = reader.nextTag()) != -1;) { switch (tag) { case 1: { try { builder.inner_foreign_enum(ForeignEnum.ADAPTER.decode(reader)); } catch (ProtoAdapter.EnumConstantNotFoundException e) { builder.addUnknownField(tag, FieldEncoding.VARINT, (long) e.value); } break; } default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public ChildPackage redact(ChildPackage value) { Builder builder = value.newBuilder(); builder.clearUnknownFields(); return builder.build(); } } }
7,017
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/custom_options/MyFieldOptionTwoOption.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.custom_options.my_field_option_two in custom_options.proto package com.squareup.wire.protos.custom_options; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) public @interface MyFieldOptionTwoOption { float value(); }
7,018
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/custom_options/EnumOptionOption.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.custom_options.enum_option in custom_options.proto package com.squareup.wire.protos.custom_options; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * This is a reasonable option! Apply it to your available enum types. */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) public @interface EnumOptionOption { boolean value(); }
7,019
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/custom_options/MyFieldOptionSixOption.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.custom_options.my_field_option_six in custom_options.proto package com.squareup.wire.protos.custom_options; import java.lang.String; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) public @interface MyFieldOptionSixOption { String[] value(); }
7,020
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/custom_options/MyFieldOptionFiveOption.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.custom_options.my_field_option_five in custom_options.proto package com.squareup.wire.protos.custom_options; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) public @interface MyFieldOptionFiveOption { int[] value(); }
7,021
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/custom_options/MyMessageOptionFourOption.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.custom_options.my_message_option_four in custom_options.proto package com.squareup.wire.protos.custom_options; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) public @interface MyMessageOptionFourOption { FooBar.FooBarBazEnum value(); }
7,022
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/custom_options/MyMessageOptionSevenOption.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.custom_options.my_message_option_seven in custom_options.proto package com.squareup.wire.protos.custom_options; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * 50007 is taken. */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) public @interface MyMessageOptionSevenOption { int[] value(); }
7,023
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/custom_options/RepeatedEnumValueOptionOption.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.custom_options.repeated_enum_value_option in custom_options.proto package com.squareup.wire.protos.custom_options; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * 70002 is taken. */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) public @interface RepeatedEnumValueOptionOption { int[] value(); }
7,024
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/custom_options/RepeatedEnumValueOptionTwoOption.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.custom_options.repeated_enum_value_option_two in custom_options.proto package com.squareup.wire.protos.custom_options; import java.lang.String; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) public @interface RepeatedEnumValueOptionTwoOption { String[] value(); }
7,025
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/custom_options/MessageWithOptions.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.custom_options.MessageWithOptions in custom_options.proto package com.squareup.wire.protos.custom_options; 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.protos.foreign.ForeignEnum; import java.io.IOException; import java.lang.Object; import java.lang.Override; import java.lang.String; import java.lang.StringBuilder; import okio.ByteString; @MyMessageOptionTwoOption(91011.0f) @MyMessageOptionFourOption(FooBar.FooBarBazEnum.FOO) @MyMessageOptionSevenOption({ 33}) @MyMessageOptionEightOption({ "g", "h"}) @MyMessageOptionNineOption({ ForeignEnum.BAV}) public final class MessageWithOptions extends Message<MessageWithOptions, MessageWithOptions.Builder> { public static final ProtoAdapter<MessageWithOptions> ADAPTER = new ProtoAdapter_MessageWithOptions(); private static final long serialVersionUID = 0L; public MessageWithOptions() { this(ByteString.EMPTY); } public MessageWithOptions(ByteString unknownFields) { super(ADAPTER, unknownFields); } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof MessageWithOptions)) return false; MessageWithOptions o = (MessageWithOptions) other; return unknownFields().equals(o.unknownFields()); } @Override public int hashCode() { return unknownFields().hashCode(); } @Override public String toString() { StringBuilder builder = new StringBuilder(); return builder.replace(0, 2, "MessageWithOptions{").append('}').toString(); } public static final class Builder extends Message.Builder<MessageWithOptions, Builder> { public Builder() { } @Override public MessageWithOptions build() { return new MessageWithOptions(super.buildUnknownFields()); } } private static final class ProtoAdapter_MessageWithOptions extends ProtoAdapter<MessageWithOptions> { public ProtoAdapter_MessageWithOptions() { super(FieldEncoding.LENGTH_DELIMITED, MessageWithOptions.class, "type.googleapis.com/squareup.protos.custom_options.MessageWithOptions", Syntax.PROTO_2, null, "custom_options.proto"); } @Override public int encodedSize(MessageWithOptions value) { int result = 0; result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, MessageWithOptions value) throws IOException { writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, MessageWithOptions value) throws IOException { writer.writeBytes(value.unknownFields()); } @Override public MessageWithOptions decode(ProtoReader reader) throws IOException { Builder builder = new Builder(); long token = reader.beginMessage(); for (int tag; (tag = reader.nextTag()) != -1;) { switch (tag) { default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public MessageWithOptions redact(MessageWithOptions value) { Builder builder = value.newBuilder(); builder.clearUnknownFields(); return builder.build(); } } }
7,026
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/custom_options/RepeatedEnumValueOptionOneOption.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.custom_options.repeated_enum_value_option_one in custom_options.proto package com.squareup.wire.protos.custom_options; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * 70002 is taken. */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) public @interface RepeatedEnumValueOptionOneOption { int[] value(); }
7,027
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/custom_options/MyMessageOptionTwoOption.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.custom_options.my_message_option_two in custom_options.proto package com.squareup.wire.protos.custom_options; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) public @interface MyMessageOptionTwoOption { float value(); }
7,028
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/custom_options/MyFieldOptionThreeOption.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.custom_options.my_field_option_three in custom_options.proto package com.squareup.wire.protos.custom_options; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) public @interface MyFieldOptionThreeOption { FooBar.FooBarBazEnum value(); }
7,029
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/custom_options/ServiceOptionOneOption.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.custom_options.service_option_one in custom_options.proto package com.squareup.wire.protos.custom_options; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * This is a fluffy option! Apply it to your softest service types. */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) public @interface ServiceOptionOneOption { int value(); }
7,030
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/custom_options/MethodOptionOneOption.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.custom_options.method_option_one in custom_options.proto package com.squareup.wire.protos.custom_options; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * This is a shiny option! Apply it to your brightest methods. */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) public @interface MethodOptionOneOption { int value(); }
7,031
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/custom_options/MyMessageOptionNineOption.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.custom_options.my_message_option_nine in custom_options.proto package com.squareup.wire.protos.custom_options; import com.squareup.wire.protos.foreign.ForeignEnum; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) public @interface MyMessageOptionNineOption { ForeignEnum[] value(); }
7,032
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/custom_options/FooBar.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.custom_options.FooBar in custom_options.proto package com.squareup.wire.protos.custom_options; import com.squareup.wire.EnumAdapter; 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.WireEnum; import com.squareup.wire.WireField; import com.squareup.wire.internal.Internal; import com.squareup.wire.protos.foreign.ForeignEnum; import com.squareup.wire.protos.foreign.ForeignEnumValueOptionOption; import java.io.IOException; import java.lang.Double; import java.lang.Float; 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.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import java.util.Collections; import java.util.List; import okio.ByteString; public final class FooBar extends Message<FooBar, FooBar.Builder> { public static final ProtoAdapter<FooBar> ADAPTER = new ProtoAdapter_FooBar(); private static final long serialVersionUID = 0L; public static final Integer DEFAULT_FOO = 0; public static final String DEFAULT_BAR = ""; public static final Long DEFAULT_QUX = 0L; public static final Double DEFAULT_DAISY = 0.0d; public static final FooBarBazEnum DEFAULT_EXT = FooBarBazEnum.FOO; public static final String DEFAULT_MORE_STRING = ""; @MyFieldOptionOneOption(17) @WireField( tag = 1, adapter = "com.squareup.wire.ProtoAdapter#INT32" ) public final Integer foo; @MyFieldOptionTwoOption(33.5f) @WireField( tag = 2, adapter = "com.squareup.wire.ProtoAdapter#STRING" ) public final String bar; @MyFieldOptionThreeOption(FooBarBazEnum.BAR) @WireField( tag = 3, adapter = "com.squareup.wire.protos.custom_options.FooBar$Nested#ADAPTER" ) public final Nested baz; @MyFieldOptionOneOption(18) @MyFieldOptionTwoOption(34.5f) @MyFieldOptionFiveOption({ 3}) @MyFieldOptionSixOption({ "a", "b"}) @MyFieldOptionSevenOption({ ForeignEnum.BAV, ForeignEnum.BAX}) @WireField( tag = 4, adapter = "com.squareup.wire.ProtoAdapter#UINT64" ) public final Long qux; @MyFieldOptionTwoOption(99.9f) @WireField( tag = 5, adapter = "com.squareup.wire.ProtoAdapter#FLOAT", label = WireField.Label.REPEATED ) public final List<Float> fred; @WireField( tag = 6, adapter = "com.squareup.wire.ProtoAdapter#DOUBLE" ) public final Double daisy; @WireField( tag = 7, adapter = "com.squareup.wire.protos.custom_options.FooBar#ADAPTER", label = WireField.Label.REPEATED, redacted = true ) public final List<FooBar> nested; /** * Extension source: custom_options.proto */ @WireField( tag = 101, adapter = "com.squareup.wire.protos.custom_options.FooBar$FooBarBazEnum#ADAPTER" ) public final FooBarBazEnum ext; /** * Extension source: custom_options.proto */ @WireField( tag = 102, adapter = "com.squareup.wire.protos.custom_options.FooBar$FooBarBazEnum#ADAPTER", label = WireField.Label.REPEATED ) public final List<FooBarBazEnum> rep; /** * Extension source: custom_options.proto */ @WireField( tag = 150, adapter = "com.squareup.wire.ProtoAdapter#STRING" ) public final String more_string; public FooBar(Integer foo, String bar, Nested baz, Long qux, List<Float> fred, Double daisy, List<FooBar> nested, FooBarBazEnum ext, List<FooBarBazEnum> rep, String more_string) { this(foo, bar, baz, qux, fred, daisy, nested, ext, rep, more_string, ByteString.EMPTY); } public FooBar(Integer foo, String bar, Nested baz, Long qux, List<Float> fred, Double daisy, List<FooBar> nested, FooBarBazEnum ext, List<FooBarBazEnum> rep, String more_string, ByteString unknownFields) { super(ADAPTER, unknownFields); this.foo = foo; this.bar = bar; this.baz = baz; this.qux = qux; this.fred = Internal.immutableCopyOf("fred", fred); this.daisy = daisy; this.nested = Internal.immutableCopyOf("nested", nested); this.ext = ext; this.rep = Internal.immutableCopyOf("rep", rep); this.more_string = more_string; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.foo = foo; builder.bar = bar; builder.baz = baz; builder.qux = qux; builder.fred = Internal.copyOf(fred); builder.daisy = daisy; builder.nested = Internal.copyOf(nested); builder.ext = ext; builder.rep = Internal.copyOf(rep); builder.more_string = more_string; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof FooBar)) return false; FooBar o = (FooBar) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(foo, o.foo) && Internal.equals(bar, o.bar) && Internal.equals(baz, o.baz) && Internal.equals(qux, o.qux) && fred.equals(o.fred) && Internal.equals(daisy, o.daisy) && nested.equals(o.nested) && Internal.equals(ext, o.ext) && rep.equals(o.rep) && Internal.equals(more_string, o.more_string); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + (foo != null ? foo.hashCode() : 0); result = result * 37 + (bar != null ? bar.hashCode() : 0); result = result * 37 + (baz != null ? baz.hashCode() : 0); result = result * 37 + (qux != null ? qux.hashCode() : 0); result = result * 37 + fred.hashCode(); result = result * 37 + (daisy != null ? daisy.hashCode() : 0); result = result * 37 + nested.hashCode(); result = result * 37 + (ext != null ? ext.hashCode() : 0); result = result * 37 + rep.hashCode(); result = result * 37 + (more_string != null ? more_string.hashCode() : 0); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (foo != null) builder.append(", foo=").append(foo); if (bar != null) builder.append(", bar=").append(Internal.sanitize(bar)); if (baz != null) builder.append(", baz=").append(baz); if (qux != null) builder.append(", qux=").append(qux); if (!fred.isEmpty()) builder.append(", fred=").append(fred); if (daisy != null) builder.append(", daisy=").append(daisy); if (!nested.isEmpty()) builder.append(", nested=██"); if (ext != null) builder.append(", ext=").append(ext); if (!rep.isEmpty()) builder.append(", rep=").append(rep); if (more_string != null) builder.append(", more_string=").append(Internal.sanitize(more_string)); return builder.replace(0, 2, "FooBar{").append('}').toString(); } public static final class Builder extends Message.Builder<FooBar, Builder> { public Integer foo; public String bar; public Nested baz; public Long qux; public List<Float> fred; public Double daisy; public List<FooBar> nested; public FooBarBazEnum ext; public List<FooBarBazEnum> rep; public String more_string; public Builder() { fred = Internal.newMutableList(); nested = Internal.newMutableList(); rep = Internal.newMutableList(); } public Builder foo(Integer foo) { this.foo = foo; return this; } public Builder bar(String bar) { this.bar = bar; return this; } public Builder baz(Nested baz) { this.baz = baz; return this; } public Builder qux(Long qux) { this.qux = qux; return this; } public Builder fred(List<Float> fred) { Internal.checkElementsNotNull(fred); this.fred = fred; return this; } public Builder daisy(Double daisy) { this.daisy = daisy; return this; } public Builder nested(List<FooBar> nested) { Internal.checkElementsNotNull(nested); this.nested = nested; return this; } public Builder ext(FooBarBazEnum ext) { this.ext = ext; return this; } public Builder rep(List<FooBarBazEnum> rep) { Internal.checkElementsNotNull(rep); this.rep = rep; return this; } public Builder more_string(String more_string) { this.more_string = more_string; return this; } @Override public FooBar build() { return new FooBar(foo, bar, baz, qux, fred, daisy, nested, ext, rep, more_string, super.buildUnknownFields()); } } public static final class Nested extends Message<Nested, Nested.Builder> { public static final ProtoAdapter<Nested> ADAPTER = new ProtoAdapter_Nested(); private static final long serialVersionUID = 0L; public static final FooBarBazEnum DEFAULT_VALUE = FooBarBazEnum.FOO; @WireField( tag = 1, adapter = "com.squareup.wire.protos.custom_options.FooBar$FooBarBazEnum#ADAPTER" ) public final FooBarBazEnum value; public Nested(FooBarBazEnum value) { this(value, ByteString.EMPTY); } public Nested(FooBarBazEnum value, ByteString unknownFields) { super(ADAPTER, unknownFields); this.value = value; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.value = value; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof Nested)) return false; Nested o = (Nested) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(value, o.value); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + (value != null ? value.hashCode() : 0); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (value != null) builder.append(", value=").append(value); return builder.replace(0, 2, "Nested{").append('}').toString(); } public static final class Builder extends Message.Builder<Nested, Builder> { public FooBarBazEnum value; public Builder() { } public Builder value(FooBarBazEnum value) { this.value = value; return this; } @Override public Nested build() { return new Nested(value, super.buildUnknownFields()); } } private static final class ProtoAdapter_Nested extends ProtoAdapter<Nested> { public ProtoAdapter_Nested() { super(FieldEncoding.LENGTH_DELIMITED, Nested.class, "type.googleapis.com/squareup.protos.custom_options.FooBar.Nested", Syntax.PROTO_2, null, "custom_options.proto"); } @Override public int encodedSize(Nested value) { int result = 0; result += FooBarBazEnum.ADAPTER.encodedSizeWithTag(1, value.value); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, Nested value) throws IOException { FooBarBazEnum.ADAPTER.encodeWithTag(writer, 1, value.value); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, Nested value) throws IOException { writer.writeBytes(value.unknownFields()); FooBarBazEnum.ADAPTER.encodeWithTag(writer, 1, value.value); } @Override public Nested decode(ProtoReader reader) throws IOException { Builder builder = new Builder(); long token = reader.beginMessage(); for (int tag; (tag = reader.nextTag()) != -1;) { switch (tag) { case 1: { try { builder.value(FooBarBazEnum.ADAPTER.decode(reader)); } catch (ProtoAdapter.EnumConstantNotFoundException e) { builder.addUnknownField(tag, FieldEncoding.VARINT, (long) e.value); } break; } default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public Nested redact(Nested value) { Builder builder = value.newBuilder(); builder.clearUnknownFields(); return builder.build(); } } } public static final class More extends Message<More, More.Builder> { public static final ProtoAdapter<More> ADAPTER = new ProtoAdapter_More(); private static final long serialVersionUID = 0L; @WireField( tag = 1, adapter = "com.squareup.wire.ProtoAdapter#INT32", label = WireField.Label.REPEATED ) public final List<Integer> serial; public More(List<Integer> serial) { this(serial, ByteString.EMPTY); } public More(List<Integer> serial, ByteString unknownFields) { super(ADAPTER, unknownFields); this.serial = Internal.immutableCopyOf("serial", serial); } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.serial = Internal.copyOf(serial); builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof More)) return false; More o = (More) other; return unknownFields().equals(o.unknownFields()) && serial.equals(o.serial); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + serial.hashCode(); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (!serial.isEmpty()) builder.append(", serial=").append(serial); return builder.replace(0, 2, "More{").append('}').toString(); } public static final class Builder extends Message.Builder<More, Builder> { public List<Integer> serial; public Builder() { serial = Internal.newMutableList(); } public Builder serial(List<Integer> serial) { Internal.checkElementsNotNull(serial); this.serial = serial; return this; } @Override public More build() { return new More(serial, super.buildUnknownFields()); } } private static final class ProtoAdapter_More extends ProtoAdapter<More> { public ProtoAdapter_More() { super(FieldEncoding.LENGTH_DELIMITED, More.class, "type.googleapis.com/squareup.protos.custom_options.FooBar.More", Syntax.PROTO_2, null, "custom_options.proto"); } @Override public int encodedSize(More value) { int result = 0; result += ProtoAdapter.INT32.asRepeated().encodedSizeWithTag(1, value.serial); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, More value) throws IOException { ProtoAdapter.INT32.asRepeated().encodeWithTag(writer, 1, value.serial); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, More value) throws IOException { writer.writeBytes(value.unknownFields()); ProtoAdapter.INT32.asRepeated().encodeWithTag(writer, 1, value.serial); } @Override public More 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.serial.add(ProtoAdapter.INT32.decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public More redact(More value) { Builder builder = value.newBuilder(); builder.clearUnknownFields(); return builder.build(); } } } @EnumOptionOption(true) @FoobarStringOption("foobar") public enum FooBarBazEnum implements WireEnum { @EnumValueOptionOption(17) FOO(1), @ForeignEnumValueOptionOption(true) @RepeatedEnumValueOptionOneOption({ 3}) BAR(2), @EnumValueOptionOption(18) @ForeignEnumValueOptionOption(false) @RepeatedEnumValueOptionTwoOption({ "c", "d"}) BAZ(3); public static final ProtoAdapter<FooBarBazEnum> ADAPTER = new ProtoAdapter_FooBarBazEnum(); private final int value; FooBarBazEnum(int value) { this.value = value; } /** * Return the constant for {@code value} or null. */ public static FooBarBazEnum fromValue(int value) { switch (value) { case 1: return FOO; case 2: return BAR; case 3: return BAZ; default: return null; } } @Override public int getValue() { return value; } private static final class ProtoAdapter_FooBarBazEnum extends EnumAdapter<FooBarBazEnum> { ProtoAdapter_FooBarBazEnum() { super(FooBarBazEnum.class, Syntax.PROTO_2, null); } @Override protected FooBarBazEnum fromValue(int value) { return FooBarBazEnum.fromValue(value); } } } @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) public @interface FoobarStringOption { String value(); } private static final class ProtoAdapter_FooBar extends ProtoAdapter<FooBar> { public ProtoAdapter_FooBar() { super(FieldEncoding.LENGTH_DELIMITED, FooBar.class, "type.googleapis.com/squareup.protos.custom_options.FooBar", Syntax.PROTO_2, null, "custom_options.proto"); } @Override public int encodedSize(FooBar value) { int result = 0; result += ProtoAdapter.INT32.encodedSizeWithTag(1, value.foo); result += ProtoAdapter.STRING.encodedSizeWithTag(2, value.bar); result += Nested.ADAPTER.encodedSizeWithTag(3, value.baz); result += ProtoAdapter.UINT64.encodedSizeWithTag(4, value.qux); result += ProtoAdapter.FLOAT.asRepeated().encodedSizeWithTag(5, value.fred); result += ProtoAdapter.DOUBLE.encodedSizeWithTag(6, value.daisy); result += FooBar.ADAPTER.asRepeated().encodedSizeWithTag(7, value.nested); result += FooBarBazEnum.ADAPTER.encodedSizeWithTag(101, value.ext); result += FooBarBazEnum.ADAPTER.asRepeated().encodedSizeWithTag(102, value.rep); result += ProtoAdapter.STRING.encodedSizeWithTag(150, value.more_string); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, FooBar value) throws IOException { ProtoAdapter.INT32.encodeWithTag(writer, 1, value.foo); ProtoAdapter.STRING.encodeWithTag(writer, 2, value.bar); Nested.ADAPTER.encodeWithTag(writer, 3, value.baz); ProtoAdapter.UINT64.encodeWithTag(writer, 4, value.qux); ProtoAdapter.FLOAT.asRepeated().encodeWithTag(writer, 5, value.fred); ProtoAdapter.DOUBLE.encodeWithTag(writer, 6, value.daisy); FooBar.ADAPTER.asRepeated().encodeWithTag(writer, 7, value.nested); FooBarBazEnum.ADAPTER.encodeWithTag(writer, 101, value.ext); FooBarBazEnum.ADAPTER.asRepeated().encodeWithTag(writer, 102, value.rep); ProtoAdapter.STRING.encodeWithTag(writer, 150, value.more_string); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, FooBar value) throws IOException { writer.writeBytes(value.unknownFields()); ProtoAdapter.STRING.encodeWithTag(writer, 150, value.more_string); FooBarBazEnum.ADAPTER.asRepeated().encodeWithTag(writer, 102, value.rep); FooBarBazEnum.ADAPTER.encodeWithTag(writer, 101, value.ext); FooBar.ADAPTER.asRepeated().encodeWithTag(writer, 7, value.nested); ProtoAdapter.DOUBLE.encodeWithTag(writer, 6, value.daisy); ProtoAdapter.FLOAT.asRepeated().encodeWithTag(writer, 5, value.fred); ProtoAdapter.UINT64.encodeWithTag(writer, 4, value.qux); Nested.ADAPTER.encodeWithTag(writer, 3, value.baz); ProtoAdapter.STRING.encodeWithTag(writer, 2, value.bar); ProtoAdapter.INT32.encodeWithTag(writer, 1, value.foo); } @Override public FooBar 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.foo(ProtoAdapter.INT32.decode(reader)); break; case 2: builder.bar(ProtoAdapter.STRING.decode(reader)); break; case 3: builder.baz(Nested.ADAPTER.decode(reader)); break; case 4: builder.qux(ProtoAdapter.UINT64.decode(reader)); break; case 5: builder.fred.add(ProtoAdapter.FLOAT.decode(reader)); break; case 6: builder.daisy(ProtoAdapter.DOUBLE.decode(reader)); break; case 7: builder.nested.add(FooBar.ADAPTER.decode(reader)); break; case 101: { try { builder.ext(FooBarBazEnum.ADAPTER.decode(reader)); } catch (ProtoAdapter.EnumConstantNotFoundException e) { builder.addUnknownField(tag, FieldEncoding.VARINT, (long) e.value); } break; } case 102: { try { builder.rep.add(FooBarBazEnum.ADAPTER.decode(reader)); } catch (ProtoAdapter.EnumConstantNotFoundException e) { builder.addUnknownField(tag, FieldEncoding.VARINT, (long) e.value); } break; } case 150: builder.more_string(ProtoAdapter.STRING.decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public FooBar redact(FooBar value) { Builder builder = value.newBuilder(); if (builder.baz != null) builder.baz = Nested.ADAPTER.redact(builder.baz); builder.nested = Collections.emptyList(); builder.clearUnknownFields(); return builder.build(); } } }
7,033
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/custom_options/MyMessageOptionEightOption.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.custom_options.my_message_option_eight in custom_options.proto package com.squareup.wire.protos.custom_options; import java.lang.String; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) public @interface MyMessageOptionEightOption { String[] value(); }
7,034
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/custom_options/EnumValueOptionOption.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.custom_options.enum_value_option in custom_options.proto package com.squareup.wire.protos.custom_options; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * This is a nice option! Apply it to your friendly enum constants. */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) public @interface EnumValueOptionOption { int value(); }
7,035
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/custom_options/MyFieldOptionSevenOption.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.custom_options.my_field_option_seven in custom_options.proto package com.squareup.wire.protos.custom_options; import com.squareup.wire.protos.foreign.ForeignEnum; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) public @interface MyFieldOptionSevenOption { ForeignEnum[] value(); }
7,036
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/custom_options/MyFieldOptionOneOption.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.custom_options.my_field_option_one in custom_options.proto package com.squareup.wire.protos.custom_options; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * This is a superb option! Apply it to your greatest fields. */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) public @interface MyFieldOptionOneOption { int value(); }
7,037
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/roots/TheRequest.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.wire.protos.roots.TheRequest in service_root.proto package com.squareup.wire.protos.roots; 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 java.io.IOException; import java.lang.Object; import java.lang.Override; import java.lang.String; import java.lang.StringBuilder; import okio.ByteString; public final class TheRequest extends Message<TheRequest, TheRequest.Builder> { public static final ProtoAdapter<TheRequest> ADAPTER = new ProtoAdapter_TheRequest(); private static final long serialVersionUID = 0L; public TheRequest() { this(ByteString.EMPTY); } public TheRequest(ByteString unknownFields) { super(ADAPTER, unknownFields); } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof TheRequest)) return false; TheRequest o = (TheRequest) other; return unknownFields().equals(o.unknownFields()); } @Override public int hashCode() { return unknownFields().hashCode(); } @Override public String toString() { StringBuilder builder = new StringBuilder(); return builder.replace(0, 2, "TheRequest{").append('}').toString(); } public static final class Builder extends Message.Builder<TheRequest, Builder> { public Builder() { } @Override public TheRequest build() { return new TheRequest(super.buildUnknownFields()); } } private static final class ProtoAdapter_TheRequest extends ProtoAdapter<TheRequest> { public ProtoAdapter_TheRequest() { super(FieldEncoding.LENGTH_DELIMITED, TheRequest.class, "type.googleapis.com/squareup.wire.protos.roots.TheRequest", Syntax.PROTO_2, null, "service_root.proto"); } @Override public int encodedSize(TheRequest value) { int result = 0; result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, TheRequest value) throws IOException { writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, TheRequest value) throws IOException { writer.writeBytes(value.unknownFields()); } @Override public TheRequest decode(ProtoReader reader) throws IOException { Builder builder = new Builder(); long token = reader.beginMessage(); for (int tag; (tag = reader.nextTag()) != -1;) { switch (tag) { default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public TheRequest redact(TheRequest value) { Builder builder = value.newBuilder(); builder.clearUnknownFields(); return builder.build(); } } }
7,038
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/roots/B.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.roots.B in roots.proto package com.squareup.wire.protos.roots; 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.Object; import java.lang.Override; import java.lang.String; import java.lang.StringBuilder; import okio.ByteString; public final class B extends Message<B, B.Builder> { public static final ProtoAdapter<B> ADAPTER = new ProtoAdapter_B(); private static final long serialVersionUID = 0L; @WireField( tag = 1, adapter = "com.squareup.wire.protos.roots.C#ADAPTER", label = WireField.Label.REQUIRED ) public final C c; public B(C c) { this(c, ByteString.EMPTY); } public B(C c, ByteString unknownFields) { super(ADAPTER, unknownFields); this.c = c; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.c = c; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof B)) return false; B o = (B) other; return unknownFields().equals(o.unknownFields()) && c.equals(o.c); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + c.hashCode(); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append(", c=").append(c); return builder.replace(0, 2, "B{").append('}').toString(); } public static final class Builder extends Message.Builder<B, Builder> { public C c; public Builder() { } public Builder c(C c) { this.c = c; return this; } @Override public B build() { if (c == null) { throw Internal.missingRequiredFields(c, "c"); } return new B(c, super.buildUnknownFields()); } } private static final class ProtoAdapter_B extends ProtoAdapter<B> { public ProtoAdapter_B() { super(FieldEncoding.LENGTH_DELIMITED, B.class, "type.googleapis.com/squareup.protos.roots.B", Syntax.PROTO_2, null, "roots.proto"); } @Override public int encodedSize(B value) { int result = 0; result += C.ADAPTER.encodedSizeWithTag(1, value.c); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, B value) throws IOException { C.ADAPTER.encodeWithTag(writer, 1, value.c); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, B value) throws IOException { writer.writeBytes(value.unknownFields()); C.ADAPTER.encodeWithTag(writer, 1, value.c); } @Override public B 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.c(C.ADAPTER.decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public B redact(B value) { Builder builder = value.newBuilder(); builder.c = C.ADAPTER.redact(builder.c); builder.clearUnknownFields(); return builder.build(); } } }
7,039
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/roots/C.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.roots.C in roots.proto package com.squareup.wire.protos.roots; 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.Integer; import java.lang.Object; import java.lang.Override; import java.lang.String; import java.lang.StringBuilder; import okio.ByteString; public final class C extends Message<C, C.Builder> { public static final ProtoAdapter<C> ADAPTER = new ProtoAdapter_C(); private static final long serialVersionUID = 0L; public static final Integer DEFAULT_I = 0; @WireField( tag = 1, adapter = "com.squareup.wire.ProtoAdapter#INT32" ) public final Integer i; public C(Integer i) { this(i, ByteString.EMPTY); } public C(Integer i, ByteString unknownFields) { super(ADAPTER, unknownFields); this.i = i; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.i = i; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof C)) return false; C o = (C) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(i, o.i); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + (i != null ? i.hashCode() : 0); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (i != null) builder.append(", i=").append(i); return builder.replace(0, 2, "C{").append('}').toString(); } public static final class Builder extends Message.Builder<C, Builder> { public Integer i; public Builder() { } public Builder i(Integer i) { this.i = i; return this; } @Override public C build() { return new C(i, super.buildUnknownFields()); } } private static final class ProtoAdapter_C extends ProtoAdapter<C> { public ProtoAdapter_C() { super(FieldEncoding.LENGTH_DELIMITED, C.class, "type.googleapis.com/squareup.protos.roots.C", Syntax.PROTO_2, null, "roots.proto"); } @Override public int encodedSize(C value) { int result = 0; result += ProtoAdapter.INT32.encodedSizeWithTag(1, value.i); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, C value) throws IOException { ProtoAdapter.INT32.encodeWithTag(writer, 1, value.i); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, C value) throws IOException { writer.writeBytes(value.unknownFields()); ProtoAdapter.INT32.encodeWithTag(writer, 1, value.i); } @Override public C 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.i(ProtoAdapter.INT32.decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public C redact(C value) { Builder builder = value.newBuilder(); builder.clearUnknownFields(); return builder.build(); } } }
7,040
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/roots/H.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.roots.H in roots.proto package com.squareup.wire.protos.roots; 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.Object; import java.lang.Override; import java.lang.String; import java.lang.StringBuilder; import okio.ByteString; public final class H extends Message<H, H.Builder> { public static final ProtoAdapter<H> ADAPTER = new ProtoAdapter_H(); private static final long serialVersionUID = 0L; @WireField( tag = 1, adapter = "com.squareup.wire.protos.roots.E$F#ADAPTER" ) public final E.F ef; public H(E.F ef) { this(ef, ByteString.EMPTY); } public H(E.F ef, ByteString unknownFields) { super(ADAPTER, unknownFields); this.ef = ef; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.ef = ef; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof H)) return false; H o = (H) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(ef, o.ef); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + (ef != null ? ef.hashCode() : 0); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (ef != null) builder.append(", ef=").append(ef); return builder.replace(0, 2, "H{").append('}').toString(); } public static final class Builder extends Message.Builder<H, Builder> { public E.F ef; public Builder() { } public Builder ef(E.F ef) { this.ef = ef; return this; } @Override public H build() { return new H(ef, super.buildUnknownFields()); } } private static final class ProtoAdapter_H extends ProtoAdapter<H> { public ProtoAdapter_H() { super(FieldEncoding.LENGTH_DELIMITED, H.class, "type.googleapis.com/squareup.protos.roots.H", Syntax.PROTO_2, null, "roots.proto"); } @Override public int encodedSize(H value) { int result = 0; result += E.F.ADAPTER.encodedSizeWithTag(1, value.ef); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, H value) throws IOException { E.F.ADAPTER.encodeWithTag(writer, 1, value.ef); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, H value) throws IOException { writer.writeBytes(value.unknownFields()); E.F.ADAPTER.encodeWithTag(writer, 1, value.ef); } @Override public H 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.ef(E.F.ADAPTER.decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public H redact(H value) { Builder builder = value.newBuilder(); if (builder.ef != null) builder.ef = E.F.ADAPTER.redact(builder.ef); builder.clearUnknownFields(); return builder.build(); } } }
7,041
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/roots/D.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.roots.D in roots.proto package com.squareup.wire.protos.roots; 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.Integer; import java.lang.Object; import java.lang.Override; import java.lang.String; import java.lang.StringBuilder; import okio.ByteString; public final class D extends Message<D, D.Builder> { public static final ProtoAdapter<D> ADAPTER = new ProtoAdapter_D(); private static final long serialVersionUID = 0L; public static final Integer DEFAULT_I = 0; @WireField( tag = 1, adapter = "com.squareup.wire.ProtoAdapter#INT32" ) public final Integer i; public D(Integer i) { this(i, ByteString.EMPTY); } public D(Integer i, ByteString unknownFields) { super(ADAPTER, unknownFields); this.i = i; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.i = i; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof D)) return false; D o = (D) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(i, o.i); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + (i != null ? i.hashCode() : 0); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (i != null) builder.append(", i=").append(i); return builder.replace(0, 2, "D{").append('}').toString(); } public static final class Builder extends Message.Builder<D, Builder> { public Integer i; public Builder() { } public Builder i(Integer i) { this.i = i; return this; } @Override public D build() { return new D(i, super.buildUnknownFields()); } } private static final class ProtoAdapter_D extends ProtoAdapter<D> { public ProtoAdapter_D() { super(FieldEncoding.LENGTH_DELIMITED, D.class, "type.googleapis.com/squareup.protos.roots.D", Syntax.PROTO_2, null, "roots.proto"); } @Override public int encodedSize(D value) { int result = 0; result += ProtoAdapter.INT32.encodedSizeWithTag(1, value.i); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, D value) throws IOException { ProtoAdapter.INT32.encodeWithTag(writer, 1, value.i); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, D value) throws IOException { writer.writeBytes(value.unknownFields()); ProtoAdapter.INT32.encodeWithTag(writer, 1, value.i); } @Override public D 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.i(ProtoAdapter.INT32.decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public D redact(D value) { Builder builder = value.newBuilder(); builder.clearUnknownFields(); return builder.build(); } } }
7,042
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/roots/E.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.roots.E in roots.proto package com.squareup.wire.protos.roots; 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.Integer; import java.lang.Object; import java.lang.Override; import java.lang.String; import java.lang.StringBuilder; import okio.ByteString; public final class E extends Message<E, E.Builder> { public static final ProtoAdapter<E> ADAPTER = new ProtoAdapter_E(); private static final long serialVersionUID = 0L; public static final G DEFAULT_G = G.FOO; @WireField( tag = 1, adapter = "com.squareup.wire.protos.roots.E$F#ADAPTER" ) public final F f; @WireField( tag = 2, adapter = "com.squareup.wire.protos.roots.G#ADAPTER" ) public final G g; public E(F f, G g) { this(f, g, ByteString.EMPTY); } public E(F f, G g, ByteString unknownFields) { super(ADAPTER, unknownFields); this.f = f; this.g = g; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.f = f; builder.g = g; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof E)) return false; E o = (E) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(f, o.f) && Internal.equals(g, o.g); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + (f != null ? f.hashCode() : 0); result = result * 37 + (g != null ? g.hashCode() : 0); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (f != null) builder.append(", f=").append(f); if (g != null) builder.append(", g=").append(g); return builder.replace(0, 2, "E{").append('}').toString(); } public static final class Builder extends Message.Builder<E, Builder> { public F f; public G g; public Builder() { } public Builder f(F f) { this.f = f; return this; } public Builder g(G g) { this.g = g; return this; } @Override public E build() { return new E(f, g, super.buildUnknownFields()); } } public static final class F extends Message<F, F.Builder> { public static final ProtoAdapter<F> ADAPTER = new ProtoAdapter_F(); private static final long serialVersionUID = 0L; public static final Integer DEFAULT_I = 0; @WireField( tag = 1, adapter = "com.squareup.wire.ProtoAdapter#INT32" ) public final Integer i; public F(Integer i) { this(i, ByteString.EMPTY); } public F(Integer i, ByteString unknownFields) { super(ADAPTER, unknownFields); this.i = i; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.i = i; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof F)) return false; F o = (F) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(i, o.i); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + (i != null ? i.hashCode() : 0); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (i != null) builder.append(", i=").append(i); return builder.replace(0, 2, "F{").append('}').toString(); } public static final class Builder extends Message.Builder<F, Builder> { public Integer i; public Builder() { } public Builder i(Integer i) { this.i = i; return this; } @Override public F build() { return new F(i, super.buildUnknownFields()); } } private static final class ProtoAdapter_F extends ProtoAdapter<F> { public ProtoAdapter_F() { super(FieldEncoding.LENGTH_DELIMITED, F.class, "type.googleapis.com/squareup.protos.roots.E.F", Syntax.PROTO_2, null, "roots.proto"); } @Override public int encodedSize(F value) { int result = 0; result += ProtoAdapter.INT32.encodedSizeWithTag(1, value.i); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, F value) throws IOException { ProtoAdapter.INT32.encodeWithTag(writer, 1, value.i); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, F value) throws IOException { writer.writeBytes(value.unknownFields()); ProtoAdapter.INT32.encodeWithTag(writer, 1, value.i); } @Override public F 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.i(ProtoAdapter.INT32.decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public F redact(F value) { Builder builder = value.newBuilder(); builder.clearUnknownFields(); return builder.build(); } } } private static final class ProtoAdapter_E extends ProtoAdapter<E> { public ProtoAdapter_E() { super(FieldEncoding.LENGTH_DELIMITED, E.class, "type.googleapis.com/squareup.protos.roots.E", Syntax.PROTO_2, null, "roots.proto"); } @Override public int encodedSize(E value) { int result = 0; result += F.ADAPTER.encodedSizeWithTag(1, value.f); result += G.ADAPTER.encodedSizeWithTag(2, value.g); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, E value) throws IOException { F.ADAPTER.encodeWithTag(writer, 1, value.f); G.ADAPTER.encodeWithTag(writer, 2, value.g); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, E value) throws IOException { writer.writeBytes(value.unknownFields()); G.ADAPTER.encodeWithTag(writer, 2, value.g); F.ADAPTER.encodeWithTag(writer, 1, value.f); } @Override public E 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.f(F.ADAPTER.decode(reader)); break; case 2: { try { builder.g(G.ADAPTER.decode(reader)); } catch (ProtoAdapter.EnumConstantNotFoundException e) { builder.addUnknownField(tag, FieldEncoding.VARINT, (long) e.value); } break; } default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public E redact(E value) { Builder builder = value.newBuilder(); if (builder.f != null) builder.f = F.ADAPTER.redact(builder.f); builder.clearUnknownFields(); return builder.build(); } } }
7,043
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/roots/I.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.roots.I in roots.proto package com.squareup.wire.protos.roots; 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.Integer; import java.lang.Object; import java.lang.Override; import java.lang.String; import java.lang.StringBuilder; import okio.ByteString; public final class I extends Message<I, I.Builder> { public static final ProtoAdapter<I> ADAPTER = new ProtoAdapter_I(); private static final long serialVersionUID = 0L; public static final Integer DEFAULT_I = 0; @WireField( tag = 1, adapter = "com.squareup.wire.ProtoAdapter#INT32" ) public final Integer i; /** * Extension source: roots.proto */ @WireField( tag = 1000, adapter = "com.squareup.wire.protos.roots.J#ADAPTER" ) public final J j; public I(Integer i, J j) { this(i, j, ByteString.EMPTY); } public I(Integer i, J j, ByteString unknownFields) { super(ADAPTER, unknownFields); this.i = i; this.j = j; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.i = i; builder.j = j; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof I)) return false; I o = (I) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(i, o.i) && Internal.equals(j, o.j); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + (i != null ? i.hashCode() : 0); result = result * 37 + (j != null ? j.hashCode() : 0); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (i != null) builder.append(", i=").append(i); if (j != null) builder.append(", j=").append(j); return builder.replace(0, 2, "I{").append('}').toString(); } public static final class Builder extends Message.Builder<I, Builder> { public Integer i; public J j; public Builder() { } public Builder i(Integer i) { this.i = i; return this; } public Builder j(J j) { this.j = j; return this; } @Override public I build() { return new I(i, j, super.buildUnknownFields()); } } private static final class ProtoAdapter_I extends ProtoAdapter<I> { public ProtoAdapter_I() { super(FieldEncoding.LENGTH_DELIMITED, I.class, "type.googleapis.com/squareup.protos.roots.I", Syntax.PROTO_2, null, "roots.proto"); } @Override public int encodedSize(I value) { int result = 0; result += ProtoAdapter.INT32.encodedSizeWithTag(1, value.i); result += J.ADAPTER.encodedSizeWithTag(1000, value.j); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, I value) throws IOException { ProtoAdapter.INT32.encodeWithTag(writer, 1, value.i); J.ADAPTER.encodeWithTag(writer, 1000, value.j); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, I value) throws IOException { writer.writeBytes(value.unknownFields()); J.ADAPTER.encodeWithTag(writer, 1000, value.j); ProtoAdapter.INT32.encodeWithTag(writer, 1, value.i); } @Override public I 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.i(ProtoAdapter.INT32.decode(reader)); break; case 1000: builder.j(J.ADAPTER.decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public I redact(I value) { Builder builder = value.newBuilder(); if (builder.j != null) builder.j = J.ADAPTER.redact(builder.j); builder.clearUnknownFields(); return builder.build(); } } }
7,044
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/roots/TheResponse.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.wire.protos.roots.TheResponse in service_root.proto package com.squareup.wire.protos.roots; 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 java.io.IOException; import java.lang.Object; import java.lang.Override; import java.lang.String; import java.lang.StringBuilder; import okio.ByteString; public final class TheResponse extends Message<TheResponse, TheResponse.Builder> { public static final ProtoAdapter<TheResponse> ADAPTER = new ProtoAdapter_TheResponse(); private static final long serialVersionUID = 0L; public TheResponse() { this(ByteString.EMPTY); } public TheResponse(ByteString unknownFields) { super(ADAPTER, unknownFields); } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof TheResponse)) return false; TheResponse o = (TheResponse) other; return unknownFields().equals(o.unknownFields()); } @Override public int hashCode() { return unknownFields().hashCode(); } @Override public String toString() { StringBuilder builder = new StringBuilder(); return builder.replace(0, 2, "TheResponse{").append('}').toString(); } public static final class Builder extends Message.Builder<TheResponse, Builder> { public Builder() { } @Override public TheResponse build() { return new TheResponse(super.buildUnknownFields()); } } private static final class ProtoAdapter_TheResponse extends ProtoAdapter<TheResponse> { public ProtoAdapter_TheResponse() { super(FieldEncoding.LENGTH_DELIMITED, TheResponse.class, "type.googleapis.com/squareup.wire.protos.roots.TheResponse", Syntax.PROTO_2, null, "service_root.proto"); } @Override public int encodedSize(TheResponse value) { int result = 0; result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, TheResponse value) throws IOException { writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, TheResponse value) throws IOException { writer.writeBytes(value.unknownFields()); } @Override public TheResponse decode(ProtoReader reader) throws IOException { Builder builder = new Builder(); long token = reader.beginMessage(); for (int tag; (tag = reader.nextTag()) != -1;) { switch (tag) { default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public TheResponse redact(TheResponse value) { Builder builder = value.newBuilder(); builder.clearUnknownFields(); return builder.build(); } } }
7,045
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/roots/J.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.roots.J in roots.proto package com.squareup.wire.protos.roots; 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.Object; import java.lang.Override; import java.lang.String; import java.lang.StringBuilder; import okio.ByteString; public final class J extends Message<J, J.Builder> { public static final ProtoAdapter<J> ADAPTER = new ProtoAdapter_J(); private static final long serialVersionUID = 0L; @WireField( tag = 1, adapter = "com.squareup.wire.protos.roots.K#ADAPTER" ) public final K k; public J(K k) { this(k, ByteString.EMPTY); } public J(K k, ByteString unknownFields) { super(ADAPTER, unknownFields); this.k = k; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.k = k; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof J)) return false; J o = (J) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(k, o.k); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + (k != null ? k.hashCode() : 0); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (k != null) builder.append(", k=").append(k); return builder.replace(0, 2, "J{").append('}').toString(); } public static final class Builder extends Message.Builder<J, Builder> { public K k; public Builder() { } public Builder k(K k) { this.k = k; return this; } @Override public J build() { return new J(k, super.buildUnknownFields()); } } private static final class ProtoAdapter_J extends ProtoAdapter<J> { public ProtoAdapter_J() { super(FieldEncoding.LENGTH_DELIMITED, J.class, "type.googleapis.com/squareup.protos.roots.J", Syntax.PROTO_2, null, "roots.proto"); } @Override public int encodedSize(J value) { int result = 0; result += K.ADAPTER.encodedSizeWithTag(1, value.k); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, J value) throws IOException { K.ADAPTER.encodeWithTag(writer, 1, value.k); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, J value) throws IOException { writer.writeBytes(value.unknownFields()); K.ADAPTER.encodeWithTag(writer, 1, value.k); } @Override public J 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.k(K.ADAPTER.decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public J redact(J value) { Builder builder = value.newBuilder(); if (builder.k != null) builder.k = K.ADAPTER.redact(builder.k); builder.clearUnknownFields(); return builder.build(); } } }
7,046
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/roots/G.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.roots.G in roots.proto package com.squareup.wire.protos.roots; import com.squareup.wire.EnumAdapter; import com.squareup.wire.ProtoAdapter; import com.squareup.wire.Syntax; import com.squareup.wire.WireEnum; import java.lang.Override; public enum G implements WireEnum { FOO(1), BAR(2); public static final ProtoAdapter<G> ADAPTER = new ProtoAdapter_G(); private final int value; G(int value) { this.value = value; } /** * Return the constant for {@code value} or null. */ public static G fromValue(int value) { switch (value) { case 1: return FOO; case 2: return BAR; default: return null; } } @Override public int getValue() { return value; } private static final class ProtoAdapter_G extends EnumAdapter<G> { ProtoAdapter_G() { super(G.class, Syntax.PROTO_2, null); } @Override protected G fromValue(int value) { return G.fromValue(value); } } }
7,047
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/roots/K.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.roots.K in roots.proto package com.squareup.wire.protos.roots; 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.Integer; import java.lang.Object; import java.lang.Override; import java.lang.String; import java.lang.StringBuilder; import okio.ByteString; public final class K extends Message<K, K.Builder> { public static final ProtoAdapter<K> ADAPTER = new ProtoAdapter_K(); private static final long serialVersionUID = 0L; public static final Integer DEFAULT_I = 0; @WireField( tag = 1, adapter = "com.squareup.wire.ProtoAdapter#INT32" ) public final Integer i; public K(Integer i) { this(i, ByteString.EMPTY); } public K(Integer i, ByteString unknownFields) { super(ADAPTER, unknownFields); this.i = i; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.i = i; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof K)) return false; K o = (K) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(i, o.i); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + (i != null ? i.hashCode() : 0); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (i != null) builder.append(", i=").append(i); return builder.replace(0, 2, "K{").append('}').toString(); } public static final class Builder extends Message.Builder<K, Builder> { public Integer i; public Builder() { } public Builder i(Integer i) { this.i = i; return this; } @Override public K build() { return new K(i, super.buildUnknownFields()); } } private static final class ProtoAdapter_K extends ProtoAdapter<K> { public ProtoAdapter_K() { super(FieldEncoding.LENGTH_DELIMITED, K.class, "type.googleapis.com/squareup.protos.roots.K", Syntax.PROTO_2, null, "roots.proto"); } @Override public int encodedSize(K value) { int result = 0; result += ProtoAdapter.INT32.encodedSizeWithTag(1, value.i); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, K value) throws IOException { ProtoAdapter.INT32.encodeWithTag(writer, 1, value.i); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, K value) throws IOException { writer.writeBytes(value.unknownFields()); ProtoAdapter.INT32.encodeWithTag(writer, 1, value.i); } @Override public K 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.i(ProtoAdapter.INT32.decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public K redact(K value) { Builder builder = value.newBuilder(); builder.clearUnknownFields(); return builder.build(); } } }
7,048
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/roots/UnnecessaryResponse.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.wire.protos.roots.UnnecessaryResponse in service_root.proto package com.squareup.wire.protos.roots; 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 java.io.IOException; import java.lang.Object; import java.lang.Override; import java.lang.String; import java.lang.StringBuilder; import okio.ByteString; public final class UnnecessaryResponse extends Message<UnnecessaryResponse, UnnecessaryResponse.Builder> { public static final ProtoAdapter<UnnecessaryResponse> ADAPTER = new ProtoAdapter_UnnecessaryResponse(); private static final long serialVersionUID = 0L; public UnnecessaryResponse() { this(ByteString.EMPTY); } public UnnecessaryResponse(ByteString unknownFields) { super(ADAPTER, unknownFields); } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof UnnecessaryResponse)) return false; UnnecessaryResponse o = (UnnecessaryResponse) other; return unknownFields().equals(o.unknownFields()); } @Override public int hashCode() { return unknownFields().hashCode(); } @Override public String toString() { StringBuilder builder = new StringBuilder(); return builder.replace(0, 2, "UnnecessaryResponse{").append('}').toString(); } public static final class Builder extends Message.Builder<UnnecessaryResponse, Builder> { public Builder() { } @Override public UnnecessaryResponse build() { return new UnnecessaryResponse(super.buildUnknownFields()); } } private static final class ProtoAdapter_UnnecessaryResponse extends ProtoAdapter<UnnecessaryResponse> { public ProtoAdapter_UnnecessaryResponse() { super(FieldEncoding.LENGTH_DELIMITED, UnnecessaryResponse.class, "type.googleapis.com/squareup.wire.protos.roots.UnnecessaryResponse", Syntax.PROTO_2, null, "service_root.proto"); } @Override public int encodedSize(UnnecessaryResponse value) { int result = 0; result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, UnnecessaryResponse value) throws IOException { writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, UnnecessaryResponse value) throws IOException { writer.writeBytes(value.unknownFields()); } @Override public UnnecessaryResponse decode(ProtoReader reader) throws IOException { Builder builder = new Builder(); long token = reader.beginMessage(); for (int tag; (tag = reader.nextTag()) != -1;) { switch (tag) { default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public UnnecessaryResponse redact(UnnecessaryResponse value) { Builder builder = value.newBuilder(); builder.clearUnknownFields(); return builder.build(); } } }
7,049
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/roots/A.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.roots.A in roots.proto package com.squareup.wire.protos.roots; 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.Object; import java.lang.Override; import java.lang.String; import java.lang.StringBuilder; import okio.ByteString; /** * Used to test --includes flag of WireCompiler * * A -> B -> C * \ * -> D * * E -> E.F * \ * -> G * * H -> E.F * * I -> nothing */ public final class A extends Message<A, A.Builder> { public static final ProtoAdapter<A> ADAPTER = new ProtoAdapter_A(); private static final long serialVersionUID = 0L; @WireField( tag = 1, adapter = "com.squareup.wire.protos.roots.B#ADAPTER" ) public final B c; @WireField( tag = 2, adapter = "com.squareup.wire.protos.roots.D#ADAPTER" ) public final D d; public A(B c, D d) { this(c, d, ByteString.EMPTY); } public A(B c, D d, ByteString unknownFields) { super(ADAPTER, unknownFields); this.c = c; this.d = d; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.c = c; builder.d = d; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof A)) return false; A o = (A) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(c, o.c) && Internal.equals(d, o.d); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + (c != null ? c.hashCode() : 0); result = result * 37 + (d != null ? d.hashCode() : 0); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (c != null) builder.append(", c=").append(c); if (d != null) builder.append(", d=").append(d); return builder.replace(0, 2, "A{").append('}').toString(); } public static final class Builder extends Message.Builder<A, Builder> { public B c; public D d; public Builder() { } public Builder c(B c) { this.c = c; return this; } public Builder d(D d) { this.d = d; return this; } @Override public A build() { return new A(c, d, super.buildUnknownFields()); } } private static final class ProtoAdapter_A extends ProtoAdapter<A> { public ProtoAdapter_A() { super(FieldEncoding.LENGTH_DELIMITED, A.class, "type.googleapis.com/squareup.protos.roots.A", Syntax.PROTO_2, null, "roots.proto"); } @Override public int encodedSize(A value) { int result = 0; result += B.ADAPTER.encodedSizeWithTag(1, value.c); result += D.ADAPTER.encodedSizeWithTag(2, value.d); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, A value) throws IOException { B.ADAPTER.encodeWithTag(writer, 1, value.c); D.ADAPTER.encodeWithTag(writer, 2, value.d); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, A value) throws IOException { writer.writeBytes(value.unknownFields()); D.ADAPTER.encodeWithTag(writer, 2, value.d); B.ADAPTER.encodeWithTag(writer, 1, value.c); } @Override public A 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.c(B.ADAPTER.decode(reader)); break; case 2: builder.d(D.ADAPTER.decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public A redact(A value) { Builder builder = value.newBuilder(); if (builder.c != null) builder.c = B.ADAPTER.redact(builder.c); if (builder.d != null) builder.d = D.ADAPTER.redact(builder.d); builder.clearUnknownFields(); return builder.build(); } } }
7,050
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/one_extension/OneExtension.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.one_extension.OneExtension in one_extension.proto package com.squareup.wire.protos.one_extension; 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.Object; import java.lang.Override; import java.lang.String; import java.lang.StringBuilder; import okio.ByteString; public final class OneExtension extends Message<OneExtension, OneExtension.Builder> { public static final ProtoAdapter<OneExtension> ADAPTER = new ProtoAdapter_OneExtension(); private static final long serialVersionUID = 0L; public static final String DEFAULT_ID = ""; @WireField( tag = 1, adapter = "com.squareup.wire.ProtoAdapter#STRING" ) public final String id; /** * Extension source: one_extension.proto */ @WireField( tag = 1000, adapter = "com.squareup.wire.protos.one_extension.Foo#ADAPTER" ) public final Foo foo; public OneExtension(String id, Foo foo) { this(id, foo, ByteString.EMPTY); } public OneExtension(String id, Foo foo, ByteString unknownFields) { super(ADAPTER, unknownFields); this.id = id; this.foo = foo; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.id = id; builder.foo = foo; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof OneExtension)) return false; OneExtension o = (OneExtension) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(id, o.id) && Internal.equals(foo, o.foo); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + (id != null ? id.hashCode() : 0); result = result * 37 + (foo != null ? foo.hashCode() : 0); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (id != null) builder.append(", id=").append(Internal.sanitize(id)); if (foo != null) builder.append(", foo=").append(foo); return builder.replace(0, 2, "OneExtension{").append('}').toString(); } public static final class Builder extends Message.Builder<OneExtension, Builder> { public String id; public Foo foo; public Builder() { } public Builder id(String id) { this.id = id; return this; } public Builder foo(Foo foo) { this.foo = foo; return this; } @Override public OneExtension build() { return new OneExtension(id, foo, super.buildUnknownFields()); } } private static final class ProtoAdapter_OneExtension extends ProtoAdapter<OneExtension> { public ProtoAdapter_OneExtension() { super(FieldEncoding.LENGTH_DELIMITED, OneExtension.class, "type.googleapis.com/squareup.protos.one_extension.OneExtension", Syntax.PROTO_2, null, "one_extension.proto"); } @Override public int encodedSize(OneExtension value) { int result = 0; result += ProtoAdapter.STRING.encodedSizeWithTag(1, value.id); result += Foo.ADAPTER.encodedSizeWithTag(1000, value.foo); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, OneExtension value) throws IOException { ProtoAdapter.STRING.encodeWithTag(writer, 1, value.id); Foo.ADAPTER.encodeWithTag(writer, 1000, value.foo); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, OneExtension value) throws IOException { writer.writeBytes(value.unknownFields()); Foo.ADAPTER.encodeWithTag(writer, 1000, value.foo); ProtoAdapter.STRING.encodeWithTag(writer, 1, value.id); } @Override public OneExtension 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.id(ProtoAdapter.STRING.decode(reader)); break; case 1000: builder.foo(Foo.ADAPTER.decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public OneExtension redact(OneExtension value) { Builder builder = value.newBuilder(); if (builder.foo != null) builder.foo = Foo.ADAPTER.redact(builder.foo); builder.clearUnknownFields(); return builder.build(); } } }
7,051
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/one_extension/Foo.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.one_extension.Foo in one_extension.proto package com.squareup.wire.protos.one_extension; 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.Object; import java.lang.Override; import java.lang.String; import java.lang.StringBuilder; import okio.ByteString; public final class Foo extends Message<Foo, Foo.Builder> { public static final ProtoAdapter<Foo> ADAPTER = new ProtoAdapter_Foo(); private static final long serialVersionUID = 0L; public static final String DEFAULT_BAR = ""; @WireField( tag = 1, adapter = "com.squareup.wire.ProtoAdapter#STRING" ) public final String bar; public Foo(String bar) { this(bar, ByteString.EMPTY); } public Foo(String bar, ByteString unknownFields) { super(ADAPTER, unknownFields); this.bar = bar; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.bar = bar; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof Foo)) return false; Foo o = (Foo) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(bar, o.bar); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + (bar != null ? bar.hashCode() : 0); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (bar != null) builder.append(", bar=").append(Internal.sanitize(bar)); return builder.replace(0, 2, "Foo{").append('}').toString(); } public static final class Builder extends Message.Builder<Foo, Builder> { public String bar; public Builder() { } public Builder bar(String bar) { this.bar = bar; return this; } @Override public Foo build() { return new Foo(bar, super.buildUnknownFields()); } } private static final class ProtoAdapter_Foo extends ProtoAdapter<Foo> { public ProtoAdapter_Foo() { super(FieldEncoding.LENGTH_DELIMITED, Foo.class, "type.googleapis.com/squareup.protos.one_extension.Foo", Syntax.PROTO_2, null, "one_extension.proto"); } @Override public int encodedSize(Foo value) { int result = 0; result += ProtoAdapter.STRING.encodedSizeWithTag(1, value.bar); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, Foo value) throws IOException { ProtoAdapter.STRING.encodeWithTag(writer, 1, value.bar); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, Foo value) throws IOException { writer.writeBytes(value.unknownFields()); ProtoAdapter.STRING.encodeWithTag(writer, 1, value.bar); } @Override public Foo 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.bar(ProtoAdapter.STRING.decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public Foo redact(Foo value) { Builder builder = value.newBuilder(); builder.clearUnknownFields(); return builder.build(); } } }
7,052
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/alltypes/AllTypes.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.alltypes.AllTypes in all_types.proto package com.squareup.wire.protos.alltypes; import com.squareup.wire.EnumAdapter; 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.WireEnum; import com.squareup.wire.WireField; import com.squareup.wire.internal.Internal; import java.io.IOException; import java.lang.Boolean; import java.lang.Double; import java.lang.Float; 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.List; import java.util.Map; import okio.ByteString; public final class AllTypes extends Message<AllTypes, AllTypes.Builder> { public static final ProtoAdapter<AllTypes> ADAPTER = new ProtoAdapter_AllTypes(); private static final long serialVersionUID = 0L; public static final Integer DEFAULT_OPT_INT32 = 0; public static final Integer DEFAULT_OPT_UINT32 = 0; public static final Integer DEFAULT_OPT_SINT32 = 0; public static final Integer DEFAULT_OPT_FIXED32 = 0; public static final Integer DEFAULT_OPT_SFIXED32 = 0; public static final Long DEFAULT_OPT_INT64 = 0L; public static final Long DEFAULT_OPT_UINT64 = 0L; public static final Long DEFAULT_OPT_SINT64 = 0L; public static final Long DEFAULT_OPT_FIXED64 = 0L; public static final Long DEFAULT_OPT_SFIXED64 = 0L; public static final Boolean DEFAULT_OPT_BOOL = false; public static final Float DEFAULT_OPT_FLOAT = 0.0f; public static final Double DEFAULT_OPT_DOUBLE = 0.0d; public static final String DEFAULT_OPT_STRING = ""; public static final ByteString DEFAULT_OPT_BYTES = ByteString.EMPTY; public static final NestedEnum DEFAULT_OPT_NESTED_ENUM = NestedEnum.UNKNOWN; public static final Integer DEFAULT_REQ_INT32 = 0; public static final Integer DEFAULT_REQ_UINT32 = 0; public static final Integer DEFAULT_REQ_SINT32 = 0; public static final Integer DEFAULT_REQ_FIXED32 = 0; public static final Integer DEFAULT_REQ_SFIXED32 = 0; public static final Long DEFAULT_REQ_INT64 = 0L; public static final Long DEFAULT_REQ_UINT64 = 0L; public static final Long DEFAULT_REQ_SINT64 = 0L; public static final Long DEFAULT_REQ_FIXED64 = 0L; public static final Long DEFAULT_REQ_SFIXED64 = 0L; public static final Boolean DEFAULT_REQ_BOOL = false; public static final Float DEFAULT_REQ_FLOAT = 0.0f; public static final Double DEFAULT_REQ_DOUBLE = 0.0d; public static final String DEFAULT_REQ_STRING = ""; public static final ByteString DEFAULT_REQ_BYTES = ByteString.EMPTY; public static final NestedEnum DEFAULT_REQ_NESTED_ENUM = NestedEnum.UNKNOWN; public static final Integer DEFAULT_DEFAULT_INT32 = 2147483647; public static final Integer DEFAULT_DEFAULT_UINT32 = -1; public static final Integer DEFAULT_DEFAULT_SINT32 = -2147483648; public static final Integer DEFAULT_DEFAULT_FIXED32 = -1; public static final Integer DEFAULT_DEFAULT_SFIXED32 = -2147483648; public static final Long DEFAULT_DEFAULT_INT64 = 9223372036854775807L; public static final Long DEFAULT_DEFAULT_UINT64 = -1L; public static final Long DEFAULT_DEFAULT_SINT64 = -9223372036854775808L; public static final Long DEFAULT_DEFAULT_FIXED64 = -1L; public static final Long DEFAULT_DEFAULT_SFIXED64 = -9223372036854775808L; public static final Boolean DEFAULT_DEFAULT_BOOL = true; public static final Float DEFAULT_DEFAULT_FLOAT = 123.456e7f; public static final Double DEFAULT_DEFAULT_DOUBLE = 123.456e78d; public static final String DEFAULT_DEFAULT_STRING = "çok\u0007\b\f\n" + "\r\t\u000b\u0001\u0001\u0001\u000f\u000f~\u0001\u0001\u0011\u0001\u0001\u0011güzel"; public static final ByteString DEFAULT_DEFAULT_BYTES = ByteString.decodeBase64("529rBwgMCg0JCwEBAQ8PfgEBEQEBEWf8emVs"); public static final NestedEnum DEFAULT_DEFAULT_NESTED_ENUM = NestedEnum.A; public static final Integer DEFAULT_EXT_OPT_INT32 = 0; public static final Integer DEFAULT_EXT_OPT_UINT32 = 0; public static final Integer DEFAULT_EXT_OPT_SINT32 = 0; public static final Integer DEFAULT_EXT_OPT_FIXED32 = 0; public static final Integer DEFAULT_EXT_OPT_SFIXED32 = 0; public static final Long DEFAULT_EXT_OPT_INT64 = 0L; public static final Long DEFAULT_EXT_OPT_UINT64 = 0L; public static final Long DEFAULT_EXT_OPT_SINT64 = 0L; public static final Long DEFAULT_EXT_OPT_FIXED64 = 0L; public static final Long DEFAULT_EXT_OPT_SFIXED64 = 0L; public static final Boolean DEFAULT_EXT_OPT_BOOL = false; public static final Float DEFAULT_EXT_OPT_FLOAT = 0.0f; public static final Double DEFAULT_EXT_OPT_DOUBLE = 0.0d; public static final String DEFAULT_EXT_OPT_STRING = ""; public static final ByteString DEFAULT_EXT_OPT_BYTES = ByteString.EMPTY; public static final NestedEnum DEFAULT_EXT_OPT_NESTED_ENUM = NestedEnum.UNKNOWN; @WireField( tag = 1, adapter = "com.squareup.wire.ProtoAdapter#INT32" ) public final Integer opt_int32; @WireField( tag = 2, adapter = "com.squareup.wire.ProtoAdapter#UINT32" ) public final Integer opt_uint32; @WireField( tag = 3, adapter = "com.squareup.wire.ProtoAdapter#SINT32" ) public final Integer opt_sint32; @WireField( tag = 4, adapter = "com.squareup.wire.ProtoAdapter#FIXED32" ) public final Integer opt_fixed32; @WireField( tag = 5, adapter = "com.squareup.wire.ProtoAdapter#SFIXED32" ) public final Integer opt_sfixed32; @WireField( tag = 6, adapter = "com.squareup.wire.ProtoAdapter#INT64" ) public final Long opt_int64; @WireField( tag = 7, adapter = "com.squareup.wire.ProtoAdapter#UINT64" ) public final Long opt_uint64; @WireField( tag = 8, adapter = "com.squareup.wire.ProtoAdapter#SINT64" ) public final Long opt_sint64; @WireField( tag = 9, adapter = "com.squareup.wire.ProtoAdapter#FIXED64" ) public final Long opt_fixed64; @WireField( tag = 10, adapter = "com.squareup.wire.ProtoAdapter#SFIXED64" ) public final Long opt_sfixed64; @WireField( tag = 11, adapter = "com.squareup.wire.ProtoAdapter#BOOL" ) public final Boolean opt_bool; @WireField( tag = 12, adapter = "com.squareup.wire.ProtoAdapter#FLOAT" ) public final Float opt_float; @WireField( tag = 13, adapter = "com.squareup.wire.ProtoAdapter#DOUBLE" ) public final Double opt_double; @WireField( tag = 14, adapter = "com.squareup.wire.ProtoAdapter#STRING" ) public final String opt_string; @WireField( tag = 15, adapter = "com.squareup.wire.ProtoAdapter#BYTES" ) public final ByteString opt_bytes; @WireField( tag = 16, adapter = "com.squareup.wire.protos.alltypes.AllTypes$NestedEnum#ADAPTER" ) public final NestedEnum opt_nested_enum; @WireField( tag = 17, adapter = "com.squareup.wire.protos.alltypes.AllTypes$NestedMessage#ADAPTER" ) public final NestedMessage opt_nested_message; @WireField( tag = 101, adapter = "com.squareup.wire.ProtoAdapter#INT32", label = WireField.Label.REQUIRED ) public final Integer req_int32; @WireField( tag = 102, adapter = "com.squareup.wire.ProtoAdapter#UINT32", label = WireField.Label.REQUIRED ) public final Integer req_uint32; @WireField( tag = 103, adapter = "com.squareup.wire.ProtoAdapter#SINT32", label = WireField.Label.REQUIRED ) public final Integer req_sint32; @WireField( tag = 104, adapter = "com.squareup.wire.ProtoAdapter#FIXED32", label = WireField.Label.REQUIRED ) public final Integer req_fixed32; @WireField( tag = 105, adapter = "com.squareup.wire.ProtoAdapter#SFIXED32", label = WireField.Label.REQUIRED ) public final Integer req_sfixed32; @WireField( tag = 106, adapter = "com.squareup.wire.ProtoAdapter#INT64", label = WireField.Label.REQUIRED ) public final Long req_int64; @WireField( tag = 107, adapter = "com.squareup.wire.ProtoAdapter#UINT64", label = WireField.Label.REQUIRED ) public final Long req_uint64; @WireField( tag = 108, adapter = "com.squareup.wire.ProtoAdapter#SINT64", label = WireField.Label.REQUIRED ) public final Long req_sint64; @WireField( tag = 109, adapter = "com.squareup.wire.ProtoAdapter#FIXED64", label = WireField.Label.REQUIRED ) public final Long req_fixed64; @WireField( tag = 110, adapter = "com.squareup.wire.ProtoAdapter#SFIXED64", label = WireField.Label.REQUIRED ) public final Long req_sfixed64; @WireField( tag = 111, adapter = "com.squareup.wire.ProtoAdapter#BOOL", label = WireField.Label.REQUIRED ) public final Boolean req_bool; @WireField( tag = 112, adapter = "com.squareup.wire.ProtoAdapter#FLOAT", label = WireField.Label.REQUIRED ) public final Float req_float; @WireField( tag = 113, adapter = "com.squareup.wire.ProtoAdapter#DOUBLE", label = WireField.Label.REQUIRED ) public final Double req_double; @WireField( tag = 114, adapter = "com.squareup.wire.ProtoAdapter#STRING", label = WireField.Label.REQUIRED ) public final String req_string; @WireField( tag = 115, adapter = "com.squareup.wire.ProtoAdapter#BYTES", label = WireField.Label.REQUIRED ) public final ByteString req_bytes; @WireField( tag = 116, adapter = "com.squareup.wire.protos.alltypes.AllTypes$NestedEnum#ADAPTER", label = WireField.Label.REQUIRED ) public final NestedEnum req_nested_enum; @WireField( tag = 117, adapter = "com.squareup.wire.protos.alltypes.AllTypes$NestedMessage#ADAPTER", label = WireField.Label.REQUIRED ) public final NestedMessage req_nested_message; @WireField( tag = 201, adapter = "com.squareup.wire.ProtoAdapter#INT32", label = WireField.Label.REPEATED ) public final List<Integer> rep_int32; @WireField( tag = 202, adapter = "com.squareup.wire.ProtoAdapter#UINT32", label = WireField.Label.REPEATED ) public final List<Integer> rep_uint32; @WireField( tag = 203, adapter = "com.squareup.wire.ProtoAdapter#SINT32", label = WireField.Label.REPEATED ) public final List<Integer> rep_sint32; @WireField( tag = 204, adapter = "com.squareup.wire.ProtoAdapter#FIXED32", label = WireField.Label.REPEATED ) public final List<Integer> rep_fixed32; @WireField( tag = 205, adapter = "com.squareup.wire.ProtoAdapter#SFIXED32", label = WireField.Label.REPEATED ) public final List<Integer> rep_sfixed32; @WireField( tag = 206, adapter = "com.squareup.wire.ProtoAdapter#INT64", label = WireField.Label.REPEATED ) public final List<Long> rep_int64; @WireField( tag = 207, adapter = "com.squareup.wire.ProtoAdapter#UINT64", label = WireField.Label.REPEATED ) public final List<Long> rep_uint64; @WireField( tag = 208, adapter = "com.squareup.wire.ProtoAdapter#SINT64", label = WireField.Label.REPEATED ) public final List<Long> rep_sint64; @WireField( tag = 209, adapter = "com.squareup.wire.ProtoAdapter#FIXED64", label = WireField.Label.REPEATED ) public final List<Long> rep_fixed64; @WireField( tag = 210, adapter = "com.squareup.wire.ProtoAdapter#SFIXED64", label = WireField.Label.REPEATED ) public final List<Long> rep_sfixed64; @WireField( tag = 211, adapter = "com.squareup.wire.ProtoAdapter#BOOL", label = WireField.Label.REPEATED ) public final List<Boolean> rep_bool; @WireField( tag = 212, adapter = "com.squareup.wire.ProtoAdapter#FLOAT", label = WireField.Label.REPEATED ) public final List<Float> rep_float; @WireField( tag = 213, adapter = "com.squareup.wire.ProtoAdapter#DOUBLE", label = WireField.Label.REPEATED ) public final List<Double> rep_double; @WireField( tag = 214, adapter = "com.squareup.wire.ProtoAdapter#STRING", label = WireField.Label.REPEATED ) public final List<String> rep_string; @WireField( tag = 215, adapter = "com.squareup.wire.ProtoAdapter#BYTES", label = WireField.Label.REPEATED ) public final List<ByteString> rep_bytes; @WireField( tag = 216, adapter = "com.squareup.wire.protos.alltypes.AllTypes$NestedEnum#ADAPTER", label = WireField.Label.REPEATED ) public final List<NestedEnum> rep_nested_enum; @WireField( tag = 217, adapter = "com.squareup.wire.protos.alltypes.AllTypes$NestedMessage#ADAPTER", label = WireField.Label.REPEATED ) public final List<NestedMessage> rep_nested_message; @WireField( tag = 301, adapter = "com.squareup.wire.ProtoAdapter#INT32", label = WireField.Label.PACKED ) public final List<Integer> pack_int32; @WireField( tag = 302, adapter = "com.squareup.wire.ProtoAdapter#UINT32", label = WireField.Label.PACKED ) public final List<Integer> pack_uint32; @WireField( tag = 303, adapter = "com.squareup.wire.ProtoAdapter#SINT32", label = WireField.Label.PACKED ) public final List<Integer> pack_sint32; @WireField( tag = 304, adapter = "com.squareup.wire.ProtoAdapter#FIXED32", label = WireField.Label.PACKED ) public final List<Integer> pack_fixed32; @WireField( tag = 305, adapter = "com.squareup.wire.ProtoAdapter#SFIXED32", label = WireField.Label.PACKED ) public final List<Integer> pack_sfixed32; @WireField( tag = 306, adapter = "com.squareup.wire.ProtoAdapter#INT64", label = WireField.Label.PACKED ) public final List<Long> pack_int64; @WireField( tag = 307, adapter = "com.squareup.wire.ProtoAdapter#UINT64", label = WireField.Label.PACKED ) public final List<Long> pack_uint64; @WireField( tag = 308, adapter = "com.squareup.wire.ProtoAdapter#SINT64", label = WireField.Label.PACKED ) public final List<Long> pack_sint64; @WireField( tag = 309, adapter = "com.squareup.wire.ProtoAdapter#FIXED64", label = WireField.Label.PACKED ) public final List<Long> pack_fixed64; @WireField( tag = 310, adapter = "com.squareup.wire.ProtoAdapter#SFIXED64", label = WireField.Label.PACKED ) public final List<Long> pack_sfixed64; @WireField( tag = 311, adapter = "com.squareup.wire.ProtoAdapter#BOOL", label = WireField.Label.PACKED ) public final List<Boolean> pack_bool; @WireField( tag = 312, adapter = "com.squareup.wire.ProtoAdapter#FLOAT", label = WireField.Label.PACKED ) public final List<Float> pack_float; @WireField( tag = 313, adapter = "com.squareup.wire.ProtoAdapter#DOUBLE", label = WireField.Label.PACKED ) public final List<Double> pack_double; @WireField( tag = 316, adapter = "com.squareup.wire.protos.alltypes.AllTypes$NestedEnum#ADAPTER", label = WireField.Label.PACKED ) public final List<NestedEnum> pack_nested_enum; @WireField( tag = 401, adapter = "com.squareup.wire.ProtoAdapter#INT32" ) public final Integer default_int32; @WireField( tag = 402, adapter = "com.squareup.wire.ProtoAdapter#UINT32" ) public final Integer default_uint32; @WireField( tag = 403, adapter = "com.squareup.wire.ProtoAdapter#SINT32" ) public final Integer default_sint32; @WireField( tag = 404, adapter = "com.squareup.wire.ProtoAdapter#FIXED32" ) public final Integer default_fixed32; @WireField( tag = 405, adapter = "com.squareup.wire.ProtoAdapter#SFIXED32" ) public final Integer default_sfixed32; @WireField( tag = 406, adapter = "com.squareup.wire.ProtoAdapter#INT64" ) public final Long default_int64; @WireField( tag = 407, adapter = "com.squareup.wire.ProtoAdapter#UINT64" ) public final Long default_uint64; @WireField( tag = 408, adapter = "com.squareup.wire.ProtoAdapter#SINT64" ) public final Long default_sint64; @WireField( tag = 409, adapter = "com.squareup.wire.ProtoAdapter#FIXED64" ) public final Long default_fixed64; @WireField( tag = 410, adapter = "com.squareup.wire.ProtoAdapter#SFIXED64" ) public final Long default_sfixed64; @WireField( tag = 411, adapter = "com.squareup.wire.ProtoAdapter#BOOL" ) public final Boolean default_bool; @WireField( tag = 412, adapter = "com.squareup.wire.ProtoAdapter#FLOAT" ) public final Float default_float; @WireField( tag = 413, adapter = "com.squareup.wire.ProtoAdapter#DOUBLE" ) public final Double default_double; /** * Note: protoc doesn't allow some characters of the default value. */ @WireField( tag = 414, adapter = "com.squareup.wire.ProtoAdapter#STRING" ) public final String default_string; @WireField( tag = 415, adapter = "com.squareup.wire.ProtoAdapter#BYTES" ) public final ByteString default_bytes; @WireField( tag = 416, adapter = "com.squareup.wire.protos.alltypes.AllTypes$NestedEnum#ADAPTER" ) public final NestedEnum default_nested_enum; @WireField( tag = 501, keyAdapter = "com.squareup.wire.ProtoAdapter#INT32", adapter = "com.squareup.wire.ProtoAdapter#INT32" ) public final Map<Integer, Integer> map_int32_int32; @WireField( tag = 502, keyAdapter = "com.squareup.wire.ProtoAdapter#STRING", adapter = "com.squareup.wire.ProtoAdapter#STRING" ) public final Map<String, String> map_string_string; @WireField( tag = 503, keyAdapter = "com.squareup.wire.ProtoAdapter#STRING", adapter = "com.squareup.wire.protos.alltypes.AllTypes$NestedMessage#ADAPTER" ) public final Map<String, NestedMessage> map_string_message; @WireField( tag = 504, keyAdapter = "com.squareup.wire.ProtoAdapter#STRING", adapter = "com.squareup.wire.protos.alltypes.AllTypes$NestedEnum#ADAPTER" ) public final Map<String, NestedEnum> map_string_enum; /** * Extension source: all_types.proto */ @WireField( tag = 1001, adapter = "com.squareup.wire.ProtoAdapter#INT32" ) public final Integer ext_opt_int32; /** * Extension source: all_types.proto */ @WireField( tag = 1002, adapter = "com.squareup.wire.ProtoAdapter#UINT32" ) public final Integer ext_opt_uint32; /** * Extension source: all_types.proto */ @WireField( tag = 1003, adapter = "com.squareup.wire.ProtoAdapter#SINT32" ) public final Integer ext_opt_sint32; /** * Extension source: all_types.proto */ @WireField( tag = 1004, adapter = "com.squareup.wire.ProtoAdapter#FIXED32" ) public final Integer ext_opt_fixed32; /** * Extension source: all_types.proto */ @WireField( tag = 1005, adapter = "com.squareup.wire.ProtoAdapter#SFIXED32" ) public final Integer ext_opt_sfixed32; /** * Extension source: all_types.proto */ @WireField( tag = 1006, adapter = "com.squareup.wire.ProtoAdapter#INT64" ) public final Long ext_opt_int64; /** * Extension source: all_types.proto */ @WireField( tag = 1007, adapter = "com.squareup.wire.ProtoAdapter#UINT64" ) public final Long ext_opt_uint64; /** * Extension source: all_types.proto */ @WireField( tag = 1008, adapter = "com.squareup.wire.ProtoAdapter#SINT64" ) public final Long ext_opt_sint64; /** * Extension source: all_types.proto */ @WireField( tag = 1009, adapter = "com.squareup.wire.ProtoAdapter#FIXED64" ) public final Long ext_opt_fixed64; /** * Extension source: all_types.proto */ @WireField( tag = 1010, adapter = "com.squareup.wire.ProtoAdapter#SFIXED64" ) public final Long ext_opt_sfixed64; /** * Extension source: all_types.proto */ @WireField( tag = 1011, adapter = "com.squareup.wire.ProtoAdapter#BOOL" ) public final Boolean ext_opt_bool; /** * Extension source: all_types.proto */ @WireField( tag = 1012, adapter = "com.squareup.wire.ProtoAdapter#FLOAT" ) public final Float ext_opt_float; /** * Extension source: all_types.proto */ @WireField( tag = 1013, adapter = "com.squareup.wire.ProtoAdapter#DOUBLE" ) public final Double ext_opt_double; /** * Extension source: all_types.proto */ @WireField( tag = 1014, adapter = "com.squareup.wire.ProtoAdapter#STRING" ) public final String ext_opt_string; /** * Extension source: all_types.proto */ @WireField( tag = 1015, adapter = "com.squareup.wire.ProtoAdapter#BYTES" ) public final ByteString ext_opt_bytes; /** * Extension source: all_types.proto */ @WireField( tag = 1016, adapter = "com.squareup.wire.protos.alltypes.AllTypes$NestedEnum#ADAPTER" ) public final NestedEnum ext_opt_nested_enum; /** * Extension source: all_types.proto */ @WireField( tag = 1017, adapter = "com.squareup.wire.protos.alltypes.AllTypes$NestedMessage#ADAPTER" ) public final NestedMessage ext_opt_nested_message; /** * Extension source: all_types.proto */ @WireField( tag = 1101, adapter = "com.squareup.wire.ProtoAdapter#INT32", label = WireField.Label.REPEATED ) public final List<Integer> ext_rep_int32; /** * Extension source: all_types.proto */ @WireField( tag = 1102, adapter = "com.squareup.wire.ProtoAdapter#UINT32", label = WireField.Label.REPEATED ) public final List<Integer> ext_rep_uint32; /** * Extension source: all_types.proto */ @WireField( tag = 1103, adapter = "com.squareup.wire.ProtoAdapter#SINT32", label = WireField.Label.REPEATED ) public final List<Integer> ext_rep_sint32; /** * Extension source: all_types.proto */ @WireField( tag = 1104, adapter = "com.squareup.wire.ProtoAdapter#FIXED32", label = WireField.Label.REPEATED ) public final List<Integer> ext_rep_fixed32; /** * Extension source: all_types.proto */ @WireField( tag = 1105, adapter = "com.squareup.wire.ProtoAdapter#SFIXED32", label = WireField.Label.REPEATED ) public final List<Integer> ext_rep_sfixed32; /** * Extension source: all_types.proto */ @WireField( tag = 1106, adapter = "com.squareup.wire.ProtoAdapter#INT64", label = WireField.Label.REPEATED ) public final List<Long> ext_rep_int64; /** * Extension source: all_types.proto */ @WireField( tag = 1107, adapter = "com.squareup.wire.ProtoAdapter#UINT64", label = WireField.Label.REPEATED ) public final List<Long> ext_rep_uint64; /** * Extension source: all_types.proto */ @WireField( tag = 1108, adapter = "com.squareup.wire.ProtoAdapter#SINT64", label = WireField.Label.REPEATED ) public final List<Long> ext_rep_sint64; /** * Extension source: all_types.proto */ @WireField( tag = 1109, adapter = "com.squareup.wire.ProtoAdapter#FIXED64", label = WireField.Label.REPEATED ) public final List<Long> ext_rep_fixed64; /** * Extension source: all_types.proto */ @WireField( tag = 1110, adapter = "com.squareup.wire.ProtoAdapter#SFIXED64", label = WireField.Label.REPEATED ) public final List<Long> ext_rep_sfixed64; /** * Extension source: all_types.proto */ @WireField( tag = 1111, adapter = "com.squareup.wire.ProtoAdapter#BOOL", label = WireField.Label.REPEATED ) public final List<Boolean> ext_rep_bool; /** * Extension source: all_types.proto */ @WireField( tag = 1112, adapter = "com.squareup.wire.ProtoAdapter#FLOAT", label = WireField.Label.REPEATED ) public final List<Float> ext_rep_float; /** * Extension source: all_types.proto */ @WireField( tag = 1113, adapter = "com.squareup.wire.ProtoAdapter#DOUBLE", label = WireField.Label.REPEATED ) public final List<Double> ext_rep_double; /** * Extension source: all_types.proto */ @WireField( tag = 1114, adapter = "com.squareup.wire.ProtoAdapter#STRING", label = WireField.Label.REPEATED ) public final List<String> ext_rep_string; /** * Extension source: all_types.proto */ @WireField( tag = 1115, adapter = "com.squareup.wire.ProtoAdapter#BYTES", label = WireField.Label.REPEATED ) public final List<ByteString> ext_rep_bytes; /** * Extension source: all_types.proto */ @WireField( tag = 1116, adapter = "com.squareup.wire.protos.alltypes.AllTypes$NestedEnum#ADAPTER", label = WireField.Label.REPEATED ) public final List<NestedEnum> ext_rep_nested_enum; /** * Extension source: all_types.proto */ @WireField( tag = 1117, adapter = "com.squareup.wire.protos.alltypes.AllTypes$NestedMessage#ADAPTER", label = WireField.Label.REPEATED ) public final List<NestedMessage> ext_rep_nested_message; /** * Extension source: all_types.proto */ @WireField( tag = 1201, adapter = "com.squareup.wire.ProtoAdapter#INT32", label = WireField.Label.PACKED ) public final List<Integer> ext_pack_int32; /** * Extension source: all_types.proto */ @WireField( tag = 1202, adapter = "com.squareup.wire.ProtoAdapter#UINT32", label = WireField.Label.PACKED ) public final List<Integer> ext_pack_uint32; /** * Extension source: all_types.proto */ @WireField( tag = 1203, adapter = "com.squareup.wire.ProtoAdapter#SINT32", label = WireField.Label.PACKED ) public final List<Integer> ext_pack_sint32; /** * Extension source: all_types.proto */ @WireField( tag = 1204, adapter = "com.squareup.wire.ProtoAdapter#FIXED32", label = WireField.Label.PACKED ) public final List<Integer> ext_pack_fixed32; /** * Extension source: all_types.proto */ @WireField( tag = 1205, adapter = "com.squareup.wire.ProtoAdapter#SFIXED32", label = WireField.Label.PACKED ) public final List<Integer> ext_pack_sfixed32; /** * Extension source: all_types.proto */ @WireField( tag = 1206, adapter = "com.squareup.wire.ProtoAdapter#INT64", label = WireField.Label.PACKED ) public final List<Long> ext_pack_int64; /** * Extension source: all_types.proto */ @WireField( tag = 1207, adapter = "com.squareup.wire.ProtoAdapter#UINT64", label = WireField.Label.PACKED ) public final List<Long> ext_pack_uint64; /** * Extension source: all_types.proto */ @WireField( tag = 1208, adapter = "com.squareup.wire.ProtoAdapter#SINT64", label = WireField.Label.PACKED ) public final List<Long> ext_pack_sint64; /** * Extension source: all_types.proto */ @WireField( tag = 1209, adapter = "com.squareup.wire.ProtoAdapter#FIXED64", label = WireField.Label.PACKED ) public final List<Long> ext_pack_fixed64; /** * Extension source: all_types.proto */ @WireField( tag = 1210, adapter = "com.squareup.wire.ProtoAdapter#SFIXED64", label = WireField.Label.PACKED ) public final List<Long> ext_pack_sfixed64; /** * Extension source: all_types.proto */ @WireField( tag = 1211, adapter = "com.squareup.wire.ProtoAdapter#BOOL", label = WireField.Label.PACKED ) public final List<Boolean> ext_pack_bool; /** * Extension source: all_types.proto */ @WireField( tag = 1212, adapter = "com.squareup.wire.ProtoAdapter#FLOAT", label = WireField.Label.PACKED ) public final List<Float> ext_pack_float; /** * Extension source: all_types.proto */ @WireField( tag = 1213, adapter = "com.squareup.wire.ProtoAdapter#DOUBLE", label = WireField.Label.PACKED ) public final List<Double> ext_pack_double; /** * Extension source: all_types.proto */ @WireField( tag = 1216, adapter = "com.squareup.wire.protos.alltypes.AllTypes$NestedEnum#ADAPTER", label = WireField.Label.PACKED ) public final List<NestedEnum> ext_pack_nested_enum; public AllTypes(Builder builder, ByteString unknownFields) { super(ADAPTER, unknownFields); this.opt_int32 = builder.opt_int32; this.opt_uint32 = builder.opt_uint32; this.opt_sint32 = builder.opt_sint32; this.opt_fixed32 = builder.opt_fixed32; this.opt_sfixed32 = builder.opt_sfixed32; this.opt_int64 = builder.opt_int64; this.opt_uint64 = builder.opt_uint64; this.opt_sint64 = builder.opt_sint64; this.opt_fixed64 = builder.opt_fixed64; this.opt_sfixed64 = builder.opt_sfixed64; this.opt_bool = builder.opt_bool; this.opt_float = builder.opt_float; this.opt_double = builder.opt_double; this.opt_string = builder.opt_string; this.opt_bytes = builder.opt_bytes; this.opt_nested_enum = builder.opt_nested_enum; this.opt_nested_message = builder.opt_nested_message; this.req_int32 = builder.req_int32; this.req_uint32 = builder.req_uint32; this.req_sint32 = builder.req_sint32; this.req_fixed32 = builder.req_fixed32; this.req_sfixed32 = builder.req_sfixed32; this.req_int64 = builder.req_int64; this.req_uint64 = builder.req_uint64; this.req_sint64 = builder.req_sint64; this.req_fixed64 = builder.req_fixed64; this.req_sfixed64 = builder.req_sfixed64; this.req_bool = builder.req_bool; this.req_float = builder.req_float; this.req_double = builder.req_double; this.req_string = builder.req_string; this.req_bytes = builder.req_bytes; this.req_nested_enum = builder.req_nested_enum; this.req_nested_message = builder.req_nested_message; this.rep_int32 = Internal.immutableCopyOf("rep_int32", builder.rep_int32); this.rep_uint32 = Internal.immutableCopyOf("rep_uint32", builder.rep_uint32); this.rep_sint32 = Internal.immutableCopyOf("rep_sint32", builder.rep_sint32); this.rep_fixed32 = Internal.immutableCopyOf("rep_fixed32", builder.rep_fixed32); this.rep_sfixed32 = Internal.immutableCopyOf("rep_sfixed32", builder.rep_sfixed32); this.rep_int64 = Internal.immutableCopyOf("rep_int64", builder.rep_int64); this.rep_uint64 = Internal.immutableCopyOf("rep_uint64", builder.rep_uint64); this.rep_sint64 = Internal.immutableCopyOf("rep_sint64", builder.rep_sint64); this.rep_fixed64 = Internal.immutableCopyOf("rep_fixed64", builder.rep_fixed64); this.rep_sfixed64 = Internal.immutableCopyOf("rep_sfixed64", builder.rep_sfixed64); this.rep_bool = Internal.immutableCopyOf("rep_bool", builder.rep_bool); this.rep_float = Internal.immutableCopyOf("rep_float", builder.rep_float); this.rep_double = Internal.immutableCopyOf("rep_double", builder.rep_double); this.rep_string = Internal.immutableCopyOf("rep_string", builder.rep_string); this.rep_bytes = Internal.immutableCopyOf("rep_bytes", builder.rep_bytes); this.rep_nested_enum = Internal.immutableCopyOf("rep_nested_enum", builder.rep_nested_enum); this.rep_nested_message = Internal.immutableCopyOf("rep_nested_message", builder.rep_nested_message); this.pack_int32 = Internal.immutableCopyOf("pack_int32", builder.pack_int32); this.pack_uint32 = Internal.immutableCopyOf("pack_uint32", builder.pack_uint32); this.pack_sint32 = Internal.immutableCopyOf("pack_sint32", builder.pack_sint32); this.pack_fixed32 = Internal.immutableCopyOf("pack_fixed32", builder.pack_fixed32); this.pack_sfixed32 = Internal.immutableCopyOf("pack_sfixed32", builder.pack_sfixed32); this.pack_int64 = Internal.immutableCopyOf("pack_int64", builder.pack_int64); this.pack_uint64 = Internal.immutableCopyOf("pack_uint64", builder.pack_uint64); this.pack_sint64 = Internal.immutableCopyOf("pack_sint64", builder.pack_sint64); this.pack_fixed64 = Internal.immutableCopyOf("pack_fixed64", builder.pack_fixed64); this.pack_sfixed64 = Internal.immutableCopyOf("pack_sfixed64", builder.pack_sfixed64); this.pack_bool = Internal.immutableCopyOf("pack_bool", builder.pack_bool); this.pack_float = Internal.immutableCopyOf("pack_float", builder.pack_float); this.pack_double = Internal.immutableCopyOf("pack_double", builder.pack_double); this.pack_nested_enum = Internal.immutableCopyOf("pack_nested_enum", builder.pack_nested_enum); this.default_int32 = builder.default_int32; this.default_uint32 = builder.default_uint32; this.default_sint32 = builder.default_sint32; this.default_fixed32 = builder.default_fixed32; this.default_sfixed32 = builder.default_sfixed32; this.default_int64 = builder.default_int64; this.default_uint64 = builder.default_uint64; this.default_sint64 = builder.default_sint64; this.default_fixed64 = builder.default_fixed64; this.default_sfixed64 = builder.default_sfixed64; this.default_bool = builder.default_bool; this.default_float = builder.default_float; this.default_double = builder.default_double; this.default_string = builder.default_string; this.default_bytes = builder.default_bytes; this.default_nested_enum = builder.default_nested_enum; this.map_int32_int32 = Internal.immutableCopyOf("map_int32_int32", builder.map_int32_int32); this.map_string_string = Internal.immutableCopyOf("map_string_string", builder.map_string_string); this.map_string_message = Internal.immutableCopyOf("map_string_message", builder.map_string_message); this.map_string_enum = Internal.immutableCopyOf("map_string_enum", builder.map_string_enum); this.ext_opt_int32 = builder.ext_opt_int32; this.ext_opt_uint32 = builder.ext_opt_uint32; this.ext_opt_sint32 = builder.ext_opt_sint32; this.ext_opt_fixed32 = builder.ext_opt_fixed32; this.ext_opt_sfixed32 = builder.ext_opt_sfixed32; this.ext_opt_int64 = builder.ext_opt_int64; this.ext_opt_uint64 = builder.ext_opt_uint64; this.ext_opt_sint64 = builder.ext_opt_sint64; this.ext_opt_fixed64 = builder.ext_opt_fixed64; this.ext_opt_sfixed64 = builder.ext_opt_sfixed64; this.ext_opt_bool = builder.ext_opt_bool; this.ext_opt_float = builder.ext_opt_float; this.ext_opt_double = builder.ext_opt_double; this.ext_opt_string = builder.ext_opt_string; this.ext_opt_bytes = builder.ext_opt_bytes; this.ext_opt_nested_enum = builder.ext_opt_nested_enum; this.ext_opt_nested_message = builder.ext_opt_nested_message; this.ext_rep_int32 = Internal.immutableCopyOf("ext_rep_int32", builder.ext_rep_int32); this.ext_rep_uint32 = Internal.immutableCopyOf("ext_rep_uint32", builder.ext_rep_uint32); this.ext_rep_sint32 = Internal.immutableCopyOf("ext_rep_sint32", builder.ext_rep_sint32); this.ext_rep_fixed32 = Internal.immutableCopyOf("ext_rep_fixed32", builder.ext_rep_fixed32); this.ext_rep_sfixed32 = Internal.immutableCopyOf("ext_rep_sfixed32", builder.ext_rep_sfixed32); this.ext_rep_int64 = Internal.immutableCopyOf("ext_rep_int64", builder.ext_rep_int64); this.ext_rep_uint64 = Internal.immutableCopyOf("ext_rep_uint64", builder.ext_rep_uint64); this.ext_rep_sint64 = Internal.immutableCopyOf("ext_rep_sint64", builder.ext_rep_sint64); this.ext_rep_fixed64 = Internal.immutableCopyOf("ext_rep_fixed64", builder.ext_rep_fixed64); this.ext_rep_sfixed64 = Internal.immutableCopyOf("ext_rep_sfixed64", builder.ext_rep_sfixed64); this.ext_rep_bool = Internal.immutableCopyOf("ext_rep_bool", builder.ext_rep_bool); this.ext_rep_float = Internal.immutableCopyOf("ext_rep_float", builder.ext_rep_float); this.ext_rep_double = Internal.immutableCopyOf("ext_rep_double", builder.ext_rep_double); this.ext_rep_string = Internal.immutableCopyOf("ext_rep_string", builder.ext_rep_string); this.ext_rep_bytes = Internal.immutableCopyOf("ext_rep_bytes", builder.ext_rep_bytes); this.ext_rep_nested_enum = Internal.immutableCopyOf("ext_rep_nested_enum", builder.ext_rep_nested_enum); this.ext_rep_nested_message = Internal.immutableCopyOf("ext_rep_nested_message", builder.ext_rep_nested_message); this.ext_pack_int32 = Internal.immutableCopyOf("ext_pack_int32", builder.ext_pack_int32); this.ext_pack_uint32 = Internal.immutableCopyOf("ext_pack_uint32", builder.ext_pack_uint32); this.ext_pack_sint32 = Internal.immutableCopyOf("ext_pack_sint32", builder.ext_pack_sint32); this.ext_pack_fixed32 = Internal.immutableCopyOf("ext_pack_fixed32", builder.ext_pack_fixed32); this.ext_pack_sfixed32 = Internal.immutableCopyOf("ext_pack_sfixed32", builder.ext_pack_sfixed32); this.ext_pack_int64 = Internal.immutableCopyOf("ext_pack_int64", builder.ext_pack_int64); this.ext_pack_uint64 = Internal.immutableCopyOf("ext_pack_uint64", builder.ext_pack_uint64); this.ext_pack_sint64 = Internal.immutableCopyOf("ext_pack_sint64", builder.ext_pack_sint64); this.ext_pack_fixed64 = Internal.immutableCopyOf("ext_pack_fixed64", builder.ext_pack_fixed64); this.ext_pack_sfixed64 = Internal.immutableCopyOf("ext_pack_sfixed64", builder.ext_pack_sfixed64); this.ext_pack_bool = Internal.immutableCopyOf("ext_pack_bool", builder.ext_pack_bool); this.ext_pack_float = Internal.immutableCopyOf("ext_pack_float", builder.ext_pack_float); this.ext_pack_double = Internal.immutableCopyOf("ext_pack_double", builder.ext_pack_double); this.ext_pack_nested_enum = Internal.immutableCopyOf("ext_pack_nested_enum", builder.ext_pack_nested_enum); } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.opt_int32 = opt_int32; builder.opt_uint32 = opt_uint32; builder.opt_sint32 = opt_sint32; builder.opt_fixed32 = opt_fixed32; builder.opt_sfixed32 = opt_sfixed32; builder.opt_int64 = opt_int64; builder.opt_uint64 = opt_uint64; builder.opt_sint64 = opt_sint64; builder.opt_fixed64 = opt_fixed64; builder.opt_sfixed64 = opt_sfixed64; builder.opt_bool = opt_bool; builder.opt_float = opt_float; builder.opt_double = opt_double; builder.opt_string = opt_string; builder.opt_bytes = opt_bytes; builder.opt_nested_enum = opt_nested_enum; builder.opt_nested_message = opt_nested_message; builder.req_int32 = req_int32; builder.req_uint32 = req_uint32; builder.req_sint32 = req_sint32; builder.req_fixed32 = req_fixed32; builder.req_sfixed32 = req_sfixed32; builder.req_int64 = req_int64; builder.req_uint64 = req_uint64; builder.req_sint64 = req_sint64; builder.req_fixed64 = req_fixed64; builder.req_sfixed64 = req_sfixed64; builder.req_bool = req_bool; builder.req_float = req_float; builder.req_double = req_double; builder.req_string = req_string; builder.req_bytes = req_bytes; builder.req_nested_enum = req_nested_enum; builder.req_nested_message = req_nested_message; builder.rep_int32 = Internal.copyOf(rep_int32); builder.rep_uint32 = Internal.copyOf(rep_uint32); builder.rep_sint32 = Internal.copyOf(rep_sint32); builder.rep_fixed32 = Internal.copyOf(rep_fixed32); builder.rep_sfixed32 = Internal.copyOf(rep_sfixed32); builder.rep_int64 = Internal.copyOf(rep_int64); builder.rep_uint64 = Internal.copyOf(rep_uint64); builder.rep_sint64 = Internal.copyOf(rep_sint64); builder.rep_fixed64 = Internal.copyOf(rep_fixed64); builder.rep_sfixed64 = Internal.copyOf(rep_sfixed64); builder.rep_bool = Internal.copyOf(rep_bool); builder.rep_float = Internal.copyOf(rep_float); builder.rep_double = Internal.copyOf(rep_double); builder.rep_string = Internal.copyOf(rep_string); builder.rep_bytes = Internal.copyOf(rep_bytes); builder.rep_nested_enum = Internal.copyOf(rep_nested_enum); builder.rep_nested_message = Internal.copyOf(rep_nested_message); builder.pack_int32 = Internal.copyOf(pack_int32); builder.pack_uint32 = Internal.copyOf(pack_uint32); builder.pack_sint32 = Internal.copyOf(pack_sint32); builder.pack_fixed32 = Internal.copyOf(pack_fixed32); builder.pack_sfixed32 = Internal.copyOf(pack_sfixed32); builder.pack_int64 = Internal.copyOf(pack_int64); builder.pack_uint64 = Internal.copyOf(pack_uint64); builder.pack_sint64 = Internal.copyOf(pack_sint64); builder.pack_fixed64 = Internal.copyOf(pack_fixed64); builder.pack_sfixed64 = Internal.copyOf(pack_sfixed64); builder.pack_bool = Internal.copyOf(pack_bool); builder.pack_float = Internal.copyOf(pack_float); builder.pack_double = Internal.copyOf(pack_double); builder.pack_nested_enum = Internal.copyOf(pack_nested_enum); builder.default_int32 = default_int32; builder.default_uint32 = default_uint32; builder.default_sint32 = default_sint32; builder.default_fixed32 = default_fixed32; builder.default_sfixed32 = default_sfixed32; builder.default_int64 = default_int64; builder.default_uint64 = default_uint64; builder.default_sint64 = default_sint64; builder.default_fixed64 = default_fixed64; builder.default_sfixed64 = default_sfixed64; builder.default_bool = default_bool; builder.default_float = default_float; builder.default_double = default_double; builder.default_string = default_string; builder.default_bytes = default_bytes; builder.default_nested_enum = default_nested_enum; builder.map_int32_int32 = Internal.copyOf(map_int32_int32); builder.map_string_string = Internal.copyOf(map_string_string); builder.map_string_message = Internal.copyOf(map_string_message); builder.map_string_enum = Internal.copyOf(map_string_enum); builder.ext_opt_int32 = ext_opt_int32; builder.ext_opt_uint32 = ext_opt_uint32; builder.ext_opt_sint32 = ext_opt_sint32; builder.ext_opt_fixed32 = ext_opt_fixed32; builder.ext_opt_sfixed32 = ext_opt_sfixed32; builder.ext_opt_int64 = ext_opt_int64; builder.ext_opt_uint64 = ext_opt_uint64; builder.ext_opt_sint64 = ext_opt_sint64; builder.ext_opt_fixed64 = ext_opt_fixed64; builder.ext_opt_sfixed64 = ext_opt_sfixed64; builder.ext_opt_bool = ext_opt_bool; builder.ext_opt_float = ext_opt_float; builder.ext_opt_double = ext_opt_double; builder.ext_opt_string = ext_opt_string; builder.ext_opt_bytes = ext_opt_bytes; builder.ext_opt_nested_enum = ext_opt_nested_enum; builder.ext_opt_nested_message = ext_opt_nested_message; builder.ext_rep_int32 = Internal.copyOf(ext_rep_int32); builder.ext_rep_uint32 = Internal.copyOf(ext_rep_uint32); builder.ext_rep_sint32 = Internal.copyOf(ext_rep_sint32); builder.ext_rep_fixed32 = Internal.copyOf(ext_rep_fixed32); builder.ext_rep_sfixed32 = Internal.copyOf(ext_rep_sfixed32); builder.ext_rep_int64 = Internal.copyOf(ext_rep_int64); builder.ext_rep_uint64 = Internal.copyOf(ext_rep_uint64); builder.ext_rep_sint64 = Internal.copyOf(ext_rep_sint64); builder.ext_rep_fixed64 = Internal.copyOf(ext_rep_fixed64); builder.ext_rep_sfixed64 = Internal.copyOf(ext_rep_sfixed64); builder.ext_rep_bool = Internal.copyOf(ext_rep_bool); builder.ext_rep_float = Internal.copyOf(ext_rep_float); builder.ext_rep_double = Internal.copyOf(ext_rep_double); builder.ext_rep_string = Internal.copyOf(ext_rep_string); builder.ext_rep_bytes = Internal.copyOf(ext_rep_bytes); builder.ext_rep_nested_enum = Internal.copyOf(ext_rep_nested_enum); builder.ext_rep_nested_message = Internal.copyOf(ext_rep_nested_message); builder.ext_pack_int32 = Internal.copyOf(ext_pack_int32); builder.ext_pack_uint32 = Internal.copyOf(ext_pack_uint32); builder.ext_pack_sint32 = Internal.copyOf(ext_pack_sint32); builder.ext_pack_fixed32 = Internal.copyOf(ext_pack_fixed32); builder.ext_pack_sfixed32 = Internal.copyOf(ext_pack_sfixed32); builder.ext_pack_int64 = Internal.copyOf(ext_pack_int64); builder.ext_pack_uint64 = Internal.copyOf(ext_pack_uint64); builder.ext_pack_sint64 = Internal.copyOf(ext_pack_sint64); builder.ext_pack_fixed64 = Internal.copyOf(ext_pack_fixed64); builder.ext_pack_sfixed64 = Internal.copyOf(ext_pack_sfixed64); builder.ext_pack_bool = Internal.copyOf(ext_pack_bool); builder.ext_pack_float = Internal.copyOf(ext_pack_float); builder.ext_pack_double = Internal.copyOf(ext_pack_double); builder.ext_pack_nested_enum = Internal.copyOf(ext_pack_nested_enum); builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof AllTypes)) return false; AllTypes o = (AllTypes) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(opt_int32, o.opt_int32) && Internal.equals(opt_uint32, o.opt_uint32) && Internal.equals(opt_sint32, o.opt_sint32) && Internal.equals(opt_fixed32, o.opt_fixed32) && Internal.equals(opt_sfixed32, o.opt_sfixed32) && Internal.equals(opt_int64, o.opt_int64) && Internal.equals(opt_uint64, o.opt_uint64) && Internal.equals(opt_sint64, o.opt_sint64) && Internal.equals(opt_fixed64, o.opt_fixed64) && Internal.equals(opt_sfixed64, o.opt_sfixed64) && Internal.equals(opt_bool, o.opt_bool) && Internal.equals(opt_float, o.opt_float) && Internal.equals(opt_double, o.opt_double) && Internal.equals(opt_string, o.opt_string) && Internal.equals(opt_bytes, o.opt_bytes) && Internal.equals(opt_nested_enum, o.opt_nested_enum) && Internal.equals(opt_nested_message, o.opt_nested_message) && req_int32.equals(o.req_int32) && req_uint32.equals(o.req_uint32) && req_sint32.equals(o.req_sint32) && req_fixed32.equals(o.req_fixed32) && req_sfixed32.equals(o.req_sfixed32) && req_int64.equals(o.req_int64) && req_uint64.equals(o.req_uint64) && req_sint64.equals(o.req_sint64) && req_fixed64.equals(o.req_fixed64) && req_sfixed64.equals(o.req_sfixed64) && req_bool.equals(o.req_bool) && req_float.equals(o.req_float) && req_double.equals(o.req_double) && req_string.equals(o.req_string) && req_bytes.equals(o.req_bytes) && req_nested_enum.equals(o.req_nested_enum) && req_nested_message.equals(o.req_nested_message) && rep_int32.equals(o.rep_int32) && rep_uint32.equals(o.rep_uint32) && rep_sint32.equals(o.rep_sint32) && rep_fixed32.equals(o.rep_fixed32) && rep_sfixed32.equals(o.rep_sfixed32) && rep_int64.equals(o.rep_int64) && rep_uint64.equals(o.rep_uint64) && rep_sint64.equals(o.rep_sint64) && rep_fixed64.equals(o.rep_fixed64) && rep_sfixed64.equals(o.rep_sfixed64) && rep_bool.equals(o.rep_bool) && rep_float.equals(o.rep_float) && rep_double.equals(o.rep_double) && rep_string.equals(o.rep_string) && rep_bytes.equals(o.rep_bytes) && rep_nested_enum.equals(o.rep_nested_enum) && rep_nested_message.equals(o.rep_nested_message) && pack_int32.equals(o.pack_int32) && pack_uint32.equals(o.pack_uint32) && pack_sint32.equals(o.pack_sint32) && pack_fixed32.equals(o.pack_fixed32) && pack_sfixed32.equals(o.pack_sfixed32) && pack_int64.equals(o.pack_int64) && pack_uint64.equals(o.pack_uint64) && pack_sint64.equals(o.pack_sint64) && pack_fixed64.equals(o.pack_fixed64) && pack_sfixed64.equals(o.pack_sfixed64) && pack_bool.equals(o.pack_bool) && pack_float.equals(o.pack_float) && pack_double.equals(o.pack_double) && pack_nested_enum.equals(o.pack_nested_enum) && Internal.equals(default_int32, o.default_int32) && Internal.equals(default_uint32, o.default_uint32) && Internal.equals(default_sint32, o.default_sint32) && Internal.equals(default_fixed32, o.default_fixed32) && Internal.equals(default_sfixed32, o.default_sfixed32) && Internal.equals(default_int64, o.default_int64) && Internal.equals(default_uint64, o.default_uint64) && Internal.equals(default_sint64, o.default_sint64) && Internal.equals(default_fixed64, o.default_fixed64) && Internal.equals(default_sfixed64, o.default_sfixed64) && Internal.equals(default_bool, o.default_bool) && Internal.equals(default_float, o.default_float) && Internal.equals(default_double, o.default_double) && Internal.equals(default_string, o.default_string) && Internal.equals(default_bytes, o.default_bytes) && Internal.equals(default_nested_enum, o.default_nested_enum) && map_int32_int32.equals(o.map_int32_int32) && map_string_string.equals(o.map_string_string) && map_string_message.equals(o.map_string_message) && map_string_enum.equals(o.map_string_enum) && Internal.equals(ext_opt_int32, o.ext_opt_int32) && Internal.equals(ext_opt_uint32, o.ext_opt_uint32) && Internal.equals(ext_opt_sint32, o.ext_opt_sint32) && Internal.equals(ext_opt_fixed32, o.ext_opt_fixed32) && Internal.equals(ext_opt_sfixed32, o.ext_opt_sfixed32) && Internal.equals(ext_opt_int64, o.ext_opt_int64) && Internal.equals(ext_opt_uint64, o.ext_opt_uint64) && Internal.equals(ext_opt_sint64, o.ext_opt_sint64) && Internal.equals(ext_opt_fixed64, o.ext_opt_fixed64) && Internal.equals(ext_opt_sfixed64, o.ext_opt_sfixed64) && Internal.equals(ext_opt_bool, o.ext_opt_bool) && Internal.equals(ext_opt_float, o.ext_opt_float) && Internal.equals(ext_opt_double, o.ext_opt_double) && Internal.equals(ext_opt_string, o.ext_opt_string) && Internal.equals(ext_opt_bytes, o.ext_opt_bytes) && Internal.equals(ext_opt_nested_enum, o.ext_opt_nested_enum) && Internal.equals(ext_opt_nested_message, o.ext_opt_nested_message) && ext_rep_int32.equals(o.ext_rep_int32) && ext_rep_uint32.equals(o.ext_rep_uint32) && ext_rep_sint32.equals(o.ext_rep_sint32) && ext_rep_fixed32.equals(o.ext_rep_fixed32) && ext_rep_sfixed32.equals(o.ext_rep_sfixed32) && ext_rep_int64.equals(o.ext_rep_int64) && ext_rep_uint64.equals(o.ext_rep_uint64) && ext_rep_sint64.equals(o.ext_rep_sint64) && ext_rep_fixed64.equals(o.ext_rep_fixed64) && ext_rep_sfixed64.equals(o.ext_rep_sfixed64) && ext_rep_bool.equals(o.ext_rep_bool) && ext_rep_float.equals(o.ext_rep_float) && ext_rep_double.equals(o.ext_rep_double) && ext_rep_string.equals(o.ext_rep_string) && ext_rep_bytes.equals(o.ext_rep_bytes) && ext_rep_nested_enum.equals(o.ext_rep_nested_enum) && ext_rep_nested_message.equals(o.ext_rep_nested_message) && ext_pack_int32.equals(o.ext_pack_int32) && ext_pack_uint32.equals(o.ext_pack_uint32) && ext_pack_sint32.equals(o.ext_pack_sint32) && ext_pack_fixed32.equals(o.ext_pack_fixed32) && ext_pack_sfixed32.equals(o.ext_pack_sfixed32) && ext_pack_int64.equals(o.ext_pack_int64) && ext_pack_uint64.equals(o.ext_pack_uint64) && ext_pack_sint64.equals(o.ext_pack_sint64) && ext_pack_fixed64.equals(o.ext_pack_fixed64) && ext_pack_sfixed64.equals(o.ext_pack_sfixed64) && ext_pack_bool.equals(o.ext_pack_bool) && ext_pack_float.equals(o.ext_pack_float) && ext_pack_double.equals(o.ext_pack_double) && ext_pack_nested_enum.equals(o.ext_pack_nested_enum); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + (opt_int32 != null ? opt_int32.hashCode() : 0); result = result * 37 + (opt_uint32 != null ? opt_uint32.hashCode() : 0); result = result * 37 + (opt_sint32 != null ? opt_sint32.hashCode() : 0); result = result * 37 + (opt_fixed32 != null ? opt_fixed32.hashCode() : 0); result = result * 37 + (opt_sfixed32 != null ? opt_sfixed32.hashCode() : 0); result = result * 37 + (opt_int64 != null ? opt_int64.hashCode() : 0); result = result * 37 + (opt_uint64 != null ? opt_uint64.hashCode() : 0); result = result * 37 + (opt_sint64 != null ? opt_sint64.hashCode() : 0); result = result * 37 + (opt_fixed64 != null ? opt_fixed64.hashCode() : 0); result = result * 37 + (opt_sfixed64 != null ? opt_sfixed64.hashCode() : 0); result = result * 37 + (opt_bool != null ? opt_bool.hashCode() : 0); result = result * 37 + (opt_float != null ? opt_float.hashCode() : 0); result = result * 37 + (opt_double != null ? opt_double.hashCode() : 0); result = result * 37 + (opt_string != null ? opt_string.hashCode() : 0); result = result * 37 + (opt_bytes != null ? opt_bytes.hashCode() : 0); result = result * 37 + (opt_nested_enum != null ? opt_nested_enum.hashCode() : 0); result = result * 37 + (opt_nested_message != null ? opt_nested_message.hashCode() : 0); result = result * 37 + req_int32.hashCode(); result = result * 37 + req_uint32.hashCode(); result = result * 37 + req_sint32.hashCode(); result = result * 37 + req_fixed32.hashCode(); result = result * 37 + req_sfixed32.hashCode(); result = result * 37 + req_int64.hashCode(); result = result * 37 + req_uint64.hashCode(); result = result * 37 + req_sint64.hashCode(); result = result * 37 + req_fixed64.hashCode(); result = result * 37 + req_sfixed64.hashCode(); result = result * 37 + req_bool.hashCode(); result = result * 37 + req_float.hashCode(); result = result * 37 + req_double.hashCode(); result = result * 37 + req_string.hashCode(); result = result * 37 + req_bytes.hashCode(); result = result * 37 + req_nested_enum.hashCode(); result = result * 37 + req_nested_message.hashCode(); result = result * 37 + rep_int32.hashCode(); result = result * 37 + rep_uint32.hashCode(); result = result * 37 + rep_sint32.hashCode(); result = result * 37 + rep_fixed32.hashCode(); result = result * 37 + rep_sfixed32.hashCode(); result = result * 37 + rep_int64.hashCode(); result = result * 37 + rep_uint64.hashCode(); result = result * 37 + rep_sint64.hashCode(); result = result * 37 + rep_fixed64.hashCode(); result = result * 37 + rep_sfixed64.hashCode(); result = result * 37 + rep_bool.hashCode(); result = result * 37 + rep_float.hashCode(); result = result * 37 + rep_double.hashCode(); result = result * 37 + rep_string.hashCode(); result = result * 37 + rep_bytes.hashCode(); result = result * 37 + rep_nested_enum.hashCode(); result = result * 37 + rep_nested_message.hashCode(); result = result * 37 + pack_int32.hashCode(); result = result * 37 + pack_uint32.hashCode(); result = result * 37 + pack_sint32.hashCode(); result = result * 37 + pack_fixed32.hashCode(); result = result * 37 + pack_sfixed32.hashCode(); result = result * 37 + pack_int64.hashCode(); result = result * 37 + pack_uint64.hashCode(); result = result * 37 + pack_sint64.hashCode(); result = result * 37 + pack_fixed64.hashCode(); result = result * 37 + pack_sfixed64.hashCode(); result = result * 37 + pack_bool.hashCode(); result = result * 37 + pack_float.hashCode(); result = result * 37 + pack_double.hashCode(); result = result * 37 + pack_nested_enum.hashCode(); result = result * 37 + (default_int32 != null ? default_int32.hashCode() : 0); result = result * 37 + (default_uint32 != null ? default_uint32.hashCode() : 0); result = result * 37 + (default_sint32 != null ? default_sint32.hashCode() : 0); result = result * 37 + (default_fixed32 != null ? default_fixed32.hashCode() : 0); result = result * 37 + (default_sfixed32 != null ? default_sfixed32.hashCode() : 0); result = result * 37 + (default_int64 != null ? default_int64.hashCode() : 0); result = result * 37 + (default_uint64 != null ? default_uint64.hashCode() : 0); result = result * 37 + (default_sint64 != null ? default_sint64.hashCode() : 0); result = result * 37 + (default_fixed64 != null ? default_fixed64.hashCode() : 0); result = result * 37 + (default_sfixed64 != null ? default_sfixed64.hashCode() : 0); result = result * 37 + (default_bool != null ? default_bool.hashCode() : 0); result = result * 37 + (default_float != null ? default_float.hashCode() : 0); result = result * 37 + (default_double != null ? default_double.hashCode() : 0); result = result * 37 + (default_string != null ? default_string.hashCode() : 0); result = result * 37 + (default_bytes != null ? default_bytes.hashCode() : 0); result = result * 37 + (default_nested_enum != null ? default_nested_enum.hashCode() : 0); result = result * 37 + map_int32_int32.hashCode(); result = result * 37 + map_string_string.hashCode(); result = result * 37 + map_string_message.hashCode(); result = result * 37 + map_string_enum.hashCode(); result = result * 37 + (ext_opt_int32 != null ? ext_opt_int32.hashCode() : 0); result = result * 37 + (ext_opt_uint32 != null ? ext_opt_uint32.hashCode() : 0); result = result * 37 + (ext_opt_sint32 != null ? ext_opt_sint32.hashCode() : 0); result = result * 37 + (ext_opt_fixed32 != null ? ext_opt_fixed32.hashCode() : 0); result = result * 37 + (ext_opt_sfixed32 != null ? ext_opt_sfixed32.hashCode() : 0); result = result * 37 + (ext_opt_int64 != null ? ext_opt_int64.hashCode() : 0); result = result * 37 + (ext_opt_uint64 != null ? ext_opt_uint64.hashCode() : 0); result = result * 37 + (ext_opt_sint64 != null ? ext_opt_sint64.hashCode() : 0); result = result * 37 + (ext_opt_fixed64 != null ? ext_opt_fixed64.hashCode() : 0); result = result * 37 + (ext_opt_sfixed64 != null ? ext_opt_sfixed64.hashCode() : 0); result = result * 37 + (ext_opt_bool != null ? ext_opt_bool.hashCode() : 0); result = result * 37 + (ext_opt_float != null ? ext_opt_float.hashCode() : 0); result = result * 37 + (ext_opt_double != null ? ext_opt_double.hashCode() : 0); result = result * 37 + (ext_opt_string != null ? ext_opt_string.hashCode() : 0); result = result * 37 + (ext_opt_bytes != null ? ext_opt_bytes.hashCode() : 0); result = result * 37 + (ext_opt_nested_enum != null ? ext_opt_nested_enum.hashCode() : 0); result = result * 37 + (ext_opt_nested_message != null ? ext_opt_nested_message.hashCode() : 0); result = result * 37 + ext_rep_int32.hashCode(); result = result * 37 + ext_rep_uint32.hashCode(); result = result * 37 + ext_rep_sint32.hashCode(); result = result * 37 + ext_rep_fixed32.hashCode(); result = result * 37 + ext_rep_sfixed32.hashCode(); result = result * 37 + ext_rep_int64.hashCode(); result = result * 37 + ext_rep_uint64.hashCode(); result = result * 37 + ext_rep_sint64.hashCode(); result = result * 37 + ext_rep_fixed64.hashCode(); result = result * 37 + ext_rep_sfixed64.hashCode(); result = result * 37 + ext_rep_bool.hashCode(); result = result * 37 + ext_rep_float.hashCode(); result = result * 37 + ext_rep_double.hashCode(); result = result * 37 + ext_rep_string.hashCode(); result = result * 37 + ext_rep_bytes.hashCode(); result = result * 37 + ext_rep_nested_enum.hashCode(); result = result * 37 + ext_rep_nested_message.hashCode(); result = result * 37 + ext_pack_int32.hashCode(); result = result * 37 + ext_pack_uint32.hashCode(); result = result * 37 + ext_pack_sint32.hashCode(); result = result * 37 + ext_pack_fixed32.hashCode(); result = result * 37 + ext_pack_sfixed32.hashCode(); result = result * 37 + ext_pack_int64.hashCode(); result = result * 37 + ext_pack_uint64.hashCode(); result = result * 37 + ext_pack_sint64.hashCode(); result = result * 37 + ext_pack_fixed64.hashCode(); result = result * 37 + ext_pack_sfixed64.hashCode(); result = result * 37 + ext_pack_bool.hashCode(); result = result * 37 + ext_pack_float.hashCode(); result = result * 37 + ext_pack_double.hashCode(); result = result * 37 + ext_pack_nested_enum.hashCode(); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (opt_int32 != null) builder.append(", opt_int32=").append(opt_int32); if (opt_uint32 != null) builder.append(", opt_uint32=").append(opt_uint32); if (opt_sint32 != null) builder.append(", opt_sint32=").append(opt_sint32); if (opt_fixed32 != null) builder.append(", opt_fixed32=").append(opt_fixed32); if (opt_sfixed32 != null) builder.append(", opt_sfixed32=").append(opt_sfixed32); if (opt_int64 != null) builder.append(", opt_int64=").append(opt_int64); if (opt_uint64 != null) builder.append(", opt_uint64=").append(opt_uint64); if (opt_sint64 != null) builder.append(", opt_sint64=").append(opt_sint64); if (opt_fixed64 != null) builder.append(", opt_fixed64=").append(opt_fixed64); if (opt_sfixed64 != null) builder.append(", opt_sfixed64=").append(opt_sfixed64); if (opt_bool != null) builder.append(", opt_bool=").append(opt_bool); if (opt_float != null) builder.append(", opt_float=").append(opt_float); if (opt_double != null) builder.append(", opt_double=").append(opt_double); if (opt_string != null) builder.append(", opt_string=").append(Internal.sanitize(opt_string)); if (opt_bytes != null) builder.append(", opt_bytes=").append(opt_bytes); if (opt_nested_enum != null) builder.append(", opt_nested_enum=").append(opt_nested_enum); if (opt_nested_message != null) builder.append(", opt_nested_message=").append(opt_nested_message); builder.append(", req_int32=").append(req_int32); builder.append(", req_uint32=").append(req_uint32); builder.append(", req_sint32=").append(req_sint32); builder.append(", req_fixed32=").append(req_fixed32); builder.append(", req_sfixed32=").append(req_sfixed32); builder.append(", req_int64=").append(req_int64); builder.append(", req_uint64=").append(req_uint64); builder.append(", req_sint64=").append(req_sint64); builder.append(", req_fixed64=").append(req_fixed64); builder.append(", req_sfixed64=").append(req_sfixed64); builder.append(", req_bool=").append(req_bool); builder.append(", req_float=").append(req_float); builder.append(", req_double=").append(req_double); builder.append(", req_string=").append(Internal.sanitize(req_string)); builder.append(", req_bytes=").append(req_bytes); builder.append(", req_nested_enum=").append(req_nested_enum); builder.append(", req_nested_message=").append(req_nested_message); if (!rep_int32.isEmpty()) builder.append(", rep_int32=").append(rep_int32); if (!rep_uint32.isEmpty()) builder.append(", rep_uint32=").append(rep_uint32); if (!rep_sint32.isEmpty()) builder.append(", rep_sint32=").append(rep_sint32); if (!rep_fixed32.isEmpty()) builder.append(", rep_fixed32=").append(rep_fixed32); if (!rep_sfixed32.isEmpty()) builder.append(", rep_sfixed32=").append(rep_sfixed32); if (!rep_int64.isEmpty()) builder.append(", rep_int64=").append(rep_int64); if (!rep_uint64.isEmpty()) builder.append(", rep_uint64=").append(rep_uint64); if (!rep_sint64.isEmpty()) builder.append(", rep_sint64=").append(rep_sint64); if (!rep_fixed64.isEmpty()) builder.append(", rep_fixed64=").append(rep_fixed64); if (!rep_sfixed64.isEmpty()) builder.append(", rep_sfixed64=").append(rep_sfixed64); if (!rep_bool.isEmpty()) builder.append(", rep_bool=").append(rep_bool); if (!rep_float.isEmpty()) builder.append(", rep_float=").append(rep_float); if (!rep_double.isEmpty()) builder.append(", rep_double=").append(rep_double); if (!rep_string.isEmpty()) builder.append(", rep_string=").append(Internal.sanitize(rep_string)); if (!rep_bytes.isEmpty()) builder.append(", rep_bytes=").append(rep_bytes); if (!rep_nested_enum.isEmpty()) builder.append(", rep_nested_enum=").append(rep_nested_enum); if (!rep_nested_message.isEmpty()) builder.append(", rep_nested_message=").append(rep_nested_message); if (!pack_int32.isEmpty()) builder.append(", pack_int32=").append(pack_int32); if (!pack_uint32.isEmpty()) builder.append(", pack_uint32=").append(pack_uint32); if (!pack_sint32.isEmpty()) builder.append(", pack_sint32=").append(pack_sint32); if (!pack_fixed32.isEmpty()) builder.append(", pack_fixed32=").append(pack_fixed32); if (!pack_sfixed32.isEmpty()) builder.append(", pack_sfixed32=").append(pack_sfixed32); if (!pack_int64.isEmpty()) builder.append(", pack_int64=").append(pack_int64); if (!pack_uint64.isEmpty()) builder.append(", pack_uint64=").append(pack_uint64); if (!pack_sint64.isEmpty()) builder.append(", pack_sint64=").append(pack_sint64); if (!pack_fixed64.isEmpty()) builder.append(", pack_fixed64=").append(pack_fixed64); if (!pack_sfixed64.isEmpty()) builder.append(", pack_sfixed64=").append(pack_sfixed64); if (!pack_bool.isEmpty()) builder.append(", pack_bool=").append(pack_bool); if (!pack_float.isEmpty()) builder.append(", pack_float=").append(pack_float); if (!pack_double.isEmpty()) builder.append(", pack_double=").append(pack_double); if (!pack_nested_enum.isEmpty()) builder.append(", pack_nested_enum=").append(pack_nested_enum); if (default_int32 != null) builder.append(", default_int32=").append(default_int32); if (default_uint32 != null) builder.append(", default_uint32=").append(default_uint32); if (default_sint32 != null) builder.append(", default_sint32=").append(default_sint32); if (default_fixed32 != null) builder.append(", default_fixed32=").append(default_fixed32); if (default_sfixed32 != null) builder.append(", default_sfixed32=").append(default_sfixed32); if (default_int64 != null) builder.append(", default_int64=").append(default_int64); if (default_uint64 != null) builder.append(", default_uint64=").append(default_uint64); if (default_sint64 != null) builder.append(", default_sint64=").append(default_sint64); if (default_fixed64 != null) builder.append(", default_fixed64=").append(default_fixed64); if (default_sfixed64 != null) builder.append(", default_sfixed64=").append(default_sfixed64); if (default_bool != null) builder.append(", default_bool=").append(default_bool); if (default_float != null) builder.append(", default_float=").append(default_float); if (default_double != null) builder.append(", default_double=").append(default_double); if (default_string != null) builder.append(", default_string=").append(Internal.sanitize(default_string)); if (default_bytes != null) builder.append(", default_bytes=").append(default_bytes); if (default_nested_enum != null) builder.append(", default_nested_enum=").append(default_nested_enum); if (!map_int32_int32.isEmpty()) builder.append(", map_int32_int32=").append(map_int32_int32); if (!map_string_string.isEmpty()) builder.append(", map_string_string=").append(map_string_string); if (!map_string_message.isEmpty()) builder.append(", map_string_message=").append(map_string_message); if (!map_string_enum.isEmpty()) builder.append(", map_string_enum=").append(map_string_enum); if (ext_opt_int32 != null) builder.append(", ext_opt_int32=").append(ext_opt_int32); if (ext_opt_uint32 != null) builder.append(", ext_opt_uint32=").append(ext_opt_uint32); if (ext_opt_sint32 != null) builder.append(", ext_opt_sint32=").append(ext_opt_sint32); if (ext_opt_fixed32 != null) builder.append(", ext_opt_fixed32=").append(ext_opt_fixed32); if (ext_opt_sfixed32 != null) builder.append(", ext_opt_sfixed32=").append(ext_opt_sfixed32); if (ext_opt_int64 != null) builder.append(", ext_opt_int64=").append(ext_opt_int64); if (ext_opt_uint64 != null) builder.append(", ext_opt_uint64=").append(ext_opt_uint64); if (ext_opt_sint64 != null) builder.append(", ext_opt_sint64=").append(ext_opt_sint64); if (ext_opt_fixed64 != null) builder.append(", ext_opt_fixed64=").append(ext_opt_fixed64); if (ext_opt_sfixed64 != null) builder.append(", ext_opt_sfixed64=").append(ext_opt_sfixed64); if (ext_opt_bool != null) builder.append(", ext_opt_bool=").append(ext_opt_bool); if (ext_opt_float != null) builder.append(", ext_opt_float=").append(ext_opt_float); if (ext_opt_double != null) builder.append(", ext_opt_double=").append(ext_opt_double); if (ext_opt_string != null) builder.append(", ext_opt_string=").append(Internal.sanitize(ext_opt_string)); if (ext_opt_bytes != null) builder.append(", ext_opt_bytes=").append(ext_opt_bytes); if (ext_opt_nested_enum != null) builder.append(", ext_opt_nested_enum=").append(ext_opt_nested_enum); if (ext_opt_nested_message != null) builder.append(", ext_opt_nested_message=").append(ext_opt_nested_message); if (!ext_rep_int32.isEmpty()) builder.append(", ext_rep_int32=").append(ext_rep_int32); if (!ext_rep_uint32.isEmpty()) builder.append(", ext_rep_uint32=").append(ext_rep_uint32); if (!ext_rep_sint32.isEmpty()) builder.append(", ext_rep_sint32=").append(ext_rep_sint32); if (!ext_rep_fixed32.isEmpty()) builder.append(", ext_rep_fixed32=").append(ext_rep_fixed32); if (!ext_rep_sfixed32.isEmpty()) builder.append(", ext_rep_sfixed32=").append(ext_rep_sfixed32); if (!ext_rep_int64.isEmpty()) builder.append(", ext_rep_int64=").append(ext_rep_int64); if (!ext_rep_uint64.isEmpty()) builder.append(", ext_rep_uint64=").append(ext_rep_uint64); if (!ext_rep_sint64.isEmpty()) builder.append(", ext_rep_sint64=").append(ext_rep_sint64); if (!ext_rep_fixed64.isEmpty()) builder.append(", ext_rep_fixed64=").append(ext_rep_fixed64); if (!ext_rep_sfixed64.isEmpty()) builder.append(", ext_rep_sfixed64=").append(ext_rep_sfixed64); if (!ext_rep_bool.isEmpty()) builder.append(", ext_rep_bool=").append(ext_rep_bool); if (!ext_rep_float.isEmpty()) builder.append(", ext_rep_float=").append(ext_rep_float); if (!ext_rep_double.isEmpty()) builder.append(", ext_rep_double=").append(ext_rep_double); if (!ext_rep_string.isEmpty()) builder.append(", ext_rep_string=").append(Internal.sanitize(ext_rep_string)); if (!ext_rep_bytes.isEmpty()) builder.append(", ext_rep_bytes=").append(ext_rep_bytes); if (!ext_rep_nested_enum.isEmpty()) builder.append(", ext_rep_nested_enum=").append(ext_rep_nested_enum); if (!ext_rep_nested_message.isEmpty()) builder.append(", ext_rep_nested_message=").append(ext_rep_nested_message); if (!ext_pack_int32.isEmpty()) builder.append(", ext_pack_int32=").append(ext_pack_int32); if (!ext_pack_uint32.isEmpty()) builder.append(", ext_pack_uint32=").append(ext_pack_uint32); if (!ext_pack_sint32.isEmpty()) builder.append(", ext_pack_sint32=").append(ext_pack_sint32); if (!ext_pack_fixed32.isEmpty()) builder.append(", ext_pack_fixed32=").append(ext_pack_fixed32); if (!ext_pack_sfixed32.isEmpty()) builder.append(", ext_pack_sfixed32=").append(ext_pack_sfixed32); if (!ext_pack_int64.isEmpty()) builder.append(", ext_pack_int64=").append(ext_pack_int64); if (!ext_pack_uint64.isEmpty()) builder.append(", ext_pack_uint64=").append(ext_pack_uint64); if (!ext_pack_sint64.isEmpty()) builder.append(", ext_pack_sint64=").append(ext_pack_sint64); if (!ext_pack_fixed64.isEmpty()) builder.append(", ext_pack_fixed64=").append(ext_pack_fixed64); if (!ext_pack_sfixed64.isEmpty()) builder.append(", ext_pack_sfixed64=").append(ext_pack_sfixed64); if (!ext_pack_bool.isEmpty()) builder.append(", ext_pack_bool=").append(ext_pack_bool); if (!ext_pack_float.isEmpty()) builder.append(", ext_pack_float=").append(ext_pack_float); if (!ext_pack_double.isEmpty()) builder.append(", ext_pack_double=").append(ext_pack_double); if (!ext_pack_nested_enum.isEmpty()) builder.append(", ext_pack_nested_enum=").append(ext_pack_nested_enum); return builder.replace(0, 2, "AllTypes{").append('}').toString(); } public static final class Builder extends Message.Builder<AllTypes, Builder> { public Integer opt_int32; public Integer opt_uint32; public Integer opt_sint32; public Integer opt_fixed32; public Integer opt_sfixed32; public Long opt_int64; public Long opt_uint64; public Long opt_sint64; public Long opt_fixed64; public Long opt_sfixed64; public Boolean opt_bool; public Float opt_float; public Double opt_double; public String opt_string; public ByteString opt_bytes; public NestedEnum opt_nested_enum; public NestedMessage opt_nested_message; public Integer req_int32; public Integer req_uint32; public Integer req_sint32; public Integer req_fixed32; public Integer req_sfixed32; public Long req_int64; public Long req_uint64; public Long req_sint64; public Long req_fixed64; public Long req_sfixed64; public Boolean req_bool; public Float req_float; public Double req_double; public String req_string; public ByteString req_bytes; public NestedEnum req_nested_enum; public NestedMessage req_nested_message; public List<Integer> rep_int32; public List<Integer> rep_uint32; public List<Integer> rep_sint32; public List<Integer> rep_fixed32; public List<Integer> rep_sfixed32; public List<Long> rep_int64; public List<Long> rep_uint64; public List<Long> rep_sint64; public List<Long> rep_fixed64; public List<Long> rep_sfixed64; public List<Boolean> rep_bool; public List<Float> rep_float; public List<Double> rep_double; public List<String> rep_string; public List<ByteString> rep_bytes; public List<NestedEnum> rep_nested_enum; public List<NestedMessage> rep_nested_message; public List<Integer> pack_int32; public List<Integer> pack_uint32; public List<Integer> pack_sint32; public List<Integer> pack_fixed32; public List<Integer> pack_sfixed32; public List<Long> pack_int64; public List<Long> pack_uint64; public List<Long> pack_sint64; public List<Long> pack_fixed64; public List<Long> pack_sfixed64; public List<Boolean> pack_bool; public List<Float> pack_float; public List<Double> pack_double; public List<NestedEnum> pack_nested_enum; public Integer default_int32; public Integer default_uint32; public Integer default_sint32; public Integer default_fixed32; public Integer default_sfixed32; public Long default_int64; public Long default_uint64; public Long default_sint64; public Long default_fixed64; public Long default_sfixed64; public Boolean default_bool; public Float default_float; public Double default_double; public String default_string; public ByteString default_bytes; public NestedEnum default_nested_enum; public Map<Integer, Integer> map_int32_int32; public Map<String, String> map_string_string; public Map<String, NestedMessage> map_string_message; public Map<String, NestedEnum> map_string_enum; public Integer ext_opt_int32; public Integer ext_opt_uint32; public Integer ext_opt_sint32; public Integer ext_opt_fixed32; public Integer ext_opt_sfixed32; public Long ext_opt_int64; public Long ext_opt_uint64; public Long ext_opt_sint64; public Long ext_opt_fixed64; public Long ext_opt_sfixed64; public Boolean ext_opt_bool; public Float ext_opt_float; public Double ext_opt_double; public String ext_opt_string; public ByteString ext_opt_bytes; public NestedEnum ext_opt_nested_enum; public NestedMessage ext_opt_nested_message; public List<Integer> ext_rep_int32; public List<Integer> ext_rep_uint32; public List<Integer> ext_rep_sint32; public List<Integer> ext_rep_fixed32; public List<Integer> ext_rep_sfixed32; public List<Long> ext_rep_int64; public List<Long> ext_rep_uint64; public List<Long> ext_rep_sint64; public List<Long> ext_rep_fixed64; public List<Long> ext_rep_sfixed64; public List<Boolean> ext_rep_bool; public List<Float> ext_rep_float; public List<Double> ext_rep_double; public List<String> ext_rep_string; public List<ByteString> ext_rep_bytes; public List<NestedEnum> ext_rep_nested_enum; public List<NestedMessage> ext_rep_nested_message; public List<Integer> ext_pack_int32; public List<Integer> ext_pack_uint32; public List<Integer> ext_pack_sint32; public List<Integer> ext_pack_fixed32; public List<Integer> ext_pack_sfixed32; public List<Long> ext_pack_int64; public List<Long> ext_pack_uint64; public List<Long> ext_pack_sint64; public List<Long> ext_pack_fixed64; public List<Long> ext_pack_sfixed64; public List<Boolean> ext_pack_bool; public List<Float> ext_pack_float; public List<Double> ext_pack_double; public List<NestedEnum> ext_pack_nested_enum; public Builder() { rep_int32 = Internal.newMutableList(); rep_uint32 = Internal.newMutableList(); rep_sint32 = Internal.newMutableList(); rep_fixed32 = Internal.newMutableList(); rep_sfixed32 = Internal.newMutableList(); rep_int64 = Internal.newMutableList(); rep_uint64 = Internal.newMutableList(); rep_sint64 = Internal.newMutableList(); rep_fixed64 = Internal.newMutableList(); rep_sfixed64 = Internal.newMutableList(); rep_bool = Internal.newMutableList(); rep_float = Internal.newMutableList(); rep_double = Internal.newMutableList(); rep_string = Internal.newMutableList(); rep_bytes = Internal.newMutableList(); rep_nested_enum = Internal.newMutableList(); rep_nested_message = Internal.newMutableList(); pack_int32 = Internal.newMutableList(); pack_uint32 = Internal.newMutableList(); pack_sint32 = Internal.newMutableList(); pack_fixed32 = Internal.newMutableList(); pack_sfixed32 = Internal.newMutableList(); pack_int64 = Internal.newMutableList(); pack_uint64 = Internal.newMutableList(); pack_sint64 = Internal.newMutableList(); pack_fixed64 = Internal.newMutableList(); pack_sfixed64 = Internal.newMutableList(); pack_bool = Internal.newMutableList(); pack_float = Internal.newMutableList(); pack_double = Internal.newMutableList(); pack_nested_enum = Internal.newMutableList(); map_int32_int32 = Internal.newMutableMap(); map_string_string = Internal.newMutableMap(); map_string_message = Internal.newMutableMap(); map_string_enum = Internal.newMutableMap(); ext_rep_int32 = Internal.newMutableList(); ext_rep_uint32 = Internal.newMutableList(); ext_rep_sint32 = Internal.newMutableList(); ext_rep_fixed32 = Internal.newMutableList(); ext_rep_sfixed32 = Internal.newMutableList(); ext_rep_int64 = Internal.newMutableList(); ext_rep_uint64 = Internal.newMutableList(); ext_rep_sint64 = Internal.newMutableList(); ext_rep_fixed64 = Internal.newMutableList(); ext_rep_sfixed64 = Internal.newMutableList(); ext_rep_bool = Internal.newMutableList(); ext_rep_float = Internal.newMutableList(); ext_rep_double = Internal.newMutableList(); ext_rep_string = Internal.newMutableList(); ext_rep_bytes = Internal.newMutableList(); ext_rep_nested_enum = Internal.newMutableList(); ext_rep_nested_message = Internal.newMutableList(); ext_pack_int32 = Internal.newMutableList(); ext_pack_uint32 = Internal.newMutableList(); ext_pack_sint32 = Internal.newMutableList(); ext_pack_fixed32 = Internal.newMutableList(); ext_pack_sfixed32 = Internal.newMutableList(); ext_pack_int64 = Internal.newMutableList(); ext_pack_uint64 = Internal.newMutableList(); ext_pack_sint64 = Internal.newMutableList(); ext_pack_fixed64 = Internal.newMutableList(); ext_pack_sfixed64 = Internal.newMutableList(); ext_pack_bool = Internal.newMutableList(); ext_pack_float = Internal.newMutableList(); ext_pack_double = Internal.newMutableList(); ext_pack_nested_enum = Internal.newMutableList(); } public Builder opt_int32(Integer opt_int32) { this.opt_int32 = opt_int32; return this; } public Builder opt_uint32(Integer opt_uint32) { this.opt_uint32 = opt_uint32; return this; } public Builder opt_sint32(Integer opt_sint32) { this.opt_sint32 = opt_sint32; return this; } public Builder opt_fixed32(Integer opt_fixed32) { this.opt_fixed32 = opt_fixed32; return this; } public Builder opt_sfixed32(Integer opt_sfixed32) { this.opt_sfixed32 = opt_sfixed32; return this; } public Builder opt_int64(Long opt_int64) { this.opt_int64 = opt_int64; return this; } public Builder opt_uint64(Long opt_uint64) { this.opt_uint64 = opt_uint64; return this; } public Builder opt_sint64(Long opt_sint64) { this.opt_sint64 = opt_sint64; return this; } public Builder opt_fixed64(Long opt_fixed64) { this.opt_fixed64 = opt_fixed64; return this; } public Builder opt_sfixed64(Long opt_sfixed64) { this.opt_sfixed64 = opt_sfixed64; return this; } public Builder opt_bool(Boolean opt_bool) { this.opt_bool = opt_bool; return this; } public Builder opt_float(Float opt_float) { this.opt_float = opt_float; return this; } public Builder opt_double(Double opt_double) { this.opt_double = opt_double; return this; } public Builder opt_string(String opt_string) { this.opt_string = opt_string; return this; } public Builder opt_bytes(ByteString opt_bytes) { this.opt_bytes = opt_bytes; return this; } public Builder opt_nested_enum(NestedEnum opt_nested_enum) { this.opt_nested_enum = opt_nested_enum; return this; } public Builder opt_nested_message(NestedMessage opt_nested_message) { this.opt_nested_message = opt_nested_message; return this; } public Builder req_int32(Integer req_int32) { this.req_int32 = req_int32; return this; } public Builder req_uint32(Integer req_uint32) { this.req_uint32 = req_uint32; return this; } public Builder req_sint32(Integer req_sint32) { this.req_sint32 = req_sint32; return this; } public Builder req_fixed32(Integer req_fixed32) { this.req_fixed32 = req_fixed32; return this; } public Builder req_sfixed32(Integer req_sfixed32) { this.req_sfixed32 = req_sfixed32; return this; } public Builder req_int64(Long req_int64) { this.req_int64 = req_int64; return this; } public Builder req_uint64(Long req_uint64) { this.req_uint64 = req_uint64; return this; } public Builder req_sint64(Long req_sint64) { this.req_sint64 = req_sint64; return this; } public Builder req_fixed64(Long req_fixed64) { this.req_fixed64 = req_fixed64; return this; } public Builder req_sfixed64(Long req_sfixed64) { this.req_sfixed64 = req_sfixed64; return this; } public Builder req_bool(Boolean req_bool) { this.req_bool = req_bool; return this; } public Builder req_float(Float req_float) { this.req_float = req_float; return this; } public Builder req_double(Double req_double) { this.req_double = req_double; return this; } public Builder req_string(String req_string) { this.req_string = req_string; return this; } public Builder req_bytes(ByteString req_bytes) { this.req_bytes = req_bytes; return this; } public Builder req_nested_enum(NestedEnum req_nested_enum) { this.req_nested_enum = req_nested_enum; return this; } public Builder req_nested_message(NestedMessage req_nested_message) { this.req_nested_message = req_nested_message; return this; } public Builder rep_int32(List<Integer> rep_int32) { Internal.checkElementsNotNull(rep_int32); this.rep_int32 = rep_int32; return this; } public Builder rep_uint32(List<Integer> rep_uint32) { Internal.checkElementsNotNull(rep_uint32); this.rep_uint32 = rep_uint32; return this; } public Builder rep_sint32(List<Integer> rep_sint32) { Internal.checkElementsNotNull(rep_sint32); this.rep_sint32 = rep_sint32; return this; } public Builder rep_fixed32(List<Integer> rep_fixed32) { Internal.checkElementsNotNull(rep_fixed32); this.rep_fixed32 = rep_fixed32; return this; } public Builder rep_sfixed32(List<Integer> rep_sfixed32) { Internal.checkElementsNotNull(rep_sfixed32); this.rep_sfixed32 = rep_sfixed32; return this; } public Builder rep_int64(List<Long> rep_int64) { Internal.checkElementsNotNull(rep_int64); this.rep_int64 = rep_int64; return this; } public Builder rep_uint64(List<Long> rep_uint64) { Internal.checkElementsNotNull(rep_uint64); this.rep_uint64 = rep_uint64; return this; } public Builder rep_sint64(List<Long> rep_sint64) { Internal.checkElementsNotNull(rep_sint64); this.rep_sint64 = rep_sint64; return this; } public Builder rep_fixed64(List<Long> rep_fixed64) { Internal.checkElementsNotNull(rep_fixed64); this.rep_fixed64 = rep_fixed64; return this; } public Builder rep_sfixed64(List<Long> rep_sfixed64) { Internal.checkElementsNotNull(rep_sfixed64); this.rep_sfixed64 = rep_sfixed64; return this; } public Builder rep_bool(List<Boolean> rep_bool) { Internal.checkElementsNotNull(rep_bool); this.rep_bool = rep_bool; return this; } public Builder rep_float(List<Float> rep_float) { Internal.checkElementsNotNull(rep_float); this.rep_float = rep_float; return this; } public Builder rep_double(List<Double> rep_double) { Internal.checkElementsNotNull(rep_double); this.rep_double = rep_double; return this; } public Builder rep_string(List<String> rep_string) { Internal.checkElementsNotNull(rep_string); this.rep_string = rep_string; return this; } public Builder rep_bytes(List<ByteString> rep_bytes) { Internal.checkElementsNotNull(rep_bytes); this.rep_bytes = rep_bytes; return this; } public Builder rep_nested_enum(List<NestedEnum> rep_nested_enum) { Internal.checkElementsNotNull(rep_nested_enum); this.rep_nested_enum = rep_nested_enum; return this; } public Builder rep_nested_message(List<NestedMessage> rep_nested_message) { Internal.checkElementsNotNull(rep_nested_message); this.rep_nested_message = rep_nested_message; return this; } public Builder pack_int32(List<Integer> pack_int32) { Internal.checkElementsNotNull(pack_int32); this.pack_int32 = pack_int32; return this; } public Builder pack_uint32(List<Integer> pack_uint32) { Internal.checkElementsNotNull(pack_uint32); this.pack_uint32 = pack_uint32; return this; } public Builder pack_sint32(List<Integer> pack_sint32) { Internal.checkElementsNotNull(pack_sint32); this.pack_sint32 = pack_sint32; return this; } public Builder pack_fixed32(List<Integer> pack_fixed32) { Internal.checkElementsNotNull(pack_fixed32); this.pack_fixed32 = pack_fixed32; return this; } public Builder pack_sfixed32(List<Integer> pack_sfixed32) { Internal.checkElementsNotNull(pack_sfixed32); this.pack_sfixed32 = pack_sfixed32; return this; } public Builder pack_int64(List<Long> pack_int64) { Internal.checkElementsNotNull(pack_int64); this.pack_int64 = pack_int64; return this; } public Builder pack_uint64(List<Long> pack_uint64) { Internal.checkElementsNotNull(pack_uint64); this.pack_uint64 = pack_uint64; return this; } public Builder pack_sint64(List<Long> pack_sint64) { Internal.checkElementsNotNull(pack_sint64); this.pack_sint64 = pack_sint64; return this; } public Builder pack_fixed64(List<Long> pack_fixed64) { Internal.checkElementsNotNull(pack_fixed64); this.pack_fixed64 = pack_fixed64; return this; } public Builder pack_sfixed64(List<Long> pack_sfixed64) { Internal.checkElementsNotNull(pack_sfixed64); this.pack_sfixed64 = pack_sfixed64; return this; } public Builder pack_bool(List<Boolean> pack_bool) { Internal.checkElementsNotNull(pack_bool); this.pack_bool = pack_bool; return this; } public Builder pack_float(List<Float> pack_float) { Internal.checkElementsNotNull(pack_float); this.pack_float = pack_float; return this; } public Builder pack_double(List<Double> pack_double) { Internal.checkElementsNotNull(pack_double); this.pack_double = pack_double; return this; } public Builder pack_nested_enum(List<NestedEnum> pack_nested_enum) { Internal.checkElementsNotNull(pack_nested_enum); this.pack_nested_enum = pack_nested_enum; return this; } public Builder default_int32(Integer default_int32) { this.default_int32 = default_int32; return this; } public Builder default_uint32(Integer default_uint32) { this.default_uint32 = default_uint32; return this; } public Builder default_sint32(Integer default_sint32) { this.default_sint32 = default_sint32; return this; } public Builder default_fixed32(Integer default_fixed32) { this.default_fixed32 = default_fixed32; return this; } public Builder default_sfixed32(Integer default_sfixed32) { this.default_sfixed32 = default_sfixed32; return this; } public Builder default_int64(Long default_int64) { this.default_int64 = default_int64; return this; } public Builder default_uint64(Long default_uint64) { this.default_uint64 = default_uint64; return this; } public Builder default_sint64(Long default_sint64) { this.default_sint64 = default_sint64; return this; } public Builder default_fixed64(Long default_fixed64) { this.default_fixed64 = default_fixed64; return this; } public Builder default_sfixed64(Long default_sfixed64) { this.default_sfixed64 = default_sfixed64; return this; } public Builder default_bool(Boolean default_bool) { this.default_bool = default_bool; return this; } public Builder default_float(Float default_float) { this.default_float = default_float; return this; } public Builder default_double(Double default_double) { this.default_double = default_double; return this; } /** * Note: protoc doesn't allow some characters of the default value. */ public Builder default_string(String default_string) { this.default_string = default_string; return this; } public Builder default_bytes(ByteString default_bytes) { this.default_bytes = default_bytes; return this; } public Builder default_nested_enum(NestedEnum default_nested_enum) { this.default_nested_enum = default_nested_enum; return this; } public Builder map_int32_int32(Map<Integer, Integer> map_int32_int32) { Internal.checkElementsNotNull(map_int32_int32); this.map_int32_int32 = map_int32_int32; return this; } public Builder map_string_string(Map<String, String> map_string_string) { Internal.checkElementsNotNull(map_string_string); this.map_string_string = map_string_string; return this; } public Builder map_string_message(Map<String, NestedMessage> map_string_message) { Internal.checkElementsNotNull(map_string_message); this.map_string_message = map_string_message; return this; } public Builder map_string_enum(Map<String, NestedEnum> map_string_enum) { Internal.checkElementsNotNull(map_string_enum); this.map_string_enum = map_string_enum; return this; } public Builder ext_opt_int32(Integer ext_opt_int32) { this.ext_opt_int32 = ext_opt_int32; return this; } public Builder ext_opt_uint32(Integer ext_opt_uint32) { this.ext_opt_uint32 = ext_opt_uint32; return this; } public Builder ext_opt_sint32(Integer ext_opt_sint32) { this.ext_opt_sint32 = ext_opt_sint32; return this; } public Builder ext_opt_fixed32(Integer ext_opt_fixed32) { this.ext_opt_fixed32 = ext_opt_fixed32; return this; } public Builder ext_opt_sfixed32(Integer ext_opt_sfixed32) { this.ext_opt_sfixed32 = ext_opt_sfixed32; return this; } public Builder ext_opt_int64(Long ext_opt_int64) { this.ext_opt_int64 = ext_opt_int64; return this; } public Builder ext_opt_uint64(Long ext_opt_uint64) { this.ext_opt_uint64 = ext_opt_uint64; return this; } public Builder ext_opt_sint64(Long ext_opt_sint64) { this.ext_opt_sint64 = ext_opt_sint64; return this; } public Builder ext_opt_fixed64(Long ext_opt_fixed64) { this.ext_opt_fixed64 = ext_opt_fixed64; return this; } public Builder ext_opt_sfixed64(Long ext_opt_sfixed64) { this.ext_opt_sfixed64 = ext_opt_sfixed64; return this; } public Builder ext_opt_bool(Boolean ext_opt_bool) { this.ext_opt_bool = ext_opt_bool; return this; } public Builder ext_opt_float(Float ext_opt_float) { this.ext_opt_float = ext_opt_float; return this; } public Builder ext_opt_double(Double ext_opt_double) { this.ext_opt_double = ext_opt_double; return this; } public Builder ext_opt_string(String ext_opt_string) { this.ext_opt_string = ext_opt_string; return this; } public Builder ext_opt_bytes(ByteString ext_opt_bytes) { this.ext_opt_bytes = ext_opt_bytes; return this; } public Builder ext_opt_nested_enum(NestedEnum ext_opt_nested_enum) { this.ext_opt_nested_enum = ext_opt_nested_enum; return this; } public Builder ext_opt_nested_message(NestedMessage ext_opt_nested_message) { this.ext_opt_nested_message = ext_opt_nested_message; return this; } public Builder ext_rep_int32(List<Integer> ext_rep_int32) { Internal.checkElementsNotNull(ext_rep_int32); this.ext_rep_int32 = ext_rep_int32; return this; } public Builder ext_rep_uint32(List<Integer> ext_rep_uint32) { Internal.checkElementsNotNull(ext_rep_uint32); this.ext_rep_uint32 = ext_rep_uint32; return this; } public Builder ext_rep_sint32(List<Integer> ext_rep_sint32) { Internal.checkElementsNotNull(ext_rep_sint32); this.ext_rep_sint32 = ext_rep_sint32; return this; } public Builder ext_rep_fixed32(List<Integer> ext_rep_fixed32) { Internal.checkElementsNotNull(ext_rep_fixed32); this.ext_rep_fixed32 = ext_rep_fixed32; return this; } public Builder ext_rep_sfixed32(List<Integer> ext_rep_sfixed32) { Internal.checkElementsNotNull(ext_rep_sfixed32); this.ext_rep_sfixed32 = ext_rep_sfixed32; return this; } public Builder ext_rep_int64(List<Long> ext_rep_int64) { Internal.checkElementsNotNull(ext_rep_int64); this.ext_rep_int64 = ext_rep_int64; return this; } public Builder ext_rep_uint64(List<Long> ext_rep_uint64) { Internal.checkElementsNotNull(ext_rep_uint64); this.ext_rep_uint64 = ext_rep_uint64; return this; } public Builder ext_rep_sint64(List<Long> ext_rep_sint64) { Internal.checkElementsNotNull(ext_rep_sint64); this.ext_rep_sint64 = ext_rep_sint64; return this; } public Builder ext_rep_fixed64(List<Long> ext_rep_fixed64) { Internal.checkElementsNotNull(ext_rep_fixed64); this.ext_rep_fixed64 = ext_rep_fixed64; return this; } public Builder ext_rep_sfixed64(List<Long> ext_rep_sfixed64) { Internal.checkElementsNotNull(ext_rep_sfixed64); this.ext_rep_sfixed64 = ext_rep_sfixed64; return this; } public Builder ext_rep_bool(List<Boolean> ext_rep_bool) { Internal.checkElementsNotNull(ext_rep_bool); this.ext_rep_bool = ext_rep_bool; return this; } public Builder ext_rep_float(List<Float> ext_rep_float) { Internal.checkElementsNotNull(ext_rep_float); this.ext_rep_float = ext_rep_float; return this; } public Builder ext_rep_double(List<Double> ext_rep_double) { Internal.checkElementsNotNull(ext_rep_double); this.ext_rep_double = ext_rep_double; return this; } public Builder ext_rep_string(List<String> ext_rep_string) { Internal.checkElementsNotNull(ext_rep_string); this.ext_rep_string = ext_rep_string; return this; } public Builder ext_rep_bytes(List<ByteString> ext_rep_bytes) { Internal.checkElementsNotNull(ext_rep_bytes); this.ext_rep_bytes = ext_rep_bytes; return this; } public Builder ext_rep_nested_enum(List<NestedEnum> ext_rep_nested_enum) { Internal.checkElementsNotNull(ext_rep_nested_enum); this.ext_rep_nested_enum = ext_rep_nested_enum; return this; } public Builder ext_rep_nested_message(List<NestedMessage> ext_rep_nested_message) { Internal.checkElementsNotNull(ext_rep_nested_message); this.ext_rep_nested_message = ext_rep_nested_message; return this; } public Builder ext_pack_int32(List<Integer> ext_pack_int32) { Internal.checkElementsNotNull(ext_pack_int32); this.ext_pack_int32 = ext_pack_int32; return this; } public Builder ext_pack_uint32(List<Integer> ext_pack_uint32) { Internal.checkElementsNotNull(ext_pack_uint32); this.ext_pack_uint32 = ext_pack_uint32; return this; } public Builder ext_pack_sint32(List<Integer> ext_pack_sint32) { Internal.checkElementsNotNull(ext_pack_sint32); this.ext_pack_sint32 = ext_pack_sint32; return this; } public Builder ext_pack_fixed32(List<Integer> ext_pack_fixed32) { Internal.checkElementsNotNull(ext_pack_fixed32); this.ext_pack_fixed32 = ext_pack_fixed32; return this; } public Builder ext_pack_sfixed32(List<Integer> ext_pack_sfixed32) { Internal.checkElementsNotNull(ext_pack_sfixed32); this.ext_pack_sfixed32 = ext_pack_sfixed32; return this; } public Builder ext_pack_int64(List<Long> ext_pack_int64) { Internal.checkElementsNotNull(ext_pack_int64); this.ext_pack_int64 = ext_pack_int64; return this; } public Builder ext_pack_uint64(List<Long> ext_pack_uint64) { Internal.checkElementsNotNull(ext_pack_uint64); this.ext_pack_uint64 = ext_pack_uint64; return this; } public Builder ext_pack_sint64(List<Long> ext_pack_sint64) { Internal.checkElementsNotNull(ext_pack_sint64); this.ext_pack_sint64 = ext_pack_sint64; return this; } public Builder ext_pack_fixed64(List<Long> ext_pack_fixed64) { Internal.checkElementsNotNull(ext_pack_fixed64); this.ext_pack_fixed64 = ext_pack_fixed64; return this; } public Builder ext_pack_sfixed64(List<Long> ext_pack_sfixed64) { Internal.checkElementsNotNull(ext_pack_sfixed64); this.ext_pack_sfixed64 = ext_pack_sfixed64; return this; } public Builder ext_pack_bool(List<Boolean> ext_pack_bool) { Internal.checkElementsNotNull(ext_pack_bool); this.ext_pack_bool = ext_pack_bool; return this; } public Builder ext_pack_float(List<Float> ext_pack_float) { Internal.checkElementsNotNull(ext_pack_float); this.ext_pack_float = ext_pack_float; return this; } public Builder ext_pack_double(List<Double> ext_pack_double) { Internal.checkElementsNotNull(ext_pack_double); this.ext_pack_double = ext_pack_double; return this; } public Builder ext_pack_nested_enum(List<NestedEnum> ext_pack_nested_enum) { Internal.checkElementsNotNull(ext_pack_nested_enum); this.ext_pack_nested_enum = ext_pack_nested_enum; return this; } @Override public AllTypes build() { if (req_int32 == null || req_uint32 == null || req_sint32 == null || req_fixed32 == null || req_sfixed32 == null || req_int64 == null || req_uint64 == null || req_sint64 == null || req_fixed64 == null || req_sfixed64 == null || req_bool == null || req_float == null || req_double == null || req_string == null || req_bytes == null || req_nested_enum == null || req_nested_message == null) { throw Internal.missingRequiredFields(req_int32, "req_int32", req_uint32, "req_uint32", req_sint32, "req_sint32", req_fixed32, "req_fixed32", req_sfixed32, "req_sfixed32", req_int64, "req_int64", req_uint64, "req_uint64", req_sint64, "req_sint64", req_fixed64, "req_fixed64", req_sfixed64, "req_sfixed64", req_bool, "req_bool", req_float, "req_float", req_double, "req_double", req_string, "req_string", req_bytes, "req_bytes", req_nested_enum, "req_nested_enum", req_nested_message, "req_nested_message"); } return new AllTypes(this, super.buildUnknownFields()); } } public enum NestedEnum implements WireEnum { UNKNOWN(0), A(1); public static final ProtoAdapter<NestedEnum> ADAPTER = new ProtoAdapter_NestedEnum(); private final int value; NestedEnum(int value) { this.value = value; } /** * Return the constant for {@code value} or null. */ public static NestedEnum fromValue(int value) { switch (value) { case 0: return UNKNOWN; case 1: return A; default: return null; } } @Override public int getValue() { return value; } private static final class ProtoAdapter_NestedEnum extends EnumAdapter<NestedEnum> { ProtoAdapter_NestedEnum() { super(NestedEnum.class, Syntax.PROTO_2, NestedEnum.UNKNOWN); } @Override protected NestedEnum fromValue(int value) { return NestedEnum.fromValue(value); } } } public static final class NestedMessage extends Message<NestedMessage, NestedMessage.Builder> { public static final ProtoAdapter<NestedMessage> ADAPTER = new ProtoAdapter_NestedMessage(); private static final long serialVersionUID = 0L; public static final Integer DEFAULT_A = 0; @WireField( tag = 1, adapter = "com.squareup.wire.ProtoAdapter#INT32" ) public final Integer a; public NestedMessage(Integer a) { this(a, ByteString.EMPTY); } public NestedMessage(Integer a, ByteString unknownFields) { super(ADAPTER, unknownFields); this.a = a; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.a = a; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof NestedMessage)) return false; NestedMessage o = (NestedMessage) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(a, o.a); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + (a != null ? a.hashCode() : 0); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (a != null) builder.append(", a=").append(a); return builder.replace(0, 2, "NestedMessage{").append('}').toString(); } public static final class Builder extends Message.Builder<NestedMessage, Builder> { public Integer a; public Builder() { } public Builder a(Integer a) { this.a = a; return this; } @Override public NestedMessage build() { return new NestedMessage(a, super.buildUnknownFields()); } } private static final class ProtoAdapter_NestedMessage extends ProtoAdapter<NestedMessage> { public ProtoAdapter_NestedMessage() { super(FieldEncoding.LENGTH_DELIMITED, NestedMessage.class, "type.googleapis.com/squareup.protos.alltypes.AllTypes.NestedMessage", Syntax.PROTO_2, null, "all_types.proto"); } @Override public int encodedSize(NestedMessage value) { int result = 0; result += ProtoAdapter.INT32.encodedSizeWithTag(1, value.a); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, NestedMessage value) throws IOException { ProtoAdapter.INT32.encodeWithTag(writer, 1, value.a); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, NestedMessage value) throws IOException { writer.writeBytes(value.unknownFields()); ProtoAdapter.INT32.encodeWithTag(writer, 1, value.a); } @Override public NestedMessage 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.a(ProtoAdapter.INT32.decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public NestedMessage redact(NestedMessage value) { Builder builder = value.newBuilder(); builder.clearUnknownFields(); return builder.build(); } } } private static final class ProtoAdapter_AllTypes extends ProtoAdapter<AllTypes> { private ProtoAdapter<Map<Integer, Integer>> map_int32_int32; private ProtoAdapter<Map<String, String>> map_string_string; private ProtoAdapter<Map<String, NestedMessage>> map_string_message; private ProtoAdapter<Map<String, NestedEnum>> map_string_enum; public ProtoAdapter_AllTypes() { super(FieldEncoding.LENGTH_DELIMITED, AllTypes.class, "type.googleapis.com/squareup.protos.alltypes.AllTypes", Syntax.PROTO_2, null, "all_types.proto"); } @Override public int encodedSize(AllTypes value) { int result = 0; result += ProtoAdapter.INT32.encodedSizeWithTag(1, value.opt_int32); result += ProtoAdapter.UINT32.encodedSizeWithTag(2, value.opt_uint32); result += ProtoAdapter.SINT32.encodedSizeWithTag(3, value.opt_sint32); result += ProtoAdapter.FIXED32.encodedSizeWithTag(4, value.opt_fixed32); result += ProtoAdapter.SFIXED32.encodedSizeWithTag(5, value.opt_sfixed32); result += ProtoAdapter.INT64.encodedSizeWithTag(6, value.opt_int64); result += ProtoAdapter.UINT64.encodedSizeWithTag(7, value.opt_uint64); result += ProtoAdapter.SINT64.encodedSizeWithTag(8, value.opt_sint64); result += ProtoAdapter.FIXED64.encodedSizeWithTag(9, value.opt_fixed64); result += ProtoAdapter.SFIXED64.encodedSizeWithTag(10, value.opt_sfixed64); result += ProtoAdapter.BOOL.encodedSizeWithTag(11, value.opt_bool); result += ProtoAdapter.FLOAT.encodedSizeWithTag(12, value.opt_float); result += ProtoAdapter.DOUBLE.encodedSizeWithTag(13, value.opt_double); result += ProtoAdapter.STRING.encodedSizeWithTag(14, value.opt_string); result += ProtoAdapter.BYTES.encodedSizeWithTag(15, value.opt_bytes); result += NestedEnum.ADAPTER.encodedSizeWithTag(16, value.opt_nested_enum); result += NestedMessage.ADAPTER.encodedSizeWithTag(17, value.opt_nested_message); result += ProtoAdapter.INT32.encodedSizeWithTag(101, value.req_int32); result += ProtoAdapter.UINT32.encodedSizeWithTag(102, value.req_uint32); result += ProtoAdapter.SINT32.encodedSizeWithTag(103, value.req_sint32); result += ProtoAdapter.FIXED32.encodedSizeWithTag(104, value.req_fixed32); result += ProtoAdapter.SFIXED32.encodedSizeWithTag(105, value.req_sfixed32); result += ProtoAdapter.INT64.encodedSizeWithTag(106, value.req_int64); result += ProtoAdapter.UINT64.encodedSizeWithTag(107, value.req_uint64); result += ProtoAdapter.SINT64.encodedSizeWithTag(108, value.req_sint64); result += ProtoAdapter.FIXED64.encodedSizeWithTag(109, value.req_fixed64); result += ProtoAdapter.SFIXED64.encodedSizeWithTag(110, value.req_sfixed64); result += ProtoAdapter.BOOL.encodedSizeWithTag(111, value.req_bool); result += ProtoAdapter.FLOAT.encodedSizeWithTag(112, value.req_float); result += ProtoAdapter.DOUBLE.encodedSizeWithTag(113, value.req_double); result += ProtoAdapter.STRING.encodedSizeWithTag(114, value.req_string); result += ProtoAdapter.BYTES.encodedSizeWithTag(115, value.req_bytes); result += NestedEnum.ADAPTER.encodedSizeWithTag(116, value.req_nested_enum); result += NestedMessage.ADAPTER.encodedSizeWithTag(117, value.req_nested_message); result += ProtoAdapter.INT32.asRepeated().encodedSizeWithTag(201, value.rep_int32); result += ProtoAdapter.UINT32.asRepeated().encodedSizeWithTag(202, value.rep_uint32); result += ProtoAdapter.SINT32.asRepeated().encodedSizeWithTag(203, value.rep_sint32); result += ProtoAdapter.FIXED32.asRepeated().encodedSizeWithTag(204, value.rep_fixed32); result += ProtoAdapter.SFIXED32.asRepeated().encodedSizeWithTag(205, value.rep_sfixed32); result += ProtoAdapter.INT64.asRepeated().encodedSizeWithTag(206, value.rep_int64); result += ProtoAdapter.UINT64.asRepeated().encodedSizeWithTag(207, value.rep_uint64); result += ProtoAdapter.SINT64.asRepeated().encodedSizeWithTag(208, value.rep_sint64); result += ProtoAdapter.FIXED64.asRepeated().encodedSizeWithTag(209, value.rep_fixed64); result += ProtoAdapter.SFIXED64.asRepeated().encodedSizeWithTag(210, value.rep_sfixed64); result += ProtoAdapter.BOOL.asRepeated().encodedSizeWithTag(211, value.rep_bool); result += ProtoAdapter.FLOAT.asRepeated().encodedSizeWithTag(212, value.rep_float); result += ProtoAdapter.DOUBLE.asRepeated().encodedSizeWithTag(213, value.rep_double); result += ProtoAdapter.STRING.asRepeated().encodedSizeWithTag(214, value.rep_string); result += ProtoAdapter.BYTES.asRepeated().encodedSizeWithTag(215, value.rep_bytes); result += NestedEnum.ADAPTER.asRepeated().encodedSizeWithTag(216, value.rep_nested_enum); result += NestedMessage.ADAPTER.asRepeated().encodedSizeWithTag(217, value.rep_nested_message); result += ProtoAdapter.INT32.asPacked().encodedSizeWithTag(301, value.pack_int32); result += ProtoAdapter.UINT32.asPacked().encodedSizeWithTag(302, value.pack_uint32); result += ProtoAdapter.SINT32.asPacked().encodedSizeWithTag(303, value.pack_sint32); result += ProtoAdapter.FIXED32.asPacked().encodedSizeWithTag(304, value.pack_fixed32); result += ProtoAdapter.SFIXED32.asPacked().encodedSizeWithTag(305, value.pack_sfixed32); result += ProtoAdapter.INT64.asPacked().encodedSizeWithTag(306, value.pack_int64); result += ProtoAdapter.UINT64.asPacked().encodedSizeWithTag(307, value.pack_uint64); result += ProtoAdapter.SINT64.asPacked().encodedSizeWithTag(308, value.pack_sint64); result += ProtoAdapter.FIXED64.asPacked().encodedSizeWithTag(309, value.pack_fixed64); result += ProtoAdapter.SFIXED64.asPacked().encodedSizeWithTag(310, value.pack_sfixed64); result += ProtoAdapter.BOOL.asPacked().encodedSizeWithTag(311, value.pack_bool); result += ProtoAdapter.FLOAT.asPacked().encodedSizeWithTag(312, value.pack_float); result += ProtoAdapter.DOUBLE.asPacked().encodedSizeWithTag(313, value.pack_double); result += NestedEnum.ADAPTER.asPacked().encodedSizeWithTag(316, value.pack_nested_enum); result += ProtoAdapter.INT32.encodedSizeWithTag(401, value.default_int32); result += ProtoAdapter.UINT32.encodedSizeWithTag(402, value.default_uint32); result += ProtoAdapter.SINT32.encodedSizeWithTag(403, value.default_sint32); result += ProtoAdapter.FIXED32.encodedSizeWithTag(404, value.default_fixed32); result += ProtoAdapter.SFIXED32.encodedSizeWithTag(405, value.default_sfixed32); result += ProtoAdapter.INT64.encodedSizeWithTag(406, value.default_int64); result += ProtoAdapter.UINT64.encodedSizeWithTag(407, value.default_uint64); result += ProtoAdapter.SINT64.encodedSizeWithTag(408, value.default_sint64); result += ProtoAdapter.FIXED64.encodedSizeWithTag(409, value.default_fixed64); result += ProtoAdapter.SFIXED64.encodedSizeWithTag(410, value.default_sfixed64); result += ProtoAdapter.BOOL.encodedSizeWithTag(411, value.default_bool); result += ProtoAdapter.FLOAT.encodedSizeWithTag(412, value.default_float); result += ProtoAdapter.DOUBLE.encodedSizeWithTag(413, value.default_double); result += ProtoAdapter.STRING.encodedSizeWithTag(414, value.default_string); result += ProtoAdapter.BYTES.encodedSizeWithTag(415, value.default_bytes); result += NestedEnum.ADAPTER.encodedSizeWithTag(416, value.default_nested_enum); result += map_int32_int32Adapter().encodedSizeWithTag(501, value.map_int32_int32); result += map_string_stringAdapter().encodedSizeWithTag(502, value.map_string_string); result += map_string_messageAdapter().encodedSizeWithTag(503, value.map_string_message); result += map_string_enumAdapter().encodedSizeWithTag(504, value.map_string_enum); result += ProtoAdapter.INT32.encodedSizeWithTag(1001, value.ext_opt_int32); result += ProtoAdapter.UINT32.encodedSizeWithTag(1002, value.ext_opt_uint32); result += ProtoAdapter.SINT32.encodedSizeWithTag(1003, value.ext_opt_sint32); result += ProtoAdapter.FIXED32.encodedSizeWithTag(1004, value.ext_opt_fixed32); result += ProtoAdapter.SFIXED32.encodedSizeWithTag(1005, value.ext_opt_sfixed32); result += ProtoAdapter.INT64.encodedSizeWithTag(1006, value.ext_opt_int64); result += ProtoAdapter.UINT64.encodedSizeWithTag(1007, value.ext_opt_uint64); result += ProtoAdapter.SINT64.encodedSizeWithTag(1008, value.ext_opt_sint64); result += ProtoAdapter.FIXED64.encodedSizeWithTag(1009, value.ext_opt_fixed64); result += ProtoAdapter.SFIXED64.encodedSizeWithTag(1010, value.ext_opt_sfixed64); result += ProtoAdapter.BOOL.encodedSizeWithTag(1011, value.ext_opt_bool); result += ProtoAdapter.FLOAT.encodedSizeWithTag(1012, value.ext_opt_float); result += ProtoAdapter.DOUBLE.encodedSizeWithTag(1013, value.ext_opt_double); result += ProtoAdapter.STRING.encodedSizeWithTag(1014, value.ext_opt_string); result += ProtoAdapter.BYTES.encodedSizeWithTag(1015, value.ext_opt_bytes); result += NestedEnum.ADAPTER.encodedSizeWithTag(1016, value.ext_opt_nested_enum); result += NestedMessage.ADAPTER.encodedSizeWithTag(1017, value.ext_opt_nested_message); result += ProtoAdapter.INT32.asRepeated().encodedSizeWithTag(1101, value.ext_rep_int32); result += ProtoAdapter.UINT32.asRepeated().encodedSizeWithTag(1102, value.ext_rep_uint32); result += ProtoAdapter.SINT32.asRepeated().encodedSizeWithTag(1103, value.ext_rep_sint32); result += ProtoAdapter.FIXED32.asRepeated().encodedSizeWithTag(1104, value.ext_rep_fixed32); result += ProtoAdapter.SFIXED32.asRepeated().encodedSizeWithTag(1105, value.ext_rep_sfixed32); result += ProtoAdapter.INT64.asRepeated().encodedSizeWithTag(1106, value.ext_rep_int64); result += ProtoAdapter.UINT64.asRepeated().encodedSizeWithTag(1107, value.ext_rep_uint64); result += ProtoAdapter.SINT64.asRepeated().encodedSizeWithTag(1108, value.ext_rep_sint64); result += ProtoAdapter.FIXED64.asRepeated().encodedSizeWithTag(1109, value.ext_rep_fixed64); result += ProtoAdapter.SFIXED64.asRepeated().encodedSizeWithTag(1110, value.ext_rep_sfixed64); result += ProtoAdapter.BOOL.asRepeated().encodedSizeWithTag(1111, value.ext_rep_bool); result += ProtoAdapter.FLOAT.asRepeated().encodedSizeWithTag(1112, value.ext_rep_float); result += ProtoAdapter.DOUBLE.asRepeated().encodedSizeWithTag(1113, value.ext_rep_double); result += ProtoAdapter.STRING.asRepeated().encodedSizeWithTag(1114, value.ext_rep_string); result += ProtoAdapter.BYTES.asRepeated().encodedSizeWithTag(1115, value.ext_rep_bytes); result += NestedEnum.ADAPTER.asRepeated().encodedSizeWithTag(1116, value.ext_rep_nested_enum); result += NestedMessage.ADAPTER.asRepeated().encodedSizeWithTag(1117, value.ext_rep_nested_message); result += ProtoAdapter.INT32.asPacked().encodedSizeWithTag(1201, value.ext_pack_int32); result += ProtoAdapter.UINT32.asPacked().encodedSizeWithTag(1202, value.ext_pack_uint32); result += ProtoAdapter.SINT32.asPacked().encodedSizeWithTag(1203, value.ext_pack_sint32); result += ProtoAdapter.FIXED32.asPacked().encodedSizeWithTag(1204, value.ext_pack_fixed32); result += ProtoAdapter.SFIXED32.asPacked().encodedSizeWithTag(1205, value.ext_pack_sfixed32); result += ProtoAdapter.INT64.asPacked().encodedSizeWithTag(1206, value.ext_pack_int64); result += ProtoAdapter.UINT64.asPacked().encodedSizeWithTag(1207, value.ext_pack_uint64); result += ProtoAdapter.SINT64.asPacked().encodedSizeWithTag(1208, value.ext_pack_sint64); result += ProtoAdapter.FIXED64.asPacked().encodedSizeWithTag(1209, value.ext_pack_fixed64); result += ProtoAdapter.SFIXED64.asPacked().encodedSizeWithTag(1210, value.ext_pack_sfixed64); result += ProtoAdapter.BOOL.asPacked().encodedSizeWithTag(1211, value.ext_pack_bool); result += ProtoAdapter.FLOAT.asPacked().encodedSizeWithTag(1212, value.ext_pack_float); result += ProtoAdapter.DOUBLE.asPacked().encodedSizeWithTag(1213, value.ext_pack_double); result += NestedEnum.ADAPTER.asPacked().encodedSizeWithTag(1216, value.ext_pack_nested_enum); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, AllTypes value) throws IOException { ProtoAdapter.INT32.encodeWithTag(writer, 1, value.opt_int32); ProtoAdapter.UINT32.encodeWithTag(writer, 2, value.opt_uint32); ProtoAdapter.SINT32.encodeWithTag(writer, 3, value.opt_sint32); ProtoAdapter.FIXED32.encodeWithTag(writer, 4, value.opt_fixed32); ProtoAdapter.SFIXED32.encodeWithTag(writer, 5, value.opt_sfixed32); ProtoAdapter.INT64.encodeWithTag(writer, 6, value.opt_int64); ProtoAdapter.UINT64.encodeWithTag(writer, 7, value.opt_uint64); ProtoAdapter.SINT64.encodeWithTag(writer, 8, value.opt_sint64); ProtoAdapter.FIXED64.encodeWithTag(writer, 9, value.opt_fixed64); ProtoAdapter.SFIXED64.encodeWithTag(writer, 10, value.opt_sfixed64); ProtoAdapter.BOOL.encodeWithTag(writer, 11, value.opt_bool); ProtoAdapter.FLOAT.encodeWithTag(writer, 12, value.opt_float); ProtoAdapter.DOUBLE.encodeWithTag(writer, 13, value.opt_double); ProtoAdapter.STRING.encodeWithTag(writer, 14, value.opt_string); ProtoAdapter.BYTES.encodeWithTag(writer, 15, value.opt_bytes); NestedEnum.ADAPTER.encodeWithTag(writer, 16, value.opt_nested_enum); NestedMessage.ADAPTER.encodeWithTag(writer, 17, value.opt_nested_message); ProtoAdapter.INT32.encodeWithTag(writer, 101, value.req_int32); ProtoAdapter.UINT32.encodeWithTag(writer, 102, value.req_uint32); ProtoAdapter.SINT32.encodeWithTag(writer, 103, value.req_sint32); ProtoAdapter.FIXED32.encodeWithTag(writer, 104, value.req_fixed32); ProtoAdapter.SFIXED32.encodeWithTag(writer, 105, value.req_sfixed32); ProtoAdapter.INT64.encodeWithTag(writer, 106, value.req_int64); ProtoAdapter.UINT64.encodeWithTag(writer, 107, value.req_uint64); ProtoAdapter.SINT64.encodeWithTag(writer, 108, value.req_sint64); ProtoAdapter.FIXED64.encodeWithTag(writer, 109, value.req_fixed64); ProtoAdapter.SFIXED64.encodeWithTag(writer, 110, value.req_sfixed64); ProtoAdapter.BOOL.encodeWithTag(writer, 111, value.req_bool); ProtoAdapter.FLOAT.encodeWithTag(writer, 112, value.req_float); ProtoAdapter.DOUBLE.encodeWithTag(writer, 113, value.req_double); ProtoAdapter.STRING.encodeWithTag(writer, 114, value.req_string); ProtoAdapter.BYTES.encodeWithTag(writer, 115, value.req_bytes); NestedEnum.ADAPTER.encodeWithTag(writer, 116, value.req_nested_enum); NestedMessage.ADAPTER.encodeWithTag(writer, 117, value.req_nested_message); ProtoAdapter.INT32.asRepeated().encodeWithTag(writer, 201, value.rep_int32); ProtoAdapter.UINT32.asRepeated().encodeWithTag(writer, 202, value.rep_uint32); ProtoAdapter.SINT32.asRepeated().encodeWithTag(writer, 203, value.rep_sint32); ProtoAdapter.FIXED32.asRepeated().encodeWithTag(writer, 204, value.rep_fixed32); ProtoAdapter.SFIXED32.asRepeated().encodeWithTag(writer, 205, value.rep_sfixed32); ProtoAdapter.INT64.asRepeated().encodeWithTag(writer, 206, value.rep_int64); ProtoAdapter.UINT64.asRepeated().encodeWithTag(writer, 207, value.rep_uint64); ProtoAdapter.SINT64.asRepeated().encodeWithTag(writer, 208, value.rep_sint64); ProtoAdapter.FIXED64.asRepeated().encodeWithTag(writer, 209, value.rep_fixed64); ProtoAdapter.SFIXED64.asRepeated().encodeWithTag(writer, 210, value.rep_sfixed64); ProtoAdapter.BOOL.asRepeated().encodeWithTag(writer, 211, value.rep_bool); ProtoAdapter.FLOAT.asRepeated().encodeWithTag(writer, 212, value.rep_float); ProtoAdapter.DOUBLE.asRepeated().encodeWithTag(writer, 213, value.rep_double); ProtoAdapter.STRING.asRepeated().encodeWithTag(writer, 214, value.rep_string); ProtoAdapter.BYTES.asRepeated().encodeWithTag(writer, 215, value.rep_bytes); NestedEnum.ADAPTER.asRepeated().encodeWithTag(writer, 216, value.rep_nested_enum); NestedMessage.ADAPTER.asRepeated().encodeWithTag(writer, 217, value.rep_nested_message); ProtoAdapter.INT32.asPacked().encodeWithTag(writer, 301, value.pack_int32); ProtoAdapter.UINT32.asPacked().encodeWithTag(writer, 302, value.pack_uint32); ProtoAdapter.SINT32.asPacked().encodeWithTag(writer, 303, value.pack_sint32); ProtoAdapter.FIXED32.asPacked().encodeWithTag(writer, 304, value.pack_fixed32); ProtoAdapter.SFIXED32.asPacked().encodeWithTag(writer, 305, value.pack_sfixed32); ProtoAdapter.INT64.asPacked().encodeWithTag(writer, 306, value.pack_int64); ProtoAdapter.UINT64.asPacked().encodeWithTag(writer, 307, value.pack_uint64); ProtoAdapter.SINT64.asPacked().encodeWithTag(writer, 308, value.pack_sint64); ProtoAdapter.FIXED64.asPacked().encodeWithTag(writer, 309, value.pack_fixed64); ProtoAdapter.SFIXED64.asPacked().encodeWithTag(writer, 310, value.pack_sfixed64); ProtoAdapter.BOOL.asPacked().encodeWithTag(writer, 311, value.pack_bool); ProtoAdapter.FLOAT.asPacked().encodeWithTag(writer, 312, value.pack_float); ProtoAdapter.DOUBLE.asPacked().encodeWithTag(writer, 313, value.pack_double); NestedEnum.ADAPTER.asPacked().encodeWithTag(writer, 316, value.pack_nested_enum); ProtoAdapter.INT32.encodeWithTag(writer, 401, value.default_int32); ProtoAdapter.UINT32.encodeWithTag(writer, 402, value.default_uint32); ProtoAdapter.SINT32.encodeWithTag(writer, 403, value.default_sint32); ProtoAdapter.FIXED32.encodeWithTag(writer, 404, value.default_fixed32); ProtoAdapter.SFIXED32.encodeWithTag(writer, 405, value.default_sfixed32); ProtoAdapter.INT64.encodeWithTag(writer, 406, value.default_int64); ProtoAdapter.UINT64.encodeWithTag(writer, 407, value.default_uint64); ProtoAdapter.SINT64.encodeWithTag(writer, 408, value.default_sint64); ProtoAdapter.FIXED64.encodeWithTag(writer, 409, value.default_fixed64); ProtoAdapter.SFIXED64.encodeWithTag(writer, 410, value.default_sfixed64); ProtoAdapter.BOOL.encodeWithTag(writer, 411, value.default_bool); ProtoAdapter.FLOAT.encodeWithTag(writer, 412, value.default_float); ProtoAdapter.DOUBLE.encodeWithTag(writer, 413, value.default_double); ProtoAdapter.STRING.encodeWithTag(writer, 414, value.default_string); ProtoAdapter.BYTES.encodeWithTag(writer, 415, value.default_bytes); NestedEnum.ADAPTER.encodeWithTag(writer, 416, value.default_nested_enum); map_int32_int32Adapter().encodeWithTag(writer, 501, value.map_int32_int32); map_string_stringAdapter().encodeWithTag(writer, 502, value.map_string_string); map_string_messageAdapter().encodeWithTag(writer, 503, value.map_string_message); map_string_enumAdapter().encodeWithTag(writer, 504, value.map_string_enum); ProtoAdapter.INT32.encodeWithTag(writer, 1001, value.ext_opt_int32); ProtoAdapter.UINT32.encodeWithTag(writer, 1002, value.ext_opt_uint32); ProtoAdapter.SINT32.encodeWithTag(writer, 1003, value.ext_opt_sint32); ProtoAdapter.FIXED32.encodeWithTag(writer, 1004, value.ext_opt_fixed32); ProtoAdapter.SFIXED32.encodeWithTag(writer, 1005, value.ext_opt_sfixed32); ProtoAdapter.INT64.encodeWithTag(writer, 1006, value.ext_opt_int64); ProtoAdapter.UINT64.encodeWithTag(writer, 1007, value.ext_opt_uint64); ProtoAdapter.SINT64.encodeWithTag(writer, 1008, value.ext_opt_sint64); ProtoAdapter.FIXED64.encodeWithTag(writer, 1009, value.ext_opt_fixed64); ProtoAdapter.SFIXED64.encodeWithTag(writer, 1010, value.ext_opt_sfixed64); ProtoAdapter.BOOL.encodeWithTag(writer, 1011, value.ext_opt_bool); ProtoAdapter.FLOAT.encodeWithTag(writer, 1012, value.ext_opt_float); ProtoAdapter.DOUBLE.encodeWithTag(writer, 1013, value.ext_opt_double); ProtoAdapter.STRING.encodeWithTag(writer, 1014, value.ext_opt_string); ProtoAdapter.BYTES.encodeWithTag(writer, 1015, value.ext_opt_bytes); NestedEnum.ADAPTER.encodeWithTag(writer, 1016, value.ext_opt_nested_enum); NestedMessage.ADAPTER.encodeWithTag(writer, 1017, value.ext_opt_nested_message); ProtoAdapter.INT32.asRepeated().encodeWithTag(writer, 1101, value.ext_rep_int32); ProtoAdapter.UINT32.asRepeated().encodeWithTag(writer, 1102, value.ext_rep_uint32); ProtoAdapter.SINT32.asRepeated().encodeWithTag(writer, 1103, value.ext_rep_sint32); ProtoAdapter.FIXED32.asRepeated().encodeWithTag(writer, 1104, value.ext_rep_fixed32); ProtoAdapter.SFIXED32.asRepeated().encodeWithTag(writer, 1105, value.ext_rep_sfixed32); ProtoAdapter.INT64.asRepeated().encodeWithTag(writer, 1106, value.ext_rep_int64); ProtoAdapter.UINT64.asRepeated().encodeWithTag(writer, 1107, value.ext_rep_uint64); ProtoAdapter.SINT64.asRepeated().encodeWithTag(writer, 1108, value.ext_rep_sint64); ProtoAdapter.FIXED64.asRepeated().encodeWithTag(writer, 1109, value.ext_rep_fixed64); ProtoAdapter.SFIXED64.asRepeated().encodeWithTag(writer, 1110, value.ext_rep_sfixed64); ProtoAdapter.BOOL.asRepeated().encodeWithTag(writer, 1111, value.ext_rep_bool); ProtoAdapter.FLOAT.asRepeated().encodeWithTag(writer, 1112, value.ext_rep_float); ProtoAdapter.DOUBLE.asRepeated().encodeWithTag(writer, 1113, value.ext_rep_double); ProtoAdapter.STRING.asRepeated().encodeWithTag(writer, 1114, value.ext_rep_string); ProtoAdapter.BYTES.asRepeated().encodeWithTag(writer, 1115, value.ext_rep_bytes); NestedEnum.ADAPTER.asRepeated().encodeWithTag(writer, 1116, value.ext_rep_nested_enum); NestedMessage.ADAPTER.asRepeated().encodeWithTag(writer, 1117, value.ext_rep_nested_message); ProtoAdapter.INT32.asPacked().encodeWithTag(writer, 1201, value.ext_pack_int32); ProtoAdapter.UINT32.asPacked().encodeWithTag(writer, 1202, value.ext_pack_uint32); ProtoAdapter.SINT32.asPacked().encodeWithTag(writer, 1203, value.ext_pack_sint32); ProtoAdapter.FIXED32.asPacked().encodeWithTag(writer, 1204, value.ext_pack_fixed32); ProtoAdapter.SFIXED32.asPacked().encodeWithTag(writer, 1205, value.ext_pack_sfixed32); ProtoAdapter.INT64.asPacked().encodeWithTag(writer, 1206, value.ext_pack_int64); ProtoAdapter.UINT64.asPacked().encodeWithTag(writer, 1207, value.ext_pack_uint64); ProtoAdapter.SINT64.asPacked().encodeWithTag(writer, 1208, value.ext_pack_sint64); ProtoAdapter.FIXED64.asPacked().encodeWithTag(writer, 1209, value.ext_pack_fixed64); ProtoAdapter.SFIXED64.asPacked().encodeWithTag(writer, 1210, value.ext_pack_sfixed64); ProtoAdapter.BOOL.asPacked().encodeWithTag(writer, 1211, value.ext_pack_bool); ProtoAdapter.FLOAT.asPacked().encodeWithTag(writer, 1212, value.ext_pack_float); ProtoAdapter.DOUBLE.asPacked().encodeWithTag(writer, 1213, value.ext_pack_double); NestedEnum.ADAPTER.asPacked().encodeWithTag(writer, 1216, value.ext_pack_nested_enum); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, AllTypes value) throws IOException { writer.writeBytes(value.unknownFields()); NestedEnum.ADAPTER.asPacked().encodeWithTag(writer, 1216, value.ext_pack_nested_enum); ProtoAdapter.DOUBLE.asPacked().encodeWithTag(writer, 1213, value.ext_pack_double); ProtoAdapter.FLOAT.asPacked().encodeWithTag(writer, 1212, value.ext_pack_float); ProtoAdapter.BOOL.asPacked().encodeWithTag(writer, 1211, value.ext_pack_bool); ProtoAdapter.SFIXED64.asPacked().encodeWithTag(writer, 1210, value.ext_pack_sfixed64); ProtoAdapter.FIXED64.asPacked().encodeWithTag(writer, 1209, value.ext_pack_fixed64); ProtoAdapter.SINT64.asPacked().encodeWithTag(writer, 1208, value.ext_pack_sint64); ProtoAdapter.UINT64.asPacked().encodeWithTag(writer, 1207, value.ext_pack_uint64); ProtoAdapter.INT64.asPacked().encodeWithTag(writer, 1206, value.ext_pack_int64); ProtoAdapter.SFIXED32.asPacked().encodeWithTag(writer, 1205, value.ext_pack_sfixed32); ProtoAdapter.FIXED32.asPacked().encodeWithTag(writer, 1204, value.ext_pack_fixed32); ProtoAdapter.SINT32.asPacked().encodeWithTag(writer, 1203, value.ext_pack_sint32); ProtoAdapter.UINT32.asPacked().encodeWithTag(writer, 1202, value.ext_pack_uint32); ProtoAdapter.INT32.asPacked().encodeWithTag(writer, 1201, value.ext_pack_int32); NestedMessage.ADAPTER.asRepeated().encodeWithTag(writer, 1117, value.ext_rep_nested_message); NestedEnum.ADAPTER.asRepeated().encodeWithTag(writer, 1116, value.ext_rep_nested_enum); ProtoAdapter.BYTES.asRepeated().encodeWithTag(writer, 1115, value.ext_rep_bytes); ProtoAdapter.STRING.asRepeated().encodeWithTag(writer, 1114, value.ext_rep_string); ProtoAdapter.DOUBLE.asRepeated().encodeWithTag(writer, 1113, value.ext_rep_double); ProtoAdapter.FLOAT.asRepeated().encodeWithTag(writer, 1112, value.ext_rep_float); ProtoAdapter.BOOL.asRepeated().encodeWithTag(writer, 1111, value.ext_rep_bool); ProtoAdapter.SFIXED64.asRepeated().encodeWithTag(writer, 1110, value.ext_rep_sfixed64); ProtoAdapter.FIXED64.asRepeated().encodeWithTag(writer, 1109, value.ext_rep_fixed64); ProtoAdapter.SINT64.asRepeated().encodeWithTag(writer, 1108, value.ext_rep_sint64); ProtoAdapter.UINT64.asRepeated().encodeWithTag(writer, 1107, value.ext_rep_uint64); ProtoAdapter.INT64.asRepeated().encodeWithTag(writer, 1106, value.ext_rep_int64); ProtoAdapter.SFIXED32.asRepeated().encodeWithTag(writer, 1105, value.ext_rep_sfixed32); ProtoAdapter.FIXED32.asRepeated().encodeWithTag(writer, 1104, value.ext_rep_fixed32); ProtoAdapter.SINT32.asRepeated().encodeWithTag(writer, 1103, value.ext_rep_sint32); ProtoAdapter.UINT32.asRepeated().encodeWithTag(writer, 1102, value.ext_rep_uint32); ProtoAdapter.INT32.asRepeated().encodeWithTag(writer, 1101, value.ext_rep_int32); NestedMessage.ADAPTER.encodeWithTag(writer, 1017, value.ext_opt_nested_message); NestedEnum.ADAPTER.encodeWithTag(writer, 1016, value.ext_opt_nested_enum); ProtoAdapter.BYTES.encodeWithTag(writer, 1015, value.ext_opt_bytes); ProtoAdapter.STRING.encodeWithTag(writer, 1014, value.ext_opt_string); ProtoAdapter.DOUBLE.encodeWithTag(writer, 1013, value.ext_opt_double); ProtoAdapter.FLOAT.encodeWithTag(writer, 1012, value.ext_opt_float); ProtoAdapter.BOOL.encodeWithTag(writer, 1011, value.ext_opt_bool); ProtoAdapter.SFIXED64.encodeWithTag(writer, 1010, value.ext_opt_sfixed64); ProtoAdapter.FIXED64.encodeWithTag(writer, 1009, value.ext_opt_fixed64); ProtoAdapter.SINT64.encodeWithTag(writer, 1008, value.ext_opt_sint64); ProtoAdapter.UINT64.encodeWithTag(writer, 1007, value.ext_opt_uint64); ProtoAdapter.INT64.encodeWithTag(writer, 1006, value.ext_opt_int64); ProtoAdapter.SFIXED32.encodeWithTag(writer, 1005, value.ext_opt_sfixed32); ProtoAdapter.FIXED32.encodeWithTag(writer, 1004, value.ext_opt_fixed32); ProtoAdapter.SINT32.encodeWithTag(writer, 1003, value.ext_opt_sint32); ProtoAdapter.UINT32.encodeWithTag(writer, 1002, value.ext_opt_uint32); ProtoAdapter.INT32.encodeWithTag(writer, 1001, value.ext_opt_int32); map_string_enumAdapter().encodeWithTag(writer, 504, value.map_string_enum); map_string_messageAdapter().encodeWithTag(writer, 503, value.map_string_message); map_string_stringAdapter().encodeWithTag(writer, 502, value.map_string_string); map_int32_int32Adapter().encodeWithTag(writer, 501, value.map_int32_int32); NestedEnum.ADAPTER.encodeWithTag(writer, 416, value.default_nested_enum); ProtoAdapter.BYTES.encodeWithTag(writer, 415, value.default_bytes); ProtoAdapter.STRING.encodeWithTag(writer, 414, value.default_string); ProtoAdapter.DOUBLE.encodeWithTag(writer, 413, value.default_double); ProtoAdapter.FLOAT.encodeWithTag(writer, 412, value.default_float); ProtoAdapter.BOOL.encodeWithTag(writer, 411, value.default_bool); ProtoAdapter.SFIXED64.encodeWithTag(writer, 410, value.default_sfixed64); ProtoAdapter.FIXED64.encodeWithTag(writer, 409, value.default_fixed64); ProtoAdapter.SINT64.encodeWithTag(writer, 408, value.default_sint64); ProtoAdapter.UINT64.encodeWithTag(writer, 407, value.default_uint64); ProtoAdapter.INT64.encodeWithTag(writer, 406, value.default_int64); ProtoAdapter.SFIXED32.encodeWithTag(writer, 405, value.default_sfixed32); ProtoAdapter.FIXED32.encodeWithTag(writer, 404, value.default_fixed32); ProtoAdapter.SINT32.encodeWithTag(writer, 403, value.default_sint32); ProtoAdapter.UINT32.encodeWithTag(writer, 402, value.default_uint32); ProtoAdapter.INT32.encodeWithTag(writer, 401, value.default_int32); NestedEnum.ADAPTER.asPacked().encodeWithTag(writer, 316, value.pack_nested_enum); ProtoAdapter.DOUBLE.asPacked().encodeWithTag(writer, 313, value.pack_double); ProtoAdapter.FLOAT.asPacked().encodeWithTag(writer, 312, value.pack_float); ProtoAdapter.BOOL.asPacked().encodeWithTag(writer, 311, value.pack_bool); ProtoAdapter.SFIXED64.asPacked().encodeWithTag(writer, 310, value.pack_sfixed64); ProtoAdapter.FIXED64.asPacked().encodeWithTag(writer, 309, value.pack_fixed64); ProtoAdapter.SINT64.asPacked().encodeWithTag(writer, 308, value.pack_sint64); ProtoAdapter.UINT64.asPacked().encodeWithTag(writer, 307, value.pack_uint64); ProtoAdapter.INT64.asPacked().encodeWithTag(writer, 306, value.pack_int64); ProtoAdapter.SFIXED32.asPacked().encodeWithTag(writer, 305, value.pack_sfixed32); ProtoAdapter.FIXED32.asPacked().encodeWithTag(writer, 304, value.pack_fixed32); ProtoAdapter.SINT32.asPacked().encodeWithTag(writer, 303, value.pack_sint32); ProtoAdapter.UINT32.asPacked().encodeWithTag(writer, 302, value.pack_uint32); ProtoAdapter.INT32.asPacked().encodeWithTag(writer, 301, value.pack_int32); NestedMessage.ADAPTER.asRepeated().encodeWithTag(writer, 217, value.rep_nested_message); NestedEnum.ADAPTER.asRepeated().encodeWithTag(writer, 216, value.rep_nested_enum); ProtoAdapter.BYTES.asRepeated().encodeWithTag(writer, 215, value.rep_bytes); ProtoAdapter.STRING.asRepeated().encodeWithTag(writer, 214, value.rep_string); ProtoAdapter.DOUBLE.asRepeated().encodeWithTag(writer, 213, value.rep_double); ProtoAdapter.FLOAT.asRepeated().encodeWithTag(writer, 212, value.rep_float); ProtoAdapter.BOOL.asRepeated().encodeWithTag(writer, 211, value.rep_bool); ProtoAdapter.SFIXED64.asRepeated().encodeWithTag(writer, 210, value.rep_sfixed64); ProtoAdapter.FIXED64.asRepeated().encodeWithTag(writer, 209, value.rep_fixed64); ProtoAdapter.SINT64.asRepeated().encodeWithTag(writer, 208, value.rep_sint64); ProtoAdapter.UINT64.asRepeated().encodeWithTag(writer, 207, value.rep_uint64); ProtoAdapter.INT64.asRepeated().encodeWithTag(writer, 206, value.rep_int64); ProtoAdapter.SFIXED32.asRepeated().encodeWithTag(writer, 205, value.rep_sfixed32); ProtoAdapter.FIXED32.asRepeated().encodeWithTag(writer, 204, value.rep_fixed32); ProtoAdapter.SINT32.asRepeated().encodeWithTag(writer, 203, value.rep_sint32); ProtoAdapter.UINT32.asRepeated().encodeWithTag(writer, 202, value.rep_uint32); ProtoAdapter.INT32.asRepeated().encodeWithTag(writer, 201, value.rep_int32); NestedMessage.ADAPTER.encodeWithTag(writer, 117, value.req_nested_message); NestedEnum.ADAPTER.encodeWithTag(writer, 116, value.req_nested_enum); ProtoAdapter.BYTES.encodeWithTag(writer, 115, value.req_bytes); ProtoAdapter.STRING.encodeWithTag(writer, 114, value.req_string); ProtoAdapter.DOUBLE.encodeWithTag(writer, 113, value.req_double); ProtoAdapter.FLOAT.encodeWithTag(writer, 112, value.req_float); ProtoAdapter.BOOL.encodeWithTag(writer, 111, value.req_bool); ProtoAdapter.SFIXED64.encodeWithTag(writer, 110, value.req_sfixed64); ProtoAdapter.FIXED64.encodeWithTag(writer, 109, value.req_fixed64); ProtoAdapter.SINT64.encodeWithTag(writer, 108, value.req_sint64); ProtoAdapter.UINT64.encodeWithTag(writer, 107, value.req_uint64); ProtoAdapter.INT64.encodeWithTag(writer, 106, value.req_int64); ProtoAdapter.SFIXED32.encodeWithTag(writer, 105, value.req_sfixed32); ProtoAdapter.FIXED32.encodeWithTag(writer, 104, value.req_fixed32); ProtoAdapter.SINT32.encodeWithTag(writer, 103, value.req_sint32); ProtoAdapter.UINT32.encodeWithTag(writer, 102, value.req_uint32); ProtoAdapter.INT32.encodeWithTag(writer, 101, value.req_int32); NestedMessage.ADAPTER.encodeWithTag(writer, 17, value.opt_nested_message); NestedEnum.ADAPTER.encodeWithTag(writer, 16, value.opt_nested_enum); ProtoAdapter.BYTES.encodeWithTag(writer, 15, value.opt_bytes); ProtoAdapter.STRING.encodeWithTag(writer, 14, value.opt_string); ProtoAdapter.DOUBLE.encodeWithTag(writer, 13, value.opt_double); ProtoAdapter.FLOAT.encodeWithTag(writer, 12, value.opt_float); ProtoAdapter.BOOL.encodeWithTag(writer, 11, value.opt_bool); ProtoAdapter.SFIXED64.encodeWithTag(writer, 10, value.opt_sfixed64); ProtoAdapter.FIXED64.encodeWithTag(writer, 9, value.opt_fixed64); ProtoAdapter.SINT64.encodeWithTag(writer, 8, value.opt_sint64); ProtoAdapter.UINT64.encodeWithTag(writer, 7, value.opt_uint64); ProtoAdapter.INT64.encodeWithTag(writer, 6, value.opt_int64); ProtoAdapter.SFIXED32.encodeWithTag(writer, 5, value.opt_sfixed32); ProtoAdapter.FIXED32.encodeWithTag(writer, 4, value.opt_fixed32); ProtoAdapter.SINT32.encodeWithTag(writer, 3, value.opt_sint32); ProtoAdapter.UINT32.encodeWithTag(writer, 2, value.opt_uint32); ProtoAdapter.INT32.encodeWithTag(writer, 1, value.opt_int32); } @Override public AllTypes 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.opt_int32(ProtoAdapter.INT32.decode(reader)); break; case 2: builder.opt_uint32(ProtoAdapter.UINT32.decode(reader)); break; case 3: builder.opt_sint32(ProtoAdapter.SINT32.decode(reader)); break; case 4: builder.opt_fixed32(ProtoAdapter.FIXED32.decode(reader)); break; case 5: builder.opt_sfixed32(ProtoAdapter.SFIXED32.decode(reader)); break; case 6: builder.opt_int64(ProtoAdapter.INT64.decode(reader)); break; case 7: builder.opt_uint64(ProtoAdapter.UINT64.decode(reader)); break; case 8: builder.opt_sint64(ProtoAdapter.SINT64.decode(reader)); break; case 9: builder.opt_fixed64(ProtoAdapter.FIXED64.decode(reader)); break; case 10: builder.opt_sfixed64(ProtoAdapter.SFIXED64.decode(reader)); break; case 11: builder.opt_bool(ProtoAdapter.BOOL.decode(reader)); break; case 12: builder.opt_float(ProtoAdapter.FLOAT.decode(reader)); break; case 13: builder.opt_double(ProtoAdapter.DOUBLE.decode(reader)); break; case 14: builder.opt_string(ProtoAdapter.STRING.decode(reader)); break; case 15: builder.opt_bytes(ProtoAdapter.BYTES.decode(reader)); break; case 16: { try { builder.opt_nested_enum(NestedEnum.ADAPTER.decode(reader)); } catch (ProtoAdapter.EnumConstantNotFoundException e) { builder.addUnknownField(tag, FieldEncoding.VARINT, (long) e.value); } break; } case 17: builder.opt_nested_message(NestedMessage.ADAPTER.decode(reader)); break; case 101: builder.req_int32(ProtoAdapter.INT32.decode(reader)); break; case 102: builder.req_uint32(ProtoAdapter.UINT32.decode(reader)); break; case 103: builder.req_sint32(ProtoAdapter.SINT32.decode(reader)); break; case 104: builder.req_fixed32(ProtoAdapter.FIXED32.decode(reader)); break; case 105: builder.req_sfixed32(ProtoAdapter.SFIXED32.decode(reader)); break; case 106: builder.req_int64(ProtoAdapter.INT64.decode(reader)); break; case 107: builder.req_uint64(ProtoAdapter.UINT64.decode(reader)); break; case 108: builder.req_sint64(ProtoAdapter.SINT64.decode(reader)); break; case 109: builder.req_fixed64(ProtoAdapter.FIXED64.decode(reader)); break; case 110: builder.req_sfixed64(ProtoAdapter.SFIXED64.decode(reader)); break; case 111: builder.req_bool(ProtoAdapter.BOOL.decode(reader)); break; case 112: builder.req_float(ProtoAdapter.FLOAT.decode(reader)); break; case 113: builder.req_double(ProtoAdapter.DOUBLE.decode(reader)); break; case 114: builder.req_string(ProtoAdapter.STRING.decode(reader)); break; case 115: builder.req_bytes(ProtoAdapter.BYTES.decode(reader)); break; case 116: { try { builder.req_nested_enum(NestedEnum.ADAPTER.decode(reader)); } catch (ProtoAdapter.EnumConstantNotFoundException e) { builder.addUnknownField(tag, FieldEncoding.VARINT, (long) e.value); } break; } case 117: builder.req_nested_message(NestedMessage.ADAPTER.decode(reader)); break; case 201: builder.rep_int32.add(ProtoAdapter.INT32.decode(reader)); break; case 202: builder.rep_uint32.add(ProtoAdapter.UINT32.decode(reader)); break; case 203: builder.rep_sint32.add(ProtoAdapter.SINT32.decode(reader)); break; case 204: builder.rep_fixed32.add(ProtoAdapter.FIXED32.decode(reader)); break; case 205: builder.rep_sfixed32.add(ProtoAdapter.SFIXED32.decode(reader)); break; case 206: builder.rep_int64.add(ProtoAdapter.INT64.decode(reader)); break; case 207: builder.rep_uint64.add(ProtoAdapter.UINT64.decode(reader)); break; case 208: builder.rep_sint64.add(ProtoAdapter.SINT64.decode(reader)); break; case 209: builder.rep_fixed64.add(ProtoAdapter.FIXED64.decode(reader)); break; case 210: builder.rep_sfixed64.add(ProtoAdapter.SFIXED64.decode(reader)); break; case 211: builder.rep_bool.add(ProtoAdapter.BOOL.decode(reader)); break; case 212: builder.rep_float.add(ProtoAdapter.FLOAT.decode(reader)); break; case 213: builder.rep_double.add(ProtoAdapter.DOUBLE.decode(reader)); break; case 214: builder.rep_string.add(ProtoAdapter.STRING.decode(reader)); break; case 215: builder.rep_bytes.add(ProtoAdapter.BYTES.decode(reader)); break; case 216: { try { builder.rep_nested_enum.add(NestedEnum.ADAPTER.decode(reader)); } catch (ProtoAdapter.EnumConstantNotFoundException e) { builder.addUnknownField(tag, FieldEncoding.VARINT, (long) e.value); } break; } case 217: builder.rep_nested_message.add(NestedMessage.ADAPTER.decode(reader)); break; case 301: builder.pack_int32.add(ProtoAdapter.INT32.decode(reader)); break; case 302: builder.pack_uint32.add(ProtoAdapter.UINT32.decode(reader)); break; case 303: builder.pack_sint32.add(ProtoAdapter.SINT32.decode(reader)); break; case 304: builder.pack_fixed32.add(ProtoAdapter.FIXED32.decode(reader)); break; case 305: builder.pack_sfixed32.add(ProtoAdapter.SFIXED32.decode(reader)); break; case 306: builder.pack_int64.add(ProtoAdapter.INT64.decode(reader)); break; case 307: builder.pack_uint64.add(ProtoAdapter.UINT64.decode(reader)); break; case 308: builder.pack_sint64.add(ProtoAdapter.SINT64.decode(reader)); break; case 309: builder.pack_fixed64.add(ProtoAdapter.FIXED64.decode(reader)); break; case 310: builder.pack_sfixed64.add(ProtoAdapter.SFIXED64.decode(reader)); break; case 311: builder.pack_bool.add(ProtoAdapter.BOOL.decode(reader)); break; case 312: builder.pack_float.add(ProtoAdapter.FLOAT.decode(reader)); break; case 313: builder.pack_double.add(ProtoAdapter.DOUBLE.decode(reader)); break; case 316: { try { builder.pack_nested_enum.add(NestedEnum.ADAPTER.decode(reader)); } catch (ProtoAdapter.EnumConstantNotFoundException e) { builder.addUnknownField(tag, FieldEncoding.VARINT, (long) e.value); } break; } case 401: builder.default_int32(ProtoAdapter.INT32.decode(reader)); break; case 402: builder.default_uint32(ProtoAdapter.UINT32.decode(reader)); break; case 403: builder.default_sint32(ProtoAdapter.SINT32.decode(reader)); break; case 404: builder.default_fixed32(ProtoAdapter.FIXED32.decode(reader)); break; case 405: builder.default_sfixed32(ProtoAdapter.SFIXED32.decode(reader)); break; case 406: builder.default_int64(ProtoAdapter.INT64.decode(reader)); break; case 407: builder.default_uint64(ProtoAdapter.UINT64.decode(reader)); break; case 408: builder.default_sint64(ProtoAdapter.SINT64.decode(reader)); break; case 409: builder.default_fixed64(ProtoAdapter.FIXED64.decode(reader)); break; case 410: builder.default_sfixed64(ProtoAdapter.SFIXED64.decode(reader)); break; case 411: builder.default_bool(ProtoAdapter.BOOL.decode(reader)); break; case 412: builder.default_float(ProtoAdapter.FLOAT.decode(reader)); break; case 413: builder.default_double(ProtoAdapter.DOUBLE.decode(reader)); break; case 414: builder.default_string(ProtoAdapter.STRING.decode(reader)); break; case 415: builder.default_bytes(ProtoAdapter.BYTES.decode(reader)); break; case 416: { try { builder.default_nested_enum(NestedEnum.ADAPTER.decode(reader)); } catch (ProtoAdapter.EnumConstantNotFoundException e) { builder.addUnknownField(tag, FieldEncoding.VARINT, (long) e.value); } break; } case 501: builder.map_int32_int32.putAll(map_int32_int32Adapter().decode(reader)); break; case 502: builder.map_string_string.putAll(map_string_stringAdapter().decode(reader)); break; case 503: builder.map_string_message.putAll(map_string_messageAdapter().decode(reader)); break; case 504: builder.map_string_enum.putAll(map_string_enumAdapter().decode(reader)); break; case 1001: builder.ext_opt_int32(ProtoAdapter.INT32.decode(reader)); break; case 1002: builder.ext_opt_uint32(ProtoAdapter.UINT32.decode(reader)); break; case 1003: builder.ext_opt_sint32(ProtoAdapter.SINT32.decode(reader)); break; case 1004: builder.ext_opt_fixed32(ProtoAdapter.FIXED32.decode(reader)); break; case 1005: builder.ext_opt_sfixed32(ProtoAdapter.SFIXED32.decode(reader)); break; case 1006: builder.ext_opt_int64(ProtoAdapter.INT64.decode(reader)); break; case 1007: builder.ext_opt_uint64(ProtoAdapter.UINT64.decode(reader)); break; case 1008: builder.ext_opt_sint64(ProtoAdapter.SINT64.decode(reader)); break; case 1009: builder.ext_opt_fixed64(ProtoAdapter.FIXED64.decode(reader)); break; case 1010: builder.ext_opt_sfixed64(ProtoAdapter.SFIXED64.decode(reader)); break; case 1011: builder.ext_opt_bool(ProtoAdapter.BOOL.decode(reader)); break; case 1012: builder.ext_opt_float(ProtoAdapter.FLOAT.decode(reader)); break; case 1013: builder.ext_opt_double(ProtoAdapter.DOUBLE.decode(reader)); break; case 1014: builder.ext_opt_string(ProtoAdapter.STRING.decode(reader)); break; case 1015: builder.ext_opt_bytes(ProtoAdapter.BYTES.decode(reader)); break; case 1016: { try { builder.ext_opt_nested_enum(NestedEnum.ADAPTER.decode(reader)); } catch (ProtoAdapter.EnumConstantNotFoundException e) { builder.addUnknownField(tag, FieldEncoding.VARINT, (long) e.value); } break; } case 1017: builder.ext_opt_nested_message(NestedMessage.ADAPTER.decode(reader)); break; case 1101: builder.ext_rep_int32.add(ProtoAdapter.INT32.decode(reader)); break; case 1102: builder.ext_rep_uint32.add(ProtoAdapter.UINT32.decode(reader)); break; case 1103: builder.ext_rep_sint32.add(ProtoAdapter.SINT32.decode(reader)); break; case 1104: builder.ext_rep_fixed32.add(ProtoAdapter.FIXED32.decode(reader)); break; case 1105: builder.ext_rep_sfixed32.add(ProtoAdapter.SFIXED32.decode(reader)); break; case 1106: builder.ext_rep_int64.add(ProtoAdapter.INT64.decode(reader)); break; case 1107: builder.ext_rep_uint64.add(ProtoAdapter.UINT64.decode(reader)); break; case 1108: builder.ext_rep_sint64.add(ProtoAdapter.SINT64.decode(reader)); break; case 1109: builder.ext_rep_fixed64.add(ProtoAdapter.FIXED64.decode(reader)); break; case 1110: builder.ext_rep_sfixed64.add(ProtoAdapter.SFIXED64.decode(reader)); break; case 1111: builder.ext_rep_bool.add(ProtoAdapter.BOOL.decode(reader)); break; case 1112: builder.ext_rep_float.add(ProtoAdapter.FLOAT.decode(reader)); break; case 1113: builder.ext_rep_double.add(ProtoAdapter.DOUBLE.decode(reader)); break; case 1114: builder.ext_rep_string.add(ProtoAdapter.STRING.decode(reader)); break; case 1115: builder.ext_rep_bytes.add(ProtoAdapter.BYTES.decode(reader)); break; case 1116: { try { builder.ext_rep_nested_enum.add(NestedEnum.ADAPTER.decode(reader)); } catch (ProtoAdapter.EnumConstantNotFoundException e) { builder.addUnknownField(tag, FieldEncoding.VARINT, (long) e.value); } break; } case 1117: builder.ext_rep_nested_message.add(NestedMessage.ADAPTER.decode(reader)); break; case 1201: builder.ext_pack_int32.add(ProtoAdapter.INT32.decode(reader)); break; case 1202: builder.ext_pack_uint32.add(ProtoAdapter.UINT32.decode(reader)); break; case 1203: builder.ext_pack_sint32.add(ProtoAdapter.SINT32.decode(reader)); break; case 1204: builder.ext_pack_fixed32.add(ProtoAdapter.FIXED32.decode(reader)); break; case 1205: builder.ext_pack_sfixed32.add(ProtoAdapter.SFIXED32.decode(reader)); break; case 1206: builder.ext_pack_int64.add(ProtoAdapter.INT64.decode(reader)); break; case 1207: builder.ext_pack_uint64.add(ProtoAdapter.UINT64.decode(reader)); break; case 1208: builder.ext_pack_sint64.add(ProtoAdapter.SINT64.decode(reader)); break; case 1209: builder.ext_pack_fixed64.add(ProtoAdapter.FIXED64.decode(reader)); break; case 1210: builder.ext_pack_sfixed64.add(ProtoAdapter.SFIXED64.decode(reader)); break; case 1211: builder.ext_pack_bool.add(ProtoAdapter.BOOL.decode(reader)); break; case 1212: builder.ext_pack_float.add(ProtoAdapter.FLOAT.decode(reader)); break; case 1213: builder.ext_pack_double.add(ProtoAdapter.DOUBLE.decode(reader)); break; case 1216: { try { builder.ext_pack_nested_enum.add(NestedEnum.ADAPTER.decode(reader)); } catch (ProtoAdapter.EnumConstantNotFoundException e) { builder.addUnknownField(tag, FieldEncoding.VARINT, (long) e.value); } break; } default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public AllTypes redact(AllTypes value) { Builder builder = value.newBuilder(); if (builder.opt_nested_message != null) builder.opt_nested_message = NestedMessage.ADAPTER.redact(builder.opt_nested_message); builder.req_nested_message = NestedMessage.ADAPTER.redact(builder.req_nested_message); Internal.redactElements(builder.rep_nested_message, NestedMessage.ADAPTER); Internal.redactElements(builder.map_string_message, NestedMessage.ADAPTER); if (builder.ext_opt_nested_message != null) builder.ext_opt_nested_message = NestedMessage.ADAPTER.redact(builder.ext_opt_nested_message); Internal.redactElements(builder.ext_rep_nested_message, NestedMessage.ADAPTER); builder.clearUnknownFields(); return builder.build(); } private ProtoAdapter<Map<Integer, Integer>> map_int32_int32Adapter() { ProtoAdapter<Map<Integer, Integer>> result = map_int32_int32; if (result == null) { result = ProtoAdapter.newMapAdapter(ProtoAdapter.INT32, ProtoAdapter.INT32); map_int32_int32 = result; } return result; } private ProtoAdapter<Map<String, String>> map_string_stringAdapter() { ProtoAdapter<Map<String, String>> result = map_string_string; if (result == null) { result = ProtoAdapter.newMapAdapter(ProtoAdapter.STRING, ProtoAdapter.STRING); map_string_string = result; } return result; } private ProtoAdapter<Map<String, NestedMessage>> map_string_messageAdapter() { ProtoAdapter<Map<String, NestedMessage>> result = map_string_message; if (result == null) { result = ProtoAdapter.newMapAdapter(ProtoAdapter.STRING, NestedMessage.ADAPTER); map_string_message = result; } return result; } private ProtoAdapter<Map<String, NestedEnum>> map_string_enumAdapter() { ProtoAdapter<Map<String, NestedEnum>> result = map_string_enum; if (result == null) { result = ProtoAdapter.newMapAdapter(ProtoAdapter.STRING, NestedEnum.ADAPTER); map_string_enum = result; } return result; } } }
7,053
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/person/Person.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.person.Person in person.proto package com.squareup.wire.protos.person; import com.squareup.wire.EnumAdapter; 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.WireEnum; import com.squareup.wire.WireField; import com.squareup.wire.internal.Internal; import java.io.IOException; import java.lang.Integer; 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 Person extends Message<Person, Person.Builder> { public static final ProtoAdapter<Person> ADAPTER = new ProtoAdapter_Person(); private static final long serialVersionUID = 0L; public static final Integer DEFAULT_ID = 0; public static final String DEFAULT_NAME = ""; public static final String DEFAULT_EMAIL = ""; /** * The customer's ID number. */ @WireField( tag = 2, adapter = "com.squareup.wire.ProtoAdapter#INT32", label = WireField.Label.REQUIRED ) public final Integer id; /** * The customer's full name. */ @WireField( tag = 1, adapter = "com.squareup.wire.ProtoAdapter#STRING", label = WireField.Label.REQUIRED ) public final String name; /** * Email address for the customer. */ @WireField( tag = 3, adapter = "com.squareup.wire.ProtoAdapter#STRING" ) public final String email; /** * A list of the customer's phone numbers. */ @WireField( tag = 4, adapter = "com.squareup.wire.protos.person.Person$PhoneNumber#ADAPTER", label = WireField.Label.REPEATED ) public final List<PhoneNumber> phone; @WireField( tag = 5, adapter = "com.squareup.wire.ProtoAdapter#STRING", label = WireField.Label.REPEATED ) public final List<String> aliases; public Person(Integer id, String name, String email, List<PhoneNumber> phone, List<String> aliases) { this(id, name, email, phone, aliases, ByteString.EMPTY); } public Person(Integer id, String name, String email, List<PhoneNumber> phone, List<String> aliases, ByteString unknownFields) { super(ADAPTER, unknownFields); this.id = id; this.name = name; this.email = email; this.phone = Internal.immutableCopyOf("phone", phone); this.aliases = Internal.immutableCopyOf("aliases", aliases); } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.id = id; builder.name = name; builder.email = email; builder.phone = Internal.copyOf(phone); builder.aliases = Internal.copyOf(aliases); builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof Person)) return false; Person o = (Person) other; return unknownFields().equals(o.unknownFields()) && id.equals(o.id) && name.equals(o.name) && Internal.equals(email, o.email) && phone.equals(o.phone) && aliases.equals(o.aliases); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + id.hashCode(); result = result * 37 + name.hashCode(); result = result * 37 + (email != null ? email.hashCode() : 0); result = result * 37 + phone.hashCode(); result = result * 37 + aliases.hashCode(); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append(", id=").append(id); builder.append(", name=").append(Internal.sanitize(name)); if (email != null) builder.append(", email=").append(Internal.sanitize(email)); if (!phone.isEmpty()) builder.append(", phone=").append(phone); if (!aliases.isEmpty()) builder.append(", aliases=").append(Internal.sanitize(aliases)); return builder.replace(0, 2, "Person{").append('}').toString(); } public static final class Builder extends Message.Builder<Person, Builder> { public Integer id; public String name; public String email; public List<PhoneNumber> phone; public List<String> aliases; public Builder() { phone = Internal.newMutableList(); aliases = Internal.newMutableList(); } /** * The customer's ID number. */ public Builder id(Integer id) { this.id = id; return this; } /** * The customer's full name. */ public Builder name(String name) { this.name = name; return this; } /** * Email address for the customer. */ public Builder email(String email) { this.email = email; return this; } /** * A list of the customer's phone numbers. */ public Builder phone(List<PhoneNumber> phone) { Internal.checkElementsNotNull(phone); this.phone = phone; return this; } public Builder aliases(List<String> aliases) { Internal.checkElementsNotNull(aliases); this.aliases = aliases; return this; } @Override public Person build() { if (id == null || name == null) { throw Internal.missingRequiredFields(id, "id", name, "name"); } return new Person(id, name, email, phone, aliases, super.buildUnknownFields()); } } public enum PhoneType implements WireEnum { MOBILE(0), HOME(1), /** * Could be phone or fax. */ WORK(2); public static final ProtoAdapter<PhoneType> ADAPTER = new ProtoAdapter_PhoneType(); private final int value; PhoneType(int value) { this.value = value; } /** * Return the constant for {@code value} or null. */ public static PhoneType fromValue(int value) { switch (value) { case 0: return MOBILE; case 1: return HOME; case 2: return WORK; default: return null; } } @Override public int getValue() { return value; } private static final class ProtoAdapter_PhoneType extends EnumAdapter<PhoneType> { ProtoAdapter_PhoneType() { super(PhoneType.class, Syntax.PROTO_2, PhoneType.MOBILE); } @Override protected PhoneType fromValue(int value) { return PhoneType.fromValue(value); } } } public static final class PhoneNumber extends Message<PhoneNumber, PhoneNumber.Builder> { public static final ProtoAdapter<PhoneNumber> ADAPTER = new ProtoAdapter_PhoneNumber(); private static final long serialVersionUID = 0L; public static final String DEFAULT_NUMBER = ""; public static final PhoneType DEFAULT_TYPE = PhoneType.HOME; /** * The customer's phone number. */ @WireField( tag = 1, adapter = "com.squareup.wire.ProtoAdapter#STRING", label = WireField.Label.REQUIRED ) public final String number; /** * The type of phone stored here. */ @WireField( tag = 2, adapter = "com.squareup.wire.protos.person.Person$PhoneType#ADAPTER" ) public final PhoneType type; public PhoneNumber(String number, PhoneType type) { this(number, type, ByteString.EMPTY); } public PhoneNumber(String number, PhoneType type, ByteString unknownFields) { super(ADAPTER, unknownFields); this.number = number; this.type = type; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.number = number; builder.type = type; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof PhoneNumber)) return false; PhoneNumber o = (PhoneNumber) other; return unknownFields().equals(o.unknownFields()) && number.equals(o.number) && Internal.equals(type, o.type); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + number.hashCode(); result = result * 37 + (type != null ? type.hashCode() : 0); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append(", number=").append(Internal.sanitize(number)); if (type != null) builder.append(", type=").append(type); return builder.replace(0, 2, "PhoneNumber{").append('}').toString(); } public static final class Builder extends Message.Builder<PhoneNumber, Builder> { public String number; public PhoneType type; public Builder() { } /** * The customer's phone number. */ public Builder number(String number) { this.number = number; return this; } /** * The type of phone stored here. */ public Builder type(PhoneType type) { this.type = type; return this; } @Override public PhoneNumber build() { if (number == null) { throw Internal.missingRequiredFields(number, "number"); } return new PhoneNumber(number, type, super.buildUnknownFields()); } } private static final class ProtoAdapter_PhoneNumber extends ProtoAdapter<PhoneNumber> { public ProtoAdapter_PhoneNumber() { super(FieldEncoding.LENGTH_DELIMITED, PhoneNumber.class, "type.googleapis.com/squareup.protos.person.Person.PhoneNumber", Syntax.PROTO_2, null, "person.proto"); } @Override public int encodedSize(PhoneNumber value) { int result = 0; result += ProtoAdapter.STRING.encodedSizeWithTag(1, value.number); result += PhoneType.ADAPTER.encodedSizeWithTag(2, value.type); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, PhoneNumber value) throws IOException { ProtoAdapter.STRING.encodeWithTag(writer, 1, value.number); PhoneType.ADAPTER.encodeWithTag(writer, 2, value.type); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, PhoneNumber value) throws IOException { writer.writeBytes(value.unknownFields()); PhoneType.ADAPTER.encodeWithTag(writer, 2, value.type); ProtoAdapter.STRING.encodeWithTag(writer, 1, value.number); } @Override public PhoneNumber 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.number(ProtoAdapter.STRING.decode(reader)); break; case 2: { try { builder.type(PhoneType.ADAPTER.decode(reader)); } catch (ProtoAdapter.EnumConstantNotFoundException e) { builder.addUnknownField(tag, FieldEncoding.VARINT, (long) e.value); } break; } default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public PhoneNumber redact(PhoneNumber value) { Builder builder = value.newBuilder(); builder.clearUnknownFields(); return builder.build(); } } } private static final class ProtoAdapter_Person extends ProtoAdapter<Person> { public ProtoAdapter_Person() { super(FieldEncoding.LENGTH_DELIMITED, Person.class, "type.googleapis.com/squareup.protos.person.Person", Syntax.PROTO_2, null, "person.proto"); } @Override public int encodedSize(Person value) { int result = 0; result += ProtoAdapter.INT32.encodedSizeWithTag(2, value.id); result += ProtoAdapter.STRING.encodedSizeWithTag(1, value.name); result += ProtoAdapter.STRING.encodedSizeWithTag(3, value.email); result += PhoneNumber.ADAPTER.asRepeated().encodedSizeWithTag(4, value.phone); result += ProtoAdapter.STRING.asRepeated().encodedSizeWithTag(5, value.aliases); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, Person value) throws IOException { ProtoAdapter.INT32.encodeWithTag(writer, 2, value.id); ProtoAdapter.STRING.encodeWithTag(writer, 1, value.name); ProtoAdapter.STRING.encodeWithTag(writer, 3, value.email); PhoneNumber.ADAPTER.asRepeated().encodeWithTag(writer, 4, value.phone); ProtoAdapter.STRING.asRepeated().encodeWithTag(writer, 5, value.aliases); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, Person value) throws IOException { writer.writeBytes(value.unknownFields()); ProtoAdapter.STRING.asRepeated().encodeWithTag(writer, 5, value.aliases); PhoneNumber.ADAPTER.asRepeated().encodeWithTag(writer, 4, value.phone); ProtoAdapter.STRING.encodeWithTag(writer, 3, value.email); ProtoAdapter.STRING.encodeWithTag(writer, 1, value.name); ProtoAdapter.INT32.encodeWithTag(writer, 2, value.id); } @Override public Person 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.name(ProtoAdapter.STRING.decode(reader)); break; case 2: builder.id(ProtoAdapter.INT32.decode(reader)); break; case 3: builder.email(ProtoAdapter.STRING.decode(reader)); break; case 4: builder.phone.add(PhoneNumber.ADAPTER.decode(reader)); break; case 5: builder.aliases.add(ProtoAdapter.STRING.decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public Person redact(Person value) { Builder builder = value.newBuilder(); Internal.redactElements(builder.phone, PhoneNumber.ADAPTER); builder.clearUnknownFields(); return builder.build(); } } }
7,054
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/unknownfields/VersionTwo.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.unknownfields.VersionTwo in unknown_fields.proto package com.squareup.wire.protos.unknownfields; 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.Integer; 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 VersionTwo extends Message<VersionTwo, VersionTwo.Builder> { public static final ProtoAdapter<VersionTwo> ADAPTER = new ProtoAdapter_VersionTwo(); private static final long serialVersionUID = 0L; public static final Integer DEFAULT_I = 0; public static final Integer DEFAULT_V2_I = 0; public static final String DEFAULT_V2_S = ""; public static final Integer DEFAULT_V2_F32 = 0; public static final Long DEFAULT_V2_F64 = 0L; public static final EnumVersionTwo DEFAULT_EN = EnumVersionTwo.SHREK_V2; @WireField( tag = 1, adapter = "com.squareup.wire.ProtoAdapter#INT32" ) public final Integer i; @WireField( tag = 2, adapter = "com.squareup.wire.ProtoAdapter#INT32" ) public final Integer v2_i; @WireField( tag = 3, adapter = "com.squareup.wire.ProtoAdapter#STRING" ) public final String v2_s; @WireField( tag = 4, adapter = "com.squareup.wire.ProtoAdapter#FIXED32" ) public final Integer v2_f32; @WireField( tag = 5, adapter = "com.squareup.wire.ProtoAdapter#FIXED64" ) public final Long v2_f64; @WireField( tag = 6, adapter = "com.squareup.wire.ProtoAdapter#STRING", label = WireField.Label.REPEATED ) public final List<String> v2_rs; @WireField( tag = 7, adapter = "com.squareup.wire.protos.unknownfields.NestedVersionTwo#ADAPTER" ) public final NestedVersionTwo obj; @WireField( tag = 8, adapter = "com.squareup.wire.protos.unknownfields.EnumVersionTwo#ADAPTER" ) public final EnumVersionTwo en; public VersionTwo(Integer i, Integer v2_i, String v2_s, Integer v2_f32, Long v2_f64, List<String> v2_rs, NestedVersionTwo obj, EnumVersionTwo en) { this(i, v2_i, v2_s, v2_f32, v2_f64, v2_rs, obj, en, ByteString.EMPTY); } public VersionTwo(Integer i, Integer v2_i, String v2_s, Integer v2_f32, Long v2_f64, List<String> v2_rs, NestedVersionTwo obj, EnumVersionTwo en, ByteString unknownFields) { super(ADAPTER, unknownFields); this.i = i; this.v2_i = v2_i; this.v2_s = v2_s; this.v2_f32 = v2_f32; this.v2_f64 = v2_f64; this.v2_rs = Internal.immutableCopyOf("v2_rs", v2_rs); this.obj = obj; this.en = en; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.i = i; builder.v2_i = v2_i; builder.v2_s = v2_s; builder.v2_f32 = v2_f32; builder.v2_f64 = v2_f64; builder.v2_rs = Internal.copyOf(v2_rs); builder.obj = obj; builder.en = en; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof VersionTwo)) return false; VersionTwo o = (VersionTwo) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(i, o.i) && Internal.equals(v2_i, o.v2_i) && Internal.equals(v2_s, o.v2_s) && Internal.equals(v2_f32, o.v2_f32) && Internal.equals(v2_f64, o.v2_f64) && v2_rs.equals(o.v2_rs) && Internal.equals(obj, o.obj) && Internal.equals(en, o.en); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + (i != null ? i.hashCode() : 0); result = result * 37 + (v2_i != null ? v2_i.hashCode() : 0); result = result * 37 + (v2_s != null ? v2_s.hashCode() : 0); result = result * 37 + (v2_f32 != null ? v2_f32.hashCode() : 0); result = result * 37 + (v2_f64 != null ? v2_f64.hashCode() : 0); result = result * 37 + v2_rs.hashCode(); result = result * 37 + (obj != null ? obj.hashCode() : 0); result = result * 37 + (en != null ? en.hashCode() : 0); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (i != null) builder.append(", i=").append(i); if (v2_i != null) builder.append(", v2_i=").append(v2_i); if (v2_s != null) builder.append(", v2_s=").append(Internal.sanitize(v2_s)); if (v2_f32 != null) builder.append(", v2_f32=").append(v2_f32); if (v2_f64 != null) builder.append(", v2_f64=").append(v2_f64); if (!v2_rs.isEmpty()) builder.append(", v2_rs=").append(Internal.sanitize(v2_rs)); if (obj != null) builder.append(", obj=").append(obj); if (en != null) builder.append(", en=").append(en); return builder.replace(0, 2, "VersionTwo{").append('}').toString(); } public static final class Builder extends Message.Builder<VersionTwo, Builder> { public Integer i; public Integer v2_i; public String v2_s; public Integer v2_f32; public Long v2_f64; public List<String> v2_rs; public NestedVersionTwo obj; public EnumVersionTwo en; public Builder() { v2_rs = Internal.newMutableList(); } public Builder i(Integer i) { this.i = i; return this; } public Builder v2_i(Integer v2_i) { this.v2_i = v2_i; return this; } public Builder v2_s(String v2_s) { this.v2_s = v2_s; return this; } public Builder v2_f32(Integer v2_f32) { this.v2_f32 = v2_f32; return this; } public Builder v2_f64(Long v2_f64) { this.v2_f64 = v2_f64; return this; } public Builder v2_rs(List<String> v2_rs) { Internal.checkElementsNotNull(v2_rs); this.v2_rs = v2_rs; return this; } public Builder obj(NestedVersionTwo obj) { this.obj = obj; return this; } public Builder en(EnumVersionTwo en) { this.en = en; return this; } @Override public VersionTwo build() { return new VersionTwo(i, v2_i, v2_s, v2_f32, v2_f64, v2_rs, obj, en, super.buildUnknownFields()); } } private static final class ProtoAdapter_VersionTwo extends ProtoAdapter<VersionTwo> { public ProtoAdapter_VersionTwo() { super(FieldEncoding.LENGTH_DELIMITED, VersionTwo.class, "type.googleapis.com/squareup.protos.unknownfields.VersionTwo", Syntax.PROTO_2, null, "unknown_fields.proto"); } @Override public int encodedSize(VersionTwo value) { int result = 0; result += ProtoAdapter.INT32.encodedSizeWithTag(1, value.i); result += ProtoAdapter.INT32.encodedSizeWithTag(2, value.v2_i); result += ProtoAdapter.STRING.encodedSizeWithTag(3, value.v2_s); result += ProtoAdapter.FIXED32.encodedSizeWithTag(4, value.v2_f32); result += ProtoAdapter.FIXED64.encodedSizeWithTag(5, value.v2_f64); result += ProtoAdapter.STRING.asRepeated().encodedSizeWithTag(6, value.v2_rs); result += NestedVersionTwo.ADAPTER.encodedSizeWithTag(7, value.obj); result += EnumVersionTwo.ADAPTER.encodedSizeWithTag(8, value.en); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, VersionTwo value) throws IOException { ProtoAdapter.INT32.encodeWithTag(writer, 1, value.i); ProtoAdapter.INT32.encodeWithTag(writer, 2, value.v2_i); ProtoAdapter.STRING.encodeWithTag(writer, 3, value.v2_s); ProtoAdapter.FIXED32.encodeWithTag(writer, 4, value.v2_f32); ProtoAdapter.FIXED64.encodeWithTag(writer, 5, value.v2_f64); ProtoAdapter.STRING.asRepeated().encodeWithTag(writer, 6, value.v2_rs); NestedVersionTwo.ADAPTER.encodeWithTag(writer, 7, value.obj); EnumVersionTwo.ADAPTER.encodeWithTag(writer, 8, value.en); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, VersionTwo value) throws IOException { writer.writeBytes(value.unknownFields()); EnumVersionTwo.ADAPTER.encodeWithTag(writer, 8, value.en); NestedVersionTwo.ADAPTER.encodeWithTag(writer, 7, value.obj); ProtoAdapter.STRING.asRepeated().encodeWithTag(writer, 6, value.v2_rs); ProtoAdapter.FIXED64.encodeWithTag(writer, 5, value.v2_f64); ProtoAdapter.FIXED32.encodeWithTag(writer, 4, value.v2_f32); ProtoAdapter.STRING.encodeWithTag(writer, 3, value.v2_s); ProtoAdapter.INT32.encodeWithTag(writer, 2, value.v2_i); ProtoAdapter.INT32.encodeWithTag(writer, 1, value.i); } @Override public VersionTwo 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.i(ProtoAdapter.INT32.decode(reader)); break; case 2: builder.v2_i(ProtoAdapter.INT32.decode(reader)); break; case 3: builder.v2_s(ProtoAdapter.STRING.decode(reader)); break; case 4: builder.v2_f32(ProtoAdapter.FIXED32.decode(reader)); break; case 5: builder.v2_f64(ProtoAdapter.FIXED64.decode(reader)); break; case 6: builder.v2_rs.add(ProtoAdapter.STRING.decode(reader)); break; case 7: builder.obj(NestedVersionTwo.ADAPTER.decode(reader)); break; case 8: { try { builder.en(EnumVersionTwo.ADAPTER.decode(reader)); } catch (ProtoAdapter.EnumConstantNotFoundException e) { builder.addUnknownField(tag, FieldEncoding.VARINT, (long) e.value); } break; } default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public VersionTwo redact(VersionTwo value) { Builder builder = value.newBuilder(); if (builder.obj != null) builder.obj = NestedVersionTwo.ADAPTER.redact(builder.obj); builder.clearUnknownFields(); return builder.build(); } } }
7,055
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/unknownfields/EnumVersionTwo.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.unknownfields.EnumVersionTwo in unknown_fields.proto package com.squareup.wire.protos.unknownfields; import com.squareup.wire.EnumAdapter; import com.squareup.wire.ProtoAdapter; import com.squareup.wire.Syntax; import com.squareup.wire.WireEnum; import java.lang.Override; public enum EnumVersionTwo implements WireEnum { SHREK_V2(1), DONKEY_V2(2), FIONA_V2(3), PUSS_IN_BOOTS_V2(4); public static final ProtoAdapter<EnumVersionTwo> ADAPTER = new ProtoAdapter_EnumVersionTwo(); private final int value; EnumVersionTwo(int value) { this.value = value; } /** * Return the constant for {@code value} or null. */ public static EnumVersionTwo fromValue(int value) { switch (value) { case 1: return SHREK_V2; case 2: return DONKEY_V2; case 3: return FIONA_V2; case 4: return PUSS_IN_BOOTS_V2; default: return null; } } @Override public int getValue() { return value; } private static final class ProtoAdapter_EnumVersionTwo extends EnumAdapter<EnumVersionTwo> { ProtoAdapter_EnumVersionTwo() { super(EnumVersionTwo.class, Syntax.PROTO_2, null); } @Override protected EnumVersionTwo fromValue(int value) { return EnumVersionTwo.fromValue(value); } } }
7,056
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/unknownfields/NestedVersionTwo.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.unknownfields.NestedVersionTwo in unknown_fields.proto package com.squareup.wire.protos.unknownfields; 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.Integer; 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 NestedVersionTwo extends Message<NestedVersionTwo, NestedVersionTwo.Builder> { public static final ProtoAdapter<NestedVersionTwo> ADAPTER = new ProtoAdapter_NestedVersionTwo(); private static final long serialVersionUID = 0L; public static final Integer DEFAULT_I = 0; public static final Integer DEFAULT_V2_I = 0; public static final String DEFAULT_V2_S = ""; public static final Integer DEFAULT_V2_F32 = 0; public static final Long DEFAULT_V2_F64 = 0L; @WireField( tag = 1, adapter = "com.squareup.wire.ProtoAdapter#INT32" ) public final Integer i; @WireField( tag = 2, adapter = "com.squareup.wire.ProtoAdapter#INT32" ) public final Integer v2_i; @WireField( tag = 3, adapter = "com.squareup.wire.ProtoAdapter#STRING" ) public final String v2_s; @WireField( tag = 4, adapter = "com.squareup.wire.ProtoAdapter#FIXED32" ) public final Integer v2_f32; @WireField( tag = 5, adapter = "com.squareup.wire.ProtoAdapter#FIXED64" ) public final Long v2_f64; @WireField( tag = 6, adapter = "com.squareup.wire.ProtoAdapter#STRING", label = WireField.Label.REPEATED ) public final List<String> v2_rs; public NestedVersionTwo(Integer i, Integer v2_i, String v2_s, Integer v2_f32, Long v2_f64, List<String> v2_rs) { this(i, v2_i, v2_s, v2_f32, v2_f64, v2_rs, ByteString.EMPTY); } public NestedVersionTwo(Integer i, Integer v2_i, String v2_s, Integer v2_f32, Long v2_f64, List<String> v2_rs, ByteString unknownFields) { super(ADAPTER, unknownFields); this.i = i; this.v2_i = v2_i; this.v2_s = v2_s; this.v2_f32 = v2_f32; this.v2_f64 = v2_f64; this.v2_rs = Internal.immutableCopyOf("v2_rs", v2_rs); } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.i = i; builder.v2_i = v2_i; builder.v2_s = v2_s; builder.v2_f32 = v2_f32; builder.v2_f64 = v2_f64; builder.v2_rs = Internal.copyOf(v2_rs); builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof NestedVersionTwo)) return false; NestedVersionTwo o = (NestedVersionTwo) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(i, o.i) && Internal.equals(v2_i, o.v2_i) && Internal.equals(v2_s, o.v2_s) && Internal.equals(v2_f32, o.v2_f32) && Internal.equals(v2_f64, o.v2_f64) && v2_rs.equals(o.v2_rs); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + (i != null ? i.hashCode() : 0); result = result * 37 + (v2_i != null ? v2_i.hashCode() : 0); result = result * 37 + (v2_s != null ? v2_s.hashCode() : 0); result = result * 37 + (v2_f32 != null ? v2_f32.hashCode() : 0); result = result * 37 + (v2_f64 != null ? v2_f64.hashCode() : 0); result = result * 37 + v2_rs.hashCode(); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (i != null) builder.append(", i=").append(i); if (v2_i != null) builder.append(", v2_i=").append(v2_i); if (v2_s != null) builder.append(", v2_s=").append(Internal.sanitize(v2_s)); if (v2_f32 != null) builder.append(", v2_f32=").append(v2_f32); if (v2_f64 != null) builder.append(", v2_f64=").append(v2_f64); if (!v2_rs.isEmpty()) builder.append(", v2_rs=").append(Internal.sanitize(v2_rs)); return builder.replace(0, 2, "NestedVersionTwo{").append('}').toString(); } public static final class Builder extends Message.Builder<NestedVersionTwo, Builder> { public Integer i; public Integer v2_i; public String v2_s; public Integer v2_f32; public Long v2_f64; public List<String> v2_rs; public Builder() { v2_rs = Internal.newMutableList(); } public Builder i(Integer i) { this.i = i; return this; } public Builder v2_i(Integer v2_i) { this.v2_i = v2_i; return this; } public Builder v2_s(String v2_s) { this.v2_s = v2_s; return this; } public Builder v2_f32(Integer v2_f32) { this.v2_f32 = v2_f32; return this; } public Builder v2_f64(Long v2_f64) { this.v2_f64 = v2_f64; return this; } public Builder v2_rs(List<String> v2_rs) { Internal.checkElementsNotNull(v2_rs); this.v2_rs = v2_rs; return this; } @Override public NestedVersionTwo build() { return new NestedVersionTwo(i, v2_i, v2_s, v2_f32, v2_f64, v2_rs, super.buildUnknownFields()); } } private static final class ProtoAdapter_NestedVersionTwo extends ProtoAdapter<NestedVersionTwo> { public ProtoAdapter_NestedVersionTwo() { super(FieldEncoding.LENGTH_DELIMITED, NestedVersionTwo.class, "type.googleapis.com/squareup.protos.unknownfields.NestedVersionTwo", Syntax.PROTO_2, null, "unknown_fields.proto"); } @Override public int encodedSize(NestedVersionTwo value) { int result = 0; result += ProtoAdapter.INT32.encodedSizeWithTag(1, value.i); result += ProtoAdapter.INT32.encodedSizeWithTag(2, value.v2_i); result += ProtoAdapter.STRING.encodedSizeWithTag(3, value.v2_s); result += ProtoAdapter.FIXED32.encodedSizeWithTag(4, value.v2_f32); result += ProtoAdapter.FIXED64.encodedSizeWithTag(5, value.v2_f64); result += ProtoAdapter.STRING.asRepeated().encodedSizeWithTag(6, value.v2_rs); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, NestedVersionTwo value) throws IOException { ProtoAdapter.INT32.encodeWithTag(writer, 1, value.i); ProtoAdapter.INT32.encodeWithTag(writer, 2, value.v2_i); ProtoAdapter.STRING.encodeWithTag(writer, 3, value.v2_s); ProtoAdapter.FIXED32.encodeWithTag(writer, 4, value.v2_f32); ProtoAdapter.FIXED64.encodeWithTag(writer, 5, value.v2_f64); ProtoAdapter.STRING.asRepeated().encodeWithTag(writer, 6, value.v2_rs); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, NestedVersionTwo value) throws IOException { writer.writeBytes(value.unknownFields()); ProtoAdapter.STRING.asRepeated().encodeWithTag(writer, 6, value.v2_rs); ProtoAdapter.FIXED64.encodeWithTag(writer, 5, value.v2_f64); ProtoAdapter.FIXED32.encodeWithTag(writer, 4, value.v2_f32); ProtoAdapter.STRING.encodeWithTag(writer, 3, value.v2_s); ProtoAdapter.INT32.encodeWithTag(writer, 2, value.v2_i); ProtoAdapter.INT32.encodeWithTag(writer, 1, value.i); } @Override public NestedVersionTwo 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.i(ProtoAdapter.INT32.decode(reader)); break; case 2: builder.v2_i(ProtoAdapter.INT32.decode(reader)); break; case 3: builder.v2_s(ProtoAdapter.STRING.decode(reader)); break; case 4: builder.v2_f32(ProtoAdapter.FIXED32.decode(reader)); break; case 5: builder.v2_f64(ProtoAdapter.FIXED64.decode(reader)); break; case 6: builder.v2_rs.add(ProtoAdapter.STRING.decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public NestedVersionTwo redact(NestedVersionTwo value) { Builder builder = value.newBuilder(); builder.clearUnknownFields(); return builder.build(); } } }
7,057
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/unknownfields/NestedVersionOne.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.unknownfields.NestedVersionOne in unknown_fields.proto package com.squareup.wire.protos.unknownfields; 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.Integer; import java.lang.Object; import java.lang.Override; import java.lang.String; import java.lang.StringBuilder; import okio.ByteString; public final class NestedVersionOne extends Message<NestedVersionOne, NestedVersionOne.Builder> { public static final ProtoAdapter<NestedVersionOne> ADAPTER = new ProtoAdapter_NestedVersionOne(); private static final long serialVersionUID = 0L; public static final Integer DEFAULT_I = 0; @WireField( tag = 1, adapter = "com.squareup.wire.ProtoAdapter#INT32" ) public final Integer i; public NestedVersionOne(Integer i) { this(i, ByteString.EMPTY); } public NestedVersionOne(Integer i, ByteString unknownFields) { super(ADAPTER, unknownFields); this.i = i; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.i = i; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof NestedVersionOne)) return false; NestedVersionOne o = (NestedVersionOne) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(i, o.i); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + (i != null ? i.hashCode() : 0); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (i != null) builder.append(", i=").append(i); return builder.replace(0, 2, "NestedVersionOne{").append('}').toString(); } public static final class Builder extends Message.Builder<NestedVersionOne, Builder> { public Integer i; public Builder() { } public Builder i(Integer i) { this.i = i; return this; } @Override public NestedVersionOne build() { return new NestedVersionOne(i, super.buildUnknownFields()); } } private static final class ProtoAdapter_NestedVersionOne extends ProtoAdapter<NestedVersionOne> { public ProtoAdapter_NestedVersionOne() { super(FieldEncoding.LENGTH_DELIMITED, NestedVersionOne.class, "type.googleapis.com/squareup.protos.unknownfields.NestedVersionOne", Syntax.PROTO_2, null, "unknown_fields.proto"); } @Override public int encodedSize(NestedVersionOne value) { int result = 0; result += ProtoAdapter.INT32.encodedSizeWithTag(1, value.i); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, NestedVersionOne value) throws IOException { ProtoAdapter.INT32.encodeWithTag(writer, 1, value.i); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, NestedVersionOne value) throws IOException { writer.writeBytes(value.unknownFields()); ProtoAdapter.INT32.encodeWithTag(writer, 1, value.i); } @Override public NestedVersionOne 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.i(ProtoAdapter.INT32.decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public NestedVersionOne redact(NestedVersionOne value) { Builder builder = value.newBuilder(); builder.clearUnknownFields(); return builder.build(); } } }
7,058
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/unknownfields/EnumVersionOne.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.unknownfields.EnumVersionOne in unknown_fields.proto package com.squareup.wire.protos.unknownfields; import com.squareup.wire.EnumAdapter; import com.squareup.wire.ProtoAdapter; import com.squareup.wire.Syntax; import com.squareup.wire.WireEnum; import java.lang.Override; public enum EnumVersionOne implements WireEnum { SHREK_V1(1), DONKEY_V1(2), FIONA_V1(3); public static final ProtoAdapter<EnumVersionOne> ADAPTER = new ProtoAdapter_EnumVersionOne(); private final int value; EnumVersionOne(int value) { this.value = value; } /** * Return the constant for {@code value} or null. */ public static EnumVersionOne fromValue(int value) { switch (value) { case 1: return SHREK_V1; case 2: return DONKEY_V1; case 3: return FIONA_V1; default: return null; } } @Override public int getValue() { return value; } private static final class ProtoAdapter_EnumVersionOne extends EnumAdapter<EnumVersionOne> { ProtoAdapter_EnumVersionOne() { super(EnumVersionOne.class, Syntax.PROTO_2, null); } @Override protected EnumVersionOne fromValue(int value) { return EnumVersionOne.fromValue(value); } } }
7,059
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/unknownfields/VersionOne.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.unknownfields.VersionOne in unknown_fields.proto package com.squareup.wire.protos.unknownfields; 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.Integer; import java.lang.Object; import java.lang.Override; import java.lang.String; import java.lang.StringBuilder; import okio.ByteString; public final class VersionOne extends Message<VersionOne, VersionOne.Builder> { public static final ProtoAdapter<VersionOne> ADAPTER = new ProtoAdapter_VersionOne(); private static final long serialVersionUID = 0L; public static final Integer DEFAULT_I = 0; public static final EnumVersionOne DEFAULT_EN = EnumVersionOne.SHREK_V1; @WireField( tag = 1, adapter = "com.squareup.wire.ProtoAdapter#INT32" ) public final Integer i; @WireField( tag = 7, adapter = "com.squareup.wire.protos.unknownfields.NestedVersionOne#ADAPTER" ) public final NestedVersionOne obj; @WireField( tag = 8, adapter = "com.squareup.wire.protos.unknownfields.EnumVersionOne#ADAPTER" ) public final EnumVersionOne en; public VersionOne(Integer i, NestedVersionOne obj, EnumVersionOne en) { this(i, obj, en, ByteString.EMPTY); } public VersionOne(Integer i, NestedVersionOne obj, EnumVersionOne en, ByteString unknownFields) { super(ADAPTER, unknownFields); this.i = i; this.obj = obj; this.en = en; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.i = i; builder.obj = obj; builder.en = en; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof VersionOne)) return false; VersionOne o = (VersionOne) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(i, o.i) && Internal.equals(obj, o.obj) && Internal.equals(en, o.en); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + (i != null ? i.hashCode() : 0); result = result * 37 + (obj != null ? obj.hashCode() : 0); result = result * 37 + (en != null ? en.hashCode() : 0); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (i != null) builder.append(", i=").append(i); if (obj != null) builder.append(", obj=").append(obj); if (en != null) builder.append(", en=").append(en); return builder.replace(0, 2, "VersionOne{").append('}').toString(); } public static final class Builder extends Message.Builder<VersionOne, Builder> { public Integer i; public NestedVersionOne obj; public EnumVersionOne en; public Builder() { } public Builder i(Integer i) { this.i = i; return this; } public Builder obj(NestedVersionOne obj) { this.obj = obj; return this; } public Builder en(EnumVersionOne en) { this.en = en; return this; } @Override public VersionOne build() { return new VersionOne(i, obj, en, super.buildUnknownFields()); } } private static final class ProtoAdapter_VersionOne extends ProtoAdapter<VersionOne> { public ProtoAdapter_VersionOne() { super(FieldEncoding.LENGTH_DELIMITED, VersionOne.class, "type.googleapis.com/squareup.protos.unknownfields.VersionOne", Syntax.PROTO_2, null, "unknown_fields.proto"); } @Override public int encodedSize(VersionOne value) { int result = 0; result += ProtoAdapter.INT32.encodedSizeWithTag(1, value.i); result += NestedVersionOne.ADAPTER.encodedSizeWithTag(7, value.obj); result += EnumVersionOne.ADAPTER.encodedSizeWithTag(8, value.en); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, VersionOne value) throws IOException { ProtoAdapter.INT32.encodeWithTag(writer, 1, value.i); NestedVersionOne.ADAPTER.encodeWithTag(writer, 7, value.obj); EnumVersionOne.ADAPTER.encodeWithTag(writer, 8, value.en); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, VersionOne value) throws IOException { writer.writeBytes(value.unknownFields()); EnumVersionOne.ADAPTER.encodeWithTag(writer, 8, value.en); NestedVersionOne.ADAPTER.encodeWithTag(writer, 7, value.obj); ProtoAdapter.INT32.encodeWithTag(writer, 1, value.i); } @Override public VersionOne 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.i(ProtoAdapter.INT32.decode(reader)); break; case 7: builder.obj(NestedVersionOne.ADAPTER.decode(reader)); break; case 8: { try { builder.en(EnumVersionOne.ADAPTER.decode(reader)); } catch (ProtoAdapter.EnumConstantNotFoundException e) { builder.addUnknownField(tag, FieldEncoding.VARINT, (long) e.value); } break; } default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public VersionOne redact(VersionOne value) { Builder builder = value.newBuilder(); if (builder.obj != null) builder.obj = NestedVersionOne.ADAPTER.redact(builder.obj); builder.clearUnknownFields(); return builder.build(); } } }
7,060
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/depend_on_kotlin_option/Letter.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.depend_on_kotlin_option.Letter in depend_on_kotlin_option.proto package com.squareup.wire.protos.depend_on_kotlin_option; 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 com.squareup.wire.protos.custom_options.MyFieldOptionOneOption; import java.io.IOException; import java.lang.Object; import java.lang.Override; import java.lang.String; import java.lang.StringBuilder; import okio.ByteString; public final class Letter extends Message<Letter, Letter.Builder> { public static final ProtoAdapter<Letter> ADAPTER = new ProtoAdapter_Letter(); private static final long serialVersionUID = 0L; public static final String DEFAULT_SUBJECT = ""; @MyFieldOptionOneOption(12) @WireField( tag = 1, adapter = "com.squareup.wire.ProtoAdapter#STRING" ) public final String subject; public Letter(String subject) { this(subject, ByteString.EMPTY); } public Letter(String subject, ByteString unknownFields) { super(ADAPTER, unknownFields); this.subject = subject; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.subject = subject; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof Letter)) return false; Letter o = (Letter) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(subject, o.subject); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + (subject != null ? subject.hashCode() : 0); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (subject != null) builder.append(", subject=").append(Internal.sanitize(subject)); return builder.replace(0, 2, "Letter{").append('}').toString(); } public static final class Builder extends Message.Builder<Letter, Builder> { public String subject; public Builder() { } public Builder subject(String subject) { this.subject = subject; return this; } @Override public Letter build() { return new Letter(subject, super.buildUnknownFields()); } } private static final class ProtoAdapter_Letter extends ProtoAdapter<Letter> { public ProtoAdapter_Letter() { super(FieldEncoding.LENGTH_DELIMITED, Letter.class, "type.googleapis.com/squareup.protos.depend_on_kotlin_option.Letter", Syntax.PROTO_2, null, "depend_on_kotlin_option.proto"); } @Override public int encodedSize(Letter value) { int result = 0; result += ProtoAdapter.STRING.encodedSizeWithTag(1, value.subject); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, Letter value) throws IOException { ProtoAdapter.STRING.encodeWithTag(writer, 1, value.subject); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, Letter value) throws IOException { writer.writeBytes(value.unknownFields()); ProtoAdapter.STRING.encodeWithTag(writer, 1, value.subject); } @Override public Letter 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.subject(ProtoAdapter.STRING.decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public Letter redact(Letter value) { Builder builder = value.newBuilder(); builder.clearUnknownFields(); return builder.build(); } } }
7,061
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/simple/SimpleMessage.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.simple.SimpleMessage in simple_message.proto package com.squareup.wire.protos.simple; import com.squareup.wire.EnumAdapter; 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.WireEnum; import com.squareup.wire.WireField; import com.squareup.wire.internal.Internal; import com.squareup.wire.protos.foreign.ForeignEnum; import java.io.IOException; import java.lang.Deprecated; import java.lang.Double; import java.lang.Integer; import java.lang.Object; import java.lang.Override; import java.lang.String; import java.lang.StringBuilder; import java.util.List; import okio.ByteString; /** * A message for testing. */ public final class SimpleMessage extends Message<SimpleMessage, SimpleMessage.Builder> { public static final ProtoAdapter<SimpleMessage> ADAPTER = new ProtoAdapter_SimpleMessage(); private static final long serialVersionUID = 0L; public static final Integer DEFAULT_OPTIONAL_INT32 = 123; public static final NestedEnum DEFAULT_DEFAULT_NESTED_ENUM = NestedEnum.BAZ; public static final Integer DEFAULT_REQUIRED_INT32 = 456; public static final ForeignEnum DEFAULT_DEFAULT_FOREIGN_ENUM = ForeignEnum.BAX; public static final ForeignEnum DEFAULT_NO_DEFAULT_FOREIGN_ENUM = ForeignEnum.BAV; public static final String DEFAULT_PACKAGE_ = ""; public static final String DEFAULT_RESULT = ""; public static final String DEFAULT_OTHER = ""; public static final String DEFAULT_O = ""; /** * An optional int32 */ @WireField( tag = 1, adapter = "com.squareup.wire.ProtoAdapter#INT32" ) public final Integer optional_int32; /** * An optional NestedMessage, deprecated */ @WireField( tag = 2, adapter = "com.squareup.wire.protos.simple.SimpleMessage$NestedMessage#ADAPTER" ) @Deprecated public final NestedMessage optional_nested_msg; /** * An optional ExternalMessage */ @WireField( tag = 3, adapter = "com.squareup.wire.protos.simple.ExternalMessage#ADAPTER" ) public final ExternalMessage optional_external_msg; @WireField( tag = 4, adapter = "com.squareup.wire.protos.simple.SimpleMessage$NestedEnum#ADAPTER" ) public final NestedEnum default_nested_enum; /** * A required int32 */ @WireField( tag = 5, adapter = "com.squareup.wire.ProtoAdapter#INT32", label = WireField.Label.REQUIRED ) public final Integer required_int32; /** * A repeated double, deprecated */ @WireField( tag = 6, adapter = "com.squareup.wire.ProtoAdapter#DOUBLE", label = WireField.Label.REPEATED ) @Deprecated public final List<Double> repeated_double; /** * enum from another package with an explicit default */ @WireField( tag = 7, adapter = "com.squareup.wire.protos.foreign.ForeignEnum#ADAPTER" ) public final ForeignEnum default_foreign_enum; /** * enum from another package without an explicit default */ @WireField( tag = 8, adapter = "com.squareup.wire.protos.foreign.ForeignEnum#ADAPTER" ) public final ForeignEnum no_default_foreign_enum; /** * field with the same name as a Java keyword */ @WireField( tag = 9, adapter = "com.squareup.wire.ProtoAdapter#STRING", declaredName = "package" ) public final String package_; /** * field with the name "result" */ @WireField( tag = 10, adapter = "com.squareup.wire.ProtoAdapter#STRING" ) public final String result; /** * field with the name "other" */ @WireField( tag = 11, adapter = "com.squareup.wire.ProtoAdapter#STRING" ) public final String other; /** * field with the name "o" */ @WireField( tag = 12, adapter = "com.squareup.wire.ProtoAdapter#STRING" ) public final String o; public SimpleMessage(Integer optional_int32, NestedMessage optional_nested_msg, ExternalMessage optional_external_msg, NestedEnum default_nested_enum, Integer required_int32, List<Double> repeated_double, ForeignEnum default_foreign_enum, ForeignEnum no_default_foreign_enum, String package_, String result, String other, String o) { this(optional_int32, optional_nested_msg, optional_external_msg, default_nested_enum, required_int32, repeated_double, default_foreign_enum, no_default_foreign_enum, package_, result, other, o, ByteString.EMPTY); } public SimpleMessage(Integer optional_int32, NestedMessage optional_nested_msg, ExternalMessage optional_external_msg, NestedEnum default_nested_enum, Integer required_int32, List<Double> repeated_double, ForeignEnum default_foreign_enum, ForeignEnum no_default_foreign_enum, String package_, String result, String other, String o, ByteString unknownFields) { super(ADAPTER, unknownFields); this.optional_int32 = optional_int32; this.optional_nested_msg = optional_nested_msg; this.optional_external_msg = optional_external_msg; this.default_nested_enum = default_nested_enum; this.required_int32 = required_int32; this.repeated_double = Internal.immutableCopyOf("repeated_double", repeated_double); this.default_foreign_enum = default_foreign_enum; this.no_default_foreign_enum = no_default_foreign_enum; this.package_ = package_; this.result = result; this.other = other; this.o = o; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.optional_int32 = optional_int32; builder.optional_nested_msg = optional_nested_msg; builder.optional_external_msg = optional_external_msg; builder.default_nested_enum = default_nested_enum; builder.required_int32 = required_int32; builder.repeated_double = Internal.copyOf(repeated_double); builder.default_foreign_enum = default_foreign_enum; builder.no_default_foreign_enum = no_default_foreign_enum; builder.package_ = package_; builder.result = result; builder.other = other; builder.o = o; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other_) { if (other_ == this) return true; if (!(other_ instanceof SimpleMessage)) return false; SimpleMessage o_ = (SimpleMessage) other_; return unknownFields().equals(o_.unknownFields()) && Internal.equals(optional_int32, o_.optional_int32) && Internal.equals(optional_nested_msg, o_.optional_nested_msg) && Internal.equals(optional_external_msg, o_.optional_external_msg) && Internal.equals(default_nested_enum, o_.default_nested_enum) && required_int32.equals(o_.required_int32) && repeated_double.equals(o_.repeated_double) && Internal.equals(default_foreign_enum, o_.default_foreign_enum) && Internal.equals(no_default_foreign_enum, o_.no_default_foreign_enum) && Internal.equals(package_, o_.package_) && Internal.equals(result, o_.result) && Internal.equals(other, o_.other) && Internal.equals(o, o_.o); } @Override public int hashCode() { int result_ = super.hashCode; if (result_ == 0) { result_ = unknownFields().hashCode(); result_ = result_ * 37 + (optional_int32 != null ? optional_int32.hashCode() : 0); result_ = result_ * 37 + (optional_nested_msg != null ? optional_nested_msg.hashCode() : 0); result_ = result_ * 37 + (optional_external_msg != null ? optional_external_msg.hashCode() : 0); result_ = result_ * 37 + (default_nested_enum != null ? default_nested_enum.hashCode() : 0); result_ = result_ * 37 + required_int32.hashCode(); result_ = result_ * 37 + repeated_double.hashCode(); result_ = result_ * 37 + (default_foreign_enum != null ? default_foreign_enum.hashCode() : 0); result_ = result_ * 37 + (no_default_foreign_enum != null ? no_default_foreign_enum.hashCode() : 0); result_ = result_ * 37 + (package_ != null ? package_.hashCode() : 0); result_ = result_ * 37 + (result != null ? result.hashCode() : 0); result_ = result_ * 37 + (other != null ? other.hashCode() : 0); result_ = result_ * 37 + (o != null ? o.hashCode() : 0); super.hashCode = result_; } return result_; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (optional_int32 != null) builder.append(", optional_int32=").append(optional_int32); if (optional_nested_msg != null) builder.append(", optional_nested_msg=").append(optional_nested_msg); if (optional_external_msg != null) builder.append(", optional_external_msg=").append(optional_external_msg); if (default_nested_enum != null) builder.append(", default_nested_enum=").append(default_nested_enum); builder.append(", required_int32=").append(required_int32); if (!repeated_double.isEmpty()) builder.append(", repeated_double=").append(repeated_double); if (default_foreign_enum != null) builder.append(", default_foreign_enum=").append(default_foreign_enum); if (no_default_foreign_enum != null) builder.append(", no_default_foreign_enum=").append(no_default_foreign_enum); if (package_ != null) builder.append(", package=").append(Internal.sanitize(package_)); if (result != null) builder.append(", result=").append(Internal.sanitize(result)); if (other != null) builder.append(", other=").append(Internal.sanitize(other)); if (o != null) builder.append(", o=").append(Internal.sanitize(o)); return builder.replace(0, 2, "SimpleMessage{").append('}').toString(); } public static final class Builder extends Message.Builder<SimpleMessage, Builder> { public Integer optional_int32; public NestedMessage optional_nested_msg; public ExternalMessage optional_external_msg; public NestedEnum default_nested_enum; public Integer required_int32; public List<Double> repeated_double; public ForeignEnum default_foreign_enum; public ForeignEnum no_default_foreign_enum; public String package_; public String result; public String other; public String o; public Builder() { repeated_double = Internal.newMutableList(); } /** * An optional int32 */ public Builder optional_int32(Integer optional_int32) { this.optional_int32 = optional_int32; return this; } /** * An optional NestedMessage, deprecated */ @Deprecated public Builder optional_nested_msg(NestedMessage optional_nested_msg) { this.optional_nested_msg = optional_nested_msg; return this; } /** * An optional ExternalMessage */ public Builder optional_external_msg(ExternalMessage optional_external_msg) { this.optional_external_msg = optional_external_msg; return this; } public Builder default_nested_enum(NestedEnum default_nested_enum) { this.default_nested_enum = default_nested_enum; return this; } /** * A required int32 */ public Builder required_int32(Integer required_int32) { this.required_int32 = required_int32; return this; } /** * A repeated double, deprecated */ @Deprecated public Builder repeated_double(List<Double> repeated_double) { Internal.checkElementsNotNull(repeated_double); this.repeated_double = repeated_double; return this; } /** * enum from another package with an explicit default */ public Builder default_foreign_enum(ForeignEnum default_foreign_enum) { this.default_foreign_enum = default_foreign_enum; return this; } /** * enum from another package without an explicit default */ public Builder no_default_foreign_enum(ForeignEnum no_default_foreign_enum) { this.no_default_foreign_enum = no_default_foreign_enum; return this; } /** * field with the same name as a Java keyword */ public Builder package_(String package_) { this.package_ = package_; return this; } /** * field with the name "result" */ public Builder result(String result) { this.result = result; return this; } /** * field with the name "other" */ public Builder other(String other) { this.other = other; return this; } /** * field with the name "o" */ public Builder o(String o) { this.o = o; return this; } @Override public SimpleMessage build() { if (required_int32 == null) { throw Internal.missingRequiredFields(required_int32, "required_int32"); } return new SimpleMessage(optional_int32, optional_nested_msg, optional_external_msg, default_nested_enum, required_int32, repeated_double, default_foreign_enum, no_default_foreign_enum, package_, result, other, o, super.buildUnknownFields()); } } public static final class NestedMessage extends Message<NestedMessage, NestedMessage.Builder> { public static final ProtoAdapter<NestedMessage> ADAPTER = new ProtoAdapter_NestedMessage(); private static final long serialVersionUID = 0L; public static final Integer DEFAULT_BB = 0; /** * An optional int32 */ @WireField( tag = 1, adapter = "com.squareup.wire.ProtoAdapter#INT32" ) public final Integer bb; public NestedMessage(Integer bb) { this(bb, ByteString.EMPTY); } public NestedMessage(Integer bb, ByteString unknownFields) { super(ADAPTER, unknownFields); this.bb = bb; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.bb = bb; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof NestedMessage)) return false; NestedMessage o = (NestedMessage) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(bb, o.bb); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + (bb != null ? bb.hashCode() : 0); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (bb != null) builder.append(", bb=").append(bb); return builder.replace(0, 2, "NestedMessage{").append('}').toString(); } public static final class Builder extends Message.Builder<NestedMessage, Builder> { public Integer bb; public Builder() { } /** * An optional int32 */ public Builder bb(Integer bb) { this.bb = bb; return this; } @Override public NestedMessage build() { return new NestedMessage(bb, super.buildUnknownFields()); } } private static final class ProtoAdapter_NestedMessage extends ProtoAdapter<NestedMessage> { public ProtoAdapter_NestedMessage() { super(FieldEncoding.LENGTH_DELIMITED, NestedMessage.class, "type.googleapis.com/squareup.protos.simple.SimpleMessage.NestedMessage", Syntax.PROTO_2, null, "simple_message.proto"); } @Override public int encodedSize(NestedMessage value) { int result = 0; result += ProtoAdapter.INT32.encodedSizeWithTag(1, value.bb); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, NestedMessage value) throws IOException { ProtoAdapter.INT32.encodeWithTag(writer, 1, value.bb); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, NestedMessage value) throws IOException { writer.writeBytes(value.unknownFields()); ProtoAdapter.INT32.encodeWithTag(writer, 1, value.bb); } @Override public NestedMessage 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.bb(ProtoAdapter.INT32.decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public NestedMessage redact(NestedMessage value) { Builder builder = value.newBuilder(); builder.clearUnknownFields(); return builder.build(); } } } public enum NestedEnum implements WireEnum { FOO(1), BAR(2), BAZ(3), @Deprecated BUZ(3); public static final ProtoAdapter<NestedEnum> ADAPTER = new ProtoAdapter_NestedEnum(); private final int value; NestedEnum(int value) { this.value = value; } /** * Return the constant for {@code value} or null. */ public static NestedEnum fromValue(int value) { switch (value) { case 1: return FOO; case 2: return BAR; case 3: return BAZ; default: return null; } } @Override public int getValue() { return value; } private static final class ProtoAdapter_NestedEnum extends EnumAdapter<NestedEnum> { ProtoAdapter_NestedEnum() { super(NestedEnum.class, Syntax.PROTO_2, null); } @Override protected NestedEnum fromValue(int value) { return NestedEnum.fromValue(value); } } } private static final class ProtoAdapter_SimpleMessage extends ProtoAdapter<SimpleMessage> { public ProtoAdapter_SimpleMessage() { super(FieldEncoding.LENGTH_DELIMITED, SimpleMessage.class, "type.googleapis.com/squareup.protos.simple.SimpleMessage", Syntax.PROTO_2, null, "simple_message.proto"); } @Override public int encodedSize(SimpleMessage value) { int result_ = 0; result_ += ProtoAdapter.INT32.encodedSizeWithTag(1, value.optional_int32); result_ += NestedMessage.ADAPTER.encodedSizeWithTag(2, value.optional_nested_msg); result_ += ExternalMessage.ADAPTER.encodedSizeWithTag(3, value.optional_external_msg); result_ += NestedEnum.ADAPTER.encodedSizeWithTag(4, value.default_nested_enum); result_ += ProtoAdapter.INT32.encodedSizeWithTag(5, value.required_int32); result_ += ProtoAdapter.DOUBLE.asRepeated().encodedSizeWithTag(6, value.repeated_double); result_ += ForeignEnum.ADAPTER.encodedSizeWithTag(7, value.default_foreign_enum); result_ += ForeignEnum.ADAPTER.encodedSizeWithTag(8, value.no_default_foreign_enum); result_ += ProtoAdapter.STRING.encodedSizeWithTag(9, value.package_); result_ += ProtoAdapter.STRING.encodedSizeWithTag(10, value.result); result_ += ProtoAdapter.STRING.encodedSizeWithTag(11, value.other); result_ += ProtoAdapter.STRING.encodedSizeWithTag(12, value.o); result_ += value.unknownFields().size(); return result_; } @Override public void encode(ProtoWriter writer, SimpleMessage value) throws IOException { ProtoAdapter.INT32.encodeWithTag(writer, 1, value.optional_int32); NestedMessage.ADAPTER.encodeWithTag(writer, 2, value.optional_nested_msg); ExternalMessage.ADAPTER.encodeWithTag(writer, 3, value.optional_external_msg); NestedEnum.ADAPTER.encodeWithTag(writer, 4, value.default_nested_enum); ProtoAdapter.INT32.encodeWithTag(writer, 5, value.required_int32); ProtoAdapter.DOUBLE.asRepeated().encodeWithTag(writer, 6, value.repeated_double); ForeignEnum.ADAPTER.encodeWithTag(writer, 7, value.default_foreign_enum); ForeignEnum.ADAPTER.encodeWithTag(writer, 8, value.no_default_foreign_enum); ProtoAdapter.STRING.encodeWithTag(writer, 9, value.package_); ProtoAdapter.STRING.encodeWithTag(writer, 10, value.result); ProtoAdapter.STRING.encodeWithTag(writer, 11, value.other); ProtoAdapter.STRING.encodeWithTag(writer, 12, value.o); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, SimpleMessage value) throws IOException { writer.writeBytes(value.unknownFields()); ProtoAdapter.STRING.encodeWithTag(writer, 12, value.o); ProtoAdapter.STRING.encodeWithTag(writer, 11, value.other); ProtoAdapter.STRING.encodeWithTag(writer, 10, value.result); ProtoAdapter.STRING.encodeWithTag(writer, 9, value.package_); ForeignEnum.ADAPTER.encodeWithTag(writer, 8, value.no_default_foreign_enum); ForeignEnum.ADAPTER.encodeWithTag(writer, 7, value.default_foreign_enum); ProtoAdapter.DOUBLE.asRepeated().encodeWithTag(writer, 6, value.repeated_double); ProtoAdapter.INT32.encodeWithTag(writer, 5, value.required_int32); NestedEnum.ADAPTER.encodeWithTag(writer, 4, value.default_nested_enum); ExternalMessage.ADAPTER.encodeWithTag(writer, 3, value.optional_external_msg); NestedMessage.ADAPTER.encodeWithTag(writer, 2, value.optional_nested_msg); ProtoAdapter.INT32.encodeWithTag(writer, 1, value.optional_int32); } @Override public SimpleMessage 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.optional_int32(ProtoAdapter.INT32.decode(reader)); break; case 2: builder.optional_nested_msg(NestedMessage.ADAPTER.decode(reader)); break; case 3: builder.optional_external_msg(ExternalMessage.ADAPTER.decode(reader)); break; case 4: { try { builder.default_nested_enum(NestedEnum.ADAPTER.decode(reader)); } catch (ProtoAdapter.EnumConstantNotFoundException e) { builder.addUnknownField(tag, FieldEncoding.VARINT, (long) e.value); } break; } case 5: builder.required_int32(ProtoAdapter.INT32.decode(reader)); break; case 6: builder.repeated_double.add(ProtoAdapter.DOUBLE.decode(reader)); break; case 7: { try { builder.default_foreign_enum(ForeignEnum.ADAPTER.decode(reader)); } catch (ProtoAdapter.EnumConstantNotFoundException e) { builder.addUnknownField(tag, FieldEncoding.VARINT, (long) e.value); } break; } case 8: { try { builder.no_default_foreign_enum(ForeignEnum.ADAPTER.decode(reader)); } catch (ProtoAdapter.EnumConstantNotFoundException e) { builder.addUnknownField(tag, FieldEncoding.VARINT, (long) e.value); } break; } case 9: builder.package_(ProtoAdapter.STRING.decode(reader)); break; case 10: builder.result(ProtoAdapter.STRING.decode(reader)); break; case 11: builder.other(ProtoAdapter.STRING.decode(reader)); break; case 12: builder.o(ProtoAdapter.STRING.decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public SimpleMessage redact(SimpleMessage value) { Builder builder = value.newBuilder(); if (builder.optional_nested_msg != null) builder.optional_nested_msg = NestedMessage.ADAPTER.redact(builder.optional_nested_msg); if (builder.optional_external_msg != null) builder.optional_external_msg = ExternalMessage.ADAPTER.redact(builder.optional_external_msg); builder.clearUnknownFields(); return builder.build(); } } }
7,062
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/simple/ExternalMessage.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.simple.ExternalMessage in external_message.proto package com.squareup.wire.protos.simple; 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.Float; import java.lang.Integer; 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 ExternalMessage extends Message<ExternalMessage, ExternalMessage.Builder> { public static final ProtoAdapter<ExternalMessage> ADAPTER = new ProtoAdapter_ExternalMessage(); private static final long serialVersionUID = 0L; public static final Float DEFAULT_F = 20f; public static final Integer DEFAULT_BAREXT = 0; public static final Integer DEFAULT_BAZEXT = 0; public static final SimpleMessage.NestedEnum DEFAULT_NESTED_ENUM_EXT = SimpleMessage.NestedEnum.FOO; @WireField( tag = 1, adapter = "com.squareup.wire.ProtoAdapter#FLOAT" ) public final Float f; /** * Extension source: simple_message.proto */ @WireField( tag = 125, adapter = "com.squareup.wire.ProtoAdapter#INT32", label = WireField.Label.REPEATED ) public final List<Integer> fooext; /** * Extension source: simple_message.proto */ @WireField( tag = 126, adapter = "com.squareup.wire.ProtoAdapter#INT32" ) public final Integer barext; /** * Extension source: simple_message.proto */ @WireField( tag = 127, adapter = "com.squareup.wire.ProtoAdapter#INT32" ) public final Integer bazext; /** * Extension source: simple_message.proto */ @WireField( tag = 128, adapter = "com.squareup.wire.protos.simple.SimpleMessage$NestedMessage#ADAPTER" ) public final SimpleMessage.NestedMessage nested_message_ext; /** * Extension source: simple_message.proto */ @WireField( tag = 129, adapter = "com.squareup.wire.protos.simple.SimpleMessage$NestedEnum#ADAPTER" ) public final SimpleMessage.NestedEnum nested_enum_ext; public ExternalMessage(Float f, List<Integer> fooext, Integer barext, Integer bazext, SimpleMessage.NestedMessage nested_message_ext, SimpleMessage.NestedEnum nested_enum_ext) { this(f, fooext, barext, bazext, nested_message_ext, nested_enum_ext, ByteString.EMPTY); } public ExternalMessage(Float f, List<Integer> fooext, Integer barext, Integer bazext, SimpleMessage.NestedMessage nested_message_ext, SimpleMessage.NestedEnum nested_enum_ext, ByteString unknownFields) { super(ADAPTER, unknownFields); this.f = f; this.fooext = Internal.immutableCopyOf("fooext", fooext); this.barext = barext; this.bazext = bazext; this.nested_message_ext = nested_message_ext; this.nested_enum_ext = nested_enum_ext; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.f = f; builder.fooext = Internal.copyOf(fooext); builder.barext = barext; builder.bazext = bazext; builder.nested_message_ext = nested_message_ext; builder.nested_enum_ext = nested_enum_ext; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof ExternalMessage)) return false; ExternalMessage o = (ExternalMessage) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(f, o.f) && fooext.equals(o.fooext) && Internal.equals(barext, o.barext) && Internal.equals(bazext, o.bazext) && Internal.equals(nested_message_ext, o.nested_message_ext) && Internal.equals(nested_enum_ext, o.nested_enum_ext); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + (f != null ? f.hashCode() : 0); result = result * 37 + fooext.hashCode(); result = result * 37 + (barext != null ? barext.hashCode() : 0); result = result * 37 + (bazext != null ? bazext.hashCode() : 0); result = result * 37 + (nested_message_ext != null ? nested_message_ext.hashCode() : 0); result = result * 37 + (nested_enum_ext != null ? nested_enum_ext.hashCode() : 0); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (f != null) builder.append(", f=").append(f); if (!fooext.isEmpty()) builder.append(", fooext=").append(fooext); if (barext != null) builder.append(", barext=").append(barext); if (bazext != null) builder.append(", bazext=").append(bazext); if (nested_message_ext != null) builder.append(", nested_message_ext=").append(nested_message_ext); if (nested_enum_ext != null) builder.append(", nested_enum_ext=").append(nested_enum_ext); return builder.replace(0, 2, "ExternalMessage{").append('}').toString(); } public static final class Builder extends Message.Builder<ExternalMessage, Builder> { public Float f; public List<Integer> fooext; public Integer barext; public Integer bazext; public SimpleMessage.NestedMessage nested_message_ext; public SimpleMessage.NestedEnum nested_enum_ext; public Builder() { fooext = Internal.newMutableList(); } public Builder f(Float f) { this.f = f; return this; } public Builder fooext(List<Integer> fooext) { Internal.checkElementsNotNull(fooext); this.fooext = fooext; return this; } public Builder barext(Integer barext) { this.barext = barext; return this; } public Builder bazext(Integer bazext) { this.bazext = bazext; return this; } public Builder nested_message_ext(SimpleMessage.NestedMessage nested_message_ext) { this.nested_message_ext = nested_message_ext; return this; } public Builder nested_enum_ext(SimpleMessage.NestedEnum nested_enum_ext) { this.nested_enum_ext = nested_enum_ext; return this; } @Override public ExternalMessage build() { return new ExternalMessage(f, fooext, barext, bazext, nested_message_ext, nested_enum_ext, super.buildUnknownFields()); } } private static final class ProtoAdapter_ExternalMessage extends ProtoAdapter<ExternalMessage> { public ProtoAdapter_ExternalMessage() { super(FieldEncoding.LENGTH_DELIMITED, ExternalMessage.class, "type.googleapis.com/squareup.protos.simple.ExternalMessage", Syntax.PROTO_2, null, "external_message.proto"); } @Override public int encodedSize(ExternalMessage value) { int result = 0; result += ProtoAdapter.FLOAT.encodedSizeWithTag(1, value.f); result += ProtoAdapter.INT32.asRepeated().encodedSizeWithTag(125, value.fooext); result += ProtoAdapter.INT32.encodedSizeWithTag(126, value.barext); result += ProtoAdapter.INT32.encodedSizeWithTag(127, value.bazext); result += SimpleMessage.NestedMessage.ADAPTER.encodedSizeWithTag(128, value.nested_message_ext); result += SimpleMessage.NestedEnum.ADAPTER.encodedSizeWithTag(129, value.nested_enum_ext); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, ExternalMessage value) throws IOException { ProtoAdapter.FLOAT.encodeWithTag(writer, 1, value.f); ProtoAdapter.INT32.asRepeated().encodeWithTag(writer, 125, value.fooext); ProtoAdapter.INT32.encodeWithTag(writer, 126, value.barext); ProtoAdapter.INT32.encodeWithTag(writer, 127, value.bazext); SimpleMessage.NestedMessage.ADAPTER.encodeWithTag(writer, 128, value.nested_message_ext); SimpleMessage.NestedEnum.ADAPTER.encodeWithTag(writer, 129, value.nested_enum_ext); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, ExternalMessage value) throws IOException { writer.writeBytes(value.unknownFields()); SimpleMessage.NestedEnum.ADAPTER.encodeWithTag(writer, 129, value.nested_enum_ext); SimpleMessage.NestedMessage.ADAPTER.encodeWithTag(writer, 128, value.nested_message_ext); ProtoAdapter.INT32.encodeWithTag(writer, 127, value.bazext); ProtoAdapter.INT32.encodeWithTag(writer, 126, value.barext); ProtoAdapter.INT32.asRepeated().encodeWithTag(writer, 125, value.fooext); ProtoAdapter.FLOAT.encodeWithTag(writer, 1, value.f); } @Override public ExternalMessage 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.f(ProtoAdapter.FLOAT.decode(reader)); break; case 125: builder.fooext.add(ProtoAdapter.INT32.decode(reader)); break; case 126: builder.barext(ProtoAdapter.INT32.decode(reader)); break; case 127: builder.bazext(ProtoAdapter.INT32.decode(reader)); break; case 128: builder.nested_message_ext(SimpleMessage.NestedMessage.ADAPTER.decode(reader)); break; case 129: { try { builder.nested_enum_ext(SimpleMessage.NestedEnum.ADAPTER.decode(reader)); } catch (ProtoAdapter.EnumConstantNotFoundException e) { builder.addUnknownField(tag, FieldEncoding.VARINT, (long) e.value); } break; } default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public ExternalMessage redact(ExternalMessage value) { Builder builder = value.newBuilder(); if (builder.nested_message_ext != null) builder.nested_message_ext = SimpleMessage.NestedMessage.ADAPTER.redact(builder.nested_message_ext); builder.clearUnknownFields(); return builder.build(); } } }
7,063
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/edgecases/OneField.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.edgecases.OneField in edge_cases.proto package com.squareup.wire.protos.edgecases; 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.Integer; import java.lang.Object; import java.lang.Override; import java.lang.String; import java.lang.StringBuilder; import okio.ByteString; public final class OneField extends Message<OneField, OneField.Builder> { public static final ProtoAdapter<OneField> ADAPTER = new ProtoAdapter_OneField(); private static final long serialVersionUID = 0L; public static final Integer DEFAULT_OPT_INT32 = 0; @WireField( tag = 1, adapter = "com.squareup.wire.ProtoAdapter#INT32" ) public final Integer opt_int32; public OneField(Integer opt_int32) { this(opt_int32, ByteString.EMPTY); } public OneField(Integer opt_int32, ByteString unknownFields) { super(ADAPTER, unknownFields); this.opt_int32 = opt_int32; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.opt_int32 = opt_int32; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof OneField)) return false; OneField o = (OneField) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(opt_int32, o.opt_int32); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + (opt_int32 != null ? opt_int32.hashCode() : 0); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (opt_int32 != null) builder.append(", opt_int32=").append(opt_int32); return builder.replace(0, 2, "OneField{").append('}').toString(); } public static final class Builder extends Message.Builder<OneField, Builder> { public Integer opt_int32; public Builder() { } public Builder opt_int32(Integer opt_int32) { this.opt_int32 = opt_int32; return this; } @Override public OneField build() { return new OneField(opt_int32, super.buildUnknownFields()); } } private static final class ProtoAdapter_OneField extends ProtoAdapter<OneField> { public ProtoAdapter_OneField() { super(FieldEncoding.LENGTH_DELIMITED, OneField.class, "type.googleapis.com/squareup.protos.edgecases.OneField", Syntax.PROTO_2, null, "edge_cases.proto"); } @Override public int encodedSize(OneField value) { int result = 0; result += ProtoAdapter.INT32.encodedSizeWithTag(1, value.opt_int32); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, OneField value) throws IOException { ProtoAdapter.INT32.encodeWithTag(writer, 1, value.opt_int32); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, OneField value) throws IOException { writer.writeBytes(value.unknownFields()); ProtoAdapter.INT32.encodeWithTag(writer, 1, value.opt_int32); } @Override public OneField 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.opt_int32(ProtoAdapter.INT32.decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public OneField redact(OneField value) { Builder builder = value.newBuilder(); builder.clearUnknownFields(); return builder.build(); } } }
7,064
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/edgecases/NoFields.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.edgecases.NoFields in edge_cases.proto package com.squareup.wire.protos.edgecases; 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 java.io.IOException; import java.lang.Object; import java.lang.Override; import java.lang.String; import java.lang.StringBuilder; import okio.ByteString; public final class NoFields extends Message<NoFields, NoFields.Builder> { public static final ProtoAdapter<NoFields> ADAPTER = new ProtoAdapter_NoFields(); private static final long serialVersionUID = 0L; public NoFields() { this(ByteString.EMPTY); } public NoFields(ByteString unknownFields) { super(ADAPTER, unknownFields); } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof NoFields)) return false; NoFields o = (NoFields) other; return unknownFields().equals(o.unknownFields()); } @Override public int hashCode() { return unknownFields().hashCode(); } @Override public String toString() { StringBuilder builder = new StringBuilder(); return builder.replace(0, 2, "NoFields{").append('}').toString(); } public static final class Builder extends Message.Builder<NoFields, Builder> { public Builder() { } @Override public NoFields build() { return new NoFields(super.buildUnknownFields()); } } private static final class ProtoAdapter_NoFields extends ProtoAdapter<NoFields> { public ProtoAdapter_NoFields() { super(FieldEncoding.LENGTH_DELIMITED, NoFields.class, "type.googleapis.com/squareup.protos.edgecases.NoFields", Syntax.PROTO_2, null, "edge_cases.proto"); } @Override public int encodedSize(NoFields value) { int result = 0; result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, NoFields value) throws IOException { writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, NoFields value) throws IOException { writer.writeBytes(value.unknownFields()); } @Override public NoFields decode(ProtoReader reader) throws IOException { Builder builder = new Builder(); long token = reader.beginMessage(); for (int tag; (tag = reader.nextTag()) != -1;) { switch (tag) { default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public NoFields redact(NoFields value) { Builder builder = value.newBuilder(); builder.clearUnknownFields(); return builder.build(); } } }
7,065
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/edgecases/OneBytesField.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.edgecases.OneBytesField in edge_cases.proto package com.squareup.wire.protos.edgecases; 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.Object; import java.lang.Override; import java.lang.String; import java.lang.StringBuilder; import okio.ByteString; public final class OneBytesField extends Message<OneBytesField, OneBytesField.Builder> { public static final ProtoAdapter<OneBytesField> ADAPTER = new ProtoAdapter_OneBytesField(); private static final long serialVersionUID = 0L; public static final ByteString DEFAULT_OPT_BYTES = ByteString.EMPTY; @WireField( tag = 1, adapter = "com.squareup.wire.ProtoAdapter#BYTES" ) public final ByteString opt_bytes; public OneBytesField(ByteString opt_bytes) { this(opt_bytes, ByteString.EMPTY); } public OneBytesField(ByteString opt_bytes, ByteString unknownFields) { super(ADAPTER, unknownFields); this.opt_bytes = opt_bytes; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.opt_bytes = opt_bytes; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof OneBytesField)) return false; OneBytesField o = (OneBytesField) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(opt_bytes, o.opt_bytes); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + (opt_bytes != null ? opt_bytes.hashCode() : 0); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (opt_bytes != null) builder.append(", opt_bytes=").append(opt_bytes); return builder.replace(0, 2, "OneBytesField{").append('}').toString(); } public static final class Builder extends Message.Builder<OneBytesField, Builder> { public ByteString opt_bytes; public Builder() { } public Builder opt_bytes(ByteString opt_bytes) { this.opt_bytes = opt_bytes; return this; } @Override public OneBytesField build() { return new OneBytesField(opt_bytes, super.buildUnknownFields()); } } private static final class ProtoAdapter_OneBytesField extends ProtoAdapter<OneBytesField> { public ProtoAdapter_OneBytesField() { super(FieldEncoding.LENGTH_DELIMITED, OneBytesField.class, "type.googleapis.com/squareup.protos.edgecases.OneBytesField", Syntax.PROTO_2, null, "edge_cases.proto"); } @Override public int encodedSize(OneBytesField value) { int result = 0; result += ProtoAdapter.BYTES.encodedSizeWithTag(1, value.opt_bytes); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, OneBytesField value) throws IOException { ProtoAdapter.BYTES.encodeWithTag(writer, 1, value.opt_bytes); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, OneBytesField value) throws IOException { writer.writeBytes(value.unknownFields()); ProtoAdapter.BYTES.encodeWithTag(writer, 1, value.opt_bytes); } @Override public OneBytesField 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.opt_bytes(ProtoAdapter.BYTES.decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public OneBytesField redact(OneBytesField value) { Builder builder = value.newBuilder(); builder.clearUnknownFields(); return builder.build(); } } }
7,066
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/edgecases/Recursive.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.edgecases.Recursive in edge_cases.proto package com.squareup.wire.protos.edgecases; 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.Integer; import java.lang.Object; import java.lang.Override; import java.lang.String; import java.lang.StringBuilder; import okio.ByteString; public final class Recursive extends Message<Recursive, Recursive.Builder> { public static final ProtoAdapter<Recursive> ADAPTER = new ProtoAdapter_Recursive(); private static final long serialVersionUID = 0L; public static final Integer DEFAULT_VALUE = 0; @WireField( tag = 1, adapter = "com.squareup.wire.ProtoAdapter#INT32" ) public final Integer value; @WireField( tag = 2, adapter = "com.squareup.wire.protos.edgecases.Recursive#ADAPTER" ) public final Recursive recursive; public Recursive(Integer value, Recursive recursive) { this(value, recursive, ByteString.EMPTY); } public Recursive(Integer value, Recursive recursive, ByteString unknownFields) { super(ADAPTER, unknownFields); this.value = value; this.recursive = recursive; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.value = value; builder.recursive = recursive; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof Recursive)) return false; Recursive o = (Recursive) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(value, o.value) && Internal.equals(recursive, o.recursive); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + (value != null ? value.hashCode() : 0); result = result * 37 + (recursive != null ? recursive.hashCode() : 0); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (value != null) builder.append(", value=").append(value); if (recursive != null) builder.append(", recursive=").append(recursive); return builder.replace(0, 2, "Recursive{").append('}').toString(); } public static final class Builder extends Message.Builder<Recursive, Builder> { public Integer value; public Recursive recursive; public Builder() { } public Builder value(Integer value) { this.value = value; return this; } public Builder recursive(Recursive recursive) { this.recursive = recursive; return this; } @Override public Recursive build() { return new Recursive(value, recursive, super.buildUnknownFields()); } } private static final class ProtoAdapter_Recursive extends ProtoAdapter<Recursive> { public ProtoAdapter_Recursive() { super(FieldEncoding.LENGTH_DELIMITED, Recursive.class, "type.googleapis.com/squareup.protos.edgecases.Recursive", Syntax.PROTO_2, null, "edge_cases.proto"); } @Override public int encodedSize(Recursive value) { int result = 0; result += ProtoAdapter.INT32.encodedSizeWithTag(1, value.value); result += Recursive.ADAPTER.encodedSizeWithTag(2, value.recursive); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, Recursive value) throws IOException { ProtoAdapter.INT32.encodeWithTag(writer, 1, value.value); Recursive.ADAPTER.encodeWithTag(writer, 2, value.recursive); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, Recursive value) throws IOException { writer.writeBytes(value.unknownFields()); Recursive.ADAPTER.encodeWithTag(writer, 2, value.recursive); ProtoAdapter.INT32.encodeWithTag(writer, 1, value.value); } @Override public Recursive 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.value(ProtoAdapter.INT32.decode(reader)); break; case 2: builder.recursive(Recursive.ADAPTER.decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public Recursive redact(Recursive value) { Builder builder = value.newBuilder(); if (builder.recursive != null) builder.recursive = Recursive.ADAPTER.redact(builder.recursive); builder.clearUnknownFields(); return builder.build(); } } }
7,067
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/single_level/Foos.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: single_level.Foos in single_level.proto package com.squareup.wire.protos.single_level; 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.Object; import java.lang.Override; import java.lang.String; import java.lang.StringBuilder; import java.util.List; import okio.ByteString; public final class Foos extends Message<Foos, Foos.Builder> { public static final ProtoAdapter<Foos> ADAPTER = new ProtoAdapter_Foos(); private static final long serialVersionUID = 0L; @WireField( tag = 1, adapter = "com.squareup.wire.protos.single_level.Foo#ADAPTER", label = WireField.Label.REPEATED ) public final List<Foo> foos; public Foos(List<Foo> foos) { this(foos, ByteString.EMPTY); } public Foos(List<Foo> foos, ByteString unknownFields) { super(ADAPTER, unknownFields); this.foos = Internal.immutableCopyOf("foos", foos); } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.foos = Internal.copyOf(foos); builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof Foos)) return false; Foos o = (Foos) other; return unknownFields().equals(o.unknownFields()) && foos.equals(o.foos); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + foos.hashCode(); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (!foos.isEmpty()) builder.append(", foos=").append(foos); return builder.replace(0, 2, "Foos{").append('}').toString(); } public static final class Builder extends Message.Builder<Foos, Builder> { public List<Foo> foos; public Builder() { foos = Internal.newMutableList(); } public Builder foos(List<Foo> foos) { Internal.checkElementsNotNull(foos); this.foos = foos; return this; } @Override public Foos build() { return new Foos(foos, super.buildUnknownFields()); } } private static final class ProtoAdapter_Foos extends ProtoAdapter<Foos> { public ProtoAdapter_Foos() { super(FieldEncoding.LENGTH_DELIMITED, Foos.class, "type.googleapis.com/single_level.Foos", Syntax.PROTO_2, null, "single_level.proto"); } @Override public int encodedSize(Foos value) { int result = 0; result += Foo.ADAPTER.asRepeated().encodedSizeWithTag(1, value.foos); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, Foos value) throws IOException { Foo.ADAPTER.asRepeated().encodeWithTag(writer, 1, value.foos); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, Foos value) throws IOException { writer.writeBytes(value.unknownFields()); Foo.ADAPTER.asRepeated().encodeWithTag(writer, 1, value.foos); } @Override public Foos 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.foos.add(Foo.ADAPTER.decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public Foos redact(Foos value) { Builder builder = value.newBuilder(); Internal.redactElements(builder.foos, Foo.ADAPTER); builder.clearUnknownFields(); return builder.build(); } } }
7,068
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/single_level/Bar.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: samebasename.single_level.Bar in samebasename/single_level.proto package com.squareup.wire.protos.single_level; 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.Integer; import java.lang.Object; import java.lang.Override; import java.lang.String; import java.lang.StringBuilder; import okio.ByteString; public final class Bar extends Message<Bar, Bar.Builder> { public static final ProtoAdapter<Bar> ADAPTER = new ProtoAdapter_Bar(); private static final long serialVersionUID = 0L; public static final Integer DEFAULT_BAZ = 0; @WireField( tag = 1, adapter = "com.squareup.wire.ProtoAdapter#INT32" ) public final Integer baz; public Bar(Integer baz) { this(baz, ByteString.EMPTY); } public Bar(Integer baz, ByteString unknownFields) { super(ADAPTER, unknownFields); this.baz = baz; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.baz = baz; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof Bar)) return false; Bar o = (Bar) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(baz, o.baz); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + (baz != null ? baz.hashCode() : 0); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (baz != null) builder.append(", baz=").append(baz); return builder.replace(0, 2, "Bar{").append('}').toString(); } public static final class Builder extends Message.Builder<Bar, Builder> { public Integer baz; public Builder() { } public Builder baz(Integer baz) { this.baz = baz; return this; } @Override public Bar build() { return new Bar(baz, super.buildUnknownFields()); } } private static final class ProtoAdapter_Bar extends ProtoAdapter<Bar> { public ProtoAdapter_Bar() { super(FieldEncoding.LENGTH_DELIMITED, Bar.class, "type.googleapis.com/samebasename.single_level.Bar", Syntax.PROTO_2, null, "samebasename/single_level.proto"); } @Override public int encodedSize(Bar value) { int result = 0; result += ProtoAdapter.INT32.encodedSizeWithTag(1, value.baz); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, Bar value) throws IOException { ProtoAdapter.INT32.encodeWithTag(writer, 1, value.baz); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, Bar value) throws IOException { writer.writeBytes(value.unknownFields()); ProtoAdapter.INT32.encodeWithTag(writer, 1, value.baz); } @Override public Bar 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.baz(ProtoAdapter.INT32.decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public Bar redact(Bar value) { Builder builder = value.newBuilder(); builder.clearUnknownFields(); return builder.build(); } } }
7,069
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/single_level/Foo.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: single_level.Foo in single_level.proto package com.squareup.wire.protos.single_level; 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.Integer; import java.lang.Object; import java.lang.Override; import java.lang.String; import java.lang.StringBuilder; import okio.ByteString; public final class Foo extends Message<Foo, Foo.Builder> { public static final ProtoAdapter<Foo> ADAPTER = new ProtoAdapter_Foo(); private static final long serialVersionUID = 0L; public static final Integer DEFAULT_BAR = 0; @WireField( tag = 1, adapter = "com.squareup.wire.ProtoAdapter#INT32" ) public final Integer bar; public Foo(Integer bar) { this(bar, ByteString.EMPTY); } public Foo(Integer bar, ByteString unknownFields) { super(ADAPTER, unknownFields); this.bar = bar; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.bar = bar; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof Foo)) return false; Foo o = (Foo) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(bar, o.bar); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + (bar != null ? bar.hashCode() : 0); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (bar != null) builder.append(", bar=").append(bar); return builder.replace(0, 2, "Foo{").append('}').toString(); } public static final class Builder extends Message.Builder<Foo, Builder> { public Integer bar; public Builder() { } public Builder bar(Integer bar) { this.bar = bar; return this; } @Override public Foo build() { return new Foo(bar, super.buildUnknownFields()); } } private static final class ProtoAdapter_Foo extends ProtoAdapter<Foo> { public ProtoAdapter_Foo() { super(FieldEncoding.LENGTH_DELIMITED, Foo.class, "type.googleapis.com/single_level.Foo", Syntax.PROTO_2, null, "single_level.proto"); } @Override public int encodedSize(Foo value) { int result = 0; result += ProtoAdapter.INT32.encodedSizeWithTag(1, value.bar); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, Foo value) throws IOException { ProtoAdapter.INT32.encodeWithTag(writer, 1, value.bar); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, Foo value) throws IOException { writer.writeBytes(value.unknownFields()); ProtoAdapter.INT32.encodeWithTag(writer, 1, value.bar); } @Override public Foo 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.bar(ProtoAdapter.INT32.decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public Foo redact(Foo value) { Builder builder = value.newBuilder(); builder.clearUnknownFields(); return builder.build(); } } }
7,070
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/single_level/Bars.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: samebasename.single_level.Bars in samebasename/single_level.proto package com.squareup.wire.protos.single_level; 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.Object; import java.lang.Override; import java.lang.String; import java.lang.StringBuilder; import java.util.List; import okio.ByteString; public final class Bars extends Message<Bars, Bars.Builder> { public static final ProtoAdapter<Bars> ADAPTER = new ProtoAdapter_Bars(); private static final long serialVersionUID = 0L; @WireField( tag = 1, adapter = "com.squareup.wire.protos.single_level.Bar#ADAPTER", label = WireField.Label.REPEATED ) public final List<Bar> bars; public Bars(List<Bar> bars) { this(bars, ByteString.EMPTY); } public Bars(List<Bar> bars, ByteString unknownFields) { super(ADAPTER, unknownFields); this.bars = Internal.immutableCopyOf("bars", bars); } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.bars = Internal.copyOf(bars); builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof Bars)) return false; Bars o = (Bars) other; return unknownFields().equals(o.unknownFields()) && bars.equals(o.bars); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + bars.hashCode(); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (!bars.isEmpty()) builder.append(", bars=").append(bars); return builder.replace(0, 2, "Bars{").append('}').toString(); } public static final class Builder extends Message.Builder<Bars, Builder> { public List<Bar> bars; public Builder() { bars = Internal.newMutableList(); } public Builder bars(List<Bar> bars) { Internal.checkElementsNotNull(bars); this.bars = bars; return this; } @Override public Bars build() { return new Bars(bars, super.buildUnknownFields()); } } private static final class ProtoAdapter_Bars extends ProtoAdapter<Bars> { public ProtoAdapter_Bars() { super(FieldEncoding.LENGTH_DELIMITED, Bars.class, "type.googleapis.com/samebasename.single_level.Bars", Syntax.PROTO_2, null, "samebasename/single_level.proto"); } @Override public int encodedSize(Bars value) { int result = 0; result += Bar.ADAPTER.asRepeated().encodedSizeWithTag(1, value.bars); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, Bars value) throws IOException { Bar.ADAPTER.asRepeated().encodeWithTag(writer, 1, value.bars); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, Bars value) throws IOException { writer.writeBytes(value.unknownFields()); Bar.ADAPTER.asRepeated().encodeWithTag(writer, 1, value.bars); } @Override public Bars 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.bars.add(Bar.ADAPTER.decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public Bars redact(Bars value) { Builder builder = value.newBuilder(); Internal.redactElements(builder.bars, Bar.ADAPTER); builder.clearUnknownFields(); return builder.build(); } } }
7,071
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/redacted/RedactedFields.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.redacted_test.RedactedFields in redacted_test.proto package com.squareup.wire.protos.redacted; 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.Object; import java.lang.Override; import java.lang.String; import java.lang.StringBuilder; import okio.ByteString; public final class RedactedFields extends Message<RedactedFields, RedactedFields.Builder> { public static final ProtoAdapter<RedactedFields> ADAPTER = new ProtoAdapter_RedactedFields(); private static final long serialVersionUID = 0L; public static final String DEFAULT_A = ""; public static final String DEFAULT_B = ""; public static final String DEFAULT_C = ""; @WireField( tag = 1, adapter = "com.squareup.wire.ProtoAdapter#STRING", redacted = true ) public final String a; @WireField( tag = 2, adapter = "com.squareup.wire.ProtoAdapter#STRING" ) public final String b; @WireField( tag = 3, adapter = "com.squareup.wire.ProtoAdapter#STRING" ) public final String c; /** * Extension source: redacted_test.proto */ @WireField( tag = 10, adapter = "com.squareup.wire.protos.redacted.RedactedExtension#ADAPTER" ) public final RedactedExtension extension; public RedactedFields(String a, String b, String c, RedactedExtension extension) { this(a, b, c, extension, ByteString.EMPTY); } public RedactedFields(String a, String b, String c, RedactedExtension extension, ByteString unknownFields) { super(ADAPTER, unknownFields); this.a = a; this.b = b; this.c = c; this.extension = extension; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.a = a; builder.b = b; builder.c = c; builder.extension = extension; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof RedactedFields)) return false; RedactedFields o = (RedactedFields) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(a, o.a) && Internal.equals(b, o.b) && Internal.equals(c, o.c) && Internal.equals(extension, o.extension); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + (a != null ? a.hashCode() : 0); result = result * 37 + (b != null ? b.hashCode() : 0); result = result * 37 + (c != null ? c.hashCode() : 0); result = result * 37 + (extension != null ? extension.hashCode() : 0); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (a != null) builder.append(", a=██"); if (b != null) builder.append(", b=").append(Internal.sanitize(b)); if (c != null) builder.append(", c=").append(Internal.sanitize(c)); if (extension != null) builder.append(", extension=").append(extension); return builder.replace(0, 2, "RedactedFields{").append('}').toString(); } public static final class Builder extends Message.Builder<RedactedFields, Builder> { public String a; public String b; public String c; public RedactedExtension extension; public Builder() { } public Builder a(String a) { this.a = a; return this; } public Builder b(String b) { this.b = b; return this; } public Builder c(String c) { this.c = c; return this; } public Builder extension(RedactedExtension extension) { this.extension = extension; return this; } @Override public RedactedFields build() { return new RedactedFields(a, b, c, extension, super.buildUnknownFields()); } } private static final class ProtoAdapter_RedactedFields extends ProtoAdapter<RedactedFields> { public ProtoAdapter_RedactedFields() { super(FieldEncoding.LENGTH_DELIMITED, RedactedFields.class, "type.googleapis.com/squareup.protos.redacted_test.RedactedFields", Syntax.PROTO_2, null, "redacted_test.proto"); } @Override public int encodedSize(RedactedFields value) { int result = 0; result += ProtoAdapter.STRING.encodedSizeWithTag(1, value.a); result += ProtoAdapter.STRING.encodedSizeWithTag(2, value.b); result += ProtoAdapter.STRING.encodedSizeWithTag(3, value.c); result += RedactedExtension.ADAPTER.encodedSizeWithTag(10, value.extension); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, RedactedFields value) throws IOException { ProtoAdapter.STRING.encodeWithTag(writer, 1, value.a); ProtoAdapter.STRING.encodeWithTag(writer, 2, value.b); ProtoAdapter.STRING.encodeWithTag(writer, 3, value.c); RedactedExtension.ADAPTER.encodeWithTag(writer, 10, value.extension); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, RedactedFields value) throws IOException { writer.writeBytes(value.unknownFields()); RedactedExtension.ADAPTER.encodeWithTag(writer, 10, value.extension); ProtoAdapter.STRING.encodeWithTag(writer, 3, value.c); ProtoAdapter.STRING.encodeWithTag(writer, 2, value.b); ProtoAdapter.STRING.encodeWithTag(writer, 1, value.a); } @Override public RedactedFields 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.a(ProtoAdapter.STRING.decode(reader)); break; case 2: builder.b(ProtoAdapter.STRING.decode(reader)); break; case 3: builder.c(ProtoAdapter.STRING.decode(reader)); break; case 10: builder.extension(RedactedExtension.ADAPTER.decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public RedactedFields redact(RedactedFields value) { Builder builder = value.newBuilder(); builder.a = null; if (builder.extension != null) builder.extension = RedactedExtension.ADAPTER.redact(builder.extension); builder.clearUnknownFields(); return builder.build(); } } }
7,072
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/redacted/RedactedExtension.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.redacted_test.RedactedExtension in redacted_test.proto package com.squareup.wire.protos.redacted; 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.Object; import java.lang.Override; import java.lang.String; import java.lang.StringBuilder; import okio.ByteString; public final class RedactedExtension extends Message<RedactedExtension, RedactedExtension.Builder> { public static final ProtoAdapter<RedactedExtension> ADAPTER = new ProtoAdapter_RedactedExtension(); private static final long serialVersionUID = 0L; public static final String DEFAULT_D = ""; public static final String DEFAULT_E = ""; @WireField( tag = 1, adapter = "com.squareup.wire.ProtoAdapter#STRING", redacted = true ) public final String d; @WireField( tag = 2, adapter = "com.squareup.wire.ProtoAdapter#STRING" ) public final String e; public RedactedExtension(String d, String e) { this(d, e, ByteString.EMPTY); } public RedactedExtension(String d, String e, ByteString unknownFields) { super(ADAPTER, unknownFields); this.d = d; this.e = e; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.d = d; builder.e = e; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof RedactedExtension)) return false; RedactedExtension o = (RedactedExtension) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(d, o.d) && Internal.equals(e, o.e); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + (d != null ? d.hashCode() : 0); result = result * 37 + (e != null ? e.hashCode() : 0); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (d != null) builder.append(", d=██"); if (e != null) builder.append(", e=").append(Internal.sanitize(e)); return builder.replace(0, 2, "RedactedExtension{").append('}').toString(); } public static final class Builder extends Message.Builder<RedactedExtension, Builder> { public String d; public String e; public Builder() { } public Builder d(String d) { this.d = d; return this; } public Builder e(String e) { this.e = e; return this; } @Override public RedactedExtension build() { return new RedactedExtension(d, e, super.buildUnknownFields()); } } private static final class ProtoAdapter_RedactedExtension extends ProtoAdapter<RedactedExtension> { public ProtoAdapter_RedactedExtension() { super(FieldEncoding.LENGTH_DELIMITED, RedactedExtension.class, "type.googleapis.com/squareup.protos.redacted_test.RedactedExtension", Syntax.PROTO_2, null, "redacted_test.proto"); } @Override public int encodedSize(RedactedExtension value) { int result = 0; result += ProtoAdapter.STRING.encodedSizeWithTag(1, value.d); result += ProtoAdapter.STRING.encodedSizeWithTag(2, value.e); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, RedactedExtension value) throws IOException { ProtoAdapter.STRING.encodeWithTag(writer, 1, value.d); ProtoAdapter.STRING.encodeWithTag(writer, 2, value.e); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, RedactedExtension value) throws IOException { writer.writeBytes(value.unknownFields()); ProtoAdapter.STRING.encodeWithTag(writer, 2, value.e); ProtoAdapter.STRING.encodeWithTag(writer, 1, value.d); } @Override public RedactedExtension 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.d(ProtoAdapter.STRING.decode(reader)); break; case 2: builder.e(ProtoAdapter.STRING.decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public RedactedExtension redact(RedactedExtension value) { Builder builder = value.newBuilder(); builder.d = null; builder.clearUnknownFields(); return builder.build(); } } }
7,073
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/redacted/RedactedChild.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.redacted_test.RedactedChild in redacted_test.proto package com.squareup.wire.protos.redacted; 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.Object; import java.lang.Override; import java.lang.String; import java.lang.StringBuilder; import okio.ByteString; public final class RedactedChild extends Message<RedactedChild, RedactedChild.Builder> { public static final ProtoAdapter<RedactedChild> ADAPTER = new ProtoAdapter_RedactedChild(); private static final long serialVersionUID = 0L; public static final String DEFAULT_A = ""; @WireField( tag = 1, adapter = "com.squareup.wire.ProtoAdapter#STRING" ) public final String a; @WireField( tag = 2, adapter = "com.squareup.wire.protos.redacted.RedactedFields#ADAPTER" ) public final RedactedFields b; @WireField( tag = 3, adapter = "com.squareup.wire.protos.redacted.NotRedacted#ADAPTER" ) public final NotRedacted c; public RedactedChild(String a, RedactedFields b, NotRedacted c) { this(a, b, c, ByteString.EMPTY); } public RedactedChild(String a, RedactedFields b, NotRedacted c, ByteString unknownFields) { super(ADAPTER, unknownFields); this.a = a; this.b = b; this.c = c; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.a = a; builder.b = b; builder.c = c; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof RedactedChild)) return false; RedactedChild o = (RedactedChild) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(a, o.a) && Internal.equals(b, o.b) && Internal.equals(c, o.c); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + (a != null ? a.hashCode() : 0); result = result * 37 + (b != null ? b.hashCode() : 0); result = result * 37 + (c != null ? c.hashCode() : 0); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (a != null) builder.append(", a=").append(Internal.sanitize(a)); if (b != null) builder.append(", b=").append(b); if (c != null) builder.append(", c=").append(c); return builder.replace(0, 2, "RedactedChild{").append('}').toString(); } public static final class Builder extends Message.Builder<RedactedChild, Builder> { public String a; public RedactedFields b; public NotRedacted c; public Builder() { } public Builder a(String a) { this.a = a; return this; } public Builder b(RedactedFields b) { this.b = b; return this; } public Builder c(NotRedacted c) { this.c = c; return this; } @Override public RedactedChild build() { return new RedactedChild(a, b, c, super.buildUnknownFields()); } } private static final class ProtoAdapter_RedactedChild extends ProtoAdapter<RedactedChild> { public ProtoAdapter_RedactedChild() { super(FieldEncoding.LENGTH_DELIMITED, RedactedChild.class, "type.googleapis.com/squareup.protos.redacted_test.RedactedChild", Syntax.PROTO_2, null, "redacted_test.proto"); } @Override public int encodedSize(RedactedChild value) { int result = 0; result += ProtoAdapter.STRING.encodedSizeWithTag(1, value.a); result += RedactedFields.ADAPTER.encodedSizeWithTag(2, value.b); result += NotRedacted.ADAPTER.encodedSizeWithTag(3, value.c); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, RedactedChild value) throws IOException { ProtoAdapter.STRING.encodeWithTag(writer, 1, value.a); RedactedFields.ADAPTER.encodeWithTag(writer, 2, value.b); NotRedacted.ADAPTER.encodeWithTag(writer, 3, value.c); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, RedactedChild value) throws IOException { writer.writeBytes(value.unknownFields()); NotRedacted.ADAPTER.encodeWithTag(writer, 3, value.c); RedactedFields.ADAPTER.encodeWithTag(writer, 2, value.b); ProtoAdapter.STRING.encodeWithTag(writer, 1, value.a); } @Override public RedactedChild 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.a(ProtoAdapter.STRING.decode(reader)); break; case 2: builder.b(RedactedFields.ADAPTER.decode(reader)); break; case 3: builder.c(NotRedacted.ADAPTER.decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public RedactedChild redact(RedactedChild value) { Builder builder = value.newBuilder(); if (builder.b != null) builder.b = RedactedFields.ADAPTER.redact(builder.b); if (builder.c != null) builder.c = NotRedacted.ADAPTER.redact(builder.c); builder.clearUnknownFields(); return builder.build(); } } }
7,074
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/redacted/RedactedRequired.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.redacted_test.RedactedRequired in redacted_test.proto package com.squareup.wire.protos.redacted; 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.Object; import java.lang.Override; import java.lang.String; import java.lang.StringBuilder; import java.lang.UnsupportedOperationException; import okio.ByteString; public final class RedactedRequired extends Message<RedactedRequired, RedactedRequired.Builder> { public static final ProtoAdapter<RedactedRequired> ADAPTER = new ProtoAdapter_RedactedRequired(); private static final long serialVersionUID = 0L; public static final String DEFAULT_A = ""; @WireField( tag = 1, adapter = "com.squareup.wire.ProtoAdapter#STRING", label = WireField.Label.REQUIRED, redacted = true ) public final String a; public RedactedRequired(String a) { this(a, ByteString.EMPTY); } public RedactedRequired(String a, ByteString unknownFields) { super(ADAPTER, unknownFields); this.a = a; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.a = a; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof RedactedRequired)) return false; RedactedRequired o = (RedactedRequired) other; return unknownFields().equals(o.unknownFields()) && a.equals(o.a); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + a.hashCode(); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append(", a=██"); return builder.replace(0, 2, "RedactedRequired{").append('}').toString(); } public static final class Builder extends Message.Builder<RedactedRequired, Builder> { public String a; public Builder() { } public Builder a(String a) { this.a = a; return this; } @Override public RedactedRequired build() { if (a == null) { throw Internal.missingRequiredFields(a, "a"); } return new RedactedRequired(a, super.buildUnknownFields()); } } private static final class ProtoAdapter_RedactedRequired extends ProtoAdapter<RedactedRequired> { public ProtoAdapter_RedactedRequired() { super(FieldEncoding.LENGTH_DELIMITED, RedactedRequired.class, "type.googleapis.com/squareup.protos.redacted_test.RedactedRequired", Syntax.PROTO_2, null, "redacted_test.proto"); } @Override public int encodedSize(RedactedRequired value) { int result = 0; result += ProtoAdapter.STRING.encodedSizeWithTag(1, value.a); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, RedactedRequired value) throws IOException { ProtoAdapter.STRING.encodeWithTag(writer, 1, value.a); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, RedactedRequired value) throws IOException { writer.writeBytes(value.unknownFields()); ProtoAdapter.STRING.encodeWithTag(writer, 1, value.a); } @Override public RedactedRequired 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.a(ProtoAdapter.STRING.decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public RedactedRequired redact(RedactedRequired value) { throw new UnsupportedOperationException("Field 'a' is required and cannot be redacted."); } } }
7,075
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/redacted/RedactedCycleB.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.redacted_test.RedactedCycleB in redacted_test.proto package com.squareup.wire.protos.redacted; 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.Object; import java.lang.Override; import java.lang.String; import java.lang.StringBuilder; import okio.ByteString; public final class RedactedCycleB extends Message<RedactedCycleB, RedactedCycleB.Builder> { public static final ProtoAdapter<RedactedCycleB> ADAPTER = new ProtoAdapter_RedactedCycleB(); private static final long serialVersionUID = 0L; @WireField( tag = 1, adapter = "com.squareup.wire.protos.redacted.RedactedCycleA#ADAPTER" ) public final RedactedCycleA a; public RedactedCycleB(RedactedCycleA a) { this(a, ByteString.EMPTY); } public RedactedCycleB(RedactedCycleA a, ByteString unknownFields) { super(ADAPTER, unknownFields); this.a = a; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.a = a; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof RedactedCycleB)) return false; RedactedCycleB o = (RedactedCycleB) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(a, o.a); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + (a != null ? a.hashCode() : 0); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (a != null) builder.append(", a=").append(a); return builder.replace(0, 2, "RedactedCycleB{").append('}').toString(); } public static final class Builder extends Message.Builder<RedactedCycleB, Builder> { public RedactedCycleA a; public Builder() { } public Builder a(RedactedCycleA a) { this.a = a; return this; } @Override public RedactedCycleB build() { return new RedactedCycleB(a, super.buildUnknownFields()); } } private static final class ProtoAdapter_RedactedCycleB extends ProtoAdapter<RedactedCycleB> { public ProtoAdapter_RedactedCycleB() { super(FieldEncoding.LENGTH_DELIMITED, RedactedCycleB.class, "type.googleapis.com/squareup.protos.redacted_test.RedactedCycleB", Syntax.PROTO_2, null, "redacted_test.proto"); } @Override public int encodedSize(RedactedCycleB value) { int result = 0; result += RedactedCycleA.ADAPTER.encodedSizeWithTag(1, value.a); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, RedactedCycleB value) throws IOException { RedactedCycleA.ADAPTER.encodeWithTag(writer, 1, value.a); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, RedactedCycleB value) throws IOException { writer.writeBytes(value.unknownFields()); RedactedCycleA.ADAPTER.encodeWithTag(writer, 1, value.a); } @Override public RedactedCycleB 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.a(RedactedCycleA.ADAPTER.decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public RedactedCycleB redact(RedactedCycleB value) { Builder builder = value.newBuilder(); if (builder.a != null) builder.a = RedactedCycleA.ADAPTER.redact(builder.a); builder.clearUnknownFields(); return builder.build(); } } }
7,076
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/redacted/RedactedCycleA.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.redacted_test.RedactedCycleA in redacted_test.proto package com.squareup.wire.protos.redacted; 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.Object; import java.lang.Override; import java.lang.String; import java.lang.StringBuilder; import okio.ByteString; public final class RedactedCycleA extends Message<RedactedCycleA, RedactedCycleA.Builder> { public static final ProtoAdapter<RedactedCycleA> ADAPTER = new ProtoAdapter_RedactedCycleA(); private static final long serialVersionUID = 0L; @WireField( tag = 1, adapter = "com.squareup.wire.protos.redacted.RedactedCycleB#ADAPTER" ) public final RedactedCycleB b; public RedactedCycleA(RedactedCycleB b) { this(b, ByteString.EMPTY); } public RedactedCycleA(RedactedCycleB b, ByteString unknownFields) { super(ADAPTER, unknownFields); this.b = b; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.b = b; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof RedactedCycleA)) return false; RedactedCycleA o = (RedactedCycleA) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(b, o.b); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + (b != null ? b.hashCode() : 0); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (b != null) builder.append(", b=").append(b); return builder.replace(0, 2, "RedactedCycleA{").append('}').toString(); } public static final class Builder extends Message.Builder<RedactedCycleA, Builder> { public RedactedCycleB b; public Builder() { } public Builder b(RedactedCycleB b) { this.b = b; return this; } @Override public RedactedCycleA build() { return new RedactedCycleA(b, super.buildUnknownFields()); } } private static final class ProtoAdapter_RedactedCycleA extends ProtoAdapter<RedactedCycleA> { public ProtoAdapter_RedactedCycleA() { super(FieldEncoding.LENGTH_DELIMITED, RedactedCycleA.class, "type.googleapis.com/squareup.protos.redacted_test.RedactedCycleA", Syntax.PROTO_2, null, "redacted_test.proto"); } @Override public int encodedSize(RedactedCycleA value) { int result = 0; result += RedactedCycleB.ADAPTER.encodedSizeWithTag(1, value.b); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, RedactedCycleA value) throws IOException { RedactedCycleB.ADAPTER.encodeWithTag(writer, 1, value.b); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, RedactedCycleA value) throws IOException { writer.writeBytes(value.unknownFields()); RedactedCycleB.ADAPTER.encodeWithTag(writer, 1, value.b); } @Override public RedactedCycleA 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.b(RedactedCycleB.ADAPTER.decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public RedactedCycleA redact(RedactedCycleA value) { Builder builder = value.newBuilder(); if (builder.b != null) builder.b = RedactedCycleB.ADAPTER.redact(builder.b); builder.clearUnknownFields(); return builder.build(); } } }
7,077
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/redacted/RedactedRepeated.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.redacted_test.RedactedRepeated in redacted_test.proto package com.squareup.wire.protos.redacted; 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.Object; import java.lang.Override; import java.lang.String; import java.lang.StringBuilder; import java.util.Collections; import java.util.List; import okio.ByteString; public final class RedactedRepeated extends Message<RedactedRepeated, RedactedRepeated.Builder> { public static final ProtoAdapter<RedactedRepeated> ADAPTER = new ProtoAdapter_RedactedRepeated(); private static final long serialVersionUID = 0L; @WireField( tag = 1, adapter = "com.squareup.wire.ProtoAdapter#STRING", label = WireField.Label.REPEATED, redacted = true ) public final List<String> a; /** * Values in the repeated type need redacting. */ @WireField( tag = 2, adapter = "com.squareup.wire.protos.redacted.RedactedFields#ADAPTER", label = WireField.Label.REPEATED ) public final List<RedactedFields> b; public RedactedRepeated(List<String> a, List<RedactedFields> b) { this(a, b, ByteString.EMPTY); } public RedactedRepeated(List<String> a, List<RedactedFields> b, ByteString unknownFields) { super(ADAPTER, unknownFields); this.a = Internal.immutableCopyOf("a", a); this.b = Internal.immutableCopyOf("b", b); } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.a = Internal.copyOf(a); builder.b = Internal.copyOf(b); builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof RedactedRepeated)) return false; RedactedRepeated o = (RedactedRepeated) other; return unknownFields().equals(o.unknownFields()) && a.equals(o.a) && b.equals(o.b); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + a.hashCode(); result = result * 37 + b.hashCode(); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (!a.isEmpty()) builder.append(", a=██"); if (!b.isEmpty()) builder.append(", b=").append(b); return builder.replace(0, 2, "RedactedRepeated{").append('}').toString(); } public static final class Builder extends Message.Builder<RedactedRepeated, Builder> { public List<String> a; public List<RedactedFields> b; public Builder() { a = Internal.newMutableList(); b = Internal.newMutableList(); } public Builder a(List<String> a) { Internal.checkElementsNotNull(a); this.a = a; return this; } /** * Values in the repeated type need redacting. */ public Builder b(List<RedactedFields> b) { Internal.checkElementsNotNull(b); this.b = b; return this; } @Override public RedactedRepeated build() { return new RedactedRepeated(a, b, super.buildUnknownFields()); } } private static final class ProtoAdapter_RedactedRepeated extends ProtoAdapter<RedactedRepeated> { public ProtoAdapter_RedactedRepeated() { super(FieldEncoding.LENGTH_DELIMITED, RedactedRepeated.class, "type.googleapis.com/squareup.protos.redacted_test.RedactedRepeated", Syntax.PROTO_2, null, "redacted_test.proto"); } @Override public int encodedSize(RedactedRepeated value) { int result = 0; result += ProtoAdapter.STRING.asRepeated().encodedSizeWithTag(1, value.a); result += RedactedFields.ADAPTER.asRepeated().encodedSizeWithTag(2, value.b); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, RedactedRepeated value) throws IOException { ProtoAdapter.STRING.asRepeated().encodeWithTag(writer, 1, value.a); RedactedFields.ADAPTER.asRepeated().encodeWithTag(writer, 2, value.b); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, RedactedRepeated value) throws IOException { writer.writeBytes(value.unknownFields()); RedactedFields.ADAPTER.asRepeated().encodeWithTag(writer, 2, value.b); ProtoAdapter.STRING.asRepeated().encodeWithTag(writer, 1, value.a); } @Override public RedactedRepeated 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.a.add(ProtoAdapter.STRING.decode(reader)); break; case 2: builder.b.add(RedactedFields.ADAPTER.decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public RedactedRepeated redact(RedactedRepeated value) { Builder builder = value.newBuilder(); builder.a = Collections.emptyList(); Internal.redactElements(builder.b, RedactedFields.ADAPTER); builder.clearUnknownFields(); return builder.build(); } } }
7,078
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/redacted/NotRedacted.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.redacted_test.NotRedacted in redacted_test.proto package com.squareup.wire.protos.redacted; 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.Object; import java.lang.Override; import java.lang.String; import java.lang.StringBuilder; import okio.ByteString; public final class NotRedacted extends Message<NotRedacted, NotRedacted.Builder> { public static final ProtoAdapter<NotRedacted> ADAPTER = new ProtoAdapter_NotRedacted(); private static final long serialVersionUID = 0L; public static final String DEFAULT_A = ""; public static final String DEFAULT_B = ""; @WireField( tag = 1, adapter = "com.squareup.wire.ProtoAdapter#STRING" ) public final String a; @WireField( tag = 2, adapter = "com.squareup.wire.ProtoAdapter#STRING" ) public final String b; public NotRedacted(String a, String b) { this(a, b, ByteString.EMPTY); } public NotRedacted(String a, String b, ByteString unknownFields) { super(ADAPTER, unknownFields); this.a = a; this.b = b; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.a = a; builder.b = b; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof NotRedacted)) return false; NotRedacted o = (NotRedacted) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(a, o.a) && Internal.equals(b, o.b); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + (a != null ? a.hashCode() : 0); result = result * 37 + (b != null ? b.hashCode() : 0); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (a != null) builder.append(", a=").append(Internal.sanitize(a)); if (b != null) builder.append(", b=").append(Internal.sanitize(b)); return builder.replace(0, 2, "NotRedacted{").append('}').toString(); } public static final class Builder extends Message.Builder<NotRedacted, Builder> { public String a; public String b; public Builder() { } public Builder a(String a) { this.a = a; return this; } public Builder b(String b) { this.b = b; return this; } @Override public NotRedacted build() { return new NotRedacted(a, b, super.buildUnknownFields()); } } private static final class ProtoAdapter_NotRedacted extends ProtoAdapter<NotRedacted> { public ProtoAdapter_NotRedacted() { super(FieldEncoding.LENGTH_DELIMITED, NotRedacted.class, "type.googleapis.com/squareup.protos.redacted_test.NotRedacted", Syntax.PROTO_2, null, "redacted_test.proto"); } @Override public int encodedSize(NotRedacted value) { int result = 0; result += ProtoAdapter.STRING.encodedSizeWithTag(1, value.a); result += ProtoAdapter.STRING.encodedSizeWithTag(2, value.b); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, NotRedacted value) throws IOException { ProtoAdapter.STRING.encodeWithTag(writer, 1, value.a); ProtoAdapter.STRING.encodeWithTag(writer, 2, value.b); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, NotRedacted value) throws IOException { writer.writeBytes(value.unknownFields()); ProtoAdapter.STRING.encodeWithTag(writer, 2, value.b); ProtoAdapter.STRING.encodeWithTag(writer, 1, value.a); } @Override public NotRedacted 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.a(ProtoAdapter.STRING.decode(reader)); break; case 2: builder.b(ProtoAdapter.STRING.decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public NotRedacted redact(NotRedacted value) { Builder builder = value.newBuilder(); builder.clearUnknownFields(); return builder.build(); } } }
7,079
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/oneof/OneOfMessage.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.oneof.OneOfMessage in one_of.proto package com.squareup.wire.protos.oneof; 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.Integer; import java.lang.Object; import java.lang.Override; import java.lang.String; import java.lang.StringBuilder; import okio.ByteString; public final class OneOfMessage extends Message<OneOfMessage, OneOfMessage.Builder> { public static final ProtoAdapter<OneOfMessage> ADAPTER = new ProtoAdapter_OneOfMessage(); private static final long serialVersionUID = 0L; public static final Integer DEFAULT_FOO = 0; public static final String DEFAULT_BAR = ""; public static final String DEFAULT_BAZ = ""; /** * What foo. */ @WireField( tag = 1, adapter = "com.squareup.wire.ProtoAdapter#INT32", oneofName = "choice" ) public final Integer foo; /** * Such bar. */ @WireField( tag = 3, adapter = "com.squareup.wire.ProtoAdapter#STRING", oneofName = "choice" ) public final String bar; /** * Nice baz. */ @WireField( tag = 4, adapter = "com.squareup.wire.ProtoAdapter#STRING", oneofName = "choice" ) public final String baz; public OneOfMessage(Integer foo, String bar, String baz) { this(foo, bar, baz, ByteString.EMPTY); } public OneOfMessage(Integer foo, String bar, String baz, ByteString unknownFields) { super(ADAPTER, unknownFields); if (Internal.countNonNull(foo, bar, baz) > 1) { throw new IllegalArgumentException("at most one of foo, bar, baz may be non-null"); } this.foo = foo; this.bar = bar; this.baz = baz; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.foo = foo; builder.bar = bar; builder.baz = baz; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof OneOfMessage)) return false; OneOfMessage o = (OneOfMessage) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(foo, o.foo) && Internal.equals(bar, o.bar) && Internal.equals(baz, o.baz); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + (foo != null ? foo.hashCode() : 0); result = result * 37 + (bar != null ? bar.hashCode() : 0); result = result * 37 + (baz != null ? baz.hashCode() : 0); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (foo != null) builder.append(", foo=").append(foo); if (bar != null) builder.append(", bar=").append(Internal.sanitize(bar)); if (baz != null) builder.append(", baz=").append(Internal.sanitize(baz)); return builder.replace(0, 2, "OneOfMessage{").append('}').toString(); } public static final class Builder extends Message.Builder<OneOfMessage, Builder> { public Integer foo; public String bar; public String baz; public Builder() { } /** * What foo. */ public Builder foo(Integer foo) { this.foo = foo; this.bar = null; this.baz = null; return this; } /** * Such bar. */ public Builder bar(String bar) { this.bar = bar; this.foo = null; this.baz = null; return this; } /** * Nice baz. */ public Builder baz(String baz) { this.baz = baz; this.foo = null; this.bar = null; return this; } @Override public OneOfMessage build() { return new OneOfMessage(foo, bar, baz, super.buildUnknownFields()); } } private static final class ProtoAdapter_OneOfMessage extends ProtoAdapter<OneOfMessage> { public ProtoAdapter_OneOfMessage() { super(FieldEncoding.LENGTH_DELIMITED, OneOfMessage.class, "type.googleapis.com/squareup.protos.oneof.OneOfMessage", Syntax.PROTO_2, null, "one_of.proto"); } @Override public int encodedSize(OneOfMessage value) { int result = 0; result += ProtoAdapter.INT32.encodedSizeWithTag(1, value.foo); result += ProtoAdapter.STRING.encodedSizeWithTag(3, value.bar); result += ProtoAdapter.STRING.encodedSizeWithTag(4, value.baz); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, OneOfMessage value) throws IOException { ProtoAdapter.INT32.encodeWithTag(writer, 1, value.foo); ProtoAdapter.STRING.encodeWithTag(writer, 3, value.bar); ProtoAdapter.STRING.encodeWithTag(writer, 4, value.baz); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, OneOfMessage value) throws IOException { writer.writeBytes(value.unknownFields()); ProtoAdapter.STRING.encodeWithTag(writer, 4, value.baz); ProtoAdapter.STRING.encodeWithTag(writer, 3, value.bar); ProtoAdapter.INT32.encodeWithTag(writer, 1, value.foo); } @Override public OneOfMessage 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.foo(ProtoAdapter.INT32.decode(reader)); break; case 3: builder.bar(ProtoAdapter.STRING.decode(reader)); break; case 4: builder.baz(ProtoAdapter.STRING.decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public OneOfMessage redact(OneOfMessage value) { Builder builder = value.newBuilder(); builder.clearUnknownFields(); return builder.build(); } } }
7,080
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/namecollisions/Message.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.namecollisions.Message in name_collisions.proto package com.squareup.wire.protos.namecollisions; import com.squareup.wire.FieldEncoding; 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.Object; import java.lang.Override; import java.lang.String; import java.lang.StringBuilder; import okio.ByteString; public final class Message extends com.squareup.wire.Message<Message, Message.Builder> { public static final ProtoAdapter<Message> ADAPTER = new ProtoAdapter_Message(); private static final long serialVersionUID = 0L; public static final String DEFAULT_UNKNOWNFIELDS = ""; public static final String DEFAULT_OTHER = ""; public static final String DEFAULT_O = ""; public static final String DEFAULT_RESULT = ""; public static final String DEFAULT_HASHCODE = ""; public static final String DEFAULT_SERIALVERSIONUID_ = ""; public static final String DEFAULT_ADAPTER_ = ""; public static final String DEFAULT_MESSAGE_OPTIONS_ = ""; public static final String DEFAULT_THIS_ = ""; public static final String DEFAULT_MESSAGE = ""; @WireField( tag = 1, adapter = "com.squareup.wire.ProtoAdapter#STRING" ) public final String unknownFields; @WireField( tag = 2, adapter = "com.squareup.wire.ProtoAdapter#STRING" ) public final String other; @WireField( tag = 3, adapter = "com.squareup.wire.ProtoAdapter#STRING" ) public final String o; @WireField( tag = 4, adapter = "com.squareup.wire.ProtoAdapter#STRING" ) public final String result; @WireField( tag = 5, adapter = "com.squareup.wire.ProtoAdapter#STRING" ) public final String hashCode; @WireField( tag = 6, adapter = "com.squareup.wire.ProtoAdapter#STRING", declaredName = "serialVersionUID" ) public final String serialVersionUID_; @WireField( tag = 7, adapter = "com.squareup.wire.ProtoAdapter#STRING", declaredName = "ADAPTER" ) public final String ADAPTER_; @WireField( tag = 8, adapter = "com.squareup.wire.ProtoAdapter#STRING", declaredName = "MESSAGE_OPTIONS" ) public final String MESSAGE_OPTIONS_; @WireField( tag = 9, adapter = "com.squareup.wire.ProtoAdapter#STRING", declaredName = "this" ) public final String this_; @WireField( tag = 10, adapter = "com.squareup.wire.ProtoAdapter#STRING" ) public final String message; public Message(String unknownFields, String other, String o, String result, String hashCode, String serialVersionUID_, String ADAPTER_, String MESSAGE_OPTIONS_, String this_, String message) { this(unknownFields, other, o, result, hashCode, serialVersionUID_, ADAPTER_, MESSAGE_OPTIONS_, this_, message, ByteString.EMPTY); } public Message(String unknownFields, String other, String o, String result, String hashCode, String serialVersionUID_, String ADAPTER_, String MESSAGE_OPTIONS_, String this_, String message, ByteString unknownFields_) { super(ADAPTER, unknownFields_); this.unknownFields = unknownFields; this.other = other; this.o = o; this.result = result; this.hashCode = hashCode; this.serialVersionUID_ = serialVersionUID_; this.ADAPTER_ = ADAPTER_; this.MESSAGE_OPTIONS_ = MESSAGE_OPTIONS_; this.this_ = this_; this.message = message; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.unknownFields = unknownFields; builder.other = other; builder.o = o; builder.result = result; builder.hashCode = hashCode; builder.serialVersionUID_ = serialVersionUID_; builder.ADAPTER_ = ADAPTER_; builder.MESSAGE_OPTIONS_ = MESSAGE_OPTIONS_; builder.this_ = this_; builder.message = message; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other_) { if (other_ == this) return true; if (!(other_ instanceof Message)) return false; Message o_ = (Message) other_; return unknownFields().equals(o_.unknownFields()) && Internal.equals(unknownFields, o_.unknownFields) && Internal.equals(other, o_.other) && Internal.equals(o, o_.o) && Internal.equals(result, o_.result) && Internal.equals(hashCode, o_.hashCode) && Internal.equals(serialVersionUID_, o_.serialVersionUID_) && Internal.equals(ADAPTER_, o_.ADAPTER_) && Internal.equals(MESSAGE_OPTIONS_, o_.MESSAGE_OPTIONS_) && Internal.equals(this_, o_.this_) && Internal.equals(message, o_.message); } @Override public int hashCode() { int result_ = super.hashCode; if (result_ == 0) { result_ = unknownFields().hashCode(); result_ = result_ * 37 + (unknownFields != null ? unknownFields.hashCode() : 0); result_ = result_ * 37 + (other != null ? other.hashCode() : 0); result_ = result_ * 37 + (o != null ? o.hashCode() : 0); result_ = result_ * 37 + (result != null ? result.hashCode() : 0); result_ = result_ * 37 + (hashCode != null ? hashCode.hashCode() : 0); result_ = result_ * 37 + (serialVersionUID_ != null ? serialVersionUID_.hashCode() : 0); result_ = result_ * 37 + (ADAPTER_ != null ? ADAPTER_.hashCode() : 0); result_ = result_ * 37 + (MESSAGE_OPTIONS_ != null ? MESSAGE_OPTIONS_.hashCode() : 0); result_ = result_ * 37 + (this_ != null ? this_.hashCode() : 0); result_ = result_ * 37 + (message != null ? message.hashCode() : 0); super.hashCode = result_; } return result_; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (unknownFields != null) builder.append(", unknownFields=").append(Internal.sanitize(unknownFields)); if (other != null) builder.append(", other=").append(Internal.sanitize(other)); if (o != null) builder.append(", o=").append(Internal.sanitize(o)); if (result != null) builder.append(", result=").append(Internal.sanitize(result)); if (hashCode != null) builder.append(", hashCode=").append(Internal.sanitize(hashCode)); if (serialVersionUID_ != null) builder.append(", serialVersionUID=").append(Internal.sanitize(serialVersionUID_)); if (ADAPTER_ != null) builder.append(", ADAPTER=").append(Internal.sanitize(ADAPTER_)); if (MESSAGE_OPTIONS_ != null) builder.append(", MESSAGE_OPTIONS=").append(Internal.sanitize(MESSAGE_OPTIONS_)); if (this_ != null) builder.append(", this=").append(Internal.sanitize(this_)); if (message != null) builder.append(", message=").append(Internal.sanitize(message)); return builder.replace(0, 2, "Message{").append('}').toString(); } public static final class Builder extends com.squareup.wire.Message.Builder<Message, Builder> { public String unknownFields; public String other; public String o; public String result; public String hashCode; public String serialVersionUID_; public String ADAPTER_; public String MESSAGE_OPTIONS_; public String this_; public String message; public Builder() { } public Builder unknownFields(String unknownFields) { this.unknownFields = unknownFields; return this; } public Builder other(String other) { this.other = other; return this; } public Builder o(String o) { this.o = o; return this; } public Builder result(String result) { this.result = result; return this; } public Builder hashCode(String hashCode) { this.hashCode = hashCode; return this; } public Builder serialVersionUID_(String serialVersionUID_) { this.serialVersionUID_ = serialVersionUID_; return this; } public Builder ADAPTER_(String ADAPTER_) { this.ADAPTER_ = ADAPTER_; return this; } public Builder MESSAGE_OPTIONS_(String MESSAGE_OPTIONS_) { this.MESSAGE_OPTIONS_ = MESSAGE_OPTIONS_; return this; } public Builder this_(String this_) { this.this_ = this_; return this; } public Builder message(String message) { this.message = message; return this; } @Override public Message build() { return new Message(unknownFields, other, o, result, hashCode, serialVersionUID_, ADAPTER_, MESSAGE_OPTIONS_, this_, message, super.buildUnknownFields()); } } private static final class ProtoAdapter_Message extends ProtoAdapter<Message> { public ProtoAdapter_Message() { super(FieldEncoding.LENGTH_DELIMITED, Message.class, "type.googleapis.com/squareup.protos.namecollisions.Message", Syntax.PROTO_2, null, "name_collisions.proto"); } @Override public int encodedSize(Message value) { int result_ = 0; result_ += ProtoAdapter.STRING.encodedSizeWithTag(1, value.unknownFields); result_ += ProtoAdapter.STRING.encodedSizeWithTag(2, value.other); result_ += ProtoAdapter.STRING.encodedSizeWithTag(3, value.o); result_ += ProtoAdapter.STRING.encodedSizeWithTag(4, value.result); result_ += ProtoAdapter.STRING.encodedSizeWithTag(5, value.hashCode); result_ += ProtoAdapter.STRING.encodedSizeWithTag(6, value.serialVersionUID_); result_ += ProtoAdapter.STRING.encodedSizeWithTag(7, value.ADAPTER_); result_ += ProtoAdapter.STRING.encodedSizeWithTag(8, value.MESSAGE_OPTIONS_); result_ += ProtoAdapter.STRING.encodedSizeWithTag(9, value.this_); result_ += ProtoAdapter.STRING.encodedSizeWithTag(10, value.message); result_ += value.unknownFields().size(); return result_; } @Override public void encode(ProtoWriter writer, Message value) throws IOException { ProtoAdapter.STRING.encodeWithTag(writer, 1, value.unknownFields); ProtoAdapter.STRING.encodeWithTag(writer, 2, value.other); ProtoAdapter.STRING.encodeWithTag(writer, 3, value.o); ProtoAdapter.STRING.encodeWithTag(writer, 4, value.result); ProtoAdapter.STRING.encodeWithTag(writer, 5, value.hashCode); ProtoAdapter.STRING.encodeWithTag(writer, 6, value.serialVersionUID_); ProtoAdapter.STRING.encodeWithTag(writer, 7, value.ADAPTER_); ProtoAdapter.STRING.encodeWithTag(writer, 8, value.MESSAGE_OPTIONS_); ProtoAdapter.STRING.encodeWithTag(writer, 9, value.this_); ProtoAdapter.STRING.encodeWithTag(writer, 10, value.message); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, Message value) throws IOException { writer.writeBytes(value.unknownFields()); ProtoAdapter.STRING.encodeWithTag(writer, 10, value.message); ProtoAdapter.STRING.encodeWithTag(writer, 9, value.this_); ProtoAdapter.STRING.encodeWithTag(writer, 8, value.MESSAGE_OPTIONS_); ProtoAdapter.STRING.encodeWithTag(writer, 7, value.ADAPTER_); ProtoAdapter.STRING.encodeWithTag(writer, 6, value.serialVersionUID_); ProtoAdapter.STRING.encodeWithTag(writer, 5, value.hashCode); ProtoAdapter.STRING.encodeWithTag(writer, 4, value.result); ProtoAdapter.STRING.encodeWithTag(writer, 3, value.o); ProtoAdapter.STRING.encodeWithTag(writer, 2, value.other); ProtoAdapter.STRING.encodeWithTag(writer, 1, value.unknownFields); } @Override public Message 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.unknownFields(ProtoAdapter.STRING.decode(reader)); break; case 2: builder.other(ProtoAdapter.STRING.decode(reader)); break; case 3: builder.o(ProtoAdapter.STRING.decode(reader)); break; case 4: builder.result(ProtoAdapter.STRING.decode(reader)); break; case 5: builder.hashCode(ProtoAdapter.STRING.decode(reader)); break; case 6: builder.serialVersionUID_(ProtoAdapter.STRING.decode(reader)); break; case 7: builder.ADAPTER_(ProtoAdapter.STRING.decode(reader)); break; case 8: builder.MESSAGE_OPTIONS_(ProtoAdapter.STRING.decode(reader)); break; case 9: builder.this_(ProtoAdapter.STRING.decode(reader)); break; case 10: builder.message(ProtoAdapter.STRING.decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public Message redact(Message value) { Builder builder = value.newBuilder(); builder.clearUnknownFields(); return builder.build(); } } }
7,081
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/foreign/ForeignEnumValueOptionOption.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.foreign.foreign_enum_value_option in foreign.proto package com.squareup.wire.protos.foreign; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) public @interface ForeignEnumValueOptionOption { boolean value(); }
7,082
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/foreign/ForeignMessage.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.foreign.ForeignMessage in foreign.proto package com.squareup.wire.protos.foreign; 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.Integer; import java.lang.Object; import java.lang.Override; import java.lang.String; import java.lang.StringBuilder; import okio.ByteString; public final class ForeignMessage extends Message<ForeignMessage, ForeignMessage.Builder> { public static final ProtoAdapter<ForeignMessage> ADAPTER = new ProtoAdapter_ForeignMessage(); private static final long serialVersionUID = 0L; public static final Integer DEFAULT_I = 0; public static final Integer DEFAULT_J = 0; @WireField( tag = 1, adapter = "com.squareup.wire.ProtoAdapter#INT32" ) public final Integer i; /** * Extension source: simple_message.proto */ @WireField( tag = 100, adapter = "com.squareup.wire.ProtoAdapter#INT32" ) public final Integer j; public ForeignMessage(Integer i, Integer j) { this(i, j, ByteString.EMPTY); } public ForeignMessage(Integer i, Integer j, ByteString unknownFields) { super(ADAPTER, unknownFields); this.i = i; this.j = j; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.i = i; builder.j = j; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof ForeignMessage)) return false; ForeignMessage o = (ForeignMessage) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(i, o.i) && Internal.equals(j, o.j); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + (i != null ? i.hashCode() : 0); result = result * 37 + (j != null ? j.hashCode() : 0); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (i != null) builder.append(", i=").append(i); if (j != null) builder.append(", j=").append(j); return builder.replace(0, 2, "ForeignMessage{").append('}').toString(); } public static final class Builder extends Message.Builder<ForeignMessage, Builder> { public Integer i; public Integer j; public Builder() { } public Builder i(Integer i) { this.i = i; return this; } public Builder j(Integer j) { this.j = j; return this; } @Override public ForeignMessage build() { return new ForeignMessage(i, j, super.buildUnknownFields()); } } private static final class ProtoAdapter_ForeignMessage extends ProtoAdapter<ForeignMessage> { public ProtoAdapter_ForeignMessage() { super(FieldEncoding.LENGTH_DELIMITED, ForeignMessage.class, "type.googleapis.com/squareup.protos.foreign.ForeignMessage", Syntax.PROTO_2, null, "foreign.proto"); } @Override public int encodedSize(ForeignMessage value) { int result = 0; result += ProtoAdapter.INT32.encodedSizeWithTag(1, value.i); result += ProtoAdapter.INT32.encodedSizeWithTag(100, value.j); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, ForeignMessage value) throws IOException { ProtoAdapter.INT32.encodeWithTag(writer, 1, value.i); ProtoAdapter.INT32.encodeWithTag(writer, 100, value.j); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, ForeignMessage value) throws IOException { writer.writeBytes(value.unknownFields()); ProtoAdapter.INT32.encodeWithTag(writer, 100, value.j); ProtoAdapter.INT32.encodeWithTag(writer, 1, value.i); } @Override public ForeignMessage 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.i(ProtoAdapter.INT32.decode(reader)); break; case 100: builder.j(ProtoAdapter.INT32.decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public ForeignMessage redact(ForeignMessage value) { Builder builder = value.newBuilder(); builder.clearUnknownFields(); return builder.build(); } } }
7,083
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/protos/foreign/ForeignEnum.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos.foreign.ForeignEnum in foreign.proto package com.squareup.wire.protos.foreign; import com.squareup.wire.EnumAdapter; import com.squareup.wire.ProtoAdapter; import com.squareup.wire.Syntax; import com.squareup.wire.WireEnum; import java.lang.Override; public enum ForeignEnum implements WireEnum { BAV(0), BAX(1); public static final ProtoAdapter<ForeignEnum> ADAPTER = new ProtoAdapter_ForeignEnum(); private final int value; ForeignEnum(int value) { this.value = value; } /** * Return the constant for {@code value} or null. */ public static ForeignEnum fromValue(int value) { switch (value) { case 0: return BAV; case 1: return BAX; default: return null; } } @Override public int getValue() { return value; } private static final class ProtoAdapter_ForeignEnum extends EnumAdapter<ForeignEnum> { ProtoAdapter_ForeignEnum() { super(ForeignEnum.class, Syntax.PROTO_2, ForeignEnum.BAV); } @Override protected ForeignEnum fromValue(int value) { return ForeignEnum.fromValue(value); } } }
7,084
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/map/Thing.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: com.squareup.wire.map.Thing in map.proto package com.squareup.wire.map; 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.Object; import java.lang.Override; import java.lang.String; import java.lang.StringBuilder; import okio.ByteString; public final class Thing extends Message<Thing, Thing.Builder> { public static final ProtoAdapter<Thing> ADAPTER = new ProtoAdapter_Thing(); private static final long serialVersionUID = 0L; public static final String DEFAULT_NAME = ""; @WireField( tag = 1, adapter = "com.squareup.wire.ProtoAdapter#STRING" ) public final String name; public Thing(String name) { this(name, ByteString.EMPTY); } public Thing(String name, ByteString unknownFields) { super(ADAPTER, unknownFields); this.name = name; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.name = name; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof Thing)) return false; Thing o = (Thing) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(name, o.name); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + (name != null ? name.hashCode() : 0); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (name != null) builder.append(", name=").append(Internal.sanitize(name)); return builder.replace(0, 2, "Thing{").append('}').toString(); } public static final class Builder extends Message.Builder<Thing, Builder> { public String name; public Builder() { } public Builder name(String name) { this.name = name; return this; } @Override public Thing build() { return new Thing(name, super.buildUnknownFields()); } } private static final class ProtoAdapter_Thing extends ProtoAdapter<Thing> { public ProtoAdapter_Thing() { super(FieldEncoding.LENGTH_DELIMITED, Thing.class, "type.googleapis.com/com.squareup.wire.map.Thing", Syntax.PROTO_2, null, "map.proto"); } @Override public int encodedSize(Thing value) { int result = 0; result += ProtoAdapter.STRING.encodedSizeWithTag(1, value.name); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, Thing value) throws IOException { ProtoAdapter.STRING.encodeWithTag(writer, 1, value.name); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, Thing value) throws IOException { writer.writeBytes(value.unknownFields()); ProtoAdapter.STRING.encodeWithTag(writer, 1, value.name); } @Override public Thing 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.name(ProtoAdapter.STRING.decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public Thing redact(Thing value) { Builder builder = value.newBuilder(); builder.clearUnknownFields(); return builder.build(); } } }
7,085
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/map/MappyTwo.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: com.squareup.wire.map.MappyTwo in map.proto package com.squareup.wire.map; import com.squareup.wire.EnumAdapter; 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.WireEnum; import com.squareup.wire.WireField; import com.squareup.wire.internal.Internal; import java.io.IOException; 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 MappyTwo extends Message<MappyTwo, MappyTwo.Builder> { public static final ProtoAdapter<MappyTwo> ADAPTER = new ProtoAdapter_MappyTwo(); private static final long serialVersionUID = 0L; @WireField( tag = 1, keyAdapter = "com.squareup.wire.ProtoAdapter#STRING", adapter = "com.squareup.wire.map.MappyTwo$ValueEnum#ADAPTER" ) public final Map<String, ValueEnum> string_enums; @WireField( tag = 2, keyAdapter = "com.squareup.wire.ProtoAdapter#SINT64", adapter = "com.squareup.wire.map.Thing#ADAPTER" ) public final Map<Long, Thing> int_things; @WireField( tag = 3, keyAdapter = "com.squareup.wire.ProtoAdapter#STRING", adapter = "com.squareup.wire.ProtoAdapter#SINT64" ) public final Map<String, Long> string_ints; @WireField( tag = 4, keyAdapter = "com.squareup.wire.ProtoAdapter#SINT32", adapter = "com.squareup.wire.map.Thing#ADAPTER" ) public final Map<Integer, Thing> int_things_two; public MappyTwo(Map<String, ValueEnum> string_enums, Map<Long, Thing> int_things, Map<String, Long> string_ints, Map<Integer, Thing> int_things_two) { this(string_enums, int_things, string_ints, int_things_two, ByteString.EMPTY); } public MappyTwo(Map<String, ValueEnum> string_enums, Map<Long, Thing> int_things, Map<String, Long> string_ints, Map<Integer, Thing> int_things_two, ByteString unknownFields) { super(ADAPTER, unknownFields); this.string_enums = Internal.immutableCopyOf("string_enums", string_enums); this.int_things = Internal.immutableCopyOf("int_things", int_things); this.string_ints = Internal.immutableCopyOf("string_ints", string_ints); this.int_things_two = Internal.immutableCopyOf("int_things_two", int_things_two); } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.string_enums = Internal.copyOf(string_enums); builder.int_things = Internal.copyOf(int_things); builder.string_ints = Internal.copyOf(string_ints); builder.int_things_two = Internal.copyOf(int_things_two); builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof MappyTwo)) return false; MappyTwo o = (MappyTwo) other; return unknownFields().equals(o.unknownFields()) && string_enums.equals(o.string_enums) && int_things.equals(o.int_things) && string_ints.equals(o.string_ints) && int_things_two.equals(o.int_things_two); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + string_enums.hashCode(); result = result * 37 + int_things.hashCode(); result = result * 37 + string_ints.hashCode(); result = result * 37 + int_things_two.hashCode(); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (!string_enums.isEmpty()) builder.append(", string_enums=").append(string_enums); if (!int_things.isEmpty()) builder.append(", int_things=").append(int_things); if (!string_ints.isEmpty()) builder.append(", string_ints=").append(string_ints); if (!int_things_two.isEmpty()) builder.append(", int_things_two=").append(int_things_two); return builder.replace(0, 2, "MappyTwo{").append('}').toString(); } public static final class Builder extends Message.Builder<MappyTwo, Builder> { public Map<String, ValueEnum> string_enums; public Map<Long, Thing> int_things; public Map<String, Long> string_ints; public Map<Integer, Thing> int_things_two; public Builder() { string_enums = Internal.newMutableMap(); int_things = Internal.newMutableMap(); string_ints = Internal.newMutableMap(); int_things_two = Internal.newMutableMap(); } public Builder string_enums(Map<String, ValueEnum> string_enums) { Internal.checkElementsNotNull(string_enums); this.string_enums = string_enums; return this; } public Builder int_things(Map<Long, Thing> int_things) { Internal.checkElementsNotNull(int_things); this.int_things = int_things; return this; } public Builder string_ints(Map<String, Long> string_ints) { Internal.checkElementsNotNull(string_ints); this.string_ints = string_ints; return this; } public Builder int_things_two(Map<Integer, Thing> int_things_two) { Internal.checkElementsNotNull(int_things_two); this.int_things_two = int_things_two; return this; } @Override public MappyTwo build() { return new MappyTwo(string_enums, int_things, string_ints, int_things_two, super.buildUnknownFields()); } } public enum ValueEnum implements WireEnum { DEFAULT(0), FOO(1), BAR(2); public static final ProtoAdapter<ValueEnum> ADAPTER = new ProtoAdapter_ValueEnum(); private final int value; ValueEnum(int value) { this.value = value; } /** * Return the constant for {@code value} or null. */ public static ValueEnum fromValue(int value) { switch (value) { case 0: return DEFAULT; case 1: return FOO; case 2: return BAR; default: return null; } } @Override public int getValue() { return value; } private static final class ProtoAdapter_ValueEnum extends EnumAdapter<ValueEnum> { ProtoAdapter_ValueEnum() { super(ValueEnum.class, Syntax.PROTO_2, ValueEnum.DEFAULT); } @Override protected ValueEnum fromValue(int value) { return ValueEnum.fromValue(value); } } } private static final class ProtoAdapter_MappyTwo extends ProtoAdapter<MappyTwo> { private ProtoAdapter<Map<String, ValueEnum>> string_enums; private ProtoAdapter<Map<Long, Thing>> int_things; private ProtoAdapter<Map<String, Long>> string_ints; private ProtoAdapter<Map<Integer, Thing>> int_things_two; public ProtoAdapter_MappyTwo() { super(FieldEncoding.LENGTH_DELIMITED, MappyTwo.class, "type.googleapis.com/com.squareup.wire.map.MappyTwo", Syntax.PROTO_2, null, "map.proto"); } @Override public int encodedSize(MappyTwo value) { int result = 0; result += string_enumsAdapter().encodedSizeWithTag(1, value.string_enums); result += int_thingsAdapter().encodedSizeWithTag(2, value.int_things); result += string_intsAdapter().encodedSizeWithTag(3, value.string_ints); result += int_things_twoAdapter().encodedSizeWithTag(4, value.int_things_two); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, MappyTwo value) throws IOException { string_enumsAdapter().encodeWithTag(writer, 1, value.string_enums); int_thingsAdapter().encodeWithTag(writer, 2, value.int_things); string_intsAdapter().encodeWithTag(writer, 3, value.string_ints); int_things_twoAdapter().encodeWithTag(writer, 4, value.int_things_two); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, MappyTwo value) throws IOException { writer.writeBytes(value.unknownFields()); int_things_twoAdapter().encodeWithTag(writer, 4, value.int_things_two); string_intsAdapter().encodeWithTag(writer, 3, value.string_ints); int_thingsAdapter().encodeWithTag(writer, 2, value.int_things); string_enumsAdapter().encodeWithTag(writer, 1, value.string_enums); } @Override public MappyTwo 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.string_enums.putAll(string_enumsAdapter().decode(reader)); break; case 2: builder.int_things.putAll(int_thingsAdapter().decode(reader)); break; case 3: builder.string_ints.putAll(string_intsAdapter().decode(reader)); break; case 4: builder.int_things_two.putAll(int_things_twoAdapter().decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public MappyTwo redact(MappyTwo value) { Builder builder = value.newBuilder(); Internal.redactElements(builder.int_things, Thing.ADAPTER); Internal.redactElements(builder.int_things_two, Thing.ADAPTER); builder.clearUnknownFields(); return builder.build(); } private ProtoAdapter<Map<String, ValueEnum>> string_enumsAdapter() { ProtoAdapter<Map<String, ValueEnum>> result = string_enums; if (result == null) { result = ProtoAdapter.newMapAdapter(ProtoAdapter.STRING, ValueEnum.ADAPTER); string_enums = result; } return result; } private ProtoAdapter<Map<Long, Thing>> int_thingsAdapter() { ProtoAdapter<Map<Long, Thing>> result = int_things; if (result == null) { result = ProtoAdapter.newMapAdapter(ProtoAdapter.SINT64, Thing.ADAPTER); int_things = result; } return result; } private ProtoAdapter<Map<String, Long>> string_intsAdapter() { ProtoAdapter<Map<String, Long>> result = string_ints; if (result == null) { result = ProtoAdapter.newMapAdapter(ProtoAdapter.STRING, ProtoAdapter.SINT64); string_ints = result; } return result; } private ProtoAdapter<Map<Integer, Thing>> int_things_twoAdapter() { ProtoAdapter<Map<Integer, Thing>> result = int_things_two; if (result == null) { result = ProtoAdapter.newMapAdapter(ProtoAdapter.SINT32, Thing.ADAPTER); int_things_two = result; } return result; } } }
7,086
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/map/Mappy.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: com.squareup.wire.map.Mappy in map.proto package com.squareup.wire.map; 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.Object; import java.lang.Override; import java.lang.String; import java.lang.StringBuilder; import java.util.Map; import okio.ByteString; public final class Mappy extends Message<Mappy, Mappy.Builder> { public static final ProtoAdapter<Mappy> ADAPTER = new ProtoAdapter_Mappy(); private static final long serialVersionUID = 0L; @WireField( tag = 1, keyAdapter = "com.squareup.wire.ProtoAdapter#STRING", adapter = "com.squareup.wire.map.Thing#ADAPTER" ) public final Map<String, Thing> things; public Mappy(Map<String, Thing> things) { this(things, ByteString.EMPTY); } public Mappy(Map<String, Thing> things, ByteString unknownFields) { super(ADAPTER, unknownFields); this.things = Internal.immutableCopyOf("things", things); } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.things = Internal.copyOf(things); builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof Mappy)) return false; Mappy o = (Mappy) other; return unknownFields().equals(o.unknownFields()) && things.equals(o.things); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + things.hashCode(); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (!things.isEmpty()) builder.append(", things=").append(things); return builder.replace(0, 2, "Mappy{").append('}').toString(); } public static final class Builder extends Message.Builder<Mappy, Builder> { public Map<String, Thing> things; public Builder() { things = Internal.newMutableMap(); } public Builder things(Map<String, Thing> things) { Internal.checkElementsNotNull(things); this.things = things; return this; } @Override public Mappy build() { return new Mappy(things, super.buildUnknownFields()); } } private static final class ProtoAdapter_Mappy extends ProtoAdapter<Mappy> { private ProtoAdapter<Map<String, Thing>> things; public ProtoAdapter_Mappy() { super(FieldEncoding.LENGTH_DELIMITED, Mappy.class, "type.googleapis.com/com.squareup.wire.map.Mappy", Syntax.PROTO_2, null, "map.proto"); } @Override public int encodedSize(Mappy value) { int result = 0; result += thingsAdapter().encodedSizeWithTag(1, value.things); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, Mappy value) throws IOException { thingsAdapter().encodeWithTag(writer, 1, value.things); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, Mappy value) throws IOException { writer.writeBytes(value.unknownFields()); thingsAdapter().encodeWithTag(writer, 1, value.things); } @Override public Mappy 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.things.putAll(thingsAdapter().decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public Mappy redact(Mappy value) { Builder builder = value.newBuilder(); Internal.redactElements(builder.things, Thing.ADAPTER); builder.clearUnknownFields(); return builder.build(); } private ProtoAdapter<Map<String, Thing>> thingsAdapter() { ProtoAdapter<Map<String, Thing>> result = things; if (result == null) { result = ProtoAdapter.newMapAdapter(ProtoAdapter.STRING, Thing.ADAPTER); things = result; } return result; } } }
7,087
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/proto3/java
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/proto3/java/person/Person.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.protos3.java.person.Person in person.proto package com.squareup.wire.proto3.java.person; import com.squareup.wire.EnumAdapter; 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.WireEnum; import com.squareup.wire.WireField; import com.squareup.wire.internal.Internal; import java.io.IOException; import java.lang.Integer; import java.lang.Object; import java.lang.Override; import java.lang.String; import java.lang.StringBuilder; import java.util.List; import java.util.Objects; import okio.ByteString; /** * Message representing a person, includes their name, unique ID number, email and phone number. */ public final class Person extends Message<Person, Person.Builder> { public static final ProtoAdapter<Person> ADAPTER = new ProtoAdapter_Person(); private static final long serialVersionUID = 0L; public static final Integer DEFAULT_FOO = 0; public static final String DEFAULT_BAR = ""; /** * The customer's full name. */ @WireField( tag = 1, adapter = "com.squareup.wire.ProtoAdapter#STRING", label = WireField.Label.OMIT_IDENTITY ) public final String name; /** * The customer's ID number. */ @WireField( tag = 2, adapter = "com.squareup.wire.ProtoAdapter#INT32", label = WireField.Label.OMIT_IDENTITY ) public final int id; /** * Email address for the customer. */ @WireField( tag = 3, adapter = "com.squareup.wire.ProtoAdapter#STRING", label = WireField.Label.OMIT_IDENTITY ) public final String email; /** * A list of the customer's phone numbers. */ @WireField( tag = 4, adapter = "com.squareup.wire.proto3.java.person.Person$PhoneNumber#ADAPTER", label = WireField.Label.REPEATED ) public final List<PhoneNumber> phones; @WireField( tag = 5, adapter = "com.squareup.wire.ProtoAdapter#STRING", label = WireField.Label.REPEATED ) public final List<String> aliases; @WireField( tag = 6, adapter = "com.squareup.wire.ProtoAdapter#INT32", oneofName = "choice" ) public final Integer foo; @WireField( tag = 7, adapter = "com.squareup.wire.ProtoAdapter#STRING", oneofName = "choice" ) public final String bar; public Person(String name, int id, String email, List<PhoneNumber> phones, List<String> aliases, Integer foo, String bar) { this(name, id, email, phones, aliases, foo, bar, ByteString.EMPTY); } public Person(String name, int id, String email, List<PhoneNumber> phones, List<String> aliases, Integer foo, String bar, ByteString unknownFields) { super(ADAPTER, unknownFields); if (Internal.countNonNull(foo, bar) > 1) { throw new IllegalArgumentException("at most one of foo, bar may be non-null"); } if (name == null) { throw new IllegalArgumentException("name == null"); } this.name = name; this.id = id; if (email == null) { throw new IllegalArgumentException("email == null"); } this.email = email; this.phones = Internal.immutableCopyOf("phones", phones); this.aliases = Internal.immutableCopyOf("aliases", aliases); this.foo = foo; this.bar = bar; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.name = name; builder.id = id; builder.email = email; builder.phones = Internal.copyOf(phones); builder.aliases = Internal.copyOf(aliases); builder.foo = foo; builder.bar = bar; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof Person)) return false; Person o = (Person) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(name, o.name) && Internal.equals(id, o.id) && Internal.equals(email, o.email) && phones.equals(o.phones) && aliases.equals(o.aliases) && Internal.equals(foo, o.foo) && Internal.equals(bar, o.bar); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + (name != null ? name.hashCode() : 0); result = result * 37 + Integer.hashCode(id); result = result * 37 + (email != null ? email.hashCode() : 0); result = result * 37 + phones.hashCode(); result = result * 37 + aliases.hashCode(); result = result * 37 + (foo != null ? foo.hashCode() : 0); result = result * 37 + (bar != null ? bar.hashCode() : 0); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (name != null) builder.append(", name=").append(Internal.sanitize(name)); builder.append(", id=").append(id); if (email != null) builder.append(", email=").append(Internal.sanitize(email)); if (!phones.isEmpty()) builder.append(", phones=").append(phones); if (!aliases.isEmpty()) builder.append(", aliases=").append(Internal.sanitize(aliases)); if (foo != null) builder.append(", foo=").append(foo); if (bar != null) builder.append(", bar=").append(Internal.sanitize(bar)); return builder.replace(0, 2, "Person{").append('}').toString(); } public static final class Builder extends Message.Builder<Person, Builder> { public String name; public int id; public String email; public List<PhoneNumber> phones; public List<String> aliases; public Integer foo; public String bar; public Builder() { name = ""; id = 0; email = ""; phones = Internal.newMutableList(); aliases = Internal.newMutableList(); } /** * The customer's full name. */ public Builder name(String name) { this.name = name; return this; } /** * The customer's ID number. */ public Builder id(int id) { this.id = id; return this; } /** * Email address for the customer. */ public Builder email(String email) { this.email = email; return this; } /** * A list of the customer's phone numbers. */ public Builder phones(List<PhoneNumber> phones) { Internal.checkElementsNotNull(phones); this.phones = phones; return this; } public Builder aliases(List<String> aliases) { Internal.checkElementsNotNull(aliases); this.aliases = aliases; return this; } public Builder foo(Integer foo) { this.foo = foo; this.bar = null; return this; } public Builder bar(String bar) { this.bar = bar; this.foo = null; return this; } @Override public Person build() { return new Person(name, id, email, phones, aliases, foo, bar, super.buildUnknownFields()); } } /** * Represents the type of the phone number: mobile, home or work. */ public enum PhoneType implements WireEnum { MOBILE(0), HOME(1), /** * Could be phone or fax. */ WORK(2); public static final ProtoAdapter<PhoneType> ADAPTER = new ProtoAdapter_PhoneType(); private final int value; PhoneType(int value) { this.value = value; } /** * Return the constant for {@code value} or null. */ public static PhoneType fromValue(int value) { switch (value) { case 0: return MOBILE; case 1: return HOME; case 2: return WORK; default: return null; } } @Override public int getValue() { return value; } private static final class ProtoAdapter_PhoneType extends EnumAdapter<PhoneType> { ProtoAdapter_PhoneType() { super(PhoneType.class, Syntax.PROTO_3, PhoneType.MOBILE); } @Override protected PhoneType fromValue(int value) { return PhoneType.fromValue(value); } } } public static final class PhoneNumber extends Message<PhoneNumber, PhoneNumber.Builder> { public static final ProtoAdapter<PhoneNumber> ADAPTER = new ProtoAdapter_PhoneNumber(); private static final long serialVersionUID = 0L; /** * The customer's phone number. */ @WireField( tag = 1, adapter = "com.squareup.wire.ProtoAdapter#STRING", label = WireField.Label.OMIT_IDENTITY ) public final String number; /** * The type of phone stored here. */ @WireField( tag = 2, adapter = "com.squareup.wire.proto3.java.person.Person$PhoneType#ADAPTER", label = WireField.Label.OMIT_IDENTITY ) public final PhoneType type; public PhoneNumber(String number, PhoneType type) { this(number, type, ByteString.EMPTY); } public PhoneNumber(String number, PhoneType type, ByteString unknownFields) { super(ADAPTER, unknownFields); if (number == null) { throw new IllegalArgumentException("number == null"); } this.number = number; if (type == null) { throw new IllegalArgumentException("type == null"); } this.type = type; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.number = number; builder.type = type; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof PhoneNumber)) return false; PhoneNumber o = (PhoneNumber) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(number, o.number) && Internal.equals(type, o.type); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + (number != null ? number.hashCode() : 0); result = result * 37 + (type != null ? type.hashCode() : 0); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (number != null) builder.append(", number=").append(Internal.sanitize(number)); if (type != null) builder.append(", type=").append(type); return builder.replace(0, 2, "PhoneNumber{").append('}').toString(); } public static final class Builder extends Message.Builder<PhoneNumber, Builder> { public String number; public PhoneType type; public Builder() { number = ""; type = PhoneType.MOBILE; } /** * The customer's phone number. */ public Builder number(String number) { this.number = number; return this; } /** * The type of phone stored here. */ public Builder type(PhoneType type) { this.type = type; return this; } @Override public PhoneNumber build() { return new PhoneNumber(number, type, super.buildUnknownFields()); } } private static final class ProtoAdapter_PhoneNumber extends ProtoAdapter<PhoneNumber> { public ProtoAdapter_PhoneNumber() { super(FieldEncoding.LENGTH_DELIMITED, PhoneNumber.class, "type.googleapis.com/squareup.protos3.java.person.Person.PhoneNumber", Syntax.PROTO_3, null, "person.proto"); } @Override public int encodedSize(PhoneNumber value) { int result = 0; if (!Objects.equals(value.number, "")) { result += ProtoAdapter.STRING.encodedSizeWithTag(1, value.number); } if (!Objects.equals(value.type, PhoneType.MOBILE)) { result += PhoneType.ADAPTER.encodedSizeWithTag(2, value.type); } result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, PhoneNumber value) throws IOException { if (!Objects.equals(value.number, "")) ProtoAdapter.STRING.encodeWithTag(writer, 1, value.number); if (!Objects.equals(value.type, PhoneType.MOBILE)) PhoneType.ADAPTER.encodeWithTag(writer, 2, value.type); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, PhoneNumber value) throws IOException { writer.writeBytes(value.unknownFields()); if (!Objects.equals(value.type, PhoneType.MOBILE)) PhoneType.ADAPTER.encodeWithTag(writer, 2, value.type); if (!Objects.equals(value.number, "")) ProtoAdapter.STRING.encodeWithTag(writer, 1, value.number); } @Override public PhoneNumber 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.number(ProtoAdapter.STRING.decode(reader)); break; case 2: { try { builder.type(PhoneType.ADAPTER.decode(reader)); } catch (ProtoAdapter.EnumConstantNotFoundException e) { builder.addUnknownField(tag, FieldEncoding.VARINT, (long) e.value); } break; } default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public PhoneNumber redact(PhoneNumber value) { Builder builder = value.newBuilder(); builder.clearUnknownFields(); return builder.build(); } } } private static final class ProtoAdapter_Person extends ProtoAdapter<Person> { public ProtoAdapter_Person() { super(FieldEncoding.LENGTH_DELIMITED, Person.class, "type.googleapis.com/squareup.protos3.java.person.Person", Syntax.PROTO_3, null, "person.proto"); } @Override public int encodedSize(Person value) { int result = 0; if (!Objects.equals(value.name, "")) { result += ProtoAdapter.STRING.encodedSizeWithTag(1, value.name); } if (!Objects.equals(value.id, 0)) { result += ProtoAdapter.INT32.encodedSizeWithTag(2, value.id); } if (!Objects.equals(value.email, "")) { result += ProtoAdapter.STRING.encodedSizeWithTag(3, value.email); } result += PhoneNumber.ADAPTER.asRepeated().encodedSizeWithTag(4, value.phones); result += ProtoAdapter.STRING.asRepeated().encodedSizeWithTag(5, value.aliases); result += ProtoAdapter.INT32.encodedSizeWithTag(6, value.foo); result += ProtoAdapter.STRING.encodedSizeWithTag(7, value.bar); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, Person value) throws IOException { if (!Objects.equals(value.name, "")) ProtoAdapter.STRING.encodeWithTag(writer, 1, value.name); if (!Objects.equals(value.id, 0)) ProtoAdapter.INT32.encodeWithTag(writer, 2, value.id); if (!Objects.equals(value.email, "")) ProtoAdapter.STRING.encodeWithTag(writer, 3, value.email); PhoneNumber.ADAPTER.asRepeated().encodeWithTag(writer, 4, value.phones); ProtoAdapter.STRING.asRepeated().encodeWithTag(writer, 5, value.aliases); ProtoAdapter.INT32.encodeWithTag(writer, 6, value.foo); ProtoAdapter.STRING.encodeWithTag(writer, 7, value.bar); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, Person value) throws IOException { writer.writeBytes(value.unknownFields()); ProtoAdapter.STRING.encodeWithTag(writer, 7, value.bar); ProtoAdapter.INT32.encodeWithTag(writer, 6, value.foo); ProtoAdapter.STRING.asRepeated().encodeWithTag(writer, 5, value.aliases); PhoneNumber.ADAPTER.asRepeated().encodeWithTag(writer, 4, value.phones); if (!Objects.equals(value.email, "")) ProtoAdapter.STRING.encodeWithTag(writer, 3, value.email); if (!Objects.equals(value.id, 0)) ProtoAdapter.INT32.encodeWithTag(writer, 2, value.id); if (!Objects.equals(value.name, "")) ProtoAdapter.STRING.encodeWithTag(writer, 1, value.name); } @Override public Person 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.name(ProtoAdapter.STRING.decode(reader)); break; case 2: builder.id(ProtoAdapter.INT32.decode(reader)); break; case 3: builder.email(ProtoAdapter.STRING.decode(reader)); break; case 4: builder.phones.add(PhoneNumber.ADAPTER.decode(reader)); break; case 5: builder.aliases.add(ProtoAdapter.STRING.decode(reader)); break; case 6: builder.foo(ProtoAdapter.INT32.decode(reader)); break; case 7: builder.bar(ProtoAdapter.STRING.decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public Person redact(Person value) { Builder builder = value.newBuilder(); Internal.redactElements(builder.phones, PhoneNumber.ADAPTER); builder.clearUnknownFields(); return builder.build(); } } }
7,088
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/proto3/java
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/wire/proto3/java/all_types/AllTypes.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: proto3.java.AllTypes in all_types.proto package com.squareup.wire.proto3.java.all_types; import com.squareup.wire.AnyMessage; import com.squareup.wire.EnumAdapter; 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.WireEnum; import com.squareup.wire.WireField; import com.squareup.wire.internal.Internal; import java.io.IOException; import java.lang.Boolean; import java.lang.Double; import java.lang.Float; 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.lang.Void; import java.time.Duration; import java.time.Instant; import java.util.List; import java.util.Map; import java.util.Objects; import kotlin.Unit; import okio.ByteString; public final class AllTypes extends Message<AllTypes, AllTypes.Builder> { public static final ProtoAdapter<AllTypes> ADAPTER = new ProtoAdapter_AllTypes(); private static final long serialVersionUID = 0L; public static final Integer DEFAULT_OPT_INT32 = 0; public static final Integer DEFAULT_OPT_UINT32 = 0; public static final Integer DEFAULT_OPT_SINT32 = 0; public static final Integer DEFAULT_OPT_FIXED32 = 0; public static final Integer DEFAULT_OPT_SFIXED32 = 0; public static final Long DEFAULT_OPT_INT64 = 0L; public static final Long DEFAULT_OPT_UINT64 = 0L; public static final Long DEFAULT_OPT_SINT64 = 0L; public static final Long DEFAULT_OPT_FIXED64 = 0L; public static final Long DEFAULT_OPT_SFIXED64 = 0L; public static final Boolean DEFAULT_OPT_BOOL = false; public static final Float DEFAULT_OPT_FLOAT = 0.0f; public static final Double DEFAULT_OPT_DOUBLE = 0.0d; public static final String DEFAULT_OPT_STRING = ""; public static final ByteString DEFAULT_OPT_BYTES = ByteString.EMPTY; public static final String DEFAULT_ONEOF_STRING = ""; public static final Integer DEFAULT_ONEOF_INT32 = 0; @WireField( tag = 1, adapter = "com.squareup.wire.ProtoAdapter#INT32", label = WireField.Label.OMIT_IDENTITY ) public final int int32; @WireField( tag = 2, adapter = "com.squareup.wire.ProtoAdapter#UINT32", label = WireField.Label.OMIT_IDENTITY ) public final int uint32; @WireField( tag = 3, adapter = "com.squareup.wire.ProtoAdapter#SINT32", label = WireField.Label.OMIT_IDENTITY ) public final int sint32; @WireField( tag = 4, adapter = "com.squareup.wire.ProtoAdapter#FIXED32", label = WireField.Label.OMIT_IDENTITY ) public final int fixed32; @WireField( tag = 5, adapter = "com.squareup.wire.ProtoAdapter#SFIXED32", label = WireField.Label.OMIT_IDENTITY ) public final int sfixed32; @WireField( tag = 6, adapter = "com.squareup.wire.ProtoAdapter#INT64", label = WireField.Label.OMIT_IDENTITY ) public final long int64; @WireField( tag = 7, adapter = "com.squareup.wire.ProtoAdapter#UINT64", label = WireField.Label.OMIT_IDENTITY ) public final long uint64; @WireField( tag = 8, adapter = "com.squareup.wire.ProtoAdapter#SINT64", label = WireField.Label.OMIT_IDENTITY ) public final long sint64; @WireField( tag = 9, adapter = "com.squareup.wire.ProtoAdapter#FIXED64", label = WireField.Label.OMIT_IDENTITY ) public final long fixed64; @WireField( tag = 10, adapter = "com.squareup.wire.ProtoAdapter#SFIXED64", label = WireField.Label.OMIT_IDENTITY ) public final long sfixed64; @WireField( tag = 11, adapter = "com.squareup.wire.ProtoAdapter#BOOL", label = WireField.Label.OMIT_IDENTITY ) public final boolean bool; @WireField( tag = 12, adapter = "com.squareup.wire.ProtoAdapter#FLOAT", label = WireField.Label.OMIT_IDENTITY, declaredName = "float" ) public final float float_; @WireField( tag = 13, adapter = "com.squareup.wire.ProtoAdapter#DOUBLE", label = WireField.Label.OMIT_IDENTITY, declaredName = "double" ) public final double double_; @WireField( tag = 14, adapter = "com.squareup.wire.ProtoAdapter#STRING", label = WireField.Label.OMIT_IDENTITY ) public final String string; @WireField( tag = 15, adapter = "com.squareup.wire.ProtoAdapter#BYTES", label = WireField.Label.OMIT_IDENTITY ) public final ByteString bytes; @WireField( tag = 16, adapter = "com.squareup.wire.proto3.java.all_types.AllTypes$NestedEnum#ADAPTER", label = WireField.Label.OMIT_IDENTITY, jsonName = "nestedEnum" ) public final NestedEnum nested_enum; @WireField( tag = 17, adapter = "com.squareup.wire.proto3.java.all_types.AllTypes$NestedMessage#ADAPTER", label = WireField.Label.OMIT_IDENTITY, jsonName = "nestedMessage" ) public final NestedMessage nested_message; @WireField( tag = 18, adapter = "com.squareup.wire.AnyMessage#ADAPTER", label = WireField.Label.OMIT_IDENTITY ) public final AnyMessage any; @WireField( tag = 19, adapter = "com.squareup.wire.ProtoAdapter#DURATION", label = WireField.Label.OMIT_IDENTITY ) public final Duration duration; @WireField( tag = 20, adapter = "com.squareup.wire.ProtoAdapter#STRUCT_MAP", label = WireField.Label.OMIT_IDENTITY ) public final Map<String, ?> struct; @WireField( tag = 21, adapter = "com.squareup.wire.ProtoAdapter#STRUCT_LIST", label = WireField.Label.OMIT_IDENTITY, jsonName = "listValue" ) public final List<?> list_value; @WireField( tag = 22, adapter = "com.squareup.wire.ProtoAdapter#STRUCT_VALUE", label = WireField.Label.OMIT_IDENTITY ) public final Object value; @WireField( tag = 23, adapter = "com.squareup.wire.ProtoAdapter#STRUCT_NULL", label = WireField.Label.OMIT_IDENTITY, jsonName = "nullValue" ) public final Void null_value; @WireField( tag = 24, adapter = "com.squareup.wire.ProtoAdapter#EMPTY", label = WireField.Label.OMIT_IDENTITY ) public final Unit empty; @WireField( tag = 25, adapter = "com.squareup.wire.ProtoAdapter#INSTANT", label = WireField.Label.OMIT_IDENTITY ) public final Instant timestamp; @WireField( tag = 101, adapter = "com.squareup.wire.ProtoAdapter#INT32", jsonName = "optInt32" ) public final Integer opt_int32; @WireField( tag = 102, adapter = "com.squareup.wire.ProtoAdapter#UINT32", jsonName = "optUint32" ) public final Integer opt_uint32; @WireField( tag = 103, adapter = "com.squareup.wire.ProtoAdapter#SINT32", jsonName = "optSint32" ) public final Integer opt_sint32; @WireField( tag = 104, adapter = "com.squareup.wire.ProtoAdapter#FIXED32", jsonName = "optFixed32" ) public final Integer opt_fixed32; @WireField( tag = 105, adapter = "com.squareup.wire.ProtoAdapter#SFIXED32", jsonName = "optSfixed32" ) public final Integer opt_sfixed32; @WireField( tag = 106, adapter = "com.squareup.wire.ProtoAdapter#INT64", jsonName = "optInt64" ) public final Long opt_int64; @WireField( tag = 107, adapter = "com.squareup.wire.ProtoAdapter#UINT64", jsonName = "optUint64" ) public final Long opt_uint64; @WireField( tag = 108, adapter = "com.squareup.wire.ProtoAdapter#SINT64", jsonName = "optSint64" ) public final Long opt_sint64; @WireField( tag = 109, adapter = "com.squareup.wire.ProtoAdapter#FIXED64", jsonName = "optFixed64" ) public final Long opt_fixed64; @WireField( tag = 110, adapter = "com.squareup.wire.ProtoAdapter#SFIXED64", jsonName = "optSfixed64" ) public final Long opt_sfixed64; @WireField( tag = 111, adapter = "com.squareup.wire.ProtoAdapter#BOOL", jsonName = "optBool" ) public final Boolean opt_bool; @WireField( tag = 112, adapter = "com.squareup.wire.ProtoAdapter#FLOAT", jsonName = "optFloat" ) public final Float opt_float; @WireField( tag = 113, adapter = "com.squareup.wire.ProtoAdapter#DOUBLE", jsonName = "optDouble" ) public final Double opt_double; @WireField( tag = 114, adapter = "com.squareup.wire.ProtoAdapter#STRING", jsonName = "optString" ) public final String opt_string; @WireField( tag = 115, adapter = "com.squareup.wire.ProtoAdapter#BYTES", jsonName = "optBytes" ) public final ByteString opt_bytes; @WireField( tag = 201, adapter = "com.squareup.wire.ProtoAdapter#INT32", label = WireField.Label.REPEATED, jsonName = "repInt32" ) public final List<Integer> rep_int32; @WireField( tag = 202, adapter = "com.squareup.wire.ProtoAdapter#UINT32", label = WireField.Label.REPEATED, jsonName = "repUint32" ) public final List<Integer> rep_uint32; @WireField( tag = 203, adapter = "com.squareup.wire.ProtoAdapter#SINT32", label = WireField.Label.REPEATED, jsonName = "repSint32" ) public final List<Integer> rep_sint32; @WireField( tag = 204, adapter = "com.squareup.wire.ProtoAdapter#FIXED32", label = WireField.Label.REPEATED, jsonName = "repFixed32" ) public final List<Integer> rep_fixed32; @WireField( tag = 205, adapter = "com.squareup.wire.ProtoAdapter#SFIXED32", label = WireField.Label.REPEATED, jsonName = "repSfixed32" ) public final List<Integer> rep_sfixed32; @WireField( tag = 206, adapter = "com.squareup.wire.ProtoAdapter#INT64", label = WireField.Label.REPEATED, jsonName = "repInt64" ) public final List<Long> rep_int64; @WireField( tag = 207, adapter = "com.squareup.wire.ProtoAdapter#UINT64", label = WireField.Label.REPEATED, jsonName = "repUint64" ) public final List<Long> rep_uint64; @WireField( tag = 208, adapter = "com.squareup.wire.ProtoAdapter#SINT64", label = WireField.Label.REPEATED, jsonName = "repSint64" ) public final List<Long> rep_sint64; @WireField( tag = 209, adapter = "com.squareup.wire.ProtoAdapter#FIXED64", label = WireField.Label.REPEATED, jsonName = "repFixed64" ) public final List<Long> rep_fixed64; @WireField( tag = 210, adapter = "com.squareup.wire.ProtoAdapter#SFIXED64", label = WireField.Label.REPEATED, jsonName = "repSfixed64" ) public final List<Long> rep_sfixed64; @WireField( tag = 211, adapter = "com.squareup.wire.ProtoAdapter#BOOL", label = WireField.Label.REPEATED, jsonName = "repBool" ) public final List<Boolean> rep_bool; @WireField( tag = 212, adapter = "com.squareup.wire.ProtoAdapter#FLOAT", label = WireField.Label.REPEATED, jsonName = "repFloat" ) public final List<Float> rep_float; @WireField( tag = 213, adapter = "com.squareup.wire.ProtoAdapter#DOUBLE", label = WireField.Label.REPEATED, jsonName = "repDouble" ) public final List<Double> rep_double; @WireField( tag = 214, adapter = "com.squareup.wire.ProtoAdapter#STRING", label = WireField.Label.REPEATED, jsonName = "repString" ) public final List<String> rep_string; @WireField( tag = 215, adapter = "com.squareup.wire.ProtoAdapter#BYTES", label = WireField.Label.REPEATED, jsonName = "repBytes" ) public final List<ByteString> rep_bytes; @WireField( tag = 216, adapter = "com.squareup.wire.proto3.java.all_types.AllTypes$NestedEnum#ADAPTER", label = WireField.Label.REPEATED, jsonName = "repNestedEnum" ) public final List<NestedEnum> rep_nested_enum; @WireField( tag = 217, adapter = "com.squareup.wire.proto3.java.all_types.AllTypes$NestedMessage#ADAPTER", label = WireField.Label.REPEATED, jsonName = "repNestedMessage" ) public final List<NestedMessage> rep_nested_message; @WireField( tag = 218, adapter = "com.squareup.wire.AnyMessage#ADAPTER", label = WireField.Label.REPEATED, jsonName = "repAny" ) public final List<AnyMessage> rep_any; @WireField( tag = 219, adapter = "com.squareup.wire.ProtoAdapter#DURATION", label = WireField.Label.REPEATED, jsonName = "repDuration" ) public final List<Duration> rep_duration; @WireField( tag = 220, adapter = "com.squareup.wire.ProtoAdapter#STRUCT_MAP", label = WireField.Label.REPEATED, jsonName = "repStruct" ) public final List<Map<String, ?>> rep_struct; @WireField( tag = 221, adapter = "com.squareup.wire.ProtoAdapter#STRUCT_LIST", label = WireField.Label.REPEATED, jsonName = "repListValue" ) public final List<List<?>> rep_list_value; @WireField( tag = 222, adapter = "com.squareup.wire.ProtoAdapter#STRUCT_VALUE", label = WireField.Label.REPEATED, jsonName = "repValue" ) public final List<Object> rep_value; @WireField( tag = 223, adapter = "com.squareup.wire.ProtoAdapter#STRUCT_NULL", label = WireField.Label.REPEATED, jsonName = "repNullValue" ) public final List<Void> rep_null_value; @WireField( tag = 224, adapter = "com.squareup.wire.ProtoAdapter#EMPTY", label = WireField.Label.REPEATED, jsonName = "repEmpty" ) public final List<Unit> rep_empty; @WireField( tag = 225, adapter = "com.squareup.wire.ProtoAdapter#INSTANT", label = WireField.Label.REPEATED, jsonName = "repTimestamp" ) public final List<Instant> rep_timestamp; @WireField( tag = 301, adapter = "com.squareup.wire.ProtoAdapter#INT32", label = WireField.Label.PACKED, jsonName = "packInt32" ) public final List<Integer> pack_int32; @WireField( tag = 302, adapter = "com.squareup.wire.ProtoAdapter#UINT32", label = WireField.Label.PACKED, jsonName = "packUint32" ) public final List<Integer> pack_uint32; @WireField( tag = 303, adapter = "com.squareup.wire.ProtoAdapter#SINT32", label = WireField.Label.PACKED, jsonName = "packSint32" ) public final List<Integer> pack_sint32; @WireField( tag = 304, adapter = "com.squareup.wire.ProtoAdapter#FIXED32", label = WireField.Label.PACKED, jsonName = "packFixed32" ) public final List<Integer> pack_fixed32; @WireField( tag = 305, adapter = "com.squareup.wire.ProtoAdapter#SFIXED32", label = WireField.Label.PACKED, jsonName = "packSfixed32" ) public final List<Integer> pack_sfixed32; @WireField( tag = 306, adapter = "com.squareup.wire.ProtoAdapter#INT64", label = WireField.Label.PACKED, jsonName = "packInt64" ) public final List<Long> pack_int64; @WireField( tag = 307, adapter = "com.squareup.wire.ProtoAdapter#UINT64", label = WireField.Label.PACKED, jsonName = "packUint64" ) public final List<Long> pack_uint64; @WireField( tag = 308, adapter = "com.squareup.wire.ProtoAdapter#SINT64", label = WireField.Label.PACKED, jsonName = "packSint64" ) public final List<Long> pack_sint64; @WireField( tag = 309, adapter = "com.squareup.wire.ProtoAdapter#FIXED64", label = WireField.Label.PACKED, jsonName = "packFixed64" ) public final List<Long> pack_fixed64; @WireField( tag = 310, adapter = "com.squareup.wire.ProtoAdapter#SFIXED64", label = WireField.Label.PACKED, jsonName = "packSfixed64" ) public final List<Long> pack_sfixed64; @WireField( tag = 311, adapter = "com.squareup.wire.ProtoAdapter#BOOL", label = WireField.Label.PACKED, jsonName = "packBool" ) public final List<Boolean> pack_bool; @WireField( tag = 312, adapter = "com.squareup.wire.ProtoAdapter#FLOAT", label = WireField.Label.PACKED, jsonName = "packFloat" ) public final List<Float> pack_float; @WireField( tag = 313, adapter = "com.squareup.wire.ProtoAdapter#DOUBLE", label = WireField.Label.PACKED, jsonName = "packDouble" ) public final List<Double> pack_double; @WireField( tag = 316, adapter = "com.squareup.wire.proto3.java.all_types.AllTypes$NestedEnum#ADAPTER", label = WireField.Label.PACKED, jsonName = "packNestedEnum" ) public final List<NestedEnum> pack_nested_enum; @WireField( tag = 323, adapter = "com.squareup.wire.ProtoAdapter#STRUCT_NULL", label = WireField.Label.PACKED, jsonName = "packNullValue" ) public final List<Void> pack_null_value; @WireField( tag = 501, keyAdapter = "com.squareup.wire.ProtoAdapter#INT32", adapter = "com.squareup.wire.ProtoAdapter#INT32", jsonName = "mapInt32Int32" ) public final Map<Integer, Integer> map_int32_int32; @WireField( tag = 502, keyAdapter = "com.squareup.wire.ProtoAdapter#STRING", adapter = "com.squareup.wire.ProtoAdapter#STRING", jsonName = "mapStringString" ) public final Map<String, String> map_string_string; @WireField( tag = 503, keyAdapter = "com.squareup.wire.ProtoAdapter#STRING", adapter = "com.squareup.wire.proto3.java.all_types.AllTypes$NestedMessage#ADAPTER", jsonName = "mapStringMessage" ) public final Map<String, NestedMessage> map_string_message; @WireField( tag = 504, keyAdapter = "com.squareup.wire.ProtoAdapter#STRING", adapter = "com.squareup.wire.proto3.java.all_types.AllTypes$NestedEnum#ADAPTER", jsonName = "mapStringEnum" ) public final Map<String, NestedEnum> map_string_enum; @WireField( tag = 518, keyAdapter = "com.squareup.wire.ProtoAdapter#INT32", adapter = "com.squareup.wire.AnyMessage#ADAPTER", jsonName = "mapInt32Any" ) public final Map<Integer, AnyMessage> map_int32_any; @WireField( tag = 519, keyAdapter = "com.squareup.wire.ProtoAdapter#INT32", adapter = "com.squareup.wire.ProtoAdapter#DURATION", jsonName = "mapInt32Duration" ) public final Map<Integer, Duration> map_int32_duration; @WireField( tag = 520, keyAdapter = "com.squareup.wire.ProtoAdapter#INT32", adapter = "com.squareup.wire.ProtoAdapter#STRUCT_MAP", jsonName = "mapInt32Struct" ) public final Map<Integer, Map<String, ?>> map_int32_struct; @WireField( tag = 521, keyAdapter = "com.squareup.wire.ProtoAdapter#INT32", adapter = "com.squareup.wire.ProtoAdapter#STRUCT_LIST", jsonName = "mapInt32ListValue" ) public final Map<Integer, List<?>> map_int32_list_value; @WireField( tag = 522, keyAdapter = "com.squareup.wire.ProtoAdapter#INT32", adapter = "com.squareup.wire.ProtoAdapter#STRUCT_VALUE", jsonName = "mapInt32Value" ) public final Map<Integer, Object> map_int32_value; @WireField( tag = 523, keyAdapter = "com.squareup.wire.ProtoAdapter#INT32", adapter = "com.squareup.wire.ProtoAdapter#STRUCT_NULL", jsonName = "mapInt32NullValue" ) public final Map<Integer, Void> map_int32_null_value; @WireField( tag = 524, keyAdapter = "com.squareup.wire.ProtoAdapter#INT32", adapter = "com.squareup.wire.ProtoAdapter#EMPTY", jsonName = "mapInt32Empty" ) public final Map<Integer, Unit> map_int32_empty; @WireField( tag = 525, keyAdapter = "com.squareup.wire.ProtoAdapter#INT32", adapter = "com.squareup.wire.ProtoAdapter#INSTANT", jsonName = "mapInt32Timestamp" ) public final Map<Integer, Instant> map_int32_timestamp; @WireField( tag = 601, adapter = "com.squareup.wire.ProtoAdapter#STRING", jsonName = "oneofString", oneofName = "choice" ) public final String oneof_string; @WireField( tag = 602, adapter = "com.squareup.wire.ProtoAdapter#INT32", jsonName = "oneofInt32", oneofName = "choice" ) public final Integer oneof_int32; @WireField( tag = 603, adapter = "com.squareup.wire.proto3.java.all_types.AllTypes$NestedMessage#ADAPTER", jsonName = "oneofNestedMessage", oneofName = "choice" ) public final NestedMessage oneof_nested_message; @WireField( tag = 618, adapter = "com.squareup.wire.AnyMessage#ADAPTER", jsonName = "oneofAny", oneofName = "choice" ) public final AnyMessage oneof_any; @WireField( tag = 619, adapter = "com.squareup.wire.ProtoAdapter#DURATION", jsonName = "oneofDuration", oneofName = "choice" ) public final Duration oneof_duration; @WireField( tag = 620, adapter = "com.squareup.wire.ProtoAdapter#STRUCT_MAP", jsonName = "oneofStruct", oneofName = "choice" ) public final Map<String, ?> oneof_struct; @WireField( tag = 621, adapter = "com.squareup.wire.ProtoAdapter#STRUCT_LIST", jsonName = "oneofListValue", oneofName = "choice" ) public final List<?> oneof_list_value; /** * google.protobuf.Value oneof_value = 622; * google.protobuf.NullValue oneof_null_value = 623; */ @WireField( tag = 624, adapter = "com.squareup.wire.ProtoAdapter#EMPTY", jsonName = "oneofEmpty", oneofName = "choice" ) public final Unit oneof_empty; @WireField( tag = 625, adapter = "com.squareup.wire.ProtoAdapter#INSTANT", jsonName = "oneofTimestamp", oneofName = "choice" ) public final Instant oneof_timestamp; public AllTypes(Builder builder, ByteString unknownFields) { super(ADAPTER, unknownFields); if (Internal.countNonNull(builder.oneof_string, builder.oneof_int32, builder.oneof_nested_message, builder.oneof_any, builder.oneof_duration, builder.oneof_struct, builder.oneof_list_value, builder.oneof_empty, builder.oneof_timestamp) > 1) { throw new IllegalArgumentException("at most one of builder.oneof_string, builder.oneof_int32, builder.oneof_nested_message, builder.oneof_any, builder.oneof_duration, builder.oneof_struct, builder.oneof_list_value, builder.oneof_empty, builder.oneof_timestamp may be non-null"); } this.int32 = builder.int32; this.uint32 = builder.uint32; this.sint32 = builder.sint32; this.fixed32 = builder.fixed32; this.sfixed32 = builder.sfixed32; this.int64 = builder.int64; this.uint64 = builder.uint64; this.sint64 = builder.sint64; this.fixed64 = builder.fixed64; this.sfixed64 = builder.sfixed64; this.bool = builder.bool; this.float_ = builder.float_; this.double_ = builder.double_; if (builder.string == null) { throw new IllegalArgumentException("builder.string == null"); } this.string = builder.string; if (builder.bytes == null) { throw new IllegalArgumentException("builder.bytes == null"); } this.bytes = builder.bytes; if (builder.nested_enum == null) { throw new IllegalArgumentException("builder.nested_enum == null"); } this.nested_enum = builder.nested_enum; this.nested_message = builder.nested_message; this.any = builder.any; this.duration = builder.duration; this.struct = Internal.immutableCopyOfStruct("struct", builder.struct); this.list_value = Internal.immutableCopyOfStruct("list_value", builder.list_value); this.value = Internal.immutableCopyOfStruct("value", builder.value); this.null_value = Internal.immutableCopyOfStruct("null_value", builder.null_value); this.empty = builder.empty; this.timestamp = builder.timestamp; this.opt_int32 = builder.opt_int32; this.opt_uint32 = builder.opt_uint32; this.opt_sint32 = builder.opt_sint32; this.opt_fixed32 = builder.opt_fixed32; this.opt_sfixed32 = builder.opt_sfixed32; this.opt_int64 = builder.opt_int64; this.opt_uint64 = builder.opt_uint64; this.opt_sint64 = builder.opt_sint64; this.opt_fixed64 = builder.opt_fixed64; this.opt_sfixed64 = builder.opt_sfixed64; this.opt_bool = builder.opt_bool; this.opt_float = builder.opt_float; this.opt_double = builder.opt_double; this.opt_string = builder.opt_string; this.opt_bytes = builder.opt_bytes; this.rep_int32 = Internal.immutableCopyOf("rep_int32", builder.rep_int32); this.rep_uint32 = Internal.immutableCopyOf("rep_uint32", builder.rep_uint32); this.rep_sint32 = Internal.immutableCopyOf("rep_sint32", builder.rep_sint32); this.rep_fixed32 = Internal.immutableCopyOf("rep_fixed32", builder.rep_fixed32); this.rep_sfixed32 = Internal.immutableCopyOf("rep_sfixed32", builder.rep_sfixed32); this.rep_int64 = Internal.immutableCopyOf("rep_int64", builder.rep_int64); this.rep_uint64 = Internal.immutableCopyOf("rep_uint64", builder.rep_uint64); this.rep_sint64 = Internal.immutableCopyOf("rep_sint64", builder.rep_sint64); this.rep_fixed64 = Internal.immutableCopyOf("rep_fixed64", builder.rep_fixed64); this.rep_sfixed64 = Internal.immutableCopyOf("rep_sfixed64", builder.rep_sfixed64); this.rep_bool = Internal.immutableCopyOf("rep_bool", builder.rep_bool); this.rep_float = Internal.immutableCopyOf("rep_float", builder.rep_float); this.rep_double = Internal.immutableCopyOf("rep_double", builder.rep_double); this.rep_string = Internal.immutableCopyOf("rep_string", builder.rep_string); this.rep_bytes = Internal.immutableCopyOf("rep_bytes", builder.rep_bytes); this.rep_nested_enum = Internal.immutableCopyOf("rep_nested_enum", builder.rep_nested_enum); this.rep_nested_message = Internal.immutableCopyOf("rep_nested_message", builder.rep_nested_message); this.rep_any = Internal.immutableCopyOf("rep_any", builder.rep_any); this.rep_duration = Internal.immutableCopyOf("rep_duration", builder.rep_duration); this.rep_struct = Internal.immutableCopyOfStruct("rep_struct", builder.rep_struct); this.rep_list_value = Internal.immutableCopyOfStruct("rep_list_value", builder.rep_list_value); this.rep_value = Internal.immutableCopyOfStruct("rep_value", builder.rep_value); this.rep_null_value = Internal.immutableCopyOfStruct("rep_null_value", builder.rep_null_value); this.rep_empty = Internal.immutableCopyOf("rep_empty", builder.rep_empty); this.rep_timestamp = Internal.immutableCopyOf("rep_timestamp", builder.rep_timestamp); this.pack_int32 = Internal.immutableCopyOf("pack_int32", builder.pack_int32); this.pack_uint32 = Internal.immutableCopyOf("pack_uint32", builder.pack_uint32); this.pack_sint32 = Internal.immutableCopyOf("pack_sint32", builder.pack_sint32); this.pack_fixed32 = Internal.immutableCopyOf("pack_fixed32", builder.pack_fixed32); this.pack_sfixed32 = Internal.immutableCopyOf("pack_sfixed32", builder.pack_sfixed32); this.pack_int64 = Internal.immutableCopyOf("pack_int64", builder.pack_int64); this.pack_uint64 = Internal.immutableCopyOf("pack_uint64", builder.pack_uint64); this.pack_sint64 = Internal.immutableCopyOf("pack_sint64", builder.pack_sint64); this.pack_fixed64 = Internal.immutableCopyOf("pack_fixed64", builder.pack_fixed64); this.pack_sfixed64 = Internal.immutableCopyOf("pack_sfixed64", builder.pack_sfixed64); this.pack_bool = Internal.immutableCopyOf("pack_bool", builder.pack_bool); this.pack_float = Internal.immutableCopyOf("pack_float", builder.pack_float); this.pack_double = Internal.immutableCopyOf("pack_double", builder.pack_double); this.pack_nested_enum = Internal.immutableCopyOf("pack_nested_enum", builder.pack_nested_enum); this.pack_null_value = Internal.immutableCopyOfStruct("pack_null_value", builder.pack_null_value); this.map_int32_int32 = Internal.immutableCopyOf("map_int32_int32", builder.map_int32_int32); this.map_string_string = Internal.immutableCopyOf("map_string_string", builder.map_string_string); this.map_string_message = Internal.immutableCopyOf("map_string_message", builder.map_string_message); this.map_string_enum = Internal.immutableCopyOf("map_string_enum", builder.map_string_enum); this.map_int32_any = Internal.immutableCopyOf("map_int32_any", builder.map_int32_any); this.map_int32_duration = Internal.immutableCopyOf("map_int32_duration", builder.map_int32_duration); this.map_int32_struct = Internal.immutableCopyOfMapWithStructValues("map_int32_struct", builder.map_int32_struct); this.map_int32_list_value = Internal.immutableCopyOfMapWithStructValues("map_int32_list_value", builder.map_int32_list_value); this.map_int32_value = Internal.immutableCopyOfMapWithStructValues("map_int32_value", builder.map_int32_value); this.map_int32_null_value = Internal.immutableCopyOfMapWithStructValues("map_int32_null_value", builder.map_int32_null_value); this.map_int32_empty = Internal.immutableCopyOf("map_int32_empty", builder.map_int32_empty); this.map_int32_timestamp = Internal.immutableCopyOf("map_int32_timestamp", builder.map_int32_timestamp); this.oneof_string = builder.oneof_string; this.oneof_int32 = builder.oneof_int32; this.oneof_nested_message = builder.oneof_nested_message; this.oneof_any = builder.oneof_any; this.oneof_duration = builder.oneof_duration; this.oneof_struct = Internal.immutableCopyOfStruct("oneof_struct", builder.oneof_struct); this.oneof_list_value = Internal.immutableCopyOfStruct("oneof_list_value", builder.oneof_list_value); this.oneof_empty = builder.oneof_empty; this.oneof_timestamp = builder.oneof_timestamp; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.int32 = int32; builder.uint32 = uint32; builder.sint32 = sint32; builder.fixed32 = fixed32; builder.sfixed32 = sfixed32; builder.int64 = int64; builder.uint64 = uint64; builder.sint64 = sint64; builder.fixed64 = fixed64; builder.sfixed64 = sfixed64; builder.bool = bool; builder.float_ = float_; builder.double_ = double_; builder.string = string; builder.bytes = bytes; builder.nested_enum = nested_enum; builder.nested_message = nested_message; builder.any = any; builder.duration = duration; builder.struct = struct; builder.list_value = list_value; builder.value = value; builder.null_value = null_value; builder.empty = empty; builder.timestamp = timestamp; builder.opt_int32 = opt_int32; builder.opt_uint32 = opt_uint32; builder.opt_sint32 = opt_sint32; builder.opt_fixed32 = opt_fixed32; builder.opt_sfixed32 = opt_sfixed32; builder.opt_int64 = opt_int64; builder.opt_uint64 = opt_uint64; builder.opt_sint64 = opt_sint64; builder.opt_fixed64 = opt_fixed64; builder.opt_sfixed64 = opt_sfixed64; builder.opt_bool = opt_bool; builder.opt_float = opt_float; builder.opt_double = opt_double; builder.opt_string = opt_string; builder.opt_bytes = opt_bytes; builder.rep_int32 = Internal.copyOf(rep_int32); builder.rep_uint32 = Internal.copyOf(rep_uint32); builder.rep_sint32 = Internal.copyOf(rep_sint32); builder.rep_fixed32 = Internal.copyOf(rep_fixed32); builder.rep_sfixed32 = Internal.copyOf(rep_sfixed32); builder.rep_int64 = Internal.copyOf(rep_int64); builder.rep_uint64 = Internal.copyOf(rep_uint64); builder.rep_sint64 = Internal.copyOf(rep_sint64); builder.rep_fixed64 = Internal.copyOf(rep_fixed64); builder.rep_sfixed64 = Internal.copyOf(rep_sfixed64); builder.rep_bool = Internal.copyOf(rep_bool); builder.rep_float = Internal.copyOf(rep_float); builder.rep_double = Internal.copyOf(rep_double); builder.rep_string = Internal.copyOf(rep_string); builder.rep_bytes = Internal.copyOf(rep_bytes); builder.rep_nested_enum = Internal.copyOf(rep_nested_enum); builder.rep_nested_message = Internal.copyOf(rep_nested_message); builder.rep_any = Internal.copyOf(rep_any); builder.rep_duration = Internal.copyOf(rep_duration); builder.rep_struct = Internal.copyOf(rep_struct); builder.rep_list_value = Internal.copyOf(rep_list_value); builder.rep_value = Internal.copyOf(rep_value); builder.rep_null_value = Internal.copyOf(rep_null_value); builder.rep_empty = Internal.copyOf(rep_empty); builder.rep_timestamp = Internal.copyOf(rep_timestamp); builder.pack_int32 = Internal.copyOf(pack_int32); builder.pack_uint32 = Internal.copyOf(pack_uint32); builder.pack_sint32 = Internal.copyOf(pack_sint32); builder.pack_fixed32 = Internal.copyOf(pack_fixed32); builder.pack_sfixed32 = Internal.copyOf(pack_sfixed32); builder.pack_int64 = Internal.copyOf(pack_int64); builder.pack_uint64 = Internal.copyOf(pack_uint64); builder.pack_sint64 = Internal.copyOf(pack_sint64); builder.pack_fixed64 = Internal.copyOf(pack_fixed64); builder.pack_sfixed64 = Internal.copyOf(pack_sfixed64); builder.pack_bool = Internal.copyOf(pack_bool); builder.pack_float = Internal.copyOf(pack_float); builder.pack_double = Internal.copyOf(pack_double); builder.pack_nested_enum = Internal.copyOf(pack_nested_enum); builder.pack_null_value = Internal.copyOf(pack_null_value); builder.map_int32_int32 = Internal.copyOf(map_int32_int32); builder.map_string_string = Internal.copyOf(map_string_string); builder.map_string_message = Internal.copyOf(map_string_message); builder.map_string_enum = Internal.copyOf(map_string_enum); builder.map_int32_any = Internal.copyOf(map_int32_any); builder.map_int32_duration = Internal.copyOf(map_int32_duration); builder.map_int32_struct = Internal.copyOf(map_int32_struct); builder.map_int32_list_value = Internal.copyOf(map_int32_list_value); builder.map_int32_value = Internal.copyOf(map_int32_value); builder.map_int32_null_value = Internal.copyOf(map_int32_null_value); builder.map_int32_empty = Internal.copyOf(map_int32_empty); builder.map_int32_timestamp = Internal.copyOf(map_int32_timestamp); builder.oneof_string = oneof_string; builder.oneof_int32 = oneof_int32; builder.oneof_nested_message = oneof_nested_message; builder.oneof_any = oneof_any; builder.oneof_duration = oneof_duration; builder.oneof_struct = oneof_struct; builder.oneof_list_value = oneof_list_value; builder.oneof_empty = oneof_empty; builder.oneof_timestamp = oneof_timestamp; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof AllTypes)) return false; AllTypes o = (AllTypes) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(int32, o.int32) && Internal.equals(uint32, o.uint32) && Internal.equals(sint32, o.sint32) && Internal.equals(fixed32, o.fixed32) && Internal.equals(sfixed32, o.sfixed32) && Internal.equals(int64, o.int64) && Internal.equals(uint64, o.uint64) && Internal.equals(sint64, o.sint64) && Internal.equals(fixed64, o.fixed64) && Internal.equals(sfixed64, o.sfixed64) && Internal.equals(bool, o.bool) && Internal.equals(float_, o.float_) && Internal.equals(double_, o.double_) && Internal.equals(string, o.string) && Internal.equals(bytes, o.bytes) && Internal.equals(nested_enum, o.nested_enum) && Internal.equals(nested_message, o.nested_message) && Internal.equals(any, o.any) && Internal.equals(duration, o.duration) && Internal.equals(struct, o.struct) && Internal.equals(list_value, o.list_value) && Internal.equals(value, o.value) && Internal.equals(null_value, o.null_value) && Internal.equals(empty, o.empty) && Internal.equals(timestamp, o.timestamp) && Internal.equals(opt_int32, o.opt_int32) && Internal.equals(opt_uint32, o.opt_uint32) && Internal.equals(opt_sint32, o.opt_sint32) && Internal.equals(opt_fixed32, o.opt_fixed32) && Internal.equals(opt_sfixed32, o.opt_sfixed32) && Internal.equals(opt_int64, o.opt_int64) && Internal.equals(opt_uint64, o.opt_uint64) && Internal.equals(opt_sint64, o.opt_sint64) && Internal.equals(opt_fixed64, o.opt_fixed64) && Internal.equals(opt_sfixed64, o.opt_sfixed64) && Internal.equals(opt_bool, o.opt_bool) && Internal.equals(opt_float, o.opt_float) && Internal.equals(opt_double, o.opt_double) && Internal.equals(opt_string, o.opt_string) && Internal.equals(opt_bytes, o.opt_bytes) && rep_int32.equals(o.rep_int32) && rep_uint32.equals(o.rep_uint32) && rep_sint32.equals(o.rep_sint32) && rep_fixed32.equals(o.rep_fixed32) && rep_sfixed32.equals(o.rep_sfixed32) && rep_int64.equals(o.rep_int64) && rep_uint64.equals(o.rep_uint64) && rep_sint64.equals(o.rep_sint64) && rep_fixed64.equals(o.rep_fixed64) && rep_sfixed64.equals(o.rep_sfixed64) && rep_bool.equals(o.rep_bool) && rep_float.equals(o.rep_float) && rep_double.equals(o.rep_double) && rep_string.equals(o.rep_string) && rep_bytes.equals(o.rep_bytes) && rep_nested_enum.equals(o.rep_nested_enum) && rep_nested_message.equals(o.rep_nested_message) && rep_any.equals(o.rep_any) && rep_duration.equals(o.rep_duration) && rep_struct.equals(o.rep_struct) && rep_list_value.equals(o.rep_list_value) && rep_value.equals(o.rep_value) && rep_null_value.equals(o.rep_null_value) && rep_empty.equals(o.rep_empty) && rep_timestamp.equals(o.rep_timestamp) && pack_int32.equals(o.pack_int32) && pack_uint32.equals(o.pack_uint32) && pack_sint32.equals(o.pack_sint32) && pack_fixed32.equals(o.pack_fixed32) && pack_sfixed32.equals(o.pack_sfixed32) && pack_int64.equals(o.pack_int64) && pack_uint64.equals(o.pack_uint64) && pack_sint64.equals(o.pack_sint64) && pack_fixed64.equals(o.pack_fixed64) && pack_sfixed64.equals(o.pack_sfixed64) && pack_bool.equals(o.pack_bool) && pack_float.equals(o.pack_float) && pack_double.equals(o.pack_double) && pack_nested_enum.equals(o.pack_nested_enum) && pack_null_value.equals(o.pack_null_value) && map_int32_int32.equals(o.map_int32_int32) && map_string_string.equals(o.map_string_string) && map_string_message.equals(o.map_string_message) && map_string_enum.equals(o.map_string_enum) && map_int32_any.equals(o.map_int32_any) && map_int32_duration.equals(o.map_int32_duration) && map_int32_struct.equals(o.map_int32_struct) && map_int32_list_value.equals(o.map_int32_list_value) && map_int32_value.equals(o.map_int32_value) && map_int32_null_value.equals(o.map_int32_null_value) && map_int32_empty.equals(o.map_int32_empty) && map_int32_timestamp.equals(o.map_int32_timestamp) && Internal.equals(oneof_string, o.oneof_string) && Internal.equals(oneof_int32, o.oneof_int32) && Internal.equals(oneof_nested_message, o.oneof_nested_message) && Internal.equals(oneof_any, o.oneof_any) && Internal.equals(oneof_duration, o.oneof_duration) && Internal.equals(oneof_struct, o.oneof_struct) && Internal.equals(oneof_list_value, o.oneof_list_value) && Internal.equals(oneof_empty, o.oneof_empty) && Internal.equals(oneof_timestamp, o.oneof_timestamp); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + Integer.hashCode(int32); result = result * 37 + Integer.hashCode(uint32); result = result * 37 + Integer.hashCode(sint32); result = result * 37 + Integer.hashCode(fixed32); result = result * 37 + Integer.hashCode(sfixed32); result = result * 37 + Long.hashCode(int64); result = result * 37 + Long.hashCode(uint64); result = result * 37 + Long.hashCode(sint64); result = result * 37 + Long.hashCode(fixed64); result = result * 37 + Long.hashCode(sfixed64); result = result * 37 + Boolean.hashCode(bool); result = result * 37 + Float.hashCode(float_); result = result * 37 + Double.hashCode(double_); result = result * 37 + (string != null ? string.hashCode() : 0); result = result * 37 + (bytes != null ? bytes.hashCode() : 0); result = result * 37 + (nested_enum != null ? nested_enum.hashCode() : 0); result = result * 37 + (nested_message != null ? nested_message.hashCode() : 0); result = result * 37 + (any != null ? any.hashCode() : 0); result = result * 37 + (duration != null ? duration.hashCode() : 0); result = result * 37 + (struct != null ? struct.hashCode() : 0); result = result * 37 + (list_value != null ? list_value.hashCode() : 0); result = result * 37 + (value != null ? value.hashCode() : 0); result = result * 37 + (null_value != null ? null_value.hashCode() : 0); result = result * 37 + (empty != null ? empty.hashCode() : 0); result = result * 37 + (timestamp != null ? timestamp.hashCode() : 0); result = result * 37 + (opt_int32 != null ? opt_int32.hashCode() : 0); result = result * 37 + (opt_uint32 != null ? opt_uint32.hashCode() : 0); result = result * 37 + (opt_sint32 != null ? opt_sint32.hashCode() : 0); result = result * 37 + (opt_fixed32 != null ? opt_fixed32.hashCode() : 0); result = result * 37 + (opt_sfixed32 != null ? opt_sfixed32.hashCode() : 0); result = result * 37 + (opt_int64 != null ? opt_int64.hashCode() : 0); result = result * 37 + (opt_uint64 != null ? opt_uint64.hashCode() : 0); result = result * 37 + (opt_sint64 != null ? opt_sint64.hashCode() : 0); result = result * 37 + (opt_fixed64 != null ? opt_fixed64.hashCode() : 0); result = result * 37 + (opt_sfixed64 != null ? opt_sfixed64.hashCode() : 0); result = result * 37 + (opt_bool != null ? opt_bool.hashCode() : 0); result = result * 37 + (opt_float != null ? opt_float.hashCode() : 0); result = result * 37 + (opt_double != null ? opt_double.hashCode() : 0); result = result * 37 + (opt_string != null ? opt_string.hashCode() : 0); result = result * 37 + (opt_bytes != null ? opt_bytes.hashCode() : 0); result = result * 37 + rep_int32.hashCode(); result = result * 37 + rep_uint32.hashCode(); result = result * 37 + rep_sint32.hashCode(); result = result * 37 + rep_fixed32.hashCode(); result = result * 37 + rep_sfixed32.hashCode(); result = result * 37 + rep_int64.hashCode(); result = result * 37 + rep_uint64.hashCode(); result = result * 37 + rep_sint64.hashCode(); result = result * 37 + rep_fixed64.hashCode(); result = result * 37 + rep_sfixed64.hashCode(); result = result * 37 + rep_bool.hashCode(); result = result * 37 + rep_float.hashCode(); result = result * 37 + rep_double.hashCode(); result = result * 37 + rep_string.hashCode(); result = result * 37 + rep_bytes.hashCode(); result = result * 37 + rep_nested_enum.hashCode(); result = result * 37 + rep_nested_message.hashCode(); result = result * 37 + rep_any.hashCode(); result = result * 37 + rep_duration.hashCode(); result = result * 37 + rep_struct.hashCode(); result = result * 37 + rep_list_value.hashCode(); result = result * 37 + rep_value.hashCode(); result = result * 37 + rep_null_value.hashCode(); result = result * 37 + rep_empty.hashCode(); result = result * 37 + rep_timestamp.hashCode(); result = result * 37 + pack_int32.hashCode(); result = result * 37 + pack_uint32.hashCode(); result = result * 37 + pack_sint32.hashCode(); result = result * 37 + pack_fixed32.hashCode(); result = result * 37 + pack_sfixed32.hashCode(); result = result * 37 + pack_int64.hashCode(); result = result * 37 + pack_uint64.hashCode(); result = result * 37 + pack_sint64.hashCode(); result = result * 37 + pack_fixed64.hashCode(); result = result * 37 + pack_sfixed64.hashCode(); result = result * 37 + pack_bool.hashCode(); result = result * 37 + pack_float.hashCode(); result = result * 37 + pack_double.hashCode(); result = result * 37 + pack_nested_enum.hashCode(); result = result * 37 + pack_null_value.hashCode(); result = result * 37 + map_int32_int32.hashCode(); result = result * 37 + map_string_string.hashCode(); result = result * 37 + map_string_message.hashCode(); result = result * 37 + map_string_enum.hashCode(); result = result * 37 + map_int32_any.hashCode(); result = result * 37 + map_int32_duration.hashCode(); result = result * 37 + map_int32_struct.hashCode(); result = result * 37 + map_int32_list_value.hashCode(); result = result * 37 + map_int32_value.hashCode(); result = result * 37 + map_int32_null_value.hashCode(); result = result * 37 + map_int32_empty.hashCode(); result = result * 37 + map_int32_timestamp.hashCode(); result = result * 37 + (oneof_string != null ? oneof_string.hashCode() : 0); result = result * 37 + (oneof_int32 != null ? oneof_int32.hashCode() : 0); result = result * 37 + (oneof_nested_message != null ? oneof_nested_message.hashCode() : 0); result = result * 37 + (oneof_any != null ? oneof_any.hashCode() : 0); result = result * 37 + (oneof_duration != null ? oneof_duration.hashCode() : 0); result = result * 37 + (oneof_struct != null ? oneof_struct.hashCode() : 0); result = result * 37 + (oneof_list_value != null ? oneof_list_value.hashCode() : 0); result = result * 37 + (oneof_empty != null ? oneof_empty.hashCode() : 0); result = result * 37 + (oneof_timestamp != null ? oneof_timestamp.hashCode() : 0); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append(", int32=").append(int32); builder.append(", uint32=").append(uint32); builder.append(", sint32=").append(sint32); builder.append(", fixed32=").append(fixed32); builder.append(", sfixed32=").append(sfixed32); builder.append(", int64=").append(int64); builder.append(", uint64=").append(uint64); builder.append(", sint64=").append(sint64); builder.append(", fixed64=").append(fixed64); builder.append(", sfixed64=").append(sfixed64); builder.append(", bool=").append(bool); builder.append(", float=").append(float_); builder.append(", double=").append(double_); if (string != null) builder.append(", string=").append(Internal.sanitize(string)); if (bytes != null) builder.append(", bytes=").append(bytes); if (nested_enum != null) builder.append(", nested_enum=").append(nested_enum); if (nested_message != null) builder.append(", nested_message=").append(nested_message); if (any != null) builder.append(", any=").append(any); if (duration != null) builder.append(", duration=").append(duration); if (struct != null) builder.append(", struct=").append(struct); if (list_value != null) builder.append(", list_value=").append(list_value); if (value != null) builder.append(", value=").append(value); if (null_value != null) builder.append(", null_value=").append(null_value); if (empty != null) builder.append(", empty=").append(empty); if (timestamp != null) builder.append(", timestamp=").append(timestamp); if (opt_int32 != null) builder.append(", opt_int32=").append(opt_int32); if (opt_uint32 != null) builder.append(", opt_uint32=").append(opt_uint32); if (opt_sint32 != null) builder.append(", opt_sint32=").append(opt_sint32); if (opt_fixed32 != null) builder.append(", opt_fixed32=").append(opt_fixed32); if (opt_sfixed32 != null) builder.append(", opt_sfixed32=").append(opt_sfixed32); if (opt_int64 != null) builder.append(", opt_int64=").append(opt_int64); if (opt_uint64 != null) builder.append(", opt_uint64=").append(opt_uint64); if (opt_sint64 != null) builder.append(", opt_sint64=").append(opt_sint64); if (opt_fixed64 != null) builder.append(", opt_fixed64=").append(opt_fixed64); if (opt_sfixed64 != null) builder.append(", opt_sfixed64=").append(opt_sfixed64); if (opt_bool != null) builder.append(", opt_bool=").append(opt_bool); if (opt_float != null) builder.append(", opt_float=").append(opt_float); if (opt_double != null) builder.append(", opt_double=").append(opt_double); if (opt_string != null) builder.append(", opt_string=").append(Internal.sanitize(opt_string)); if (opt_bytes != null) builder.append(", opt_bytes=").append(opt_bytes); if (!rep_int32.isEmpty()) builder.append(", rep_int32=").append(rep_int32); if (!rep_uint32.isEmpty()) builder.append(", rep_uint32=").append(rep_uint32); if (!rep_sint32.isEmpty()) builder.append(", rep_sint32=").append(rep_sint32); if (!rep_fixed32.isEmpty()) builder.append(", rep_fixed32=").append(rep_fixed32); if (!rep_sfixed32.isEmpty()) builder.append(", rep_sfixed32=").append(rep_sfixed32); if (!rep_int64.isEmpty()) builder.append(", rep_int64=").append(rep_int64); if (!rep_uint64.isEmpty()) builder.append(", rep_uint64=").append(rep_uint64); if (!rep_sint64.isEmpty()) builder.append(", rep_sint64=").append(rep_sint64); if (!rep_fixed64.isEmpty()) builder.append(", rep_fixed64=").append(rep_fixed64); if (!rep_sfixed64.isEmpty()) builder.append(", rep_sfixed64=").append(rep_sfixed64); if (!rep_bool.isEmpty()) builder.append(", rep_bool=").append(rep_bool); if (!rep_float.isEmpty()) builder.append(", rep_float=").append(rep_float); if (!rep_double.isEmpty()) builder.append(", rep_double=").append(rep_double); if (!rep_string.isEmpty()) builder.append(", rep_string=").append(Internal.sanitize(rep_string)); if (!rep_bytes.isEmpty()) builder.append(", rep_bytes=").append(rep_bytes); if (!rep_nested_enum.isEmpty()) builder.append(", rep_nested_enum=").append(rep_nested_enum); if (!rep_nested_message.isEmpty()) builder.append(", rep_nested_message=").append(rep_nested_message); if (!rep_any.isEmpty()) builder.append(", rep_any=").append(rep_any); if (!rep_duration.isEmpty()) builder.append(", rep_duration=").append(rep_duration); if (!rep_struct.isEmpty()) builder.append(", rep_struct=").append(rep_struct); if (!rep_list_value.isEmpty()) builder.append(", rep_list_value=").append(rep_list_value); if (!rep_value.isEmpty()) builder.append(", rep_value=").append(rep_value); if (!rep_null_value.isEmpty()) builder.append(", rep_null_value=").append(rep_null_value); if (!rep_empty.isEmpty()) builder.append(", rep_empty=").append(rep_empty); if (!rep_timestamp.isEmpty()) builder.append(", rep_timestamp=").append(rep_timestamp); if (!pack_int32.isEmpty()) builder.append(", pack_int32=").append(pack_int32); if (!pack_uint32.isEmpty()) builder.append(", pack_uint32=").append(pack_uint32); if (!pack_sint32.isEmpty()) builder.append(", pack_sint32=").append(pack_sint32); if (!pack_fixed32.isEmpty()) builder.append(", pack_fixed32=").append(pack_fixed32); if (!pack_sfixed32.isEmpty()) builder.append(", pack_sfixed32=").append(pack_sfixed32); if (!pack_int64.isEmpty()) builder.append(", pack_int64=").append(pack_int64); if (!pack_uint64.isEmpty()) builder.append(", pack_uint64=").append(pack_uint64); if (!pack_sint64.isEmpty()) builder.append(", pack_sint64=").append(pack_sint64); if (!pack_fixed64.isEmpty()) builder.append(", pack_fixed64=").append(pack_fixed64); if (!pack_sfixed64.isEmpty()) builder.append(", pack_sfixed64=").append(pack_sfixed64); if (!pack_bool.isEmpty()) builder.append(", pack_bool=").append(pack_bool); if (!pack_float.isEmpty()) builder.append(", pack_float=").append(pack_float); if (!pack_double.isEmpty()) builder.append(", pack_double=").append(pack_double); if (!pack_nested_enum.isEmpty()) builder.append(", pack_nested_enum=").append(pack_nested_enum); if (!pack_null_value.isEmpty()) builder.append(", pack_null_value=").append(pack_null_value); if (!map_int32_int32.isEmpty()) builder.append(", map_int32_int32=").append(map_int32_int32); if (!map_string_string.isEmpty()) builder.append(", map_string_string=").append(map_string_string); if (!map_string_message.isEmpty()) builder.append(", map_string_message=").append(map_string_message); if (!map_string_enum.isEmpty()) builder.append(", map_string_enum=").append(map_string_enum); if (!map_int32_any.isEmpty()) builder.append(", map_int32_any=").append(map_int32_any); if (!map_int32_duration.isEmpty()) builder.append(", map_int32_duration=").append(map_int32_duration); if (!map_int32_struct.isEmpty()) builder.append(", map_int32_struct=").append(map_int32_struct); if (!map_int32_list_value.isEmpty()) builder.append(", map_int32_list_value=").append(map_int32_list_value); if (!map_int32_value.isEmpty()) builder.append(", map_int32_value=").append(map_int32_value); if (!map_int32_null_value.isEmpty()) builder.append(", map_int32_null_value=").append(map_int32_null_value); if (!map_int32_empty.isEmpty()) builder.append(", map_int32_empty=").append(map_int32_empty); if (!map_int32_timestamp.isEmpty()) builder.append(", map_int32_timestamp=").append(map_int32_timestamp); if (oneof_string != null) builder.append(", oneof_string=").append(Internal.sanitize(oneof_string)); if (oneof_int32 != null) builder.append(", oneof_int32=").append(oneof_int32); if (oneof_nested_message != null) builder.append(", oneof_nested_message=").append(oneof_nested_message); if (oneof_any != null) builder.append(", oneof_any=").append(oneof_any); if (oneof_duration != null) builder.append(", oneof_duration=").append(oneof_duration); if (oneof_struct != null) builder.append(", oneof_struct=").append(oneof_struct); if (oneof_list_value != null) builder.append(", oneof_list_value=").append(oneof_list_value); if (oneof_empty != null) builder.append(", oneof_empty=").append(oneof_empty); if (oneof_timestamp != null) builder.append(", oneof_timestamp=").append(oneof_timestamp); return builder.replace(0, 2, "AllTypes{").append('}').toString(); } public static final class Builder extends Message.Builder<AllTypes, Builder> { public int int32; public int uint32; public int sint32; public int fixed32; public int sfixed32; public long int64; public long uint64; public long sint64; public long fixed64; public long sfixed64; public boolean bool; public float float_; public double double_; public String string; public ByteString bytes; public NestedEnum nested_enum; public NestedMessage nested_message; public AnyMessage any; public Duration duration; public Map<String, ?> struct; public List<?> list_value; public Object value; public Void null_value; public Unit empty; public Instant timestamp; public Integer opt_int32; public Integer opt_uint32; public Integer opt_sint32; public Integer opt_fixed32; public Integer opt_sfixed32; public Long opt_int64; public Long opt_uint64; public Long opt_sint64; public Long opt_fixed64; public Long opt_sfixed64; public Boolean opt_bool; public Float opt_float; public Double opt_double; public String opt_string; public ByteString opt_bytes; public List<Integer> rep_int32; public List<Integer> rep_uint32; public List<Integer> rep_sint32; public List<Integer> rep_fixed32; public List<Integer> rep_sfixed32; public List<Long> rep_int64; public List<Long> rep_uint64; public List<Long> rep_sint64; public List<Long> rep_fixed64; public List<Long> rep_sfixed64; public List<Boolean> rep_bool; public List<Float> rep_float; public List<Double> rep_double; public List<String> rep_string; public List<ByteString> rep_bytes; public List<NestedEnum> rep_nested_enum; public List<NestedMessage> rep_nested_message; public List<AnyMessage> rep_any; public List<Duration> rep_duration; public List<Map<String, ?>> rep_struct; public List<List<?>> rep_list_value; public List<Object> rep_value; public List<Void> rep_null_value; public List<Unit> rep_empty; public List<Instant> rep_timestamp; public List<Integer> pack_int32; public List<Integer> pack_uint32; public List<Integer> pack_sint32; public List<Integer> pack_fixed32; public List<Integer> pack_sfixed32; public List<Long> pack_int64; public List<Long> pack_uint64; public List<Long> pack_sint64; public List<Long> pack_fixed64; public List<Long> pack_sfixed64; public List<Boolean> pack_bool; public List<Float> pack_float; public List<Double> pack_double; public List<NestedEnum> pack_nested_enum; public List<Void> pack_null_value; public Map<Integer, Integer> map_int32_int32; public Map<String, String> map_string_string; public Map<String, NestedMessage> map_string_message; public Map<String, NestedEnum> map_string_enum; public Map<Integer, AnyMessage> map_int32_any; public Map<Integer, Duration> map_int32_duration; public Map<Integer, Map<String, ?>> map_int32_struct; public Map<Integer, List<?>> map_int32_list_value; public Map<Integer, Object> map_int32_value; public Map<Integer, Void> map_int32_null_value; public Map<Integer, Unit> map_int32_empty; public Map<Integer, Instant> map_int32_timestamp; public String oneof_string; public Integer oneof_int32; public NestedMessage oneof_nested_message; public AnyMessage oneof_any; public Duration oneof_duration; public Map<String, ?> oneof_struct; public List<?> oneof_list_value; public Unit oneof_empty; public Instant oneof_timestamp; public Builder() { int32 = 0; uint32 = 0; sint32 = 0; fixed32 = 0; sfixed32 = 0; int64 = 0L; uint64 = 0L; sint64 = 0L; fixed64 = 0L; sfixed64 = 0L; bool = false; float_ = 0f; double_ = 0.0; string = ""; bytes = ByteString.EMPTY; nested_enum = NestedEnum.UNKNOWN; rep_int32 = Internal.newMutableList(); rep_uint32 = Internal.newMutableList(); rep_sint32 = Internal.newMutableList(); rep_fixed32 = Internal.newMutableList(); rep_sfixed32 = Internal.newMutableList(); rep_int64 = Internal.newMutableList(); rep_uint64 = Internal.newMutableList(); rep_sint64 = Internal.newMutableList(); rep_fixed64 = Internal.newMutableList(); rep_sfixed64 = Internal.newMutableList(); rep_bool = Internal.newMutableList(); rep_float = Internal.newMutableList(); rep_double = Internal.newMutableList(); rep_string = Internal.newMutableList(); rep_bytes = Internal.newMutableList(); rep_nested_enum = Internal.newMutableList(); rep_nested_message = Internal.newMutableList(); rep_any = Internal.newMutableList(); rep_duration = Internal.newMutableList(); rep_struct = Internal.newMutableList(); rep_list_value = Internal.newMutableList(); rep_value = Internal.newMutableList(); rep_null_value = Internal.newMutableList(); rep_empty = Internal.newMutableList(); rep_timestamp = Internal.newMutableList(); pack_int32 = Internal.newMutableList(); pack_uint32 = Internal.newMutableList(); pack_sint32 = Internal.newMutableList(); pack_fixed32 = Internal.newMutableList(); pack_sfixed32 = Internal.newMutableList(); pack_int64 = Internal.newMutableList(); pack_uint64 = Internal.newMutableList(); pack_sint64 = Internal.newMutableList(); pack_fixed64 = Internal.newMutableList(); pack_sfixed64 = Internal.newMutableList(); pack_bool = Internal.newMutableList(); pack_float = Internal.newMutableList(); pack_double = Internal.newMutableList(); pack_nested_enum = Internal.newMutableList(); pack_null_value = Internal.newMutableList(); map_int32_int32 = Internal.newMutableMap(); map_string_string = Internal.newMutableMap(); map_string_message = Internal.newMutableMap(); map_string_enum = Internal.newMutableMap(); map_int32_any = Internal.newMutableMap(); map_int32_duration = Internal.newMutableMap(); map_int32_struct = Internal.newMutableMap(); map_int32_list_value = Internal.newMutableMap(); map_int32_value = Internal.newMutableMap(); map_int32_null_value = Internal.newMutableMap(); map_int32_empty = Internal.newMutableMap(); map_int32_timestamp = Internal.newMutableMap(); } public Builder int32(int int32) { this.int32 = int32; return this; } public Builder uint32(int uint32) { this.uint32 = uint32; return this; } public Builder sint32(int sint32) { this.sint32 = sint32; return this; } public Builder fixed32(int fixed32) { this.fixed32 = fixed32; return this; } public Builder sfixed32(int sfixed32) { this.sfixed32 = sfixed32; return this; } public Builder int64(long int64) { this.int64 = int64; return this; } public Builder uint64(long uint64) { this.uint64 = uint64; return this; } public Builder sint64(long sint64) { this.sint64 = sint64; return this; } public Builder fixed64(long fixed64) { this.fixed64 = fixed64; return this; } public Builder sfixed64(long sfixed64) { this.sfixed64 = sfixed64; return this; } public Builder bool(boolean bool) { this.bool = bool; return this; } public Builder float_(float float_) { this.float_ = float_; return this; } public Builder double_(double double_) { this.double_ = double_; return this; } public Builder string(String string) { this.string = string; return this; } public Builder bytes(ByteString bytes) { this.bytes = bytes; return this; } public Builder nested_enum(NestedEnum nested_enum) { this.nested_enum = nested_enum; return this; } public Builder nested_message(NestedMessage nested_message) { this.nested_message = nested_message; return this; } public Builder any(AnyMessage any) { this.any = any; return this; } public Builder duration(Duration duration) { this.duration = duration; return this; } public Builder struct(Map<String, ?> struct) { this.struct = struct; return this; } public Builder list_value(List<?> list_value) { this.list_value = list_value; return this; } public Builder value(Object value) { this.value = value; return this; } public Builder null_value(Void null_value) { this.null_value = null_value; return this; } public Builder empty(Unit empty) { this.empty = empty; return this; } public Builder timestamp(Instant timestamp) { this.timestamp = timestamp; return this; } public Builder opt_int32(Integer opt_int32) { this.opt_int32 = opt_int32; return this; } public Builder opt_uint32(Integer opt_uint32) { this.opt_uint32 = opt_uint32; return this; } public Builder opt_sint32(Integer opt_sint32) { this.opt_sint32 = opt_sint32; return this; } public Builder opt_fixed32(Integer opt_fixed32) { this.opt_fixed32 = opt_fixed32; return this; } public Builder opt_sfixed32(Integer opt_sfixed32) { this.opt_sfixed32 = opt_sfixed32; return this; } public Builder opt_int64(Long opt_int64) { this.opt_int64 = opt_int64; return this; } public Builder opt_uint64(Long opt_uint64) { this.opt_uint64 = opt_uint64; return this; } public Builder opt_sint64(Long opt_sint64) { this.opt_sint64 = opt_sint64; return this; } public Builder opt_fixed64(Long opt_fixed64) { this.opt_fixed64 = opt_fixed64; return this; } public Builder opt_sfixed64(Long opt_sfixed64) { this.opt_sfixed64 = opt_sfixed64; return this; } public Builder opt_bool(Boolean opt_bool) { this.opt_bool = opt_bool; return this; } public Builder opt_float(Float opt_float) { this.opt_float = opt_float; return this; } public Builder opt_double(Double opt_double) { this.opt_double = opt_double; return this; } public Builder opt_string(String opt_string) { this.opt_string = opt_string; return this; } public Builder opt_bytes(ByteString opt_bytes) { this.opt_bytes = opt_bytes; return this; } public Builder rep_int32(List<Integer> rep_int32) { Internal.checkElementsNotNull(rep_int32); this.rep_int32 = rep_int32; return this; } public Builder rep_uint32(List<Integer> rep_uint32) { Internal.checkElementsNotNull(rep_uint32); this.rep_uint32 = rep_uint32; return this; } public Builder rep_sint32(List<Integer> rep_sint32) { Internal.checkElementsNotNull(rep_sint32); this.rep_sint32 = rep_sint32; return this; } public Builder rep_fixed32(List<Integer> rep_fixed32) { Internal.checkElementsNotNull(rep_fixed32); this.rep_fixed32 = rep_fixed32; return this; } public Builder rep_sfixed32(List<Integer> rep_sfixed32) { Internal.checkElementsNotNull(rep_sfixed32); this.rep_sfixed32 = rep_sfixed32; return this; } public Builder rep_int64(List<Long> rep_int64) { Internal.checkElementsNotNull(rep_int64); this.rep_int64 = rep_int64; return this; } public Builder rep_uint64(List<Long> rep_uint64) { Internal.checkElementsNotNull(rep_uint64); this.rep_uint64 = rep_uint64; return this; } public Builder rep_sint64(List<Long> rep_sint64) { Internal.checkElementsNotNull(rep_sint64); this.rep_sint64 = rep_sint64; return this; } public Builder rep_fixed64(List<Long> rep_fixed64) { Internal.checkElementsNotNull(rep_fixed64); this.rep_fixed64 = rep_fixed64; return this; } public Builder rep_sfixed64(List<Long> rep_sfixed64) { Internal.checkElementsNotNull(rep_sfixed64); this.rep_sfixed64 = rep_sfixed64; return this; } public Builder rep_bool(List<Boolean> rep_bool) { Internal.checkElementsNotNull(rep_bool); this.rep_bool = rep_bool; return this; } public Builder rep_float(List<Float> rep_float) { Internal.checkElementsNotNull(rep_float); this.rep_float = rep_float; return this; } public Builder rep_double(List<Double> rep_double) { Internal.checkElementsNotNull(rep_double); this.rep_double = rep_double; return this; } public Builder rep_string(List<String> rep_string) { Internal.checkElementsNotNull(rep_string); this.rep_string = rep_string; return this; } public Builder rep_bytes(List<ByteString> rep_bytes) { Internal.checkElementsNotNull(rep_bytes); this.rep_bytes = rep_bytes; return this; } public Builder rep_nested_enum(List<NestedEnum> rep_nested_enum) { Internal.checkElementsNotNull(rep_nested_enum); this.rep_nested_enum = rep_nested_enum; return this; } public Builder rep_nested_message(List<NestedMessage> rep_nested_message) { Internal.checkElementsNotNull(rep_nested_message); this.rep_nested_message = rep_nested_message; return this; } public Builder rep_any(List<AnyMessage> rep_any) { Internal.checkElementsNotNull(rep_any); this.rep_any = rep_any; return this; } public Builder rep_duration(List<Duration> rep_duration) { Internal.checkElementsNotNull(rep_duration); this.rep_duration = rep_duration; return this; } public Builder rep_struct(List<Map<String, ?>> rep_struct) { Internal.checkElementsNotNull(rep_struct); this.rep_struct = rep_struct; return this; } public Builder rep_list_value(List<List<?>> rep_list_value) { Internal.checkElementsNotNull(rep_list_value); this.rep_list_value = rep_list_value; return this; } public Builder rep_value(List<Object> rep_value) { Internal.checkElementsNotNull(rep_value); this.rep_value = rep_value; return this; } public Builder rep_null_value(List<Void> rep_null_value) { Internal.checkElementsNotNull(rep_null_value); this.rep_null_value = rep_null_value; return this; } public Builder rep_empty(List<Unit> rep_empty) { Internal.checkElementsNotNull(rep_empty); this.rep_empty = rep_empty; return this; } public Builder rep_timestamp(List<Instant> rep_timestamp) { Internal.checkElementsNotNull(rep_timestamp); this.rep_timestamp = rep_timestamp; return this; } public Builder pack_int32(List<Integer> pack_int32) { Internal.checkElementsNotNull(pack_int32); this.pack_int32 = pack_int32; return this; } public Builder pack_uint32(List<Integer> pack_uint32) { Internal.checkElementsNotNull(pack_uint32); this.pack_uint32 = pack_uint32; return this; } public Builder pack_sint32(List<Integer> pack_sint32) { Internal.checkElementsNotNull(pack_sint32); this.pack_sint32 = pack_sint32; return this; } public Builder pack_fixed32(List<Integer> pack_fixed32) { Internal.checkElementsNotNull(pack_fixed32); this.pack_fixed32 = pack_fixed32; return this; } public Builder pack_sfixed32(List<Integer> pack_sfixed32) { Internal.checkElementsNotNull(pack_sfixed32); this.pack_sfixed32 = pack_sfixed32; return this; } public Builder pack_int64(List<Long> pack_int64) { Internal.checkElementsNotNull(pack_int64); this.pack_int64 = pack_int64; return this; } public Builder pack_uint64(List<Long> pack_uint64) { Internal.checkElementsNotNull(pack_uint64); this.pack_uint64 = pack_uint64; return this; } public Builder pack_sint64(List<Long> pack_sint64) { Internal.checkElementsNotNull(pack_sint64); this.pack_sint64 = pack_sint64; return this; } public Builder pack_fixed64(List<Long> pack_fixed64) { Internal.checkElementsNotNull(pack_fixed64); this.pack_fixed64 = pack_fixed64; return this; } public Builder pack_sfixed64(List<Long> pack_sfixed64) { Internal.checkElementsNotNull(pack_sfixed64); this.pack_sfixed64 = pack_sfixed64; return this; } public Builder pack_bool(List<Boolean> pack_bool) { Internal.checkElementsNotNull(pack_bool); this.pack_bool = pack_bool; return this; } public Builder pack_float(List<Float> pack_float) { Internal.checkElementsNotNull(pack_float); this.pack_float = pack_float; return this; } public Builder pack_double(List<Double> pack_double) { Internal.checkElementsNotNull(pack_double); this.pack_double = pack_double; return this; } public Builder pack_nested_enum(List<NestedEnum> pack_nested_enum) { Internal.checkElementsNotNull(pack_nested_enum); this.pack_nested_enum = pack_nested_enum; return this; } public Builder pack_null_value(List<Void> pack_null_value) { Internal.checkElementsNotNull(pack_null_value); this.pack_null_value = pack_null_value; return this; } public Builder map_int32_int32(Map<Integer, Integer> map_int32_int32) { Internal.checkElementsNotNull(map_int32_int32); this.map_int32_int32 = map_int32_int32; return this; } public Builder map_string_string(Map<String, String> map_string_string) { Internal.checkElementsNotNull(map_string_string); this.map_string_string = map_string_string; return this; } public Builder map_string_message(Map<String, NestedMessage> map_string_message) { Internal.checkElementsNotNull(map_string_message); this.map_string_message = map_string_message; return this; } public Builder map_string_enum(Map<String, NestedEnum> map_string_enum) { Internal.checkElementsNotNull(map_string_enum); this.map_string_enum = map_string_enum; return this; } public Builder map_int32_any(Map<Integer, AnyMessage> map_int32_any) { Internal.checkElementsNotNull(map_int32_any); this.map_int32_any = map_int32_any; return this; } public Builder map_int32_duration(Map<Integer, Duration> map_int32_duration) { Internal.checkElementsNotNull(map_int32_duration); this.map_int32_duration = map_int32_duration; return this; } public Builder map_int32_struct(Map<Integer, Map<String, ?>> map_int32_struct) { Internal.checkElementsNotNull(map_int32_struct); this.map_int32_struct = map_int32_struct; return this; } public Builder map_int32_list_value(Map<Integer, List<?>> map_int32_list_value) { Internal.checkElementsNotNull(map_int32_list_value); this.map_int32_list_value = map_int32_list_value; return this; } public Builder map_int32_value(Map<Integer, Object> map_int32_value) { Internal.checkElementsNotNull(map_int32_value); this.map_int32_value = map_int32_value; return this; } public Builder map_int32_null_value(Map<Integer, Void> map_int32_null_value) { Internal.checkElementsNotNull(map_int32_null_value); this.map_int32_null_value = map_int32_null_value; return this; } public Builder map_int32_empty(Map<Integer, Unit> map_int32_empty) { Internal.checkElementsNotNull(map_int32_empty); this.map_int32_empty = map_int32_empty; return this; } public Builder map_int32_timestamp(Map<Integer, Instant> map_int32_timestamp) { Internal.checkElementsNotNull(map_int32_timestamp); this.map_int32_timestamp = map_int32_timestamp; return this; } public Builder oneof_string(String oneof_string) { this.oneof_string = oneof_string; this.oneof_int32 = null; this.oneof_nested_message = null; this.oneof_any = null; this.oneof_duration = null; this.oneof_struct = null; this.oneof_list_value = null; this.oneof_empty = null; this.oneof_timestamp = null; return this; } public Builder oneof_int32(Integer oneof_int32) { this.oneof_int32 = oneof_int32; this.oneof_string = null; this.oneof_nested_message = null; this.oneof_any = null; this.oneof_duration = null; this.oneof_struct = null; this.oneof_list_value = null; this.oneof_empty = null; this.oneof_timestamp = null; return this; } public Builder oneof_nested_message(NestedMessage oneof_nested_message) { this.oneof_nested_message = oneof_nested_message; this.oneof_string = null; this.oneof_int32 = null; this.oneof_any = null; this.oneof_duration = null; this.oneof_struct = null; this.oneof_list_value = null; this.oneof_empty = null; this.oneof_timestamp = null; return this; } public Builder oneof_any(AnyMessage oneof_any) { this.oneof_any = oneof_any; this.oneof_string = null; this.oneof_int32 = null; this.oneof_nested_message = null; this.oneof_duration = null; this.oneof_struct = null; this.oneof_list_value = null; this.oneof_empty = null; this.oneof_timestamp = null; return this; } public Builder oneof_duration(Duration oneof_duration) { this.oneof_duration = oneof_duration; this.oneof_string = null; this.oneof_int32 = null; this.oneof_nested_message = null; this.oneof_any = null; this.oneof_struct = null; this.oneof_list_value = null; this.oneof_empty = null; this.oneof_timestamp = null; return this; } public Builder oneof_struct(Map<String, ?> oneof_struct) { this.oneof_struct = oneof_struct; this.oneof_string = null; this.oneof_int32 = null; this.oneof_nested_message = null; this.oneof_any = null; this.oneof_duration = null; this.oneof_list_value = null; this.oneof_empty = null; this.oneof_timestamp = null; return this; } public Builder oneof_list_value(List<?> oneof_list_value) { this.oneof_list_value = oneof_list_value; this.oneof_string = null; this.oneof_int32 = null; this.oneof_nested_message = null; this.oneof_any = null; this.oneof_duration = null; this.oneof_struct = null; this.oneof_empty = null; this.oneof_timestamp = null; return this; } /** * google.protobuf.Value oneof_value = 622; * google.protobuf.NullValue oneof_null_value = 623; */ public Builder oneof_empty(Unit oneof_empty) { this.oneof_empty = oneof_empty; this.oneof_string = null; this.oneof_int32 = null; this.oneof_nested_message = null; this.oneof_any = null; this.oneof_duration = null; this.oneof_struct = null; this.oneof_list_value = null; this.oneof_timestamp = null; return this; } public Builder oneof_timestamp(Instant oneof_timestamp) { this.oneof_timestamp = oneof_timestamp; this.oneof_string = null; this.oneof_int32 = null; this.oneof_nested_message = null; this.oneof_any = null; this.oneof_duration = null; this.oneof_struct = null; this.oneof_list_value = null; this.oneof_empty = null; return this; } @Override public AllTypes build() { return new AllTypes(this, super.buildUnknownFields()); } } public enum NestedEnum implements WireEnum { UNKNOWN(0), A(1); public static final ProtoAdapter<NestedEnum> ADAPTER = new ProtoAdapter_NestedEnum(); private final int value; NestedEnum(int value) { this.value = value; } /** * Return the constant for {@code value} or null. */ public static NestedEnum fromValue(int value) { switch (value) { case 0: return UNKNOWN; case 1: return A; default: return null; } } @Override public int getValue() { return value; } private static final class ProtoAdapter_NestedEnum extends EnumAdapter<NestedEnum> { ProtoAdapter_NestedEnum() { super(NestedEnum.class, Syntax.PROTO_3, NestedEnum.UNKNOWN); } @Override protected NestedEnum fromValue(int value) { return NestedEnum.fromValue(value); } } } public static final class NestedMessage extends Message<NestedMessage, NestedMessage.Builder> { public static final ProtoAdapter<NestedMessage> ADAPTER = new ProtoAdapter_NestedMessage(); private static final long serialVersionUID = 0L; @WireField( tag = 1, adapter = "com.squareup.wire.ProtoAdapter#INT32", label = WireField.Label.OMIT_IDENTITY ) public final int a; public NestedMessage(int a) { this(a, ByteString.EMPTY); } public NestedMessage(int a, ByteString unknownFields) { super(ADAPTER, unknownFields); this.a = a; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.a = a; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof NestedMessage)) return false; NestedMessage o = (NestedMessage) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(a, o.a); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + Integer.hashCode(a); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append(", a=").append(a); return builder.replace(0, 2, "NestedMessage{").append('}').toString(); } public static final class Builder extends Message.Builder<NestedMessage, Builder> { public int a; public Builder() { a = 0; } public Builder a(int a) { this.a = a; return this; } @Override public NestedMessage build() { return new NestedMessage(a, super.buildUnknownFields()); } } private static final class ProtoAdapter_NestedMessage extends ProtoAdapter<NestedMessage> { public ProtoAdapter_NestedMessage() { super(FieldEncoding.LENGTH_DELIMITED, NestedMessage.class, "type.googleapis.com/proto3.java.AllTypes.NestedMessage", Syntax.PROTO_3, null, "all_types.proto"); } @Override public int encodedSize(NestedMessage value) { int result = 0; if (!Objects.equals(value.a, 0)) { result += ProtoAdapter.INT32.encodedSizeWithTag(1, value.a); } result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, NestedMessage value) throws IOException { if (!Objects.equals(value.a, 0)) ProtoAdapter.INT32.encodeWithTag(writer, 1, value.a); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, NestedMessage value) throws IOException { writer.writeBytes(value.unknownFields()); if (!Objects.equals(value.a, 0)) ProtoAdapter.INT32.encodeWithTag(writer, 1, value.a); } @Override public NestedMessage 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.a(ProtoAdapter.INT32.decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public NestedMessage redact(NestedMessage value) { Builder builder = value.newBuilder(); builder.clearUnknownFields(); return builder.build(); } } } private static final class ProtoAdapter_AllTypes extends ProtoAdapter<AllTypes> { private ProtoAdapter<Map<Integer, Integer>> map_int32_int32; private ProtoAdapter<Map<String, String>> map_string_string; private ProtoAdapter<Map<String, NestedMessage>> map_string_message; private ProtoAdapter<Map<String, NestedEnum>> map_string_enum; private ProtoAdapter<Map<Integer, AnyMessage>> map_int32_any; private ProtoAdapter<Map<Integer, Duration>> map_int32_duration; private ProtoAdapter<Map<Integer, Map<String, ?>>> map_int32_struct; private ProtoAdapter<Map<Integer, List<?>>> map_int32_list_value; private ProtoAdapter<Map<Integer, Object>> map_int32_value; private ProtoAdapter<Map<Integer, Void>> map_int32_null_value; private ProtoAdapter<Map<Integer, Unit>> map_int32_empty; private ProtoAdapter<Map<Integer, Instant>> map_int32_timestamp; public ProtoAdapter_AllTypes() { super(FieldEncoding.LENGTH_DELIMITED, AllTypes.class, "type.googleapis.com/proto3.java.AllTypes", Syntax.PROTO_3, null, "all_types.proto"); } @Override public int encodedSize(AllTypes value) { int result = 0; if (!Objects.equals(value.int32, 0)) { result += ProtoAdapter.INT32.encodedSizeWithTag(1, value.int32); } if (!Objects.equals(value.uint32, 0)) { result += ProtoAdapter.UINT32.encodedSizeWithTag(2, value.uint32); } if (!Objects.equals(value.sint32, 0)) { result += ProtoAdapter.SINT32.encodedSizeWithTag(3, value.sint32); } if (!Objects.equals(value.fixed32, 0)) { result += ProtoAdapter.FIXED32.encodedSizeWithTag(4, value.fixed32); } if (!Objects.equals(value.sfixed32, 0)) { result += ProtoAdapter.SFIXED32.encodedSizeWithTag(5, value.sfixed32); } if (!Objects.equals(value.int64, 0L)) { result += ProtoAdapter.INT64.encodedSizeWithTag(6, value.int64); } if (!Objects.equals(value.uint64, 0L)) { result += ProtoAdapter.UINT64.encodedSizeWithTag(7, value.uint64); } if (!Objects.equals(value.sint64, 0L)) { result += ProtoAdapter.SINT64.encodedSizeWithTag(8, value.sint64); } if (!Objects.equals(value.fixed64, 0L)) { result += ProtoAdapter.FIXED64.encodedSizeWithTag(9, value.fixed64); } if (!Objects.equals(value.sfixed64, 0L)) { result += ProtoAdapter.SFIXED64.encodedSizeWithTag(10, value.sfixed64); } if (!Objects.equals(value.bool, false)) { result += ProtoAdapter.BOOL.encodedSizeWithTag(11, value.bool); } if (!Objects.equals(value.float_, 0f)) { result += ProtoAdapter.FLOAT.encodedSizeWithTag(12, value.float_); } if (!Objects.equals(value.double_, 0.0)) { result += ProtoAdapter.DOUBLE.encodedSizeWithTag(13, value.double_); } if (!Objects.equals(value.string, "")) { result += ProtoAdapter.STRING.encodedSizeWithTag(14, value.string); } if (!Objects.equals(value.bytes, ByteString.EMPTY)) { result += ProtoAdapter.BYTES.encodedSizeWithTag(15, value.bytes); } if (!Objects.equals(value.nested_enum, NestedEnum.UNKNOWN)) { result += NestedEnum.ADAPTER.encodedSizeWithTag(16, value.nested_enum); } if (!Objects.equals(value.nested_message, null)) { result += NestedMessage.ADAPTER.encodedSizeWithTag(17, value.nested_message); } if (!Objects.equals(value.any, null)) { result += AnyMessage.ADAPTER.encodedSizeWithTag(18, value.any); } if (!Objects.equals(value.duration, null)) { result += ProtoAdapter.DURATION.encodedSizeWithTag(19, value.duration); } if (!Objects.equals(value.struct, null)) { result += ProtoAdapter.STRUCT_MAP.encodedSizeWithTag(20, value.struct); } if (!Objects.equals(value.list_value, null)) { result += ProtoAdapter.STRUCT_LIST.encodedSizeWithTag(21, value.list_value); } if (!Objects.equals(value.value, null)) { result += ProtoAdapter.STRUCT_VALUE.encodedSizeWithTag(22, value.value); } if (!Objects.equals(value.null_value, null)) { result += ProtoAdapter.STRUCT_NULL.encodedSizeWithTag(23, value.null_value); } if (!Objects.equals(value.empty, null)) { result += ProtoAdapter.EMPTY.encodedSizeWithTag(24, value.empty); } if (!Objects.equals(value.timestamp, null)) { result += ProtoAdapter.INSTANT.encodedSizeWithTag(25, value.timestamp); } result += ProtoAdapter.INT32.encodedSizeWithTag(101, value.opt_int32); result += ProtoAdapter.UINT32.encodedSizeWithTag(102, value.opt_uint32); result += ProtoAdapter.SINT32.encodedSizeWithTag(103, value.opt_sint32); result += ProtoAdapter.FIXED32.encodedSizeWithTag(104, value.opt_fixed32); result += ProtoAdapter.SFIXED32.encodedSizeWithTag(105, value.opt_sfixed32); result += ProtoAdapter.INT64.encodedSizeWithTag(106, value.opt_int64); result += ProtoAdapter.UINT64.encodedSizeWithTag(107, value.opt_uint64); result += ProtoAdapter.SINT64.encodedSizeWithTag(108, value.opt_sint64); result += ProtoAdapter.FIXED64.encodedSizeWithTag(109, value.opt_fixed64); result += ProtoAdapter.SFIXED64.encodedSizeWithTag(110, value.opt_sfixed64); result += ProtoAdapter.BOOL.encodedSizeWithTag(111, value.opt_bool); result += ProtoAdapter.FLOAT.encodedSizeWithTag(112, value.opt_float); result += ProtoAdapter.DOUBLE.encodedSizeWithTag(113, value.opt_double); result += ProtoAdapter.STRING.encodedSizeWithTag(114, value.opt_string); result += ProtoAdapter.BYTES.encodedSizeWithTag(115, value.opt_bytes); result += ProtoAdapter.INT32.asRepeated().encodedSizeWithTag(201, value.rep_int32); result += ProtoAdapter.UINT32.asRepeated().encodedSizeWithTag(202, value.rep_uint32); result += ProtoAdapter.SINT32.asRepeated().encodedSizeWithTag(203, value.rep_sint32); result += ProtoAdapter.FIXED32.asRepeated().encodedSizeWithTag(204, value.rep_fixed32); result += ProtoAdapter.SFIXED32.asRepeated().encodedSizeWithTag(205, value.rep_sfixed32); result += ProtoAdapter.INT64.asRepeated().encodedSizeWithTag(206, value.rep_int64); result += ProtoAdapter.UINT64.asRepeated().encodedSizeWithTag(207, value.rep_uint64); result += ProtoAdapter.SINT64.asRepeated().encodedSizeWithTag(208, value.rep_sint64); result += ProtoAdapter.FIXED64.asRepeated().encodedSizeWithTag(209, value.rep_fixed64); result += ProtoAdapter.SFIXED64.asRepeated().encodedSizeWithTag(210, value.rep_sfixed64); result += ProtoAdapter.BOOL.asRepeated().encodedSizeWithTag(211, value.rep_bool); result += ProtoAdapter.FLOAT.asRepeated().encodedSizeWithTag(212, value.rep_float); result += ProtoAdapter.DOUBLE.asRepeated().encodedSizeWithTag(213, value.rep_double); result += ProtoAdapter.STRING.asRepeated().encodedSizeWithTag(214, value.rep_string); result += ProtoAdapter.BYTES.asRepeated().encodedSizeWithTag(215, value.rep_bytes); result += NestedEnum.ADAPTER.asRepeated().encodedSizeWithTag(216, value.rep_nested_enum); result += NestedMessage.ADAPTER.asRepeated().encodedSizeWithTag(217, value.rep_nested_message); result += AnyMessage.ADAPTER.asRepeated().encodedSizeWithTag(218, value.rep_any); result += ProtoAdapter.DURATION.asRepeated().encodedSizeWithTag(219, value.rep_duration); result += ProtoAdapter.STRUCT_MAP.asRepeated().encodedSizeWithTag(220, value.rep_struct); result += ProtoAdapter.STRUCT_LIST.asRepeated().encodedSizeWithTag(221, value.rep_list_value); result += ProtoAdapter.STRUCT_VALUE.asRepeated().encodedSizeWithTag(222, value.rep_value); result += ProtoAdapter.STRUCT_NULL.asRepeated().encodedSizeWithTag(223, value.rep_null_value); result += ProtoAdapter.EMPTY.asRepeated().encodedSizeWithTag(224, value.rep_empty); result += ProtoAdapter.INSTANT.asRepeated().encodedSizeWithTag(225, value.rep_timestamp); result += ProtoAdapter.INT32.asPacked().encodedSizeWithTag(301, value.pack_int32); result += ProtoAdapter.UINT32.asPacked().encodedSizeWithTag(302, value.pack_uint32); result += ProtoAdapter.SINT32.asPacked().encodedSizeWithTag(303, value.pack_sint32); result += ProtoAdapter.FIXED32.asPacked().encodedSizeWithTag(304, value.pack_fixed32); result += ProtoAdapter.SFIXED32.asPacked().encodedSizeWithTag(305, value.pack_sfixed32); result += ProtoAdapter.INT64.asPacked().encodedSizeWithTag(306, value.pack_int64); result += ProtoAdapter.UINT64.asPacked().encodedSizeWithTag(307, value.pack_uint64); result += ProtoAdapter.SINT64.asPacked().encodedSizeWithTag(308, value.pack_sint64); result += ProtoAdapter.FIXED64.asPacked().encodedSizeWithTag(309, value.pack_fixed64); result += ProtoAdapter.SFIXED64.asPacked().encodedSizeWithTag(310, value.pack_sfixed64); result += ProtoAdapter.BOOL.asPacked().encodedSizeWithTag(311, value.pack_bool); result += ProtoAdapter.FLOAT.asPacked().encodedSizeWithTag(312, value.pack_float); result += ProtoAdapter.DOUBLE.asPacked().encodedSizeWithTag(313, value.pack_double); result += NestedEnum.ADAPTER.asPacked().encodedSizeWithTag(316, value.pack_nested_enum); result += ProtoAdapter.STRUCT_NULL.asPacked().encodedSizeWithTag(323, value.pack_null_value); result += map_int32_int32Adapter().encodedSizeWithTag(501, value.map_int32_int32); result += map_string_stringAdapter().encodedSizeWithTag(502, value.map_string_string); result += map_string_messageAdapter().encodedSizeWithTag(503, value.map_string_message); result += map_string_enumAdapter().encodedSizeWithTag(504, value.map_string_enum); result += map_int32_anyAdapter().encodedSizeWithTag(518, value.map_int32_any); result += map_int32_durationAdapter().encodedSizeWithTag(519, value.map_int32_duration); result += map_int32_structAdapter().encodedSizeWithTag(520, value.map_int32_struct); result += map_int32_list_valueAdapter().encodedSizeWithTag(521, value.map_int32_list_value); result += map_int32_valueAdapter().encodedSizeWithTag(522, value.map_int32_value); result += map_int32_null_valueAdapter().encodedSizeWithTag(523, value.map_int32_null_value); result += map_int32_emptyAdapter().encodedSizeWithTag(524, value.map_int32_empty); result += map_int32_timestampAdapter().encodedSizeWithTag(525, value.map_int32_timestamp); result += ProtoAdapter.STRING.encodedSizeWithTag(601, value.oneof_string); result += ProtoAdapter.INT32.encodedSizeWithTag(602, value.oneof_int32); result += NestedMessage.ADAPTER.encodedSizeWithTag(603, value.oneof_nested_message); result += AnyMessage.ADAPTER.encodedSizeWithTag(618, value.oneof_any); result += ProtoAdapter.DURATION.encodedSizeWithTag(619, value.oneof_duration); result += ProtoAdapter.STRUCT_MAP.encodedSizeWithTag(620, value.oneof_struct); result += ProtoAdapter.STRUCT_LIST.encodedSizeWithTag(621, value.oneof_list_value); result += ProtoAdapter.EMPTY.encodedSizeWithTag(624, value.oneof_empty); result += ProtoAdapter.INSTANT.encodedSizeWithTag(625, value.oneof_timestamp); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, AllTypes value) throws IOException { if (!Objects.equals(value.int32, 0)) ProtoAdapter.INT32.encodeWithTag(writer, 1, value.int32); if (!Objects.equals(value.uint32, 0)) ProtoAdapter.UINT32.encodeWithTag(writer, 2, value.uint32); if (!Objects.equals(value.sint32, 0)) ProtoAdapter.SINT32.encodeWithTag(writer, 3, value.sint32); if (!Objects.equals(value.fixed32, 0)) ProtoAdapter.FIXED32.encodeWithTag(writer, 4, value.fixed32); if (!Objects.equals(value.sfixed32, 0)) ProtoAdapter.SFIXED32.encodeWithTag(writer, 5, value.sfixed32); if (!Objects.equals(value.int64, 0L)) ProtoAdapter.INT64.encodeWithTag(writer, 6, value.int64); if (!Objects.equals(value.uint64, 0L)) ProtoAdapter.UINT64.encodeWithTag(writer, 7, value.uint64); if (!Objects.equals(value.sint64, 0L)) ProtoAdapter.SINT64.encodeWithTag(writer, 8, value.sint64); if (!Objects.equals(value.fixed64, 0L)) ProtoAdapter.FIXED64.encodeWithTag(writer, 9, value.fixed64); if (!Objects.equals(value.sfixed64, 0L)) ProtoAdapter.SFIXED64.encodeWithTag(writer, 10, value.sfixed64); if (!Objects.equals(value.bool, false)) ProtoAdapter.BOOL.encodeWithTag(writer, 11, value.bool); if (!Objects.equals(value.float_, 0f)) ProtoAdapter.FLOAT.encodeWithTag(writer, 12, value.float_); if (!Objects.equals(value.double_, 0.0)) ProtoAdapter.DOUBLE.encodeWithTag(writer, 13, value.double_); if (!Objects.equals(value.string, "")) ProtoAdapter.STRING.encodeWithTag(writer, 14, value.string); if (!Objects.equals(value.bytes, ByteString.EMPTY)) ProtoAdapter.BYTES.encodeWithTag(writer, 15, value.bytes); if (!Objects.equals(value.nested_enum, NestedEnum.UNKNOWN)) NestedEnum.ADAPTER.encodeWithTag(writer, 16, value.nested_enum); if (!Objects.equals(value.nested_message, null)) NestedMessage.ADAPTER.encodeWithTag(writer, 17, value.nested_message); if (!Objects.equals(value.any, null)) AnyMessage.ADAPTER.encodeWithTag(writer, 18, value.any); if (!Objects.equals(value.duration, null)) ProtoAdapter.DURATION.encodeWithTag(writer, 19, value.duration); if (!Objects.equals(value.struct, null)) ProtoAdapter.STRUCT_MAP.encodeWithTag(writer, 20, value.struct); if (!Objects.equals(value.list_value, null)) ProtoAdapter.STRUCT_LIST.encodeWithTag(writer, 21, value.list_value); if (!Objects.equals(value.value, null)) ProtoAdapter.STRUCT_VALUE.encodeWithTag(writer, 22, value.value); if (!Objects.equals(value.null_value, null)) ProtoAdapter.STRUCT_NULL.encodeWithTag(writer, 23, value.null_value); if (!Objects.equals(value.empty, null)) ProtoAdapter.EMPTY.encodeWithTag(writer, 24, value.empty); if (!Objects.equals(value.timestamp, null)) ProtoAdapter.INSTANT.encodeWithTag(writer, 25, value.timestamp); ProtoAdapter.INT32.encodeWithTag(writer, 101, value.opt_int32); ProtoAdapter.UINT32.encodeWithTag(writer, 102, value.opt_uint32); ProtoAdapter.SINT32.encodeWithTag(writer, 103, value.opt_sint32); ProtoAdapter.FIXED32.encodeWithTag(writer, 104, value.opt_fixed32); ProtoAdapter.SFIXED32.encodeWithTag(writer, 105, value.opt_sfixed32); ProtoAdapter.INT64.encodeWithTag(writer, 106, value.opt_int64); ProtoAdapter.UINT64.encodeWithTag(writer, 107, value.opt_uint64); ProtoAdapter.SINT64.encodeWithTag(writer, 108, value.opt_sint64); ProtoAdapter.FIXED64.encodeWithTag(writer, 109, value.opt_fixed64); ProtoAdapter.SFIXED64.encodeWithTag(writer, 110, value.opt_sfixed64); ProtoAdapter.BOOL.encodeWithTag(writer, 111, value.opt_bool); ProtoAdapter.FLOAT.encodeWithTag(writer, 112, value.opt_float); ProtoAdapter.DOUBLE.encodeWithTag(writer, 113, value.opt_double); ProtoAdapter.STRING.encodeWithTag(writer, 114, value.opt_string); ProtoAdapter.BYTES.encodeWithTag(writer, 115, value.opt_bytes); ProtoAdapter.INT32.asRepeated().encodeWithTag(writer, 201, value.rep_int32); ProtoAdapter.UINT32.asRepeated().encodeWithTag(writer, 202, value.rep_uint32); ProtoAdapter.SINT32.asRepeated().encodeWithTag(writer, 203, value.rep_sint32); ProtoAdapter.FIXED32.asRepeated().encodeWithTag(writer, 204, value.rep_fixed32); ProtoAdapter.SFIXED32.asRepeated().encodeWithTag(writer, 205, value.rep_sfixed32); ProtoAdapter.INT64.asRepeated().encodeWithTag(writer, 206, value.rep_int64); ProtoAdapter.UINT64.asRepeated().encodeWithTag(writer, 207, value.rep_uint64); ProtoAdapter.SINT64.asRepeated().encodeWithTag(writer, 208, value.rep_sint64); ProtoAdapter.FIXED64.asRepeated().encodeWithTag(writer, 209, value.rep_fixed64); ProtoAdapter.SFIXED64.asRepeated().encodeWithTag(writer, 210, value.rep_sfixed64); ProtoAdapter.BOOL.asRepeated().encodeWithTag(writer, 211, value.rep_bool); ProtoAdapter.FLOAT.asRepeated().encodeWithTag(writer, 212, value.rep_float); ProtoAdapter.DOUBLE.asRepeated().encodeWithTag(writer, 213, value.rep_double); ProtoAdapter.STRING.asRepeated().encodeWithTag(writer, 214, value.rep_string); ProtoAdapter.BYTES.asRepeated().encodeWithTag(writer, 215, value.rep_bytes); NestedEnum.ADAPTER.asRepeated().encodeWithTag(writer, 216, value.rep_nested_enum); NestedMessage.ADAPTER.asRepeated().encodeWithTag(writer, 217, value.rep_nested_message); AnyMessage.ADAPTER.asRepeated().encodeWithTag(writer, 218, value.rep_any); ProtoAdapter.DURATION.asRepeated().encodeWithTag(writer, 219, value.rep_duration); ProtoAdapter.STRUCT_MAP.asRepeated().encodeWithTag(writer, 220, value.rep_struct); ProtoAdapter.STRUCT_LIST.asRepeated().encodeWithTag(writer, 221, value.rep_list_value); ProtoAdapter.STRUCT_VALUE.asRepeated().encodeWithTag(writer, 222, value.rep_value); ProtoAdapter.STRUCT_NULL.asRepeated().encodeWithTag(writer, 223, value.rep_null_value); ProtoAdapter.EMPTY.asRepeated().encodeWithTag(writer, 224, value.rep_empty); ProtoAdapter.INSTANT.asRepeated().encodeWithTag(writer, 225, value.rep_timestamp); ProtoAdapter.INT32.asPacked().encodeWithTag(writer, 301, value.pack_int32); ProtoAdapter.UINT32.asPacked().encodeWithTag(writer, 302, value.pack_uint32); ProtoAdapter.SINT32.asPacked().encodeWithTag(writer, 303, value.pack_sint32); ProtoAdapter.FIXED32.asPacked().encodeWithTag(writer, 304, value.pack_fixed32); ProtoAdapter.SFIXED32.asPacked().encodeWithTag(writer, 305, value.pack_sfixed32); ProtoAdapter.INT64.asPacked().encodeWithTag(writer, 306, value.pack_int64); ProtoAdapter.UINT64.asPacked().encodeWithTag(writer, 307, value.pack_uint64); ProtoAdapter.SINT64.asPacked().encodeWithTag(writer, 308, value.pack_sint64); ProtoAdapter.FIXED64.asPacked().encodeWithTag(writer, 309, value.pack_fixed64); ProtoAdapter.SFIXED64.asPacked().encodeWithTag(writer, 310, value.pack_sfixed64); ProtoAdapter.BOOL.asPacked().encodeWithTag(writer, 311, value.pack_bool); ProtoAdapter.FLOAT.asPacked().encodeWithTag(writer, 312, value.pack_float); ProtoAdapter.DOUBLE.asPacked().encodeWithTag(writer, 313, value.pack_double); NestedEnum.ADAPTER.asPacked().encodeWithTag(writer, 316, value.pack_nested_enum); ProtoAdapter.STRUCT_NULL.asPacked().encodeWithTag(writer, 323, value.pack_null_value); map_int32_int32Adapter().encodeWithTag(writer, 501, value.map_int32_int32); map_string_stringAdapter().encodeWithTag(writer, 502, value.map_string_string); map_string_messageAdapter().encodeWithTag(writer, 503, value.map_string_message); map_string_enumAdapter().encodeWithTag(writer, 504, value.map_string_enum); map_int32_anyAdapter().encodeWithTag(writer, 518, value.map_int32_any); map_int32_durationAdapter().encodeWithTag(writer, 519, value.map_int32_duration); map_int32_structAdapter().encodeWithTag(writer, 520, value.map_int32_struct); map_int32_list_valueAdapter().encodeWithTag(writer, 521, value.map_int32_list_value); map_int32_valueAdapter().encodeWithTag(writer, 522, value.map_int32_value); map_int32_null_valueAdapter().encodeWithTag(writer, 523, value.map_int32_null_value); map_int32_emptyAdapter().encodeWithTag(writer, 524, value.map_int32_empty); map_int32_timestampAdapter().encodeWithTag(writer, 525, value.map_int32_timestamp); ProtoAdapter.STRING.encodeWithTag(writer, 601, value.oneof_string); ProtoAdapter.INT32.encodeWithTag(writer, 602, value.oneof_int32); NestedMessage.ADAPTER.encodeWithTag(writer, 603, value.oneof_nested_message); AnyMessage.ADAPTER.encodeWithTag(writer, 618, value.oneof_any); ProtoAdapter.DURATION.encodeWithTag(writer, 619, value.oneof_duration); ProtoAdapter.STRUCT_MAP.encodeWithTag(writer, 620, value.oneof_struct); ProtoAdapter.STRUCT_LIST.encodeWithTag(writer, 621, value.oneof_list_value); ProtoAdapter.EMPTY.encodeWithTag(writer, 624, value.oneof_empty); ProtoAdapter.INSTANT.encodeWithTag(writer, 625, value.oneof_timestamp); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, AllTypes value) throws IOException { writer.writeBytes(value.unknownFields()); ProtoAdapter.INSTANT.encodeWithTag(writer, 625, value.oneof_timestamp); ProtoAdapter.EMPTY.encodeWithTag(writer, 624, value.oneof_empty); ProtoAdapter.STRUCT_LIST.encodeWithTag(writer, 621, value.oneof_list_value); ProtoAdapter.STRUCT_MAP.encodeWithTag(writer, 620, value.oneof_struct); ProtoAdapter.DURATION.encodeWithTag(writer, 619, value.oneof_duration); AnyMessage.ADAPTER.encodeWithTag(writer, 618, value.oneof_any); NestedMessage.ADAPTER.encodeWithTag(writer, 603, value.oneof_nested_message); ProtoAdapter.INT32.encodeWithTag(writer, 602, value.oneof_int32); ProtoAdapter.STRING.encodeWithTag(writer, 601, value.oneof_string); map_int32_timestampAdapter().encodeWithTag(writer, 525, value.map_int32_timestamp); map_int32_emptyAdapter().encodeWithTag(writer, 524, value.map_int32_empty); map_int32_null_valueAdapter().encodeWithTag(writer, 523, value.map_int32_null_value); map_int32_valueAdapter().encodeWithTag(writer, 522, value.map_int32_value); map_int32_list_valueAdapter().encodeWithTag(writer, 521, value.map_int32_list_value); map_int32_structAdapter().encodeWithTag(writer, 520, value.map_int32_struct); map_int32_durationAdapter().encodeWithTag(writer, 519, value.map_int32_duration); map_int32_anyAdapter().encodeWithTag(writer, 518, value.map_int32_any); map_string_enumAdapter().encodeWithTag(writer, 504, value.map_string_enum); map_string_messageAdapter().encodeWithTag(writer, 503, value.map_string_message); map_string_stringAdapter().encodeWithTag(writer, 502, value.map_string_string); map_int32_int32Adapter().encodeWithTag(writer, 501, value.map_int32_int32); ProtoAdapter.STRUCT_NULL.asPacked().encodeWithTag(writer, 323, value.pack_null_value); NestedEnum.ADAPTER.asPacked().encodeWithTag(writer, 316, value.pack_nested_enum); ProtoAdapter.DOUBLE.asPacked().encodeWithTag(writer, 313, value.pack_double); ProtoAdapter.FLOAT.asPacked().encodeWithTag(writer, 312, value.pack_float); ProtoAdapter.BOOL.asPacked().encodeWithTag(writer, 311, value.pack_bool); ProtoAdapter.SFIXED64.asPacked().encodeWithTag(writer, 310, value.pack_sfixed64); ProtoAdapter.FIXED64.asPacked().encodeWithTag(writer, 309, value.pack_fixed64); ProtoAdapter.SINT64.asPacked().encodeWithTag(writer, 308, value.pack_sint64); ProtoAdapter.UINT64.asPacked().encodeWithTag(writer, 307, value.pack_uint64); ProtoAdapter.INT64.asPacked().encodeWithTag(writer, 306, value.pack_int64); ProtoAdapter.SFIXED32.asPacked().encodeWithTag(writer, 305, value.pack_sfixed32); ProtoAdapter.FIXED32.asPacked().encodeWithTag(writer, 304, value.pack_fixed32); ProtoAdapter.SINT32.asPacked().encodeWithTag(writer, 303, value.pack_sint32); ProtoAdapter.UINT32.asPacked().encodeWithTag(writer, 302, value.pack_uint32); ProtoAdapter.INT32.asPacked().encodeWithTag(writer, 301, value.pack_int32); ProtoAdapter.INSTANT.asRepeated().encodeWithTag(writer, 225, value.rep_timestamp); ProtoAdapter.EMPTY.asRepeated().encodeWithTag(writer, 224, value.rep_empty); ProtoAdapter.STRUCT_NULL.asRepeated().encodeWithTag(writer, 223, value.rep_null_value); ProtoAdapter.STRUCT_VALUE.asRepeated().encodeWithTag(writer, 222, value.rep_value); ProtoAdapter.STRUCT_LIST.asRepeated().encodeWithTag(writer, 221, value.rep_list_value); ProtoAdapter.STRUCT_MAP.asRepeated().encodeWithTag(writer, 220, value.rep_struct); ProtoAdapter.DURATION.asRepeated().encodeWithTag(writer, 219, value.rep_duration); AnyMessage.ADAPTER.asRepeated().encodeWithTag(writer, 218, value.rep_any); NestedMessage.ADAPTER.asRepeated().encodeWithTag(writer, 217, value.rep_nested_message); NestedEnum.ADAPTER.asRepeated().encodeWithTag(writer, 216, value.rep_nested_enum); ProtoAdapter.BYTES.asRepeated().encodeWithTag(writer, 215, value.rep_bytes); ProtoAdapter.STRING.asRepeated().encodeWithTag(writer, 214, value.rep_string); ProtoAdapter.DOUBLE.asRepeated().encodeWithTag(writer, 213, value.rep_double); ProtoAdapter.FLOAT.asRepeated().encodeWithTag(writer, 212, value.rep_float); ProtoAdapter.BOOL.asRepeated().encodeWithTag(writer, 211, value.rep_bool); ProtoAdapter.SFIXED64.asRepeated().encodeWithTag(writer, 210, value.rep_sfixed64); ProtoAdapter.FIXED64.asRepeated().encodeWithTag(writer, 209, value.rep_fixed64); ProtoAdapter.SINT64.asRepeated().encodeWithTag(writer, 208, value.rep_sint64); ProtoAdapter.UINT64.asRepeated().encodeWithTag(writer, 207, value.rep_uint64); ProtoAdapter.INT64.asRepeated().encodeWithTag(writer, 206, value.rep_int64); ProtoAdapter.SFIXED32.asRepeated().encodeWithTag(writer, 205, value.rep_sfixed32); ProtoAdapter.FIXED32.asRepeated().encodeWithTag(writer, 204, value.rep_fixed32); ProtoAdapter.SINT32.asRepeated().encodeWithTag(writer, 203, value.rep_sint32); ProtoAdapter.UINT32.asRepeated().encodeWithTag(writer, 202, value.rep_uint32); ProtoAdapter.INT32.asRepeated().encodeWithTag(writer, 201, value.rep_int32); ProtoAdapter.BYTES.encodeWithTag(writer, 115, value.opt_bytes); ProtoAdapter.STRING.encodeWithTag(writer, 114, value.opt_string); ProtoAdapter.DOUBLE.encodeWithTag(writer, 113, value.opt_double); ProtoAdapter.FLOAT.encodeWithTag(writer, 112, value.opt_float); ProtoAdapter.BOOL.encodeWithTag(writer, 111, value.opt_bool); ProtoAdapter.SFIXED64.encodeWithTag(writer, 110, value.opt_sfixed64); ProtoAdapter.FIXED64.encodeWithTag(writer, 109, value.opt_fixed64); ProtoAdapter.SINT64.encodeWithTag(writer, 108, value.opt_sint64); ProtoAdapter.UINT64.encodeWithTag(writer, 107, value.opt_uint64); ProtoAdapter.INT64.encodeWithTag(writer, 106, value.opt_int64); ProtoAdapter.SFIXED32.encodeWithTag(writer, 105, value.opt_sfixed32); ProtoAdapter.FIXED32.encodeWithTag(writer, 104, value.opt_fixed32); ProtoAdapter.SINT32.encodeWithTag(writer, 103, value.opt_sint32); ProtoAdapter.UINT32.encodeWithTag(writer, 102, value.opt_uint32); ProtoAdapter.INT32.encodeWithTag(writer, 101, value.opt_int32); if (!Objects.equals(value.timestamp, null)) ProtoAdapter.INSTANT.encodeWithTag(writer, 25, value.timestamp); if (!Objects.equals(value.empty, null)) ProtoAdapter.EMPTY.encodeWithTag(writer, 24, value.empty); if (!Objects.equals(value.null_value, null)) ProtoAdapter.STRUCT_NULL.encodeWithTag(writer, 23, value.null_value); if (!Objects.equals(value.value, null)) ProtoAdapter.STRUCT_VALUE.encodeWithTag(writer, 22, value.value); if (!Objects.equals(value.list_value, null)) ProtoAdapter.STRUCT_LIST.encodeWithTag(writer, 21, value.list_value); if (!Objects.equals(value.struct, null)) ProtoAdapter.STRUCT_MAP.encodeWithTag(writer, 20, value.struct); if (!Objects.equals(value.duration, null)) ProtoAdapter.DURATION.encodeWithTag(writer, 19, value.duration); if (!Objects.equals(value.any, null)) AnyMessage.ADAPTER.encodeWithTag(writer, 18, value.any); if (!Objects.equals(value.nested_message, null)) NestedMessage.ADAPTER.encodeWithTag(writer, 17, value.nested_message); if (!Objects.equals(value.nested_enum, NestedEnum.UNKNOWN)) NestedEnum.ADAPTER.encodeWithTag(writer, 16, value.nested_enum); if (!Objects.equals(value.bytes, ByteString.EMPTY)) ProtoAdapter.BYTES.encodeWithTag(writer, 15, value.bytes); if (!Objects.equals(value.string, "")) ProtoAdapter.STRING.encodeWithTag(writer, 14, value.string); if (!Objects.equals(value.double_, 0.0)) ProtoAdapter.DOUBLE.encodeWithTag(writer, 13, value.double_); if (!Objects.equals(value.float_, 0f)) ProtoAdapter.FLOAT.encodeWithTag(writer, 12, value.float_); if (!Objects.equals(value.bool, false)) ProtoAdapter.BOOL.encodeWithTag(writer, 11, value.bool); if (!Objects.equals(value.sfixed64, 0L)) ProtoAdapter.SFIXED64.encodeWithTag(writer, 10, value.sfixed64); if (!Objects.equals(value.fixed64, 0L)) ProtoAdapter.FIXED64.encodeWithTag(writer, 9, value.fixed64); if (!Objects.equals(value.sint64, 0L)) ProtoAdapter.SINT64.encodeWithTag(writer, 8, value.sint64); if (!Objects.equals(value.uint64, 0L)) ProtoAdapter.UINT64.encodeWithTag(writer, 7, value.uint64); if (!Objects.equals(value.int64, 0L)) ProtoAdapter.INT64.encodeWithTag(writer, 6, value.int64); if (!Objects.equals(value.sfixed32, 0)) ProtoAdapter.SFIXED32.encodeWithTag(writer, 5, value.sfixed32); if (!Objects.equals(value.fixed32, 0)) ProtoAdapter.FIXED32.encodeWithTag(writer, 4, value.fixed32); if (!Objects.equals(value.sint32, 0)) ProtoAdapter.SINT32.encodeWithTag(writer, 3, value.sint32); if (!Objects.equals(value.uint32, 0)) ProtoAdapter.UINT32.encodeWithTag(writer, 2, value.uint32); if (!Objects.equals(value.int32, 0)) ProtoAdapter.INT32.encodeWithTag(writer, 1, value.int32); } @Override public AllTypes 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.int32(ProtoAdapter.INT32.decode(reader)); break; case 2: builder.uint32(ProtoAdapter.UINT32.decode(reader)); break; case 3: builder.sint32(ProtoAdapter.SINT32.decode(reader)); break; case 4: builder.fixed32(ProtoAdapter.FIXED32.decode(reader)); break; case 5: builder.sfixed32(ProtoAdapter.SFIXED32.decode(reader)); break; case 6: builder.int64(ProtoAdapter.INT64.decode(reader)); break; case 7: builder.uint64(ProtoAdapter.UINT64.decode(reader)); break; case 8: builder.sint64(ProtoAdapter.SINT64.decode(reader)); break; case 9: builder.fixed64(ProtoAdapter.FIXED64.decode(reader)); break; case 10: builder.sfixed64(ProtoAdapter.SFIXED64.decode(reader)); break; case 11: builder.bool(ProtoAdapter.BOOL.decode(reader)); break; case 12: builder.float_(ProtoAdapter.FLOAT.decode(reader)); break; case 13: builder.double_(ProtoAdapter.DOUBLE.decode(reader)); break; case 14: builder.string(ProtoAdapter.STRING.decode(reader)); break; case 15: builder.bytes(ProtoAdapter.BYTES.decode(reader)); break; case 16: { try { builder.nested_enum(NestedEnum.ADAPTER.decode(reader)); } catch (ProtoAdapter.EnumConstantNotFoundException e) { builder.addUnknownField(tag, FieldEncoding.VARINT, (long) e.value); } break; } case 17: builder.nested_message(NestedMessage.ADAPTER.decode(reader)); break; case 18: builder.any(AnyMessage.ADAPTER.decode(reader)); break; case 19: builder.duration(ProtoAdapter.DURATION.decode(reader)); break; case 20: builder.struct(ProtoAdapter.STRUCT_MAP.decode(reader)); break; case 21: builder.list_value(ProtoAdapter.STRUCT_LIST.decode(reader)); break; case 22: builder.value(ProtoAdapter.STRUCT_VALUE.decode(reader)); break; case 23: builder.null_value((Void) ProtoAdapter.STRUCT_NULL.decode(reader)); break; case 24: builder.empty(ProtoAdapter.EMPTY.decode(reader)); break; case 25: builder.timestamp(ProtoAdapter.INSTANT.decode(reader)); break; case 101: builder.opt_int32(ProtoAdapter.INT32.decode(reader)); break; case 102: builder.opt_uint32(ProtoAdapter.UINT32.decode(reader)); break; case 103: builder.opt_sint32(ProtoAdapter.SINT32.decode(reader)); break; case 104: builder.opt_fixed32(ProtoAdapter.FIXED32.decode(reader)); break; case 105: builder.opt_sfixed32(ProtoAdapter.SFIXED32.decode(reader)); break; case 106: builder.opt_int64(ProtoAdapter.INT64.decode(reader)); break; case 107: builder.opt_uint64(ProtoAdapter.UINT64.decode(reader)); break; case 108: builder.opt_sint64(ProtoAdapter.SINT64.decode(reader)); break; case 109: builder.opt_fixed64(ProtoAdapter.FIXED64.decode(reader)); break; case 110: builder.opt_sfixed64(ProtoAdapter.SFIXED64.decode(reader)); break; case 111: builder.opt_bool(ProtoAdapter.BOOL.decode(reader)); break; case 112: builder.opt_float(ProtoAdapter.FLOAT.decode(reader)); break; case 113: builder.opt_double(ProtoAdapter.DOUBLE.decode(reader)); break; case 114: builder.opt_string(ProtoAdapter.STRING.decode(reader)); break; case 115: builder.opt_bytes(ProtoAdapter.BYTES.decode(reader)); break; case 201: builder.rep_int32.add(ProtoAdapter.INT32.decode(reader)); break; case 202: builder.rep_uint32.add(ProtoAdapter.UINT32.decode(reader)); break; case 203: builder.rep_sint32.add(ProtoAdapter.SINT32.decode(reader)); break; case 204: builder.rep_fixed32.add(ProtoAdapter.FIXED32.decode(reader)); break; case 205: builder.rep_sfixed32.add(ProtoAdapter.SFIXED32.decode(reader)); break; case 206: builder.rep_int64.add(ProtoAdapter.INT64.decode(reader)); break; case 207: builder.rep_uint64.add(ProtoAdapter.UINT64.decode(reader)); break; case 208: builder.rep_sint64.add(ProtoAdapter.SINT64.decode(reader)); break; case 209: builder.rep_fixed64.add(ProtoAdapter.FIXED64.decode(reader)); break; case 210: builder.rep_sfixed64.add(ProtoAdapter.SFIXED64.decode(reader)); break; case 211: builder.rep_bool.add(ProtoAdapter.BOOL.decode(reader)); break; case 212: builder.rep_float.add(ProtoAdapter.FLOAT.decode(reader)); break; case 213: builder.rep_double.add(ProtoAdapter.DOUBLE.decode(reader)); break; case 214: builder.rep_string.add(ProtoAdapter.STRING.decode(reader)); break; case 215: builder.rep_bytes.add(ProtoAdapter.BYTES.decode(reader)); break; case 216: { try { builder.rep_nested_enum.add(NestedEnum.ADAPTER.decode(reader)); } catch (ProtoAdapter.EnumConstantNotFoundException e) { builder.addUnknownField(tag, FieldEncoding.VARINT, (long) e.value); } break; } case 217: builder.rep_nested_message.add(NestedMessage.ADAPTER.decode(reader)); break; case 218: builder.rep_any.add(AnyMessage.ADAPTER.decode(reader)); break; case 219: builder.rep_duration.add(ProtoAdapter.DURATION.decode(reader)); break; case 220: builder.rep_struct.add(ProtoAdapter.STRUCT_MAP.decode(reader)); break; case 221: builder.rep_list_value.add(ProtoAdapter.STRUCT_LIST.decode(reader)); break; case 222: builder.rep_value.add(ProtoAdapter.STRUCT_VALUE.decode(reader)); break; case 223: builder.rep_null_value.add((Void) ProtoAdapter.STRUCT_NULL.decode(reader)); break; case 224: builder.rep_empty.add(ProtoAdapter.EMPTY.decode(reader)); break; case 225: builder.rep_timestamp.add(ProtoAdapter.INSTANT.decode(reader)); break; case 301: builder.pack_int32.add(ProtoAdapter.INT32.decode(reader)); break; case 302: builder.pack_uint32.add(ProtoAdapter.UINT32.decode(reader)); break; case 303: builder.pack_sint32.add(ProtoAdapter.SINT32.decode(reader)); break; case 304: builder.pack_fixed32.add(ProtoAdapter.FIXED32.decode(reader)); break; case 305: builder.pack_sfixed32.add(ProtoAdapter.SFIXED32.decode(reader)); break; case 306: builder.pack_int64.add(ProtoAdapter.INT64.decode(reader)); break; case 307: builder.pack_uint64.add(ProtoAdapter.UINT64.decode(reader)); break; case 308: builder.pack_sint64.add(ProtoAdapter.SINT64.decode(reader)); break; case 309: builder.pack_fixed64.add(ProtoAdapter.FIXED64.decode(reader)); break; case 310: builder.pack_sfixed64.add(ProtoAdapter.SFIXED64.decode(reader)); break; case 311: builder.pack_bool.add(ProtoAdapter.BOOL.decode(reader)); break; case 312: builder.pack_float.add(ProtoAdapter.FLOAT.decode(reader)); break; case 313: builder.pack_double.add(ProtoAdapter.DOUBLE.decode(reader)); break; case 316: { try { builder.pack_nested_enum.add(NestedEnum.ADAPTER.decode(reader)); } catch (ProtoAdapter.EnumConstantNotFoundException e) { builder.addUnknownField(tag, FieldEncoding.VARINT, (long) e.value); } break; } case 323: builder.pack_null_value.add((Void) ProtoAdapter.STRUCT_NULL.decode(reader)); break; case 501: builder.map_int32_int32.putAll(map_int32_int32Adapter().decode(reader)); break; case 502: builder.map_string_string.putAll(map_string_stringAdapter().decode(reader)); break; case 503: builder.map_string_message.putAll(map_string_messageAdapter().decode(reader)); break; case 504: builder.map_string_enum.putAll(map_string_enumAdapter().decode(reader)); break; case 518: builder.map_int32_any.putAll(map_int32_anyAdapter().decode(reader)); break; case 519: builder.map_int32_duration.putAll(map_int32_durationAdapter().decode(reader)); break; case 520: builder.map_int32_struct.putAll(map_int32_structAdapter().decode(reader)); break; case 521: builder.map_int32_list_value.putAll(map_int32_list_valueAdapter().decode(reader)); break; case 522: builder.map_int32_value.putAll(map_int32_valueAdapter().decode(reader)); break; case 523: builder.map_int32_null_value.putAll(map_int32_null_valueAdapter().decode(reader)); break; case 524: builder.map_int32_empty.putAll(map_int32_emptyAdapter().decode(reader)); break; case 525: builder.map_int32_timestamp.putAll(map_int32_timestampAdapter().decode(reader)); break; case 601: builder.oneof_string(ProtoAdapter.STRING.decode(reader)); break; case 602: builder.oneof_int32(ProtoAdapter.INT32.decode(reader)); break; case 603: builder.oneof_nested_message(NestedMessage.ADAPTER.decode(reader)); break; case 618: builder.oneof_any(AnyMessage.ADAPTER.decode(reader)); break; case 619: builder.oneof_duration(ProtoAdapter.DURATION.decode(reader)); break; case 620: builder.oneof_struct(ProtoAdapter.STRUCT_MAP.decode(reader)); break; case 621: builder.oneof_list_value(ProtoAdapter.STRUCT_LIST.decode(reader)); break; case 624: builder.oneof_empty(ProtoAdapter.EMPTY.decode(reader)); break; case 625: builder.oneof_timestamp(ProtoAdapter.INSTANT.decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public AllTypes redact(AllTypes value) { Builder builder = value.newBuilder(); if (builder.nested_message != null) builder.nested_message = NestedMessage.ADAPTER.redact(builder.nested_message); if (builder.any != null) builder.any = AnyMessage.ADAPTER.redact(builder.any); if (builder.duration != null) builder.duration = ProtoAdapter.DURATION.redact(builder.duration); if (builder.struct != null) builder.struct = ProtoAdapter.STRUCT_MAP.redact(builder.struct); if (builder.list_value != null) builder.list_value = ProtoAdapter.STRUCT_LIST.redact(builder.list_value); if (builder.value != null) builder.value = ProtoAdapter.STRUCT_VALUE.redact(builder.value); if (builder.empty != null) builder.empty = ProtoAdapter.EMPTY.redact(builder.empty); if (builder.timestamp != null) builder.timestamp = ProtoAdapter.INSTANT.redact(builder.timestamp); Internal.redactElements(builder.rep_nested_message, NestedMessage.ADAPTER); Internal.redactElements(builder.rep_any, AnyMessage.ADAPTER); Internal.redactElements(builder.rep_duration, ProtoAdapter.DURATION); Internal.redactElements(builder.rep_struct, ProtoAdapter.STRUCT_MAP); Internal.redactElements(builder.rep_list_value, ProtoAdapter.STRUCT_LIST); Internal.redactElements(builder.rep_value, ProtoAdapter.STRUCT_VALUE); Internal.redactElements(builder.rep_empty, ProtoAdapter.EMPTY); Internal.redactElements(builder.rep_timestamp, ProtoAdapter.INSTANT); Internal.redactElements(builder.map_string_message, NestedMessage.ADAPTER); Internal.redactElements(builder.map_int32_any, AnyMessage.ADAPTER); Internal.redactElements(builder.map_int32_duration, ProtoAdapter.DURATION); Internal.redactElements(builder.map_int32_struct, ProtoAdapter.STRUCT_MAP); Internal.redactElements(builder.map_int32_list_value, ProtoAdapter.STRUCT_LIST); Internal.redactElements(builder.map_int32_value, ProtoAdapter.STRUCT_VALUE); Internal.redactElements(builder.map_int32_empty, ProtoAdapter.EMPTY); Internal.redactElements(builder.map_int32_timestamp, ProtoAdapter.INSTANT); if (builder.oneof_nested_message != null) builder.oneof_nested_message = NestedMessage.ADAPTER.redact(builder.oneof_nested_message); if (builder.oneof_any != null) builder.oneof_any = AnyMessage.ADAPTER.redact(builder.oneof_any); if (builder.oneof_duration != null) builder.oneof_duration = ProtoAdapter.DURATION.redact(builder.oneof_duration); if (builder.oneof_struct != null) builder.oneof_struct = ProtoAdapter.STRUCT_MAP.redact(builder.oneof_struct); if (builder.oneof_list_value != null) builder.oneof_list_value = ProtoAdapter.STRUCT_LIST.redact(builder.oneof_list_value); if (builder.oneof_empty != null) builder.oneof_empty = ProtoAdapter.EMPTY.redact(builder.oneof_empty); if (builder.oneof_timestamp != null) builder.oneof_timestamp = ProtoAdapter.INSTANT.redact(builder.oneof_timestamp); builder.clearUnknownFields(); return builder.build(); } private ProtoAdapter<Map<Integer, Integer>> map_int32_int32Adapter() { ProtoAdapter<Map<Integer, Integer>> result = map_int32_int32; if (result == null) { result = ProtoAdapter.newMapAdapter(ProtoAdapter.INT32, ProtoAdapter.INT32); map_int32_int32 = result; } return result; } private ProtoAdapter<Map<String, String>> map_string_stringAdapter() { ProtoAdapter<Map<String, String>> result = map_string_string; if (result == null) { result = ProtoAdapter.newMapAdapter(ProtoAdapter.STRING, ProtoAdapter.STRING); map_string_string = result; } return result; } private ProtoAdapter<Map<String, NestedMessage>> map_string_messageAdapter() { ProtoAdapter<Map<String, NestedMessage>> result = map_string_message; if (result == null) { result = ProtoAdapter.newMapAdapter(ProtoAdapter.STRING, NestedMessage.ADAPTER); map_string_message = result; } return result; } private ProtoAdapter<Map<String, NestedEnum>> map_string_enumAdapter() { ProtoAdapter<Map<String, NestedEnum>> result = map_string_enum; if (result == null) { result = ProtoAdapter.newMapAdapter(ProtoAdapter.STRING, NestedEnum.ADAPTER); map_string_enum = result; } return result; } private ProtoAdapter<Map<Integer, AnyMessage>> map_int32_anyAdapter() { ProtoAdapter<Map<Integer, AnyMessage>> result = map_int32_any; if (result == null) { result = ProtoAdapter.newMapAdapter(ProtoAdapter.INT32, AnyMessage.ADAPTER); map_int32_any = result; } return result; } private ProtoAdapter<Map<Integer, Duration>> map_int32_durationAdapter() { ProtoAdapter<Map<Integer, Duration>> result = map_int32_duration; if (result == null) { result = ProtoAdapter.newMapAdapter(ProtoAdapter.INT32, ProtoAdapter.DURATION); map_int32_duration = result; } return result; } private ProtoAdapter<Map<Integer, Map<String, ?>>> map_int32_structAdapter() { ProtoAdapter<Map<Integer, Map<String, ?>>> result = map_int32_struct; if (result == null) { result = ProtoAdapter.newMapAdapter(ProtoAdapter.INT32, ProtoAdapter.STRUCT_MAP); map_int32_struct = result; } return result; } private ProtoAdapter<Map<Integer, List<?>>> map_int32_list_valueAdapter() { ProtoAdapter<Map<Integer, List<?>>> result = map_int32_list_value; if (result == null) { result = ProtoAdapter.newMapAdapter(ProtoAdapter.INT32, ProtoAdapter.STRUCT_LIST); map_int32_list_value = result; } return result; } private ProtoAdapter<Map<Integer, Object>> map_int32_valueAdapter() { ProtoAdapter<Map<Integer, Object>> result = map_int32_value; if (result == null) { result = ProtoAdapter.newMapAdapter(ProtoAdapter.INT32, ProtoAdapter.STRUCT_VALUE); map_int32_value = result; } return result; } private ProtoAdapter<Map<Integer, Void>> map_int32_null_valueAdapter() { ProtoAdapter<Map<Integer, Void>> result = map_int32_null_value; if (result == null) { result = ProtoAdapter.newMapAdapter(ProtoAdapter.INT32, ProtoAdapter.STRUCT_NULL); map_int32_null_value = result; } return result; } private ProtoAdapter<Map<Integer, Unit>> map_int32_emptyAdapter() { ProtoAdapter<Map<Integer, Unit>> result = map_int32_empty; if (result == null) { result = ProtoAdapter.newMapAdapter(ProtoAdapter.INT32, ProtoAdapter.EMPTY); map_int32_empty = result; } return result; } private ProtoAdapter<Map<Integer, Instant>> map_int32_timestampAdapter() { ProtoAdapter<Map<Integer, Instant>> result = map_int32_timestamp; if (result == null) { result = ProtoAdapter.newMapAdapter(ProtoAdapter.INT32, ProtoAdapter.INSTANT); map_int32_timestamp = result; } return result; } } }
7,089
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/foobar/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/foobar/protos/foo/Foo.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.foobar.Foo in foo.proto package com.squareup.foobar.protos.foo; import com.squareup.foobar.protos.bar.Bar; 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.Deprecated; import java.lang.Object; import java.lang.Override; import java.lang.String; import java.lang.StringBuilder; import okio.ByteString; @Deprecated public final class Foo extends Message<Foo, Foo.Builder> { public static final ProtoAdapter<Foo> ADAPTER = new ProtoAdapter_Foo(); private static final long serialVersionUID = 0L; @WireField( tag = 1, adapter = "com.squareup.foobar.protos.bar.Bar$Baz$Moo#ADAPTER" ) public final Bar.Baz.Moo moo; public Foo(Bar.Baz.Moo moo) { this(moo, ByteString.EMPTY); } public Foo(Bar.Baz.Moo moo, ByteString unknownFields) { super(ADAPTER, unknownFields); this.moo = moo; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.moo = moo; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof Foo)) return false; Foo o = (Foo) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(moo, o.moo); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + (moo != null ? moo.hashCode() : 0); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (moo != null) builder.append(", moo=").append(moo); return builder.replace(0, 2, "Foo{").append('}').toString(); } public static final class Builder extends Message.Builder<Foo, Builder> { public Bar.Baz.Moo moo; public Builder() { } public Builder moo(Bar.Baz.Moo moo) { this.moo = moo; return this; } @Override public Foo build() { return new Foo(moo, super.buildUnknownFields()); } } private static final class ProtoAdapter_Foo extends ProtoAdapter<Foo> { public ProtoAdapter_Foo() { super(FieldEncoding.LENGTH_DELIMITED, Foo.class, "type.googleapis.com/squareup.foobar.Foo", Syntax.PROTO_2, null, "foo.proto"); } @Override public int encodedSize(Foo value) { int result = 0; result += Bar.Baz.Moo.ADAPTER.encodedSizeWithTag(1, value.moo); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, Foo value) throws IOException { Bar.Baz.Moo.ADAPTER.encodeWithTag(writer, 1, value.moo); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, Foo value) throws IOException { writer.writeBytes(value.unknownFields()); Bar.Baz.Moo.ADAPTER.encodeWithTag(writer, 1, value.moo); } @Override public Foo 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.moo(Bar.Baz.Moo.ADAPTER.decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public Foo redact(Foo value) { Builder builder = value.newBuilder(); if (builder.moo != null) builder.moo = Bar.Baz.Moo.ADAPTER.redact(builder.moo); builder.clearUnknownFields(); return builder.build(); } } }
7,090
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/foobar/protos
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/foobar/protos/bar/Bar.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.foobar.Bar in bar.proto package com.squareup.foobar.protos.bar; 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.Object; import java.lang.Override; import java.lang.String; import java.lang.StringBuilder; import okio.ByteString; public final class Bar extends Message<Bar, Bar.Builder> { public static final ProtoAdapter<Bar> ADAPTER = new ProtoAdapter_Bar(); private static final long serialVersionUID = 0L; public Bar() { this(ByteString.EMPTY); } public Bar(ByteString unknownFields) { super(ADAPTER, unknownFields); } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof Bar)) return false; Bar o = (Bar) other; return unknownFields().equals(o.unknownFields()); } @Override public int hashCode() { return unknownFields().hashCode(); } @Override public String toString() { StringBuilder builder = new StringBuilder(); return builder.replace(0, 2, "Bar{").append('}').toString(); } public static final class Builder extends Message.Builder<Bar, Builder> { public Builder() { } @Override public Bar build() { return new Bar(super.buildUnknownFields()); } } public static final class Baz extends Message<Baz, Baz.Builder> { public static final ProtoAdapter<Baz> ADAPTER = new ProtoAdapter_Baz(); private static final long serialVersionUID = 0L; public Baz() { this(ByteString.EMPTY); } public Baz(ByteString unknownFields) { super(ADAPTER, unknownFields); } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof Baz)) return false; Baz o = (Baz) other; return unknownFields().equals(o.unknownFields()); } @Override public int hashCode() { return unknownFields().hashCode(); } @Override public String toString() { StringBuilder builder = new StringBuilder(); return builder.replace(0, 2, "Baz{").append('}').toString(); } public static final class Builder extends Message.Builder<Baz, Builder> { public Builder() { } @Override public Baz build() { return new Baz(super.buildUnknownFields()); } } public static final class Moo extends Message<Moo, Moo.Builder> { public static final ProtoAdapter<Moo> ADAPTER = new ProtoAdapter_Moo(); private static final long serialVersionUID = 0L; public static final String DEFAULT_BOO = ""; @WireField( tag = 1, adapter = "com.squareup.wire.ProtoAdapter#STRING" ) public final String boo; public Moo(String boo) { this(boo, ByteString.EMPTY); } public Moo(String boo, ByteString unknownFields) { super(ADAPTER, unknownFields); this.boo = boo; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.boo = boo; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof Moo)) return false; Moo o = (Moo) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(boo, o.boo); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + (boo != null ? boo.hashCode() : 0); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (boo != null) builder.append(", boo=").append(Internal.sanitize(boo)); return builder.replace(0, 2, "Moo{").append('}').toString(); } public static final class Builder extends Message.Builder<Moo, Builder> { public String boo; public Builder() { } public Builder boo(String boo) { this.boo = boo; return this; } @Override public Moo build() { return new Moo(boo, super.buildUnknownFields()); } } private static final class ProtoAdapter_Moo extends ProtoAdapter<Moo> { public ProtoAdapter_Moo() { super(FieldEncoding.LENGTH_DELIMITED, Moo.class, "type.googleapis.com/squareup.foobar.Bar.Baz.Moo", Syntax.PROTO_2, null, "bar.proto"); } @Override public int encodedSize(Moo value) { int result = 0; result += ProtoAdapter.STRING.encodedSizeWithTag(1, value.boo); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, Moo value) throws IOException { ProtoAdapter.STRING.encodeWithTag(writer, 1, value.boo); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, Moo value) throws IOException { writer.writeBytes(value.unknownFields()); ProtoAdapter.STRING.encodeWithTag(writer, 1, value.boo); } @Override public Moo 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.boo(ProtoAdapter.STRING.decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public Moo redact(Moo value) { Builder builder = value.newBuilder(); builder.clearUnknownFields(); return builder.build(); } } } private static final class ProtoAdapter_Baz extends ProtoAdapter<Baz> { public ProtoAdapter_Baz() { super(FieldEncoding.LENGTH_DELIMITED, Baz.class, "type.googleapis.com/squareup.foobar.Bar.Baz", Syntax.PROTO_2, null, "bar.proto"); } @Override public int encodedSize(Baz value) { int result = 0; result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, Baz value) throws IOException { writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, Baz value) throws IOException { writer.writeBytes(value.unknownFields()); } @Override public Baz decode(ProtoReader reader) throws IOException { Builder builder = new Builder(); long token = reader.beginMessage(); for (int tag; (tag = reader.nextTag()) != -1;) { switch (tag) { default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public Baz redact(Baz value) { Builder builder = value.newBuilder(); builder.clearUnknownFields(); return builder.build(); } } } private static final class ProtoAdapter_Bar extends ProtoAdapter<Bar> { public ProtoAdapter_Bar() { super(FieldEncoding.LENGTH_DELIMITED, Bar.class, "type.googleapis.com/squareup.foobar.Bar", Syntax.PROTO_2, null, "bar.proto"); } @Override public int encodedSize(Bar value) { int result = 0; result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, Bar value) throws IOException { writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, Bar value) throws IOException { writer.writeBytes(value.unknownFields()); } @Override public Bar decode(ProtoReader reader) throws IOException { Builder builder = new Builder(); long token = reader.beginMessage(); for (int tag; (tag = reader.nextTag()) != -1;) { switch (tag) { default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public Bar redact(Bar value) { Builder builder = value.newBuilder(); builder.clearUnknownFields(); return builder.build(); } } }
7,091
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/services/LetsDataRequest.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: com.squareup.services.LetsDataRequest in simple_service2.proto package com.squareup.services; 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.Object; import java.lang.Override; import java.lang.String; import java.lang.StringBuilder; import okio.ByteString; public final class LetsDataRequest extends Message<LetsDataRequest, LetsDataRequest.Builder> { public static final ProtoAdapter<LetsDataRequest> ADAPTER = new ProtoAdapter_LetsDataRequest(); private static final long serialVersionUID = 0L; public static final ByteString DEFAULT_DATA = ByteString.EMPTY; @WireField( tag = 1, adapter = "com.squareup.wire.ProtoAdapter#BYTES" ) public final ByteString data; public LetsDataRequest(ByteString data) { this(data, ByteString.EMPTY); } public LetsDataRequest(ByteString data, ByteString unknownFields) { super(ADAPTER, unknownFields); this.data = data; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.data = data; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof LetsDataRequest)) return false; LetsDataRequest o = (LetsDataRequest) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(data, o.data); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + (data != null ? data.hashCode() : 0); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (data != null) builder.append(", data=").append(data); return builder.replace(0, 2, "LetsDataRequest{").append('}').toString(); } public static final class Builder extends Message.Builder<LetsDataRequest, Builder> { public ByteString data; public Builder() { } public Builder data(ByteString data) { this.data = data; return this; } @Override public LetsDataRequest build() { return new LetsDataRequest(data, super.buildUnknownFields()); } } private static final class ProtoAdapter_LetsDataRequest extends ProtoAdapter<LetsDataRequest> { public ProtoAdapter_LetsDataRequest() { super(FieldEncoding.LENGTH_DELIMITED, LetsDataRequest.class, "type.googleapis.com/com.squareup.services.LetsDataRequest", Syntax.PROTO_2, null, "simple_service2.proto"); } @Override public int encodedSize(LetsDataRequest value) { int result = 0; result += ProtoAdapter.BYTES.encodedSizeWithTag(1, value.data); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, LetsDataRequest value) throws IOException { ProtoAdapter.BYTES.encodeWithTag(writer, 1, value.data); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, LetsDataRequest value) throws IOException { writer.writeBytes(value.unknownFields()); ProtoAdapter.BYTES.encodeWithTag(writer, 1, value.data); } @Override public LetsDataRequest 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.data(ProtoAdapter.BYTES.decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public LetsDataRequest redact(LetsDataRequest value) { Builder builder = value.newBuilder(); builder.clearUnknownFields(); return builder.build(); } } }
7,092
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/services/HeresAllTheDataRequest.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: com.squareup.services.HeresAllTheDataRequest in simple_service2.proto package com.squareup.services; 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.Object; import java.lang.Override; import java.lang.String; import java.lang.StringBuilder; import okio.ByteString; public final class HeresAllTheDataRequest extends Message<HeresAllTheDataRequest, HeresAllTheDataRequest.Builder> { public static final ProtoAdapter<HeresAllTheDataRequest> ADAPTER = new ProtoAdapter_HeresAllTheDataRequest(); private static final long serialVersionUID = 0L; public static final ByteString DEFAULT_DATA = ByteString.EMPTY; @WireField( tag = 1, adapter = "com.squareup.wire.ProtoAdapter#BYTES" ) public final ByteString data; public HeresAllTheDataRequest(ByteString data) { this(data, ByteString.EMPTY); } public HeresAllTheDataRequest(ByteString data, ByteString unknownFields) { super(ADAPTER, unknownFields); this.data = data; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.data = data; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof HeresAllTheDataRequest)) return false; HeresAllTheDataRequest o = (HeresAllTheDataRequest) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(data, o.data); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + (data != null ? data.hashCode() : 0); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (data != null) builder.append(", data=").append(data); return builder.replace(0, 2, "HeresAllTheDataRequest{").append('}').toString(); } public static final class Builder extends Message.Builder<HeresAllTheDataRequest, Builder> { public ByteString data; public Builder() { } public Builder data(ByteString data) { this.data = data; return this; } @Override public HeresAllTheDataRequest build() { return new HeresAllTheDataRequest(data, super.buildUnknownFields()); } } private static final class ProtoAdapter_HeresAllTheDataRequest extends ProtoAdapter<HeresAllTheDataRequest> { public ProtoAdapter_HeresAllTheDataRequest() { super(FieldEncoding.LENGTH_DELIMITED, HeresAllTheDataRequest.class, "type.googleapis.com/com.squareup.services.HeresAllTheDataRequest", Syntax.PROTO_2, null, "simple_service2.proto"); } @Override public int encodedSize(HeresAllTheDataRequest value) { int result = 0; result += ProtoAdapter.BYTES.encodedSizeWithTag(1, value.data); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, HeresAllTheDataRequest value) throws IOException { ProtoAdapter.BYTES.encodeWithTag(writer, 1, value.data); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, HeresAllTheDataRequest value) throws IOException { writer.writeBytes(value.unknownFields()); ProtoAdapter.BYTES.encodeWithTag(writer, 1, value.data); } @Override public HeresAllTheDataRequest 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.data(ProtoAdapter.BYTES.decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public HeresAllTheDataRequest redact(HeresAllTheDataRequest value) { Builder builder = value.newBuilder(); builder.clearUnknownFields(); return builder.build(); } } }
7,093
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/services/LetsDataResponse.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: com.squareup.services.LetsDataResponse in simple_service2.proto package com.squareup.services; 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.Object; import java.lang.Override; import java.lang.String; import java.lang.StringBuilder; import okio.ByteString; public final class LetsDataResponse extends Message<LetsDataResponse, LetsDataResponse.Builder> { public static final ProtoAdapter<LetsDataResponse> ADAPTER = new ProtoAdapter_LetsDataResponse(); private static final long serialVersionUID = 0L; public static final ByteString DEFAULT_DATA = ByteString.EMPTY; @WireField( tag = 1, adapter = "com.squareup.wire.ProtoAdapter#BYTES" ) public final ByteString data; public LetsDataResponse(ByteString data) { this(data, ByteString.EMPTY); } public LetsDataResponse(ByteString data, ByteString unknownFields) { super(ADAPTER, unknownFields); this.data = data; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.data = data; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof LetsDataResponse)) return false; LetsDataResponse o = (LetsDataResponse) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(data, o.data); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + (data != null ? data.hashCode() : 0); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (data != null) builder.append(", data=").append(data); return builder.replace(0, 2, "LetsDataResponse{").append('}').toString(); } public static final class Builder extends Message.Builder<LetsDataResponse, Builder> { public ByteString data; public Builder() { } public Builder data(ByteString data) { this.data = data; return this; } @Override public LetsDataResponse build() { return new LetsDataResponse(data, super.buildUnknownFields()); } } private static final class ProtoAdapter_LetsDataResponse extends ProtoAdapter<LetsDataResponse> { public ProtoAdapter_LetsDataResponse() { super(FieldEncoding.LENGTH_DELIMITED, LetsDataResponse.class, "type.googleapis.com/com.squareup.services.LetsDataResponse", Syntax.PROTO_2, null, "simple_service2.proto"); } @Override public int encodedSize(LetsDataResponse value) { int result = 0; result += ProtoAdapter.BYTES.encodedSizeWithTag(1, value.data); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, LetsDataResponse value) throws IOException { ProtoAdapter.BYTES.encodeWithTag(writer, 1, value.data); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, LetsDataResponse value) throws IOException { writer.writeBytes(value.unknownFields()); ProtoAdapter.BYTES.encodeWithTag(writer, 1, value.data); } @Override public LetsDataResponse 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.data(ProtoAdapter.BYTES.decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public LetsDataResponse redact(LetsDataResponse value) { Builder builder = value.newBuilder(); builder.clearUnknownFields(); return builder.build(); } } }
7,094
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/services/HeresAllTheDataResponse.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: com.squareup.services.HeresAllTheDataResponse in simple_service2.proto package com.squareup.services; 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.Object; import java.lang.Override; import java.lang.String; import java.lang.StringBuilder; import okio.ByteString; public final class HeresAllTheDataResponse extends Message<HeresAllTheDataResponse, HeresAllTheDataResponse.Builder> { public static final ProtoAdapter<HeresAllTheDataResponse> ADAPTER = new ProtoAdapter_HeresAllTheDataResponse(); private static final long serialVersionUID = 0L; public static final ByteString DEFAULT_DATA = ByteString.EMPTY; @WireField( tag = 1, adapter = "com.squareup.wire.ProtoAdapter#BYTES" ) public final ByteString data; public HeresAllTheDataResponse(ByteString data) { this(data, ByteString.EMPTY); } public HeresAllTheDataResponse(ByteString data, ByteString unknownFields) { super(ADAPTER, unknownFields); this.data = data; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.data = data; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof HeresAllTheDataResponse)) return false; HeresAllTheDataResponse o = (HeresAllTheDataResponse) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(data, o.data); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + (data != null ? data.hashCode() : 0); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (data != null) builder.append(", data=").append(data); return builder.replace(0, 2, "HeresAllTheDataResponse{").append('}').toString(); } public static final class Builder extends Message.Builder<HeresAllTheDataResponse, Builder> { public ByteString data; public Builder() { } public Builder data(ByteString data) { this.data = data; return this; } @Override public HeresAllTheDataResponse build() { return new HeresAllTheDataResponse(data, super.buildUnknownFields()); } } private static final class ProtoAdapter_HeresAllTheDataResponse extends ProtoAdapter<HeresAllTheDataResponse> { public ProtoAdapter_HeresAllTheDataResponse() { super(FieldEncoding.LENGTH_DELIMITED, HeresAllTheDataResponse.class, "type.googleapis.com/com.squareup.services.HeresAllTheDataResponse", Syntax.PROTO_2, null, "simple_service2.proto"); } @Override public int encodedSize(HeresAllTheDataResponse value) { int result = 0; result += ProtoAdapter.BYTES.encodedSizeWithTag(1, value.data); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, HeresAllTheDataResponse value) throws IOException { ProtoAdapter.BYTES.encodeWithTag(writer, 1, value.data); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, HeresAllTheDataResponse value) throws IOException { writer.writeBytes(value.unknownFields()); ProtoAdapter.BYTES.encodeWithTag(writer, 1, value.data); } @Override public HeresAllTheDataResponse 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.data(ProtoAdapter.BYTES.decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public HeresAllTheDataResponse redact(HeresAllTheDataResponse value) { Builder builder = value.newBuilder(); builder.clearUnknownFields(); return builder.build(); } } }
7,095
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/services
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/services/anotherpackage/SendDataResponse.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: com.squareup.services.anotherpackage.SendDataResponse in request_response.proto package com.squareup.services.anotherpackage; 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.Object; import java.lang.Override; import java.lang.String; import java.lang.StringBuilder; import okio.ByteString; public final class SendDataResponse extends Message<SendDataResponse, SendDataResponse.Builder> { public static final ProtoAdapter<SendDataResponse> ADAPTER = new ProtoAdapter_SendDataResponse(); private static final long serialVersionUID = 0L; public static final ByteString DEFAULT_DATA = ByteString.EMPTY; @WireField( tag = 1, adapter = "com.squareup.wire.ProtoAdapter#BYTES" ) public final ByteString data; public SendDataResponse(ByteString data) { this(data, ByteString.EMPTY); } public SendDataResponse(ByteString data, ByteString unknownFields) { super(ADAPTER, unknownFields); this.data = data; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.data = data; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof SendDataResponse)) return false; SendDataResponse o = (SendDataResponse) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(data, o.data); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + (data != null ? data.hashCode() : 0); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (data != null) builder.append(", data=").append(data); return builder.replace(0, 2, "SendDataResponse{").append('}').toString(); } public static final class Builder extends Message.Builder<SendDataResponse, Builder> { public ByteString data; public Builder() { } public Builder data(ByteString data) { this.data = data; return this; } @Override public SendDataResponse build() { return new SendDataResponse(data, super.buildUnknownFields()); } } private static final class ProtoAdapter_SendDataResponse extends ProtoAdapter<SendDataResponse> { public ProtoAdapter_SendDataResponse() { super(FieldEncoding.LENGTH_DELIMITED, SendDataResponse.class, "type.googleapis.com/com.squareup.services.anotherpackage.SendDataResponse", Syntax.PROTO_2, null, "request_response.proto"); } @Override public int encodedSize(SendDataResponse value) { int result = 0; result += ProtoAdapter.BYTES.encodedSizeWithTag(1, value.data); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, SendDataResponse value) throws IOException { ProtoAdapter.BYTES.encodeWithTag(writer, 1, value.data); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, SendDataResponse value) throws IOException { writer.writeBytes(value.unknownFields()); ProtoAdapter.BYTES.encodeWithTag(writer, 1, value.data); } @Override public SendDataResponse 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.data(ProtoAdapter.BYTES.decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public SendDataResponse redact(SendDataResponse value) { Builder builder = value.newBuilder(); builder.clearUnknownFields(); return builder.build(); } } }
7,096
0
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/services
Create_ds/wire/wire-tests/src/jvmJavaTest/proto-java/com/squareup/services/anotherpackage/SendDataRequest.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: com.squareup.services.anotherpackage.SendDataRequest in request_response.proto package com.squareup.services.anotherpackage; 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.Object; import java.lang.Override; import java.lang.String; import java.lang.StringBuilder; import okio.ByteString; public final class SendDataRequest extends Message<SendDataRequest, SendDataRequest.Builder> { public static final ProtoAdapter<SendDataRequest> ADAPTER = new ProtoAdapter_SendDataRequest(); private static final long serialVersionUID = 0L; public static final ByteString DEFAULT_DATA = ByteString.EMPTY; @WireField( tag = 1, adapter = "com.squareup.wire.ProtoAdapter#BYTES" ) public final ByteString data; public SendDataRequest(ByteString data) { this(data, ByteString.EMPTY); } public SendDataRequest(ByteString data, ByteString unknownFields) { super(ADAPTER, unknownFields); this.data = data; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.data = data; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof SendDataRequest)) return false; SendDataRequest o = (SendDataRequest) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(data, o.data); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + (data != null ? data.hashCode() : 0); super.hashCode = result; } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (data != null) builder.append(", data=").append(data); return builder.replace(0, 2, "SendDataRequest{").append('}').toString(); } public static final class Builder extends Message.Builder<SendDataRequest, Builder> { public ByteString data; public Builder() { } public Builder data(ByteString data) { this.data = data; return this; } @Override public SendDataRequest build() { return new SendDataRequest(data, super.buildUnknownFields()); } } private static final class ProtoAdapter_SendDataRequest extends ProtoAdapter<SendDataRequest> { public ProtoAdapter_SendDataRequest() { super(FieldEncoding.LENGTH_DELIMITED, SendDataRequest.class, "type.googleapis.com/com.squareup.services.anotherpackage.SendDataRequest", Syntax.PROTO_2, null, "request_response.proto"); } @Override public int encodedSize(SendDataRequest value) { int result = 0; result += ProtoAdapter.BYTES.encodedSizeWithTag(1, value.data); result += value.unknownFields().size(); return result; } @Override public void encode(ProtoWriter writer, SendDataRequest value) throws IOException { ProtoAdapter.BYTES.encodeWithTag(writer, 1, value.data); writer.writeBytes(value.unknownFields()); } @Override public void encode(ReverseProtoWriter writer, SendDataRequest value) throws IOException { writer.writeBytes(value.unknownFields()); ProtoAdapter.BYTES.encodeWithTag(writer, 1, value.data); } @Override public SendDataRequest 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.data(ProtoAdapter.BYTES.decode(reader)); break; default: { reader.readUnknownField(tag); } } } builder.addUnknownFields(reader.endMessageAndGetUnknownFields(token)); return builder.build(); } @Override public SendDataRequest redact(SendDataRequest value) { Builder builder = value.newBuilder(); builder.clearUnknownFields(); return builder.build(); } } }
7,097
0
Create_ds/wire/wire-tests/src/jvmJsonJavaTest/proto-java/squareup
Create_ds/wire/wire-tests/src/jvmJsonJavaTest/proto-java/squareup/proto3/AllWrappers.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.proto3.AllWrappers in all_wrappers.proto package squareup.proto3; import com.squareup.wire.Message; import com.squareup.wire.ProtoAdapter; import com.squareup.wire.Syntax; import com.squareup.wire.WireField; import com.squareup.wire.internal.Internal; import java.lang.Boolean; import java.lang.Double; import java.lang.Float; import java.lang.Integer; import java.lang.Long; import java.lang.Object; import java.lang.Override; import java.lang.String; import java.util.List; import java.util.Map; import okio.ByteString; public final class AllWrappers extends Message<AllWrappers, AllWrappers.Builder> { public static final ProtoAdapter<AllWrappers> ADAPTER = ProtoAdapter.newMessageAdapter(AllWrappers.class, "type.googleapis.com/squareup.proto3.AllWrappers", Syntax.PROTO_3); private static final long serialVersionUID = 0L; @WireField( tag = 1, adapter = "com.squareup.wire.ProtoAdapter#DOUBLE_VALUE", jsonName = "doubleValue" ) public final Double double_value; @WireField( tag = 2, adapter = "com.squareup.wire.ProtoAdapter#FLOAT_VALUE", jsonName = "floatValue" ) public final Float float_value; @WireField( tag = 3, adapter = "com.squareup.wire.ProtoAdapter#INT64_VALUE", jsonName = "int64Value" ) public final Long int64_value; @WireField( tag = 4, adapter = "com.squareup.wire.ProtoAdapter#UINT64_VALUE", jsonName = "uint64Value" ) public final Long uint64_value; @WireField( tag = 5, adapter = "com.squareup.wire.ProtoAdapter#INT32_VALUE", jsonName = "int32Value" ) public final Integer int32_value; @WireField( tag = 6, adapter = "com.squareup.wire.ProtoAdapter#UINT32_VALUE", jsonName = "uint32Value" ) public final Integer uint32_value; @WireField( tag = 7, adapter = "com.squareup.wire.ProtoAdapter#BOOL_VALUE", jsonName = "boolValue" ) public final Boolean bool_value; @WireField( tag = 8, adapter = "com.squareup.wire.ProtoAdapter#STRING_VALUE", jsonName = "stringValue" ) public final String string_value; @WireField( tag = 9, adapter = "com.squareup.wire.ProtoAdapter#BYTES_VALUE", jsonName = "bytesValue" ) public final ByteString bytes_value; @WireField( tag = 101, adapter = "com.squareup.wire.ProtoAdapter#DOUBLE_VALUE", label = WireField.Label.REPEATED, jsonName = "repDoubleValue" ) public final List<Double> rep_double_value; @WireField( tag = 102, adapter = "com.squareup.wire.ProtoAdapter#FLOAT_VALUE", label = WireField.Label.REPEATED, jsonName = "repFloatValue" ) public final List<Float> rep_float_value; @WireField( tag = 103, adapter = "com.squareup.wire.ProtoAdapter#INT64_VALUE", label = WireField.Label.REPEATED, jsonName = "repInt64Value" ) public final List<Long> rep_int64_value; @WireField( tag = 104, adapter = "com.squareup.wire.ProtoAdapter#UINT64_VALUE", label = WireField.Label.REPEATED, jsonName = "repUint64Value" ) public final List<Long> rep_uint64_value; @WireField( tag = 105, adapter = "com.squareup.wire.ProtoAdapter#INT32_VALUE", label = WireField.Label.REPEATED, jsonName = "repInt32Value" ) public final List<Integer> rep_int32_value; @WireField( tag = 106, adapter = "com.squareup.wire.ProtoAdapter#UINT32_VALUE", label = WireField.Label.REPEATED, jsonName = "repUint32Value" ) public final List<Integer> rep_uint32_value; @WireField( tag = 107, adapter = "com.squareup.wire.ProtoAdapter#BOOL_VALUE", label = WireField.Label.REPEATED, jsonName = "repBoolValue" ) public final List<Boolean> rep_bool_value; @WireField( tag = 108, adapter = "com.squareup.wire.ProtoAdapter#STRING_VALUE", label = WireField.Label.REPEATED, jsonName = "repStringValue" ) public final List<String> rep_string_value; @WireField( tag = 109, adapter = "com.squareup.wire.ProtoAdapter#BYTES_VALUE", label = WireField.Label.REPEATED, jsonName = "repBytesValue" ) public final List<ByteString> rep_bytes_value; @WireField( tag = 301, keyAdapter = "com.squareup.wire.ProtoAdapter#INT32", adapter = "com.squareup.wire.ProtoAdapter#DOUBLE_VALUE", jsonName = "mapInt32DoubleValue" ) public final Map<Integer, Double> map_int32_double_value; @WireField( tag = 302, keyAdapter = "com.squareup.wire.ProtoAdapter#INT32", adapter = "com.squareup.wire.ProtoAdapter#FLOAT_VALUE", jsonName = "mapInt32FloatValue" ) public final Map<Integer, Float> map_int32_float_value; @WireField( tag = 303, keyAdapter = "com.squareup.wire.ProtoAdapter#INT32", adapter = "com.squareup.wire.ProtoAdapter#INT64_VALUE", jsonName = "mapInt32Int64Value" ) public final Map<Integer, Long> map_int32_int64_value; @WireField( tag = 304, keyAdapter = "com.squareup.wire.ProtoAdapter#INT32", adapter = "com.squareup.wire.ProtoAdapter#UINT64_VALUE", jsonName = "mapInt32Uint64Value" ) public final Map<Integer, Long> map_int32_uint64_value; @WireField( tag = 305, keyAdapter = "com.squareup.wire.ProtoAdapter#INT32", adapter = "com.squareup.wire.ProtoAdapter#INT32_VALUE", jsonName = "mapInt32Int32Value" ) public final Map<Integer, Integer> map_int32_int32_value; @WireField( tag = 306, keyAdapter = "com.squareup.wire.ProtoAdapter#INT32", adapter = "com.squareup.wire.ProtoAdapter#UINT32_VALUE", jsonName = "mapInt32Uint32Value" ) public final Map<Integer, Integer> map_int32_uint32_value; @WireField( tag = 307, keyAdapter = "com.squareup.wire.ProtoAdapter#INT32", adapter = "com.squareup.wire.ProtoAdapter#BOOL_VALUE", jsonName = "mapInt32BoolValue" ) public final Map<Integer, Boolean> map_int32_bool_value; @WireField( tag = 308, keyAdapter = "com.squareup.wire.ProtoAdapter#INT32", adapter = "com.squareup.wire.ProtoAdapter#STRING_VALUE", jsonName = "mapInt32StringValue" ) public final Map<Integer, String> map_int32_string_value; @WireField( tag = 309, keyAdapter = "com.squareup.wire.ProtoAdapter#INT32", adapter = "com.squareup.wire.ProtoAdapter#BYTES_VALUE", jsonName = "mapInt32BytesValue" ) public final Map<Integer, ByteString> map_int32_bytes_value; public AllWrappers(Builder builder, ByteString unknownFields) { super(ADAPTER, unknownFields); this.double_value = builder.double_value; this.float_value = builder.float_value; this.int64_value = builder.int64_value; this.uint64_value = builder.uint64_value; this.int32_value = builder.int32_value; this.uint32_value = builder.uint32_value; this.bool_value = builder.bool_value; this.string_value = builder.string_value; this.bytes_value = builder.bytes_value; this.rep_double_value = Internal.immutableCopyOf("rep_double_value", builder.rep_double_value); this.rep_float_value = Internal.immutableCopyOf("rep_float_value", builder.rep_float_value); this.rep_int64_value = Internal.immutableCopyOf("rep_int64_value", builder.rep_int64_value); this.rep_uint64_value = Internal.immutableCopyOf("rep_uint64_value", builder.rep_uint64_value); this.rep_int32_value = Internal.immutableCopyOf("rep_int32_value", builder.rep_int32_value); this.rep_uint32_value = Internal.immutableCopyOf("rep_uint32_value", builder.rep_uint32_value); this.rep_bool_value = Internal.immutableCopyOf("rep_bool_value", builder.rep_bool_value); this.rep_string_value = Internal.immutableCopyOf("rep_string_value", builder.rep_string_value); this.rep_bytes_value = Internal.immutableCopyOf("rep_bytes_value", builder.rep_bytes_value); this.map_int32_double_value = Internal.immutableCopyOf("map_int32_double_value", builder.map_int32_double_value); this.map_int32_float_value = Internal.immutableCopyOf("map_int32_float_value", builder.map_int32_float_value); this.map_int32_int64_value = Internal.immutableCopyOf("map_int32_int64_value", builder.map_int32_int64_value); this.map_int32_uint64_value = Internal.immutableCopyOf("map_int32_uint64_value", builder.map_int32_uint64_value); this.map_int32_int32_value = Internal.immutableCopyOf("map_int32_int32_value", builder.map_int32_int32_value); this.map_int32_uint32_value = Internal.immutableCopyOf("map_int32_uint32_value", builder.map_int32_uint32_value); this.map_int32_bool_value = Internal.immutableCopyOf("map_int32_bool_value", builder.map_int32_bool_value); this.map_int32_string_value = Internal.immutableCopyOf("map_int32_string_value", builder.map_int32_string_value); this.map_int32_bytes_value = Internal.immutableCopyOf("map_int32_bytes_value", builder.map_int32_bytes_value); } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.double_value = double_value; builder.float_value = float_value; builder.int64_value = int64_value; builder.uint64_value = uint64_value; builder.int32_value = int32_value; builder.uint32_value = uint32_value; builder.bool_value = bool_value; builder.string_value = string_value; builder.bytes_value = bytes_value; builder.rep_double_value = Internal.copyOf(rep_double_value); builder.rep_float_value = Internal.copyOf(rep_float_value); builder.rep_int64_value = Internal.copyOf(rep_int64_value); builder.rep_uint64_value = Internal.copyOf(rep_uint64_value); builder.rep_int32_value = Internal.copyOf(rep_int32_value); builder.rep_uint32_value = Internal.copyOf(rep_uint32_value); builder.rep_bool_value = Internal.copyOf(rep_bool_value); builder.rep_string_value = Internal.copyOf(rep_string_value); builder.rep_bytes_value = Internal.copyOf(rep_bytes_value); builder.map_int32_double_value = Internal.copyOf(map_int32_double_value); builder.map_int32_float_value = Internal.copyOf(map_int32_float_value); builder.map_int32_int64_value = Internal.copyOf(map_int32_int64_value); builder.map_int32_uint64_value = Internal.copyOf(map_int32_uint64_value); builder.map_int32_int32_value = Internal.copyOf(map_int32_int32_value); builder.map_int32_uint32_value = Internal.copyOf(map_int32_uint32_value); builder.map_int32_bool_value = Internal.copyOf(map_int32_bool_value); builder.map_int32_string_value = Internal.copyOf(map_int32_string_value); builder.map_int32_bytes_value = Internal.copyOf(map_int32_bytes_value); builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof AllWrappers)) return false; AllWrappers o = (AllWrappers) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(double_value, o.double_value) && Internal.equals(float_value, o.float_value) && Internal.equals(int64_value, o.int64_value) && Internal.equals(uint64_value, o.uint64_value) && Internal.equals(int32_value, o.int32_value) && Internal.equals(uint32_value, o.uint32_value) && Internal.equals(bool_value, o.bool_value) && Internal.equals(string_value, o.string_value) && Internal.equals(bytes_value, o.bytes_value) && rep_double_value.equals(o.rep_double_value) && rep_float_value.equals(o.rep_float_value) && rep_int64_value.equals(o.rep_int64_value) && rep_uint64_value.equals(o.rep_uint64_value) && rep_int32_value.equals(o.rep_int32_value) && rep_uint32_value.equals(o.rep_uint32_value) && rep_bool_value.equals(o.rep_bool_value) && rep_string_value.equals(o.rep_string_value) && rep_bytes_value.equals(o.rep_bytes_value) && map_int32_double_value.equals(o.map_int32_double_value) && map_int32_float_value.equals(o.map_int32_float_value) && map_int32_int64_value.equals(o.map_int32_int64_value) && map_int32_uint64_value.equals(o.map_int32_uint64_value) && map_int32_int32_value.equals(o.map_int32_int32_value) && map_int32_uint32_value.equals(o.map_int32_uint32_value) && map_int32_bool_value.equals(o.map_int32_bool_value) && map_int32_string_value.equals(o.map_int32_string_value) && map_int32_bytes_value.equals(o.map_int32_bytes_value); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + (double_value != null ? double_value.hashCode() : 0); result = result * 37 + (float_value != null ? float_value.hashCode() : 0); result = result * 37 + (int64_value != null ? int64_value.hashCode() : 0); result = result * 37 + (uint64_value != null ? uint64_value.hashCode() : 0); result = result * 37 + (int32_value != null ? int32_value.hashCode() : 0); result = result * 37 + (uint32_value != null ? uint32_value.hashCode() : 0); result = result * 37 + (bool_value != null ? bool_value.hashCode() : 0); result = result * 37 + (string_value != null ? string_value.hashCode() : 0); result = result * 37 + (bytes_value != null ? bytes_value.hashCode() : 0); result = result * 37 + rep_double_value.hashCode(); result = result * 37 + rep_float_value.hashCode(); result = result * 37 + rep_int64_value.hashCode(); result = result * 37 + rep_uint64_value.hashCode(); result = result * 37 + rep_int32_value.hashCode(); result = result * 37 + rep_uint32_value.hashCode(); result = result * 37 + rep_bool_value.hashCode(); result = result * 37 + rep_string_value.hashCode(); result = result * 37 + rep_bytes_value.hashCode(); result = result * 37 + map_int32_double_value.hashCode(); result = result * 37 + map_int32_float_value.hashCode(); result = result * 37 + map_int32_int64_value.hashCode(); result = result * 37 + map_int32_uint64_value.hashCode(); result = result * 37 + map_int32_int32_value.hashCode(); result = result * 37 + map_int32_uint32_value.hashCode(); result = result * 37 + map_int32_bool_value.hashCode(); result = result * 37 + map_int32_string_value.hashCode(); result = result * 37 + map_int32_bytes_value.hashCode(); super.hashCode = result; } return result; } public static final class Builder extends Message.Builder<AllWrappers, Builder> { public Double double_value; public Float float_value; public Long int64_value; public Long uint64_value; public Integer int32_value; public Integer uint32_value; public Boolean bool_value; public String string_value; public ByteString bytes_value; public List<Double> rep_double_value; public List<Float> rep_float_value; public List<Long> rep_int64_value; public List<Long> rep_uint64_value; public List<Integer> rep_int32_value; public List<Integer> rep_uint32_value; public List<Boolean> rep_bool_value; public List<String> rep_string_value; public List<ByteString> rep_bytes_value; public Map<Integer, Double> map_int32_double_value; public Map<Integer, Float> map_int32_float_value; public Map<Integer, Long> map_int32_int64_value; public Map<Integer, Long> map_int32_uint64_value; public Map<Integer, Integer> map_int32_int32_value; public Map<Integer, Integer> map_int32_uint32_value; public Map<Integer, Boolean> map_int32_bool_value; public Map<Integer, String> map_int32_string_value; public Map<Integer, ByteString> map_int32_bytes_value; public Builder() { rep_double_value = Internal.newMutableList(); rep_float_value = Internal.newMutableList(); rep_int64_value = Internal.newMutableList(); rep_uint64_value = Internal.newMutableList(); rep_int32_value = Internal.newMutableList(); rep_uint32_value = Internal.newMutableList(); rep_bool_value = Internal.newMutableList(); rep_string_value = Internal.newMutableList(); rep_bytes_value = Internal.newMutableList(); map_int32_double_value = Internal.newMutableMap(); map_int32_float_value = Internal.newMutableMap(); map_int32_int64_value = Internal.newMutableMap(); map_int32_uint64_value = Internal.newMutableMap(); map_int32_int32_value = Internal.newMutableMap(); map_int32_uint32_value = Internal.newMutableMap(); map_int32_bool_value = Internal.newMutableMap(); map_int32_string_value = Internal.newMutableMap(); map_int32_bytes_value = Internal.newMutableMap(); } public Builder double_value(Double double_value) { this.double_value = double_value; return this; } public Builder float_value(Float float_value) { this.float_value = float_value; return this; } public Builder int64_value(Long int64_value) { this.int64_value = int64_value; return this; } public Builder uint64_value(Long uint64_value) { this.uint64_value = uint64_value; return this; } public Builder int32_value(Integer int32_value) { this.int32_value = int32_value; return this; } public Builder uint32_value(Integer uint32_value) { this.uint32_value = uint32_value; return this; } public Builder bool_value(Boolean bool_value) { this.bool_value = bool_value; return this; } public Builder string_value(String string_value) { this.string_value = string_value; return this; } public Builder bytes_value(ByteString bytes_value) { this.bytes_value = bytes_value; return this; } public Builder rep_double_value(List<Double> rep_double_value) { Internal.checkElementsNotNull(rep_double_value); this.rep_double_value = rep_double_value; return this; } public Builder rep_float_value(List<Float> rep_float_value) { Internal.checkElementsNotNull(rep_float_value); this.rep_float_value = rep_float_value; return this; } public Builder rep_int64_value(List<Long> rep_int64_value) { Internal.checkElementsNotNull(rep_int64_value); this.rep_int64_value = rep_int64_value; return this; } public Builder rep_uint64_value(List<Long> rep_uint64_value) { Internal.checkElementsNotNull(rep_uint64_value); this.rep_uint64_value = rep_uint64_value; return this; } public Builder rep_int32_value(List<Integer> rep_int32_value) { Internal.checkElementsNotNull(rep_int32_value); this.rep_int32_value = rep_int32_value; return this; } public Builder rep_uint32_value(List<Integer> rep_uint32_value) { Internal.checkElementsNotNull(rep_uint32_value); this.rep_uint32_value = rep_uint32_value; return this; } public Builder rep_bool_value(List<Boolean> rep_bool_value) { Internal.checkElementsNotNull(rep_bool_value); this.rep_bool_value = rep_bool_value; return this; } public Builder rep_string_value(List<String> rep_string_value) { Internal.checkElementsNotNull(rep_string_value); this.rep_string_value = rep_string_value; return this; } public Builder rep_bytes_value(List<ByteString> rep_bytes_value) { Internal.checkElementsNotNull(rep_bytes_value); this.rep_bytes_value = rep_bytes_value; return this; } public Builder map_int32_double_value(Map<Integer, Double> map_int32_double_value) { Internal.checkElementsNotNull(map_int32_double_value); this.map_int32_double_value = map_int32_double_value; return this; } public Builder map_int32_float_value(Map<Integer, Float> map_int32_float_value) { Internal.checkElementsNotNull(map_int32_float_value); this.map_int32_float_value = map_int32_float_value; return this; } public Builder map_int32_int64_value(Map<Integer, Long> map_int32_int64_value) { Internal.checkElementsNotNull(map_int32_int64_value); this.map_int32_int64_value = map_int32_int64_value; return this; } public Builder map_int32_uint64_value(Map<Integer, Long> map_int32_uint64_value) { Internal.checkElementsNotNull(map_int32_uint64_value); this.map_int32_uint64_value = map_int32_uint64_value; return this; } public Builder map_int32_int32_value(Map<Integer, Integer> map_int32_int32_value) { Internal.checkElementsNotNull(map_int32_int32_value); this.map_int32_int32_value = map_int32_int32_value; return this; } public Builder map_int32_uint32_value(Map<Integer, Integer> map_int32_uint32_value) { Internal.checkElementsNotNull(map_int32_uint32_value); this.map_int32_uint32_value = map_int32_uint32_value; return this; } public Builder map_int32_bool_value(Map<Integer, Boolean> map_int32_bool_value) { Internal.checkElementsNotNull(map_int32_bool_value); this.map_int32_bool_value = map_int32_bool_value; return this; } public Builder map_int32_string_value(Map<Integer, String> map_int32_string_value) { Internal.checkElementsNotNull(map_int32_string_value); this.map_int32_string_value = map_int32_string_value; return this; } public Builder map_int32_bytes_value(Map<Integer, ByteString> map_int32_bytes_value) { Internal.checkElementsNotNull(map_int32_bytes_value); this.map_int32_bytes_value = map_int32_bytes_value; return this; } @Override public AllWrappers build() { return new AllWrappers(this, super.buildUnknownFields()); } } }
7,098
0
Create_ds/wire/wire-tests/src/jvmJsonJavaTest/proto-java/squareup
Create_ds/wire/wire-tests/src/jvmJsonJavaTest/proto-java/squareup/proto3/CamelCase.java
// Code generated by Wire protocol buffer compiler, do not edit. // Source: squareup.proto3.CamelCase in camel_case.proto package squareup.proto3; import com.squareup.wire.Message; import com.squareup.wire.ProtoAdapter; import com.squareup.wire.Syntax; import com.squareup.wire.WireField; import com.squareup.wire.internal.Internal; import java.lang.Integer; import java.lang.Object; import java.lang.Override; import java.lang.String; import java.util.List; import java.util.Map; import okio.ByteString; public final class CamelCase extends Message<CamelCase, CamelCase.Builder> { public static final ProtoAdapter<CamelCase> ADAPTER = ProtoAdapter.newMessageAdapter(CamelCase.class, "type.googleapis.com/squareup.proto3.CamelCase", Syntax.PROTO_3); private static final long serialVersionUID = 0L; @WireField( tag = 1, adapter = "squareup.proto3.CamelCase$NestedCamelCase#ADAPTER", label = WireField.Label.OMIT_IDENTITY, jsonName = "nestedMessage" ) public final NestedCamelCase nested__message; @WireField( tag = 2, adapter = "com.squareup.wire.ProtoAdapter#INT32", label = WireField.Label.PACKED, jsonName = "RepInt32" ) public final List<Integer> _Rep_int32; @WireField( tag = 3, adapter = "com.squareup.wire.ProtoAdapter#STRING", label = WireField.Label.OMIT_IDENTITY, jsonName = "IDitItMyWAy" ) public final String IDitIt_my_wAy; @WireField( tag = 4, keyAdapter = "com.squareup.wire.ProtoAdapter#INT32", adapter = "com.squareup.wire.ProtoAdapter#INT32", jsonName = "mapInt32Int32" ) public final Map<Integer, Integer> map_int32_Int32; public CamelCase(NestedCamelCase nested__message, List<Integer> _Rep_int32, String IDitIt_my_wAy, Map<Integer, Integer> map_int32_Int32) { this(nested__message, _Rep_int32, IDitIt_my_wAy, map_int32_Int32, ByteString.EMPTY); } public CamelCase(NestedCamelCase nested__message, List<Integer> _Rep_int32, String IDitIt_my_wAy, Map<Integer, Integer> map_int32_Int32, ByteString unknownFields) { super(ADAPTER, unknownFields); this.nested__message = nested__message; this._Rep_int32 = Internal.immutableCopyOf("_Rep_int32", _Rep_int32); if (IDitIt_my_wAy == null) { throw new IllegalArgumentException("IDitIt_my_wAy == null"); } this.IDitIt_my_wAy = IDitIt_my_wAy; this.map_int32_Int32 = Internal.immutableCopyOf("map_int32_Int32", map_int32_Int32); } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.nested__message = nested__message; builder._Rep_int32 = Internal.copyOf(_Rep_int32); builder.IDitIt_my_wAy = IDitIt_my_wAy; builder.map_int32_Int32 = Internal.copyOf(map_int32_Int32); builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof CamelCase)) return false; CamelCase o = (CamelCase) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(nested__message, o.nested__message) && _Rep_int32.equals(o._Rep_int32) && Internal.equals(IDitIt_my_wAy, o.IDitIt_my_wAy) && map_int32_Int32.equals(o.map_int32_Int32); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + (nested__message != null ? nested__message.hashCode() : 0); result = result * 37 + _Rep_int32.hashCode(); result = result * 37 + (IDitIt_my_wAy != null ? IDitIt_my_wAy.hashCode() : 0); result = result * 37 + map_int32_Int32.hashCode(); super.hashCode = result; } return result; } public static final class Builder extends Message.Builder<CamelCase, Builder> { public NestedCamelCase nested__message; public List<Integer> _Rep_int32; public String IDitIt_my_wAy; public Map<Integer, Integer> map_int32_Int32; public Builder() { _Rep_int32 = Internal.newMutableList(); IDitIt_my_wAy = ""; map_int32_Int32 = Internal.newMutableMap(); } public Builder nested__message(NestedCamelCase nested__message) { this.nested__message = nested__message; return this; } public Builder _Rep_int32(List<Integer> _Rep_int32) { Internal.checkElementsNotNull(_Rep_int32); this._Rep_int32 = _Rep_int32; return this; } public Builder IDitIt_my_wAy(String IDitIt_my_wAy) { this.IDitIt_my_wAy = IDitIt_my_wAy; return this; } public Builder map_int32_Int32(Map<Integer, Integer> map_int32_Int32) { Internal.checkElementsNotNull(map_int32_Int32); this.map_int32_Int32 = map_int32_Int32; return this; } @Override public CamelCase build() { return new CamelCase(nested__message, _Rep_int32, IDitIt_my_wAy, map_int32_Int32, super.buildUnknownFields()); } } public static final class NestedCamelCase extends Message<NestedCamelCase, NestedCamelCase.Builder> { public static final ProtoAdapter<NestedCamelCase> ADAPTER = ProtoAdapter.newMessageAdapter(NestedCamelCase.class, "type.googleapis.com/squareup.proto3.CamelCase.NestedCamelCase", Syntax.PROTO_3); private static final long serialVersionUID = 0L; @WireField( tag = 1, adapter = "com.squareup.wire.ProtoAdapter#INT32", label = WireField.Label.OMIT_IDENTITY, jsonName = "oneInt32" ) public final int one_int32; public NestedCamelCase(int one_int32) { this(one_int32, ByteString.EMPTY); } public NestedCamelCase(int one_int32, ByteString unknownFields) { super(ADAPTER, unknownFields); this.one_int32 = one_int32; } @Override public Builder newBuilder() { Builder builder = new Builder(); builder.one_int32 = one_int32; builder.addUnknownFields(unknownFields()); return builder; } @Override public boolean equals(Object other) { if (other == this) return true; if (!(other instanceof NestedCamelCase)) return false; NestedCamelCase o = (NestedCamelCase) other; return unknownFields().equals(o.unknownFields()) && Internal.equals(one_int32, o.one_int32); } @Override public int hashCode() { int result = super.hashCode; if (result == 0) { result = unknownFields().hashCode(); result = result * 37 + Integer.hashCode(one_int32); super.hashCode = result; } return result; } public static final class Builder extends Message.Builder<NestedCamelCase, Builder> { public int one_int32; public Builder() { one_int32 = 0; } public Builder one_int32(int one_int32) { this.one_int32 = one_int32; return this; } @Override public NestedCamelCase build() { return new NestedCamelCase(one_int32, super.buildUnknownFields()); } } } }
7,099