diff --git a/example/bookstore/v1/bookstore.pb.go b/example/bookstore/v1/bookstore.pb.go index 561c994..5299f73 100644 --- a/example/bookstore/v1/bookstore.pb.go +++ b/example/bookstore/v1/bookstore.pb.go @@ -706,6 +706,104 @@ func (x *ApplyBookRequest) GetBook() *Book { return nil } +// Request message for the archive method +type ArchiveBookRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The globally unique identifier for the resource + Path string `protobuf:"bytes,10018,opt,name=path,proto3" json:"path,omitempty"` +} + +func (x *ArchiveBookRequest) Reset() { + *x = ArchiveBookRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ArchiveBookRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ArchiveBookRequest) ProtoMessage() {} + +func (x *ArchiveBookRequest) ProtoReflect() protoreflect.Message { + mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ArchiveBookRequest.ProtoReflect.Descriptor instead. +func (*ArchiveBookRequest) Descriptor() ([]byte, []int) { + return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{11} +} + +func (x *ArchiveBookRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +// Response message for the archive method +type ArchiveBookResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Field for success. + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` +} + +func (x *ArchiveBookResponse) Reset() { + *x = ArchiveBookResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ArchiveBookResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ArchiveBookResponse) ProtoMessage() {} + +func (x *ArchiveBookResponse) ProtoReflect() protoreflect.Message { + mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ArchiveBookResponse.ProtoReflect.Descriptor instead. +func (*ArchiveBookResponse) Descriptor() ([]byte, []int) { + return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{12} +} + +func (x *ArchiveBookResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + // A Create request for a book-edition resource. type CreateBookEditionRequest struct { state protoimpl.MessageState @@ -723,7 +821,7 @@ type CreateBookEditionRequest struct { func (x *CreateBookEditionRequest) Reset() { *x = CreateBookEditionRequest{} if protoimpl.UnsafeEnabled { - mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[11] + mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -736,7 +834,7 @@ func (x *CreateBookEditionRequest) String() string { func (*CreateBookEditionRequest) ProtoMessage() {} func (x *CreateBookEditionRequest) ProtoReflect() protoreflect.Message { - mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[11] + mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -749,7 +847,7 @@ func (x *CreateBookEditionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateBookEditionRequest.ProtoReflect.Descriptor instead. func (*CreateBookEditionRequest) Descriptor() ([]byte, []int) { - return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{11} + return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{13} } func (x *CreateBookEditionRequest) GetParent() string { @@ -786,7 +884,7 @@ type GetBookEditionRequest struct { func (x *GetBookEditionRequest) Reset() { *x = GetBookEditionRequest{} if protoimpl.UnsafeEnabled { - mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[12] + mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -799,7 +897,7 @@ func (x *GetBookEditionRequest) String() string { func (*GetBookEditionRequest) ProtoMessage() {} func (x *GetBookEditionRequest) ProtoReflect() protoreflect.Message { - mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[12] + mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -812,7 +910,7 @@ func (x *GetBookEditionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetBookEditionRequest.ProtoReflect.Descriptor instead. func (*GetBookEditionRequest) Descriptor() ([]byte, []int) { - return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{12} + return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{14} } func (x *GetBookEditionRequest) GetPath() string { @@ -835,7 +933,7 @@ type DeleteBookEditionRequest struct { func (x *DeleteBookEditionRequest) Reset() { *x = DeleteBookEditionRequest{} if protoimpl.UnsafeEnabled { - mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[13] + mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -848,7 +946,7 @@ func (x *DeleteBookEditionRequest) String() string { func (*DeleteBookEditionRequest) ProtoMessage() {} func (x *DeleteBookEditionRequest) ProtoReflect() protoreflect.Message { - mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[13] + mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -861,7 +959,7 @@ func (x *DeleteBookEditionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteBookEditionRequest.ProtoReflect.Descriptor instead. func (*DeleteBookEditionRequest) Descriptor() ([]byte, []int) { - return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{13} + return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{15} } func (x *DeleteBookEditionRequest) GetPath() string { @@ -888,7 +986,7 @@ type ListBookEditionsRequest struct { func (x *ListBookEditionsRequest) Reset() { *x = ListBookEditionsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[14] + mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -901,7 +999,7 @@ func (x *ListBookEditionsRequest) String() string { func (*ListBookEditionsRequest) ProtoMessage() {} func (x *ListBookEditionsRequest) ProtoReflect() protoreflect.Message { - mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[14] + mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -914,7 +1012,7 @@ func (x *ListBookEditionsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListBookEditionsRequest.ProtoReflect.Descriptor instead. func (*ListBookEditionsRequest) Descriptor() ([]byte, []int) { - return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{14} + return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{16} } func (x *ListBookEditionsRequest) GetParent() string { @@ -953,7 +1051,7 @@ type ListBookEditionsResponse struct { func (x *ListBookEditionsResponse) Reset() { *x = ListBookEditionsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[15] + mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -966,7 +1064,7 @@ func (x *ListBookEditionsResponse) String() string { func (*ListBookEditionsResponse) ProtoMessage() {} func (x *ListBookEditionsResponse) ProtoReflect() protoreflect.Message { - mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[15] + mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -979,7 +1077,7 @@ func (x *ListBookEditionsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListBookEditionsResponse.ProtoReflect.Descriptor instead. func (*ListBookEditionsResponse) Descriptor() ([]byte, []int) { - return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{15} + return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{17} } func (x *ListBookEditionsResponse) GetResults() []*BookEdition { @@ -1013,7 +1111,7 @@ type CreateIsbnRequest struct { func (x *CreateIsbnRequest) Reset() { *x = CreateIsbnRequest{} if protoimpl.UnsafeEnabled { - mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[16] + mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1026,7 +1124,7 @@ func (x *CreateIsbnRequest) String() string { func (*CreateIsbnRequest) ProtoMessage() {} func (x *CreateIsbnRequest) ProtoReflect() protoreflect.Message { - mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[16] + mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1039,7 +1137,7 @@ func (x *CreateIsbnRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateIsbnRequest.ProtoReflect.Descriptor instead. func (*CreateIsbnRequest) Descriptor() ([]byte, []int) { - return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{16} + return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{18} } func (x *CreateIsbnRequest) GetParent() string { @@ -1080,7 +1178,7 @@ type CreatePublisherRequest struct { func (x *CreatePublisherRequest) Reset() { *x = CreatePublisherRequest{} if protoimpl.UnsafeEnabled { - mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[17] + mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1093,7 +1191,7 @@ func (x *CreatePublisherRequest) String() string { func (*CreatePublisherRequest) ProtoMessage() {} func (x *CreatePublisherRequest) ProtoReflect() protoreflect.Message { - mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[17] + mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1106,7 +1204,7 @@ func (x *CreatePublisherRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreatePublisherRequest.ProtoReflect.Descriptor instead. func (*CreatePublisherRequest) Descriptor() ([]byte, []int) { - return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{17} + return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{19} } func (x *CreatePublisherRequest) GetParent() string { @@ -1143,7 +1241,7 @@ type GetPublisherRequest struct { func (x *GetPublisherRequest) Reset() { *x = GetPublisherRequest{} if protoimpl.UnsafeEnabled { - mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[18] + mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1156,7 +1254,7 @@ func (x *GetPublisherRequest) String() string { func (*GetPublisherRequest) ProtoMessage() {} func (x *GetPublisherRequest) ProtoReflect() protoreflect.Message { - mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[18] + mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1169,7 +1267,7 @@ func (x *GetPublisherRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetPublisherRequest.ProtoReflect.Descriptor instead. func (*GetPublisherRequest) Descriptor() ([]byte, []int) { - return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{18} + return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{20} } func (x *GetPublisherRequest) GetPath() string { @@ -1196,7 +1294,7 @@ type UpdatePublisherRequest struct { func (x *UpdatePublisherRequest) Reset() { *x = UpdatePublisherRequest{} if protoimpl.UnsafeEnabled { - mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[19] + mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1209,7 +1307,7 @@ func (x *UpdatePublisherRequest) String() string { func (*UpdatePublisherRequest) ProtoMessage() {} func (x *UpdatePublisherRequest) ProtoReflect() protoreflect.Message { - mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[19] + mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1222,7 +1320,7 @@ func (x *UpdatePublisherRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdatePublisherRequest.ProtoReflect.Descriptor instead. func (*UpdatePublisherRequest) Descriptor() ([]byte, []int) { - return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{19} + return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{21} } func (x *UpdatePublisherRequest) GetPath() string { @@ -1259,7 +1357,7 @@ type DeletePublisherRequest struct { func (x *DeletePublisherRequest) Reset() { *x = DeletePublisherRequest{} if protoimpl.UnsafeEnabled { - mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[20] + mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1272,7 +1370,7 @@ func (x *DeletePublisherRequest) String() string { func (*DeletePublisherRequest) ProtoMessage() {} func (x *DeletePublisherRequest) ProtoReflect() protoreflect.Message { - mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[20] + mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1285,7 +1383,7 @@ func (x *DeletePublisherRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeletePublisherRequest.ProtoReflect.Descriptor instead. func (*DeletePublisherRequest) Descriptor() ([]byte, []int) { - return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{20} + return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{22} } func (x *DeletePublisherRequest) GetPath() string { @@ -1312,7 +1410,7 @@ type ListPublishersRequest struct { func (x *ListPublishersRequest) Reset() { *x = ListPublishersRequest{} if protoimpl.UnsafeEnabled { - mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[21] + mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1325,7 +1423,7 @@ func (x *ListPublishersRequest) String() string { func (*ListPublishersRequest) ProtoMessage() {} func (x *ListPublishersRequest) ProtoReflect() protoreflect.Message { - mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[21] + mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1338,7 +1436,7 @@ func (x *ListPublishersRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListPublishersRequest.ProtoReflect.Descriptor instead. func (*ListPublishersRequest) Descriptor() ([]byte, []int) { - return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{21} + return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{23} } func (x *ListPublishersRequest) GetParent() string { @@ -1377,7 +1475,7 @@ type ListPublishersResponse struct { func (x *ListPublishersResponse) Reset() { *x = ListPublishersResponse{} if protoimpl.UnsafeEnabled { - mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[22] + mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1390,7 +1488,7 @@ func (x *ListPublishersResponse) String() string { func (*ListPublishersResponse) ProtoMessage() {} func (x *ListPublishersResponse) ProtoReflect() protoreflect.Message { - mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[22] + mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1403,7 +1501,7 @@ func (x *ListPublishersResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListPublishersResponse.ProtoReflect.Descriptor instead. func (*ListPublishersResponse) Descriptor() ([]byte, []int) { - return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{22} + return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{24} } func (x *ListPublishersResponse) GetResults() []*Publisher { @@ -1435,7 +1533,7 @@ type ApplyPublisherRequest struct { func (x *ApplyPublisherRequest) Reset() { *x = ApplyPublisherRequest{} if protoimpl.UnsafeEnabled { - mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[23] + mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1448,7 +1546,7 @@ func (x *ApplyPublisherRequest) String() string { func (*ApplyPublisherRequest) ProtoMessage() {} func (x *ApplyPublisherRequest) ProtoReflect() protoreflect.Message { - mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[23] + mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1461,7 +1559,7 @@ func (x *ApplyPublisherRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ApplyPublisherRequest.ProtoReflect.Descriptor instead. func (*ApplyPublisherRequest) Descriptor() ([]byte, []int) { - return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{23} + return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{25} } func (x *ApplyPublisherRequest) GetPath() string { @@ -1493,7 +1591,7 @@ type Book_Author struct { func (x *Book_Author) Reset() { *x = Book_Author{} if protoimpl.UnsafeEnabled { - mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[24] + mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1506,7 +1604,7 @@ func (x *Book_Author) String() string { func (*Book_Author) ProtoMessage() {} func (x *Book_Author) ProtoReflect() protoreflect.Message { - mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[24] + mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1638,7 +1736,15 @@ var file_example_bookstore_v1_bookstore_proto_rawDesc = []byte{ 0x0a, 0x04, 0x62, 0x6f, 0x6f, 0x6b, 0x18, 0x9f, 0x4e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6f, 0x6f, 0x6b, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, - 0x62, 0x6f, 0x6f, 0x6b, 0x22, 0x98, 0x01, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, + 0x62, 0x6f, 0x6f, 0x6b, 0x22, 0x4d, 0x0a, 0x12, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x42, + 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x04, 0x70, 0x61, + 0x74, 0x68, 0x18, 0xa2, 0x4e, 0x20, 0x01, 0x28, 0x09, 0x42, 0x22, 0xe0, 0x41, 0x02, 0xfa, 0x41, + 0x1c, 0x0a, 0x1a, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x65, 0x78, 0x61, + 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x6f, 0x6f, 0x6b, 0x52, 0x04, 0x70, + 0x61, 0x74, 0x68, 0x22, 0x2f, 0x0a, 0x13, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x42, 0x6f, + 0x6f, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x22, 0x98, 0x01, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x9d, 0x4e, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, @@ -1742,8 +1848,8 @@ var file_example_bookstore_v1_bookstore_proto_rawDesc = []byte{ 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x18, 0x9f, 0x4e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x42, 0x03, - 0xe0, 0x41, 0x02, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x32, 0xab, - 0x13, 0x0a, 0x09, 0x42, 0x6f, 0x6f, 0x6b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x8b, 0x01, 0x0a, + 0xe0, 0x41, 0x02, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x32, 0x8f, + 0x14, 0x0a, 0x09, 0x42, 0x6f, 0x6f, 0x6b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x8b, 0x01, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x12, 0x27, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, @@ -1793,113 +1899,119 @@ var file_example_bookstore_v1_bookstore_proto_rawDesc = []byte{ 0x2e, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6f, 0x6f, 0x6b, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x3a, 0x04, 0x62, 0x6f, 0x6f, 0x6b, 0x1a, 0x1c, 0x2f, 0x7b, 0x70, 0x61, 0x74, 0x68, 0x3d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, - 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0xbb, - 0x01, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x45, 0x64, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x62, - 0x6f, 0x6f, 0x6b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x62, - 0x6f, 0x6f, 0x6b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6f, 0x6f, 0x6b, - 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x53, 0xda, 0x41, 0x13, 0x70, 0x61, 0x72, 0x65, - 0x6e, 0x74, 0x2c, 0x62, 0x6f, 0x6f, 0x6b, 0x5f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x37, 0x3a, 0x0c, 0x62, 0x6f, 0x6f, 0x6b, 0x5f, 0x65, 0x64, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x22, 0x27, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x75, - 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x6f, 0x6f, 0x6b, 0x73, - 0x2f, 0x2a, 0x7d, 0x2f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x98, 0x01, 0x0a, - 0x0e, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x2b, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x74, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x45, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x65, - 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x74, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6f, 0x6f, 0x6b, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, - 0x36, 0xda, 0x41, 0x04, 0x70, 0x61, 0x74, 0x68, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x12, 0x27, - 0x2f, 0x7b, 0x70, 0x61, 0x74, 0x68, 0x3d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, - 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2f, 0x2a, 0x2f, 0x65, 0x64, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x93, 0x01, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x2e, + 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x62, + 0x0a, 0x0b, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x12, 0x28, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x74, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x45, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 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, 0x22, 0x36, 0xda, 0x41, 0x04, 0x70, 0x61, 0x74, 0x68, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x29, 0x2a, 0x27, 0x2f, 0x7b, 0x70, 0x61, 0x74, 0x68, 0x3d, 0x70, 0x75, 0x62, - 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2f, - 0x2a, 0x2f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0xab, 0x01, - 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x12, 0x2d, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x62, 0x6f, 0x6f, - 0x6b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x6f, - 0x6f, 0x6b, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x2e, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x62, 0x6f, 0x6f, 0x6b, - 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x6f, 0x6f, - 0x6b, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x38, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x29, 0x12, 0x27, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x75, 0x62, - 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2f, - 0x2a, 0x7d, 0x2f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x7e, 0x0a, 0x0a, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x73, 0x62, 0x6e, 0x12, 0x27, 0x2e, 0x65, 0x78, 0x61, 0x6d, - 0x70, 0x6c, 0x65, 0x2e, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x73, 0x62, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x62, 0x6f, 0x6f, - 0x6b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x73, 0x62, 0x6e, 0x22, 0x2b, - 0xda, 0x41, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x69, 0x73, 0x62, 0x6e, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x17, 0x3a, 0x04, 0x69, 0x73, 0x62, 0x6e, 0x22, 0x0f, 0x2f, 0x7b, 0x70, 0x61, - 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x69, 0x73, 0x62, 0x6e, 0x73, 0x7d, 0x12, 0x9c, 0x01, 0x0a, 0x0f, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x12, - 0x2c, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x74, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x75, 0x62, - 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, - 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x74, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x22, 0x3a, - 0xda, 0x41, 0x10, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, - 0x68, 0x65, 0x72, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x3a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, - 0x73, 0x68, 0x65, 0x72, 0x22, 0x14, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, - 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x73, 0x7d, 0x12, 0x7f, 0x0a, 0x0c, 0x47, 0x65, - 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x12, 0x29, 0x2e, 0x65, 0x78, 0x61, - 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, - 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62, - 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x22, 0x23, 0xda, 0x41, 0x04, 0x70, 0x61, 0x74, 0x68, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x7b, 0x70, 0x61, 0x74, 0x68, 0x3d, 0x70, 0x75, - 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0xa1, 0x01, 0x0a, 0x0f, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x12, - 0x2c, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x74, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x75, 0x62, - 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x42, 0x6f, 0x6f, 0x6b, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, + 0x65, 0x2e, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, + 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0xbb, 0x01, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, + 0x6b, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, + 0x6c, 0x65, 0x2e, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, + 0x6c, 0x65, 0x2e, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x42, 0x6f, 0x6f, 0x6b, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x53, 0xda, 0x41, 0x13, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x62, 0x6f, 0x6f, 0x6b, 0x5f, 0x65, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x37, 0x3a, 0x0c, 0x62, 0x6f, 0x6f, 0x6b, 0x5f, + 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x27, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x3d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x2f, 0x62, + 0x6f, 0x6f, 0x6b, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0x98, 0x01, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x45, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x62, 0x6f, + 0x6f, 0x6b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6f, + 0x6f, 0x6b, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x21, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x62, 0x6f, 0x6f, 0x6b, 0x73, + 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6f, 0x6f, 0x6b, 0x45, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0x36, 0xda, 0x41, 0x04, 0x70, 0x61, 0x74, 0x68, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x29, 0x12, 0x27, 0x2f, 0x7b, 0x70, 0x61, 0x74, 0x68, 0x3d, 0x70, 0x75, 0x62, 0x6c, 0x69, + 0x73, 0x68, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2f, 0x2a, 0x2f, + 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x93, 0x01, 0x0a, 0x11, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x2e, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x62, 0x6f, 0x6f, 0x6b, + 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, + 0x6f, 0x6f, 0x6b, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 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, 0x22, 0x36, 0xda, 0x41, 0x04, 0x70, 0x61, + 0x74, 0x68, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x2a, 0x27, 0x2f, 0x7b, 0x70, 0x61, 0x74, 0x68, + 0x3d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x6f, + 0x6f, 0x6b, 0x73, 0x2f, 0x2a, 0x2f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, + 0x7d, 0x12, 0xab, 0x01, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x45, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2d, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, + 0x2e, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, + 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x12, 0x27, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x3d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x6f, + 0x6f, 0x6b, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x7e, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x73, 0x62, 0x6e, 0x12, 0x27, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x74, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x22, 0x3f, - 0xda, 0x41, 0x15, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x2c, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x3a, 0x09, - 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x32, 0x14, 0x2f, 0x7b, 0x70, 0x61, 0x74, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x73, 0x62, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, + 0x2e, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x73, + 0x62, 0x6e, 0x22, 0x2b, 0xda, 0x41, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x69, 0x73, + 0x62, 0x6e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x3a, 0x04, 0x69, 0x73, 0x62, 0x6e, 0x22, 0x0f, + 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x69, 0x73, 0x62, 0x6e, 0x73, 0x7d, 0x12, + 0x9c, 0x01, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, + 0x68, 0x65, 0x72, 0x12, 0x2c, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x62, 0x6f, + 0x6f, 0x6b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1f, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x62, 0x6f, 0x6f, 0x6b, + 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, + 0x65, 0x72, 0x22, 0x3a, 0xda, 0x41, 0x10, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x70, 0x75, + 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x3a, 0x09, 0x70, + 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x22, 0x14, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x3d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x73, 0x7d, 0x12, 0x7f, + 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x12, 0x29, + 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x74, 0x6f, + 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, + 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x65, 0x78, 0x61, 0x6d, + 0x70, 0x6c, 0x65, 0x2e, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x22, 0x23, 0xda, 0x41, 0x04, 0x70, + 0x61, 0x74, 0x68, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x7b, 0x70, 0x61, 0x74, 0x68, 0x3d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x12, - 0x7c, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, - 0x65, 0x72, 0x12, 0x2c, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x62, 0x6f, 0x6f, - 0x6b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 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, 0x22, 0x23, 0xda, 0x41, 0x04, 0x70, 0x61, 0x74, - 0x68, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x2a, 0x14, 0x2f, 0x7b, 0x70, 0x61, 0x74, 0x68, 0x3d, - 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x92, 0x01, - 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x73, - 0x12, 0x2b, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x62, 0x6f, 0x6f, 0x6b, 0x73, - 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x75, 0x62, 0x6c, - 0x69, 0x73, 0x68, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, - 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x74, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, - 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0xda, 0x41, 0x06, - 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x7b, - 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, - 0x73, 0x7d, 0x12, 0x87, 0x01, 0x0a, 0x0e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x50, 0x75, 0x62, 0x6c, - 0x69, 0x73, 0x68, 0x65, 0x72, 0x12, 0x2b, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, - 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x70, 0x70, - 0x6c, 0x79, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x62, 0x6f, 0x6f, - 0x6b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, - 0x68, 0x65, 0x72, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x3a, 0x09, 0x70, 0x75, 0x62, - 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x1a, 0x14, 0x2f, 0x7b, 0x70, 0x61, 0x74, 0x68, 0x3d, 0x70, - 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x42, 0x0c, 0x5a, 0x0a, - 0x2f, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0xa1, 0x01, 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, + 0x68, 0x65, 0x72, 0x12, 0x2c, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x62, 0x6f, + 0x6f, 0x6b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1f, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x62, 0x6f, 0x6f, 0x6b, + 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, + 0x65, 0x72, 0x22, 0x3f, 0xda, 0x41, 0x15, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, + 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x21, 0x3a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x32, 0x14, 0x2f, + 0x7b, 0x70, 0x61, 0x74, 0x68, 0x3d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x73, + 0x2f, 0x2a, 0x7d, 0x12, 0x7c, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x75, 0x62, + 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x12, 0x2c, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, + 0x2e, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 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, 0x22, 0x23, 0xda, 0x41, + 0x04, 0x70, 0x61, 0x74, 0x68, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x2a, 0x14, 0x2f, 0x7b, 0x70, + 0x61, 0x74, 0x68, 0x3d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x73, 0x2f, 0x2a, + 0x7d, 0x12, 0x92, 0x01, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, + 0x68, 0x65, 0x72, 0x73, 0x12, 0x2b, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x62, + 0x6f, 0x6f, 0x6b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2c, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x62, 0x6f, 0x6f, 0x6b, + 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x75, 0x62, + 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x25, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, + 0x12, 0x14, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x75, 0x62, 0x6c, 0x69, + 0x73, 0x68, 0x65, 0x72, 0x73, 0x7d, 0x12, 0x87, 0x01, 0x0a, 0x0e, 0x41, 0x70, 0x70, 0x6c, 0x79, + 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x12, 0x2b, 0x2e, 0x65, 0x78, 0x61, 0x6d, + 0x70, 0x6c, 0x65, 0x2e, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, + 0x2e, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, + 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x3a, + 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x1a, 0x14, 0x2f, 0x7b, 0x70, 0x61, + 0x74, 0x68, 0x3d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, + 0x42, 0x0c, 0x5a, 0x0a, 0x2f, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1914,7 +2026,7 @@ func file_example_bookstore_v1_bookstore_proto_rawDescGZIP() []byte { return file_example_bookstore_v1_bookstore_proto_rawDescData } -var file_example_bookstore_v1_bookstore_proto_msgTypes = make([]protoimpl.MessageInfo, 25) +var file_example_bookstore_v1_bookstore_proto_msgTypes = make([]protoimpl.MessageInfo, 27) var file_example_bookstore_v1_bookstore_proto_goTypes = []interface{}{ (*Book)(nil), // 0: example.bookstore.v1.Book (*BookEdition)(nil), // 1: example.bookstore.v1.BookEdition @@ -1927,28 +2039,30 @@ var file_example_bookstore_v1_bookstore_proto_goTypes = []interface{}{ (*ListBooksRequest)(nil), // 8: example.bookstore.v1.ListBooksRequest (*ListBooksResponse)(nil), // 9: example.bookstore.v1.ListBooksResponse (*ApplyBookRequest)(nil), // 10: example.bookstore.v1.ApplyBookRequest - (*CreateBookEditionRequest)(nil), // 11: example.bookstore.v1.CreateBookEditionRequest - (*GetBookEditionRequest)(nil), // 12: example.bookstore.v1.GetBookEditionRequest - (*DeleteBookEditionRequest)(nil), // 13: example.bookstore.v1.DeleteBookEditionRequest - (*ListBookEditionsRequest)(nil), // 14: example.bookstore.v1.ListBookEditionsRequest - (*ListBookEditionsResponse)(nil), // 15: example.bookstore.v1.ListBookEditionsResponse - (*CreateIsbnRequest)(nil), // 16: example.bookstore.v1.CreateIsbnRequest - (*CreatePublisherRequest)(nil), // 17: example.bookstore.v1.CreatePublisherRequest - (*GetPublisherRequest)(nil), // 18: example.bookstore.v1.GetPublisherRequest - (*UpdatePublisherRequest)(nil), // 19: example.bookstore.v1.UpdatePublisherRequest - (*DeletePublisherRequest)(nil), // 20: example.bookstore.v1.DeletePublisherRequest - (*ListPublishersRequest)(nil), // 21: example.bookstore.v1.ListPublishersRequest - (*ListPublishersResponse)(nil), // 22: example.bookstore.v1.ListPublishersResponse - (*ApplyPublisherRequest)(nil), // 23: example.bookstore.v1.ApplyPublisherRequest - (*Book_Author)(nil), // 24: example.bookstore.v1.Book.Author - (*fieldmaskpb.FieldMask)(nil), // 25: google.protobuf.FieldMask - (*emptypb.Empty)(nil), // 26: google.protobuf.Empty + (*ArchiveBookRequest)(nil), // 11: example.bookstore.v1.ArchiveBookRequest + (*ArchiveBookResponse)(nil), // 12: example.bookstore.v1.ArchiveBookResponse + (*CreateBookEditionRequest)(nil), // 13: example.bookstore.v1.CreateBookEditionRequest + (*GetBookEditionRequest)(nil), // 14: example.bookstore.v1.GetBookEditionRequest + (*DeleteBookEditionRequest)(nil), // 15: example.bookstore.v1.DeleteBookEditionRequest + (*ListBookEditionsRequest)(nil), // 16: example.bookstore.v1.ListBookEditionsRequest + (*ListBookEditionsResponse)(nil), // 17: example.bookstore.v1.ListBookEditionsResponse + (*CreateIsbnRequest)(nil), // 18: example.bookstore.v1.CreateIsbnRequest + (*CreatePublisherRequest)(nil), // 19: example.bookstore.v1.CreatePublisherRequest + (*GetPublisherRequest)(nil), // 20: example.bookstore.v1.GetPublisherRequest + (*UpdatePublisherRequest)(nil), // 21: example.bookstore.v1.UpdatePublisherRequest + (*DeletePublisherRequest)(nil), // 22: example.bookstore.v1.DeletePublisherRequest + (*ListPublishersRequest)(nil), // 23: example.bookstore.v1.ListPublishersRequest + (*ListPublishersResponse)(nil), // 24: example.bookstore.v1.ListPublishersResponse + (*ApplyPublisherRequest)(nil), // 25: example.bookstore.v1.ApplyPublisherRequest + (*Book_Author)(nil), // 26: example.bookstore.v1.Book.Author + (*fieldmaskpb.FieldMask)(nil), // 27: google.protobuf.FieldMask + (*emptypb.Empty)(nil), // 28: google.protobuf.Empty } var file_example_bookstore_v1_bookstore_proto_depIdxs = []int32{ - 24, // 0: example.bookstore.v1.Book.author:type_name -> example.bookstore.v1.Book.Author + 26, // 0: example.bookstore.v1.Book.author:type_name -> example.bookstore.v1.Book.Author 0, // 1: example.bookstore.v1.CreateBookRequest.book:type_name -> example.bookstore.v1.Book 0, // 2: example.bookstore.v1.UpdateBookRequest.book:type_name -> example.bookstore.v1.Book - 25, // 3: example.bookstore.v1.UpdateBookRequest.update_mask:type_name -> google.protobuf.FieldMask + 27, // 3: example.bookstore.v1.UpdateBookRequest.update_mask:type_name -> google.protobuf.FieldMask 0, // 4: example.bookstore.v1.ListBooksResponse.results:type_name -> example.bookstore.v1.Book 0, // 5: example.bookstore.v1.ListBooksResponse.unreachable:type_name -> example.bookstore.v1.Book 0, // 6: example.bookstore.v1.ApplyBookRequest.book:type_name -> example.bookstore.v1.Book @@ -1957,7 +2071,7 @@ var file_example_bookstore_v1_bookstore_proto_depIdxs = []int32{ 2, // 9: example.bookstore.v1.CreateIsbnRequest.isbn:type_name -> example.bookstore.v1.Isbn 3, // 10: example.bookstore.v1.CreatePublisherRequest.publisher:type_name -> example.bookstore.v1.Publisher 3, // 11: example.bookstore.v1.UpdatePublisherRequest.publisher:type_name -> example.bookstore.v1.Publisher - 25, // 12: example.bookstore.v1.UpdatePublisherRequest.update_mask:type_name -> google.protobuf.FieldMask + 27, // 12: example.bookstore.v1.UpdatePublisherRequest.update_mask:type_name -> google.protobuf.FieldMask 3, // 13: example.bookstore.v1.ListPublishersResponse.results:type_name -> example.bookstore.v1.Publisher 3, // 14: example.bookstore.v1.ApplyPublisherRequest.publisher:type_name -> example.bookstore.v1.Publisher 4, // 15: example.bookstore.v1.Bookstore.CreateBook:input_type -> example.bookstore.v1.CreateBookRequest @@ -1966,36 +2080,38 @@ var file_example_bookstore_v1_bookstore_proto_depIdxs = []int32{ 7, // 18: example.bookstore.v1.Bookstore.DeleteBook:input_type -> example.bookstore.v1.DeleteBookRequest 8, // 19: example.bookstore.v1.Bookstore.ListBooks:input_type -> example.bookstore.v1.ListBooksRequest 10, // 20: example.bookstore.v1.Bookstore.ApplyBook:input_type -> example.bookstore.v1.ApplyBookRequest - 11, // 21: example.bookstore.v1.Bookstore.CreateBookEdition:input_type -> example.bookstore.v1.CreateBookEditionRequest - 12, // 22: example.bookstore.v1.Bookstore.GetBookEdition:input_type -> example.bookstore.v1.GetBookEditionRequest - 13, // 23: example.bookstore.v1.Bookstore.DeleteBookEdition:input_type -> example.bookstore.v1.DeleteBookEditionRequest - 14, // 24: example.bookstore.v1.Bookstore.ListBookEditions:input_type -> example.bookstore.v1.ListBookEditionsRequest - 16, // 25: example.bookstore.v1.Bookstore.CreateIsbn:input_type -> example.bookstore.v1.CreateIsbnRequest - 17, // 26: example.bookstore.v1.Bookstore.CreatePublisher:input_type -> example.bookstore.v1.CreatePublisherRequest - 18, // 27: example.bookstore.v1.Bookstore.GetPublisher:input_type -> example.bookstore.v1.GetPublisherRequest - 19, // 28: example.bookstore.v1.Bookstore.UpdatePublisher:input_type -> example.bookstore.v1.UpdatePublisherRequest - 20, // 29: example.bookstore.v1.Bookstore.DeletePublisher:input_type -> example.bookstore.v1.DeletePublisherRequest - 21, // 30: example.bookstore.v1.Bookstore.ListPublishers:input_type -> example.bookstore.v1.ListPublishersRequest - 23, // 31: example.bookstore.v1.Bookstore.ApplyPublisher:input_type -> example.bookstore.v1.ApplyPublisherRequest - 0, // 32: example.bookstore.v1.Bookstore.CreateBook:output_type -> example.bookstore.v1.Book - 0, // 33: example.bookstore.v1.Bookstore.GetBook:output_type -> example.bookstore.v1.Book - 0, // 34: example.bookstore.v1.Bookstore.UpdateBook:output_type -> example.bookstore.v1.Book - 26, // 35: example.bookstore.v1.Bookstore.DeleteBook:output_type -> google.protobuf.Empty - 9, // 36: example.bookstore.v1.Bookstore.ListBooks:output_type -> example.bookstore.v1.ListBooksResponse - 0, // 37: example.bookstore.v1.Bookstore.ApplyBook:output_type -> example.bookstore.v1.Book - 1, // 38: example.bookstore.v1.Bookstore.CreateBookEdition:output_type -> example.bookstore.v1.BookEdition - 1, // 39: example.bookstore.v1.Bookstore.GetBookEdition:output_type -> example.bookstore.v1.BookEdition - 26, // 40: example.bookstore.v1.Bookstore.DeleteBookEdition:output_type -> google.protobuf.Empty - 15, // 41: example.bookstore.v1.Bookstore.ListBookEditions:output_type -> example.bookstore.v1.ListBookEditionsResponse - 2, // 42: example.bookstore.v1.Bookstore.CreateIsbn:output_type -> example.bookstore.v1.Isbn - 3, // 43: example.bookstore.v1.Bookstore.CreatePublisher:output_type -> example.bookstore.v1.Publisher - 3, // 44: example.bookstore.v1.Bookstore.GetPublisher:output_type -> example.bookstore.v1.Publisher - 3, // 45: example.bookstore.v1.Bookstore.UpdatePublisher:output_type -> example.bookstore.v1.Publisher - 26, // 46: example.bookstore.v1.Bookstore.DeletePublisher:output_type -> google.protobuf.Empty - 22, // 47: example.bookstore.v1.Bookstore.ListPublishers:output_type -> example.bookstore.v1.ListPublishersResponse - 3, // 48: example.bookstore.v1.Bookstore.ApplyPublisher:output_type -> example.bookstore.v1.Publisher - 32, // [32:49] is the sub-list for method output_type - 15, // [15:32] is the sub-list for method input_type + 11, // 21: example.bookstore.v1.Bookstore.archiveBook:input_type -> example.bookstore.v1.ArchiveBookRequest + 13, // 22: example.bookstore.v1.Bookstore.CreateBookEdition:input_type -> example.bookstore.v1.CreateBookEditionRequest + 14, // 23: example.bookstore.v1.Bookstore.GetBookEdition:input_type -> example.bookstore.v1.GetBookEditionRequest + 15, // 24: example.bookstore.v1.Bookstore.DeleteBookEdition:input_type -> example.bookstore.v1.DeleteBookEditionRequest + 16, // 25: example.bookstore.v1.Bookstore.ListBookEditions:input_type -> example.bookstore.v1.ListBookEditionsRequest + 18, // 26: example.bookstore.v1.Bookstore.CreateIsbn:input_type -> example.bookstore.v1.CreateIsbnRequest + 19, // 27: example.bookstore.v1.Bookstore.CreatePublisher:input_type -> example.bookstore.v1.CreatePublisherRequest + 20, // 28: example.bookstore.v1.Bookstore.GetPublisher:input_type -> example.bookstore.v1.GetPublisherRequest + 21, // 29: example.bookstore.v1.Bookstore.UpdatePublisher:input_type -> example.bookstore.v1.UpdatePublisherRequest + 22, // 30: example.bookstore.v1.Bookstore.DeletePublisher:input_type -> example.bookstore.v1.DeletePublisherRequest + 23, // 31: example.bookstore.v1.Bookstore.ListPublishers:input_type -> example.bookstore.v1.ListPublishersRequest + 25, // 32: example.bookstore.v1.Bookstore.ApplyPublisher:input_type -> example.bookstore.v1.ApplyPublisherRequest + 0, // 33: example.bookstore.v1.Bookstore.CreateBook:output_type -> example.bookstore.v1.Book + 0, // 34: example.bookstore.v1.Bookstore.GetBook:output_type -> example.bookstore.v1.Book + 0, // 35: example.bookstore.v1.Bookstore.UpdateBook:output_type -> example.bookstore.v1.Book + 28, // 36: example.bookstore.v1.Bookstore.DeleteBook:output_type -> google.protobuf.Empty + 9, // 37: example.bookstore.v1.Bookstore.ListBooks:output_type -> example.bookstore.v1.ListBooksResponse + 0, // 38: example.bookstore.v1.Bookstore.ApplyBook:output_type -> example.bookstore.v1.Book + 12, // 39: example.bookstore.v1.Bookstore.archiveBook:output_type -> example.bookstore.v1.ArchiveBookResponse + 1, // 40: example.bookstore.v1.Bookstore.CreateBookEdition:output_type -> example.bookstore.v1.BookEdition + 1, // 41: example.bookstore.v1.Bookstore.GetBookEdition:output_type -> example.bookstore.v1.BookEdition + 28, // 42: example.bookstore.v1.Bookstore.DeleteBookEdition:output_type -> google.protobuf.Empty + 17, // 43: example.bookstore.v1.Bookstore.ListBookEditions:output_type -> example.bookstore.v1.ListBookEditionsResponse + 2, // 44: example.bookstore.v1.Bookstore.CreateIsbn:output_type -> example.bookstore.v1.Isbn + 3, // 45: example.bookstore.v1.Bookstore.CreatePublisher:output_type -> example.bookstore.v1.Publisher + 3, // 46: example.bookstore.v1.Bookstore.GetPublisher:output_type -> example.bookstore.v1.Publisher + 3, // 47: example.bookstore.v1.Bookstore.UpdatePublisher:output_type -> example.bookstore.v1.Publisher + 28, // 48: example.bookstore.v1.Bookstore.DeletePublisher:output_type -> google.protobuf.Empty + 24, // 49: example.bookstore.v1.Bookstore.ListPublishers:output_type -> example.bookstore.v1.ListPublishersResponse + 3, // 50: example.bookstore.v1.Bookstore.ApplyPublisher:output_type -> example.bookstore.v1.Publisher + 33, // [33:51] is the sub-list for method output_type + 15, // [15:33] is the sub-list for method input_type 15, // [15:15] is the sub-list for extension type_name 15, // [15:15] is the sub-list for extension extendee 0, // [0:15] is the sub-list for field type_name @@ -2140,7 +2256,7 @@ func file_example_bookstore_v1_bookstore_proto_init() { } } file_example_bookstore_v1_bookstore_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateBookEditionRequest); i { + switch v := v.(*ArchiveBookRequest); i { case 0: return &v.state case 1: @@ -2152,7 +2268,7 @@ func file_example_bookstore_v1_bookstore_proto_init() { } } file_example_bookstore_v1_bookstore_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetBookEditionRequest); i { + switch v := v.(*ArchiveBookResponse); i { case 0: return &v.state case 1: @@ -2164,7 +2280,7 @@ func file_example_bookstore_v1_bookstore_proto_init() { } } file_example_bookstore_v1_bookstore_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteBookEditionRequest); i { + switch v := v.(*CreateBookEditionRequest); i { case 0: return &v.state case 1: @@ -2176,7 +2292,7 @@ func file_example_bookstore_v1_bookstore_proto_init() { } } file_example_bookstore_v1_bookstore_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListBookEditionsRequest); i { + switch v := v.(*GetBookEditionRequest); i { case 0: return &v.state case 1: @@ -2188,7 +2304,7 @@ func file_example_bookstore_v1_bookstore_proto_init() { } } file_example_bookstore_v1_bookstore_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListBookEditionsResponse); i { + switch v := v.(*DeleteBookEditionRequest); i { case 0: return &v.state case 1: @@ -2200,7 +2316,7 @@ func file_example_bookstore_v1_bookstore_proto_init() { } } file_example_bookstore_v1_bookstore_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateIsbnRequest); i { + switch v := v.(*ListBookEditionsRequest); i { case 0: return &v.state case 1: @@ -2212,7 +2328,7 @@ func file_example_bookstore_v1_bookstore_proto_init() { } } file_example_bookstore_v1_bookstore_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreatePublisherRequest); i { + switch v := v.(*ListBookEditionsResponse); i { case 0: return &v.state case 1: @@ -2224,7 +2340,7 @@ func file_example_bookstore_v1_bookstore_proto_init() { } } file_example_bookstore_v1_bookstore_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPublisherRequest); i { + switch v := v.(*CreateIsbnRequest); i { case 0: return &v.state case 1: @@ -2236,7 +2352,7 @@ func file_example_bookstore_v1_bookstore_proto_init() { } } file_example_bookstore_v1_bookstore_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdatePublisherRequest); i { + switch v := v.(*CreatePublisherRequest); i { case 0: return &v.state case 1: @@ -2248,7 +2364,7 @@ func file_example_bookstore_v1_bookstore_proto_init() { } } file_example_bookstore_v1_bookstore_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeletePublisherRequest); i { + switch v := v.(*GetPublisherRequest); i { case 0: return &v.state case 1: @@ -2260,7 +2376,7 @@ func file_example_bookstore_v1_bookstore_proto_init() { } } file_example_bookstore_v1_bookstore_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListPublishersRequest); i { + switch v := v.(*UpdatePublisherRequest); i { case 0: return &v.state case 1: @@ -2272,7 +2388,7 @@ func file_example_bookstore_v1_bookstore_proto_init() { } } file_example_bookstore_v1_bookstore_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListPublishersResponse); i { + switch v := v.(*DeletePublisherRequest); i { case 0: return &v.state case 1: @@ -2284,7 +2400,7 @@ func file_example_bookstore_v1_bookstore_proto_init() { } } file_example_bookstore_v1_bookstore_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ApplyPublisherRequest); i { + switch v := v.(*ListPublishersRequest); i { case 0: return &v.state case 1: @@ -2296,6 +2412,30 @@ func file_example_bookstore_v1_bookstore_proto_init() { } } file_example_bookstore_v1_bookstore_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListPublishersResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_example_bookstore_v1_bookstore_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ApplyPublisherRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_example_bookstore_v1_bookstore_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Book_Author); i { case 0: return &v.state @@ -2314,7 +2454,7 @@ func file_example_bookstore_v1_bookstore_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_example_bookstore_v1_bookstore_proto_rawDesc, NumEnums: 0, - NumMessages: 25, + NumMessages: 27, NumExtensions: 0, NumServices: 1, }, diff --git a/example/bookstore/v1/bookstore.proto b/example/bookstore/v1/bookstore.proto index fed64ba..2b345d1 100644 --- a/example/bookstore/v1/bookstore.proto +++ b/example/bookstore/v1/bookstore.proto @@ -67,6 +67,9 @@ service Bookstore { }; } + // archive a book. + rpc archiveBook ( ArchiveBookRequest ) returns ( ArchiveBookResponse ); + // An aep-compliant Create method for book-edition. rpc CreateBookEdition ( CreateBookEditionRequest ) returns ( BookEdition ) { option (google.api.http) = { @@ -295,6 +298,21 @@ message ApplyBookRequest { Book book = 10015 [(google.api.field_behavior) = REQUIRED]; } +// Request message for the archive method +message ArchiveBookRequest { + // The globally unique identifier for the resource + string path = 10018 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "bookstore.example.com/book" } + ]; +} + +// Response message for the archive method +message ArchiveBookResponse { + // Field for success. + bool success = 1; +} + // A Create request for a book-edition resource. message CreateBookEditionRequest { // A field for the parent of book-edition diff --git a/example/bookstore/v1/bookstore.swagger.json b/example/bookstore/v1/bookstore.swagger.json index 5ed4956..a62b4e7 100644 --- a/example/bookstore/v1/bookstore.swagger.json +++ b/example/bookstore/v1/bookstore.swagger.json @@ -773,6 +773,16 @@ } } }, + "v1ArchiveBookResponse": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "description": "Field for success." + } + }, + "title": "Response message for the archive method" + }, "v1Book": { "type": "object", "properties": { diff --git a/example/bookstore/v1/bookstore.yaml b/example/bookstore/v1/bookstore.yaml index f92ff6c..bf60032 100644 --- a/example/bookstore/v1/bookstore.yaml +++ b/example/bookstore/v1/bookstore.yaml @@ -58,7 +58,18 @@ resources: delete: {} list: has_unreachable_resources: true - apply: {} # do not uncomment until there is an AEP on apply. + apply: {} + custom: + - name: "archive" + method_type: POST + request: + object_type: + properties: {} + response: + object_type: + properties: + success: + type: BOOLEAN # other example resources that might be interesting to add: # authors, which could be a reference for book # authors could have a reference to publishers too diff --git a/example/bookstore/v1/bookstore_grpc.pb.go b/example/bookstore/v1/bookstore_grpc.pb.go index e19b7e3..6d6d3b5 100644 --- a/example/bookstore/v1/bookstore_grpc.pb.go +++ b/example/bookstore/v1/bookstore_grpc.pb.go @@ -26,6 +26,7 @@ const ( Bookstore_DeleteBook_FullMethodName = "/example.bookstore.v1.Bookstore/DeleteBook" Bookstore_ListBooks_FullMethodName = "/example.bookstore.v1.Bookstore/ListBooks" Bookstore_ApplyBook_FullMethodName = "/example.bookstore.v1.Bookstore/ApplyBook" + Bookstore_ArchiveBook_FullMethodName = "/example.bookstore.v1.Bookstore/archiveBook" Bookstore_CreateBookEdition_FullMethodName = "/example.bookstore.v1.Bookstore/CreateBookEdition" Bookstore_GetBookEdition_FullMethodName = "/example.bookstore.v1.Bookstore/GetBookEdition" Bookstore_DeleteBookEdition_FullMethodName = "/example.bookstore.v1.Bookstore/DeleteBookEdition" @@ -55,6 +56,8 @@ type BookstoreClient interface { ListBooks(ctx context.Context, in *ListBooksRequest, opts ...grpc.CallOption) (*ListBooksResponse, error) // An aep-compliant Apply method for books. ApplyBook(ctx context.Context, in *ApplyBookRequest, opts ...grpc.CallOption) (*Book, error) + // archive a book. + ArchiveBook(ctx context.Context, in *ArchiveBookRequest, opts ...grpc.CallOption) (*ArchiveBookResponse, error) // An aep-compliant Create method for book-edition. CreateBookEdition(ctx context.Context, in *CreateBookEditionRequest, opts ...grpc.CallOption) (*BookEdition, error) // An aep-compliant Get method for book-edition. @@ -141,6 +144,15 @@ func (c *bookstoreClient) ApplyBook(ctx context.Context, in *ApplyBookRequest, o return out, nil } +func (c *bookstoreClient) ArchiveBook(ctx context.Context, in *ArchiveBookRequest, opts ...grpc.CallOption) (*ArchiveBookResponse, error) { + out := new(ArchiveBookResponse) + err := c.cc.Invoke(ctx, Bookstore_ArchiveBook_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *bookstoreClient) CreateBookEdition(ctx context.Context, in *CreateBookEditionRequest, opts ...grpc.CallOption) (*BookEdition, error) { out := new(BookEdition) err := c.cc.Invoke(ctx, Bookstore_CreateBookEdition_FullMethodName, in, out, opts...) @@ -256,6 +268,8 @@ type BookstoreServer interface { ListBooks(context.Context, *ListBooksRequest) (*ListBooksResponse, error) // An aep-compliant Apply method for books. ApplyBook(context.Context, *ApplyBookRequest) (*Book, error) + // archive a book. + ArchiveBook(context.Context, *ArchiveBookRequest) (*ArchiveBookResponse, error) // An aep-compliant Create method for book-edition. CreateBookEdition(context.Context, *CreateBookEditionRequest) (*BookEdition, error) // An aep-compliant Get method for book-edition. @@ -303,6 +317,9 @@ func (UnimplementedBookstoreServer) ListBooks(context.Context, *ListBooksRequest func (UnimplementedBookstoreServer) ApplyBook(context.Context, *ApplyBookRequest) (*Book, error) { return nil, status.Errorf(codes.Unimplemented, "method ApplyBook not implemented") } +func (UnimplementedBookstoreServer) ArchiveBook(context.Context, *ArchiveBookRequest) (*ArchiveBookResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ArchiveBook not implemented") +} func (UnimplementedBookstoreServer) CreateBookEdition(context.Context, *CreateBookEditionRequest) (*BookEdition, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateBookEdition not implemented") } @@ -457,6 +474,24 @@ func _Bookstore_ApplyBook_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } +func _Bookstore_ArchiveBook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ArchiveBookRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BookstoreServer).ArchiveBook(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Bookstore_ArchiveBook_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BookstoreServer).ArchiveBook(ctx, req.(*ArchiveBookRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Bookstore_CreateBookEdition_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CreateBookEditionRequest) if err := dec(in); err != nil { @@ -686,6 +721,10 @@ var Bookstore_ServiceDesc = grpc.ServiceDesc{ MethodName: "ApplyBook", Handler: _Bookstore_ApplyBook_Handler, }, + { + MethodName: "archiveBook", + Handler: _Bookstore_ArchiveBook_Handler, + }, { MethodName: "CreateBookEdition", Handler: _Bookstore_CreateBookEdition_Handler, diff --git a/example/bookstore/v1/bookstore_openapi.json b/example/bookstore/v1/bookstore_openapi.json index 1d68b2c..153b780 100644 --- a/example/bookstore/v1/bookstore_openapi.json +++ b/example/bookstore/v1/bookstore_openapi.json @@ -669,6 +669,50 @@ } } } + }, + "/publishers/{publisher}/books/{book}:archive": { + "post": { + "summary": "", + "description": "", + "operationId": "", + "parameters": [ + { + "name": "publisher", + "in": "path", + "description": "", + "required": true, + "type": "string" + }, + { + "name": "book", + "in": "path", + "description": "", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/book" + } + } + } + } + }, + "requestBody": { + "description": "", + "content": { + "application/json": { + "schema": {} + } + }, + "required": true + } + } } }, "components": { diff --git a/example/bookstore/v1/bookstore_openapi.yaml b/example/bookstore/v1/bookstore_openapi.yaml index 5dca98e..24908c9 100644 --- a/example/bookstore/v1/bookstore_openapi.yaml +++ b/example/bookstore/v1/bookstore_openapi.yaml @@ -540,5 +540,34 @@ paths: $ref: '#/components/schemas/book-edition' description: Successful response summary: "" + /publishers/{publisher}/books/{book}:archive: + post: + description: "" + operationId: "" + parameters: + - description: "" + in: path + name: publisher + required: true + type: string + - description: "" + in: path + name: book + required: true + type: string + requestBody: + content: + application/json: + schema: {} + description: "" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/book' + description: Successful response + summary: "" servers: - url: http://localhost:8081 diff --git a/parser/api.go b/parser/api.go index aa8bff7..2edb17e 100644 --- a/parser/api.go +++ b/parser/api.go @@ -45,17 +45,17 @@ func getOrCreateResource(apiResourceByName map[string]*api.Resource, resourceByN if !ok { return nil, fmt.Errorf("resource %q not found", name) } - schema, err := toOpenAPISchemaFromPropMap(schemaR.Properties) + oasSchema, err := toOpenAPISchemaFromPropMap(schemaR.Properties) if err != nil { return nil, err } - addCommonFieldsToResourceSchema(schema) + addCommonFieldsToResourceSchema(oasSchema) parents := []*api.Resource{} apiR := &api.Resource{ Singular: schemaR.Kind, Plural: schemaR.Plural, Parents: parents, - Schema: schema, + Schema: oasSchema, } methods := schemaR.GetMethods() if methods.Read != nil { @@ -80,6 +80,29 @@ func getOrCreateResource(apiResourceByName map[string]*api.Resource, resourceByN if methods.Apply != nil { apiR.ApplyMethod = &api.ApplyMethod{} } + for _, cm := range methods.Custom { + request, err := toOpenAPISchema(cm.Request) + if err != nil { + return nil, err + } + response, err := toOpenAPISchema(cm.Response) + if err != nil { + return nil, err + } + method := "POST" + switch cm.MethodType { + case schema.Methods_CustomMethod_GET: + method = "GET" + case schema.Methods_CustomMethod_POST: + method = "POST" + } + apiR.CustomMethods = append(apiR.CustomMethods, &api.CustomMethod{ + Name: cm.Name, + Method: method, + Request: request, + Response: response, + }) + } for _, p := range schemaR.Parents { apiP, err := getOrCreateResource(apiResourceByName, resourceByName, p) if err != nil { diff --git a/schema/resourcedefinition.pb.go b/schema/resourcedefinition.pb.go index 4e63524..da422cc 100644 --- a/schema/resourcedefinition.pb.go +++ b/schema/resourcedefinition.pb.go @@ -95,6 +95,55 @@ func (Type) EnumDescriptor() ([]byte, []int) { return file_schema_resourcedefinition_proto_rawDescGZIP(), []int{0} } +type Methods_CustomMethod_MethodType int32 + +const ( + Methods_CustomMethod_METHOD_TYPE_UNSPECIFIED Methods_CustomMethod_MethodType = 0 + Methods_CustomMethod_GET Methods_CustomMethod_MethodType = 1 + Methods_CustomMethod_POST Methods_CustomMethod_MethodType = 2 +) + +// Enum value maps for Methods_CustomMethod_MethodType. +var ( + Methods_CustomMethod_MethodType_name = map[int32]string{ + 0: "METHOD_TYPE_UNSPECIFIED", + 1: "GET", + 2: "POST", + } + Methods_CustomMethod_MethodType_value = map[string]int32{ + "METHOD_TYPE_UNSPECIFIED": 0, + "GET": 1, + "POST": 2, + } +) + +func (x Methods_CustomMethod_MethodType) Enum() *Methods_CustomMethod_MethodType { + p := new(Methods_CustomMethod_MethodType) + *p = x + return p +} + +func (x Methods_CustomMethod_MethodType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Methods_CustomMethod_MethodType) Descriptor() protoreflect.EnumDescriptor { + return file_schema_resourcedefinition_proto_enumTypes[1].Descriptor() +} + +func (Methods_CustomMethod_MethodType) Type() protoreflect.EnumType { + return &file_schema_resourcedefinition_proto_enumTypes[1] +} + +func (x Methods_CustomMethod_MethodType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Methods_CustomMethod_MethodType.Descriptor instead. +func (Methods_CustomMethod_MethodType) EnumDescriptor() ([]byte, []int) { + return file_schema_resourcedefinition_proto_rawDescGZIP(), []int{3, 7, 0} +} + // An API service. type Service struct { state protoimpl.MessageState @@ -335,7 +384,8 @@ type Methods struct { // Specific properties of the global_list for the resource. GlobalList *Methods_GlobalListMethod `protobuf:"bytes,6,opt,name=global_list,json=globalList,proto3" json:"global_list,omitempty"` // Specific properties of the apply for the resource. - Apply *Methods_ApplyMethod `protobuf:"bytes,7,opt,name=apply,proto3" json:"apply,omitempty"` + Apply *Methods_ApplyMethod `protobuf:"bytes,7,opt,name=apply,proto3" json:"apply,omitempty"` + Custom []*Methods_CustomMethod `protobuf:"bytes,8,rep,name=custom,proto3" json:"custom,omitempty"` } func (x *Methods) Reset() { @@ -419,6 +469,13 @@ func (x *Methods) GetApply() *Methods_ApplyMethod { return nil } +func (x *Methods) GetCustom() []*Methods_CustomMethod { + if x != nil { + return x.Custom + } + return nil +} + // A property represents a field in a resource or object. type Property struct { state protoimpl.MessageState @@ -894,7 +951,7 @@ func (x *Methods_ListMethod) GetHasUnreachableResources() bool { return false } -// THe properties of the global list method. +// The properties of the global list method. type Methods_GlobalListMethod struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -933,7 +990,7 @@ func (*Methods_GlobalListMethod) Descriptor() ([]byte, []int) { return file_schema_resourcedefinition_proto_rawDescGZIP(), []int{3, 5} } -// THe properties of the apply method. +// The properties of the apply method. type Methods_ApplyMethod struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -972,6 +1029,82 @@ func (*Methods_ApplyMethod) Descriptor() ([]byte, []int) { return file_schema_resourcedefinition_proto_rawDescGZIP(), []int{3, 6} } +// Properties of a custom method. +type Methods_CustomMethod struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the custom method. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The type of the custom method. + MethodType Methods_CustomMethod_MethodType `protobuf:"varint,2,opt,name=method_type,json=methodType,proto3,enum=Methods_CustomMethod_MethodType" json:"method_type,omitempty"` + // The properties of the custom method request. + Request *Property `protobuf:"bytes,3,opt,name=request,proto3" json:"request,omitempty"` + // The properties of the custom method response. + Response *Property `protobuf:"bytes,4,opt,name=response,proto3" json:"response,omitempty"` +} + +func (x *Methods_CustomMethod) Reset() { + *x = Methods_CustomMethod{} + if protoimpl.UnsafeEnabled { + mi := &file_schema_resourcedefinition_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Methods_CustomMethod) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Methods_CustomMethod) ProtoMessage() {} + +func (x *Methods_CustomMethod) ProtoReflect() protoreflect.Message { + mi := &file_schema_resourcedefinition_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Methods_CustomMethod.ProtoReflect.Descriptor instead. +func (*Methods_CustomMethod) Descriptor() ([]byte, []int) { + return file_schema_resourcedefinition_proto_rawDescGZIP(), []int{3, 7} +} + +func (x *Methods_CustomMethod) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Methods_CustomMethod) GetMethodType() Methods_CustomMethod_MethodType { + if x != nil { + return x.MethodType + } + return Methods_CustomMethod_METHOD_TYPE_UNSPECIFIED +} + +func (x *Methods_CustomMethod) GetRequest() *Property { + if x != nil { + return x.Request + } + return nil +} + +func (x *Methods_CustomMethod) GetResponse() *Property { + if x != nil { + return x.Response + } + return nil +} + var File_schema_resourcedefinition_proto protoreflect.FileDescriptor var file_schema_resourcedefinition_proto_rawDesc = []byte{ @@ -1010,7 +1143,7 @@ var file_schema_resourcedefinition_proto_rawDesc = []byte{ 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, - 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xb0, 0x04, 0x0a, + 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xd1, 0x06, 0x0a, 0x07, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x12, 0x2d, 0x0a, 0x06, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, @@ -1031,61 +1164,79 @@ var file_schema_resourcedefinition_proto_rawDesc = []byte{ 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x0a, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x2e, 0x41, 0x70, 0x70, - 0x6c, 0x79, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x05, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x1a, - 0x43, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, - 0x33, 0x0a, 0x16, 0x6e, 0x6f, 0x6e, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x65, - 0x74, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x13, 0x6e, 0x6f, 0x6e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x74, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x49, 0x64, 0x1a, 0x0c, 0x0a, 0x0a, 0x52, 0x65, 0x61, 0x64, 0x4d, 0x65, 0x74, 0x68, - 0x6f, 0x64, 0x1a, 0x0e, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x68, - 0x6f, 0x64, 0x1a, 0x0e, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x68, - 0x6f, 0x64, 0x1a, 0x48, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, - 0x12, 0x3a, 0x0a, 0x19, 0x68, 0x61, 0x73, 0x5f, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x63, 0x68, 0x61, - 0x62, 0x6c, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x17, 0x68, 0x61, 0x73, 0x55, 0x6e, 0x72, 0x65, 0x61, 0x63, 0x68, 0x61, - 0x62, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x1a, 0x12, 0x0a, 0x10, - 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, - 0x1a, 0x0d, 0x0a, 0x0b, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x22, - 0xdd, 0x01, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x1b, 0x0a, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x05, 0x2e, 0x54, 0x79, 0x70, - 0x65, 0x48, 0x00, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x2e, 0x0a, 0x0b, 0x6f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, - 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x0a, 0x6f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2b, 0x0a, 0x0a, 0x61, 0x72, 0x72, - 0x61, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, - 0x41, 0x72, 0x72, 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x09, 0x61, 0x72, 0x72, - 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1a, - 0x0a, 0x08, 0x72, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, - 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, - 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x42, 0x07, 0x0a, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x22, - 0xb6, 0x01, 0x0a, 0x0a, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x21, - 0x0a, 0x0c, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, - 0x65, 0x12, 0x3b, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, - 0x70, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x1a, 0x48, - 0x0a, 0x0f, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x12, 0x1f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x69, 0x0a, 0x09, 0x41, 0x72, 0x72, 0x61, - 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x05, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x12, 0x2e, 0x0a, 0x0b, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x0a, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, - 0x70, 0x65, 0x42, 0x0f, 0x0a, 0x0d, 0x61, 0x72, 0x72, 0x61, 0x79, 0x5f, 0x64, 0x65, 0x74, 0x61, - 0x69, 0x6c, 0x73, 0x2a, 0x62, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, - 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x09, 0x0a, - 0x05, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x49, 0x4e, 0x54, 0x36, - 0x34, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x4f, 0x55, 0x42, 0x4c, 0x45, 0x10, 0x04, 0x12, - 0x09, 0x0a, 0x05, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x10, 0x05, 0x12, 0x0b, 0x0a, 0x07, 0x42, 0x4f, - 0x4f, 0x4c, 0x45, 0x41, 0x4e, 0x10, 0x06, 0x42, 0x09, 0x5a, 0x07, 0x2f, 0x73, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6c, 0x79, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x05, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x12, + 0x2d, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x15, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, + 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x1a, 0x43, + 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x33, + 0x0a, 0x16, 0x6e, 0x6f, 0x6e, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x74, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, + 0x6e, 0x6f, 0x6e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x74, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x49, 0x64, 0x1a, 0x0c, 0x0a, 0x0a, 0x52, 0x65, 0x61, 0x64, 0x4d, 0x65, 0x74, 0x68, 0x6f, + 0x64, 0x1a, 0x0e, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x68, 0x6f, + 0x64, 0x1a, 0x0e, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x68, 0x6f, + 0x64, 0x1a, 0x48, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, + 0x3a, 0x0a, 0x19, 0x68, 0x61, 0x73, 0x5f, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, + 0x6c, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x17, 0x68, 0x61, 0x73, 0x55, 0x6e, 0x72, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, + 0x6c, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x1a, 0x12, 0x0a, 0x10, 0x47, + 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x1a, + 0x0d, 0x0a, 0x0b, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x1a, 0xef, + 0x01, 0x0a, 0x0c, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x41, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, + 0x64, 0x73, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x2e, + 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x68, + 0x6f, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, + 0x74, 0x79, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x08, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, + 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x3c, 0x0a, 0x0a, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x1b, 0x0a, 0x17, 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x07, 0x0a, + 0x03, 0x47, 0x45, 0x54, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x50, 0x4f, 0x53, 0x54, 0x10, 0x02, + 0x22, 0xdd, 0x01, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x1b, 0x0a, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x05, 0x2e, 0x54, 0x79, + 0x70, 0x65, 0x48, 0x00, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x2e, 0x0a, 0x0b, 0x6f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0b, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x0a, + 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2b, 0x0a, 0x0a, 0x61, 0x72, + 0x72, 0x61, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, + 0x2e, 0x41, 0x72, 0x72, 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x09, 0x61, 0x72, + 0x72, 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, + 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x72, + 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, + 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x42, 0x07, 0x0a, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x22, 0xb6, 0x01, 0x0a, 0x0a, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x21, 0x0a, 0x0c, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, + 0x79, 0x70, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x1a, + 0x48, 0x0a, 0x0f, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x69, 0x0a, 0x09, 0x41, 0x72, 0x72, + 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x05, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x12, 0x2e, 0x0a, 0x0b, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x0a, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, + 0x79, 0x70, 0x65, 0x42, 0x0f, 0x0a, 0x0d, 0x61, 0x72, 0x72, 0x61, 0x79, 0x5f, 0x64, 0x65, 0x74, + 0x61, 0x69, 0x6c, 0x73, 0x2a, 0x62, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x09, + 0x0a, 0x05, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x49, 0x4e, 0x54, + 0x36, 0x34, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x4f, 0x55, 0x42, 0x4c, 0x45, 0x10, 0x04, + 0x12, 0x09, 0x0a, 0x05, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x10, 0x05, 0x12, 0x0b, 0x0a, 0x07, 0x42, + 0x4f, 0x4f, 0x4c, 0x45, 0x41, 0x4e, 0x10, 0x06, 0x42, 0x09, 0x5a, 0x07, 0x2f, 0x73, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1100,55 +1251,61 @@ func file_schema_resourcedefinition_proto_rawDescGZIP() []byte { return file_schema_resourcedefinition_proto_rawDescData } -var file_schema_resourcedefinition_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_schema_resourcedefinition_proto_msgTypes = make([]protoimpl.MessageInfo, 17) +var file_schema_resourcedefinition_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_schema_resourcedefinition_proto_msgTypes = make([]protoimpl.MessageInfo, 18) var file_schema_resourcedefinition_proto_goTypes = []interface{}{ - (Type)(0), // 0: Type - (*Service)(nil), // 1: Service - (*Resource)(nil), // 2: Resource - (*Schema)(nil), // 3: Schema - (*Methods)(nil), // 4: Methods - (*Property)(nil), // 5: Property - (*ObjectType)(nil), // 6: ObjectType - (*ArrayType)(nil), // 7: ArrayType - nil, // 8: Resource.PropertiesEntry - nil, // 9: Schema.PropertiesEntry - (*Methods_CreateMethod)(nil), // 10: Methods.CreateMethod - (*Methods_ReadMethod)(nil), // 11: Methods.ReadMethod - (*Methods_UpdateMethod)(nil), // 12: Methods.UpdateMethod - (*Methods_DeleteMethod)(nil), // 13: Methods.DeleteMethod - (*Methods_ListMethod)(nil), // 14: Methods.ListMethod - (*Methods_GlobalListMethod)(nil), // 15: Methods.GlobalListMethod - (*Methods_ApplyMethod)(nil), // 16: Methods.ApplyMethod - nil, // 17: ObjectType.PropertiesEntry + (Type)(0), // 0: Type + (Methods_CustomMethod_MethodType)(0), // 1: Methods.CustomMethod.MethodType + (*Service)(nil), // 2: Service + (*Resource)(nil), // 3: Resource + (*Schema)(nil), // 4: Schema + (*Methods)(nil), // 5: Methods + (*Property)(nil), // 6: Property + (*ObjectType)(nil), // 7: ObjectType + (*ArrayType)(nil), // 8: ArrayType + nil, // 9: Resource.PropertiesEntry + nil, // 10: Schema.PropertiesEntry + (*Methods_CreateMethod)(nil), // 11: Methods.CreateMethod + (*Methods_ReadMethod)(nil), // 12: Methods.ReadMethod + (*Methods_UpdateMethod)(nil), // 13: Methods.UpdateMethod + (*Methods_DeleteMethod)(nil), // 14: Methods.DeleteMethod + (*Methods_ListMethod)(nil), // 15: Methods.ListMethod + (*Methods_GlobalListMethod)(nil), // 16: Methods.GlobalListMethod + (*Methods_ApplyMethod)(nil), // 17: Methods.ApplyMethod + (*Methods_CustomMethod)(nil), // 18: Methods.CustomMethod + nil, // 19: ObjectType.PropertiesEntry } var file_schema_resourcedefinition_proto_depIdxs = []int32{ - 2, // 0: Service.resources:type_name -> Resource - 3, // 1: Service.schemas:type_name -> Schema - 8, // 2: Resource.properties:type_name -> Resource.PropertiesEntry - 4, // 3: Resource.methods:type_name -> Methods - 9, // 4: Schema.properties:type_name -> Schema.PropertiesEntry - 10, // 5: Methods.create:type_name -> Methods.CreateMethod - 11, // 6: Methods.read:type_name -> Methods.ReadMethod - 12, // 7: Methods.update:type_name -> Methods.UpdateMethod - 13, // 8: Methods.delete:type_name -> Methods.DeleteMethod - 14, // 9: Methods.list:type_name -> Methods.ListMethod - 15, // 10: Methods.global_list:type_name -> Methods.GlobalListMethod - 16, // 11: Methods.apply:type_name -> Methods.ApplyMethod - 0, // 12: Property.type:type_name -> Type - 6, // 13: Property.object_type:type_name -> ObjectType - 7, // 14: Property.array_type:type_name -> ArrayType - 17, // 15: ObjectType.properties:type_name -> ObjectType.PropertiesEntry - 0, // 16: ArrayType.type:type_name -> Type - 6, // 17: ArrayType.object_type:type_name -> ObjectType - 5, // 18: Resource.PropertiesEntry.value:type_name -> Property - 5, // 19: Schema.PropertiesEntry.value:type_name -> Property - 5, // 20: ObjectType.PropertiesEntry.value:type_name -> Property - 21, // [21:21] is the sub-list for method output_type - 21, // [21:21] is the sub-list for method input_type - 21, // [21:21] is the sub-list for extension type_name - 21, // [21:21] is the sub-list for extension extendee - 0, // [0:21] is the sub-list for field type_name + 3, // 0: Service.resources:type_name -> Resource + 4, // 1: Service.schemas:type_name -> Schema + 9, // 2: Resource.properties:type_name -> Resource.PropertiesEntry + 5, // 3: Resource.methods:type_name -> Methods + 10, // 4: Schema.properties:type_name -> Schema.PropertiesEntry + 11, // 5: Methods.create:type_name -> Methods.CreateMethod + 12, // 6: Methods.read:type_name -> Methods.ReadMethod + 13, // 7: Methods.update:type_name -> Methods.UpdateMethod + 14, // 8: Methods.delete:type_name -> Methods.DeleteMethod + 15, // 9: Methods.list:type_name -> Methods.ListMethod + 16, // 10: Methods.global_list:type_name -> Methods.GlobalListMethod + 17, // 11: Methods.apply:type_name -> Methods.ApplyMethod + 18, // 12: Methods.custom:type_name -> Methods.CustomMethod + 0, // 13: Property.type:type_name -> Type + 7, // 14: Property.object_type:type_name -> ObjectType + 8, // 15: Property.array_type:type_name -> ArrayType + 19, // 16: ObjectType.properties:type_name -> ObjectType.PropertiesEntry + 0, // 17: ArrayType.type:type_name -> Type + 7, // 18: ArrayType.object_type:type_name -> ObjectType + 6, // 19: Resource.PropertiesEntry.value:type_name -> Property + 6, // 20: Schema.PropertiesEntry.value:type_name -> Property + 1, // 21: Methods.CustomMethod.method_type:type_name -> Methods.CustomMethod.MethodType + 6, // 22: Methods.CustomMethod.request:type_name -> Property + 6, // 23: Methods.CustomMethod.response:type_name -> Property + 6, // 24: ObjectType.PropertiesEntry.value:type_name -> Property + 25, // [25:25] is the sub-list for method output_type + 25, // [25:25] is the sub-list for method input_type + 25, // [25:25] is the sub-list for extension type_name + 25, // [25:25] is the sub-list for extension extendee + 0, // [0:25] is the sub-list for field type_name } func init() { file_schema_resourcedefinition_proto_init() } @@ -1325,6 +1482,18 @@ func file_schema_resourcedefinition_proto_init() { return nil } } + file_schema_resourcedefinition_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Methods_CustomMethod); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_schema_resourcedefinition_proto_msgTypes[4].OneofWrappers = []interface{}{ (*Property_Type)(nil), @@ -1340,8 +1509,8 @@ func file_schema_resourcedefinition_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_schema_resourcedefinition_proto_rawDesc, - NumEnums: 1, - NumMessages: 17, + NumEnums: 2, + NumMessages: 18, NumExtensions: 0, NumServices: 0, }, diff --git a/schema/resourcedefinition.proto b/schema/resourcedefinition.proto index c32d60b..9c63029 100644 --- a/schema/resourcedefinition.proto +++ b/schema/resourcedefinition.proto @@ -62,11 +62,26 @@ message Methods { // true if the list method has unreachable resources. bool has_unreachable_resources = 1; } - // THe properties of the global list method. + // The properties of the global list method. message GlobalListMethod {} - // THe properties of the apply method. + // The properties of the apply method. message ApplyMethod {} - + // Properties of a custom method. + message CustomMethod { + enum MethodType { + METHOD_TYPE_UNSPECIFIED = 0; + GET = 1; + POST = 2; + } + // The name of the custom method. + string name = 1; + // The type of the custom method. + MethodType method_type = 2; + // The properties of the custom method request. + Property request = 3; + // The properties of the custom method response. + Property response = 4; + } // Specific properties of the create method for the resource. CreateMethod create = 1; // Specific properties of the read method for the resource. @@ -81,6 +96,8 @@ message Methods { GlobalListMethod global_list = 6; // Specific properties of the apply for the resource. ApplyMethod apply = 7; + + repeated CustomMethod custom = 8; } // A property represents a field in a resource or object. diff --git a/writer/proto/resource.go b/writer/proto/resource.go index 4d43018..9735163 100644 --- a/writer/proto/resource.go +++ b/writer/proto/resource.go @@ -83,6 +83,13 @@ func AddResource(r *api.Resource, a *api.API, fb *builder.FileBuilder, sb *build return err } } + + for _, cm := range r.CustomMethods { + err := AddCustomMethod(a, r, cm, resourceMb, fb, m, sb) + if err != nil { + return err + } + } return nil } @@ -456,6 +463,36 @@ func AddApply(a *api.API, r *api.Resource, resourceMb *builder.MessageBuilder, f return nil } +func AddCustomMethod(a *api.API, r *api.Resource, cm *api.CustomMethod, resourceMb *builder.MessageBuilder, fb *builder.FileBuilder, m *MessageStorage, sb *builder.ServiceBuilder) error { + methodName := cm.Name + toMessageName(r.Singular) + requestMb, err := GenerateSchemaMessage(methodName+"Request", cm.Request, a, m) + if err != nil { + return err + } + requestMb.SetComments(builder.Comments{ + LeadingComment: fmt.Sprintf("Request message for the %v method", cm.Name), + }) + addPathField(a, r, requestMb) + responseMb, err := GenerateSchemaMessage(methodName+"Response", cm.Response, a, m) + if err != nil { + return err + } + responseMb.SetComments(builder.Comments{ + LeadingComment: fmt.Sprintf("Response message for the %v method", cm.Name), + }) + fb.AddMessage(requestMb) + fb.AddMessage(responseMb) + method := builder.NewMethod(methodName, + builder.RpcTypeMessage(requestMb, false), + builder.RpcTypeMessage(responseMb, false), + ) + method.SetComments(builder.Comments{ + LeadingComment: fmt.Sprintf("%v a %v.", cm.Name, r.Singular), + }) + sb.AddMethod(method) + return nil +} + func generateHTTPPath(r *api.Resource) string { elements := []string{api.CollectionName(r)} if len(r.Parents) > 0 {