#!/usr/bin/env ruby
# Generated by the protocol buffer compiler. DO NOT EDIT!

require 'protocol_buffers'

module Demo
  # forward declarations
  class Customer < ::ProtocolBuffers::Message; end
  class Organization < ::ProtocolBuffers::Message; end

  class Customer < ::ProtocolBuffers::Message
    # forward declarations
    class EmailAddress < ::ProtocolBuffers::Message; end

    # enums
    module EmailType
      include ::ProtocolBuffers::Enum

      set_fully_qualified_name "demo.Customer.EmailType"

      PRIVATE = 0
      PROFESSIONAL = 1
    end

    set_fully_qualified_name "demo.Customer"

    # nested messages
    class EmailAddress < ::ProtocolBuffers::Message
      set_fully_qualified_name "demo.Customer.EmailAddress"

      required :string, :email, 1
      optional ::Demo::Customer::EmailType, :type, 2, :default => ::Demo::Customer::EmailType::PROFESSIONAL
    end

    required :int32, :id, 1
    required :string, :firstName, 2
    required :string, :lastName, 3
    repeated ::Demo::Customer::EmailAddress, :email, 5
  end

  class Organization < ::ProtocolBuffers::Message
    set_fully_qualified_name "demo.Organization"

    required :string, :name, 4
    repeated ::Demo::Customer, :customer, 1
  end

end
