diff --git a/_examples/04_timeout/grpc/federation/federation.pb.go b/_examples/04_timeout/grpc/federation/federation.pb.go index 00ea8ed6..08fc68b3 100644 --- a/_examples/04_timeout/grpc/federation/federation.pb.go +++ b/_examples/04_timeout/grpc/federation/federation.pb.go @@ -1450,6 +1450,8 @@ type GRPCErrorDetail struct { Help []*errdetails.Help `protobuf:"bytes,12,rep,name=help,proto3" json:"help,omitempty"` // localized_message provides a localized error message that is safe to return to the user. LocalizedMessage []*errdetails.LocalizedMessage `protobuf:"bytes,13,rep,name=localized_message,json=localizedMessage,proto3" json:"localized_message,omitempty"` + // by specify a message in CEL to express the details of the error. + By []string `protobuf:"bytes,14,rep,name=by,proto3" json:"by,omitempty"` } func (x *GRPCErrorDetail) Reset() { @@ -1575,6 +1577,13 @@ func (x *GRPCErrorDetail) GetLocalizedMessage() []*errdetails.LocalizedMessage { return nil } +func (x *GRPCErrorDetail) GetBy() []string { + if x != nil { + return x.By + } + return nil +} + // Validation represents a validation rule against variables defined within the current scope. type ValidationExpr struct { state protoimpl.MessageState @@ -3176,7 +3185,7 @@ var file_grpc_federation_federation_proto_rawDesc = []byte{ 0x01, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x66, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xea, 0x05, 0x0a, 0x0f, 0x47, 0x52, 0x50, 0x43, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xfa, 0x05, 0x0a, 0x0f, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x66, 0x12, 0x35, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, @@ -3223,7 +3232,8 @@ var file_grpc_federation_federation_proto_rawDesc = []byte{ 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x10, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x22, 0x64, 0x0a, 0x0e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, + 0x73, 0x61, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x02, 0x62, 0x79, 0x22, 0x64, 0x0a, 0x0e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x72, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, diff --git a/_examples/05_async/grpc/federation/federation.pb.go b/_examples/05_async/grpc/federation/federation.pb.go index 00ea8ed6..08fc68b3 100644 --- a/_examples/05_async/grpc/federation/federation.pb.go +++ b/_examples/05_async/grpc/federation/federation.pb.go @@ -1450,6 +1450,8 @@ type GRPCErrorDetail struct { Help []*errdetails.Help `protobuf:"bytes,12,rep,name=help,proto3" json:"help,omitempty"` // localized_message provides a localized error message that is safe to return to the user. LocalizedMessage []*errdetails.LocalizedMessage `protobuf:"bytes,13,rep,name=localized_message,json=localizedMessage,proto3" json:"localized_message,omitempty"` + // by specify a message in CEL to express the details of the error. + By []string `protobuf:"bytes,14,rep,name=by,proto3" json:"by,omitempty"` } func (x *GRPCErrorDetail) Reset() { @@ -1575,6 +1577,13 @@ func (x *GRPCErrorDetail) GetLocalizedMessage() []*errdetails.LocalizedMessage { return nil } +func (x *GRPCErrorDetail) GetBy() []string { + if x != nil { + return x.By + } + return nil +} + // Validation represents a validation rule against variables defined within the current scope. type ValidationExpr struct { state protoimpl.MessageState @@ -3176,7 +3185,7 @@ var file_grpc_federation_federation_proto_rawDesc = []byte{ 0x01, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x66, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xea, 0x05, 0x0a, 0x0f, 0x47, 0x52, 0x50, 0x43, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xfa, 0x05, 0x0a, 0x0f, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x66, 0x12, 0x35, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, @@ -3223,7 +3232,8 @@ var file_grpc_federation_federation_proto_rawDesc = []byte{ 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x10, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x22, 0x64, 0x0a, 0x0e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, + 0x73, 0x61, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x02, 0x62, 0x79, 0x22, 0x64, 0x0a, 0x0e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x72, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, diff --git a/_examples/06_alias/grpc/federation/federation.pb.go b/_examples/06_alias/grpc/federation/federation.pb.go index 00ea8ed6..08fc68b3 100644 --- a/_examples/06_alias/grpc/federation/federation.pb.go +++ b/_examples/06_alias/grpc/federation/federation.pb.go @@ -1450,6 +1450,8 @@ type GRPCErrorDetail struct { Help []*errdetails.Help `protobuf:"bytes,12,rep,name=help,proto3" json:"help,omitempty"` // localized_message provides a localized error message that is safe to return to the user. LocalizedMessage []*errdetails.LocalizedMessage `protobuf:"bytes,13,rep,name=localized_message,json=localizedMessage,proto3" json:"localized_message,omitempty"` + // by specify a message in CEL to express the details of the error. + By []string `protobuf:"bytes,14,rep,name=by,proto3" json:"by,omitempty"` } func (x *GRPCErrorDetail) Reset() { @@ -1575,6 +1577,13 @@ func (x *GRPCErrorDetail) GetLocalizedMessage() []*errdetails.LocalizedMessage { return nil } +func (x *GRPCErrorDetail) GetBy() []string { + if x != nil { + return x.By + } + return nil +} + // Validation represents a validation rule against variables defined within the current scope. type ValidationExpr struct { state protoimpl.MessageState @@ -3176,7 +3185,7 @@ var file_grpc_federation_federation_proto_rawDesc = []byte{ 0x01, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x66, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xea, 0x05, 0x0a, 0x0f, 0x47, 0x52, 0x50, 0x43, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xfa, 0x05, 0x0a, 0x0f, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x66, 0x12, 0x35, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, @@ -3223,7 +3232,8 @@ var file_grpc_federation_federation_proto_rawDesc = []byte{ 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x10, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x22, 0x64, 0x0a, 0x0e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, + 0x73, 0x61, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x02, 0x62, 0x79, 0x22, 0x64, 0x0a, 0x0e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x72, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, diff --git a/_examples/09_multi_user/grpc/federation/federation.pb.go b/_examples/09_multi_user/grpc/federation/federation.pb.go index 00ea8ed6..08fc68b3 100644 --- a/_examples/09_multi_user/grpc/federation/federation.pb.go +++ b/_examples/09_multi_user/grpc/federation/federation.pb.go @@ -1450,6 +1450,8 @@ type GRPCErrorDetail struct { Help []*errdetails.Help `protobuf:"bytes,12,rep,name=help,proto3" json:"help,omitempty"` // localized_message provides a localized error message that is safe to return to the user. LocalizedMessage []*errdetails.LocalizedMessage `protobuf:"bytes,13,rep,name=localized_message,json=localizedMessage,proto3" json:"localized_message,omitempty"` + // by specify a message in CEL to express the details of the error. + By []string `protobuf:"bytes,14,rep,name=by,proto3" json:"by,omitempty"` } func (x *GRPCErrorDetail) Reset() { @@ -1575,6 +1577,13 @@ func (x *GRPCErrorDetail) GetLocalizedMessage() []*errdetails.LocalizedMessage { return nil } +func (x *GRPCErrorDetail) GetBy() []string { + if x != nil { + return x.By + } + return nil +} + // Validation represents a validation rule against variables defined within the current scope. type ValidationExpr struct { state protoimpl.MessageState @@ -3176,7 +3185,7 @@ var file_grpc_federation_federation_proto_rawDesc = []byte{ 0x01, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x66, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xea, 0x05, 0x0a, 0x0f, 0x47, 0x52, 0x50, 0x43, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xfa, 0x05, 0x0a, 0x0f, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x66, 0x12, 0x35, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, @@ -3223,7 +3232,8 @@ var file_grpc_federation_federation_proto_rawDesc = []byte{ 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x10, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x22, 0x64, 0x0a, 0x0e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, + 0x73, 0x61, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x02, 0x62, 0x79, 0x22, 0x64, 0x0a, 0x0e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x72, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, diff --git a/_examples/10_oneof/grpc/federation/federation.pb.go b/_examples/10_oneof/grpc/federation/federation.pb.go index 00ea8ed6..08fc68b3 100644 --- a/_examples/10_oneof/grpc/federation/federation.pb.go +++ b/_examples/10_oneof/grpc/federation/federation.pb.go @@ -1450,6 +1450,8 @@ type GRPCErrorDetail struct { Help []*errdetails.Help `protobuf:"bytes,12,rep,name=help,proto3" json:"help,omitempty"` // localized_message provides a localized error message that is safe to return to the user. LocalizedMessage []*errdetails.LocalizedMessage `protobuf:"bytes,13,rep,name=localized_message,json=localizedMessage,proto3" json:"localized_message,omitempty"` + // by specify a message in CEL to express the details of the error. + By []string `protobuf:"bytes,14,rep,name=by,proto3" json:"by,omitempty"` } func (x *GRPCErrorDetail) Reset() { @@ -1575,6 +1577,13 @@ func (x *GRPCErrorDetail) GetLocalizedMessage() []*errdetails.LocalizedMessage { return nil } +func (x *GRPCErrorDetail) GetBy() []string { + if x != nil { + return x.By + } + return nil +} + // Validation represents a validation rule against variables defined within the current scope. type ValidationExpr struct { state protoimpl.MessageState @@ -3176,7 +3185,7 @@ var file_grpc_federation_federation_proto_rawDesc = []byte{ 0x01, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x66, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xea, 0x05, 0x0a, 0x0f, 0x47, 0x52, 0x50, 0x43, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xfa, 0x05, 0x0a, 0x0f, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x66, 0x12, 0x35, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, @@ -3223,7 +3232,8 @@ var file_grpc_federation_federation_proto_rawDesc = []byte{ 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x10, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x22, 0x64, 0x0a, 0x0e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, + 0x73, 0x61, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x02, 0x62, 0x79, 0x22, 0x64, 0x0a, 0x0e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x72, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, diff --git a/_examples/11_multi_service/grpc/federation/federation.pb.go b/_examples/11_multi_service/grpc/federation/federation.pb.go index 00ea8ed6..08fc68b3 100644 --- a/_examples/11_multi_service/grpc/federation/federation.pb.go +++ b/_examples/11_multi_service/grpc/federation/federation.pb.go @@ -1450,6 +1450,8 @@ type GRPCErrorDetail struct { Help []*errdetails.Help `protobuf:"bytes,12,rep,name=help,proto3" json:"help,omitempty"` // localized_message provides a localized error message that is safe to return to the user. LocalizedMessage []*errdetails.LocalizedMessage `protobuf:"bytes,13,rep,name=localized_message,json=localizedMessage,proto3" json:"localized_message,omitempty"` + // by specify a message in CEL to express the details of the error. + By []string `protobuf:"bytes,14,rep,name=by,proto3" json:"by,omitempty"` } func (x *GRPCErrorDetail) Reset() { @@ -1575,6 +1577,13 @@ func (x *GRPCErrorDetail) GetLocalizedMessage() []*errdetails.LocalizedMessage { return nil } +func (x *GRPCErrorDetail) GetBy() []string { + if x != nil { + return x.By + } + return nil +} + // Validation represents a validation rule against variables defined within the current scope. type ValidationExpr struct { state protoimpl.MessageState @@ -3176,7 +3185,7 @@ var file_grpc_federation_federation_proto_rawDesc = []byte{ 0x01, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x66, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xea, 0x05, 0x0a, 0x0f, 0x47, 0x52, 0x50, 0x43, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xfa, 0x05, 0x0a, 0x0f, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x66, 0x12, 0x35, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, @@ -3223,7 +3232,8 @@ var file_grpc_federation_federation_proto_rawDesc = []byte{ 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x10, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x22, 0x64, 0x0a, 0x0e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, + 0x73, 0x61, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x02, 0x62, 0x79, 0x22, 0x64, 0x0a, 0x0e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x72, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, diff --git a/_examples/14_condition/grpc/federation/federation.pb.go b/_examples/14_condition/grpc/federation/federation.pb.go index 00ea8ed6..08fc68b3 100644 --- a/_examples/14_condition/grpc/federation/federation.pb.go +++ b/_examples/14_condition/grpc/federation/federation.pb.go @@ -1450,6 +1450,8 @@ type GRPCErrorDetail struct { Help []*errdetails.Help `protobuf:"bytes,12,rep,name=help,proto3" json:"help,omitempty"` // localized_message provides a localized error message that is safe to return to the user. LocalizedMessage []*errdetails.LocalizedMessage `protobuf:"bytes,13,rep,name=localized_message,json=localizedMessage,proto3" json:"localized_message,omitempty"` + // by specify a message in CEL to express the details of the error. + By []string `protobuf:"bytes,14,rep,name=by,proto3" json:"by,omitempty"` } func (x *GRPCErrorDetail) Reset() { @@ -1575,6 +1577,13 @@ func (x *GRPCErrorDetail) GetLocalizedMessage() []*errdetails.LocalizedMessage { return nil } +func (x *GRPCErrorDetail) GetBy() []string { + if x != nil { + return x.By + } + return nil +} + // Validation represents a validation rule against variables defined within the current scope. type ValidationExpr struct { state protoimpl.MessageState @@ -3176,7 +3185,7 @@ var file_grpc_federation_federation_proto_rawDesc = []byte{ 0x01, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x66, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xea, 0x05, 0x0a, 0x0f, 0x47, 0x52, 0x50, 0x43, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xfa, 0x05, 0x0a, 0x0f, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x66, 0x12, 0x35, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, @@ -3223,7 +3232,8 @@ var file_grpc_federation_federation_proto_rawDesc = []byte{ 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x10, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x22, 0x64, 0x0a, 0x0e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, + 0x73, 0x61, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x02, 0x62, 0x79, 0x22, 0x64, 0x0a, 0x0e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x72, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, diff --git a/_examples/17_error_handler/federation/federation.pb.go b/_examples/17_error_handler/federation/federation.pb.go index 1bc820b9..660370bd 100644 --- a/_examples/17_error_handler/federation/federation.pb.go +++ b/_examples/17_error_handler/federation/federation.pb.go @@ -280,14 +280,14 @@ var file_federation_federation_proto_rawDesc = []byte{ 0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x42, 0x09, 0x9a, 0x4a, 0x06, 0x12, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x52, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x3a, 0x1f, 0x9a, 0x4a, 0x1c, 0x0a, 0x1a, 0x0a, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x6a, 0x12, 0x0a, 0x04, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x0a, - 0x0a, 0x02, 0x69, 0x64, 0x12, 0x04, 0x24, 0x2e, 0x69, 0x64, 0x22, 0x8b, 0x05, 0x0a, 0x04, 0x50, + 0x0a, 0x02, 0x69, 0x64, 0x12, 0x04, 0x24, 0x2e, 0x69, 0x64, 0x22, 0xa1, 0x05, 0x0a, 0x04, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x3a, 0xdc, 0x04, 0x9a, 0x4a, 0xd8, 0x04, - 0x0a, 0xc1, 0x04, 0x0a, 0x03, 0x72, 0x65, 0x73, 0x72, 0xb9, 0x04, 0x0a, 0x18, 0x70, 0x6f, 0x73, + 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x3a, 0xf2, 0x04, 0x9a, 0x4a, 0xee, 0x04, + 0x0a, 0xd7, 0x04, 0x0a, 0x03, 0x72, 0x65, 0x73, 0x72, 0xcf, 0x04, 0x0a, 0x18, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x0a, 0x0a, 0x02, 0x69, 0x64, 0x12, 0x04, 0x24, 0x2e, 0x69, - 0x64, 0x2a, 0xa1, 0x03, 0x0a, 0x0a, 0x0a, 0x02, 0x69, 0x64, 0x5a, 0x04, 0x24, 0x2e, 0x69, 0x64, + 0x64, 0x2a, 0xb7, 0x03, 0x0a, 0x0a, 0x0a, 0x02, 0x69, 0x64, 0x5a, 0x04, 0x24, 0x2e, 0x69, 0x64, 0x12, 0xc2, 0x01, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x73, 0x5b, 0x3f, 0x30, 0x5d, 0x2e, 0x76, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5b, 0x3f, 0x30, @@ -302,7 +302,7 @@ var file_federation_federation_proto_rawDesc = []byte{ 0x3d, 0x3d, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x2e, 0x6f, 0x66, 0x28, 0x27, 0x78, 0x78, 0x78, 0x27, 0x29, 0x18, 0x09, 0x22, 0x1e, 0x27, 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x20, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x27, 0x2a, 0xab, 0x01, 0x12, 0x30, 0x0a, 0x0d, 0x6c, 0x6f, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x27, 0x2a, 0xc1, 0x01, 0x12, 0x30, 0x0a, 0x0d, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x6d, 0x73, 0x67, 0x6a, 0x1f, 0x0a, 0x10, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x0b, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x02, 0x69, 0x64, 0x1a, 0x24, 0x0a, 0x0d, @@ -313,44 +313,45 @@ var file_federation_federation_proto_rawDesc = []byte{ 0x63, 0x74, 0x27, 0x1a, 0x12, 0x27, 0x73, 0x6f, 0x6d, 0x65, 0x2d, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x27, 0x6a, 0x1c, 0x0a, 0x05, 0x65, 0x6e, 0x2d, 0x55, 0x53, 0x12, 0x13, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x6d, 0x73, 0x67, 0x2e, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2a, 0x65, 0x12, 0x2b, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x63, - 0x6f, 0x64, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, - 0x63, 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x2e, 0x55, 0x4e, 0x49, 0x4d, 0x50, 0x4c, 0x45, 0x4d, 0x45, - 0x4e, 0x54, 0x45, 0x44, 0x3a, 0x36, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, - 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x7b, 0x70, 0x6f, 0x73, 0x74, 0x3a, - 0x20, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x7b, 0x69, 0x64, 0x3a, 0x20, 0x27, - 0x61, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x6f, 0x75, 0x73, 0x27, 0x7d, 0x7d, 0x2a, 0x02, 0x30, 0x01, - 0x2a, 0x02, 0x18, 0x01, 0x0a, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x5a, 0x08, - 0x72, 0x65, 0x73, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x22, 0x4b, 0x0a, 0x10, 0x4c, 0x6f, 0x63, 0x61, - 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x37, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0x9a, 0x4a, 0x1e, - 0x12, 0x1c, 0x27, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x20, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x27, 0x20, 0x2b, 0x20, 0x24, 0x2e, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x56, 0x0a, 0x0d, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x45, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x33, 0x9a, 0x4a, 0x30, 0x12, 0x2e, 0x27, 0x63, 0x75, 0x73, 0x74, 0x6f, - 0x6d, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x3a, - 0x27, 0x20, 0x2b, 0x20, 0x24, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x69, 0x6e, 0x66, 0x6f, - 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x32, 0x66, 0x0a, - 0x11, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x1e, 0x2e, - 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, - 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, - 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, - 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x1a, 0x03, 0x9a, 0x4a, 0x00, 0x42, 0xb1, 0x01, 0x9a, 0x4a, 0x11, 0x12, 0x0f, 0x70, 0x6f, 0x73, - 0x74, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x0a, 0x12, 0x63, 0x6f, - 0x6d, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x42, 0x0f, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x1d, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x66, 0x65, 0x64, - 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0xa2, 0x02, 0x03, 0x4f, 0x46, 0x58, 0xaa, 0x02, 0x0e, 0x4f, 0x72, 0x67, 0x2e, 0x46, - 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xca, 0x02, 0x0e, 0x4f, 0x72, 0x67, 0x5c, - 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xe2, 0x02, 0x1a, 0x4f, 0x72, 0x67, - 0x5c, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x4f, 0x72, 0x67, 0x3a, 0x3a, 0x46, - 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x72, 0x14, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, + 0x7b, 0x69, 0x64, 0x3a, 0x20, 0x27, 0x66, 0x6f, 0x6f, 0x27, 0x7d, 0x2a, 0x65, 0x12, 0x2b, 0x65, + 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x2e, 0x55, 0x4e, 0x49, + 0x4d, 0x50, 0x4c, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x45, 0x44, 0x3a, 0x36, 0x70, 0x6f, 0x73, 0x74, + 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x7b, 0x70, 0x6f, 0x73, 0x74, 0x3a, 0x20, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, + 0x7b, 0x69, 0x64, 0x3a, 0x20, 0x27, 0x61, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x6f, 0x75, 0x73, 0x27, + 0x7d, 0x7d, 0x2a, 0x02, 0x30, 0x01, 0x2a, 0x02, 0x18, 0x01, 0x0a, 0x12, 0x0a, 0x04, 0x70, 0x6f, + 0x73, 0x74, 0x18, 0x01, 0x5a, 0x08, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x22, 0x4b, + 0x0a, 0x10, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x12, 0x37, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x21, 0x9a, 0x4a, 0x1e, 0x12, 0x1c, 0x27, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, + 0x65, 0x64, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x27, 0x20, 0x2b, 0x20, 0x24, 0x2e, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x56, 0x0a, 0x0d, 0x43, + 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x45, 0x0a, 0x03, + 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x33, 0x9a, 0x4a, 0x30, 0x12, 0x2e, + 0x27, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x20, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x3a, 0x27, 0x20, 0x2b, 0x20, 0x24, 0x2e, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x03, + 0x6d, 0x73, 0x67, 0x32, 0x66, 0x0a, 0x11, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x50, + 0x6f, 0x73, 0x74, 0x12, 0x1e, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x1a, 0x03, 0x9a, 0x4a, 0x00, 0x42, 0xb1, 0x01, 0x9a, 0x4a, + 0x11, 0x12, 0x0f, 0x70, 0x6f, 0x73, 0x74, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0f, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1d, 0x65, 0x78, 0x61, 0x6d, 0x70, + 0x6c, 0x65, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x66, 0x65, + 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xa2, 0x02, 0x03, 0x4f, 0x46, 0x58, 0xaa, 0x02, + 0x0e, 0x4f, 0x72, 0x67, 0x2e, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xca, + 0x02, 0x0e, 0x4f, 0x72, 0x67, 0x5c, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0xe2, 0x02, 0x1a, 0x4f, 0x72, 0x67, 0x5c, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, + 0x4f, 0x72, 0x67, 0x3a, 0x3a, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/_examples/17_error_handler/federation/federation_grpc_federation.pb.go b/_examples/17_error_handler/federation/federation_grpc_federation.pb.go index 6ed60b0c..c6c71f1b 100644 --- a/_examples/17_error_handler/federation/federation_grpc_federation.pb.go +++ b/_examples/17_error_handler/federation/federation_grpc_federation.pb.go @@ -562,6 +562,21 @@ func (s *FederationService) resolve_Org_Federation_Post(ctx context.Context, req }); detail != nil { details = append(details, detail) } + { + detail, err := grpcfed.EvalCEL(ctx, &grpcfed.EvalCELRequest{ + Value: value, + Expr: `post.Post{id: 'foo'}`, + UseContextLibrary: false, + OutType: reflect.TypeOf((*post.Post)(nil)), + CacheIndex: 13, + }) + if err != nil { + grpcfed.Logger(ctx).ErrorContext(ctx, "failed setting error details", slog.String("error", err.Error())) + } + if detail != nil { + details = append(details, detail.(grpcfed.ProtoMessage)) + } + } if detail := grpcfed.PreconditionFailure(ctx, value, []*grpcfed.PreconditionFailureViolation{ { Type: `'some-type'`, @@ -570,9 +585,9 @@ func (s *FederationService) resolve_Org_Federation_Post(ctx context.Context, req TypeUseContextLibrary: false, SubjectUseContextLibrary: false, DescUseContextLibrary: false, - TypeCacheIndex: 13, - SubjectCacheIndex: 14, - DescCacheIndex: 15, + TypeCacheIndex: 14, + SubjectCacheIndex: 15, + DescCacheIndex: 16, }, }); detail != nil { details = append(details, detail) @@ -582,7 +597,7 @@ func (s *FederationService) resolve_Org_Federation_Post(ctx context.Context, req Locale: "en-US", Message: `localized_msg.value`, UseContextLibrary: false, - CacheIndex: 16, + CacheIndex: 17, }); detail != nil { details = append(details, detail) } @@ -611,7 +626,7 @@ func (s *FederationService) resolve_Org_Federation_Post(ctx context.Context, req Value: value, Expr: `error.code == google.rpc.Code.UNIMPLEMENTED`, UseContextLibrary: false, - CacheIndex: 17, + CacheIndex: 18, Body: func(value *localValueType) error { stat = grpcfed.NewGRPCStatus(grpcfed.OKCode, "ignore error") if err := grpcfed.EvalDef(ctx, value, grpcfed.Def[*post.GetPostResponse, *localValueType]{ @@ -623,7 +638,7 @@ func (s *FederationService) resolve_Org_Federation_Post(ctx context.Context, req }, By: `post.GetPostResponse{post: post.Post{id: 'anonymous'}}`, ByUseContextLibrary: false, - ByCacheIndex: 18, + ByCacheIndex: 19, }); err != nil { grpcfed.Logger(ctx).ErrorContext(ctx, "failed to set response when ignored", slog.String("error", err.Error())) return nil @@ -640,7 +655,7 @@ func (s *FederationService) resolve_Org_Federation_Post(ctx context.Context, req Value: value, Expr: `true`, UseContextLibrary: false, - CacheIndex: 19, + CacheIndex: 20, Body: func(value *localValueType) error { stat = grpcfed.NewGRPCStatus(grpcfed.OKCode, "ignore error") return nil @@ -655,7 +670,7 @@ func (s *FederationService) resolve_Org_Federation_Post(ctx context.Context, req Value: value, Expr: `true`, UseContextLibrary: false, - CacheIndex: 20, + CacheIndex: 21, Body: func(value *localValueType) error { errorMessage := "error" stat = grpcfed.NewGRPCStatus(grpcfed.CancelledCode, errorMessage) @@ -706,7 +721,7 @@ func (s *FederationService) resolve_Org_Federation_Post(ctx context.Context, req }, By: `res.post`, ByUseContextLibrary: false, - ByCacheIndex: 21, + ByCacheIndex: 22, }); err != nil { grpcfed.RecordErrorToSpan(ctx, err) return nil, err diff --git a/_examples/17_error_handler/grpc/federation/federation.pb.go b/_examples/17_error_handler/grpc/federation/federation.pb.go index 00ea8ed6..08fc68b3 100644 --- a/_examples/17_error_handler/grpc/federation/federation.pb.go +++ b/_examples/17_error_handler/grpc/federation/federation.pb.go @@ -1450,6 +1450,8 @@ type GRPCErrorDetail struct { Help []*errdetails.Help `protobuf:"bytes,12,rep,name=help,proto3" json:"help,omitempty"` // localized_message provides a localized error message that is safe to return to the user. LocalizedMessage []*errdetails.LocalizedMessage `protobuf:"bytes,13,rep,name=localized_message,json=localizedMessage,proto3" json:"localized_message,omitempty"` + // by specify a message in CEL to express the details of the error. + By []string `protobuf:"bytes,14,rep,name=by,proto3" json:"by,omitempty"` } func (x *GRPCErrorDetail) Reset() { @@ -1575,6 +1577,13 @@ func (x *GRPCErrorDetail) GetLocalizedMessage() []*errdetails.LocalizedMessage { return nil } +func (x *GRPCErrorDetail) GetBy() []string { + if x != nil { + return x.By + } + return nil +} + // Validation represents a validation rule against variables defined within the current scope. type ValidationExpr struct { state protoimpl.MessageState @@ -3176,7 +3185,7 @@ var file_grpc_federation_federation_proto_rawDesc = []byte{ 0x01, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x66, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xea, 0x05, 0x0a, 0x0f, 0x47, 0x52, 0x50, 0x43, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xfa, 0x05, 0x0a, 0x0f, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x66, 0x12, 0x35, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, @@ -3223,7 +3232,8 @@ var file_grpc_federation_federation_proto_rawDesc = []byte{ 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x10, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x22, 0x64, 0x0a, 0x0e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, + 0x73, 0x61, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x02, 0x62, 0x79, 0x22, 0x64, 0x0a, 0x0e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x72, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, diff --git a/_examples/17_error_handler/grpc/federation/generator.pb.go b/_examples/17_error_handler/grpc/federation/generator.pb.go index 557cb44a..207d995b 100644 --- a/_examples/17_error_handler/grpc/federation/generator.pb.go +++ b/_examples/17_error_handler/grpc/federation/generator.pb.go @@ -3254,6 +3254,7 @@ type GRPCErrorDetail struct { PreconditionFailures []*PreconditionFailure `protobuf:"bytes,4,rep,name=precondition_failures,json=preconditionFailures,proto3" json:"precondition_failures,omitempty"` BadRequests []*BadRequest `protobuf:"bytes,5,rep,name=bad_requests,json=badRequests,proto3" json:"bad_requests,omitempty"` LocalizedMessages []*LocalizedMessage `protobuf:"bytes,6,rep,name=localized_messages,json=localizedMessages,proto3" json:"localized_messages,omitempty"` + By []*CELValue `protobuf:"bytes,7,rep,name=by,proto3" json:"by,omitempty"` } func (x *GRPCErrorDetail) Reset() { @@ -3330,6 +3331,13 @@ func (x *GRPCErrorDetail) GetLocalizedMessages() []*LocalizedMessage { return nil } +func (x *GRPCErrorDetail) GetBy() []*CELValue { + if x != nil { + return x.By + } + return nil +} + type PreconditionFailure struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -5044,7 +5052,7 @@ var file_grpc_federation_generator_proto_rawDesc = []byte{ 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x11, 0x69, 0x67, 0x6e, 0x6f, - 0x72, 0x65, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x94, 0x04, + 0x72, 0x65, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xd0, 0x04, 0x0a, 0x0f, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x50, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, @@ -5078,168 +5086,172 @@ var file_grpc_federation_generator_proto_rawDesc = []byte{ 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x11, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x73, 0x22, 0x75, 0x0a, 0x13, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x5e, 0x0a, 0x0a, 0x76, - 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x3e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, - 0x69, 0x6e, 0x2e, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x46, - 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x56, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x0a, 0x76, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xf2, 0x01, 0x0a, 0x1c, - 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, - 0x75, 0x72, 0x65, 0x56, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x72, 0x70, - 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x45, - 0x4c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x44, 0x0a, 0x07, - 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, - 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, - 0x2e, 0x43, 0x45, 0x4c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x12, 0x4c, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, - 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x22, 0x73, 0x0a, 0x0a, 0x42, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x65, - 0x0a, 0x10, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x76, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, - 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x42, 0x61, 0x64, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x56, 0x69, 0x6f, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x56, 0x69, 0x6f, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xaa, 0x01, 0x0a, 0x18, 0x42, 0x61, 0x64, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x56, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, - 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x66, - 0x69, 0x65, 0x6c, 0x64, 0x12, 0x4c, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x72, 0x70, 0x63, + 0x61, 0x67, 0x65, 0x73, 0x12, 0x3a, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x2a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x02, 0x62, 0x79, + 0x22, 0x75, 0x0a, 0x13, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x5e, 0x0a, 0x0a, 0x76, 0x69, 0x6f, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x67, 0x72, + 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x50, + 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x75, + 0x72, 0x65, 0x56, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x76, 0x69, 0x6f, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xf2, 0x01, 0x0a, 0x1c, 0x50, 0x72, 0x65, 0x63, + 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x56, + 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, + 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x44, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x45, 0x4c, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x22, 0x70, 0x0a, 0x10, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x12, 0x44, - 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x2a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, - 0x69, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x6d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x22, 0x67, 0x0a, 0x05, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x64, - 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x04, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x49, 0x64, 0x73, 0x22, 0xbf, 0x01, - 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x49, 0x64, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x69, - 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x65, 0x49, 0x64, 0x12, - 0x3e, 0x0a, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x4c, + 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x73, 0x0a, 0x0a, + 0x42, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x65, 0x0a, 0x10, 0x66, 0x69, + 0x65, 0x6c, 0x64, 0x5f, 0x76, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, + 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x42, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x56, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x0f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x56, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x22, 0xaa, 0x01, 0x0a, 0x18, 0x42, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x56, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x40, + 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, - 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x22, - 0x8f, 0x01, 0x0a, 0x09, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x6e, 0x75, 0x6d, 0x49, 0x64, 0x12, 0x43, 0x0a, 0x04, - 0x72, 0x75, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x72, 0x70, - 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x45, 0x6e, - 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x04, 0x72, 0x75, 0x6c, - 0x65, 0x22, 0x27, 0x0a, 0x08, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x1b, 0x0a, - 0x09, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x08, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x49, 0x64, 0x73, 0x22, 0x75, 0x0a, 0x0d, 0x45, 0x6e, - 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x64, - 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x64, 0x65, - 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x4a, 0x0a, 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, - 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, - 0x73, 0x22, 0x51, 0x0a, 0x0e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x41, 0x6c, - 0x69, 0x61, 0x73, 0x12, 0x22, 0x0a, 0x0d, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x61, 0x6c, 0x69, 0x61, - 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x65, 0x6e, 0x75, 0x6d, - 0x41, 0x6c, 0x69, 0x61, 0x73, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x61, 0x6c, 0x69, 0x61, 0x73, - 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x61, 0x6c, 0x69, 0x61, - 0x73, 0x49, 0x64, 0x73, 0x22, 0x9e, 0x01, 0x0a, 0x09, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, - 0x69, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4b, 0x0a, 0x09, 0x66, 0x75, 0x6e, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x72, + 0x2e, 0x43, 0x45, 0x4c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, + 0x12, 0x4c, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, + 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x70, + 0x0a, 0x10, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x12, 0x44, 0x0a, 0x07, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, - 0x45, 0x4c, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x66, 0x75, 0x6e, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xce, 0x01, 0x0a, 0x0b, 0x43, 0x45, 0x4c, 0x46, 0x75, 0x6e, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3a, 0x0a, 0x04, 0x61, 0x72, 0x67, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, + 0x45, 0x4c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x22, 0x67, 0x0a, 0x05, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, + 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, + 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x08, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x49, 0x64, 0x73, 0x22, 0xbf, 0x01, 0x0a, 0x04, 0x45, 0x6e, + 0x75, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, + 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x49, 0x64, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x69, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x3e, 0x0a, 0x04, 0x72, + 0x75, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x72, 0x70, 0x63, + 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x45, 0x6e, 0x75, + 0x6d, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x22, 0x8f, 0x01, 0x0a, 0x09, + 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, + 0x17, 0x0a, 0x07, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x65, 0x6e, 0x75, 0x6d, 0x49, 0x64, 0x12, 0x43, 0x0a, 0x04, 0x72, 0x75, 0x6c, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, + 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x22, 0x27, 0x0a, + 0x08, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x61, 0x6c, 0x69, + 0x61, 0x73, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x61, 0x6c, + 0x69, 0x61, 0x73, 0x49, 0x64, 0x73, 0x22, 0x75, 0x0a, 0x0d, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, + 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, + 0x74, 0x12, 0x4a, 0x0a, 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x41, + 0x6c, 0x69, 0x61, 0x73, 0x52, 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x22, 0x51, 0x0a, + 0x0e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, + 0x22, 0x0a, 0x0d, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x65, 0x6e, 0x75, 0x6d, 0x41, 0x6c, 0x69, 0x61, + 0x73, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x5f, 0x69, 0x64, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x49, 0x64, 0x73, + 0x22, 0x9e, 0x01, 0x0a, 0x09, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4b, 0x0a, 0x09, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, - 0x04, 0x61, 0x72, 0x67, 0x73, 0x12, 0x3e, 0x0a, 0x06, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, - 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, - 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x06, 0x72, - 0x65, 0x74, 0x75, 0x72, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, - 0x72, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x63, 0x65, - 0x69, 0x76, 0x65, 0x72, 0x49, 0x64, 0x2a, 0x6b, 0x0a, 0x0a, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x13, 0x0a, 0x0f, 0x47, 0x45, 0x4e, 0x45, 0x52, 0x41, 0x54, 0x45, - 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x4b, 0x45, 0x45, - 0x50, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x52, - 0x45, 0x41, 0x54, 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x11, 0x0a, - 0x0d, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x03, - 0x12, 0x11, 0x0a, 0x0d, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, - 0x4e, 0x10, 0x04, 0x2a, 0xcc, 0x02, 0x0a, 0x08, 0x54, 0x79, 0x70, 0x65, 0x4b, 0x69, 0x6e, 0x64, - 0x12, 0x10, 0x0a, 0x0c, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x44, 0x4f, 0x55, 0x42, 0x4c, 0x45, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x10, 0x04, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x10, 0x05, 0x12, 0x10, 0x0a, 0x0c, 0x46, 0x49, 0x58, 0x45, 0x44, 0x36, 0x34, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x10, 0x06, 0x12, 0x10, 0x0a, 0x0c, 0x46, 0x49, 0x58, 0x45, 0x44, 0x33, - 0x32, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x07, 0x12, 0x0d, 0x0a, 0x09, 0x42, 0x4f, 0x4f, 0x4c, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x08, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x54, 0x52, 0x49, 0x4e, - 0x47, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x09, 0x12, 0x0e, 0x0a, 0x0a, 0x47, 0x52, 0x4f, 0x55, - 0x50, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x0a, 0x12, 0x10, 0x0a, 0x0c, 0x4d, 0x45, 0x53, 0x53, - 0x41, 0x47, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x0b, 0x12, 0x0e, 0x0a, 0x0a, 0x42, 0x59, - 0x54, 0x45, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x0c, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x49, - 0x4e, 0x54, 0x33, 0x32, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x0d, 0x12, 0x0d, 0x0a, 0x09, 0x45, - 0x4e, 0x55, 0x4d, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x0e, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x46, - 0x49, 0x58, 0x45, 0x44, 0x33, 0x32, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x0f, 0x12, 0x11, 0x0a, - 0x0d, 0x53, 0x46, 0x49, 0x58, 0x45, 0x44, 0x36, 0x34, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x10, - 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, - 0x11, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x10, 0x12, 0x42, 0xa8, 0x02, 0x0a, 0x24, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, - 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x42, 0x0e, 0x47, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4a, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x65, 0x72, 0x63, 0x61, 0x72, - 0x69, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x70, 0x6c, 0x75, 0x67, - 0x69, 0x6e, 0x3b, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0xa2, 0x02, 0x04, 0x47, 0x46, 0x47, 0x50, - 0xaa, 0x02, 0x20, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x50, 0x6c, 0x75, - 0x67, 0x69, 0x6e, 0xca, 0x02, 0x21, 0x47, 0x72, 0x70, 0x63, 0x5c, 0x46, 0x65, 0x64, 0x65, 0x72, + 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x46, 0x75, + 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x22, 0xce, 0x01, 0x0a, 0x0b, 0x43, 0x45, 0x4c, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3a, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x73, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x61, 0x72, 0x67, + 0x73, 0x12, 0x3e, 0x0a, 0x06, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x06, 0x72, 0x65, 0x74, 0x75, 0x72, + 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x69, 0x64, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, + 0x49, 0x64, 0x2a, 0x6b, 0x0a, 0x0a, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x13, 0x0a, 0x0f, 0x47, 0x45, 0x4e, 0x45, 0x52, 0x41, 0x54, 0x45, 0x5f, 0x41, 0x43, 0x54, + 0x49, 0x4f, 0x4e, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x4b, 0x45, 0x45, 0x50, 0x5f, 0x41, 0x43, + 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, + 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x44, 0x45, 0x4c, + 0x45, 0x54, 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, + 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x04, 0x2a, + 0xcc, 0x02, 0x0a, 0x08, 0x54, 0x79, 0x70, 0x65, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x10, 0x0a, 0x0c, + 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x00, 0x12, 0x0f, + 0x0a, 0x0b, 0x44, 0x4f, 0x55, 0x42, 0x4c, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x01, 0x12, + 0x0e, 0x0a, 0x0a, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x02, 0x12, + 0x0e, 0x0a, 0x0a, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x03, 0x12, + 0x0f, 0x0a, 0x0b, 0x55, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x04, + 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x05, + 0x12, 0x10, 0x0a, 0x0c, 0x46, 0x49, 0x58, 0x45, 0x44, 0x36, 0x34, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x10, 0x06, 0x12, 0x10, 0x0a, 0x0c, 0x46, 0x49, 0x58, 0x45, 0x44, 0x33, 0x32, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x10, 0x07, 0x12, 0x0d, 0x0a, 0x09, 0x42, 0x4f, 0x4f, 0x4c, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x10, 0x08, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x10, 0x09, 0x12, 0x0e, 0x0a, 0x0a, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x10, 0x0a, 0x12, 0x10, 0x0a, 0x0c, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x10, 0x0b, 0x12, 0x0e, 0x0a, 0x0a, 0x42, 0x59, 0x54, 0x45, 0x53, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x10, 0x0c, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x49, 0x4e, 0x54, 0x33, 0x32, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x0d, 0x12, 0x0d, 0x0a, 0x09, 0x45, 0x4e, 0x55, 0x4d, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x10, 0x0e, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x46, 0x49, 0x58, 0x45, 0x44, + 0x33, 0x32, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x0f, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x46, 0x49, + 0x58, 0x45, 0x44, 0x36, 0x34, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x10, 0x12, 0x0f, 0x0a, 0x0b, + 0x53, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x11, 0x12, 0x0f, 0x0a, + 0x0b, 0x53, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x12, 0x42, 0xa8, + 0x02, 0x0a, 0x24, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, + 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x42, 0x0e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4a, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x65, 0x72, 0x63, 0x61, 0x72, 0x69, 0x2f, 0x67, 0x72, + 0x70, 0x63, 0x2d, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x67, 0x72, + 0x70, 0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x3b, 0x70, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0xa2, 0x02, 0x04, 0x47, 0x46, 0x47, 0x50, 0xaa, 0x02, 0x20, 0x47, + 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0xca, + 0x02, 0x21, 0x47, 0x72, 0x70, 0x63, 0x5c, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5c, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x5c, 0x50, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0xe2, 0x02, 0x2d, 0x47, 0x72, 0x70, 0x63, 0x5c, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x5f, - 0x5c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0xe2, 0x02, 0x2d, 0x47, 0x72, 0x70, 0x63, 0x5c, 0x46, - 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x6f, 0x72, 0x5f, 0x5c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x23, 0x47, 0x72, 0x70, 0x63, 0x3a, 0x3a, - 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x3a, 0x47, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x3a, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x5c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0xea, 0x02, 0x23, 0x47, 0x72, 0x70, 0x63, 0x3a, 0x3a, 0x46, 0x65, 0x64, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x3a, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, + 0x72, 0x3a, 0x3a, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -5413,40 +5425,41 @@ var file_grpc_federation_generator_proto_depIdxs = []int32{ 44, // 77: grpc.federation.generator.plugin.GRPCErrorDetail.precondition_failures:type_name -> grpc.federation.generator.plugin.PreconditionFailure 46, // 78: grpc.federation.generator.plugin.GRPCErrorDetail.bad_requests:type_name -> grpc.federation.generator.plugin.BadRequest 48, // 79: grpc.federation.generator.plugin.GRPCErrorDetail.localized_messages:type_name -> grpc.federation.generator.plugin.LocalizedMessage - 45, // 80: grpc.federation.generator.plugin.PreconditionFailure.violations:type_name -> grpc.federation.generator.plugin.PreconditionFailureViolation - 29, // 81: grpc.federation.generator.plugin.PreconditionFailureViolation.type:type_name -> grpc.federation.generator.plugin.CELValue - 29, // 82: grpc.federation.generator.plugin.PreconditionFailureViolation.subject:type_name -> grpc.federation.generator.plugin.CELValue - 29, // 83: grpc.federation.generator.plugin.PreconditionFailureViolation.description:type_name -> grpc.federation.generator.plugin.CELValue - 47, // 84: grpc.federation.generator.plugin.BadRequest.field_violations:type_name -> grpc.federation.generator.plugin.BadRequestFieldViolation - 29, // 85: grpc.federation.generator.plugin.BadRequestFieldViolation.field:type_name -> grpc.federation.generator.plugin.CELValue - 29, // 86: grpc.federation.generator.plugin.BadRequestFieldViolation.description:type_name -> grpc.federation.generator.plugin.CELValue - 29, // 87: grpc.federation.generator.plugin.LocalizedMessage.message:type_name -> grpc.federation.generator.plugin.CELValue - 52, // 88: grpc.federation.generator.plugin.Enum.rule:type_name -> grpc.federation.generator.plugin.EnumRule - 53, // 89: grpc.federation.generator.plugin.EnumValue.rule:type_name -> grpc.federation.generator.plugin.EnumValueRule - 54, // 90: grpc.federation.generator.plugin.EnumValueRule.aliases:type_name -> grpc.federation.generator.plugin.EnumValueAlias - 56, // 91: grpc.federation.generator.plugin.CELPlugin.functions:type_name -> grpc.federation.generator.plugin.CELFunction - 28, // 92: grpc.federation.generator.plugin.CELFunction.args:type_name -> grpc.federation.generator.plugin.Type - 28, // 93: grpc.federation.generator.plugin.CELFunction.return:type_name -> grpc.federation.generator.plugin.Type - 59, // 94: grpc.federation.generator.plugin.ProtoCodeGeneratorResponse.GeneratedCodeInfo.annotation:type_name -> grpc.federation.generator.plugin.ProtoCodeGeneratorResponse.GeneratedCodeInfo.Annotation - 57, // 95: grpc.federation.generator.plugin.ProtoCodeGeneratorResponse.File.generated_code_info:type_name -> grpc.federation.generator.plugin.ProtoCodeGeneratorResponse.GeneratedCodeInfo - 3, // 96: grpc.federation.generator.plugin.ProtoCodeGeneratorResponse.GeneratedCodeInfo.Annotation.semantic:type_name -> grpc.federation.generator.plugin.ProtoCodeGeneratorResponse.GeneratedCodeInfo.Annotation.Semantic - 7, // 97: grpc.federation.generator.plugin.Reference.FileMapEntry.value:type_name -> grpc.federation.generator.plugin.File - 10, // 98: grpc.federation.generator.plugin.Reference.ServiceMapEntry.value:type_name -> grpc.federation.generator.plugin.Service - 12, // 99: grpc.federation.generator.plugin.Reference.MethodMapEntry.value:type_name -> grpc.federation.generator.plugin.Method - 14, // 100: grpc.federation.generator.plugin.Reference.MessageMapEntry.value:type_name -> grpc.federation.generator.plugin.Message - 18, // 101: grpc.federation.generator.plugin.Reference.FieldMapEntry.value:type_name -> grpc.federation.generator.plugin.Field - 50, // 102: grpc.federation.generator.plugin.Reference.EnumMapEntry.value:type_name -> grpc.federation.generator.plugin.Enum - 51, // 103: grpc.federation.generator.plugin.Reference.EnumValueMapEntry.value:type_name -> grpc.federation.generator.plugin.EnumValue - 49, // 104: grpc.federation.generator.plugin.Reference.OneofMapEntry.value:type_name -> grpc.federation.generator.plugin.Oneof - 55, // 105: grpc.federation.generator.plugin.Reference.CelPluginMapEntry.value:type_name -> grpc.federation.generator.plugin.CELPlugin - 25, // 106: grpc.federation.generator.plugin.Reference.GraphMapEntry.value:type_name -> grpc.federation.generator.plugin.MessageDependencyGraph - 17, // 107: grpc.federation.generator.plugin.Reference.VariableDefinitionMapEntry.value:type_name -> grpc.federation.generator.plugin.VariableDefinition - 22, // 108: grpc.federation.generator.plugin.Reference.VariableDefinitionGroupMapEntry.value:type_name -> grpc.federation.generator.plugin.VariableDefinitionGroup - 109, // [109:109] is the sub-list for method output_type - 109, // [109:109] is the sub-list for method input_type - 109, // [109:109] is the sub-list for extension type_name - 109, // [109:109] is the sub-list for extension extendee - 0, // [0:109] is the sub-list for field type_name + 29, // 80: grpc.federation.generator.plugin.GRPCErrorDetail.by:type_name -> grpc.federation.generator.plugin.CELValue + 45, // 81: grpc.federation.generator.plugin.PreconditionFailure.violations:type_name -> grpc.federation.generator.plugin.PreconditionFailureViolation + 29, // 82: grpc.federation.generator.plugin.PreconditionFailureViolation.type:type_name -> grpc.federation.generator.plugin.CELValue + 29, // 83: grpc.federation.generator.plugin.PreconditionFailureViolation.subject:type_name -> grpc.federation.generator.plugin.CELValue + 29, // 84: grpc.federation.generator.plugin.PreconditionFailureViolation.description:type_name -> grpc.federation.generator.plugin.CELValue + 47, // 85: grpc.federation.generator.plugin.BadRequest.field_violations:type_name -> grpc.federation.generator.plugin.BadRequestFieldViolation + 29, // 86: grpc.federation.generator.plugin.BadRequestFieldViolation.field:type_name -> grpc.federation.generator.plugin.CELValue + 29, // 87: grpc.federation.generator.plugin.BadRequestFieldViolation.description:type_name -> grpc.federation.generator.plugin.CELValue + 29, // 88: grpc.federation.generator.plugin.LocalizedMessage.message:type_name -> grpc.federation.generator.plugin.CELValue + 52, // 89: grpc.federation.generator.plugin.Enum.rule:type_name -> grpc.federation.generator.plugin.EnumRule + 53, // 90: grpc.federation.generator.plugin.EnumValue.rule:type_name -> grpc.federation.generator.plugin.EnumValueRule + 54, // 91: grpc.federation.generator.plugin.EnumValueRule.aliases:type_name -> grpc.federation.generator.plugin.EnumValueAlias + 56, // 92: grpc.federation.generator.plugin.CELPlugin.functions:type_name -> grpc.federation.generator.plugin.CELFunction + 28, // 93: grpc.federation.generator.plugin.CELFunction.args:type_name -> grpc.federation.generator.plugin.Type + 28, // 94: grpc.federation.generator.plugin.CELFunction.return:type_name -> grpc.federation.generator.plugin.Type + 59, // 95: grpc.federation.generator.plugin.ProtoCodeGeneratorResponse.GeneratedCodeInfo.annotation:type_name -> grpc.federation.generator.plugin.ProtoCodeGeneratorResponse.GeneratedCodeInfo.Annotation + 57, // 96: grpc.federation.generator.plugin.ProtoCodeGeneratorResponse.File.generated_code_info:type_name -> grpc.federation.generator.plugin.ProtoCodeGeneratorResponse.GeneratedCodeInfo + 3, // 97: grpc.federation.generator.plugin.ProtoCodeGeneratorResponse.GeneratedCodeInfo.Annotation.semantic:type_name -> grpc.federation.generator.plugin.ProtoCodeGeneratorResponse.GeneratedCodeInfo.Annotation.Semantic + 7, // 98: grpc.federation.generator.plugin.Reference.FileMapEntry.value:type_name -> grpc.federation.generator.plugin.File + 10, // 99: grpc.federation.generator.plugin.Reference.ServiceMapEntry.value:type_name -> grpc.federation.generator.plugin.Service + 12, // 100: grpc.federation.generator.plugin.Reference.MethodMapEntry.value:type_name -> grpc.federation.generator.plugin.Method + 14, // 101: grpc.federation.generator.plugin.Reference.MessageMapEntry.value:type_name -> grpc.federation.generator.plugin.Message + 18, // 102: grpc.federation.generator.plugin.Reference.FieldMapEntry.value:type_name -> grpc.federation.generator.plugin.Field + 50, // 103: grpc.federation.generator.plugin.Reference.EnumMapEntry.value:type_name -> grpc.federation.generator.plugin.Enum + 51, // 104: grpc.federation.generator.plugin.Reference.EnumValueMapEntry.value:type_name -> grpc.federation.generator.plugin.EnumValue + 49, // 105: grpc.federation.generator.plugin.Reference.OneofMapEntry.value:type_name -> grpc.federation.generator.plugin.Oneof + 55, // 106: grpc.federation.generator.plugin.Reference.CelPluginMapEntry.value:type_name -> grpc.federation.generator.plugin.CELPlugin + 25, // 107: grpc.federation.generator.plugin.Reference.GraphMapEntry.value:type_name -> grpc.federation.generator.plugin.MessageDependencyGraph + 17, // 108: grpc.federation.generator.plugin.Reference.VariableDefinitionMapEntry.value:type_name -> grpc.federation.generator.plugin.VariableDefinition + 22, // 109: grpc.federation.generator.plugin.Reference.VariableDefinitionGroupMapEntry.value:type_name -> grpc.federation.generator.plugin.VariableDefinitionGroup + 110, // [110:110] is the sub-list for method output_type + 110, // [110:110] is the sub-list for method input_type + 110, // [110:110] is the sub-list for extension type_name + 110, // [110:110] is the sub-list for extension extendee + 0, // [0:110] is the sub-list for field type_name } func init() { file_grpc_federation_generator_proto_init() } diff --git a/_examples/17_error_handler/main_test.go b/_examples/17_error_handler/main_test.go index ad00d72f..fabc5608 100644 --- a/_examples/17_error_handler/main_test.go +++ b/_examples/17_error_handler/main_test.go @@ -145,6 +145,16 @@ func TestFederation(t *testing.T) { if s.Message() != `this is custom error message` { t.Fatalf("got unexpected error: %v", err) } + var detailNum int + for _, detail := range s.Details() { + if _, ok := detail.(protoadapt.MessageV1); !ok { + t.Fatalf("failed to get proto message from error details: %T", detail) + } + detailNum++ + } + if detailNum != 4 { + t.Fatalf("failed to get error details. got detail num: %d", detailNum) + } }) t.Run("ignore error and response", func(t *testing.T) { st := status.New(codes.Unimplemented, "unimplemented error") diff --git a/_examples/17_error_handler/proto/federation/federation.proto b/_examples/17_error_handler/proto/federation/federation.proto index a12a5402..4c9a9334 100644 --- a/_examples/17_error_handler/proto/federation/federation.proto +++ b/_examples/17_error_handler/proto/federation/federation.proto @@ -48,6 +48,7 @@ message Post { details { def { name: "localized_msg" message { name: "LocalizedMessage" args { name: "value" by: "id" } } } message { name: "CustomMessage" args { name: "error_info" by: "error" } } + by: "post.Post{id: 'foo'}" precondition_failure { violations { type: "'some-type'" diff --git a/docs/references.md b/docs/references.md index dc0119dc..d3d81786 100644 --- a/docs/references.md +++ b/docs/references.md @@ -1187,6 +1187,7 @@ Either `if` or `details` must be specified. The other error detail types will be | field | type | required or optional | |----------------------------------------------------------------------------------------------|-----------------------------------------|----------------------| | [`if`](#grpcfederationmessagedefvalidationerrordetailsif) | [CEL](./cel.md) | required | +| [`by`](#grpcfederationmessagedefvalidationerrordetailsby) | repeated [CEL](./cel.md) | optional | | [`message`](#grpcfederationmessagedefvalidationerrordetailsmessage) | repeated MessageExpr | optional | | [`precondition_failure`](#grpcfederationmessagedefvalidationerrordetailspreconditionfailure) | repeated google.rpc.PreconditionFailure | optional | | [`bad_request`](#grpcfederationmessagedefvalidationerrordetailsbadrequest) | repeated google.rpc.BadRequest | optional | @@ -1203,6 +1204,7 @@ message MyMessage { message: "MyMessage validation failed", details { if: "$.id == 'wrong'", + by: "pkg.Message{field: value}" message { name: "ErrorMessage", args { @@ -1240,6 +1242,10 @@ message MyMessage { `if` specifies validation rule in [CEL](./cel.md). If the condition is true, the validation returns an error with the specified details. +## (grpc.federation.message).def.validation.error.details.by + +`by` specify a message in [CEL](./cel.md) to express the details of the error. + ## (grpc.federation.message).def.validation.error.details.message `message` represents arbitrary proto messages to describe the error detail. diff --git a/generator/code_generator.go b/generator/code_generator.go index 9f920af8..3abd5fb7 100644 --- a/generator/code_generator.go +++ b/generator/code_generator.go @@ -2716,6 +2716,24 @@ func (detail *GRPCErrorDetail) MessageSet() *VariableDefinitionSet { } } +type GRPCErrorDetailBy struct { + Expr string + Type string + UseContextLibrary bool +} + +func (detail *GRPCErrorDetail) By() []*GRPCErrorDetailBy { + ret := make([]*GRPCErrorDetailBy, 0, len(detail.GRPCErrorDetail.By)) + for _, by := range detail.GRPCErrorDetail.By { + ret = append(ret, &GRPCErrorDetailBy{ + Expr: by.Expr, + Type: toMakeZeroValue(detail.msg.file, by.Out), + UseContextLibrary: by.UseContextLibrary, + }) + } + return ret +} + func (detail *GRPCErrorDetail) PreconditionFailures() []*PreconditionFailure { ret := make([]*PreconditionFailure, 0, len(detail.GRPCErrorDetail.PreconditionFailures)) for _, pf := range detail.GRPCErrorDetail.PreconditionFailures { diff --git a/generator/templates/error_handler.go.tmpl b/generator/templates/error_handler.go.tmpl index fede9d73..7666e441 100644 --- a/generator/templates/error_handler.go.tmpl +++ b/generator/templates/error_handler.go.tmpl @@ -92,6 +92,24 @@ stat, handleErr := func() (*grpcfed.Status, error) { {{- end }} {{- end }} + {{- range .By }} + { + detail, err := grpcfed.EvalCEL(ctx, &grpcfed.EvalCELRequest{ + Value: value, + Expr: `{{ .Expr }}`, + UseContextLibrary: {{ .UseContextLibrary }}, + OutType: reflect.TypeOf({{ .Type }}), + CacheIndex: {{ $def.CELCacheIndex }}, + }) + if err != nil { + grpcfed.Logger({{ $ctx }}).ErrorContext({{ $ctx }}, "failed setting error details", slog.String("error", err.Error())) + } + if detail != nil { + details = append(details, detail.(grpcfed.ProtoMessage)) + } + } + {{- end }} + {{- range .PreconditionFailures }} {{- template "preconditionFailure" . }} {{- end }} diff --git a/generator/testdata/expected_error_handler.go b/generator/testdata/expected_error_handler.go index b4627d3a..45047741 100644 --- a/generator/testdata/expected_error_handler.go +++ b/generator/testdata/expected_error_handler.go @@ -563,6 +563,36 @@ func (s *FederationService) resolve_Org_Federation_Post(ctx context.Context, req }); detail != nil { details = append(details, detail) } + { + detail, err := grpcfed.EvalCEL(ctx, &grpcfed.EvalCELRequest{ + Value: value, + Expr: `org.post.Post{id: 'foo'}`, + UseContextLibrary: false, + OutType: reflect.TypeOf((*post.Post)(nil)), + CacheIndex: 13, + }) + if err != nil { + grpcfed.Logger(ctx).ErrorContext(ctx, "failed setting error details", slog.String("error", err.Error())) + } + if detail != nil { + details = append(details, detail.(grpcfed.ProtoMessage)) + } + } + { + detail, err := grpcfed.EvalCEL(ctx, &grpcfed.EvalCELRequest{ + Value: value, + Expr: `org.post.CreatePost{title: 'bar'}`, + UseContextLibrary: false, + OutType: reflect.TypeOf((*post.CreatePost)(nil)), + CacheIndex: 14, + }) + if err != nil { + grpcfed.Logger(ctx).ErrorContext(ctx, "failed setting error details", slog.String("error", err.Error())) + } + if detail != nil { + details = append(details, detail.(grpcfed.ProtoMessage)) + } + } if detail := grpcfed.PreconditionFailure(ctx, value, []*grpcfed.PreconditionFailureViolation{ { Type: `'some-type'`, @@ -571,9 +601,9 @@ func (s *FederationService) resolve_Org_Federation_Post(ctx context.Context, req TypeUseContextLibrary: false, SubjectUseContextLibrary: false, DescUseContextLibrary: false, - TypeCacheIndex: 13, - SubjectCacheIndex: 14, - DescCacheIndex: 15, + TypeCacheIndex: 15, + SubjectCacheIndex: 16, + DescCacheIndex: 17, }, }); detail != nil { details = append(details, detail) @@ -583,7 +613,7 @@ func (s *FederationService) resolve_Org_Federation_Post(ctx context.Context, req Locale: "en-US", Message: `localized_msg.value`, UseContextLibrary: false, - CacheIndex: 16, + CacheIndex: 18, }); detail != nil { details = append(details, detail) } @@ -612,7 +642,7 @@ func (s *FederationService) resolve_Org_Federation_Post(ctx context.Context, req Value: value, Expr: `error.code == google.rpc.Code.UNIMPLEMENTED`, UseContextLibrary: false, - CacheIndex: 17, + CacheIndex: 19, Body: func(value *localValueType) error { stat = grpcfed.NewGRPCStatus(grpcfed.OKCode, "ignore error") if err := grpcfed.EvalDef(ctx, value, grpcfed.Def[*post.GetPostResponse, *localValueType]{ @@ -624,7 +654,7 @@ func (s *FederationService) resolve_Org_Federation_Post(ctx context.Context, req }, By: `org.post.GetPostResponse{post: org.post.Post{id: 'anonymous', title: 'none'}}`, ByUseContextLibrary: false, - ByCacheIndex: 18, + ByCacheIndex: 20, }); err != nil { grpcfed.Logger(ctx).ErrorContext(ctx, "failed to set response when ignored", slog.String("error", err.Error())) return nil @@ -641,7 +671,7 @@ func (s *FederationService) resolve_Org_Federation_Post(ctx context.Context, req Value: value, Expr: `true`, UseContextLibrary: false, - CacheIndex: 19, + CacheIndex: 21, Body: func(value *localValueType) error { stat = grpcfed.NewGRPCStatus(grpcfed.OKCode, "ignore error") return nil @@ -691,7 +721,7 @@ func (s *FederationService) resolve_Org_Federation_Post(ctx context.Context, req }, By: `res.post`, ByUseContextLibrary: false, - ByCacheIndex: 20, + ByCacheIndex: 22, }); err != nil { grpcfed.RecordErrorToSpan(ctx, err) return nil, err diff --git a/grpc/federation/federation.pb.go b/grpc/federation/federation.pb.go index 09999312..56fe52d3 100644 --- a/grpc/federation/federation.pb.go +++ b/grpc/federation/federation.pb.go @@ -1450,6 +1450,8 @@ type GRPCErrorDetail struct { Help []*errdetails.Help `protobuf:"bytes,12,rep,name=help,proto3" json:"help,omitempty"` // localized_message provides a localized error message that is safe to return to the user. LocalizedMessage []*errdetails.LocalizedMessage `protobuf:"bytes,13,rep,name=localized_message,json=localizedMessage,proto3" json:"localized_message,omitempty"` + // by specify a message in CEL to express the details of the error. + By []string `protobuf:"bytes,14,rep,name=by,proto3" json:"by,omitempty"` } func (x *GRPCErrorDetail) Reset() { @@ -1575,6 +1577,13 @@ func (x *GRPCErrorDetail) GetLocalizedMessage() []*errdetails.LocalizedMessage { return nil } +func (x *GRPCErrorDetail) GetBy() []string { + if x != nil { + return x.By + } + return nil +} + // Validation represents a validation rule against variables defined within the current scope. type ValidationExpr struct { state protoimpl.MessageState @@ -3176,7 +3185,7 @@ var file_grpc_federation_federation_proto_rawDesc = []byte{ 0x01, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x66, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xea, 0x05, 0x0a, 0x0f, 0x47, 0x52, 0x50, 0x43, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xfa, 0x05, 0x0a, 0x0f, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x66, 0x12, 0x35, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, @@ -3223,7 +3232,8 @@ var file_grpc_federation_federation_proto_rawDesc = []byte{ 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x10, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x22, 0x64, 0x0a, 0x0e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, + 0x73, 0x61, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x02, 0x62, 0x79, 0x22, 0x64, 0x0a, 0x0e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x72, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, diff --git a/grpc/federation/generator/decode.go b/grpc/federation/generator/decode.go index 974ce0f9..ece739ad 100644 --- a/grpc/federation/generator/decode.go +++ b/grpc/federation/generator/decode.go @@ -410,6 +410,24 @@ func (d *decoder) toValue(value *plugin.Value) (*resolver.Value, error) { return ret, nil } +func (d *decoder) toCELValues(values []*plugin.CELValue) ([]*resolver.CELValue, error) { + if values == nil { + return nil, nil + } + ret := make([]*resolver.CELValue, 0, len(values)) + for _, value := range values { + v, err := d.toCELValue(value) + if err != nil { + return nil, err + } + if v == nil { + continue + } + ret = append(ret, v) + } + return ret, nil +} + func (d *decoder) toCELValue(value *plugin.CELValue) (*resolver.CELValue, error) { if value == nil { return nil, nil @@ -1071,6 +1089,10 @@ func (d *decoder) toGRPCErrorDetail(detail *plugin.GRPCErrorDetail) (*resolver.G if err != nil { return nil, err } + by, err := d.toCELValues(detail.GetBy()) + if err != nil { + return nil, err + } msgs, err := d.toVariableDefinitionSet(detail.GetMessages()) if err != nil { return nil, err @@ -1089,6 +1111,7 @@ func (d *decoder) toGRPCErrorDetail(detail *plugin.GRPCErrorDetail) (*resolver.G } ret.DefSet = defSet ret.If = ifValue + ret.By = by ret.Messages = msgs ret.PreconditionFailures = preconditionFailures ret.BadRequests = badRequests diff --git a/grpc/federation/generator/encode.go b/grpc/federation/generator/encode.go index 759abd04..042abd8e 100644 --- a/grpc/federation/generator/encode.go +++ b/grpc/federation/generator/encode.go @@ -756,6 +756,14 @@ func (e *encoder) toConcurrentVariableDefinitionGroup(g *resolver.ConcurrentVari return ret } +func (e *encoder) toCELValues(v []*resolver.CELValue) []*plugin.CELValue { + ret := make([]*plugin.CELValue, 0, len(v)) + for _, vv := range v { + ret = append(ret, e.toCELValue(vv)) + } + return ret +} + func (e *encoder) toCELValue(v *resolver.CELValue) *plugin.CELValue { if v == nil { return nil @@ -983,6 +991,7 @@ func (e *encoder) toGRPCErrorDetail(detail *resolver.GRPCErrorDetail) *plugin.GR ret := &plugin.GRPCErrorDetail{} ret.DefSet = e.toVariableDefinitionSet(detail.DefSet) ret.If = e.toCELValue(detail.If) + ret.By = e.toCELValues(detail.By) ret.PreconditionFailures = e.toPreconditionFailures(detail.PreconditionFailures) ret.BadRequests = e.toBadRequests(detail.BadRequests) ret.LocalizedMessages = e.toLocalizedMessages(detail.LocalizedMessages) diff --git a/grpc/federation/generator/plugin/generator.pb.go b/grpc/federation/generator/plugin/generator.pb.go index 0cce38ac..2d68e092 100644 --- a/grpc/federation/generator/plugin/generator.pb.go +++ b/grpc/federation/generator/plugin/generator.pb.go @@ -3254,6 +3254,7 @@ type GRPCErrorDetail struct { PreconditionFailures []*PreconditionFailure `protobuf:"bytes,4,rep,name=precondition_failures,json=preconditionFailures,proto3" json:"precondition_failures,omitempty"` BadRequests []*BadRequest `protobuf:"bytes,5,rep,name=bad_requests,json=badRequests,proto3" json:"bad_requests,omitempty"` LocalizedMessages []*LocalizedMessage `protobuf:"bytes,6,rep,name=localized_messages,json=localizedMessages,proto3" json:"localized_messages,omitempty"` + By []*CELValue `protobuf:"bytes,7,rep,name=by,proto3" json:"by,omitempty"` } func (x *GRPCErrorDetail) Reset() { @@ -3330,6 +3331,13 @@ func (x *GRPCErrorDetail) GetLocalizedMessages() []*LocalizedMessage { return nil } +func (x *GRPCErrorDetail) GetBy() []*CELValue { + if x != nil { + return x.By + } + return nil +} + type PreconditionFailure struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -5044,7 +5052,7 @@ var file_grpc_federation_generator_proto_rawDesc = []byte{ 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x11, 0x69, 0x67, 0x6e, 0x6f, - 0x72, 0x65, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x94, 0x04, + 0x72, 0x65, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xd0, 0x04, 0x0a, 0x0f, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x50, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, @@ -5078,154 +5086,158 @@ var file_grpc_federation_generator_proto_rawDesc = []byte{ 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x11, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x73, 0x22, 0x75, 0x0a, 0x13, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x5e, 0x0a, 0x0a, 0x76, - 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x3e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, - 0x69, 0x6e, 0x2e, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x46, - 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x56, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x0a, 0x76, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xf2, 0x01, 0x0a, 0x1c, - 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, - 0x75, 0x72, 0x65, 0x56, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x72, 0x70, - 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x45, - 0x4c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x44, 0x0a, 0x07, - 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, - 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, - 0x2e, 0x43, 0x45, 0x4c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x12, 0x4c, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, - 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x22, 0x73, 0x0a, 0x0a, 0x42, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x65, - 0x0a, 0x10, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x76, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, - 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x42, 0x61, 0x64, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x56, 0x69, 0x6f, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x56, 0x69, 0x6f, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xaa, 0x01, 0x0a, 0x18, 0x42, 0x61, 0x64, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x56, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, - 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x66, - 0x69, 0x65, 0x6c, 0x64, 0x12, 0x4c, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x72, 0x70, 0x63, + 0x61, 0x67, 0x65, 0x73, 0x12, 0x3a, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x2a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x02, 0x62, 0x79, + 0x22, 0x75, 0x0a, 0x13, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x5e, 0x0a, 0x0a, 0x76, 0x69, 0x6f, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x67, 0x72, + 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x50, + 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x75, + 0x72, 0x65, 0x56, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x76, 0x69, 0x6f, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xf2, 0x01, 0x0a, 0x1c, 0x50, 0x72, 0x65, 0x63, + 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x56, + 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, + 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x44, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x45, 0x4c, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x22, 0x70, 0x0a, 0x10, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x12, 0x44, - 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x2a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, - 0x69, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x6d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x22, 0x67, 0x0a, 0x05, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x64, - 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x04, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x49, 0x64, 0x73, 0x22, 0xbf, 0x01, - 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x49, 0x64, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x69, - 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x65, 0x49, 0x64, 0x12, - 0x3e, 0x0a, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x4c, + 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x73, 0x0a, 0x0a, + 0x42, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x65, 0x0a, 0x10, 0x66, 0x69, + 0x65, 0x6c, 0x64, 0x5f, 0x76, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, + 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x42, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x56, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x0f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x56, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x22, 0xaa, 0x01, 0x0a, 0x18, 0x42, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x56, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x40, + 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, - 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x22, - 0x8f, 0x01, 0x0a, 0x09, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x6e, 0x75, 0x6d, 0x49, 0x64, 0x12, 0x43, 0x0a, 0x04, - 0x72, 0x75, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x72, 0x70, - 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x45, 0x6e, - 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x04, 0x72, 0x75, 0x6c, - 0x65, 0x22, 0x27, 0x0a, 0x08, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x1b, 0x0a, - 0x09, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x08, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x49, 0x64, 0x73, 0x22, 0x75, 0x0a, 0x0d, 0x45, 0x6e, - 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x64, - 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x64, 0x65, - 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x4a, 0x0a, 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, - 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, - 0x73, 0x22, 0x51, 0x0a, 0x0e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x41, 0x6c, - 0x69, 0x61, 0x73, 0x12, 0x22, 0x0a, 0x0d, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x61, 0x6c, 0x69, 0x61, - 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x65, 0x6e, 0x75, 0x6d, - 0x41, 0x6c, 0x69, 0x61, 0x73, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x61, 0x6c, 0x69, 0x61, 0x73, - 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x61, 0x6c, 0x69, 0x61, - 0x73, 0x49, 0x64, 0x73, 0x22, 0x9e, 0x01, 0x0a, 0x09, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, - 0x69, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4b, 0x0a, 0x09, 0x66, 0x75, 0x6e, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x72, + 0x2e, 0x43, 0x45, 0x4c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, + 0x12, 0x4c, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, + 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x70, + 0x0a, 0x10, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x12, 0x44, 0x0a, 0x07, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, - 0x45, 0x4c, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x66, 0x75, 0x6e, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xce, 0x01, 0x0a, 0x0b, 0x43, 0x45, 0x4c, 0x46, 0x75, 0x6e, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3a, 0x0a, 0x04, 0x61, 0x72, 0x67, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, + 0x45, 0x4c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x22, 0x67, 0x0a, 0x05, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, + 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, + 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x08, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x49, 0x64, 0x73, 0x22, 0xbf, 0x01, 0x0a, 0x04, 0x45, 0x6e, + 0x75, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, + 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x49, 0x64, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x69, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x3e, 0x0a, 0x04, 0x72, + 0x75, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x72, 0x70, 0x63, + 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x45, 0x6e, 0x75, + 0x6d, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x22, 0x8f, 0x01, 0x0a, 0x09, + 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, + 0x17, 0x0a, 0x07, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x65, 0x6e, 0x75, 0x6d, 0x49, 0x64, 0x12, 0x43, 0x0a, 0x04, 0x72, 0x75, 0x6c, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, + 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x22, 0x27, 0x0a, + 0x08, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x61, 0x6c, 0x69, + 0x61, 0x73, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x61, 0x6c, + 0x69, 0x61, 0x73, 0x49, 0x64, 0x73, 0x22, 0x75, 0x0a, 0x0d, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, + 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, + 0x74, 0x12, 0x4a, 0x0a, 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x41, + 0x6c, 0x69, 0x61, 0x73, 0x52, 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x22, 0x51, 0x0a, + 0x0e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, + 0x22, 0x0a, 0x0d, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x65, 0x6e, 0x75, 0x6d, 0x41, 0x6c, 0x69, 0x61, + 0x73, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x5f, 0x69, 0x64, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x49, 0x64, 0x73, + 0x22, 0x9e, 0x01, 0x0a, 0x09, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4b, 0x0a, 0x09, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, - 0x04, 0x61, 0x72, 0x67, 0x73, 0x12, 0x3e, 0x0a, 0x06, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, - 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, - 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x06, 0x72, - 0x65, 0x74, 0x75, 0x72, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, - 0x72, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x63, 0x65, - 0x69, 0x76, 0x65, 0x72, 0x49, 0x64, 0x2a, 0x6b, 0x0a, 0x0a, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x13, 0x0a, 0x0f, 0x47, 0x45, 0x4e, 0x45, 0x52, 0x41, 0x54, 0x45, - 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x4b, 0x45, 0x45, - 0x50, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x52, - 0x45, 0x41, 0x54, 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x11, 0x0a, - 0x0d, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x03, - 0x12, 0x11, 0x0a, 0x0d, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, - 0x4e, 0x10, 0x04, 0x2a, 0xcc, 0x02, 0x0a, 0x08, 0x54, 0x79, 0x70, 0x65, 0x4b, 0x69, 0x6e, 0x64, - 0x12, 0x10, 0x0a, 0x0c, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x44, 0x4f, 0x55, 0x42, 0x4c, 0x45, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x10, 0x04, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x10, 0x05, 0x12, 0x10, 0x0a, 0x0c, 0x46, 0x49, 0x58, 0x45, 0x44, 0x36, 0x34, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x10, 0x06, 0x12, 0x10, 0x0a, 0x0c, 0x46, 0x49, 0x58, 0x45, 0x44, 0x33, - 0x32, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x07, 0x12, 0x0d, 0x0a, 0x09, 0x42, 0x4f, 0x4f, 0x4c, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x08, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x54, 0x52, 0x49, 0x4e, - 0x47, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x09, 0x12, 0x0e, 0x0a, 0x0a, 0x47, 0x52, 0x4f, 0x55, - 0x50, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x0a, 0x12, 0x10, 0x0a, 0x0c, 0x4d, 0x45, 0x53, 0x53, - 0x41, 0x47, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x0b, 0x12, 0x0e, 0x0a, 0x0a, 0x42, 0x59, - 0x54, 0x45, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x0c, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x49, - 0x4e, 0x54, 0x33, 0x32, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x0d, 0x12, 0x0d, 0x0a, 0x09, 0x45, - 0x4e, 0x55, 0x4d, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x0e, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x46, - 0x49, 0x58, 0x45, 0x44, 0x33, 0x32, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x0f, 0x12, 0x11, 0x0a, - 0x0d, 0x53, 0x46, 0x49, 0x58, 0x45, 0x44, 0x36, 0x34, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x10, - 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, - 0x11, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x10, 0x12, 0x42, 0x4c, 0x5a, 0x4a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x6d, 0x65, 0x72, 0x63, 0x61, 0x72, 0x69, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x66, 0x65, - 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x66, 0x65, - 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x6f, 0x72, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x3b, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x46, 0x75, + 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x22, 0xce, 0x01, 0x0a, 0x0b, 0x43, 0x45, 0x4c, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3a, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x73, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x61, 0x72, 0x67, + 0x73, 0x12, 0x3e, 0x0a, 0x06, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x06, 0x72, 0x65, 0x74, 0x75, 0x72, + 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x69, 0x64, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, + 0x49, 0x64, 0x2a, 0x6b, 0x0a, 0x0a, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x13, 0x0a, 0x0f, 0x47, 0x45, 0x4e, 0x45, 0x52, 0x41, 0x54, 0x45, 0x5f, 0x41, 0x43, 0x54, + 0x49, 0x4f, 0x4e, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x4b, 0x45, 0x45, 0x50, 0x5f, 0x41, 0x43, + 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, + 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x44, 0x45, 0x4c, + 0x45, 0x54, 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, + 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x04, 0x2a, + 0xcc, 0x02, 0x0a, 0x08, 0x54, 0x79, 0x70, 0x65, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x10, 0x0a, 0x0c, + 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x00, 0x12, 0x0f, + 0x0a, 0x0b, 0x44, 0x4f, 0x55, 0x42, 0x4c, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x01, 0x12, + 0x0e, 0x0a, 0x0a, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x02, 0x12, + 0x0e, 0x0a, 0x0a, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x03, 0x12, + 0x0f, 0x0a, 0x0b, 0x55, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x04, + 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x05, + 0x12, 0x10, 0x0a, 0x0c, 0x46, 0x49, 0x58, 0x45, 0x44, 0x36, 0x34, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x10, 0x06, 0x12, 0x10, 0x0a, 0x0c, 0x46, 0x49, 0x58, 0x45, 0x44, 0x33, 0x32, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x10, 0x07, 0x12, 0x0d, 0x0a, 0x09, 0x42, 0x4f, 0x4f, 0x4c, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x10, 0x08, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x10, 0x09, 0x12, 0x0e, 0x0a, 0x0a, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x10, 0x0a, 0x12, 0x10, 0x0a, 0x0c, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x10, 0x0b, 0x12, 0x0e, 0x0a, 0x0a, 0x42, 0x59, 0x54, 0x45, 0x53, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x10, 0x0c, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x49, 0x4e, 0x54, 0x33, 0x32, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x0d, 0x12, 0x0d, 0x0a, 0x09, 0x45, 0x4e, 0x55, 0x4d, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x10, 0x0e, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x46, 0x49, 0x58, 0x45, 0x44, + 0x33, 0x32, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x0f, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x46, 0x49, + 0x58, 0x45, 0x44, 0x36, 0x34, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x10, 0x12, 0x0f, 0x0a, 0x0b, + 0x53, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x11, 0x12, 0x0f, 0x0a, + 0x0b, 0x53, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x12, 0x42, 0x4c, + 0x5a, 0x4a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x65, 0x72, + 0x63, 0x61, 0x72, 0x69, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x70, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x3b, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -5399,40 +5411,41 @@ var file_grpc_federation_generator_proto_depIdxs = []int32{ 44, // 77: grpc.federation.generator.plugin.GRPCErrorDetail.precondition_failures:type_name -> grpc.federation.generator.plugin.PreconditionFailure 46, // 78: grpc.federation.generator.plugin.GRPCErrorDetail.bad_requests:type_name -> grpc.federation.generator.plugin.BadRequest 48, // 79: grpc.federation.generator.plugin.GRPCErrorDetail.localized_messages:type_name -> grpc.federation.generator.plugin.LocalizedMessage - 45, // 80: grpc.federation.generator.plugin.PreconditionFailure.violations:type_name -> grpc.federation.generator.plugin.PreconditionFailureViolation - 29, // 81: grpc.federation.generator.plugin.PreconditionFailureViolation.type:type_name -> grpc.federation.generator.plugin.CELValue - 29, // 82: grpc.federation.generator.plugin.PreconditionFailureViolation.subject:type_name -> grpc.federation.generator.plugin.CELValue - 29, // 83: grpc.federation.generator.plugin.PreconditionFailureViolation.description:type_name -> grpc.federation.generator.plugin.CELValue - 47, // 84: grpc.federation.generator.plugin.BadRequest.field_violations:type_name -> grpc.federation.generator.plugin.BadRequestFieldViolation - 29, // 85: grpc.federation.generator.plugin.BadRequestFieldViolation.field:type_name -> grpc.federation.generator.plugin.CELValue - 29, // 86: grpc.federation.generator.plugin.BadRequestFieldViolation.description:type_name -> grpc.federation.generator.plugin.CELValue - 29, // 87: grpc.federation.generator.plugin.LocalizedMessage.message:type_name -> grpc.federation.generator.plugin.CELValue - 52, // 88: grpc.federation.generator.plugin.Enum.rule:type_name -> grpc.federation.generator.plugin.EnumRule - 53, // 89: grpc.federation.generator.plugin.EnumValue.rule:type_name -> grpc.federation.generator.plugin.EnumValueRule - 54, // 90: grpc.federation.generator.plugin.EnumValueRule.aliases:type_name -> grpc.federation.generator.plugin.EnumValueAlias - 56, // 91: grpc.federation.generator.plugin.CELPlugin.functions:type_name -> grpc.federation.generator.plugin.CELFunction - 28, // 92: grpc.federation.generator.plugin.CELFunction.args:type_name -> grpc.federation.generator.plugin.Type - 28, // 93: grpc.federation.generator.plugin.CELFunction.return:type_name -> grpc.federation.generator.plugin.Type - 59, // 94: grpc.federation.generator.plugin.ProtoCodeGeneratorResponse.GeneratedCodeInfo.annotation:type_name -> grpc.federation.generator.plugin.ProtoCodeGeneratorResponse.GeneratedCodeInfo.Annotation - 57, // 95: grpc.federation.generator.plugin.ProtoCodeGeneratorResponse.File.generated_code_info:type_name -> grpc.federation.generator.plugin.ProtoCodeGeneratorResponse.GeneratedCodeInfo - 3, // 96: grpc.federation.generator.plugin.ProtoCodeGeneratorResponse.GeneratedCodeInfo.Annotation.semantic:type_name -> grpc.federation.generator.plugin.ProtoCodeGeneratorResponse.GeneratedCodeInfo.Annotation.Semantic - 7, // 97: grpc.federation.generator.plugin.Reference.FileMapEntry.value:type_name -> grpc.federation.generator.plugin.File - 10, // 98: grpc.federation.generator.plugin.Reference.ServiceMapEntry.value:type_name -> grpc.federation.generator.plugin.Service - 12, // 99: grpc.federation.generator.plugin.Reference.MethodMapEntry.value:type_name -> grpc.federation.generator.plugin.Method - 14, // 100: grpc.federation.generator.plugin.Reference.MessageMapEntry.value:type_name -> grpc.federation.generator.plugin.Message - 18, // 101: grpc.federation.generator.plugin.Reference.FieldMapEntry.value:type_name -> grpc.federation.generator.plugin.Field - 50, // 102: grpc.federation.generator.plugin.Reference.EnumMapEntry.value:type_name -> grpc.federation.generator.plugin.Enum - 51, // 103: grpc.federation.generator.plugin.Reference.EnumValueMapEntry.value:type_name -> grpc.federation.generator.plugin.EnumValue - 49, // 104: grpc.federation.generator.plugin.Reference.OneofMapEntry.value:type_name -> grpc.federation.generator.plugin.Oneof - 55, // 105: grpc.federation.generator.plugin.Reference.CelPluginMapEntry.value:type_name -> grpc.federation.generator.plugin.CELPlugin - 25, // 106: grpc.federation.generator.plugin.Reference.GraphMapEntry.value:type_name -> grpc.federation.generator.plugin.MessageDependencyGraph - 17, // 107: grpc.federation.generator.plugin.Reference.VariableDefinitionMapEntry.value:type_name -> grpc.federation.generator.plugin.VariableDefinition - 22, // 108: grpc.federation.generator.plugin.Reference.VariableDefinitionGroupMapEntry.value:type_name -> grpc.federation.generator.plugin.VariableDefinitionGroup - 109, // [109:109] is the sub-list for method output_type - 109, // [109:109] is the sub-list for method input_type - 109, // [109:109] is the sub-list for extension type_name - 109, // [109:109] is the sub-list for extension extendee - 0, // [0:109] is the sub-list for field type_name + 29, // 80: grpc.federation.generator.plugin.GRPCErrorDetail.by:type_name -> grpc.federation.generator.plugin.CELValue + 45, // 81: grpc.federation.generator.plugin.PreconditionFailure.violations:type_name -> grpc.federation.generator.plugin.PreconditionFailureViolation + 29, // 82: grpc.federation.generator.plugin.PreconditionFailureViolation.type:type_name -> grpc.federation.generator.plugin.CELValue + 29, // 83: grpc.federation.generator.plugin.PreconditionFailureViolation.subject:type_name -> grpc.federation.generator.plugin.CELValue + 29, // 84: grpc.federation.generator.plugin.PreconditionFailureViolation.description:type_name -> grpc.federation.generator.plugin.CELValue + 47, // 85: grpc.federation.generator.plugin.BadRequest.field_violations:type_name -> grpc.federation.generator.plugin.BadRequestFieldViolation + 29, // 86: grpc.federation.generator.plugin.BadRequestFieldViolation.field:type_name -> grpc.federation.generator.plugin.CELValue + 29, // 87: grpc.federation.generator.plugin.BadRequestFieldViolation.description:type_name -> grpc.federation.generator.plugin.CELValue + 29, // 88: grpc.federation.generator.plugin.LocalizedMessage.message:type_name -> grpc.federation.generator.plugin.CELValue + 52, // 89: grpc.federation.generator.plugin.Enum.rule:type_name -> grpc.federation.generator.plugin.EnumRule + 53, // 90: grpc.federation.generator.plugin.EnumValue.rule:type_name -> grpc.federation.generator.plugin.EnumValueRule + 54, // 91: grpc.federation.generator.plugin.EnumValueRule.aliases:type_name -> grpc.federation.generator.plugin.EnumValueAlias + 56, // 92: grpc.federation.generator.plugin.CELPlugin.functions:type_name -> grpc.federation.generator.plugin.CELFunction + 28, // 93: grpc.federation.generator.plugin.CELFunction.args:type_name -> grpc.federation.generator.plugin.Type + 28, // 94: grpc.federation.generator.plugin.CELFunction.return:type_name -> grpc.federation.generator.plugin.Type + 59, // 95: grpc.federation.generator.plugin.ProtoCodeGeneratorResponse.GeneratedCodeInfo.annotation:type_name -> grpc.federation.generator.plugin.ProtoCodeGeneratorResponse.GeneratedCodeInfo.Annotation + 57, // 96: grpc.federation.generator.plugin.ProtoCodeGeneratorResponse.File.generated_code_info:type_name -> grpc.federation.generator.plugin.ProtoCodeGeneratorResponse.GeneratedCodeInfo + 3, // 97: grpc.federation.generator.plugin.ProtoCodeGeneratorResponse.GeneratedCodeInfo.Annotation.semantic:type_name -> grpc.federation.generator.plugin.ProtoCodeGeneratorResponse.GeneratedCodeInfo.Annotation.Semantic + 7, // 98: grpc.federation.generator.plugin.Reference.FileMapEntry.value:type_name -> grpc.federation.generator.plugin.File + 10, // 99: grpc.federation.generator.plugin.Reference.ServiceMapEntry.value:type_name -> grpc.federation.generator.plugin.Service + 12, // 100: grpc.federation.generator.plugin.Reference.MethodMapEntry.value:type_name -> grpc.federation.generator.plugin.Method + 14, // 101: grpc.federation.generator.plugin.Reference.MessageMapEntry.value:type_name -> grpc.federation.generator.plugin.Message + 18, // 102: grpc.federation.generator.plugin.Reference.FieldMapEntry.value:type_name -> grpc.federation.generator.plugin.Field + 50, // 103: grpc.federation.generator.plugin.Reference.EnumMapEntry.value:type_name -> grpc.federation.generator.plugin.Enum + 51, // 104: grpc.federation.generator.plugin.Reference.EnumValueMapEntry.value:type_name -> grpc.federation.generator.plugin.EnumValue + 49, // 105: grpc.federation.generator.plugin.Reference.OneofMapEntry.value:type_name -> grpc.federation.generator.plugin.Oneof + 55, // 106: grpc.federation.generator.plugin.Reference.CelPluginMapEntry.value:type_name -> grpc.federation.generator.plugin.CELPlugin + 25, // 107: grpc.federation.generator.plugin.Reference.GraphMapEntry.value:type_name -> grpc.federation.generator.plugin.MessageDependencyGraph + 17, // 108: grpc.federation.generator.plugin.Reference.VariableDefinitionMapEntry.value:type_name -> grpc.federation.generator.plugin.VariableDefinition + 22, // 109: grpc.federation.generator.plugin.Reference.VariableDefinitionGroupMapEntry.value:type_name -> grpc.federation.generator.plugin.VariableDefinitionGroup + 110, // [110:110] is the sub-list for method output_type + 110, // [110:110] is the sub-list for method input_type + 110, // [110:110] is the sub-list for extension type_name + 110, // [110:110] is the sub-list for extension extendee + 0, // [0:110] is the sub-list for field type_name } func init() { file_grpc_federation_generator_proto_init() } diff --git a/internal/testutil/builder.go b/internal/testutil/builder.go index a641ff4d..32017d6e 100644 --- a/internal/testutil/builder.go +++ b/internal/testutil/builder.go @@ -1038,6 +1038,11 @@ func (b *GRPCErrorDetailBuilder) AddDef(v *resolver.VariableDefinition) *GRPCErr return b } +func (b *GRPCErrorDetailBuilder) AddBy(v *resolver.CELValue) *GRPCErrorDetailBuilder { + b.detail.By = append(b.detail.By, v) + return b +} + func (b *GRPCErrorDetailBuilder) AddMessage(v *resolver.VariableDefinition) *GRPCErrorDetailBuilder { b.detail.Messages.Defs = append(b.detail.Messages.Defs, v) return b diff --git a/proto/grpc/federation/federation.proto b/proto/grpc/federation/federation.proto index abfecba2..63aceef1 100644 --- a/proto/grpc/federation/federation.proto +++ b/proto/grpc/federation/federation.proto @@ -318,6 +318,8 @@ message GRPCErrorDetail { repeated google.rpc.Help help = 12; // localized_message provides a localized error message that is safe to return to the user. repeated google.rpc.LocalizedMessage localized_message = 13; + // by specify a message in CEL to express the details of the error. + repeated string by = 14; } // Validation represents a validation rule against variables defined within the current scope. diff --git a/proto/grpc/federation/generator.proto b/proto/grpc/federation/generator.proto index 87241e3e..efbd7e42 100644 --- a/proto/grpc/federation/generator.proto +++ b/proto/grpc/federation/generator.proto @@ -360,6 +360,7 @@ message GRPCErrorDetail { repeated PreconditionFailure precondition_failures = 4; repeated BadRequest bad_requests = 5; repeated LocalizedMessage localized_messages = 6; + repeated CELValue by = 7; } message PreconditionFailure { diff --git a/resolver/resolver.go b/resolver/resolver.go index 32153218..71bc72f4 100644 --- a/resolver/resolver.go +++ b/resolver/resolver.go @@ -2042,6 +2042,10 @@ func (r *Resolver) resolveGRPCErrorDetails(ctx *context, details []*federation.G for idx, detail := range details { ctx := ctx.withErrDetailIndex(idx) builder := builder.WithDetail(idx) + var byValues []*CELValue + for _, by := range detail.GetBy() { + byValues = append(byValues, &CELValue{Expr: by}) + } result = append(result, &GRPCErrorDetail{ If: r.resolveGRPCErrorIf(detail.GetIf()), DefSet: &VariableDefinitionSet{ @@ -2049,6 +2053,7 @@ func (r *Resolver) resolveGRPCErrorDetails(ctx *context, details []*federation.G return builder.WithDef(idx) }), }, + By: byValues, Messages: &VariableDefinitionSet{ Defs: r.resolveGRPCDetailMessages(ctx, detail.GetMessage(), func(idx int) *source.VariableDefinitionOptionBuilder { return builder.WithMessage(idx) @@ -3419,6 +3424,24 @@ func (r *Resolver) resolveGRPCErrorDetailCELValues(ctx *context, env *cel.Env, d ), ) } + for _, by := range detail.By { + if err := r.resolveCELValue(ctx, env, by); err != nil { + ctx.addError( + ErrWithLocation( + err.Error(), + builder.WithBy().Location(), + ), + ) + } + if by.Out != nil && by.Out.Kind != types.Message { + ctx.addError( + ErrWithLocation( + `"by" must always return a message value`, + builder.WithBy().Location(), + ), + ) + } + } for idx, def := range detail.Messages.Definitions() { env = r.resolveVariableDefinitionCELValues(ctx, env, def, builder.WithDef(idx)) } diff --git a/resolver/resolver_test.go b/resolver/resolver_test.go index 3e7f2b21..b4349620 100644 --- a/resolver/resolver_test.go +++ b/resolver/resolver_test.go @@ -3390,6 +3390,8 @@ func TestErrorHandler(t *testing.T) { ). Build(t), ). + AddBy(testutil.NewCELValueBuilder("org.post.Post{id: 'foo'}", ref.Type(t, "org.post", "Post")).Build(t)). + AddBy(testutil.NewCELValueBuilder("org.post.CreatePost{title: 'bar'}", ref.Type(t, "org.post", "CreatePost")).Build(t)). AddMessage( testutil.NewVariableDefinitionBuilder(). SetName("_def0_err_detail0_msg0"). diff --git a/resolver/types.go b/resolver/types.go index cb7c80dc..33548f8b 100644 --- a/resolver/types.go +++ b/resolver/types.go @@ -260,6 +260,7 @@ type GRPCErrorDetails []*GRPCErrorDetail type GRPCErrorDetail struct { If *CELValue DefSet *VariableDefinitionSet + By []*CELValue Messages *VariableDefinitionSet PreconditionFailures []*PreconditionFailure BadRequests []*BadRequest diff --git a/source/file.go b/source/file.go index 67cc790b..e86b111d 100644 --- a/source/file.go +++ b/source/file.go @@ -1470,6 +1470,12 @@ func (f *File) nodeInfoByGRPCErrorDetail(list []*ast.MessageLiteralNode, detail return nil } return f.nodeInfo(value) + case detail.By && fieldName == "by": + value, ok := elem.Val.(*ast.StringLiteralNode) + if !ok { + return nil + } + return f.nodeInfo(value) case detail.Message != nil && fieldName == "message": messages = append(messages, f.getMessageListFromNode(elem.Val)...) case detail.PreconditionFailure != nil && fieldName == "precondition_failure": diff --git a/source/location.go b/source/location.go index 11c012ae..63af277b 100644 --- a/source/location.go +++ b/source/location.go @@ -271,6 +271,7 @@ type GRPCErrorDetailOption struct { Idx int Def *VariableDefinitionOption If bool + By bool Message *VariableDefinitionOption PreconditionFailure *GRPCErrorDetailPreconditionFailureOption BadRequest *GRPCErrorDetailBadRequestOption diff --git a/source/location_builder.go b/source/location_builder.go index 91132e6b..71f57ec9 100644 --- a/source/location_builder.go +++ b/source/location_builder.go @@ -1265,6 +1265,16 @@ func (b *GRPCErrorDetailOptionBuilder) WithIf() *GRPCErrorDetailOptionBuilder { } } +func (b *GRPCErrorDetailOptionBuilder) WithBy() *GRPCErrorDetailOptionBuilder { + root := b.root.Clone() + option := b.option(root) + option.By = true + return &GRPCErrorDetailOptionBuilder{ + root: root, + option: b.option, + } +} + func (b *GRPCErrorDetailOptionBuilder) WithPreconditionFailure(i1, i2 int, fieldName string) *GRPCErrorDetailOptionBuilder { root := b.root.Clone() option := b.option(root) diff --git a/testdata/error_handler.proto b/testdata/error_handler.proto index 3aa48fd2..e16f85d9 100644 --- a/testdata/error_handler.proto +++ b/testdata/error_handler.proto @@ -48,6 +48,7 @@ message Post { details { def { name: "localized_msg" message { name: "LocalizedMessage" args { name: "value" by: "id" } } } message { name: "CustomMessage" args { name: "msg" by: "id" } } + by: [ "org.post.Post{id: 'foo'}", "org.post.CreatePost{title: 'bar'}" ] precondition_failure { violations { type: "'some-type'" diff --git a/validator/testdata/invalid_call_error_handler.proto b/validator/testdata/invalid_call_error_handler.proto index 1c26fb9c..a5a73731 100644 --- a/validator/testdata/invalid_call_error_handler.proto +++ b/validator/testdata/invalid_call_error_handler.proto @@ -42,6 +42,11 @@ message Post { ignore: true ignore_and_response: "post.GetPostResponse{}" } + error { + details { + by: "1" + } + } error { ignore_and_response: "10" } diff --git a/validator/validator_test.go b/validator/validator_test.go index 5394c479..16f8809a 100644 --- a/validator/validator_test.go +++ b/validator/validator_test.go @@ -40,8 +40,11 @@ testdata/invalid_call_error_handler.proto:42:21: cannot set both "ignore" and "i testdata/invalid_call_error_handler.proto:43:34: cannot set both "ignore" and "ignore_and_response" 43: ignore_and_response: "post.GetPostResponse{}" ^ -testdata/invalid_call_error_handler.proto:46:34: value must be "post.GetPostResponse" type -46: ignore_and_response: "10" +testdata/invalid_call_error_handler.proto:47:19: "by" must always return a message value +47: by: "1" + ^ +testdata/invalid_call_error_handler.proto:51:34: value must be "post.GetPostResponse" type +51: ignore_and_response: "10" ^ `}, {file: "invalid_condition_type.proto", expected: `