protobuf 1.0.19

Rust implementation of Google protocol buffers
Documentation
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: aa.proto

public final class Aa {
  private Aa() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
  }
  /**
   * Protobuf enum {@code Foo}
   */
  public enum Foo
      implements com.google.protobuf.ProtocolMessageEnum {
    /**
     * <code>BAR = 1;</code>
     */
    BAR(0, 1),
    /**
     * <code>BAZ = 2;</code>
     */
    BAZ(1, 2),
    ;

    /**
     * <code>LAST = 2;</code>
     */
    public static final Foo LAST = BAZ;
    /**
     * <code>BAR = 1;</code>
     */
    public static final int BAR_VALUE = 1;
    /**
     * <code>BAZ = 2;</code>
     */
    public static final int BAZ_VALUE = 2;
    /**
     * <code>LAST = 2;</code>
     */
    public static final int LAST_VALUE = 2;


    public final int getNumber() { return value; }

    public static Foo valueOf(int value) {
      switch (value) {
        case 1: return BAR;
        case 2: return BAZ;
        default: return null;
      }
    }

    public static com.google.protobuf.Internal.EnumLiteMap<Foo>
        internalGetValueMap() {
      return internalValueMap;
    }
    private static com.google.protobuf.Internal.EnumLiteMap<Foo>
        internalValueMap =
          new com.google.protobuf.Internal.EnumLiteMap<Foo>() {
            public Foo findValueByNumber(int number) {
              return Foo.valueOf(number);
            }
          };

    public final com.google.protobuf.Descriptors.EnumValueDescriptor
        getValueDescriptor() {
      return getDescriptor().getValues().get(index);
    }
    public final com.google.protobuf.Descriptors.EnumDescriptor
        getDescriptorForType() {
      return getDescriptor();
    }
    public static final com.google.protobuf.Descriptors.EnumDescriptor
        getDescriptor() {
      return Aa.getDescriptor().getEnumTypes().get(0);
    }

    private static final Foo[] VALUES = {
      BAR, BAZ, LAST, 
    };

    public static Foo valueOf(
        com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
      if (desc.getType() != getDescriptor()) {
        throw new java.lang.IllegalArgumentException(
          "EnumValueDescriptor is not for this type.");
      }
      return VALUES[desc.getIndex()];
    }

    private final int index;
    private final int value;

    private Foo(int index, int value) {
      this.index = index;
      this.value = value;
    }

    // @@protoc_insertion_point(enum_scope:Foo)
  }


  public static com.google.protobuf.Descriptors.FileDescriptor
      getDescriptor() {
    return descriptor;
  }
  private static com.google.protobuf.Descriptors.FileDescriptor
      descriptor;
  static {
    java.lang.String[] descriptorData = {
      "\n\010aa.proto*%\n\003Foo\022\007\n\003BAR\020\001\022\007\n\003BAZ\020\002\022\010\n\004L" +
      "AST\020\002\032\002\020\001"
    };
    com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
        new com.google.protobuf.Descriptors.FileDescriptor.    InternalDescriptorAssigner() {
          public com.google.protobuf.ExtensionRegistry assignDescriptors(
              com.google.protobuf.Descriptors.FileDescriptor root) {
            descriptor = root;
            return null;
          }
        };
    com.google.protobuf.Descriptors.FileDescriptor
      .internalBuildGeneratedFileFrom(descriptorData,
        new com.google.protobuf.Descriptors.FileDescriptor[] {
        }, assigner);
  }

  // @@protoc_insertion_point(outer_class_scope)
}