Merge branch 'regen-protos' into fixdatastore
diff --git a/datastore/load.go b/datastore/load.go
index 38a6365..504fb6a 100644
--- a/datastore/load.go
+++ b/datastore/load.go
@@ -393,7 +393,7 @@
 			return ByteString(*v.StringValue), nil
 		} else if m == pb.Property_ENTITY_PROTO {
 			var ent pb.EntityProto
-			err := proto.Unmarshal([]byte(*v.StringValue), &ent)
+			err := proto.UnmarshalText(*v.StringValue, &ent)
 			if err != nil {
 				return nil, err
 			}
diff --git a/datastore/load_test.go b/datastore/load_test.go
index 46029bb..2ac868d 100644
--- a/datastore/load_test.go
+++ b/datastore/load_test.go
@@ -265,7 +265,7 @@
 func init() {
 	// simpleEntityProto corresponds to:
 	// Simple{I: testInt64}
-	simpleEntityProtob, err := proto.Marshal(&pb.EntityProto{
+	simpleEntityProto = proto.MarshalTextString(&pb.EntityProto{
 		Key: keyToProto("", incompleteKey),
 		Property: []*pb.Property{
 			&pb.Property{
@@ -278,17 +278,13 @@
 		},
 		EntityGroup: &pb.Path{},
 	})
-	if err != nil {
-		panic(err)
-	}
-	simpleEntityProto = string(simpleEntityProtob)
 
 	// nestedSimpleEntityProto corresponds to:
 	// NestedSimple{
 	// 	A: Simple{I: testInt64},
 	// 	I: testInt64,
 	// }
-	nestedSimpleEntityProtob, err := proto.Marshal(&pb.EntityProto{
+	nestedSimpleEntityProto = proto.MarshalTextString(&pb.EntityProto{
 		Key: keyToProto("", incompleteKey),
 		Property: []*pb.Property{
 			&pb.Property{
@@ -310,14 +306,10 @@
 		},
 		EntityGroup: &pb.Path{},
 	})
-	if err != nil {
-		panic(err)
-	}
-	nestedSimpleEntityProto = string(nestedSimpleEntityProtob)
 
 	// simpleTwoFieldsEntityProto corresponds to:
 	// SimpleTwoFields{S: testString2, SS: testString3}
-	simpleTwoFieldsEntityProtob, err := proto.Marshal(&pb.EntityProto{
+	simpleTwoFieldsEntityProto = proto.MarshalTextString(&pb.EntityProto{
 		Key: keyToProto("", incompleteKey),
 		Property: []*pb.Property{
 			&pb.Property{
@@ -337,14 +329,10 @@
 		},
 		EntityGroup: &pb.Path{},
 	})
-	if err != nil {
-		panic(err)
-	}
-	simpleTwoFieldsEntityProto = string(simpleTwoFieldsEntityProtob)
 
 	// simpleWithTagEntityProto corresponds to:
 	// SimpleWithTag{I: testInt64}
-	simpleWithTagEntityProtob, err := proto.Marshal(&pb.EntityProto{
+	simpleWithTagEntityProto = proto.MarshalTextString(&pb.EntityProto{
 		Key: keyToProto("", incompleteKey),
 		Property: []*pb.Property{
 			&pb.Property{
@@ -357,16 +345,12 @@
 		},
 		EntityGroup: &pb.Path{},
 	})
-	if err != nil {
-		panic(err)
-	}
-	simpleWithTagEntityProto = string(simpleWithTagEntityProtob)
 
 	// bDotBEntityProto corresponds to:
 	// BDotB{
 	// 	B: testString2,
 	// }
-	bDotBEntityProtob, err := proto.Marshal(&pb.EntityProto{
+	bDotBEntityProto = proto.MarshalTextString(&pb.EntityProto{
 		Key: keyToProto("", incompleteKey),
 		Property: []*pb.Property{
 			&pb.Property{
@@ -379,10 +363,6 @@
 		},
 		EntityGroup: &pb.Path{},
 	})
-	if err != nil {
-		panic(err)
-	}
-	bDotBEntityProto = string(bDotBEntityProtob)
 
 	// withKeyEntityProto corresponds to:
 	// WithKey{
@@ -390,7 +370,7 @@
 	// 	I: testInt64,
 	// 	K: testKey1a,
 	// }
-	withKeyEntityProtob, err := proto.Marshal(&pb.EntityProto{
+	withKeyEntityProto = proto.MarshalTextString(&pb.EntityProto{
 		Key: keyToProto("", testKey1a),
 		Property: []*pb.Property{
 			&pb.Property{
@@ -410,10 +390,6 @@
 		},
 		EntityGroup: &pb.Path{},
 	})
-	if err != nil {
-		panic(err)
-	}
-	withKeyEntityProto = string(withKeyEntityProtob)
 
 }
 
diff --git a/internal/app_identity/app_identity_service.pb.go b/internal/app_identity/app_identity_service.pb.go
index 9a2ff77..338115a 100644
--- a/internal/app_identity/app_identity_service.pb.go
+++ b/internal/app_identity/app_identity_service.pb.go
@@ -557,6 +557,7 @@
 	proto.RegisterType((*GetAccessTokenResponse)(nil), "appengine.GetAccessTokenResponse")
 	proto.RegisterType((*GetDefaultGcsBucketNameRequest)(nil), "appengine.GetDefaultGcsBucketNameRequest")
 	proto.RegisterType((*GetDefaultGcsBucketNameResponse)(nil), "appengine.GetDefaultGcsBucketNameResponse")
+	proto.RegisterEnum("appengine.AppIdentityServiceError_ErrorCode", AppIdentityServiceError_ErrorCode_name, AppIdentityServiceError_ErrorCode_value)
 }
 
 func init() {
diff --git a/internal/blobstore/blobstore_service.pb.go b/internal/blobstore/blobstore_service.pb.go
index faef13a..5e9fd9a 100644
--- a/internal/blobstore/blobstore_service.pb.go
+++ b/internal/blobstore/blobstore_service.pb.go
@@ -608,6 +608,7 @@
 	proto.RegisterType((*DecodeBlobKeyResponse)(nil), "appengine.DecodeBlobKeyResponse")
 	proto.RegisterType((*CreateEncodedGoogleStorageKeyRequest)(nil), "appengine.CreateEncodedGoogleStorageKeyRequest")
 	proto.RegisterType((*CreateEncodedGoogleStorageKeyResponse)(nil), "appengine.CreateEncodedGoogleStorageKeyResponse")
+	proto.RegisterEnum("appengine.BlobstoreServiceError_ErrorCode", BlobstoreServiceError_ErrorCode_name, BlobstoreServiceError_ErrorCode_value)
 }
 
 func init() {
diff --git a/internal/capability/capability_service.pb.go b/internal/capability/capability_service.pb.go
index 220fccf..6120992 100644
--- a/internal/capability/capability_service.pb.go
+++ b/internal/capability/capability_service.pb.go
@@ -169,6 +169,7 @@
 func init() {
 	proto.RegisterType((*IsEnabledRequest)(nil), "appengine.IsEnabledRequest")
 	proto.RegisterType((*IsEnabledResponse)(nil), "appengine.IsEnabledResponse")
+	proto.RegisterEnum("appengine.IsEnabledResponse_SummaryStatus", IsEnabledResponse_SummaryStatus_name, IsEnabledResponse_SummaryStatus_value)
 }
 
 func init() {
diff --git a/internal/channel/channel_service.pb.go b/internal/channel/channel_service.pb.go
index ba31ea2..afc596c 100644
--- a/internal/channel/channel_service.pb.go
+++ b/internal/channel/channel_service.pb.go
@@ -239,6 +239,7 @@
 	proto.RegisterType((*CreateChannelRequest)(nil), "appengine.CreateChannelRequest")
 	proto.RegisterType((*CreateChannelResponse)(nil), "appengine.CreateChannelResponse")
 	proto.RegisterType((*SendMessageRequest)(nil), "appengine.SendMessageRequest")
+	proto.RegisterEnum("appengine.ChannelServiceError_ErrorCode", ChannelServiceError_ErrorCode_name, ChannelServiceError_ErrorCode_value)
 }
 
 func init() {
diff --git a/internal/datastore/datastore_v3.pb.go b/internal/datastore/datastore_v3.pb.go
index 2fb7482..5b391d6 100644
--- a/internal/datastore/datastore_v3.pb.go
+++ b/internal/datastore/datastore_v3.pb.go
@@ -4096,6 +4096,18 @@
 	proto.RegisterType((*BeginTransactionRequest)(nil), "appengine.BeginTransactionRequest")
 	proto.RegisterType((*CommitResponse)(nil), "appengine.CommitResponse")
 	proto.RegisterType((*CommitResponse_Version)(nil), "appengine.CommitResponse.Version")
+	proto.RegisterEnum("appengine.Property_Meaning", Property_Meaning_name, Property_Meaning_value)
+	proto.RegisterEnum("appengine.Property_FtsTokenizationOption", Property_FtsTokenizationOption_name, Property_FtsTokenizationOption_value)
+	proto.RegisterEnum("appengine.EntityProto_Kind", EntityProto_Kind_name, EntityProto_Kind_value)
+	proto.RegisterEnum("appengine.Index_Property_Direction", Index_Property_Direction_name, Index_Property_Direction_value)
+	proto.RegisterEnum("appengine.CompositeIndex_State", CompositeIndex_State_name, CompositeIndex_State_value)
+	proto.RegisterEnum("appengine.Snapshot_Status", Snapshot_Status_name, Snapshot_Status_value)
+	proto.RegisterEnum("appengine.Query_Hint", Query_Hint_name, Query_Hint_value)
+	proto.RegisterEnum("appengine.Query_Filter_Operator", Query_Filter_Operator_name, Query_Filter_Operator_value)
+	proto.RegisterEnum("appengine.Query_Order_Direction", Query_Order_Direction_name, Query_Order_Direction_value)
+	proto.RegisterEnum("appengine.Error_ErrorCode", Error_ErrorCode_name, Error_ErrorCode_value)
+	proto.RegisterEnum("appengine.PutRequest_AutoIdPolicy", PutRequest_AutoIdPolicy_name, PutRequest_AutoIdPolicy_value)
+	proto.RegisterEnum("appengine.BeginTransactionRequest_TransactionMode", BeginTransactionRequest_TransactionMode_name, BeginTransactionRequest_TransactionMode_value)
 }
 
 func init() {
diff --git a/internal/image/images_service.pb.go b/internal/image/images_service.pb.go
index 2a229d8..bfc9c4a 100644
--- a/internal/image/images_service.pb.go
+++ b/internal/image/images_service.pb.go
@@ -1272,6 +1272,11 @@
 	proto.RegisterType((*ImagesGetUrlBaseResponse)(nil), "appengine.ImagesGetUrlBaseResponse")
 	proto.RegisterType((*ImagesDeleteUrlBaseRequest)(nil), "appengine.ImagesDeleteUrlBaseRequest")
 	proto.RegisterType((*ImagesDeleteUrlBaseResponse)(nil), "appengine.ImagesDeleteUrlBaseResponse")
+	proto.RegisterEnum("appengine.ImagesServiceError_ErrorCode", ImagesServiceError_ErrorCode_name, ImagesServiceError_ErrorCode_value)
+	proto.RegisterEnum("appengine.ImagesServiceTransform_Type", ImagesServiceTransform_Type_name, ImagesServiceTransform_Type_value)
+	proto.RegisterEnum("appengine.InputSettings_ORIENTATION_CORRECTION_TYPE", InputSettings_ORIENTATION_CORRECTION_TYPE_name, InputSettings_ORIENTATION_CORRECTION_TYPE_value)
+	proto.RegisterEnum("appengine.OutputSettings_MIME_TYPE", OutputSettings_MIME_TYPE_name, OutputSettings_MIME_TYPE_value)
+	proto.RegisterEnum("appengine.CompositeImageOptions_ANCHOR", CompositeImageOptions_ANCHOR_name, CompositeImageOptions_ANCHOR_value)
 }
 
 func init() {
diff --git a/internal/log/log_service.pb.go b/internal/log/log_service.pb.go
index 8545ac4..8a68b1f 100644
--- a/internal/log/log_service.pb.go
+++ b/internal/log/log_service.pb.go
@@ -1204,6 +1204,7 @@
 	proto.RegisterType((*LogUsageRecord)(nil), "appengine.LogUsageRecord")
 	proto.RegisterType((*LogUsageRequest)(nil), "appengine.LogUsageRequest")
 	proto.RegisterType((*LogUsageResponse)(nil), "appengine.LogUsageResponse")
+	proto.RegisterEnum("appengine.LogServiceError_ErrorCode", LogServiceError_ErrorCode_name, LogServiceError_ErrorCode_value)
 }
 
 func init() {
diff --git a/internal/mail/mail_service.pb.go b/internal/mail/mail_service.pb.go
index f9c9cae..60176ea 100644
--- a/internal/mail/mail_service.pb.go
+++ b/internal/mail/mail_service.pb.go
@@ -314,6 +314,7 @@
 	proto.RegisterType((*MailAttachment)(nil), "appengine.MailAttachment")
 	proto.RegisterType((*MailHeader)(nil), "appengine.MailHeader")
 	proto.RegisterType((*MailMessage)(nil), "appengine.MailMessage")
+	proto.RegisterEnum("appengine.MailServiceError_ErrorCode", MailServiceError_ErrorCode_name, MailServiceError_ErrorCode_value)
 }
 
 func init() {
diff --git a/internal/memcache/memcache_service.pb.go b/internal/memcache/memcache_service.pb.go
index 2c13399..75d8cb2 100644
--- a/internal/memcache/memcache_service.pb.go
+++ b/internal/memcache/memcache_service.pb.go
@@ -1464,6 +1464,12 @@
 	proto.RegisterType((*MemcacheGrabTailRequest)(nil), "appengine.MemcacheGrabTailRequest")
 	proto.RegisterType((*MemcacheGrabTailResponse)(nil), "appengine.MemcacheGrabTailResponse")
 	proto.RegisterType((*MemcacheGrabTailResponse_Item)(nil), "appengine.MemcacheGrabTailResponse.Item")
+	proto.RegisterEnum("appengine.MemcacheServiceError_ErrorCode", MemcacheServiceError_ErrorCode_name, MemcacheServiceError_ErrorCode_value)
+	proto.RegisterEnum("appengine.MemcacheSetRequest_SetPolicy", MemcacheSetRequest_SetPolicy_name, MemcacheSetRequest_SetPolicy_value)
+	proto.RegisterEnum("appengine.MemcacheSetResponse_SetStatusCode", MemcacheSetResponse_SetStatusCode_name, MemcacheSetResponse_SetStatusCode_value)
+	proto.RegisterEnum("appengine.MemcacheDeleteResponse_DeleteStatusCode", MemcacheDeleteResponse_DeleteStatusCode_name, MemcacheDeleteResponse_DeleteStatusCode_value)
+	proto.RegisterEnum("appengine.MemcacheIncrementRequest_Direction", MemcacheIncrementRequest_Direction_name, MemcacheIncrementRequest_Direction_value)
+	proto.RegisterEnum("appengine.MemcacheIncrementResponse_IncrementStatusCode", MemcacheIncrementResponse_IncrementStatusCode_name, MemcacheIncrementResponse_IncrementStatusCode_value)
 }
 
 func init() {
diff --git a/internal/modules/modules_service.pb.go b/internal/modules/modules_service.pb.go
index ddfc0c0..750519e 100644
--- a/internal/modules/modules_service.pb.go
+++ b/internal/modules/modules_service.pb.go
@@ -746,6 +746,7 @@
 	proto.RegisterType((*StopModuleResponse)(nil), "appengine.StopModuleResponse")
 	proto.RegisterType((*GetHostnameRequest)(nil), "appengine.GetHostnameRequest")
 	proto.RegisterType((*GetHostnameResponse)(nil), "appengine.GetHostnameResponse")
+	proto.RegisterEnum("appengine.ModulesServiceError_ErrorCode", ModulesServiceError_ErrorCode_name, ModulesServiceError_ErrorCode_value)
 }
 
 func init() {
diff --git a/internal/regen.sh b/internal/regen.sh
index 2fdb546..8f6636a 100755
--- a/internal/regen.sh
+++ b/internal/regen.sh
@@ -29,12 +29,3 @@
 	echo 1>&2 "* $dir"
 	protoc --go_out=. $dir/*.proto
 done
-
-for f in $(find $PKG/internal -name '*.pb.go'); do
-  # Remove proto.RegisterEnum calls.
-  # These cause duplicate registration panics when these packages
-  # are used on classic App Engine. proto.RegisterEnum only affects
-  # parsing the text format; we don't care about that.
-  # https://code.google.com/p/googleappengine/issues/detail?id=11670#c17
-  sed -i '/proto.RegisterEnum/d' $f
-done
diff --git a/internal/remote_api/remote_api.pb.go b/internal/remote_api/remote_api.pb.go
index 8d782a3..12d375b 100644
--- a/internal/remote_api/remote_api.pb.go
+++ b/internal/remote_api/remote_api.pb.go
@@ -316,6 +316,7 @@
 	proto.RegisterType((*ApplicationError)(nil), "remote_api.ApplicationError")
 	proto.RegisterType((*RpcError)(nil), "remote_api.RpcError")
 	proto.RegisterType((*Response)(nil), "remote_api.Response")
+	proto.RegisterEnum("remote_api.RpcError_ErrorCode", RpcError_ErrorCode_name, RpcError_ErrorCode_value)
 }
 
 func init() {
diff --git a/internal/search/search.pb.go b/internal/search/search.pb.go
index 86a65e5..ca46734 100644
--- a/internal/search/search.pb.go
+++ b/internal/search/search.pb.go
@@ -3260,6 +3260,20 @@
 	proto.RegisterType((*FacetResult)(nil), "search.FacetResult")
 	proto.RegisterType((*SearchResult)(nil), "search.SearchResult")
 	proto.RegisterType((*SearchResponse)(nil), "search.SearchResponse")
+	proto.RegisterEnum("search.Scope_Type", Scope_Type_name, Scope_Type_value)
+	proto.RegisterEnum("search.Entry_Permission", Entry_Permission_name, Entry_Permission_value)
+	proto.RegisterEnum("search.FieldValue_ContentType", FieldValue_ContentType_name, FieldValue_ContentType_value)
+	proto.RegisterEnum("search.FacetValue_ContentType", FacetValue_ContentType_name, FacetValue_ContentType_value)
+	proto.RegisterEnum("search.Document_OrderIdSource", Document_OrderIdSource_name, Document_OrderIdSource_value)
+	proto.RegisterEnum("search.Document_Storage", Document_Storage_name, Document_Storage_value)
+	proto.RegisterEnum("search.SearchServiceError_ErrorCode", SearchServiceError_ErrorCode_name, SearchServiceError_ErrorCode_value)
+	proto.RegisterEnum("search.IndexSpec_Consistency", IndexSpec_Consistency_name, IndexSpec_Consistency_value)
+	proto.RegisterEnum("search.IndexSpec_Source", IndexSpec_Source_name, IndexSpec_Source_value)
+	proto.RegisterEnum("search.IndexSpec_Mode", IndexSpec_Mode_name, IndexSpec_Mode_value)
+	proto.RegisterEnum("search.IndexDocumentParams_Freshness", IndexDocumentParams_Freshness_name, IndexDocumentParams_Freshness_value)
+	proto.RegisterEnum("search.ScorerSpec_Scorer", ScorerSpec_Scorer_name, ScorerSpec_Scorer_value)
+	proto.RegisterEnum("search.SearchParams_CursorType", SearchParams_CursorType_name, SearchParams_CursorType_value)
+	proto.RegisterEnum("search.SearchParams_ParsingMode", SearchParams_ParsingMode_name, SearchParams_ParsingMode_value)
 }
 
 func init() {
diff --git a/internal/socket/socket_service.pb.go b/internal/socket/socket_service.pb.go
index 4ec872e..b662866 100644
--- a/internal/socket/socket_service.pb.go
+++ b/internal/socket/socket_service.pb.go
@@ -2618,6 +2618,16 @@
 	proto.RegisterType((*PollReply)(nil), "appengine.PollReply")
 	proto.RegisterType((*ResolveRequest)(nil), "appengine.ResolveRequest")
 	proto.RegisterType((*ResolveReply)(nil), "appengine.ResolveReply")
+	proto.RegisterEnum("appengine.RemoteSocketServiceError_ErrorCode", RemoteSocketServiceError_ErrorCode_name, RemoteSocketServiceError_ErrorCode_value)
+	proto.RegisterEnum("appengine.RemoteSocketServiceError_SystemError", RemoteSocketServiceError_SystemError_name, RemoteSocketServiceError_SystemError_value)
+	proto.RegisterEnum("appengine.CreateSocketRequest_SocketFamily", CreateSocketRequest_SocketFamily_name, CreateSocketRequest_SocketFamily_value)
+	proto.RegisterEnum("appengine.CreateSocketRequest_SocketProtocol", CreateSocketRequest_SocketProtocol_name, CreateSocketRequest_SocketProtocol_value)
+	proto.RegisterEnum("appengine.SocketOption_SocketOptionLevel", SocketOption_SocketOptionLevel_name, SocketOption_SocketOptionLevel_value)
+	proto.RegisterEnum("appengine.SocketOption_SocketOptionName", SocketOption_SocketOptionName_name, SocketOption_SocketOptionName_value)
+	proto.RegisterEnum("appengine.ShutDownRequest_How", ShutDownRequest_How_name, ShutDownRequest_How_value)
+	proto.RegisterEnum("appengine.ReceiveRequest_Flags", ReceiveRequest_Flags_name, ReceiveRequest_Flags_value)
+	proto.RegisterEnum("appengine.PollEvent_PollEventFlag", PollEvent_PollEventFlag_name, PollEvent_PollEventFlag_value)
+	proto.RegisterEnum("appengine.ResolveReply_ErrorCode", ResolveReply_ErrorCode_name, ResolveReply_ErrorCode_value)
 }
 
 func init() {
diff --git a/internal/system/system_service.pb.go b/internal/system/system_service.pb.go
index 9ff458e..8b69711 100644
--- a/internal/system/system_service.pb.go
+++ b/internal/system/system_service.pb.go
@@ -327,6 +327,7 @@
 	proto.RegisterType((*GetSystemStatsResponse)(nil), "appengine.GetSystemStatsResponse")
 	proto.RegisterType((*StartBackgroundRequestRequest)(nil), "appengine.StartBackgroundRequestRequest")
 	proto.RegisterType((*StartBackgroundRequestResponse)(nil), "appengine.StartBackgroundRequestResponse")
+	proto.RegisterEnum("appengine.SystemServiceError_ErrorCode", SystemServiceError_ErrorCode_name, SystemServiceError_ErrorCode_value)
 }
 
 func init() {
diff --git a/internal/taskqueue/taskqueue_service.pb.go b/internal/taskqueue/taskqueue_service.pb.go
index 55465cc..09cf869 100644
--- a/internal/taskqueue/taskqueue_service.pb.go
+++ b/internal/taskqueue/taskqueue_service.pb.go
@@ -2966,6 +2966,10 @@
 	proto.RegisterType((*TaskQueueQueryAndOwnTasksResponse_Task)(nil), "appengine.TaskQueueQueryAndOwnTasksResponse.Task")
 	proto.RegisterType((*TaskQueueModifyTaskLeaseRequest)(nil), "appengine.TaskQueueModifyTaskLeaseRequest")
 	proto.RegisterType((*TaskQueueModifyTaskLeaseResponse)(nil), "appengine.TaskQueueModifyTaskLeaseResponse")
+	proto.RegisterEnum("appengine.TaskQueueServiceError_ErrorCode", TaskQueueServiceError_ErrorCode_name, TaskQueueServiceError_ErrorCode_value)
+	proto.RegisterEnum("appengine.TaskQueueMode_Mode", TaskQueueMode_Mode_name, TaskQueueMode_Mode_value)
+	proto.RegisterEnum("appengine.TaskQueueAddRequest_RequestMethod", TaskQueueAddRequest_RequestMethod_name, TaskQueueAddRequest_RequestMethod_value)
+	proto.RegisterEnum("appengine.TaskQueueQueryTasksResponse_Task_RequestMethod", TaskQueueQueryTasksResponse_Task_RequestMethod_name, TaskQueueQueryTasksResponse_Task_RequestMethod_value)
 }
 
 func init() {
diff --git a/internal/urlfetch/urlfetch_service.pb.go b/internal/urlfetch/urlfetch_service.pb.go
index 5f72775..11c1130 100644
--- a/internal/urlfetch/urlfetch_service.pb.go
+++ b/internal/urlfetch/urlfetch_service.pb.go
@@ -467,6 +467,8 @@
 	proto.RegisterType((*URLFetchRequest_Header)(nil), "appengine.URLFetchRequest.Header")
 	proto.RegisterType((*URLFetchResponse)(nil), "appengine.URLFetchResponse")
 	proto.RegisterType((*URLFetchResponse_Header)(nil), "appengine.URLFetchResponse.Header")
+	proto.RegisterEnum("appengine.URLFetchServiceError_ErrorCode", URLFetchServiceError_ErrorCode_name, URLFetchServiceError_ErrorCode_value)
+	proto.RegisterEnum("appengine.URLFetchRequest_RequestMethod", URLFetchRequest_RequestMethod_name, URLFetchRequest_RequestMethod_value)
 }
 
 func init() {
diff --git a/internal/user/user_service.pb.go b/internal/user/user_service.pb.go
index 8090a4e..90de363 100644
--- a/internal/user/user_service.pb.go
+++ b/internal/user/user_service.pb.go
@@ -484,6 +484,7 @@
 	proto.RegisterType((*GetOAuthUserResponse)(nil), "appengine.GetOAuthUserResponse")
 	proto.RegisterType((*CheckOAuthSignatureRequest)(nil), "appengine.CheckOAuthSignatureRequest")
 	proto.RegisterType((*CheckOAuthSignatureResponse)(nil), "appengine.CheckOAuthSignatureResponse")
+	proto.RegisterEnum("appengine.UserServiceError_ErrorCode", UserServiceError_ErrorCode_name, UserServiceError_ErrorCode_value)
 }
 
 func init() {
diff --git a/internal/xmpp/xmpp_service.pb.go b/internal/xmpp/xmpp_service.pb.go
index a35e9b4..0e29e70 100644
--- a/internal/xmpp/xmpp_service.pb.go
+++ b/internal/xmpp/xmpp_service.pb.go
@@ -672,6 +672,9 @@
 	proto.RegisterType((*XmppSendPresenceResponse)(nil), "appengine.XmppSendPresenceResponse")
 	proto.RegisterType((*XmppInviteRequest)(nil), "appengine.XmppInviteRequest")
 	proto.RegisterType((*XmppInviteResponse)(nil), "appengine.XmppInviteResponse")
+	proto.RegisterEnum("appengine.XmppServiceError_ErrorCode", XmppServiceError_ErrorCode_name, XmppServiceError_ErrorCode_value)
+	proto.RegisterEnum("appengine.PresenceResponse_SHOW", PresenceResponse_SHOW_name, PresenceResponse_SHOW_value)
+	proto.RegisterEnum("appengine.XmppMessageResponse_XmppMessageStatus", XmppMessageResponse_XmppMessageStatus_name, XmppMessageResponse_XmppMessageStatus_value)
 }
 
 func init() {