-- Generated by github.com/davyxu/gosproto/sprotogen
-- DO NOT EDIT!

Enum = {

	MyCar = { 
		["Monkey"] = 0, 
		["Monk"] = 1, 
		["Pig"] = 2, 
	},
	
}

local sproto = {
	Schema = [[

.PhoneNumber {		
	number 0 : string 	
	type 1 : integer 
}

.Person {		
	name 0 : string 	
	id 1 : integer 	
	email 2 : string 	
	phone 3 : *PhoneNumber 
}

.AddressBook {		
	person 0 : *Person 
}

.MyData {		
	name 0 : string 	
	Type 1 : integer 	
	Int32 2 : integer 	
	Uint32 3 : integer 	
	Int64 4 : integer 	
	Uint64 5 : integer 	
	Bool 6 : boolean 	
	Float32 7 : integer 	
	Float64 8 : integer 	
	Stream 9 : string 
}

.MyProfile {		
	nameField 0 : MyData 	
	nameArray 1 : *MyData 	
	nameMap 2 : *MyData(Type) 
}

	]],

	NameByID = { 
		[4271979557] = "PhoneNumber",
		[1498745430] = "Person",
		[2618161298] = "AddressBook",
		[2244887298] = "MyData",
		[438153711] = "MyProfile",
	},
	
	IDByName = {},

	ResetByID = { 
		[4271979557] = function( obj ) -- PhoneNumber
			if obj == nil then return end 
			obj.number = "" 
			obj.type = 0 
		end, 
		[1498745430] = function( obj ) -- Person
			if obj == nil then return end 
			obj.name = "" 
			obj.id = 0 
			obj.email = "" 
			obj.phone = nil 
		end, 
		[2618161298] = function( obj ) -- AddressBook
			if obj == nil then return end 
			obj.person = nil 
		end, 
		[2244887298] = function( obj ) -- MyData
			if obj == nil then return end 
			obj.name = "" 
			obj.Type = 0 
			obj.Int32 = 0 
			obj.Uint32 = 0 
			obj.Int64 = 0 
			obj.Uint64 = 0 
			obj.Bool = false 
			obj.Float32 = 0 
			obj.Float64 = 0 
			obj.Stream = nil 
		end, 
		[438153711] = function( obj ) -- MyProfile
			if obj == nil then return end 
			obj.nameField = nil 
			obj.nameArray = nil 
			obj.nameMap = nil 
		end, 
	},
}

local t = sproto.IDByName
for k, v in pairs(sproto.NameByID) do
	t[v] = k
end

return sproto

