/**
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.apache.avro.protobuf;

message Foo {
  // all the primitive types
  required    int32 int32    =  1;
  optional    int64 int64    =  2;
  optional   uint32 uint32   =  3;
  optional   uint64 uint64   =  4;
  optional   sint32 sint32   =  5;
  optional   sint64 sint64   =  6;
  optional  fixed32 fixed32  =  7;
  optional  fixed64 fixed64  =  8;
  optional sfixed32 sfixed32 =  9;
  optional sfixed64 sfixed64 = 10;
  optional    float float    = 11;
  optional   double double   = 12;
  optional     bool bool     = 13;
  optional   string string   = 14;
  optional    bytes bytes    = 15;
  optional        A enum     = 16 [default = Z];

  // some repeated types
  repeated    int32 intArray = 17;
  repeated    Foo   fooArray = 20;
  repeated    A     syms = 19;

  // a recursive type
  optional     Foo  foo      = 18;

}

// an enum
enum A {
  X = 1;
  Y = 2;
  Z = 3;
}

// a nested enum
message M {
  enum N {
    A = 1;
  }
}
