// Code generated by Wire protocol buffer compiler, do not edit.
// Source: squareup.proto3.AllTypes in all_types_proto3_test_proto3_optional.proto
package com.squareup.wire.proto3.alltypes;

import com.squareup.wire.Message;
import com.squareup.wire.ProtoAdapter;
import com.squareup.wire.Syntax;
import com.squareup.wire.WireEnum;
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 AllTypes extends Message<AllTypes, AllTypes.Builder> {
  public static final ProtoAdapter<AllTypes> ADAPTER = ProtoAdapter.newMessageAdapter(AllTypes.class, "type.googleapis.com/squareup.proto3.AllTypes", Syntax.PROTO_3);

  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,
      jsonName = "myInt32"
  )
  public final int my_int32;

  @WireField(
      tag = 2,
      adapter = "com.squareup.wire.ProtoAdapter#UINT32",
      label = WireField.Label.OMIT_IDENTITY,
      jsonName = "myUint32"
  )
  public final int my_uint32;

  @WireField(
      tag = 3,
      adapter = "com.squareup.wire.ProtoAdapter#SINT32",
      label = WireField.Label.OMIT_IDENTITY,
      jsonName = "mySint32"
  )
  public final int my_sint32;

  @WireField(
      tag = 4,
      adapter = "com.squareup.wire.ProtoAdapter#FIXED32",
      label = WireField.Label.OMIT_IDENTITY,
      jsonName = "myFixed32"
  )
  public final int my_fixed32;

  @WireField(
      tag = 5,
      adapter = "com.squareup.wire.ProtoAdapter#SFIXED32",
      label = WireField.Label.OMIT_IDENTITY,
      jsonName = "mySfixed32"
  )
  public final int my_sfixed32;

  @WireField(
      tag = 6,
      adapter = "com.squareup.wire.ProtoAdapter#INT64",
      label = WireField.Label.OMIT_IDENTITY,
      jsonName = "myInt64"
  )
  public final long my_int64;

  @WireField(
      tag = 7,
      adapter = "com.squareup.wire.ProtoAdapter#UINT64",
      label = WireField.Label.OMIT_IDENTITY,
      jsonName = "myUint64"
  )
  public final long my_uint64;

  @WireField(
      tag = 8,
      adapter = "com.squareup.wire.ProtoAdapter#SINT64",
      label = WireField.Label.OMIT_IDENTITY,
      jsonName = "mySint64"
  )
  public final long my_sint64;

  @WireField(
      tag = 9,
      adapter = "com.squareup.wire.ProtoAdapter#FIXED64",
      label = WireField.Label.OMIT_IDENTITY,
      jsonName = "myFixed64"
  )
  public final long my_fixed64;

  @WireField(
      tag = 10,
      adapter = "com.squareup.wire.ProtoAdapter#SFIXED64",
      label = WireField.Label.OMIT_IDENTITY,
      jsonName = "mySfixed64"
  )
  public final long my_sfixed64;

  @WireField(
      tag = 11,
      adapter = "com.squareup.wire.ProtoAdapter#BOOL",
      label = WireField.Label.OMIT_IDENTITY,
      jsonName = "myBool"
  )
  public final boolean my_bool;

  @WireField(
      tag = 12,
      adapter = "com.squareup.wire.ProtoAdapter#FLOAT",
      label = WireField.Label.OMIT_IDENTITY,
      jsonName = "myFloat"
  )
  public final float my_float;

  @WireField(
      tag = 13,
      adapter = "com.squareup.wire.ProtoAdapter#DOUBLE",
      label = WireField.Label.OMIT_IDENTITY,
      jsonName = "myDouble"
  )
  public final double my_double;

  @WireField(
      tag = 14,
      adapter = "com.squareup.wire.ProtoAdapter#STRING",
      label = WireField.Label.OMIT_IDENTITY,
      jsonName = "myString"
  )
  public final String my_string;

  @WireField(
      tag = 15,
      adapter = "com.squareup.wire.ProtoAdapter#BYTES",
      label = WireField.Label.OMIT_IDENTITY,
      jsonName = "myBytes"
  )
  public final ByteString my_bytes;

  @WireField(
      tag = 16,
      adapter = "com.squareup.wire.proto3.alltypes.AllTypes$NestedEnum#ADAPTER",
      label = WireField.Label.OMIT_IDENTITY,
      jsonName = "nestedEnum"
  )
  public final NestedEnum nested_enum;

  @WireField(
      tag = 17,
      adapter = "com.squareup.wire.proto3.alltypes.AllTypes$NestedMessage#ADAPTER",
      label = WireField.Label.OMIT_IDENTITY,
      jsonName = "nestedMessage"
  )
  public final NestedMessage nested_message;

  @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.alltypes.AllTypes$NestedEnum#ADAPTER",
      label = WireField.Label.REPEATED,
      jsonName = "repNestedEnum"
  )
  public final List<NestedEnum> rep_nested_enum;

  @WireField(
      tag = 217,
      adapter = "com.squareup.wire.proto3.alltypes.AllTypes$NestedMessage#ADAPTER",
      label = WireField.Label.REPEATED,
      jsonName = "repNestedMessage"
  )
  public final List<NestedMessage> rep_nested_message;

  @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.alltypes.AllTypes$NestedEnum#ADAPTER",
      label = WireField.Label.PACKED,
      jsonName = "packNestedEnum"
  )
  public final List<NestedEnum> pack_nested_enum;

  @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.alltypes.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.alltypes.AllTypes$NestedEnum#ADAPTER",
      jsonName = "mapStringEnum"
  )
  public final Map<String, NestedEnum> map_string_enum;

  @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.alltypes.AllTypes$NestedMessage#ADAPTER",
      jsonName = "oneofNestedMessage",
      oneofName = "choice"
  )
  public final NestedMessage oneof_nested_message;

  public AllTypes(Builder builder, ByteString unknownFields) {
    super(ADAPTER, unknownFields);
    if (Internal.countNonNull(builder.oneof_string, builder.oneof_int32, builder.oneof_nested_message) > 1) {
      throw new IllegalArgumentException("at most one of builder.oneof_string, builder.oneof_int32, builder.oneof_nested_message may be non-null");
    }
    this.my_int32 = builder.my_int32;
    this.my_uint32 = builder.my_uint32;
    this.my_sint32 = builder.my_sint32;
    this.my_fixed32 = builder.my_fixed32;
    this.my_sfixed32 = builder.my_sfixed32;
    this.my_int64 = builder.my_int64;
    this.my_uint64 = builder.my_uint64;
    this.my_sint64 = builder.my_sint64;
    this.my_fixed64 = builder.my_fixed64;
    this.my_sfixed64 = builder.my_sfixed64;
    this.my_bool = builder.my_bool;
    this.my_float = builder.my_float;
    this.my_double = builder.my_double;
    if (builder.my_string == null) {
      throw new IllegalArgumentException("builder.my_string == null");
    }
    this.my_string = builder.my_string;
    if (builder.my_bytes == null) {
      throw new IllegalArgumentException("builder.my_bytes == null");
    }
    this.my_bytes = builder.my_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.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.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.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.oneof_string = builder.oneof_string;
    this.oneof_int32 = builder.oneof_int32;
    this.oneof_nested_message = builder.oneof_nested_message;
  }

  @Override
  public Builder newBuilder() {
    Builder builder = new Builder();
    builder.my_int32 = my_int32;
    builder.my_uint32 = my_uint32;
    builder.my_sint32 = my_sint32;
    builder.my_fixed32 = my_fixed32;
    builder.my_sfixed32 = my_sfixed32;
    builder.my_int64 = my_int64;
    builder.my_uint64 = my_uint64;
    builder.my_sint64 = my_sint64;
    builder.my_fixed64 = my_fixed64;
    builder.my_sfixed64 = my_sfixed64;
    builder.my_bool = my_bool;
    builder.my_float = my_float;
    builder.my_double = my_double;
    builder.my_string = my_string;
    builder.my_bytes = my_bytes;
    builder.nested_enum = nested_enum;
    builder.nested_message = nested_message;
    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.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.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.oneof_string = oneof_string;
    builder.oneof_int32 = oneof_int32;
    builder.oneof_nested_message = oneof_nested_message;
    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(my_int32, o.my_int32)
        && Internal.equals(my_uint32, o.my_uint32)
        && Internal.equals(my_sint32, o.my_sint32)
        && Internal.equals(my_fixed32, o.my_fixed32)
        && Internal.equals(my_sfixed32, o.my_sfixed32)
        && Internal.equals(my_int64, o.my_int64)
        && Internal.equals(my_uint64, o.my_uint64)
        && Internal.equals(my_sint64, o.my_sint64)
        && Internal.equals(my_fixed64, o.my_fixed64)
        && Internal.equals(my_sfixed64, o.my_sfixed64)
        && Internal.equals(my_bool, o.my_bool)
        && Internal.equals(my_float, o.my_float)
        && Internal.equals(my_double, o.my_double)
        && Internal.equals(my_string, o.my_string)
        && Internal.equals(my_bytes, o.my_bytes)
        && Internal.equals(nested_enum, o.nested_enum)
        && Internal.equals(nested_message, o.nested_message)
        && 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)
        && 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)
        && 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(oneof_string, o.oneof_string)
        && Internal.equals(oneof_int32, o.oneof_int32)
        && Internal.equals(oneof_nested_message, o.oneof_nested_message);
  }

  @Override
  public int hashCode() {
    int result = super.hashCode;
    if (result == 0) {
      result = unknownFields().hashCode();
      result = result * 37 + Integer.hashCode(my_int32);
      result = result * 37 + Integer.hashCode(my_uint32);
      result = result * 37 + Integer.hashCode(my_sint32);
      result = result * 37 + Integer.hashCode(my_fixed32);
      result = result * 37 + Integer.hashCode(my_sfixed32);
      result = result * 37 + Long.hashCode(my_int64);
      result = result * 37 + Long.hashCode(my_uint64);
      result = result * 37 + Long.hashCode(my_sint64);
      result = result * 37 + Long.hashCode(my_fixed64);
      result = result * 37 + Long.hashCode(my_sfixed64);
      result = result * 37 + Boolean.hashCode(my_bool);
      result = result * 37 + Float.hashCode(my_float);
      result = result * 37 + Double.hashCode(my_double);
      result = result * 37 + (my_string != null ? my_string.hashCode() : 0);
      result = result * 37 + (my_bytes != null ? my_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 + (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 + 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 + 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 + (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);
      super.hashCode = result;
    }
    return result;
  }

  public static final class Builder extends Message.Builder<AllTypes, Builder> {
    public int my_int32;

    public int my_uint32;

    public int my_sint32;

    public int my_fixed32;

    public int my_sfixed32;

    public long my_int64;

    public long my_uint64;

    public long my_sint64;

    public long my_fixed64;

    public long my_sfixed64;

    public boolean my_bool;

    public float my_float;

    public double my_double;

    public String my_string;

    public ByteString my_bytes;

    public NestedEnum nested_enum;

    public NestedMessage nested_message;

    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<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 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 String oneof_string;

    public Integer oneof_int32;

    public NestedMessage oneof_nested_message;

    public Builder() {
      my_int32 = 0;
      my_uint32 = 0;
      my_sint32 = 0;
      my_fixed32 = 0;
      my_sfixed32 = 0;
      my_int64 = 0L;
      my_uint64 = 0L;
      my_sint64 = 0L;
      my_fixed64 = 0L;
      my_sfixed64 = 0L;
      my_bool = false;
      my_float = 0f;
      my_double = 0.0;
      my_string = "";
      my_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();
      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();
    }

    public Builder my_int32(int my_int32) {
      this.my_int32 = my_int32;
      return this;
    }

    public Builder my_uint32(int my_uint32) {
      this.my_uint32 = my_uint32;
      return this;
    }

    public Builder my_sint32(int my_sint32) {
      this.my_sint32 = my_sint32;
      return this;
    }

    public Builder my_fixed32(int my_fixed32) {
      this.my_fixed32 = my_fixed32;
      return this;
    }

    public Builder my_sfixed32(int my_sfixed32) {
      this.my_sfixed32 = my_sfixed32;
      return this;
    }

    public Builder my_int64(long my_int64) {
      this.my_int64 = my_int64;
      return this;
    }

    public Builder my_uint64(long my_uint64) {
      this.my_uint64 = my_uint64;
      return this;
    }

    public Builder my_sint64(long my_sint64) {
      this.my_sint64 = my_sint64;
      return this;
    }

    public Builder my_fixed64(long my_fixed64) {
      this.my_fixed64 = my_fixed64;
      return this;
    }

    public Builder my_sfixed64(long my_sfixed64) {
      this.my_sfixed64 = my_sfixed64;
      return this;
    }

    public Builder my_bool(boolean my_bool) {
      this.my_bool = my_bool;
      return this;
    }

    public Builder my_float(float my_float) {
      this.my_float = my_float;
      return this;
    }

    public Builder my_double(double my_double) {
      this.my_double = my_double;
      return this;
    }

    public Builder my_string(String my_string) {
      this.my_string = my_string;
      return this;
    }

    public Builder my_bytes(ByteString my_bytes) {
      this.my_bytes = my_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 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 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 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 oneof_string(String oneof_string) {
      this.oneof_string = oneof_string;
      this.oneof_int32 = null;
      this.oneof_nested_message = null;
      return this;
    }

    public Builder oneof_int32(Integer oneof_int32) {
      this.oneof_int32 = oneof_int32;
      this.oneof_string = null;
      this.oneof_nested_message = 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;
      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 = ProtoAdapter.newEnumAdapter(NestedEnum.class);

    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;
    }
  }

  public static final class NestedMessage extends Message<NestedMessage, NestedMessage.Builder> {
    public static final ProtoAdapter<NestedMessage> ADAPTER = ProtoAdapter.newMessageAdapter(NestedMessage.class, "type.googleapis.com/squareup.proto3.AllTypes.NestedMessage", Syntax.PROTO_3);

    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;
    }

    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());
      }
    }
  }
}
