feat: add GetPieceNumbersRequest and GetPieceNumbersResponse (#202)

Signed-off-by: Gaius <gaius.qi@gmail.com>
This commit is contained in:
Gaius 2023-11-01 17:56:05 +08:00 committed by GitHub
parent 001ec211a4
commit 1cf73ec2fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 255 additions and 300 deletions

View File

@ -1,6 +1,6 @@
[package] [package]
name = "dragonfly-api" name = "dragonfly-api"
version = "2.0.38" version = "2.0.39"
authors = ["Gaius <gaius.qi@gmail.com>"] authors = ["Gaius <gaius.qi@gmail.com>"]
edition = "2021" edition = "2021"
license = "Apache-2.0" license = "Apache-2.0"

View File

@ -38,15 +38,15 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
) )
// InterestedAllPiecesRequest represents interested all pieces request of SyncPiecesRequest. // GetPieceNumbersRequest represents gets piece numbers request of SyncPiecesRequest.
type InterestedAllPiecesRequest struct { type GetPieceNumbersRequest struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
} }
func (x *InterestedAllPiecesRequest) Reset() { func (x *GetPieceNumbersRequest) Reset() {
*x = InterestedAllPiecesRequest{} *x = GetPieceNumbersRequest{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_pkg_apis_dfdaemon_v2_dfdaemon_proto_msgTypes[0] mi := &file_pkg_apis_dfdaemon_v2_dfdaemon_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -54,13 +54,13 @@ func (x *InterestedAllPiecesRequest) Reset() {
} }
} }
func (x *InterestedAllPiecesRequest) String() string { func (x *GetPieceNumbersRequest) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
} }
func (*InterestedAllPiecesRequest) ProtoMessage() {} func (*GetPieceNumbersRequest) ProtoMessage() {}
func (x *InterestedAllPiecesRequest) ProtoReflect() protoreflect.Message { func (x *GetPieceNumbersRequest) ProtoReflect() protoreflect.Message {
mi := &file_pkg_apis_dfdaemon_v2_dfdaemon_proto_msgTypes[0] mi := &file_pkg_apis_dfdaemon_v2_dfdaemon_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -72,8 +72,8 @@ func (x *InterestedAllPiecesRequest) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x) return mi.MessageOf(x)
} }
// Deprecated: Use InterestedAllPiecesRequest.ProtoReflect.Descriptor instead. // Deprecated: Use GetPieceNumbersRequest.ProtoReflect.Descriptor instead.
func (*InterestedAllPiecesRequest) Descriptor() ([]byte, []int) { func (*GetPieceNumbersRequest) Descriptor() ([]byte, []int) {
return file_pkg_apis_dfdaemon_v2_dfdaemon_proto_rawDescGZIP(), []int{0} return file_pkg_apis_dfdaemon_v2_dfdaemon_proto_rawDescGZIP(), []int{0}
} }
@ -136,7 +136,7 @@ type SyncPiecesRequest struct {
TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
// Types that are assignable to Request: // Types that are assignable to Request:
// //
// *SyncPiecesRequest_InterestedAllPiecesRequest // *SyncPiecesRequest_GetPieceNumbersRequest
// *SyncPiecesRequest_InterestedPiecesRequest // *SyncPiecesRequest_InterestedPiecesRequest
Request isSyncPiecesRequest_Request `protobuf_oneof:"request"` Request isSyncPiecesRequest_Request `protobuf_oneof:"request"`
} }
@ -187,9 +187,9 @@ func (m *SyncPiecesRequest) GetRequest() isSyncPiecesRequest_Request {
return nil return nil
} }
func (x *SyncPiecesRequest) GetInterestedAllPiecesRequest() *InterestedAllPiecesRequest { func (x *SyncPiecesRequest) GetGetPieceNumbersRequest() *GetPieceNumbersRequest {
if x, ok := x.GetRequest().(*SyncPiecesRequest_InterestedAllPiecesRequest); ok { if x, ok := x.GetRequest().(*SyncPiecesRequest_GetPieceNumbersRequest); ok {
return x.InterestedAllPiecesRequest return x.GetPieceNumbersRequest
} }
return nil return nil
} }
@ -205,30 +205,30 @@ type isSyncPiecesRequest_Request interface {
isSyncPiecesRequest_Request() isSyncPiecesRequest_Request()
} }
type SyncPiecesRequest_InterestedAllPiecesRequest struct { type SyncPiecesRequest_GetPieceNumbersRequest struct {
InterestedAllPiecesRequest *InterestedAllPiecesRequest `protobuf:"bytes,2,opt,name=interested_all_pieces_request,json=interestedAllPiecesRequest,proto3,oneof"` GetPieceNumbersRequest *GetPieceNumbersRequest `protobuf:"bytes,2,opt,name=get_piece_numbers_request,json=getPieceNumbersRequest,proto3,oneof"`
} }
type SyncPiecesRequest_InterestedPiecesRequest struct { type SyncPiecesRequest_InterestedPiecesRequest struct {
InterestedPiecesRequest *InterestedPiecesRequest `protobuf:"bytes,3,opt,name=interested_pieces_request,json=interestedPiecesRequest,proto3,oneof"` InterestedPiecesRequest *InterestedPiecesRequest `protobuf:"bytes,3,opt,name=interested_pieces_request,json=interestedPiecesRequest,proto3,oneof"`
} }
func (*SyncPiecesRequest_InterestedAllPiecesRequest) isSyncPiecesRequest_Request() {} func (*SyncPiecesRequest_GetPieceNumbersRequest) isSyncPiecesRequest_Request() {}
func (*SyncPiecesRequest_InterestedPiecesRequest) isSyncPiecesRequest_Request() {} func (*SyncPiecesRequest_InterestedPiecesRequest) isSyncPiecesRequest_Request() {}
// InterestedPiecesResponse represents all pieces response of SyncPiecesResponse. // GetPieceNumbersResponse represents gets piece numbers response of SyncPiecesResponse.
type InterestedAllPiecesResponse struct { type GetPieceNumbersResponse struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
// One of the pieces in task. // Piece numbers.
Piece *v2.Piece `protobuf:"bytes,1,opt,name=piece,proto3" json:"piece,omitempty"` PieceNumbers []int32 `protobuf:"varint,1,rep,packed,name=piece_numbers,json=pieceNumbers,proto3" json:"piece_numbers,omitempty"`
} }
func (x *InterestedAllPiecesResponse) Reset() { func (x *GetPieceNumbersResponse) Reset() {
*x = InterestedAllPiecesResponse{} *x = GetPieceNumbersResponse{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_pkg_apis_dfdaemon_v2_dfdaemon_proto_msgTypes[3] mi := &file_pkg_apis_dfdaemon_v2_dfdaemon_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -236,13 +236,13 @@ func (x *InterestedAllPiecesResponse) Reset() {
} }
} }
func (x *InterestedAllPiecesResponse) String() string { func (x *GetPieceNumbersResponse) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
} }
func (*InterestedAllPiecesResponse) ProtoMessage() {} func (*GetPieceNumbersResponse) ProtoMessage() {}
func (x *InterestedAllPiecesResponse) ProtoReflect() protoreflect.Message { func (x *GetPieceNumbersResponse) ProtoReflect() protoreflect.Message {
mi := &file_pkg_apis_dfdaemon_v2_dfdaemon_proto_msgTypes[3] mi := &file_pkg_apis_dfdaemon_v2_dfdaemon_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -254,14 +254,14 @@ func (x *InterestedAllPiecesResponse) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x) return mi.MessageOf(x)
} }
// Deprecated: Use InterestedAllPiecesResponse.ProtoReflect.Descriptor instead. // Deprecated: Use GetPieceNumbersResponse.ProtoReflect.Descriptor instead.
func (*InterestedAllPiecesResponse) Descriptor() ([]byte, []int) { func (*GetPieceNumbersResponse) Descriptor() ([]byte, []int) {
return file_pkg_apis_dfdaemon_v2_dfdaemon_proto_rawDescGZIP(), []int{3} return file_pkg_apis_dfdaemon_v2_dfdaemon_proto_rawDescGZIP(), []int{3}
} }
func (x *InterestedAllPiecesResponse) GetPiece() *v2.Piece { func (x *GetPieceNumbersResponse) GetPieceNumbers() []int32 {
if x != nil { if x != nil {
return x.Piece return x.PieceNumbers
} }
return nil return nil
} }
@ -323,7 +323,7 @@ type SyncPiecesResponse struct {
// Types that are assignable to Response: // Types that are assignable to Response:
// //
// *SyncPiecesResponse_InterestedAllPiecesResponse // *SyncPiecesResponse_GetPieceNumbersResponse
// *SyncPiecesResponse_InterestedPiecesResponse // *SyncPiecesResponse_InterestedPiecesResponse
Response isSyncPiecesResponse_Response `protobuf_oneof:"response"` Response isSyncPiecesResponse_Response `protobuf_oneof:"response"`
} }
@ -367,9 +367,9 @@ func (m *SyncPiecesResponse) GetResponse() isSyncPiecesResponse_Response {
return nil return nil
} }
func (x *SyncPiecesResponse) GetInterestedAllPiecesResponse() *InterestedAllPiecesResponse { func (x *SyncPiecesResponse) GetGetPieceNumbersResponse() *GetPieceNumbersResponse {
if x, ok := x.GetResponse().(*SyncPiecesResponse_InterestedAllPiecesResponse); ok { if x, ok := x.GetResponse().(*SyncPiecesResponse_GetPieceNumbersResponse); ok {
return x.InterestedAllPiecesResponse return x.GetPieceNumbersResponse
} }
return nil return nil
} }
@ -385,15 +385,15 @@ type isSyncPiecesResponse_Response interface {
isSyncPiecesResponse_Response() isSyncPiecesResponse_Response()
} }
type SyncPiecesResponse_InterestedAllPiecesResponse struct { type SyncPiecesResponse_GetPieceNumbersResponse struct {
InterestedAllPiecesResponse *InterestedAllPiecesResponse `protobuf:"bytes,1,opt,name=interested_all_pieces_response,json=interestedAllPiecesResponse,proto3,oneof"` GetPieceNumbersResponse *GetPieceNumbersResponse `protobuf:"bytes,2,opt,name=get_piece_numbers_response,json=getPieceNumbersResponse,proto3,oneof"`
} }
type SyncPiecesResponse_InterestedPiecesResponse struct { type SyncPiecesResponse_InterestedPiecesResponse struct {
InterestedPiecesResponse *InterestedPiecesResponse `protobuf:"bytes,2,opt,name=interested_pieces_response,json=interestedPiecesResponse,proto3,oneof"` InterestedPiecesResponse *InterestedPiecesResponse `protobuf:"bytes,3,opt,name=interested_pieces_response,json=interestedPiecesResponse,proto3,oneof"`
} }
func (*SyncPiecesResponse_InterestedAllPiecesResponse) isSyncPiecesResponse_Response() {} func (*SyncPiecesResponse_GetPieceNumbersResponse) isSyncPiecesResponse_Response() {}
func (*SyncPiecesResponse_InterestedPiecesResponse) isSyncPiecesResponse_Response() {} func (*SyncPiecesResponse_InterestedPiecesResponse) isSyncPiecesResponse_Response() {}
@ -604,23 +604,22 @@ var file_pkg_apis_dfdaemon_v2_dfdaemon_proto_rawDesc = []byte{
0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64,
0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1c, 0x0a, 0x1a, 0x49, 0x6e, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x18, 0x0a, 0x16, 0x47, 0x65, 0x74,
0x65, 0x72, 0x65, 0x73, 0x74, 0x65, 0x64, 0x41, 0x6c, 0x6c, 0x50, 0x69, 0x65, 0x63, 0x65, 0x73, 0x50, 0x69, 0x65, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x48, 0x0a, 0x17, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x22, 0x48, 0x0a, 0x17, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x65,
0x65, 0x73, 0x74, 0x65, 0x64, 0x50, 0x69, 0x65, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x64, 0x50, 0x69, 0x65, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d,
0x73, 0x74, 0x12, 0x2d, 0x0a, 0x0d, 0x70, 0x69, 0x65, 0x63, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x0a, 0x0d, 0x70, 0x69, 0x65, 0x63, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18,
0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x01, 0x20, 0x03, 0x28, 0x05, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52,
0x02, 0x08, 0x01, 0x52, 0x0c, 0x70, 0x69, 0x65, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x0c, 0x70, 0x69, 0x65, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x8b, 0x02,
0x73, 0x22, 0x97, 0x02, 0x0a, 0x11, 0x53, 0x79, 0x6e, 0x63, 0x50, 0x69, 0x65, 0x63, 0x65, 0x73, 0x0a, 0x11, 0x53, 0x79, 0x6e, 0x63, 0x50, 0x69, 0x65, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01,
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x74,
0x01, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x6c, 0x0a, 0x1d, 0x69, 0x6e, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x60, 0x0a, 0x19, 0x67, 0x65, 0x74, 0x5f, 0x70, 0x69, 0x65,
0x65, 0x72, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x6c, 0x6c, 0x5f, 0x70, 0x69, 0x65, 0x63, 0x63, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65,
0x65, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65,
0x32, 0x27, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x69, 0x65, 0x63, 0x65, 0x4e,
0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x65, 0x64, 0x41, 0x6c, 0x6c, 0x50, 0x69, 0x65, 0x63, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52,
0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x1a, 0x69, 0x6e, 0x74, 0x16, 0x67, 0x65, 0x74, 0x50, 0x69, 0x65, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73,
0x65, 0x72, 0x65, 0x73, 0x74, 0x65, 0x64, 0x41, 0x6c, 0x6c, 0x50, 0x69, 0x65, 0x63, 0x65, 0x73,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x62, 0x0a, 0x19, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x62, 0x0a, 0x19, 0x69, 0x6e, 0x74, 0x65, 0x72,
0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x69, 0x65, 0x63, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x69, 0x65, 0x63, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x64, 0x66, 0x64, 0x75, 0x65, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x64, 0x66, 0x64,
@ -628,76 +627,74 @@ var file_pkg_apis_dfdaemon_v2_dfdaemon_proto_rawDesc = []byte{
0x74, 0x65, 0x64, 0x50, 0x69, 0x65, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x74, 0x65, 0x64, 0x50, 0x69, 0x65, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x48, 0x00, 0x52, 0x17, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x65, 0x64, 0x50, 0x69, 0x48, 0x00, 0x52, 0x17, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x65, 0x64, 0x50, 0x69,
0x65, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x0e, 0x0a, 0x07, 0x72, 0x65, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x0e, 0x0a, 0x07, 0x72,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x4f, 0x0a, 0x1b, 0x49, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x3e, 0x0a, 0x17, 0x47,
0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x65, 0x64, 0x41, 0x6c, 0x6c, 0x50, 0x69, 0x65, 0x63, 0x65, 0x74, 0x50, 0x69, 0x65, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65,
0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x05, 0x70, 0x69, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x69, 0x65, 0x63, 0x65, 0x5f,
0x65, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0c, 0x70,
0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x69, 0x65, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x69, 0x65, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x4c, 0x0a, 0x18, 0x49,
0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x70, 0x69, 0x65, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x18, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x65, 0x64, 0x50, 0x69, 0x65, 0x63, 0x65, 0x73, 0x52,
0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x65, 0x64, 0x50, 0x69, 0x65, 0x63, 0x65, 0x73, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x05, 0x70, 0x69, 0x65, 0x63, 0x65,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x05, 0x70, 0x69, 0x65, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e,
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x76, 0x32, 0x2e, 0x50, 0x69, 0x65, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02,
0x2e, 0x76, 0x32, 0x2e, 0x50, 0x69, 0x65, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x10, 0x01, 0x52, 0x05, 0x70, 0x69, 0x65, 0x63, 0x65, 0x22, 0xf1, 0x01, 0x0a, 0x12, 0x53, 0x79,
0x02, 0x10, 0x01, 0x52, 0x05, 0x70, 0x69, 0x65, 0x63, 0x65, 0x22, 0xfd, 0x01, 0x0a, 0x12, 0x53, 0x6e, 0x63, 0x50, 0x69, 0x65, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x79, 0x6e, 0x63, 0x50, 0x69, 0x65, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x12, 0x63, 0x0a, 0x1a, 0x67, 0x65, 0x74, 0x5f, 0x70, 0x69, 0x65, 0x63, 0x65, 0x5f, 0x6e, 0x75,
0x65, 0x12, 0x6f, 0x0a, 0x1e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x02,
0x61, 0x6c, 0x6c, 0x5f, 0x70, 0x69, 0x65, 0x63, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e,
0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x69, 0x65, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65,
0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x17, 0x67, 0x65,
0x74, 0x50, 0x69, 0x65, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x1a, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73,
0x74, 0x65, 0x64, 0x5f, 0x70, 0x69, 0x65, 0x63, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x64, 0x66, 0x64, 0x61,
0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74,
0x65, 0x64, 0x41, 0x6c, 0x6c, 0x50, 0x69, 0x65, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x65, 0x64, 0x50, 0x69, 0x65, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x1b, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x65, 0x48, 0x00, 0x52, 0x18, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x65, 0x64, 0x50, 0x69,
0x64, 0x41, 0x6c, 0x6c, 0x50, 0x69, 0x65, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x65, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x0f, 0x0a, 0x08,
0x73, 0x65, 0x12, 0x65, 0x0a, 0x1a, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x65, 0x64, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x50, 0x0a,
0x5f, 0x70, 0x69, 0x65, 0x63, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x13, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71,
0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x75, 0x65, 0x73, 0x74, 0x12, 0x39, 0x0a, 0x08, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64,
0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x65, 0x64, 0x50, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e,
0x69, 0x65, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x76, 0x32, 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x08, 0xfa, 0x42, 0x05,
0x18, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x65, 0x64, 0x50, 0x69, 0x65, 0x63, 0x65, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x22,
0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x0f, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x42, 0x0a, 0x11, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x50, 0x0a, 0x13, 0x44, 0x6f, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x54,
0x61, 0x73, 0x6b, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x04, 0x74,
0x61, 0x73, 0x6b, 0x22, 0x33, 0x0a, 0x0f, 0x53, 0x74, 0x61, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01,
0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0x35, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65,
0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a,
0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07,
0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x32,
0xee, 0x02, 0x0a, 0x08, 0x44, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x12, 0x51, 0x0a, 0x0a,
0x53, 0x79, 0x6e, 0x63, 0x50, 0x69, 0x65, 0x63, 0x65, 0x73, 0x12, 0x1e, 0x2e, 0x64, 0x66, 0x64,
0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x50, 0x69, 0x65,
0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x64, 0x66, 0x64,
0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x50, 0x69, 0x65,
0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12,
0x48, 0x0a, 0x0c, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x12,
0x20, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x6f,
0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x12, 0x39, 0x0a, 0x08, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x44, 0x0a, 0x0a, 0x55, 0x70, 0x6c,
0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x6f, 0x61, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1e, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d,
0x10, 0x01, 0x52, 0x08, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x42, 0x0a, 0x11, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x61, 0x73, 0x6b,
0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x74, 0x12, 0x2d, 0x0a, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12,
0x0f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x39, 0x0a, 0x08, 0x53, 0x74, 0x61, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1c, 0x2e, 0x64, 0x66,
0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x54, 0x61,
0x22, 0x33, 0x0a, 0x0f, 0x53, 0x74, 0x61, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d,
0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x44, 0x0a, 0x0a, 0x44, 0x65,
0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x74, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1e, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65,
0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0x35, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73,
0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x07, 0x74, 0x61, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79,
0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x32, 0xee, 0x02, 0x0a, 0x42, 0x2d, 0x5a, 0x2b, 0x64, 0x37, 0x79, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76,
0x08, 0x44, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x12, 0x51, 0x0a, 0x0a, 0x53, 0x79, 0x6e, 0x32, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x64, 0x66, 0x64, 0x61, 0x65,
0x63, 0x50, 0x69, 0x65, 0x63, 0x65, 0x73, 0x12, 0x1e, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x32, 0x3b, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x62,
0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x50, 0x69, 0x65, 0x63, 0x65, 0x73, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d,
0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x50, 0x69, 0x65, 0x63, 0x65, 0x73,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x48, 0x0a, 0x0c,
0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x20, 0x2e, 0x64,
0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x6c,
0x6f, 0x61, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16,
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x44, 0x0a, 0x0a, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64,
0x54, 0x61, 0x73, 0x6b, 0x12, 0x1e, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e,
0x76, 0x32, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x39, 0x0a, 0x08,
0x53, 0x74, 0x61, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1c, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65,
0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e,
0x76, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x44, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74,
0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1e, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e,
0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x42, 0x2d, 0x5a,
0x2b, 0x64, 0x37, 0x79, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x70,
0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e,
0x2f, 0x76, 0x32, 0x3b, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (
@ -714,45 +711,44 @@ func file_pkg_apis_dfdaemon_v2_dfdaemon_proto_rawDescGZIP() []byte {
var file_pkg_apis_dfdaemon_v2_dfdaemon_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_pkg_apis_dfdaemon_v2_dfdaemon_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
var file_pkg_apis_dfdaemon_v2_dfdaemon_proto_goTypes = []interface{}{ var file_pkg_apis_dfdaemon_v2_dfdaemon_proto_goTypes = []interface{}{
(*InterestedAllPiecesRequest)(nil), // 0: dfdaemon.v2.InterestedAllPiecesRequest (*GetPieceNumbersRequest)(nil), // 0: dfdaemon.v2.GetPieceNumbersRequest
(*InterestedPiecesRequest)(nil), // 1: dfdaemon.v2.InterestedPiecesRequest (*InterestedPiecesRequest)(nil), // 1: dfdaemon.v2.InterestedPiecesRequest
(*SyncPiecesRequest)(nil), // 2: dfdaemon.v2.SyncPiecesRequest (*SyncPiecesRequest)(nil), // 2: dfdaemon.v2.SyncPiecesRequest
(*InterestedAllPiecesResponse)(nil), // 3: dfdaemon.v2.InterestedAllPiecesResponse (*GetPieceNumbersResponse)(nil), // 3: dfdaemon.v2.GetPieceNumbersResponse
(*InterestedPiecesResponse)(nil), // 4: dfdaemon.v2.InterestedPiecesResponse (*InterestedPiecesResponse)(nil), // 4: dfdaemon.v2.InterestedPiecesResponse
(*SyncPiecesResponse)(nil), // 5: dfdaemon.v2.SyncPiecesResponse (*SyncPiecesResponse)(nil), // 5: dfdaemon.v2.SyncPiecesResponse
(*DownloadTaskRequest)(nil), // 6: dfdaemon.v2.DownloadTaskRequest (*DownloadTaskRequest)(nil), // 6: dfdaemon.v2.DownloadTaskRequest
(*UploadTaskRequest)(nil), // 7: dfdaemon.v2.UploadTaskRequest (*UploadTaskRequest)(nil), // 7: dfdaemon.v2.UploadTaskRequest
(*StatTaskRequest)(nil), // 8: dfdaemon.v2.StatTaskRequest (*StatTaskRequest)(nil), // 8: dfdaemon.v2.StatTaskRequest
(*DeleteTaskRequest)(nil), // 9: dfdaemon.v2.DeleteTaskRequest (*DeleteTaskRequest)(nil), // 9: dfdaemon.v2.DeleteTaskRequest
(*v2.Piece)(nil), // 10: common.v2.Piece (*v2.Piece)(nil), // 10: common.v2.Piece
(*v2.Download)(nil), // 11: common.v2.Download (*v2.Download)(nil), // 11: common.v2.Download
(*v2.Task)(nil), // 12: common.v2.Task (*v2.Task)(nil), // 12: common.v2.Task
(*emptypb.Empty)(nil), // 13: google.protobuf.Empty (*emptypb.Empty)(nil), // 13: google.protobuf.Empty
} }
var file_pkg_apis_dfdaemon_v2_dfdaemon_proto_depIdxs = []int32{ var file_pkg_apis_dfdaemon_v2_dfdaemon_proto_depIdxs = []int32{
0, // 0: dfdaemon.v2.SyncPiecesRequest.interested_all_pieces_request:type_name -> dfdaemon.v2.InterestedAllPiecesRequest 0, // 0: dfdaemon.v2.SyncPiecesRequest.get_piece_numbers_request:type_name -> dfdaemon.v2.GetPieceNumbersRequest
1, // 1: dfdaemon.v2.SyncPiecesRequest.interested_pieces_request:type_name -> dfdaemon.v2.InterestedPiecesRequest 1, // 1: dfdaemon.v2.SyncPiecesRequest.interested_pieces_request:type_name -> dfdaemon.v2.InterestedPiecesRequest
10, // 2: dfdaemon.v2.InterestedAllPiecesResponse.piece:type_name -> common.v2.Piece 10, // 2: dfdaemon.v2.InterestedPiecesResponse.piece:type_name -> common.v2.Piece
10, // 3: dfdaemon.v2.InterestedPiecesResponse.piece:type_name -> common.v2.Piece 3, // 3: dfdaemon.v2.SyncPiecesResponse.get_piece_numbers_response:type_name -> dfdaemon.v2.GetPieceNumbersResponse
3, // 4: dfdaemon.v2.SyncPiecesResponse.interested_all_pieces_response:type_name -> dfdaemon.v2.InterestedAllPiecesResponse 4, // 4: dfdaemon.v2.SyncPiecesResponse.interested_pieces_response:type_name -> dfdaemon.v2.InterestedPiecesResponse
4, // 5: dfdaemon.v2.SyncPiecesResponse.interested_pieces_response:type_name -> dfdaemon.v2.InterestedPiecesResponse 11, // 5: dfdaemon.v2.DownloadTaskRequest.download:type_name -> common.v2.Download
11, // 6: dfdaemon.v2.DownloadTaskRequest.download:type_name -> common.v2.Download 12, // 6: dfdaemon.v2.UploadTaskRequest.task:type_name -> common.v2.Task
12, // 7: dfdaemon.v2.UploadTaskRequest.task:type_name -> common.v2.Task 2, // 7: dfdaemon.v2.Dfdaemon.SyncPieces:input_type -> dfdaemon.v2.SyncPiecesRequest
2, // 8: dfdaemon.v2.Dfdaemon.SyncPieces:input_type -> dfdaemon.v2.SyncPiecesRequest 6, // 8: dfdaemon.v2.Dfdaemon.DownloadTask:input_type -> dfdaemon.v2.DownloadTaskRequest
6, // 9: dfdaemon.v2.Dfdaemon.DownloadTask:input_type -> dfdaemon.v2.DownloadTaskRequest 7, // 9: dfdaemon.v2.Dfdaemon.UploadTask:input_type -> dfdaemon.v2.UploadTaskRequest
7, // 10: dfdaemon.v2.Dfdaemon.UploadTask:input_type -> dfdaemon.v2.UploadTaskRequest 8, // 10: dfdaemon.v2.Dfdaemon.StatTask:input_type -> dfdaemon.v2.StatTaskRequest
8, // 11: dfdaemon.v2.Dfdaemon.StatTask:input_type -> dfdaemon.v2.StatTaskRequest 9, // 11: dfdaemon.v2.Dfdaemon.DeleteTask:input_type -> dfdaemon.v2.DeleteTaskRequest
9, // 12: dfdaemon.v2.Dfdaemon.DeleteTask:input_type -> dfdaemon.v2.DeleteTaskRequest 5, // 12: dfdaemon.v2.Dfdaemon.SyncPieces:output_type -> dfdaemon.v2.SyncPiecesResponse
5, // 13: dfdaemon.v2.Dfdaemon.SyncPieces:output_type -> dfdaemon.v2.SyncPiecesResponse 13, // 13: dfdaemon.v2.Dfdaemon.DownloadTask:output_type -> google.protobuf.Empty
13, // 14: dfdaemon.v2.Dfdaemon.DownloadTask:output_type -> google.protobuf.Empty 13, // 14: dfdaemon.v2.Dfdaemon.UploadTask:output_type -> google.protobuf.Empty
13, // 15: dfdaemon.v2.Dfdaemon.UploadTask:output_type -> google.protobuf.Empty 12, // 15: dfdaemon.v2.Dfdaemon.StatTask:output_type -> common.v2.Task
12, // 16: dfdaemon.v2.Dfdaemon.StatTask:output_type -> common.v2.Task 13, // 16: dfdaemon.v2.Dfdaemon.DeleteTask:output_type -> google.protobuf.Empty
13, // 17: dfdaemon.v2.Dfdaemon.DeleteTask:output_type -> google.protobuf.Empty 12, // [12:17] is the sub-list for method output_type
13, // [13:18] is the sub-list for method output_type 7, // [7:12] is the sub-list for method input_type
8, // [8:13] is the sub-list for method input_type 7, // [7:7] is the sub-list for extension type_name
8, // [8:8] is the sub-list for extension type_name 7, // [7:7] is the sub-list for extension extendee
8, // [8:8] is the sub-list for extension extendee 0, // [0:7] is the sub-list for field type_name
0, // [0:8] is the sub-list for field type_name
} }
func init() { file_pkg_apis_dfdaemon_v2_dfdaemon_proto_init() } func init() { file_pkg_apis_dfdaemon_v2_dfdaemon_proto_init() }
@ -762,7 +758,7 @@ func file_pkg_apis_dfdaemon_v2_dfdaemon_proto_init() {
} }
if !protoimpl.UnsafeEnabled { if !protoimpl.UnsafeEnabled {
file_pkg_apis_dfdaemon_v2_dfdaemon_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { file_pkg_apis_dfdaemon_v2_dfdaemon_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*InterestedAllPiecesRequest); i { switch v := v.(*GetPieceNumbersRequest); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
@ -798,7 +794,7 @@ func file_pkg_apis_dfdaemon_v2_dfdaemon_proto_init() {
} }
} }
file_pkg_apis_dfdaemon_v2_dfdaemon_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { file_pkg_apis_dfdaemon_v2_dfdaemon_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*InterestedAllPiecesResponse); i { switch v := v.(*GetPieceNumbersResponse); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
@ -883,11 +879,11 @@ func file_pkg_apis_dfdaemon_v2_dfdaemon_proto_init() {
} }
} }
file_pkg_apis_dfdaemon_v2_dfdaemon_proto_msgTypes[2].OneofWrappers = []interface{}{ file_pkg_apis_dfdaemon_v2_dfdaemon_proto_msgTypes[2].OneofWrappers = []interface{}{
(*SyncPiecesRequest_InterestedAllPiecesRequest)(nil), (*SyncPiecesRequest_GetPieceNumbersRequest)(nil),
(*SyncPiecesRequest_InterestedPiecesRequest)(nil), (*SyncPiecesRequest_InterestedPiecesRequest)(nil),
} }
file_pkg_apis_dfdaemon_v2_dfdaemon_proto_msgTypes[5].OneofWrappers = []interface{}{ file_pkg_apis_dfdaemon_v2_dfdaemon_proto_msgTypes[5].OneofWrappers = []interface{}{
(*SyncPiecesResponse_InterestedAllPiecesResponse)(nil), (*SyncPiecesResponse_GetPieceNumbersResponse)(nil),
(*SyncPiecesResponse_InterestedPiecesResponse)(nil), (*SyncPiecesResponse_InterestedPiecesResponse)(nil),
} }
type x struct{} type x struct{}

View File

@ -35,22 +35,22 @@ var (
_ = sort.Sort _ = sort.Sort
) )
// Validate checks the field values on InterestedAllPiecesRequest with the // Validate checks the field values on GetPieceNumbersRequest with the rules
// rules defined in the proto definition for this message. If any rules are // defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations. // violated, the first error encountered is returned, or nil if there are no violations.
func (m *InterestedAllPiecesRequest) Validate() error { func (m *GetPieceNumbersRequest) Validate() error {
return m.validate(false) return m.validate(false)
} }
// ValidateAll checks the field values on InterestedAllPiecesRequest with the // ValidateAll checks the field values on GetPieceNumbersRequest with the rules
// rules defined in the proto definition for this message. If any rules are // defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in // violated, the result is a list of violation errors wrapped in
// InterestedAllPiecesRequestMultiError, or nil if none found. // GetPieceNumbersRequestMultiError, or nil if none found.
func (m *InterestedAllPiecesRequest) ValidateAll() error { func (m *GetPieceNumbersRequest) ValidateAll() error {
return m.validate(true) return m.validate(true)
} }
func (m *InterestedAllPiecesRequest) validate(all bool) error { func (m *GetPieceNumbersRequest) validate(all bool) error {
if m == nil { if m == nil {
return nil return nil
} }
@ -58,19 +58,19 @@ func (m *InterestedAllPiecesRequest) validate(all bool) error {
var errors []error var errors []error
if len(errors) > 0 { if len(errors) > 0 {
return InterestedAllPiecesRequestMultiError(errors) return GetPieceNumbersRequestMultiError(errors)
} }
return nil return nil
} }
// InterestedAllPiecesRequestMultiError is an error wrapping multiple // GetPieceNumbersRequestMultiError is an error wrapping multiple validation
// validation errors returned by InterestedAllPiecesRequest.ValidateAll() if // errors returned by GetPieceNumbersRequest.ValidateAll() if the designated
// the designated constraints aren't met. // constraints aren't met.
type InterestedAllPiecesRequestMultiError []error type GetPieceNumbersRequestMultiError []error
// Error returns a concatenation of all the error messages it wraps. // Error returns a concatenation of all the error messages it wraps.
func (m InterestedAllPiecesRequestMultiError) Error() string { func (m GetPieceNumbersRequestMultiError) Error() string {
var msgs []string var msgs []string
for _, err := range m { for _, err := range m {
msgs = append(msgs, err.Error()) msgs = append(msgs, err.Error())
@ -79,11 +79,11 @@ func (m InterestedAllPiecesRequestMultiError) Error() string {
} }
// AllErrors returns a list of validation violation errors. // AllErrors returns a list of validation violation errors.
func (m InterestedAllPiecesRequestMultiError) AllErrors() []error { return m } func (m GetPieceNumbersRequestMultiError) AllErrors() []error { return m }
// InterestedAllPiecesRequestValidationError is the validation error returned // GetPieceNumbersRequestValidationError is the validation error returned by
// by InterestedAllPiecesRequest.Validate if the designated constraints aren't met. // GetPieceNumbersRequest.Validate if the designated constraints aren't met.
type InterestedAllPiecesRequestValidationError struct { type GetPieceNumbersRequestValidationError struct {
field string field string
reason string reason string
cause error cause error
@ -91,24 +91,24 @@ type InterestedAllPiecesRequestValidationError struct {
} }
// Field function returns field value. // Field function returns field value.
func (e InterestedAllPiecesRequestValidationError) Field() string { return e.field } func (e GetPieceNumbersRequestValidationError) Field() string { return e.field }
// Reason function returns reason value. // Reason function returns reason value.
func (e InterestedAllPiecesRequestValidationError) Reason() string { return e.reason } func (e GetPieceNumbersRequestValidationError) Reason() string { return e.reason }
// Cause function returns cause value. // Cause function returns cause value.
func (e InterestedAllPiecesRequestValidationError) Cause() error { return e.cause } func (e GetPieceNumbersRequestValidationError) Cause() error { return e.cause }
// Key function returns key value. // Key function returns key value.
func (e InterestedAllPiecesRequestValidationError) Key() bool { return e.key } func (e GetPieceNumbersRequestValidationError) Key() bool { return e.key }
// ErrorName returns error name. // ErrorName returns error name.
func (e InterestedAllPiecesRequestValidationError) ErrorName() string { func (e GetPieceNumbersRequestValidationError) ErrorName() string {
return "InterestedAllPiecesRequestValidationError" return "GetPieceNumbersRequestValidationError"
} }
// Error satisfies the builtin error interface // Error satisfies the builtin error interface
func (e InterestedAllPiecesRequestValidationError) Error() string { func (e GetPieceNumbersRequestValidationError) Error() string {
cause := "" cause := ""
if e.cause != nil { if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause) cause = fmt.Sprintf(" | caused by: %v", e.cause)
@ -120,14 +120,14 @@ func (e InterestedAllPiecesRequestValidationError) Error() string {
} }
return fmt.Sprintf( return fmt.Sprintf(
"invalid %sInterestedAllPiecesRequest.%s: %s%s", "invalid %sGetPieceNumbersRequest.%s: %s%s",
key, key,
e.field, e.field,
e.reason, e.reason,
cause) cause)
} }
var _ error = InterestedAllPiecesRequestValidationError{} var _ error = GetPieceNumbersRequestValidationError{}
var _ interface { var _ interface {
Field() string Field() string
@ -135,7 +135,7 @@ var _ interface {
Key() bool Key() bool
Cause() error Cause() error
ErrorName() string ErrorName() string
} = InterestedAllPiecesRequestValidationError{} } = GetPieceNumbersRequestValidationError{}
// Validate checks the field values on InterestedPiecesRequest with the rules // Validate checks the field values on InterestedPiecesRequest with the rules
// defined in the proto definition for this message. If any rules are // defined in the proto definition for this message. If any rules are
@ -285,7 +285,7 @@ func (m *SyncPiecesRequest) validate(all bool) error {
oneofRequestPresent := false oneofRequestPresent := false
switch v := m.Request.(type) { switch v := m.Request.(type) {
case *SyncPiecesRequest_InterestedAllPiecesRequest: case *SyncPiecesRequest_GetPieceNumbersRequest:
if v == nil { if v == nil {
err := SyncPiecesRequestValidationError{ err := SyncPiecesRequestValidationError{
field: "Request", field: "Request",
@ -299,11 +299,11 @@ func (m *SyncPiecesRequest) validate(all bool) error {
oneofRequestPresent = true oneofRequestPresent = true
if all { if all {
switch v := interface{}(m.GetInterestedAllPiecesRequest()).(type) { switch v := interface{}(m.GetGetPieceNumbersRequest()).(type) {
case interface{ ValidateAll() error }: case interface{ ValidateAll() error }:
if err := v.ValidateAll(); err != nil { if err := v.ValidateAll(); err != nil {
errors = append(errors, SyncPiecesRequestValidationError{ errors = append(errors, SyncPiecesRequestValidationError{
field: "InterestedAllPiecesRequest", field: "GetPieceNumbersRequest",
reason: "embedded message failed validation", reason: "embedded message failed validation",
cause: err, cause: err,
}) })
@ -311,16 +311,16 @@ func (m *SyncPiecesRequest) validate(all bool) error {
case interface{ Validate() error }: case interface{ Validate() error }:
if err := v.Validate(); err != nil { if err := v.Validate(); err != nil {
errors = append(errors, SyncPiecesRequestValidationError{ errors = append(errors, SyncPiecesRequestValidationError{
field: "InterestedAllPiecesRequest", field: "GetPieceNumbersRequest",
reason: "embedded message failed validation", reason: "embedded message failed validation",
cause: err, cause: err,
}) })
} }
} }
} else if v, ok := interface{}(m.GetInterestedAllPiecesRequest()).(interface{ Validate() error }); ok { } else if v, ok := interface{}(m.GetGetPieceNumbersRequest()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil { if err := v.Validate(); err != nil {
return SyncPiecesRequestValidationError{ return SyncPiecesRequestValidationError{
field: "InterestedAllPiecesRequest", field: "GetPieceNumbersRequest",
reason: "embedded message failed validation", reason: "embedded message failed validation",
cause: err, cause: err,
} }
@ -463,82 +463,42 @@ var _ interface {
ErrorName() string ErrorName() string
} = SyncPiecesRequestValidationError{} } = SyncPiecesRequestValidationError{}
// Validate checks the field values on InterestedAllPiecesResponse with the // Validate checks the field values on GetPieceNumbersResponse with the rules
// rules defined in the proto definition for this message. If any rules are // defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations. // violated, the first error encountered is returned, or nil if there are no violations.
func (m *InterestedAllPiecesResponse) Validate() error { func (m *GetPieceNumbersResponse) Validate() error {
return m.validate(false) return m.validate(false)
} }
// ValidateAll checks the field values on InterestedAllPiecesResponse with the // ValidateAll checks the field values on GetPieceNumbersResponse with the
// rules defined in the proto definition for this message. If any rules are // rules defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in // violated, the result is a list of violation errors wrapped in
// InterestedAllPiecesResponseMultiError, or nil if none found. // GetPieceNumbersResponseMultiError, or nil if none found.
func (m *InterestedAllPiecesResponse) ValidateAll() error { func (m *GetPieceNumbersResponse) ValidateAll() error {
return m.validate(true) return m.validate(true)
} }
func (m *InterestedAllPiecesResponse) validate(all bool) error { func (m *GetPieceNumbersResponse) validate(all bool) error {
if m == nil { if m == nil {
return nil return nil
} }
var errors []error var errors []error
if m.GetPiece() == nil {
err := InterestedAllPiecesResponseValidationError{
field: "Piece",
reason: "value is required",
}
if !all {
return err
}
errors = append(errors, err)
}
if all {
switch v := interface{}(m.GetPiece()).(type) {
case interface{ ValidateAll() error }:
if err := v.ValidateAll(); err != nil {
errors = append(errors, InterestedAllPiecesResponseValidationError{
field: "Piece",
reason: "embedded message failed validation",
cause: err,
})
}
case interface{ Validate() error }:
if err := v.Validate(); err != nil {
errors = append(errors, InterestedAllPiecesResponseValidationError{
field: "Piece",
reason: "embedded message failed validation",
cause: err,
})
}
}
} else if v, ok := interface{}(m.GetPiece()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return InterestedAllPiecesResponseValidationError{
field: "Piece",
reason: "embedded message failed validation",
cause: err,
}
}
}
if len(errors) > 0 { if len(errors) > 0 {
return InterestedAllPiecesResponseMultiError(errors) return GetPieceNumbersResponseMultiError(errors)
} }
return nil return nil
} }
// InterestedAllPiecesResponseMultiError is an error wrapping multiple // GetPieceNumbersResponseMultiError is an error wrapping multiple validation
// validation errors returned by InterestedAllPiecesResponse.ValidateAll() if // errors returned by GetPieceNumbersResponse.ValidateAll() if the designated
// the designated constraints aren't met. // constraints aren't met.
type InterestedAllPiecesResponseMultiError []error type GetPieceNumbersResponseMultiError []error
// Error returns a concatenation of all the error messages it wraps. // Error returns a concatenation of all the error messages it wraps.
func (m InterestedAllPiecesResponseMultiError) Error() string { func (m GetPieceNumbersResponseMultiError) Error() string {
var msgs []string var msgs []string
for _, err := range m { for _, err := range m {
msgs = append(msgs, err.Error()) msgs = append(msgs, err.Error())
@ -547,12 +507,11 @@ func (m InterestedAllPiecesResponseMultiError) Error() string {
} }
// AllErrors returns a list of validation violation errors. // AllErrors returns a list of validation violation errors.
func (m InterestedAllPiecesResponseMultiError) AllErrors() []error { return m } func (m GetPieceNumbersResponseMultiError) AllErrors() []error { return m }
// InterestedAllPiecesResponseValidationError is the validation error returned // GetPieceNumbersResponseValidationError is the validation error returned by
// by InterestedAllPiecesResponse.Validate if the designated constraints // GetPieceNumbersResponse.Validate if the designated constraints aren't met.
// aren't met. type GetPieceNumbersResponseValidationError struct {
type InterestedAllPiecesResponseValidationError struct {
field string field string
reason string reason string
cause error cause error
@ -560,24 +519,24 @@ type InterestedAllPiecesResponseValidationError struct {
} }
// Field function returns field value. // Field function returns field value.
func (e InterestedAllPiecesResponseValidationError) Field() string { return e.field } func (e GetPieceNumbersResponseValidationError) Field() string { return e.field }
// Reason function returns reason value. // Reason function returns reason value.
func (e InterestedAllPiecesResponseValidationError) Reason() string { return e.reason } func (e GetPieceNumbersResponseValidationError) Reason() string { return e.reason }
// Cause function returns cause value. // Cause function returns cause value.
func (e InterestedAllPiecesResponseValidationError) Cause() error { return e.cause } func (e GetPieceNumbersResponseValidationError) Cause() error { return e.cause }
// Key function returns key value. // Key function returns key value.
func (e InterestedAllPiecesResponseValidationError) Key() bool { return e.key } func (e GetPieceNumbersResponseValidationError) Key() bool { return e.key }
// ErrorName returns error name. // ErrorName returns error name.
func (e InterestedAllPiecesResponseValidationError) ErrorName() string { func (e GetPieceNumbersResponseValidationError) ErrorName() string {
return "InterestedAllPiecesResponseValidationError" return "GetPieceNumbersResponseValidationError"
} }
// Error satisfies the builtin error interface // Error satisfies the builtin error interface
func (e InterestedAllPiecesResponseValidationError) Error() string { func (e GetPieceNumbersResponseValidationError) Error() string {
cause := "" cause := ""
if e.cause != nil { if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause) cause = fmt.Sprintf(" | caused by: %v", e.cause)
@ -589,14 +548,14 @@ func (e InterestedAllPiecesResponseValidationError) Error() string {
} }
return fmt.Sprintf( return fmt.Sprintf(
"invalid %sInterestedAllPiecesResponse.%s: %s%s", "invalid %sGetPieceNumbersResponse.%s: %s%s",
key, key,
e.field, e.field,
e.reason, e.reason,
cause) cause)
} }
var _ error = InterestedAllPiecesResponseValidationError{} var _ error = GetPieceNumbersResponseValidationError{}
var _ interface { var _ interface {
Field() string Field() string
@ -604,7 +563,7 @@ var _ interface {
Key() bool Key() bool
Cause() error Cause() error
ErrorName() string ErrorName() string
} = InterestedAllPiecesResponseValidationError{} } = GetPieceNumbersResponseValidationError{}
// Validate checks the field values on InterestedPiecesResponse with the rules // Validate checks the field values on InterestedPiecesResponse with the rules
// defined in the proto definition for this message. If any rules are // defined in the proto definition for this message. If any rules are
@ -772,7 +731,7 @@ func (m *SyncPiecesResponse) validate(all bool) error {
oneofResponsePresent := false oneofResponsePresent := false
switch v := m.Response.(type) { switch v := m.Response.(type) {
case *SyncPiecesResponse_InterestedAllPiecesResponse: case *SyncPiecesResponse_GetPieceNumbersResponse:
if v == nil { if v == nil {
err := SyncPiecesResponseValidationError{ err := SyncPiecesResponseValidationError{
field: "Response", field: "Response",
@ -786,11 +745,11 @@ func (m *SyncPiecesResponse) validate(all bool) error {
oneofResponsePresent = true oneofResponsePresent = true
if all { if all {
switch v := interface{}(m.GetInterestedAllPiecesResponse()).(type) { switch v := interface{}(m.GetGetPieceNumbersResponse()).(type) {
case interface{ ValidateAll() error }: case interface{ ValidateAll() error }:
if err := v.ValidateAll(); err != nil { if err := v.ValidateAll(); err != nil {
errors = append(errors, SyncPiecesResponseValidationError{ errors = append(errors, SyncPiecesResponseValidationError{
field: "InterestedAllPiecesResponse", field: "GetPieceNumbersResponse",
reason: "embedded message failed validation", reason: "embedded message failed validation",
cause: err, cause: err,
}) })
@ -798,16 +757,16 @@ func (m *SyncPiecesResponse) validate(all bool) error {
case interface{ Validate() error }: case interface{ Validate() error }:
if err := v.Validate(); err != nil { if err := v.Validate(); err != nil {
errors = append(errors, SyncPiecesResponseValidationError{ errors = append(errors, SyncPiecesResponseValidationError{
field: "InterestedAllPiecesResponse", field: "GetPieceNumbersResponse",
reason: "embedded message failed validation", reason: "embedded message failed validation",
cause: err, cause: err,
}) })
} }
} }
} else if v, ok := interface{}(m.GetInterestedAllPiecesResponse()).(interface{ Validate() error }); ok { } else if v, ok := interface{}(m.GetGetPieceNumbersResponse()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil { if err := v.Validate(); err != nil {
return SyncPiecesResponseValidationError{ return SyncPiecesResponseValidationError{
field: "InterestedAllPiecesResponse", field: "GetPieceNumbersResponse",
reason: "embedded message failed validation", reason: "embedded message failed validation",
cause: err, cause: err,
} }

View File

@ -24,8 +24,8 @@ import "validate/validate.proto";
option go_package = "d7y.io/api/v2/pkg/apis/dfdaemon/v2;dfdaemon"; option go_package = "d7y.io/api/v2/pkg/apis/dfdaemon/v2;dfdaemon";
// InterestedAllPiecesRequest represents interested all pieces request of SyncPiecesRequest. // GetPieceNumbersRequest represents gets piece numbers request of SyncPiecesRequest.
message InterestedAllPiecesRequest { message GetPieceNumbersRequest {
} }
// InterestedPiecesRequest represents interested pieces request of SyncPiecesRequest. // InterestedPiecesRequest represents interested pieces request of SyncPiecesRequest.
@ -42,15 +42,15 @@ message SyncPiecesRequest{
oneof request { oneof request {
option (validate.required) = true; option (validate.required) = true;
InterestedAllPiecesRequest interested_all_pieces_request = 2; GetPieceNumbersRequest get_piece_numbers_request = 2;
InterestedPiecesRequest interested_pieces_request = 3; InterestedPiecesRequest interested_pieces_request = 3;
} }
} }
// InterestedPiecesResponse represents all pieces response of SyncPiecesResponse. // GetPieceNumbersResponse represents gets piece numbers response of SyncPiecesResponse.
message InterestedAllPiecesResponse { message GetPieceNumbersResponse {
// One of the pieces in task. // Piece numbers.
common.v2.Piece piece = 1 [(validate.rules).message.required = true]; repeated int32 piece_numbers = 1;
} }
// InterestedPiecesResponse represents interested pieces response of SyncPiecesResponse. // InterestedPiecesResponse represents interested pieces response of SyncPiecesResponse.
@ -64,8 +64,8 @@ message SyncPiecesResponse {
oneof response { oneof response {
option (validate.required) = true; option (validate.required) = true;
InterestedAllPiecesResponse interested_all_pieces_response = 1; GetPieceNumbersResponse get_piece_numbers_response = 2;
InterestedPiecesResponse interested_pieces_response = 2; InterestedPiecesResponse interested_pieces_response = 3;
} }
} }

View File

@ -21,8 +21,8 @@ package dfdaemon.v2;
import "common.proto"; import "common.proto";
import "google/protobuf/empty.proto"; import "google/protobuf/empty.proto";
// InterestedAllPiecesRequest represents interested all pieces request of SyncPiecesRequest. // GetPieceNumbersRequest represents gets piece numbers request of SyncPiecesRequest.
message InterestedAllPiecesRequest { message GetPieceNumbersRequest {
} }
// InterestedPiecesRequest represents interested pieces request of SyncPiecesRequest. // InterestedPiecesRequest represents interested pieces request of SyncPiecesRequest.
@ -37,15 +37,15 @@ message SyncPiecesRequest{
string task_id = 1; string task_id = 1;
oneof request { oneof request {
InterestedAllPiecesRequest interested_all_pieces_request = 2; GetPieceNumbersRequest get_piece_numbers_request = 2;
InterestedPiecesRequest interested_pieces_request = 3; InterestedPiecesRequest interested_pieces_request = 3;
} }
} }
// InterestedPiecesResponse represents all pieces response of SyncPiecesResponse. // GetPieceNumbersResponse represents gets piece numbers response of SyncPiecesResponse.
message InterestedAllPiecesResponse { message GetPieceNumbersResponse {
// One of the pieces in task. // Piece numbers.
common.v2.Piece piece = 1; repeated int32 piece_numbers = 1;
} }
// InterestedPiecesResponse represents interested pieces response of SyncPiecesResponse. // InterestedPiecesResponse represents interested pieces response of SyncPiecesResponse.
@ -57,8 +57,8 @@ message InterestedPiecesResponse {
// SyncPiecesResponse represents response of SyncPieces. // SyncPiecesResponse represents response of SyncPieces.
message SyncPiecesResponse { message SyncPiecesResponse {
oneof response { oneof response {
InterestedAllPiecesResponse interested_all_pieces_response = 1; GetPieceNumbersResponse get_piece_numbers_response = 2;
InterestedPiecesResponse interested_pieces_response = 2; InterestedPiecesResponse interested_pieces_response = 3;
} }
} }

Binary file not shown.

View File

@ -1,8 +1,8 @@
/// InterestedAllPiecesRequest represents interested all pieces request of SyncPiecesRequest. /// GetPieceNumbersRequest represents gets piece numbers request of SyncPiecesRequest.
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)] #[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)] #[derive(Clone, PartialEq, ::prost::Message)]
pub struct InterestedAllPiecesRequest {} pub struct GetPieceNumbersRequest {}
/// InterestedPiecesRequest represents interested pieces request of SyncPiecesRequest. /// InterestedPiecesRequest represents interested pieces request of SyncPiecesRequest.
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)] #[allow(clippy::derive_partial_eq_without_eq)]
@ -30,19 +30,19 @@ pub mod sync_pieces_request {
#[derive(Clone, PartialEq, ::prost::Oneof)] #[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Request { pub enum Request {
#[prost(message, tag = "2")] #[prost(message, tag = "2")]
InterestedAllPiecesRequest(super::InterestedAllPiecesRequest), GetPieceNumbersRequest(super::GetPieceNumbersRequest),
#[prost(message, tag = "3")] #[prost(message, tag = "3")]
InterestedPiecesRequest(super::InterestedPiecesRequest), InterestedPiecesRequest(super::InterestedPiecesRequest),
} }
} }
/// InterestedPiecesResponse represents all pieces response of SyncPiecesResponse. /// GetPieceNumbersResponse represents gets piece numbers response of SyncPiecesResponse.
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)] #[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)] #[derive(Clone, PartialEq, ::prost::Message)]
pub struct InterestedAllPiecesResponse { pub struct GetPieceNumbersResponse {
/// One of the pieces in task. /// Piece numbers.
#[prost(message, optional, tag = "1")] #[prost(int32, repeated, tag = "1")]
pub piece: ::core::option::Option<super::super::common::v2::Piece>, pub piece_numbers: ::prost::alloc::vec::Vec<i32>,
} }
/// InterestedPiecesResponse represents interested pieces response of SyncPiecesResponse. /// InterestedPiecesResponse represents interested pieces response of SyncPiecesResponse.
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
@ -58,7 +58,7 @@ pub struct InterestedPiecesResponse {
#[allow(clippy::derive_partial_eq_without_eq)] #[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)] #[derive(Clone, PartialEq, ::prost::Message)]
pub struct SyncPiecesResponse { pub struct SyncPiecesResponse {
#[prost(oneof = "sync_pieces_response::Response", tags = "1, 2")] #[prost(oneof = "sync_pieces_response::Response", tags = "2, 3")]
pub response: ::core::option::Option<sync_pieces_response::Response>, pub response: ::core::option::Option<sync_pieces_response::Response>,
} }
/// Nested message and enum types in `SyncPiecesResponse`. /// Nested message and enum types in `SyncPiecesResponse`.
@ -67,9 +67,9 @@ pub mod sync_pieces_response {
#[allow(clippy::derive_partial_eq_without_eq)] #[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)] #[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Response { pub enum Response {
#[prost(message, tag = "1")]
InterestedAllPiecesResponse(super::InterestedAllPiecesResponse),
#[prost(message, tag = "2")] #[prost(message, tag = "2")]
GetPieceNumbersResponse(super::GetPieceNumbersResponse),
#[prost(message, tag = "3")]
InterestedPiecesResponse(super::InterestedPiecesResponse), InterestedPiecesResponse(super::InterestedPiecesResponse),
} }
} }