From 1d1bcb64187b87dacdcaf0fe8d9273d0574f6dc0 Mon Sep 17 00:00:00 2001 From: Yusuke Tsutsumi Date: Tue, 22 Oct 2024 22:59:34 -0700 Subject: [PATCH] feat: multiple nesting, deduped collection names The AEPs allow deduplicating collection names (for example, removing the "book" from "book-editions" in the path). Since this is a fairly common practice, make it something that aepc will do for you by default. Also fixing a few places where multiple nested children was not working, as well as additional issues that came from a hyphen in the resource singular. Also started building out an internal/ package - eventually most packages will move there, as aepc is a first and foremost a command-line interface and intended to be used as a binary. A utils library was added to do basic casing, as it is common to do so. --- example/bookstore/v1/bookstore.pb.go | 1413 +++++++++++++------ example/bookstore/v1/bookstore.pb.gw.go | 884 +++++++++--- example/bookstore/v1/bookstore.proto | 186 ++- example/bookstore/v1/bookstore.swagger.json | 350 ++++- example/bookstore/v1/bookstore.yaml | 24 +- example/bookstore/v1/bookstore_grpc.pb.go | 496 ++++--- example/bookstore/v1/bookstore_openapi.json | 176 +++ example/bookstore/v1/bookstore_openapi.yaml | 116 ++ example/service/service.go | 8 +- go.mod | 2 +- go.sum | 2 + internal/utils/cases.go | 19 + writer/openapi/openapi.go | 33 +- writer/proto/proto.go | 3 +- writer/proto/resource.go | 52 +- writer/writer_utils/utils.go | 23 + 16 files changed, 2810 insertions(+), 977 deletions(-) create mode 100644 internal/utils/cases.go create mode 100644 writer/writer_utils/utils.go diff --git a/example/bookstore/v1/bookstore.pb.go b/example/bookstore/v1/bookstore.pb.go index 071d556..8573476 100644 --- a/example/bookstore/v1/bookstore.pb.go +++ b/example/bookstore/v1/bookstore.pb.go @@ -23,7 +23,7 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// A book. +// A Book. type Book struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -127,7 +127,7 @@ func (x *Book) GetId() string { } // A Create request for a book resource. -type CreatebookRequest struct { +type CreateBookRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -140,8 +140,8 @@ type CreatebookRequest struct { Book *Book `protobuf:"bytes,10015,opt,name=book,proto3" json:"book,omitempty"` } -func (x *CreatebookRequest) Reset() { - *x = CreatebookRequest{} +func (x *CreateBookRequest) Reset() { + *x = CreateBookRequest{} if protoimpl.UnsafeEnabled { mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -149,13 +149,13 @@ func (x *CreatebookRequest) Reset() { } } -func (x *CreatebookRequest) String() string { +func (x *CreateBookRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CreatebookRequest) ProtoMessage() {} +func (*CreateBookRequest) ProtoMessage() {} -func (x *CreatebookRequest) ProtoReflect() protoreflect.Message { +func (x *CreateBookRequest) ProtoReflect() protoreflect.Message { mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -167,26 +167,26 @@ func (x *CreatebookRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CreatebookRequest.ProtoReflect.Descriptor instead. -func (*CreatebookRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use CreateBookRequest.ProtoReflect.Descriptor instead. +func (*CreateBookRequest) Descriptor() ([]byte, []int) { return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{1} } -func (x *CreatebookRequest) GetParent() string { +func (x *CreateBookRequest) GetParent() string { if x != nil { return x.Parent } return "" } -func (x *CreatebookRequest) GetId() string { +func (x *CreateBookRequest) GetId() string { if x != nil { return x.Id } return "" } -func (x *CreatebookRequest) GetBook() *Book { +func (x *CreateBookRequest) GetBook() *Book { if x != nil { return x.Book } @@ -194,7 +194,7 @@ func (x *CreatebookRequest) GetBook() *Book { } // Request message for the Getbook method -type GetbookRequest struct { +type GetBookRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -203,8 +203,8 @@ type GetbookRequest struct { Path string `protobuf:"bytes,10018,opt,name=path,proto3" json:"path,omitempty"` } -func (x *GetbookRequest) Reset() { - *x = GetbookRequest{} +func (x *GetBookRequest) Reset() { + *x = GetBookRequest{} if protoimpl.UnsafeEnabled { mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -212,13 +212,13 @@ func (x *GetbookRequest) Reset() { } } -func (x *GetbookRequest) String() string { +func (x *GetBookRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetbookRequest) ProtoMessage() {} +func (*GetBookRequest) ProtoMessage() {} -func (x *GetbookRequest) ProtoReflect() protoreflect.Message { +func (x *GetBookRequest) ProtoReflect() protoreflect.Message { mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -230,20 +230,20 @@ func (x *GetbookRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetbookRequest.ProtoReflect.Descriptor instead. -func (*GetbookRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use GetBookRequest.ProtoReflect.Descriptor instead. +func (*GetBookRequest) Descriptor() ([]byte, []int) { return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{2} } -func (x *GetbookRequest) GetPath() string { +func (x *GetBookRequest) GetPath() string { if x != nil { return x.Path } return "" } -// Request message for the Updatebook method -type UpdatebookRequest struct { +// Request message for the UpdateBook method +type UpdateBookRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -256,8 +256,8 @@ type UpdatebookRequest struct { UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,10012,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` } -func (x *UpdatebookRequest) Reset() { - *x = UpdatebookRequest{} +func (x *UpdateBookRequest) Reset() { + *x = UpdateBookRequest{} if protoimpl.UnsafeEnabled { mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -265,13 +265,13 @@ func (x *UpdatebookRequest) Reset() { } } -func (x *UpdatebookRequest) String() string { +func (x *UpdateBookRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UpdatebookRequest) ProtoMessage() {} +func (*UpdateBookRequest) ProtoMessage() {} -func (x *UpdatebookRequest) ProtoReflect() protoreflect.Message { +func (x *UpdateBookRequest) ProtoReflect() protoreflect.Message { mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -283,34 +283,34 @@ func (x *UpdatebookRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use UpdatebookRequest.ProtoReflect.Descriptor instead. -func (*UpdatebookRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use UpdateBookRequest.ProtoReflect.Descriptor instead. +func (*UpdateBookRequest) Descriptor() ([]byte, []int) { return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{3} } -func (x *UpdatebookRequest) GetPath() string { +func (x *UpdateBookRequest) GetPath() string { if x != nil { return x.Path } return "" } -func (x *UpdatebookRequest) GetBook() *Book { +func (x *UpdateBookRequest) GetBook() *Book { if x != nil { return x.Book } return nil } -func (x *UpdatebookRequest) GetUpdateMask() *fieldmaskpb.FieldMask { +func (x *UpdateBookRequest) GetUpdateMask() *fieldmaskpb.FieldMask { if x != nil { return x.UpdateMask } return nil } -// Request message for the Deletebook method -type DeletebookRequest struct { +// Request message for the DeleteBook method +type DeleteBookRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -319,8 +319,8 @@ type DeletebookRequest struct { Path string `protobuf:"bytes,10018,opt,name=path,proto3" json:"path,omitempty"` } -func (x *DeletebookRequest) Reset() { - *x = DeletebookRequest{} +func (x *DeleteBookRequest) Reset() { + *x = DeleteBookRequest{} if protoimpl.UnsafeEnabled { mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -328,13 +328,13 @@ func (x *DeletebookRequest) Reset() { } } -func (x *DeletebookRequest) String() string { +func (x *DeleteBookRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*DeletebookRequest) ProtoMessage() {} +func (*DeleteBookRequest) ProtoMessage() {} -func (x *DeletebookRequest) ProtoReflect() protoreflect.Message { +func (x *DeleteBookRequest) ProtoReflect() protoreflect.Message { mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -346,12 +346,12 @@ func (x *DeletebookRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use DeletebookRequest.ProtoReflect.Descriptor instead. -func (*DeletebookRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use DeleteBookRequest.ProtoReflect.Descriptor instead. +func (*DeleteBookRequest) Descriptor() ([]byte, []int) { return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{4} } -func (x *DeletebookRequest) GetPath() string { +func (x *DeleteBookRequest) GetPath() string { if x != nil { return x.Path } @@ -359,7 +359,7 @@ func (x *DeletebookRequest) GetPath() string { } // Request message for the Listbook method -type ListbookRequest struct { +type ListBooksRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -372,8 +372,8 @@ type ListbookRequest struct { MaxPageSize int32 `protobuf:"varint,10017,opt,name=max_page_size,json=maxPageSize,proto3" json:"max_page_size,omitempty"` } -func (x *ListbookRequest) Reset() { - *x = ListbookRequest{} +func (x *ListBooksRequest) Reset() { + *x = ListBooksRequest{} if protoimpl.UnsafeEnabled { mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -381,13 +381,13 @@ func (x *ListbookRequest) Reset() { } } -func (x *ListbookRequest) String() string { +func (x *ListBooksRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ListbookRequest) ProtoMessage() {} +func (*ListBooksRequest) ProtoMessage() {} -func (x *ListbookRequest) ProtoReflect() protoreflect.Message { +func (x *ListBooksRequest) ProtoReflect() protoreflect.Message { mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -399,26 +399,26 @@ func (x *ListbookRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ListbookRequest.ProtoReflect.Descriptor instead. -func (*ListbookRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use ListBooksRequest.ProtoReflect.Descriptor instead. +func (*ListBooksRequest) Descriptor() ([]byte, []int) { return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{5} } -func (x *ListbookRequest) GetParent() string { +func (x *ListBooksRequest) GetParent() string { if x != nil { return x.Parent } return "" } -func (x *ListbookRequest) GetPageToken() string { +func (x *ListBooksRequest) GetPageToken() string { if x != nil { return x.PageToken } return "" } -func (x *ListbookRequest) GetMaxPageSize() int32 { +func (x *ListBooksRequest) GetMaxPageSize() int32 { if x != nil { return x.MaxPageSize } @@ -426,7 +426,7 @@ func (x *ListbookRequest) GetMaxPageSize() int32 { } // Response message for the Listbook method -type ListbookResponse struct { +type ListBooksResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -437,8 +437,8 @@ type ListbookResponse struct { NextPageToken string `protobuf:"bytes,10011,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` } -func (x *ListbookResponse) Reset() { - *x = ListbookResponse{} +func (x *ListBooksResponse) Reset() { + *x = ListBooksResponse{} if protoimpl.UnsafeEnabled { mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -446,13 +446,13 @@ func (x *ListbookResponse) Reset() { } } -func (x *ListbookResponse) String() string { +func (x *ListBooksResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ListbookResponse) ProtoMessage() {} +func (*ListBooksResponse) ProtoMessage() {} -func (x *ListbookResponse) ProtoReflect() protoreflect.Message { +func (x *ListBooksResponse) ProtoReflect() protoreflect.Message { mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -464,19 +464,19 @@ func (x *ListbookResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ListbookResponse.ProtoReflect.Descriptor instead. -func (*ListbookResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use ListBooksResponse.ProtoReflect.Descriptor instead. +func (*ListBooksResponse) Descriptor() ([]byte, []int) { return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{6} } -func (x *ListbookResponse) GetResults() []*Book { +func (x *ListBooksResponse) GetResults() []*Book { if x != nil { return x.Results } return nil } -func (x *ListbookResponse) GetNextPageToken() string { +func (x *ListBooksResponse) GetNextPageToken() string { if x != nil { return x.NextPageToken } @@ -484,7 +484,7 @@ func (x *ListbookResponse) GetNextPageToken() string { } // Request message for the Applybook method -type ApplybookRequest struct { +type ApplyBookRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -495,8 +495,8 @@ type ApplybookRequest struct { Book *Book `protobuf:"bytes,10015,opt,name=book,proto3" json:"book,omitempty"` } -func (x *ApplybookRequest) Reset() { - *x = ApplybookRequest{} +func (x *ApplyBookRequest) Reset() { + *x = ApplyBookRequest{} if protoimpl.UnsafeEnabled { mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -504,13 +504,13 @@ func (x *ApplybookRequest) Reset() { } } -func (x *ApplybookRequest) String() string { +func (x *ApplyBookRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ApplybookRequest) ProtoMessage() {} +func (*ApplyBookRequest) ProtoMessage() {} -func (x *ApplybookRequest) ProtoReflect() protoreflect.Message { +func (x *ApplyBookRequest) ProtoReflect() protoreflect.Message { mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -522,26 +522,383 @@ func (x *ApplybookRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ApplybookRequest.ProtoReflect.Descriptor instead. -func (*ApplybookRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use ApplyBookRequest.ProtoReflect.Descriptor instead. +func (*ApplyBookRequest) Descriptor() ([]byte, []int) { return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{7} } -func (x *ApplybookRequest) GetPath() string { +func (x *ApplyBookRequest) GetPath() string { if x != nil { return x.Path } return "" } -func (x *ApplybookRequest) GetBook() *Book { +func (x *ApplyBookRequest) GetBook() *Book { if x != nil { return x.Book } return nil } -// A publisher. +// A BookEdition. +type BookEdition struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Field for name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Field for path. + Path string `protobuf:"bytes,10000,opt,name=path,proto3" json:"path,omitempty"` + // Field for id. + Id string `protobuf:"bytes,10001,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *BookEdition) Reset() { + *x = BookEdition{} + if protoimpl.UnsafeEnabled { + mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BookEdition) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BookEdition) ProtoMessage() {} + +func (x *BookEdition) ProtoReflect() protoreflect.Message { + mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[8] + 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 BookEdition.ProtoReflect.Descriptor instead. +func (*BookEdition) Descriptor() ([]byte, []int) { + return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{8} +} + +func (x *BookEdition) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *BookEdition) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *BookEdition) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +// A Create request for a book-edition resource. +type CreateBookEditionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A field for the parent of book-edition + Parent string `protobuf:"bytes,10013,opt,name=parent,proto3" json:"parent,omitempty"` + // An id that uniquely identifies the resource within the collection + Id string `protobuf:"bytes,10014,opt,name=id,proto3" json:"id,omitempty"` + // The resource to perform the operation on. + BookEdition *BookEdition `protobuf:"bytes,10015,opt,name=book_edition,json=bookEdition,proto3" json:"book_edition,omitempty"` +} + +func (x *CreateBookEditionRequest) Reset() { + *x = CreateBookEditionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateBookEditionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateBookEditionRequest) ProtoMessage() {} + +func (x *CreateBookEditionRequest) ProtoReflect() protoreflect.Message { + mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[9] + 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 CreateBookEditionRequest.ProtoReflect.Descriptor instead. +func (*CreateBookEditionRequest) Descriptor() ([]byte, []int) { + return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{9} +} + +func (x *CreateBookEditionRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateBookEditionRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *CreateBookEditionRequest) GetBookEdition() *BookEdition { + if x != nil { + return x.BookEdition + } + return nil +} + +// Request message for the Getbook-edition method +type GetBookEditionRequest 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 *GetBookEditionRequest) Reset() { + *x = GetBookEditionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetBookEditionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBookEditionRequest) ProtoMessage() {} + +func (x *GetBookEditionRequest) ProtoReflect() protoreflect.Message { + mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[10] + 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 GetBookEditionRequest.ProtoReflect.Descriptor instead. +func (*GetBookEditionRequest) Descriptor() ([]byte, []int) { + return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{10} +} + +func (x *GetBookEditionRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +// Request message for the DeleteBookEdition method +type DeleteBookEditionRequest 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 *DeleteBookEditionRequest) Reset() { + *x = DeleteBookEditionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteBookEditionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteBookEditionRequest) ProtoMessage() {} + +func (x *DeleteBookEditionRequest) 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 DeleteBookEditionRequest.ProtoReflect.Descriptor instead. +func (*DeleteBookEditionRequest) Descriptor() ([]byte, []int) { + return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{11} +} + +func (x *DeleteBookEditionRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +// Request message for the Listbook-edition method +type ListBookEditionsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A field for the parent of book-edition + Parent string `protobuf:"bytes,10013,opt,name=parent,proto3" json:"parent,omitempty"` + // The page token indicating the starting point of the page + PageToken string `protobuf:"bytes,10010,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // The maximum number of resources to return in a single page. + MaxPageSize int32 `protobuf:"varint,10017,opt,name=max_page_size,json=maxPageSize,proto3" json:"max_page_size,omitempty"` +} + +func (x *ListBookEditionsRequest) Reset() { + *x = ListBookEditionsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListBookEditionsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListBookEditionsRequest) ProtoMessage() {} + +func (x *ListBookEditionsRequest) 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 ListBookEditionsRequest.ProtoReflect.Descriptor instead. +func (*ListBookEditionsRequest) Descriptor() ([]byte, []int) { + return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{12} +} + +func (x *ListBookEditionsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListBookEditionsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListBookEditionsRequest) GetMaxPageSize() int32 { + if x != nil { + return x.MaxPageSize + } + return 0 +} + +// Response message for the Listbook-edition method +type ListBookEditionsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A list of book-editions + Results []*BookEdition `protobuf:"bytes,10016,rep,name=results,proto3" json:"results,omitempty"` + // The page token indicating the ending point of this response. + NextPageToken string `protobuf:"bytes,10011,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListBookEditionsResponse) Reset() { + *x = ListBookEditionsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListBookEditionsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListBookEditionsResponse) ProtoMessage() {} + +func (x *ListBookEditionsResponse) ProtoReflect() protoreflect.Message { + 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 { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListBookEditionsResponse.ProtoReflect.Descriptor instead. +func (*ListBookEditionsResponse) Descriptor() ([]byte, []int) { + return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{13} +} + +func (x *ListBookEditionsResponse) GetResults() []*BookEdition { + if x != nil { + return x.Results + } + return nil +} + +func (x *ListBookEditionsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// A Publisher. type Publisher struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -558,7 +915,7 @@ type Publisher struct { func (x *Publisher) Reset() { *x = Publisher{} if protoimpl.UnsafeEnabled { - mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[8] + mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -571,7 +928,7 @@ func (x *Publisher) String() string { func (*Publisher) ProtoMessage() {} func (x *Publisher) ProtoReflect() protoreflect.Message { - mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[8] + 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 { @@ -584,7 +941,7 @@ func (x *Publisher) ProtoReflect() protoreflect.Message { // Deprecated: Use Publisher.ProtoReflect.Descriptor instead. func (*Publisher) Descriptor() ([]byte, []int) { - return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{8} + return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{14} } func (x *Publisher) GetDescription() string { @@ -609,7 +966,7 @@ func (x *Publisher) GetId() string { } // A Create request for a publisher resource. -type CreatepublisherRequest struct { +type CreatePublisherRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -622,23 +979,23 @@ type CreatepublisherRequest struct { Publisher *Publisher `protobuf:"bytes,10015,opt,name=publisher,proto3" json:"publisher,omitempty"` } -func (x *CreatepublisherRequest) Reset() { - *x = CreatepublisherRequest{} +func (x *CreatePublisherRequest) Reset() { + *x = CreatePublisherRequest{} if protoimpl.UnsafeEnabled { - mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[9] + mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *CreatepublisherRequest) String() string { +func (x *CreatePublisherRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CreatepublisherRequest) ProtoMessage() {} +func (*CreatePublisherRequest) ProtoMessage() {} -func (x *CreatepublisherRequest) ProtoReflect() protoreflect.Message { - mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[9] +func (x *CreatePublisherRequest) ProtoReflect() protoreflect.Message { + 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 { @@ -649,26 +1006,26 @@ func (x *CreatepublisherRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CreatepublisherRequest.ProtoReflect.Descriptor instead. -func (*CreatepublisherRequest) Descriptor() ([]byte, []int) { - return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{9} +// Deprecated: Use CreatePublisherRequest.ProtoReflect.Descriptor instead. +func (*CreatePublisherRequest) Descriptor() ([]byte, []int) { + return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{15} } -func (x *CreatepublisherRequest) GetParent() string { +func (x *CreatePublisherRequest) GetParent() string { if x != nil { return x.Parent } return "" } -func (x *CreatepublisherRequest) GetId() string { +func (x *CreatePublisherRequest) GetId() string { if x != nil { return x.Id } return "" } -func (x *CreatepublisherRequest) GetPublisher() *Publisher { +func (x *CreatePublisherRequest) GetPublisher() *Publisher { if x != nil { return x.Publisher } @@ -676,7 +1033,7 @@ func (x *CreatepublisherRequest) GetPublisher() *Publisher { } // Request message for the Getpublisher method -type GetpublisherRequest struct { +type GetPublisherRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -685,23 +1042,23 @@ type GetpublisherRequest struct { Path string `protobuf:"bytes,10018,opt,name=path,proto3" json:"path,omitempty"` } -func (x *GetpublisherRequest) Reset() { - *x = GetpublisherRequest{} +func (x *GetPublisherRequest) Reset() { + *x = GetPublisherRequest{} if protoimpl.UnsafeEnabled { - mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[10] + mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *GetpublisherRequest) String() string { +func (x *GetPublisherRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetpublisherRequest) ProtoMessage() {} +func (*GetPublisherRequest) ProtoMessage() {} -func (x *GetpublisherRequest) ProtoReflect() protoreflect.Message { - mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[10] +func (x *GetPublisherRequest) ProtoReflect() protoreflect.Message { + 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 { @@ -712,20 +1069,20 @@ func (x *GetpublisherRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetpublisherRequest.ProtoReflect.Descriptor instead. -func (*GetpublisherRequest) Descriptor() ([]byte, []int) { - return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{10} +// Deprecated: Use GetPublisherRequest.ProtoReflect.Descriptor instead. +func (*GetPublisherRequest) Descriptor() ([]byte, []int) { + return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{16} } -func (x *GetpublisherRequest) GetPath() string { +func (x *GetPublisherRequest) GetPath() string { if x != nil { return x.Path } return "" } -// Request message for the Updatepublisher method -type UpdatepublisherRequest struct { +// Request message for the UpdatePublisher method +type UpdatePublisherRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -738,23 +1095,23 @@ type UpdatepublisherRequest struct { UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,10012,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` } -func (x *UpdatepublisherRequest) Reset() { - *x = UpdatepublisherRequest{} +func (x *UpdatePublisherRequest) Reset() { + *x = UpdatePublisherRequest{} if protoimpl.UnsafeEnabled { - mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[11] + mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *UpdatepublisherRequest) String() string { +func (x *UpdatePublisherRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UpdatepublisherRequest) ProtoMessage() {} +func (*UpdatePublisherRequest) ProtoMessage() {} -func (x *UpdatepublisherRequest) ProtoReflect() protoreflect.Message { - mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[11] +func (x *UpdatePublisherRequest) ProtoReflect() protoreflect.Message { + 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 { @@ -765,34 +1122,34 @@ func (x *UpdatepublisherRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use UpdatepublisherRequest.ProtoReflect.Descriptor instead. -func (*UpdatepublisherRequest) Descriptor() ([]byte, []int) { - return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{11} +// Deprecated: Use UpdatePublisherRequest.ProtoReflect.Descriptor instead. +func (*UpdatePublisherRequest) Descriptor() ([]byte, []int) { + return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{17} } -func (x *UpdatepublisherRequest) GetPath() string { +func (x *UpdatePublisherRequest) GetPath() string { if x != nil { return x.Path } return "" } -func (x *UpdatepublisherRequest) GetPublisher() *Publisher { +func (x *UpdatePublisherRequest) GetPublisher() *Publisher { if x != nil { return x.Publisher } return nil } -func (x *UpdatepublisherRequest) GetUpdateMask() *fieldmaskpb.FieldMask { +func (x *UpdatePublisherRequest) GetUpdateMask() *fieldmaskpb.FieldMask { if x != nil { return x.UpdateMask } return nil } -// Request message for the Deletepublisher method -type DeletepublisherRequest struct { +// Request message for the DeletePublisher method +type DeletePublisherRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -801,23 +1158,23 @@ type DeletepublisherRequest struct { Path string `protobuf:"bytes,10018,opt,name=path,proto3" json:"path,omitempty"` } -func (x *DeletepublisherRequest) Reset() { - *x = DeletepublisherRequest{} +func (x *DeletePublisherRequest) Reset() { + *x = DeletePublisherRequest{} if protoimpl.UnsafeEnabled { - mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[12] + mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *DeletepublisherRequest) String() string { +func (x *DeletePublisherRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*DeletepublisherRequest) ProtoMessage() {} +func (*DeletePublisherRequest) ProtoMessage() {} -func (x *DeletepublisherRequest) ProtoReflect() protoreflect.Message { - mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[12] +func (x *DeletePublisherRequest) ProtoReflect() protoreflect.Message { + 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 { @@ -828,12 +1185,12 @@ func (x *DeletepublisherRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use DeletepublisherRequest.ProtoReflect.Descriptor instead. -func (*DeletepublisherRequest) Descriptor() ([]byte, []int) { - return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{12} +// Deprecated: Use DeletePublisherRequest.ProtoReflect.Descriptor instead. +func (*DeletePublisherRequest) Descriptor() ([]byte, []int) { + return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{18} } -func (x *DeletepublisherRequest) GetPath() string { +func (x *DeletePublisherRequest) GetPath() string { if x != nil { return x.Path } @@ -841,7 +1198,7 @@ func (x *DeletepublisherRequest) GetPath() string { } // Request message for the Listpublisher method -type ListpublisherRequest struct { +type ListPublishersRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -854,23 +1211,23 @@ type ListpublisherRequest struct { MaxPageSize int32 `protobuf:"varint,10017,opt,name=max_page_size,json=maxPageSize,proto3" json:"max_page_size,omitempty"` } -func (x *ListpublisherRequest) Reset() { - *x = ListpublisherRequest{} +func (x *ListPublishersRequest) Reset() { + *x = ListPublishersRequest{} if protoimpl.UnsafeEnabled { - mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[13] + mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ListpublisherRequest) String() string { +func (x *ListPublishersRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ListpublisherRequest) ProtoMessage() {} +func (*ListPublishersRequest) ProtoMessage() {} -func (x *ListpublisherRequest) ProtoReflect() protoreflect.Message { - mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[13] +func (x *ListPublishersRequest) ProtoReflect() protoreflect.Message { + 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 { @@ -881,26 +1238,26 @@ func (x *ListpublisherRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ListpublisherRequest.ProtoReflect.Descriptor instead. -func (*ListpublisherRequest) Descriptor() ([]byte, []int) { - return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{13} +// Deprecated: Use ListPublishersRequest.ProtoReflect.Descriptor instead. +func (*ListPublishersRequest) Descriptor() ([]byte, []int) { + return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{19} } -func (x *ListpublisherRequest) GetParent() string { +func (x *ListPublishersRequest) GetParent() string { if x != nil { return x.Parent } return "" } -func (x *ListpublisherRequest) GetPageToken() string { +func (x *ListPublishersRequest) GetPageToken() string { if x != nil { return x.PageToken } return "" } -func (x *ListpublisherRequest) GetMaxPageSize() int32 { +func (x *ListPublishersRequest) GetMaxPageSize() int32 { if x != nil { return x.MaxPageSize } @@ -908,7 +1265,7 @@ func (x *ListpublisherRequest) GetMaxPageSize() int32 { } // Response message for the Listpublisher method -type ListpublisherResponse struct { +type ListPublishersResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -919,23 +1276,23 @@ type ListpublisherResponse struct { NextPageToken string `protobuf:"bytes,10011,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` } -func (x *ListpublisherResponse) Reset() { - *x = ListpublisherResponse{} +func (x *ListPublishersResponse) Reset() { + *x = ListPublishersResponse{} if protoimpl.UnsafeEnabled { - mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[14] + mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ListpublisherResponse) String() string { +func (x *ListPublishersResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ListpublisherResponse) ProtoMessage() {} +func (*ListPublishersResponse) ProtoMessage() {} -func (x *ListpublisherResponse) ProtoReflect() protoreflect.Message { - mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[14] +func (x *ListPublishersResponse) ProtoReflect() protoreflect.Message { + 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 { @@ -946,19 +1303,19 @@ func (x *ListpublisherResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ListpublisherResponse.ProtoReflect.Descriptor instead. -func (*ListpublisherResponse) Descriptor() ([]byte, []int) { - return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{14} +// Deprecated: Use ListPublishersResponse.ProtoReflect.Descriptor instead. +func (*ListPublishersResponse) Descriptor() ([]byte, []int) { + return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{20} } -func (x *ListpublisherResponse) GetResults() []*Publisher { +func (x *ListPublishersResponse) GetResults() []*Publisher { if x != nil { return x.Results } return nil } -func (x *ListpublisherResponse) GetNextPageToken() string { +func (x *ListPublishersResponse) GetNextPageToken() string { if x != nil { return x.NextPageToken } @@ -966,7 +1323,7 @@ func (x *ListpublisherResponse) GetNextPageToken() string { } // Request message for the Applypublisher method -type ApplypublisherRequest struct { +type ApplyPublisherRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -977,23 +1334,23 @@ type ApplypublisherRequest struct { Publisher *Publisher `protobuf:"bytes,10015,opt,name=publisher,proto3" json:"publisher,omitempty"` } -func (x *ApplypublisherRequest) Reset() { - *x = ApplypublisherRequest{} +func (x *ApplyPublisherRequest) Reset() { + *x = ApplyPublisherRequest{} if protoimpl.UnsafeEnabled { - mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[15] + mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ApplypublisherRequest) String() string { +func (x *ApplyPublisherRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ApplypublisherRequest) ProtoMessage() {} +func (*ApplyPublisherRequest) ProtoMessage() {} -func (x *ApplypublisherRequest) ProtoReflect() protoreflect.Message { - mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[15] +func (x *ApplyPublisherRequest) ProtoReflect() protoreflect.Message { + 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 { @@ -1004,19 +1361,19 @@ func (x *ApplypublisherRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ApplypublisherRequest.ProtoReflect.Descriptor instead. -func (*ApplypublisherRequest) Descriptor() ([]byte, []int) { - return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{15} +// Deprecated: Use ApplyPublisherRequest.ProtoReflect.Descriptor instead. +func (*ApplyPublisherRequest) Descriptor() ([]byte, []int) { + return file_example_bookstore_v1_bookstore_proto_rawDescGZIP(), []int{21} } -func (x *ApplypublisherRequest) GetPath() string { +func (x *ApplyPublisherRequest) GetPath() string { if x != nil { return x.Path } return "" } -func (x *ApplypublisherRequest) GetPublisher() *Publisher { +func (x *ApplyPublisherRequest) GetPublisher() *Publisher { if x != nil { return x.Publisher } @@ -1038,7 +1395,7 @@ type Book_Author struct { func (x *Book_Author) Reset() { *x = Book_Author{} if protoimpl.UnsafeEnabled { - mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[16] + mi := &file_example_bookstore_v1_bookstore_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1051,7 +1408,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[16] + 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 { @@ -1099,9 +1456,9 @@ var file_example_bookstore_v1_bookstore_proto_rawDesc = []byte{ 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9c, - 0x02, 0x0a, 0x04, 0x62, 0x6f, 0x6f, 0x6b, 0x12, 0x39, 0x0a, 0x06, 0x61, 0x75, 0x74, 0x68, 0x6f, + 0x02, 0x0a, 0x04, 0x42, 0x6f, 0x6f, 0x6b, 0x12, 0x39, 0x0a, 0x06, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, - 0x65, 0x2e, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x62, + 0x65, 0x2e, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6f, 0x6f, 0x6b, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x52, 0x06, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x12, 0x17, 0x0a, 0x04, 0x69, 0x73, 0x62, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x69, 0x73, 0x62, 0x6e, 0x12, 0x19, 0x0a, 0x05, 0x70, @@ -1117,230 +1474,314 @@ var file_example_bookstore_v1_bookstore_proto_rawDesc = []byte{ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, 0x69, 0x72, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x7b, 0x0a, - 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 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, 0x6e, 0x74, 0x12, 0x0f, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x9e, 0x4e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x34, 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, 0x62, 0x6f, 0x6f, 0x6b, 0x42, + 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, 0x49, 0x0a, 0x0e, 0x47, 0x65, - 0x74, 0x62, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x04, + 0x74, 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, 0xc0, 0x01, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x62, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x04, 0x70, + 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, 0x12, 0x34, 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, 0x62, 0x6f, 0x6f, 0x6b, 0x42, + 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, 0x12, 0x3c, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x9c, 0x4e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x4c, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, 0x0a, + 0x74, 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, 0x77, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x62, 0x6f, - 0x6f, 0x6b, 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, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x61, - 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x9a, 0x4e, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x61, - 0x78, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0xa1, 0x4e, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x50, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, - 0x72, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x62, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0xa0, - 0x4e, 0x20, 0x03, 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, 0x62, 0x6f, 0x6f, - 0x6b, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x6e, 0x65, - 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x9b, 0x4e, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x22, 0x81, 0x01, 0x0a, 0x10, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x62, 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, 0x12, 0x34, 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, 0x62, 0x6f, 0x6f, 0x6b, 0x42, 0x03, 0xe0, 0x41, - 0x02, 0x52, 0x04, 0x62, 0x6f, 0x6f, 0x6b, 0x22, 0x53, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, - 0x73, 0x68, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x13, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x90, - 0x4e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x0f, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x91, 0x4e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x8f, 0x01, 0x0a, - 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, - 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, 0x6e, 0x74, 0x12, 0x0f, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x9e, - 0x4e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x43, 0x0a, 0x09, 0x70, 0x75, 0x62, - 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x18, 0x9f, 0x4e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, + 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x78, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x6f, + 0x6f, 0x6b, 0x73, 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, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x9a, 0x4e, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x6d, + 0x61, 0x78, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0xa1, 0x4e, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x50, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, + 0x22, 0x73, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, + 0x18, 0xa0, 0x4e, 0x20, 0x03, 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, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x27, 0x0a, 0x0f, + 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, + 0x9b, 0x4e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x81, 0x01, 0x0a, 0x10, 0x41, 0x70, 0x70, 0x6c, 0x79, 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, 0x12, 0x34, 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, 0x4c, 0x0a, 0x0b, 0x42, 0x6f, 0x6f, + 0x6b, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x13, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x90, 0x4e, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x0f, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x91, 0x4e, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 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, 0x6e, 0x74, 0x12, 0x0f, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x9e, 0x4e, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x4a, 0x0a, 0x0c, 0x62, 0x6f, 0x6f, 0x6b, 0x5f, 0x65, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x9f, 0x4e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x74, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x42, 0x03, - 0xe0, 0x41, 0x02, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x22, 0x53, - 0x0a, 0x13, 0x47, 0x65, 0x74, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x52, 0x65, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6f, 0x6f, 0x6b, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x62, 0x6f, 0x6f, 0x6b, 0x45, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x22, 0x58, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x45, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x04, 0x70, + 0x61, 0x74, 0x68, 0x18, 0xa2, 0x4e, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2a, 0xe0, 0x41, 0x02, 0xfa, + 0x41, 0x24, 0x0a, 0x22, 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, 0x2d, 0x65, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x5b, 0x0a, 0x18, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, + 0x18, 0xa2, 0x4e, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2a, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x24, 0x0a, + 0x22, 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, 0x2d, 0x65, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x7f, 0x0a, 0x17, 0x4c, 0x69, 0x73, + 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 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, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x18, 0x9a, 0x4e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x61, 0x67, + 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0xa1, 0x4e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x6d, + 0x61, 0x78, 0x50, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x81, 0x01, 0x0a, 0x18, 0x4c, + 0x69, 0x73, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x73, 0x18, 0xa0, 0x4e, 0x20, 0x03, 0x28, 0x0b, 0x32, 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, 0x52, 0x07, 0x72, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x9b, 0x4e, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x53, + 0x0a, 0x09, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x13, 0x0a, + 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x90, 0x4e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, + 0x74, 0x68, 0x12, 0x0f, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x91, 0x4e, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x22, 0x8f, 0x01, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x75, + 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 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, 0x6e, 0x74, 0x12, + 0x0f, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x9e, 0x4e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x43, 0x0a, 0x09, 0x70, 0x75, 0x62, 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, 0x22, 0x53, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, + 0x69, 0x73, 0x68, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x04, + 0x70, 0x61, 0x74, 0x68, 0x18, 0xa2, 0x4e, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0xe0, 0x41, 0x02, + 0xfa, 0x41, 0x21, 0x0a, 0x1f, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x65, + 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x62, 0x6c, 0x69, + 0x73, 0x68, 0x65, 0x72, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0xd9, 0x01, 0x0a, 0x16, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0xa2, 0x4e, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x21, 0x0a, 0x1f, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x52, 0x04, 0x70, - 0x61, 0x74, 0x68, 0x22, 0xd9, 0x01, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x70, 0x75, - 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, - 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0xa2, 0x4e, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0xe0, - 0x41, 0x02, 0xfa, 0x41, 0x21, 0x0a, 0x1f, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x74, 0x6f, 0x72, 0x65, - 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x62, - 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x43, 0x0a, 0x09, - 0x70, 0x75, 0x62, 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, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, - 0x72, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, - 0x72, 0x12, 0x3c, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, - 0x18, 0x9c, 0x4e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, - 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, - 0x56, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, - 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x04, 0x70, 0x61, 0x74, - 0x68, 0x18, 0xa2, 0x4e, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x21, - 0x0a, 0x1f, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x65, 0x78, 0x61, 0x6d, - 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, - 0x72, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x7c, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x70, - 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 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, 0x6e, 0x74, - 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x9a, - 0x4e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, - 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, - 0x65, 0x18, 0xa1, 0x4e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x50, 0x61, 0x67, - 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x7c, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x70, 0x75, 0x62, - 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, - 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0xa0, 0x4e, 0x20, 0x03, 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, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, - 0x72, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x6e, 0x65, - 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x9b, 0x4e, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x22, 0x9a, 0x01, 0x0a, 0x15, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x70, 0x75, 0x62, - 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a, - 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0xa2, 0x4e, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0xe0, 0x41, - 0x02, 0xfa, 0x41, 0x21, 0x0a, 0x1f, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, - 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x62, 0x6c, - 0x69, 0x73, 0x68, 0x65, 0x72, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x43, 0x0a, 0x09, 0x70, - 0x75, 0x62, 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, 0x70, 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, 0x88, 0x0d, 0x0a, 0x09, 0x42, 0x6f, 0x6f, 0x6b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x8b, - 0x01, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x62, 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, 0x62, 0x6f, 0x6f, 0x6b, 0x52, + 0x61, 0x74, 0x68, 0x12, 0x43, 0x0a, 0x09, 0x70, 0x75, 0x62, 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, 0x12, 0x3c, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x9c, 0x4e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x56, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x3c, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0xa2, 0x4e, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x27, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x21, 0x0a, 0x1f, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x74, 0x6f, + 0x72, 0x65, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, + 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x7d, + 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x73, + 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, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x9a, 0x4e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, + 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x61, 0x78, 0x5f, + 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0xa1, 0x4e, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x50, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x7d, 0x0a, + 0x16, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x73, 0x18, 0xa0, 0x4e, 0x20, 0x03, 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, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x9b, 0x4e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, + 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x9a, 0x01, 0x0a, + 0x15, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0xa2, + 0x4e, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x21, 0x0a, 0x1f, 0x62, + 0x6f, 0x6f, 0x6b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x52, 0x04, + 0x70, 0x61, 0x74, 0x68, 0x12, 0x43, 0x0a, 0x09, 0x70, 0x75, 0x62, 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, 0x12, 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, 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, 0x42, 0x6f, 0x6f, 0x6b, 0x22, 0x38, 0xda, 0x41, 0x0b, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x62, 0x6f, 0x6f, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x24, 0x3a, 0x04, 0x62, 0x6f, 0x6f, 0x6b, 0x22, 0x1c, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x3d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, + 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x12, 0x78, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, + 0x12, 0x24, 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, 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, 0x62, 0x6f, - 0x6f, 0x6b, 0x22, 0x38, 0xda, 0x41, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x62, 0x6f, - 0x6f, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x3a, 0x04, 0x62, 0x6f, 0x6f, 0x6b, 0x22, 0x1c, - 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, - 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x12, 0x78, 0x0a, 0x07, - 0x47, 0x65, 0x74, 0x62, 0x6f, 0x6f, 0x6b, 0x12, 0x24, 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, 0x62, 0x6f, 0x6f, 0x6b, 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, 0x62, 0x6f, 0x6f, 0x6b, 0x22, 0x2b, 0xda, 0x41, 0x04, 0x70, 0x61, - 0x74, 0x68, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 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, 0x90, 0x01, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x62, 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, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, + 0x2e, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6f, + 0x6f, 0x6b, 0x22, 0x2b, 0xda, 0x41, 0x04, 0x70, 0x61, 0x74, 0x68, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x1e, 0x12, 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, + 0x90, 0x01, 0x0a, 0x0a, 0x55, 0x70, 0x64, 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, 0x62, 0x6f, 0x6f, 0x6b, 0x22, 0x3d, 0xda, 0x41, 0x10, 0x62, - 0x6f, 0x6f, 0x6b, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x3a, 0x04, 0x62, 0x6f, 0x6f, 0x6b, 0x32, 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, 0x7a, 0x0a, 0x0a, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x62, 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, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x2b, 0xda, 0x41, 0x04, 0x70, 0x61, 0x74, - 0x68, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x2a, 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, 0x88, 0x01, 0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, 0x62, 0x6f, - 0x6f, 0x6b, 0x12, 0x25, 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, 0x62, 0x6f, - 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x65, 0x78, 0x61, 0x6d, + 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, + 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, 0x42, + 0x6f, 0x6f, 0x6b, 0x22, 0x3d, 0xda, 0x41, 0x10, 0x62, 0x6f, 0x6f, 0x6b, 0x2c, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x3a, 0x04, + 0x62, 0x6f, 0x6f, 0x6b, 0x32, 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, 0x7a, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 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, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x6f, + 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, + 0x79, 0x22, 0x2b, 0xda, 0x41, 0x04, 0x70, 0x61, 0x74, 0x68, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, + 0x2a, 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, 0x8b, + 0x01, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x73, 0x12, 0x26, 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, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 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, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2d, 0xda, + 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, + 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, + 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x12, 0x7b, 0x0a, 0x09, + 0x41, 0x70, 0x70, 0x6c, 0x79, 0x42, 0x6f, 0x6f, 0x6b, 0x12, 0x26, 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, 0x62, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x2d, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x75, 0x62, - 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x62, 0x6f, 0x6f, 0x6b, 0x73, - 0x12, 0x7b, 0x0a, 0x09, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x62, 0x6f, 0x6f, 0x6b, 0x12, 0x26, 0x2e, + 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x42, 0x6f, 0x6f, 0x6b, 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, 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, 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, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x62, 0x6f, 0x6f, 0x6b, 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, 0x62, 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, 0x9c, 0x01, - 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x70, 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, 0x70, - 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, 0x70, 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, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x12, 0x29, 0x2e, 0x65, + 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, 0x47, 0x65, 0x74, 0x70, 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, 0x70, - 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, 0x70, 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, 0x70, - 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, 0x70, 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, 0x70, 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, 0x70, 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, - 0x8f, 0x01, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, - 0x72, 0x12, 0x2a, 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, 0x70, 0x75, 0x62, - 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, + 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, 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, 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, 0x4c, 0x69, 0x73, 0x74, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, - 0x65, 0x72, 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, 0x70, 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, 0x70, 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, 0x70, 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, + 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 ( @@ -1355,69 +1796,85 @@ 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, 17) +var file_example_bookstore_v1_bookstore_proto_msgTypes = make([]protoimpl.MessageInfo, 23) var file_example_bookstore_v1_bookstore_proto_goTypes = []interface{}{ - (*Book)(nil), // 0: example.bookstore.v1.book - (*CreatebookRequest)(nil), // 1: example.bookstore.v1.CreatebookRequest - (*GetbookRequest)(nil), // 2: example.bookstore.v1.GetbookRequest - (*UpdatebookRequest)(nil), // 3: example.bookstore.v1.UpdatebookRequest - (*DeletebookRequest)(nil), // 4: example.bookstore.v1.DeletebookRequest - (*ListbookRequest)(nil), // 5: example.bookstore.v1.ListbookRequest - (*ListbookResponse)(nil), // 6: example.bookstore.v1.ListbookResponse - (*ApplybookRequest)(nil), // 7: example.bookstore.v1.ApplybookRequest - (*Publisher)(nil), // 8: example.bookstore.v1.publisher - (*CreatepublisherRequest)(nil), // 9: example.bookstore.v1.CreatepublisherRequest - (*GetpublisherRequest)(nil), // 10: example.bookstore.v1.GetpublisherRequest - (*UpdatepublisherRequest)(nil), // 11: example.bookstore.v1.UpdatepublisherRequest - (*DeletepublisherRequest)(nil), // 12: example.bookstore.v1.DeletepublisherRequest - (*ListpublisherRequest)(nil), // 13: example.bookstore.v1.ListpublisherRequest - (*ListpublisherResponse)(nil), // 14: example.bookstore.v1.ListpublisherResponse - (*ApplypublisherRequest)(nil), // 15: example.bookstore.v1.ApplypublisherRequest - (*Book_Author)(nil), // 16: example.bookstore.v1.book.Author - (*fieldmaskpb.FieldMask)(nil), // 17: google.protobuf.FieldMask - (*emptypb.Empty)(nil), // 18: google.protobuf.Empty + (*Book)(nil), // 0: example.bookstore.v1.Book + (*CreateBookRequest)(nil), // 1: example.bookstore.v1.CreateBookRequest + (*GetBookRequest)(nil), // 2: example.bookstore.v1.GetBookRequest + (*UpdateBookRequest)(nil), // 3: example.bookstore.v1.UpdateBookRequest + (*DeleteBookRequest)(nil), // 4: example.bookstore.v1.DeleteBookRequest + (*ListBooksRequest)(nil), // 5: example.bookstore.v1.ListBooksRequest + (*ListBooksResponse)(nil), // 6: example.bookstore.v1.ListBooksResponse + (*ApplyBookRequest)(nil), // 7: example.bookstore.v1.ApplyBookRequest + (*BookEdition)(nil), // 8: example.bookstore.v1.BookEdition + (*CreateBookEditionRequest)(nil), // 9: example.bookstore.v1.CreateBookEditionRequest + (*GetBookEditionRequest)(nil), // 10: example.bookstore.v1.GetBookEditionRequest + (*DeleteBookEditionRequest)(nil), // 11: example.bookstore.v1.DeleteBookEditionRequest + (*ListBookEditionsRequest)(nil), // 12: example.bookstore.v1.ListBookEditionsRequest + (*ListBookEditionsResponse)(nil), // 13: example.bookstore.v1.ListBookEditionsResponse + (*Publisher)(nil), // 14: example.bookstore.v1.Publisher + (*CreatePublisherRequest)(nil), // 15: example.bookstore.v1.CreatePublisherRequest + (*GetPublisherRequest)(nil), // 16: example.bookstore.v1.GetPublisherRequest + (*UpdatePublisherRequest)(nil), // 17: example.bookstore.v1.UpdatePublisherRequest + (*DeletePublisherRequest)(nil), // 18: example.bookstore.v1.DeletePublisherRequest + (*ListPublishersRequest)(nil), // 19: example.bookstore.v1.ListPublishersRequest + (*ListPublishersResponse)(nil), // 20: example.bookstore.v1.ListPublishersResponse + (*ApplyPublisherRequest)(nil), // 21: example.bookstore.v1.ApplyPublisherRequest + (*Book_Author)(nil), // 22: example.bookstore.v1.Book.Author + (*fieldmaskpb.FieldMask)(nil), // 23: google.protobuf.FieldMask + (*emptypb.Empty)(nil), // 24: google.protobuf.Empty } var file_example_bookstore_v1_bookstore_proto_depIdxs = []int32{ - 16, // 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 - 17, // 3: example.bookstore.v1.UpdatebookRequest.update_mask:type_name -> google.protobuf.FieldMask - 0, // 4: example.bookstore.v1.ListbookResponse.results:type_name -> example.bookstore.v1.book - 0, // 5: example.bookstore.v1.ApplybookRequest.book:type_name -> example.bookstore.v1.book - 8, // 6: example.bookstore.v1.CreatepublisherRequest.publisher:type_name -> example.bookstore.v1.publisher - 8, // 7: example.bookstore.v1.UpdatepublisherRequest.publisher:type_name -> example.bookstore.v1.publisher - 17, // 8: example.bookstore.v1.UpdatepublisherRequest.update_mask:type_name -> google.protobuf.FieldMask - 8, // 9: example.bookstore.v1.ListpublisherResponse.results:type_name -> example.bookstore.v1.publisher - 8, // 10: example.bookstore.v1.ApplypublisherRequest.publisher:type_name -> example.bookstore.v1.publisher - 1, // 11: example.bookstore.v1.Bookstore.Createbook:input_type -> example.bookstore.v1.CreatebookRequest - 2, // 12: example.bookstore.v1.Bookstore.Getbook:input_type -> example.bookstore.v1.GetbookRequest - 3, // 13: example.bookstore.v1.Bookstore.Updatebook:input_type -> example.bookstore.v1.UpdatebookRequest - 4, // 14: example.bookstore.v1.Bookstore.Deletebook:input_type -> example.bookstore.v1.DeletebookRequest - 5, // 15: example.bookstore.v1.Bookstore.Listbook:input_type -> example.bookstore.v1.ListbookRequest - 7, // 16: example.bookstore.v1.Bookstore.Applybook:input_type -> example.bookstore.v1.ApplybookRequest - 9, // 17: example.bookstore.v1.Bookstore.Createpublisher:input_type -> example.bookstore.v1.CreatepublisherRequest - 10, // 18: example.bookstore.v1.Bookstore.Getpublisher:input_type -> example.bookstore.v1.GetpublisherRequest - 11, // 19: example.bookstore.v1.Bookstore.Updatepublisher:input_type -> example.bookstore.v1.UpdatepublisherRequest - 12, // 20: example.bookstore.v1.Bookstore.Deletepublisher:input_type -> example.bookstore.v1.DeletepublisherRequest - 13, // 21: example.bookstore.v1.Bookstore.Listpublisher:input_type -> example.bookstore.v1.ListpublisherRequest - 15, // 22: example.bookstore.v1.Bookstore.Applypublisher:input_type -> example.bookstore.v1.ApplypublisherRequest - 0, // 23: example.bookstore.v1.Bookstore.Createbook:output_type -> example.bookstore.v1.book - 0, // 24: example.bookstore.v1.Bookstore.Getbook:output_type -> example.bookstore.v1.book - 0, // 25: example.bookstore.v1.Bookstore.Updatebook:output_type -> example.bookstore.v1.book - 18, // 26: example.bookstore.v1.Bookstore.Deletebook:output_type -> google.protobuf.Empty - 6, // 27: example.bookstore.v1.Bookstore.Listbook:output_type -> example.bookstore.v1.ListbookResponse - 0, // 28: example.bookstore.v1.Bookstore.Applybook:output_type -> example.bookstore.v1.book - 8, // 29: example.bookstore.v1.Bookstore.Createpublisher:output_type -> example.bookstore.v1.publisher - 8, // 30: example.bookstore.v1.Bookstore.Getpublisher:output_type -> example.bookstore.v1.publisher - 8, // 31: example.bookstore.v1.Bookstore.Updatepublisher:output_type -> example.bookstore.v1.publisher - 18, // 32: example.bookstore.v1.Bookstore.Deletepublisher:output_type -> google.protobuf.Empty - 14, // 33: example.bookstore.v1.Bookstore.Listpublisher:output_type -> example.bookstore.v1.ListpublisherResponse - 8, // 34: example.bookstore.v1.Bookstore.Applypublisher:output_type -> example.bookstore.v1.publisher - 23, // [23:35] is the sub-list for method output_type - 11, // [11:23] is the sub-list for method input_type - 11, // [11:11] is the sub-list for extension type_name - 11, // [11:11] is the sub-list for extension extendee - 0, // [0:11] is the sub-list for field type_name + 22, // 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 + 23, // 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.ApplyBookRequest.book:type_name -> example.bookstore.v1.Book + 8, // 6: example.bookstore.v1.CreateBookEditionRequest.book_edition:type_name -> example.bookstore.v1.BookEdition + 8, // 7: example.bookstore.v1.ListBookEditionsResponse.results:type_name -> example.bookstore.v1.BookEdition + 14, // 8: example.bookstore.v1.CreatePublisherRequest.publisher:type_name -> example.bookstore.v1.Publisher + 14, // 9: example.bookstore.v1.UpdatePublisherRequest.publisher:type_name -> example.bookstore.v1.Publisher + 23, // 10: example.bookstore.v1.UpdatePublisherRequest.update_mask:type_name -> google.protobuf.FieldMask + 14, // 11: example.bookstore.v1.ListPublishersResponse.results:type_name -> example.bookstore.v1.Publisher + 14, // 12: example.bookstore.v1.ApplyPublisherRequest.publisher:type_name -> example.bookstore.v1.Publisher + 1, // 13: example.bookstore.v1.Bookstore.CreateBook:input_type -> example.bookstore.v1.CreateBookRequest + 2, // 14: example.bookstore.v1.Bookstore.GetBook:input_type -> example.bookstore.v1.GetBookRequest + 3, // 15: example.bookstore.v1.Bookstore.UpdateBook:input_type -> example.bookstore.v1.UpdateBookRequest + 4, // 16: example.bookstore.v1.Bookstore.DeleteBook:input_type -> example.bookstore.v1.DeleteBookRequest + 5, // 17: example.bookstore.v1.Bookstore.ListBooks:input_type -> example.bookstore.v1.ListBooksRequest + 7, // 18: example.bookstore.v1.Bookstore.ApplyBook:input_type -> example.bookstore.v1.ApplyBookRequest + 9, // 19: example.bookstore.v1.Bookstore.CreateBookEdition:input_type -> example.bookstore.v1.CreateBookEditionRequest + 10, // 20: example.bookstore.v1.Bookstore.GetBookEdition:input_type -> example.bookstore.v1.GetBookEditionRequest + 11, // 21: example.bookstore.v1.Bookstore.DeleteBookEdition:input_type -> example.bookstore.v1.DeleteBookEditionRequest + 12, // 22: example.bookstore.v1.Bookstore.ListBookEditions:input_type -> example.bookstore.v1.ListBookEditionsRequest + 15, // 23: example.bookstore.v1.Bookstore.CreatePublisher:input_type -> example.bookstore.v1.CreatePublisherRequest + 16, // 24: example.bookstore.v1.Bookstore.GetPublisher:input_type -> example.bookstore.v1.GetPublisherRequest + 17, // 25: example.bookstore.v1.Bookstore.UpdatePublisher:input_type -> example.bookstore.v1.UpdatePublisherRequest + 18, // 26: example.bookstore.v1.Bookstore.DeletePublisher:input_type -> example.bookstore.v1.DeletePublisherRequest + 19, // 27: example.bookstore.v1.Bookstore.ListPublishers:input_type -> example.bookstore.v1.ListPublishersRequest + 21, // 28: example.bookstore.v1.Bookstore.ApplyPublisher:input_type -> example.bookstore.v1.ApplyPublisherRequest + 0, // 29: example.bookstore.v1.Bookstore.CreateBook:output_type -> example.bookstore.v1.Book + 0, // 30: example.bookstore.v1.Bookstore.GetBook:output_type -> example.bookstore.v1.Book + 0, // 31: example.bookstore.v1.Bookstore.UpdateBook:output_type -> example.bookstore.v1.Book + 24, // 32: example.bookstore.v1.Bookstore.DeleteBook:output_type -> google.protobuf.Empty + 6, // 33: example.bookstore.v1.Bookstore.ListBooks:output_type -> example.bookstore.v1.ListBooksResponse + 0, // 34: example.bookstore.v1.Bookstore.ApplyBook:output_type -> example.bookstore.v1.Book + 8, // 35: example.bookstore.v1.Bookstore.CreateBookEdition:output_type -> example.bookstore.v1.BookEdition + 8, // 36: example.bookstore.v1.Bookstore.GetBookEdition:output_type -> example.bookstore.v1.BookEdition + 24, // 37: example.bookstore.v1.Bookstore.DeleteBookEdition:output_type -> google.protobuf.Empty + 13, // 38: example.bookstore.v1.Bookstore.ListBookEditions:output_type -> example.bookstore.v1.ListBookEditionsResponse + 14, // 39: example.bookstore.v1.Bookstore.CreatePublisher:output_type -> example.bookstore.v1.Publisher + 14, // 40: example.bookstore.v1.Bookstore.GetPublisher:output_type -> example.bookstore.v1.Publisher + 14, // 41: example.bookstore.v1.Bookstore.UpdatePublisher:output_type -> example.bookstore.v1.Publisher + 24, // 42: example.bookstore.v1.Bookstore.DeletePublisher:output_type -> google.protobuf.Empty + 20, // 43: example.bookstore.v1.Bookstore.ListPublishers:output_type -> example.bookstore.v1.ListPublishersResponse + 14, // 44: example.bookstore.v1.Bookstore.ApplyPublisher:output_type -> example.bookstore.v1.Publisher + 29, // [29:45] is the sub-list for method output_type + 13, // [13:29] is the sub-list for method input_type + 13, // [13:13] is the sub-list for extension type_name + 13, // [13:13] is the sub-list for extension extendee + 0, // [0:13] is the sub-list for field type_name } func init() { file_example_bookstore_v1_bookstore_proto_init() } @@ -1439,7 +1896,7 @@ func file_example_bookstore_v1_bookstore_proto_init() { } } file_example_bookstore_v1_bookstore_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreatebookRequest); i { + switch v := v.(*CreateBookRequest); i { case 0: return &v.state case 1: @@ -1451,7 +1908,7 @@ func file_example_bookstore_v1_bookstore_proto_init() { } } file_example_bookstore_v1_bookstore_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetbookRequest); i { + switch v := v.(*GetBookRequest); i { case 0: return &v.state case 1: @@ -1463,7 +1920,7 @@ func file_example_bookstore_v1_bookstore_proto_init() { } } file_example_bookstore_v1_bookstore_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdatebookRequest); i { + switch v := v.(*UpdateBookRequest); i { case 0: return &v.state case 1: @@ -1475,7 +1932,7 @@ func file_example_bookstore_v1_bookstore_proto_init() { } } file_example_bookstore_v1_bookstore_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeletebookRequest); i { + switch v := v.(*DeleteBookRequest); i { case 0: return &v.state case 1: @@ -1487,7 +1944,7 @@ func file_example_bookstore_v1_bookstore_proto_init() { } } file_example_bookstore_v1_bookstore_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListbookRequest); i { + switch v := v.(*ListBooksRequest); i { case 0: return &v.state case 1: @@ -1499,7 +1956,7 @@ func file_example_bookstore_v1_bookstore_proto_init() { } } file_example_bookstore_v1_bookstore_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListbookResponse); i { + switch v := v.(*ListBooksResponse); i { case 0: return &v.state case 1: @@ -1511,7 +1968,7 @@ func file_example_bookstore_v1_bookstore_proto_init() { } } file_example_bookstore_v1_bookstore_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ApplybookRequest); i { + switch v := v.(*ApplyBookRequest); i { case 0: return &v.state case 1: @@ -1523,7 +1980,7 @@ func file_example_bookstore_v1_bookstore_proto_init() { } } file_example_bookstore_v1_bookstore_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Publisher); i { + switch v := v.(*BookEdition); i { case 0: return &v.state case 1: @@ -1535,7 +1992,7 @@ func file_example_bookstore_v1_bookstore_proto_init() { } } file_example_bookstore_v1_bookstore_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreatepublisherRequest); i { + switch v := v.(*CreateBookEditionRequest); i { case 0: return &v.state case 1: @@ -1547,7 +2004,7 @@ func file_example_bookstore_v1_bookstore_proto_init() { } } file_example_bookstore_v1_bookstore_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetpublisherRequest); i { + switch v := v.(*GetBookEditionRequest); i { case 0: return &v.state case 1: @@ -1559,7 +2016,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.(*UpdatepublisherRequest); i { + switch v := v.(*DeleteBookEditionRequest); i { case 0: return &v.state case 1: @@ -1571,7 +2028,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.(*DeletepublisherRequest); i { + switch v := v.(*ListBookEditionsRequest); i { case 0: return &v.state case 1: @@ -1583,7 +2040,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.(*ListpublisherRequest); i { + switch v := v.(*ListBookEditionsResponse); i { case 0: return &v.state case 1: @@ -1595,7 +2052,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.(*ListpublisherResponse); i { + switch v := v.(*Publisher); i { case 0: return &v.state case 1: @@ -1607,7 +2064,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.(*ApplypublisherRequest); i { + switch v := v.(*CreatePublisherRequest); i { case 0: return &v.state case 1: @@ -1619,6 +2076,78 @@ 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.(*GetPublisherRequest); 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[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdatePublisherRequest); 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[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeletePublisherRequest); 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[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListPublishersRequest); 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[20].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[21].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[22].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Book_Author); i { case 0: return &v.state @@ -1637,7 +2166,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: 17, + NumMessages: 23, NumExtensions: 0, NumServices: 1, }, diff --git a/example/bookstore/v1/bookstore.pb.gw.go b/example/bookstore/v1/bookstore.pb.gw.go index 6641051..7ea66bf 100644 --- a/example/bookstore/v1/bookstore.pb.gw.go +++ b/example/bookstore/v1/bookstore.pb.gw.go @@ -32,11 +32,11 @@ var _ = utilities.NewDoubleArray var _ = metadata.Join var ( - filter_Bookstore_Createbook_0 = &utilities.DoubleArray{Encoding: map[string]int{"book": 0, "parent": 1}, Base: []int{1, 2, 4, 0, 0, 0, 0}, Check: []int{0, 1, 1, 2, 2, 3, 3}} + filter_Bookstore_CreateBook_0 = &utilities.DoubleArray{Encoding: map[string]int{"book": 0, "parent": 1}, Base: []int{1, 2, 4, 0, 0, 0, 0}, Check: []int{0, 1, 1, 2, 2, 3, 3}} ) -func request_Bookstore_Createbook_0(ctx context.Context, marshaler runtime.Marshaler, client BookstoreClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreatebookRequest +func request_Bookstore_CreateBook_0(ctx context.Context, marshaler runtime.Marshaler, client BookstoreClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateBookRequest var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -67,17 +67,17 @@ func request_Bookstore_Createbook_0(ctx context.Context, marshaler runtime.Marsh if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Bookstore_Createbook_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Bookstore_CreateBook_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.Createbook(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.CreateBook(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Bookstore_Createbook_0(ctx context.Context, marshaler runtime.Marshaler, server BookstoreServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreatebookRequest +func local_request_Bookstore_CreateBook_0(ctx context.Context, marshaler runtime.Marshaler, server BookstoreServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateBookRequest var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -108,17 +108,17 @@ func local_request_Bookstore_Createbook_0(ctx context.Context, marshaler runtime if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Bookstore_Createbook_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Bookstore_CreateBook_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.Createbook(ctx, &protoReq) + msg, err := server.CreateBook(ctx, &protoReq) return msg, metadata, err } -func request_Bookstore_Getbook_0(ctx context.Context, marshaler runtime.Marshaler, client BookstoreClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetbookRequest +func request_Bookstore_GetBook_0(ctx context.Context, marshaler runtime.Marshaler, client BookstoreClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetBookRequest var metadata runtime.ServerMetadata var ( @@ -138,13 +138,13 @@ func request_Bookstore_Getbook_0(ctx context.Context, marshaler runtime.Marshale return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "path", err) } - msg, err := client.Getbook(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.GetBook(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Bookstore_Getbook_0(ctx context.Context, marshaler runtime.Marshaler, server BookstoreServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetbookRequest +func local_request_Bookstore_GetBook_0(ctx context.Context, marshaler runtime.Marshaler, server BookstoreServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetBookRequest var metadata runtime.ServerMetadata var ( @@ -164,17 +164,17 @@ func local_request_Bookstore_Getbook_0(ctx context.Context, marshaler runtime.Ma return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "path", err) } - msg, err := server.Getbook(ctx, &protoReq) + msg, err := server.GetBook(ctx, &protoReq) return msg, metadata, err } var ( - filter_Bookstore_Updatebook_0 = &utilities.DoubleArray{Encoding: map[string]int{"book": 0, "path": 1}, Base: []int{1, 2, 4, 0, 0, 0, 0}, Check: []int{0, 1, 1, 2, 2, 3, 3}} + filter_Bookstore_UpdateBook_0 = &utilities.DoubleArray{Encoding: map[string]int{"book": 0, "path": 1}, Base: []int{1, 2, 4, 0, 0, 0, 0}, Check: []int{0, 1, 1, 2, 2, 3, 3}} ) -func request_Bookstore_Updatebook_0(ctx context.Context, marshaler runtime.Marshaler, client BookstoreClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdatebookRequest +func request_Bookstore_UpdateBook_0(ctx context.Context, marshaler runtime.Marshaler, client BookstoreClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateBookRequest var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -212,17 +212,17 @@ func request_Bookstore_Updatebook_0(ctx context.Context, marshaler runtime.Marsh if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Bookstore_Updatebook_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Bookstore_UpdateBook_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.Updatebook(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.UpdateBook(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Bookstore_Updatebook_0(ctx context.Context, marshaler runtime.Marshaler, server BookstoreServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdatebookRequest +func local_request_Bookstore_UpdateBook_0(ctx context.Context, marshaler runtime.Marshaler, server BookstoreServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateBookRequest var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -260,17 +260,17 @@ func local_request_Bookstore_Updatebook_0(ctx context.Context, marshaler runtime if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Bookstore_Updatebook_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Bookstore_UpdateBook_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.Updatebook(ctx, &protoReq) + msg, err := server.UpdateBook(ctx, &protoReq) return msg, metadata, err } -func request_Bookstore_Deletebook_0(ctx context.Context, marshaler runtime.Marshaler, client BookstoreClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeletebookRequest +func request_Bookstore_DeleteBook_0(ctx context.Context, marshaler runtime.Marshaler, client BookstoreClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteBookRequest var metadata runtime.ServerMetadata var ( @@ -290,13 +290,13 @@ func request_Bookstore_Deletebook_0(ctx context.Context, marshaler runtime.Marsh return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "path", err) } - msg, err := client.Deletebook(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.DeleteBook(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Bookstore_Deletebook_0(ctx context.Context, marshaler runtime.Marshaler, server BookstoreServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeletebookRequest +func local_request_Bookstore_DeleteBook_0(ctx context.Context, marshaler runtime.Marshaler, server BookstoreServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteBookRequest var metadata runtime.ServerMetadata var ( @@ -316,17 +316,17 @@ func local_request_Bookstore_Deletebook_0(ctx context.Context, marshaler runtime return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "path", err) } - msg, err := server.Deletebook(ctx, &protoReq) + msg, err := server.DeleteBook(ctx, &protoReq) return msg, metadata, err } var ( - filter_Bookstore_Listbook_0 = &utilities.DoubleArray{Encoding: map[string]int{"parent": 0}, Base: []int{1, 2, 0, 0}, Check: []int{0, 1, 2, 2}} + filter_Bookstore_ListBooks_0 = &utilities.DoubleArray{Encoding: map[string]int{"parent": 0}, Base: []int{1, 2, 0, 0}, Check: []int{0, 1, 2, 2}} ) -func request_Bookstore_Listbook_0(ctx context.Context, marshaler runtime.Marshaler, client BookstoreClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListbookRequest +func request_Bookstore_ListBooks_0(ctx context.Context, marshaler runtime.Marshaler, client BookstoreClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListBooksRequest var metadata runtime.ServerMetadata var ( @@ -349,17 +349,17 @@ func request_Bookstore_Listbook_0(ctx context.Context, marshaler runtime.Marshal if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Bookstore_Listbook_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Bookstore_ListBooks_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.Listbook(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.ListBooks(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Bookstore_Listbook_0(ctx context.Context, marshaler runtime.Marshaler, server BookstoreServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListbookRequest +func local_request_Bookstore_ListBooks_0(ctx context.Context, marshaler runtime.Marshaler, server BookstoreServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListBooksRequest var metadata runtime.ServerMetadata var ( @@ -382,17 +382,17 @@ func local_request_Bookstore_Listbook_0(ctx context.Context, marshaler runtime.M if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Bookstore_Listbook_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Bookstore_ListBooks_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.Listbook(ctx, &protoReq) + msg, err := server.ListBooks(ctx, &protoReq) return msg, metadata, err } -func request_Bookstore_Applybook_0(ctx context.Context, marshaler runtime.Marshaler, client BookstoreClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ApplybookRequest +func request_Bookstore_ApplyBook_0(ctx context.Context, marshaler runtime.Marshaler, client BookstoreClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ApplyBookRequest var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -420,13 +420,13 @@ func request_Bookstore_Applybook_0(ctx context.Context, marshaler runtime.Marsha return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "path", err) } - msg, err := client.Applybook(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.ApplyBook(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Bookstore_Applybook_0(ctx context.Context, marshaler runtime.Marshaler, server BookstoreServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ApplybookRequest +func local_request_Bookstore_ApplyBook_0(ctx context.Context, marshaler runtime.Marshaler, server BookstoreServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ApplyBookRequest var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -454,17 +454,277 @@ func local_request_Bookstore_Applybook_0(ctx context.Context, marshaler runtime. return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "path", err) } - msg, err := server.Applybook(ctx, &protoReq) + msg, err := server.ApplyBook(ctx, &protoReq) return msg, metadata, err } var ( - filter_Bookstore_Createpublisher_0 = &utilities.DoubleArray{Encoding: map[string]int{"publisher": 0, "parent": 1}, Base: []int{1, 2, 4, 0, 0, 0, 0}, Check: []int{0, 1, 1, 2, 2, 3, 3}} + filter_Bookstore_CreateBookEdition_0 = &utilities.DoubleArray{Encoding: map[string]int{"book_edition": 0, "bookEdition": 1, "parent": 2}, Base: []int{1, 1, 2, 4, 0, 0, 0, 0}, Check: []int{0, 1, 1, 1, 2, 3, 4, 4}} ) -func request_Bookstore_Createpublisher_0(ctx context.Context, marshaler runtime.Marshaler, client BookstoreClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreatepublisherRequest +func request_Bookstore_CreateBookEdition_0(ctx context.Context, marshaler runtime.Marshaler, client BookstoreClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateBookEditionRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.BookEdition); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["parent"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent") + } + + protoReq.Parent, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Bookstore_CreateBookEdition_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.CreateBookEdition(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Bookstore_CreateBookEdition_0(ctx context.Context, marshaler runtime.Marshaler, server BookstoreServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateBookEditionRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.BookEdition); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["parent"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent") + } + + protoReq.Parent, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Bookstore_CreateBookEdition_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.CreateBookEdition(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Bookstore_GetBookEdition_0(ctx context.Context, marshaler runtime.Marshaler, client BookstoreClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetBookEditionRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["path"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "path") + } + + protoReq.Path, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "path", err) + } + + msg, err := client.GetBookEdition(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Bookstore_GetBookEdition_0(ctx context.Context, marshaler runtime.Marshaler, server BookstoreServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetBookEditionRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["path"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "path") + } + + protoReq.Path, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "path", err) + } + + msg, err := server.GetBookEdition(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Bookstore_DeleteBookEdition_0(ctx context.Context, marshaler runtime.Marshaler, client BookstoreClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteBookEditionRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["path"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "path") + } + + protoReq.Path, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "path", err) + } + + msg, err := client.DeleteBookEdition(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Bookstore_DeleteBookEdition_0(ctx context.Context, marshaler runtime.Marshaler, server BookstoreServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteBookEditionRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["path"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "path") + } + + protoReq.Path, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "path", err) + } + + msg, err := server.DeleteBookEdition(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Bookstore_ListBookEditions_0 = &utilities.DoubleArray{Encoding: map[string]int{"parent": 0}, Base: []int{1, 2, 0, 0}, Check: []int{0, 1, 2, 2}} +) + +func request_Bookstore_ListBookEditions_0(ctx context.Context, marshaler runtime.Marshaler, client BookstoreClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListBookEditionsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["parent"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent") + } + + protoReq.Parent, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Bookstore_ListBookEditions_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ListBookEditions(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Bookstore_ListBookEditions_0(ctx context.Context, marshaler runtime.Marshaler, server BookstoreServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListBookEditionsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["parent"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent") + } + + protoReq.Parent, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Bookstore_ListBookEditions_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ListBookEditions(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Bookstore_CreatePublisher_0 = &utilities.DoubleArray{Encoding: map[string]int{"publisher": 0, "parent": 1}, Base: []int{1, 2, 4, 0, 0, 0, 0}, Check: []int{0, 1, 1, 2, 2, 3, 3}} +) + +func request_Bookstore_CreatePublisher_0(ctx context.Context, marshaler runtime.Marshaler, client BookstoreClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreatePublisherRequest var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -495,17 +755,17 @@ func request_Bookstore_Createpublisher_0(ctx context.Context, marshaler runtime. if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Bookstore_Createpublisher_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Bookstore_CreatePublisher_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.Createpublisher(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.CreatePublisher(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Bookstore_Createpublisher_0(ctx context.Context, marshaler runtime.Marshaler, server BookstoreServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreatepublisherRequest +func local_request_Bookstore_CreatePublisher_0(ctx context.Context, marshaler runtime.Marshaler, server BookstoreServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreatePublisherRequest var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -536,17 +796,17 @@ func local_request_Bookstore_Createpublisher_0(ctx context.Context, marshaler ru if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Bookstore_Createpublisher_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Bookstore_CreatePublisher_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.Createpublisher(ctx, &protoReq) + msg, err := server.CreatePublisher(ctx, &protoReq) return msg, metadata, err } -func request_Bookstore_Getpublisher_0(ctx context.Context, marshaler runtime.Marshaler, client BookstoreClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetpublisherRequest +func request_Bookstore_GetPublisher_0(ctx context.Context, marshaler runtime.Marshaler, client BookstoreClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetPublisherRequest var metadata runtime.ServerMetadata var ( @@ -566,13 +826,13 @@ func request_Bookstore_Getpublisher_0(ctx context.Context, marshaler runtime.Mar return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "path", err) } - msg, err := client.Getpublisher(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.GetPublisher(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Bookstore_Getpublisher_0(ctx context.Context, marshaler runtime.Marshaler, server BookstoreServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetpublisherRequest +func local_request_Bookstore_GetPublisher_0(ctx context.Context, marshaler runtime.Marshaler, server BookstoreServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetPublisherRequest var metadata runtime.ServerMetadata var ( @@ -592,17 +852,17 @@ func local_request_Bookstore_Getpublisher_0(ctx context.Context, marshaler runti return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "path", err) } - msg, err := server.Getpublisher(ctx, &protoReq) + msg, err := server.GetPublisher(ctx, &protoReq) return msg, metadata, err } var ( - filter_Bookstore_Updatepublisher_0 = &utilities.DoubleArray{Encoding: map[string]int{"publisher": 0, "path": 1}, Base: []int{1, 2, 4, 0, 0, 0, 0}, Check: []int{0, 1, 1, 2, 2, 3, 3}} + filter_Bookstore_UpdatePublisher_0 = &utilities.DoubleArray{Encoding: map[string]int{"publisher": 0, "path": 1}, Base: []int{1, 2, 4, 0, 0, 0, 0}, Check: []int{0, 1, 1, 2, 2, 3, 3}} ) -func request_Bookstore_Updatepublisher_0(ctx context.Context, marshaler runtime.Marshaler, client BookstoreClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdatepublisherRequest +func request_Bookstore_UpdatePublisher_0(ctx context.Context, marshaler runtime.Marshaler, client BookstoreClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdatePublisherRequest var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -640,17 +900,17 @@ func request_Bookstore_Updatepublisher_0(ctx context.Context, marshaler runtime. if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Bookstore_Updatepublisher_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Bookstore_UpdatePublisher_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.Updatepublisher(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.UpdatePublisher(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Bookstore_Updatepublisher_0(ctx context.Context, marshaler runtime.Marshaler, server BookstoreServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdatepublisherRequest +func local_request_Bookstore_UpdatePublisher_0(ctx context.Context, marshaler runtime.Marshaler, server BookstoreServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdatePublisherRequest var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -688,17 +948,17 @@ func local_request_Bookstore_Updatepublisher_0(ctx context.Context, marshaler ru if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Bookstore_Updatepublisher_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Bookstore_UpdatePublisher_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.Updatepublisher(ctx, &protoReq) + msg, err := server.UpdatePublisher(ctx, &protoReq) return msg, metadata, err } -func request_Bookstore_Deletepublisher_0(ctx context.Context, marshaler runtime.Marshaler, client BookstoreClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeletepublisherRequest +func request_Bookstore_DeletePublisher_0(ctx context.Context, marshaler runtime.Marshaler, client BookstoreClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeletePublisherRequest var metadata runtime.ServerMetadata var ( @@ -718,13 +978,13 @@ func request_Bookstore_Deletepublisher_0(ctx context.Context, marshaler runtime. return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "path", err) } - msg, err := client.Deletepublisher(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.DeletePublisher(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Bookstore_Deletepublisher_0(ctx context.Context, marshaler runtime.Marshaler, server BookstoreServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeletepublisherRequest +func local_request_Bookstore_DeletePublisher_0(ctx context.Context, marshaler runtime.Marshaler, server BookstoreServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeletePublisherRequest var metadata runtime.ServerMetadata var ( @@ -744,17 +1004,17 @@ func local_request_Bookstore_Deletepublisher_0(ctx context.Context, marshaler ru return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "path", err) } - msg, err := server.Deletepublisher(ctx, &protoReq) + msg, err := server.DeletePublisher(ctx, &protoReq) return msg, metadata, err } var ( - filter_Bookstore_Listpublisher_0 = &utilities.DoubleArray{Encoding: map[string]int{"parent": 0}, Base: []int{1, 2, 0, 0}, Check: []int{0, 1, 2, 2}} + filter_Bookstore_ListPublishers_0 = &utilities.DoubleArray{Encoding: map[string]int{"parent": 0}, Base: []int{1, 2, 0, 0}, Check: []int{0, 1, 2, 2}} ) -func request_Bookstore_Listpublisher_0(ctx context.Context, marshaler runtime.Marshaler, client BookstoreClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListpublisherRequest +func request_Bookstore_ListPublishers_0(ctx context.Context, marshaler runtime.Marshaler, client BookstoreClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListPublishersRequest var metadata runtime.ServerMetadata var ( @@ -777,17 +1037,17 @@ func request_Bookstore_Listpublisher_0(ctx context.Context, marshaler runtime.Ma if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Bookstore_Listpublisher_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Bookstore_ListPublishers_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.Listpublisher(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.ListPublishers(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Bookstore_Listpublisher_0(ctx context.Context, marshaler runtime.Marshaler, server BookstoreServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListpublisherRequest +func local_request_Bookstore_ListPublishers_0(ctx context.Context, marshaler runtime.Marshaler, server BookstoreServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListPublishersRequest var metadata runtime.ServerMetadata var ( @@ -810,17 +1070,17 @@ func local_request_Bookstore_Listpublisher_0(ctx context.Context, marshaler runt if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Bookstore_Listpublisher_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Bookstore_ListPublishers_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.Listpublisher(ctx, &protoReq) + msg, err := server.ListPublishers(ctx, &protoReq) return msg, metadata, err } -func request_Bookstore_Applypublisher_0(ctx context.Context, marshaler runtime.Marshaler, client BookstoreClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ApplypublisherRequest +func request_Bookstore_ApplyPublisher_0(ctx context.Context, marshaler runtime.Marshaler, client BookstoreClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ApplyPublisherRequest var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -848,13 +1108,13 @@ func request_Bookstore_Applypublisher_0(ctx context.Context, marshaler runtime.M return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "path", err) } - msg, err := client.Applypublisher(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.ApplyPublisher(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Bookstore_Applypublisher_0(ctx context.Context, marshaler runtime.Marshaler, server BookstoreServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ApplypublisherRequest +func local_request_Bookstore_ApplyPublisher_0(ctx context.Context, marshaler runtime.Marshaler, server BookstoreServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ApplyPublisherRequest var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -882,7 +1142,7 @@ func local_request_Bookstore_Applypublisher_0(ctx context.Context, marshaler run return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "path", err) } - msg, err := server.Applypublisher(ctx, &protoReq) + msg, err := server.ApplyPublisher(ctx, &protoReq) return msg, metadata, err } @@ -893,7 +1153,107 @@ func local_request_Bookstore_Applypublisher_0(ctx context.Context, marshaler run // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterBookstoreHandlerFromEndpoint instead. func RegisterBookstoreHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BookstoreServer) error { - mux.Handle("POST", pattern_Bookstore_Createbook_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_Bookstore_CreateBook_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/CreateBook", runtime.WithHTTPPathPattern("/{parent=publishers/*}/books")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Bookstore_CreateBook_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Bookstore_CreateBook_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Bookstore_GetBook_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/GetBook", runtime.WithHTTPPathPattern("/{path=publishers/*/books/*}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Bookstore_GetBook_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Bookstore_GetBook_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PATCH", pattern_Bookstore_UpdateBook_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/UpdateBook", runtime.WithHTTPPathPattern("/{path=publishers/*/books/*}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Bookstore_UpdateBook_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Bookstore_UpdateBook_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_Bookstore_DeleteBook_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/DeleteBook", runtime.WithHTTPPathPattern("/{path=publishers/*/books/*}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Bookstore_DeleteBook_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Bookstore_DeleteBook_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Bookstore_ListBooks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -901,12 +1261,12 @@ func RegisterBookstoreHandlerServer(ctx context.Context, mux *runtime.ServeMux, inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/Createbook", runtime.WithHTTPPathPattern("/{parent=publishers/*}/books")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/ListBooks", runtime.WithHTTPPathPattern("/{parent=publishers/*}/books")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Bookstore_Createbook_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Bookstore_ListBooks_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -914,11 +1274,11 @@ func RegisterBookstoreHandlerServer(ctx context.Context, mux *runtime.ServeMux, return } - forward_Bookstore_Createbook_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Bookstore_ListBooks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Bookstore_Getbook_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("PUT", pattern_Bookstore_ApplyBook_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -926,12 +1286,12 @@ func RegisterBookstoreHandlerServer(ctx context.Context, mux *runtime.ServeMux, inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/Getbook", runtime.WithHTTPPathPattern("/{path=publishers/*/books/*}")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/ApplyBook", runtime.WithHTTPPathPattern("/{path=publishers/*/books/*}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Bookstore_Getbook_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Bookstore_ApplyBook_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -939,11 +1299,11 @@ func RegisterBookstoreHandlerServer(ctx context.Context, mux *runtime.ServeMux, return } - forward_Bookstore_Getbook_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Bookstore_ApplyBook_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("PATCH", pattern_Bookstore_Updatebook_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_Bookstore_CreateBookEdition_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -951,12 +1311,12 @@ func RegisterBookstoreHandlerServer(ctx context.Context, mux *runtime.ServeMux, inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/Updatebook", runtime.WithHTTPPathPattern("/{path=publishers/*/books/*}")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/CreateBookEdition", runtime.WithHTTPPathPattern("/{parent=publishers/*/books/*}/editions")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Bookstore_Updatebook_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Bookstore_CreateBookEdition_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -964,11 +1324,11 @@ func RegisterBookstoreHandlerServer(ctx context.Context, mux *runtime.ServeMux, return } - forward_Bookstore_Updatebook_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Bookstore_CreateBookEdition_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("DELETE", pattern_Bookstore_Deletebook_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Bookstore_GetBookEdition_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -976,12 +1336,12 @@ func RegisterBookstoreHandlerServer(ctx context.Context, mux *runtime.ServeMux, inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/Deletebook", runtime.WithHTTPPathPattern("/{path=publishers/*/books/*}")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/GetBookEdition", runtime.WithHTTPPathPattern("/{path=publishers/*/books/*/editions/*}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Bookstore_Deletebook_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Bookstore_GetBookEdition_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -989,11 +1349,11 @@ func RegisterBookstoreHandlerServer(ctx context.Context, mux *runtime.ServeMux, return } - forward_Bookstore_Deletebook_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Bookstore_GetBookEdition_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Bookstore_Listbook_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("DELETE", pattern_Bookstore_DeleteBookEdition_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -1001,12 +1361,12 @@ func RegisterBookstoreHandlerServer(ctx context.Context, mux *runtime.ServeMux, inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/Listbook", runtime.WithHTTPPathPattern("/{parent=publishers/*}/books")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/DeleteBookEdition", runtime.WithHTTPPathPattern("/{path=publishers/*/books/*/editions/*}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Bookstore_Listbook_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Bookstore_DeleteBookEdition_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -1014,11 +1374,11 @@ func RegisterBookstoreHandlerServer(ctx context.Context, mux *runtime.ServeMux, return } - forward_Bookstore_Listbook_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Bookstore_DeleteBookEdition_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("PUT", pattern_Bookstore_Applybook_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Bookstore_ListBookEditions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -1026,12 +1386,12 @@ func RegisterBookstoreHandlerServer(ctx context.Context, mux *runtime.ServeMux, inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/Applybook", runtime.WithHTTPPathPattern("/{path=publishers/*/books/*}")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/ListBookEditions", runtime.WithHTTPPathPattern("/{parent=publishers/*/books/*}/editions")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Bookstore_Applybook_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Bookstore_ListBookEditions_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -1039,11 +1399,11 @@ func RegisterBookstoreHandlerServer(ctx context.Context, mux *runtime.ServeMux, return } - forward_Bookstore_Applybook_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Bookstore_ListBookEditions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Bookstore_Createpublisher_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_Bookstore_CreatePublisher_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -1051,12 +1411,12 @@ func RegisterBookstoreHandlerServer(ctx context.Context, mux *runtime.ServeMux, inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/Createpublisher", runtime.WithHTTPPathPattern("/{parent=publishers}")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/CreatePublisher", runtime.WithHTTPPathPattern("/{parent=publishers}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Bookstore_Createpublisher_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Bookstore_CreatePublisher_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -1064,11 +1424,11 @@ func RegisterBookstoreHandlerServer(ctx context.Context, mux *runtime.ServeMux, return } - forward_Bookstore_Createpublisher_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Bookstore_CreatePublisher_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Bookstore_Getpublisher_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Bookstore_GetPublisher_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -1076,12 +1436,12 @@ func RegisterBookstoreHandlerServer(ctx context.Context, mux *runtime.ServeMux, inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/Getpublisher", runtime.WithHTTPPathPattern("/{path=publishers/*}")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/GetPublisher", runtime.WithHTTPPathPattern("/{path=publishers/*}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Bookstore_Getpublisher_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Bookstore_GetPublisher_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -1089,11 +1449,11 @@ func RegisterBookstoreHandlerServer(ctx context.Context, mux *runtime.ServeMux, return } - forward_Bookstore_Getpublisher_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Bookstore_GetPublisher_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("PATCH", pattern_Bookstore_Updatepublisher_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("PATCH", pattern_Bookstore_UpdatePublisher_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -1101,12 +1461,12 @@ func RegisterBookstoreHandlerServer(ctx context.Context, mux *runtime.ServeMux, inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/Updatepublisher", runtime.WithHTTPPathPattern("/{path=publishers/*}")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/UpdatePublisher", runtime.WithHTTPPathPattern("/{path=publishers/*}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Bookstore_Updatepublisher_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Bookstore_UpdatePublisher_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -1114,11 +1474,11 @@ func RegisterBookstoreHandlerServer(ctx context.Context, mux *runtime.ServeMux, return } - forward_Bookstore_Updatepublisher_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Bookstore_UpdatePublisher_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("DELETE", pattern_Bookstore_Deletepublisher_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("DELETE", pattern_Bookstore_DeletePublisher_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -1126,12 +1486,12 @@ func RegisterBookstoreHandlerServer(ctx context.Context, mux *runtime.ServeMux, inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/Deletepublisher", runtime.WithHTTPPathPattern("/{path=publishers/*}")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/DeletePublisher", runtime.WithHTTPPathPattern("/{path=publishers/*}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Bookstore_Deletepublisher_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Bookstore_DeletePublisher_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -1139,11 +1499,11 @@ func RegisterBookstoreHandlerServer(ctx context.Context, mux *runtime.ServeMux, return } - forward_Bookstore_Deletepublisher_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Bookstore_DeletePublisher_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Bookstore_Listpublisher_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Bookstore_ListPublishers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -1151,12 +1511,12 @@ func RegisterBookstoreHandlerServer(ctx context.Context, mux *runtime.ServeMux, inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/Listpublisher", runtime.WithHTTPPathPattern("/{parent=publishers}")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/ListPublishers", runtime.WithHTTPPathPattern("/{parent=publishers}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Bookstore_Listpublisher_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Bookstore_ListPublishers_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -1164,11 +1524,11 @@ func RegisterBookstoreHandlerServer(ctx context.Context, mux *runtime.ServeMux, return } - forward_Bookstore_Listpublisher_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Bookstore_ListPublishers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("PUT", pattern_Bookstore_Applypublisher_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("PUT", pattern_Bookstore_ApplyPublisher_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -1176,12 +1536,12 @@ func RegisterBookstoreHandlerServer(ctx context.Context, mux *runtime.ServeMux, inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/Applypublisher", runtime.WithHTTPPathPattern("/{path=publishers/*}")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/ApplyPublisher", runtime.WithHTTPPathPattern("/{path=publishers/*}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Bookstore_Applypublisher_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Bookstore_ApplyPublisher_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -1189,7 +1549,7 @@ func RegisterBookstoreHandlerServer(ctx context.Context, mux *runtime.ServeMux, return } - forward_Bookstore_Applypublisher_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Bookstore_ApplyPublisher_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1234,267 +1594,355 @@ func RegisterBookstoreHandler(ctx context.Context, mux *runtime.ServeMux, conn * // "BookstoreClient" to call the correct interceptors. func RegisterBookstoreHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BookstoreClient) error { - mux.Handle("POST", pattern_Bookstore_Createbook_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_Bookstore_CreateBook_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/CreateBook", runtime.WithHTTPPathPattern("/{parent=publishers/*}/books")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Bookstore_CreateBook_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Bookstore_CreateBook_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Bookstore_GetBook_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/GetBook", runtime.WithHTTPPathPattern("/{path=publishers/*/books/*}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Bookstore_GetBook_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Bookstore_GetBook_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PATCH", pattern_Bookstore_UpdateBook_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/Createbook", runtime.WithHTTPPathPattern("/{parent=publishers/*}/books")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/UpdateBook", runtime.WithHTTPPathPattern("/{path=publishers/*/books/*}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Bookstore_Createbook_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Bookstore_UpdateBook_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Bookstore_Createbook_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Bookstore_UpdateBook_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Bookstore_Getbook_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("DELETE", pattern_Bookstore_DeleteBook_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/Getbook", runtime.WithHTTPPathPattern("/{path=publishers/*/books/*}")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/DeleteBook", runtime.WithHTTPPathPattern("/{path=publishers/*/books/*}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Bookstore_Getbook_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Bookstore_DeleteBook_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Bookstore_Getbook_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Bookstore_DeleteBook_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("PATCH", pattern_Bookstore_Updatebook_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Bookstore_ListBooks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/Updatebook", runtime.WithHTTPPathPattern("/{path=publishers/*/books/*}")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/ListBooks", runtime.WithHTTPPathPattern("/{parent=publishers/*}/books")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Bookstore_Updatebook_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Bookstore_ListBooks_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Bookstore_Updatebook_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Bookstore_ListBooks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("DELETE", pattern_Bookstore_Deletebook_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("PUT", pattern_Bookstore_ApplyBook_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/Deletebook", runtime.WithHTTPPathPattern("/{path=publishers/*/books/*}")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/ApplyBook", runtime.WithHTTPPathPattern("/{path=publishers/*/books/*}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Bookstore_Deletebook_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Bookstore_ApplyBook_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Bookstore_Deletebook_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Bookstore_ApplyBook_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Bookstore_Listbook_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_Bookstore_CreateBookEdition_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/Listbook", runtime.WithHTTPPathPattern("/{parent=publishers/*}/books")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/CreateBookEdition", runtime.WithHTTPPathPattern("/{parent=publishers/*/books/*}/editions")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Bookstore_Listbook_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Bookstore_CreateBookEdition_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Bookstore_Listbook_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Bookstore_CreateBookEdition_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("PUT", pattern_Bookstore_Applybook_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Bookstore_GetBookEdition_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/Applybook", runtime.WithHTTPPathPattern("/{path=publishers/*/books/*}")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/GetBookEdition", runtime.WithHTTPPathPattern("/{path=publishers/*/books/*/editions/*}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Bookstore_Applybook_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Bookstore_GetBookEdition_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Bookstore_Applybook_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Bookstore_GetBookEdition_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Bookstore_Createpublisher_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("DELETE", pattern_Bookstore_DeleteBookEdition_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/Createpublisher", runtime.WithHTTPPathPattern("/{parent=publishers}")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/DeleteBookEdition", runtime.WithHTTPPathPattern("/{path=publishers/*/books/*/editions/*}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Bookstore_Createpublisher_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Bookstore_DeleteBookEdition_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Bookstore_Createpublisher_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Bookstore_DeleteBookEdition_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Bookstore_Getpublisher_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Bookstore_ListBookEditions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/Getpublisher", runtime.WithHTTPPathPattern("/{path=publishers/*}")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/ListBookEditions", runtime.WithHTTPPathPattern("/{parent=publishers/*/books/*}/editions")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Bookstore_Getpublisher_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Bookstore_ListBookEditions_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Bookstore_Getpublisher_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Bookstore_ListBookEditions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("PATCH", pattern_Bookstore_Updatepublisher_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_Bookstore_CreatePublisher_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/Updatepublisher", runtime.WithHTTPPathPattern("/{path=publishers/*}")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/CreatePublisher", runtime.WithHTTPPathPattern("/{parent=publishers}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Bookstore_Updatepublisher_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Bookstore_CreatePublisher_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Bookstore_Updatepublisher_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Bookstore_CreatePublisher_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("DELETE", pattern_Bookstore_Deletepublisher_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Bookstore_GetPublisher_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/Deletepublisher", runtime.WithHTTPPathPattern("/{path=publishers/*}")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/GetPublisher", runtime.WithHTTPPathPattern("/{path=publishers/*}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Bookstore_Deletepublisher_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Bookstore_GetPublisher_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Bookstore_Deletepublisher_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Bookstore_GetPublisher_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Bookstore_Listpublisher_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("PATCH", pattern_Bookstore_UpdatePublisher_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/Listpublisher", runtime.WithHTTPPathPattern("/{parent=publishers}")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/UpdatePublisher", runtime.WithHTTPPathPattern("/{path=publishers/*}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Bookstore_Listpublisher_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Bookstore_UpdatePublisher_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Bookstore_Listpublisher_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Bookstore_UpdatePublisher_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("PUT", pattern_Bookstore_Applypublisher_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("DELETE", pattern_Bookstore_DeletePublisher_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/Applypublisher", runtime.WithHTTPPathPattern("/{path=publishers/*}")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/DeletePublisher", runtime.WithHTTPPathPattern("/{path=publishers/*}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Bookstore_Applypublisher_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Bookstore_DeletePublisher_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Bookstore_Applypublisher_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Bookstore_DeletePublisher_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Bookstore_ListPublishers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/ListPublishers", runtime.WithHTTPPathPattern("/{parent=publishers}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Bookstore_ListPublishers_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Bookstore_ListPublishers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_Bookstore_ApplyPublisher_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/example.bookstore.v1.Bookstore/ApplyPublisher", runtime.WithHTTPPathPattern("/{path=publishers/*}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Bookstore_ApplyPublisher_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Bookstore_ApplyPublisher_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1502,53 +1950,69 @@ func RegisterBookstoreHandlerClient(ctx context.Context, mux *runtime.ServeMux, } var ( - pattern_Bookstore_Createbook_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 2, 5, 1, 2, 2}, []string{"publishers", "parent", "books"}, "")) + pattern_Bookstore_CreateBook_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 2, 5, 1, 2, 2}, []string{"publishers", "parent", "books"}, "")) + + pattern_Bookstore_GetBook_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 2, 1, 1, 0, 4, 4, 5, 2}, []string{"publishers", "books", "path"}, "")) + + pattern_Bookstore_UpdateBook_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 2, 1, 1, 0, 4, 4, 5, 2}, []string{"publishers", "books", "path"}, "")) - pattern_Bookstore_Getbook_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 2, 1, 1, 0, 4, 4, 5, 2}, []string{"publishers", "books", "path"}, "")) + pattern_Bookstore_DeleteBook_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 2, 1, 1, 0, 4, 4, 5, 2}, []string{"publishers", "books", "path"}, "")) - pattern_Bookstore_Updatebook_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 2, 1, 1, 0, 4, 4, 5, 2}, []string{"publishers", "books", "path"}, "")) + pattern_Bookstore_ListBooks_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 2, 5, 1, 2, 2}, []string{"publishers", "parent", "books"}, "")) - pattern_Bookstore_Deletebook_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 2, 1, 1, 0, 4, 4, 5, 2}, []string{"publishers", "books", "path"}, "")) + pattern_Bookstore_ApplyBook_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 2, 1, 1, 0, 4, 4, 5, 2}, []string{"publishers", "books", "path"}, "")) - pattern_Bookstore_Listbook_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 2, 5, 1, 2, 2}, []string{"publishers", "parent", "books"}, "")) + pattern_Bookstore_CreateBookEdition_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 2, 1, 1, 0, 4, 4, 5, 2, 2, 3}, []string{"publishers", "books", "parent", "editions"}, "")) - pattern_Bookstore_Applybook_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 2, 1, 1, 0, 4, 4, 5, 2}, []string{"publishers", "books", "path"}, "")) + pattern_Bookstore_GetBookEdition_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 6, 5, 3}, []string{"publishers", "books", "editions", "path"}, "")) - pattern_Bookstore_Createpublisher_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 4, 1, 5, 1}, []string{"publishers", "parent"}, "")) + pattern_Bookstore_DeleteBookEdition_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 6, 5, 3}, []string{"publishers", "books", "editions", "path"}, "")) - pattern_Bookstore_Getpublisher_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 2, 5, 1}, []string{"publishers", "path"}, "")) + pattern_Bookstore_ListBookEditions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 2, 1, 1, 0, 4, 4, 5, 2, 2, 3}, []string{"publishers", "books", "parent", "editions"}, "")) - pattern_Bookstore_Updatepublisher_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 2, 5, 1}, []string{"publishers", "path"}, "")) + pattern_Bookstore_CreatePublisher_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 4, 1, 5, 1}, []string{"publishers", "parent"}, "")) - pattern_Bookstore_Deletepublisher_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 2, 5, 1}, []string{"publishers", "path"}, "")) + pattern_Bookstore_GetPublisher_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 2, 5, 1}, []string{"publishers", "path"}, "")) - pattern_Bookstore_Listpublisher_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 4, 1, 5, 1}, []string{"publishers", "parent"}, "")) + pattern_Bookstore_UpdatePublisher_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 2, 5, 1}, []string{"publishers", "path"}, "")) - pattern_Bookstore_Applypublisher_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 2, 5, 1}, []string{"publishers", "path"}, "")) + pattern_Bookstore_DeletePublisher_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 2, 5, 1}, []string{"publishers", "path"}, "")) + + pattern_Bookstore_ListPublishers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 4, 1, 5, 1}, []string{"publishers", "parent"}, "")) + + pattern_Bookstore_ApplyPublisher_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 2, 5, 1}, []string{"publishers", "path"}, "")) ) var ( - forward_Bookstore_Createbook_0 = runtime.ForwardResponseMessage + forward_Bookstore_CreateBook_0 = runtime.ForwardResponseMessage + + forward_Bookstore_GetBook_0 = runtime.ForwardResponseMessage + + forward_Bookstore_UpdateBook_0 = runtime.ForwardResponseMessage + + forward_Bookstore_DeleteBook_0 = runtime.ForwardResponseMessage + + forward_Bookstore_ListBooks_0 = runtime.ForwardResponseMessage - forward_Bookstore_Getbook_0 = runtime.ForwardResponseMessage + forward_Bookstore_ApplyBook_0 = runtime.ForwardResponseMessage - forward_Bookstore_Updatebook_0 = runtime.ForwardResponseMessage + forward_Bookstore_CreateBookEdition_0 = runtime.ForwardResponseMessage - forward_Bookstore_Deletebook_0 = runtime.ForwardResponseMessage + forward_Bookstore_GetBookEdition_0 = runtime.ForwardResponseMessage - forward_Bookstore_Listbook_0 = runtime.ForwardResponseMessage + forward_Bookstore_DeleteBookEdition_0 = runtime.ForwardResponseMessage - forward_Bookstore_Applybook_0 = runtime.ForwardResponseMessage + forward_Bookstore_ListBookEditions_0 = runtime.ForwardResponseMessage - forward_Bookstore_Createpublisher_0 = runtime.ForwardResponseMessage + forward_Bookstore_CreatePublisher_0 = runtime.ForwardResponseMessage - forward_Bookstore_Getpublisher_0 = runtime.ForwardResponseMessage + forward_Bookstore_GetPublisher_0 = runtime.ForwardResponseMessage - forward_Bookstore_Updatepublisher_0 = runtime.ForwardResponseMessage + forward_Bookstore_UpdatePublisher_0 = runtime.ForwardResponseMessage - forward_Bookstore_Deletepublisher_0 = runtime.ForwardResponseMessage + forward_Bookstore_DeletePublisher_0 = runtime.ForwardResponseMessage - forward_Bookstore_Listpublisher_0 = runtime.ForwardResponseMessage + forward_Bookstore_ListPublishers_0 = runtime.ForwardResponseMessage - forward_Bookstore_Applypublisher_0 = runtime.ForwardResponseMessage + forward_Bookstore_ApplyPublisher_0 = runtime.ForwardResponseMessage ) diff --git a/example/bookstore/v1/bookstore.proto b/example/bookstore/v1/bookstore.proto index da0fbef..a844eed 100644 --- a/example/bookstore/v1/bookstore.proto +++ b/example/bookstore/v1/bookstore.proto @@ -19,7 +19,7 @@ option go_package = "/bookstore"; // A service. service Bookstore { // An aep-compliant Create method for book. - rpc Createbook ( CreatebookRequest ) returns ( book ) { + rpc CreateBook ( CreateBookRequest ) returns ( Book ) { option (google.api.http) = { post: "/{parent=publishers/*}/books", body: "book" @@ -29,14 +29,14 @@ service Bookstore { } // An aep-compliant Get method for book. - rpc Getbook ( GetbookRequest ) returns ( book ) { + rpc GetBook ( GetBookRequest ) returns ( Book ) { option (google.api.http) = { get: "/{path=publishers/*/books/*}" }; option (google.api.method_signature) = "path"; } // An aep-compliant Update method for book. - rpc Updatebook ( UpdatebookRequest ) returns ( book ) { + rpc UpdateBook ( UpdateBookRequest ) returns ( Book ) { option (google.api.http) = { patch: "/{path=publishers/*/books/*}", body: "book" @@ -46,29 +46,62 @@ service Bookstore { } // An aep-compliant Delete method for book. - rpc Deletebook ( DeletebookRequest ) returns ( google.protobuf.Empty ) { + rpc DeleteBook ( DeleteBookRequest ) returns ( google.protobuf.Empty ) { option (google.api.http) = { delete: "/{path=publishers/*/books/*}" }; option (google.api.method_signature) = "path"; } // An aep-compliant List method for books. - rpc Listbook ( ListbookRequest ) returns ( ListbookResponse ) { + rpc ListBooks ( ListBooksRequest ) returns ( ListBooksResponse ) { option (google.api.http) = { get: "/{parent=publishers/*}/books" }; option (google.api.method_signature) = "parent"; } // An aep-compliant Apply method for books. - rpc Applybook ( ApplybookRequest ) returns ( book ) { + rpc ApplyBook ( ApplyBookRequest ) returns ( Book ) { option (google.api.http) = { put: "/{path=publishers/*/books/*}", body: "book" }; } + // An aep-compliant Create method for book-edition. + rpc CreateBookEdition ( CreateBookEditionRequest ) returns ( BookEdition ) { + option (google.api.http) = { + post: "/{parent=publishers/*/books/*}/editions", + body: "book_edition" + }; + + option (google.api.method_signature) = "parent,book_edition"; + } + + // An aep-compliant Get method for book-edition. + rpc GetBookEdition ( GetBookEditionRequest ) returns ( BookEdition ) { + option (google.api.http) = { get: "/{path=publishers/*/books/*/editions/*}" }; + + option (google.api.method_signature) = "path"; + } + + // An aep-compliant Delete method for book-edition. + rpc DeleteBookEdition ( DeleteBookEditionRequest ) returns ( google.protobuf.Empty ) { + option (google.api.http) = { + delete: "/{path=publishers/*/books/*/editions/*}" + }; + + option (google.api.method_signature) = "path"; + } + + // An aep-compliant List method for book-editions. + rpc ListBookEditions ( ListBookEditionsRequest ) returns ( ListBookEditionsResponse ) { + option (google.api.http) = { get: "/{parent=publishers/*/books/*}/editions" }; + + option (google.api.method_signature) = "parent"; + } + // An aep-compliant Create method for publisher. - rpc Createpublisher ( CreatepublisherRequest ) returns ( publisher ) { + rpc CreatePublisher ( CreatePublisherRequest ) returns ( Publisher ) { option (google.api.http) = { post: "/{parent=publishers}", body: "publisher" @@ -78,14 +111,14 @@ service Bookstore { } // An aep-compliant Get method for publisher. - rpc Getpublisher ( GetpublisherRequest ) returns ( publisher ) { + rpc GetPublisher ( GetPublisherRequest ) returns ( Publisher ) { option (google.api.http) = { get: "/{path=publishers/*}" }; option (google.api.method_signature) = "path"; } // An aep-compliant Update method for publisher. - rpc Updatepublisher ( UpdatepublisherRequest ) returns ( publisher ) { + rpc UpdatePublisher ( UpdatePublisherRequest ) returns ( Publisher ) { option (google.api.http) = { patch: "/{path=publishers/*}", body: "publisher" @@ -95,27 +128,27 @@ service Bookstore { } // An aep-compliant Delete method for publisher. - rpc Deletepublisher ( DeletepublisherRequest ) returns ( google.protobuf.Empty ) { + rpc DeletePublisher ( DeletePublisherRequest ) returns ( google.protobuf.Empty ) { option (google.api.http) = { delete: "/{path=publishers/*}" }; option (google.api.method_signature) = "path"; } // An aep-compliant List method for publishers. - rpc Listpublisher ( ListpublisherRequest ) returns ( ListpublisherResponse ) { + rpc ListPublishers ( ListPublishersRequest ) returns ( ListPublishersResponse ) { option (google.api.http) = { get: "/{parent=publishers}" }; option (google.api.method_signature) = "parent"; } // An aep-compliant Apply method for publishers. - rpc Applypublisher ( ApplypublisherRequest ) returns ( publisher ) { + rpc ApplyPublisher ( ApplyPublisherRequest ) returns ( Publisher ) { option (google.api.http) = { put: "/{path=publishers/*}", body: "publisher" }; } } -// A book. -message book { +// A Book. +message Book { // A Author. message Author { // Field for firstName. @@ -148,7 +181,7 @@ message book { } // A Create request for a book resource. -message CreatebookRequest { +message CreateBookRequest { // A field for the parent of book string parent = 10013 [ (google.api.field_behavior) = REQUIRED, @@ -159,11 +192,11 @@ message CreatebookRequest { string id = 10014; // The resource to perform the operation on. - book book = 10015 [(google.api.field_behavior) = REQUIRED]; + Book book = 10015 [(google.api.field_behavior) = REQUIRED]; } // Request message for the Getbook method -message GetbookRequest { +message GetBookRequest { // The globally unique identifier for the resource string path = 10018 [ (google.api.field_behavior) = REQUIRED, @@ -171,8 +204,8 @@ message GetbookRequest { ]; } -// Request message for the Updatebook method -message UpdatebookRequest { +// Request message for the UpdateBook method +message UpdateBookRequest { // The globally unique identifier for the resource string path = 10018 [ (google.api.field_behavior) = REQUIRED, @@ -180,14 +213,14 @@ message UpdatebookRequest { ]; // The resource to perform the operation on. - book book = 10015 [(google.api.field_behavior) = REQUIRED]; + Book book = 10015 [(google.api.field_behavior) = REQUIRED]; // The update mask for the resource google.protobuf.FieldMask update_mask = 10012; } -// Request message for the Deletebook method -message DeletebookRequest { +// Request message for the DeleteBook method +message DeleteBookRequest { // The globally unique identifier for the resource string path = 10018 [ (google.api.field_behavior) = REQUIRED, @@ -196,7 +229,7 @@ message DeletebookRequest { } // Request message for the Listbook method -message ListbookRequest { +message ListBooksRequest { // A field for the parent of book string parent = 10013 [ (google.api.field_behavior) = REQUIRED, @@ -211,16 +244,16 @@ message ListbookRequest { } // Response message for the Listbook method -message ListbookResponse { +message ListBooksResponse { // A list of books - repeated book results = 10016; + repeated Book results = 10016; // The page token indicating the ending point of this response. string next_page_token = 10011; } // Request message for the Applybook method -message ApplybookRequest { +message ApplyBookRequest { // The globally unique identifier for the resource string path = 10018 [ (google.api.field_behavior) = REQUIRED, @@ -228,11 +261,80 @@ message ApplybookRequest { ]; // The resource to perform the operation on. - book book = 10015 [(google.api.field_behavior) = REQUIRED]; + Book book = 10015 [(google.api.field_behavior) = REQUIRED]; +} + +// A BookEdition. +message BookEdition { + // Field for name. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Field for path. + string path = 10000; + + // Field for id. + string id = 10001; +} + +// A Create request for a book-edition resource. +message CreateBookEditionRequest { + // A field for the parent of book-edition + string parent = 10013 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { } + ]; + + // An id that uniquely identifies the resource within the collection + string id = 10014; + + // The resource to perform the operation on. + BookEdition book_edition = 10015 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for the Getbook-edition method +message GetBookEditionRequest { + // The globally unique identifier for the resource + string path = 10018 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "bookstore.example.com/book-edition" } + ]; +} + +// Request message for the DeleteBookEdition method +message DeleteBookEditionRequest { + // The globally unique identifier for the resource + string path = 10018 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "bookstore.example.com/book-edition" } + ]; +} + +// Request message for the Listbook-edition method +message ListBookEditionsRequest { + // A field for the parent of book-edition + string parent = 10013 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { } + ]; + + // The page token indicating the starting point of the page + string page_token = 10010; + + // The maximum number of resources to return in a single page. + int32 max_page_size = 10017; +} + +// Response message for the Listbook-edition method +message ListBookEditionsResponse { + // A list of book-editions + repeated BookEdition results = 10016; + + // The page token indicating the ending point of this response. + string next_page_token = 10011; } -// A publisher. -message publisher { +// A Publisher. +message Publisher { // Field for description. string description = 1; @@ -244,7 +346,7 @@ message publisher { } // A Create request for a publisher resource. -message CreatepublisherRequest { +message CreatePublisherRequest { // A field for the parent of publisher string parent = 10013 [ (google.api.field_behavior) = REQUIRED, @@ -255,11 +357,11 @@ message CreatepublisherRequest { string id = 10014; // The resource to perform the operation on. - publisher publisher = 10015 [(google.api.field_behavior) = REQUIRED]; + Publisher publisher = 10015 [(google.api.field_behavior) = REQUIRED]; } // Request message for the Getpublisher method -message GetpublisherRequest { +message GetPublisherRequest { // The globally unique identifier for the resource string path = 10018 [ (google.api.field_behavior) = REQUIRED, @@ -267,8 +369,8 @@ message GetpublisherRequest { ]; } -// Request message for the Updatepublisher method -message UpdatepublisherRequest { +// Request message for the UpdatePublisher method +message UpdatePublisherRequest { // The globally unique identifier for the resource string path = 10018 [ (google.api.field_behavior) = REQUIRED, @@ -276,14 +378,14 @@ message UpdatepublisherRequest { ]; // The resource to perform the operation on. - publisher publisher = 10015 [(google.api.field_behavior) = REQUIRED]; + Publisher publisher = 10015 [(google.api.field_behavior) = REQUIRED]; // The update mask for the resource google.protobuf.FieldMask update_mask = 10012; } -// Request message for the Deletepublisher method -message DeletepublisherRequest { +// Request message for the DeletePublisher method +message DeletePublisherRequest { // The globally unique identifier for the resource string path = 10018 [ (google.api.field_behavior) = REQUIRED, @@ -292,7 +394,7 @@ message DeletepublisherRequest { } // Request message for the Listpublisher method -message ListpublisherRequest { +message ListPublishersRequest { // A field for the parent of publisher string parent = 10013 [ (google.api.field_behavior) = REQUIRED, @@ -307,16 +409,16 @@ message ListpublisherRequest { } // Response message for the Listpublisher method -message ListpublisherResponse { +message ListPublishersResponse { // A list of publishers - repeated publisher results = 10016; + repeated Publisher results = 10016; // The page token indicating the ending point of this response. string next_page_token = 10011; } // Request message for the Applypublisher method -message ApplypublisherRequest { +message ApplyPublisherRequest { // The globally unique identifier for the resource string path = 10018 [ (google.api.field_behavior) = REQUIRED, @@ -324,5 +426,5 @@ message ApplypublisherRequest { ]; // The resource to perform the operation on. - publisher publisher = 10015 [(google.api.field_behavior) = REQUIRED]; + Publisher publisher = 10015 [(google.api.field_behavior) = REQUIRED]; } diff --git a/example/bookstore/v1/bookstore.swagger.json b/example/bookstore/v1/bookstore.swagger.json index 0e2028e..e710a11 100644 --- a/example/bookstore/v1/bookstore.swagger.json +++ b/example/bookstore/v1/bookstore.swagger.json @@ -19,12 +19,12 @@ "/{parent}": { "get": { "summary": "An aep-compliant List method for publishers.", - "operationId": "Bookstore_Listpublisher", + "operationId": "Bookstore_ListPublishers", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1ListpublisherResponse" + "$ref": "#/definitions/v1ListPublishersResponse" } }, "default": { @@ -65,12 +65,12 @@ }, "post": { "summary": "An aep-compliant Create method for publisher.", - "operationId": "Bookstore_Createpublisher", + "operationId": "Bookstore_CreatePublisher", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1publisher" + "$ref": "#/definitions/v1Publisher" } }, "default": { @@ -95,7 +95,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1publisher", + "$ref": "#/definitions/v1Publisher", "required": [ "publisher" ] @@ -117,12 +117,12 @@ "/{parent}/books": { "get": { "summary": "An aep-compliant List method for books.", - "operationId": "Bookstore_Listbook", + "operationId": "Bookstore_ListBooks", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1ListbookResponse" + "$ref": "#/definitions/v1ListBooksResponse" } }, "default": { @@ -163,12 +163,12 @@ }, "post": { "summary": "An aep-compliant Create method for book.", - "operationId": "Bookstore_Createbook", + "operationId": "Bookstore_CreateBook", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1book" + "$ref": "#/definitions/v1Book" } }, "default": { @@ -193,7 +193,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1book", + "$ref": "#/definitions/v1Book", "required": [ "book" ] @@ -212,15 +212,113 @@ ] } }, + "/{parent}/editions": { + "get": { + "summary": "An aep-compliant List method for book-editions.", + "operationId": "Bookstore_ListBookEditions", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ListBookEditionsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "parent", + "description": "A field for the parent of book-edition", + "in": "path", + "required": true, + "type": "string", + "pattern": "publishers/[^/]+/books/[^/]+" + }, + { + "name": "pageToken", + "description": "The page token indicating the starting point of the page", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "maxPageSize", + "description": "The maximum number of resources to return in a single page.", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + } + ], + "tags": [ + "Bookstore" + ] + }, + "post": { + "summary": "An aep-compliant Create method for book-edition.", + "operationId": "Bookstore_CreateBookEdition", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1BookEdition" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "parent", + "description": "A field for the parent of book-edition", + "in": "path", + "required": true, + "type": "string", + "pattern": "publishers/[^/]+/books/[^/]+" + }, + { + "name": "bookEdition", + "description": "The resource to perform the operation on.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1BookEdition", + "required": [ + "bookEdition" + ] + } + }, + { + "name": "id", + "description": "An id that uniquely identifies the resource within the collection", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "Bookstore" + ] + } + }, "/{path_1}": { "get": { - "summary": "An aep-compliant Get method for publisher.", - "operationId": "Bookstore_Getpublisher", + "summary": "An aep-compliant Get method for book-edition.", + "operationId": "Bookstore_GetBookEdition", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1publisher" + "$ref": "#/definitions/v1BookEdition" } }, "default": { @@ -237,7 +335,7 @@ "in": "path", "required": true, "type": "string", - "pattern": "publishers/[^/]+" + "pattern": "publishers/[^/]+/books/[^/]+/editions/[^/]+" } ], "tags": [ @@ -245,8 +343,8 @@ ] }, "delete": { - "summary": "An aep-compliant Delete method for publisher.", - "operationId": "Bookstore_Deletepublisher", + "summary": "An aep-compliant Delete method for book-edition.", + "operationId": "Bookstore_DeleteBookEdition", "responses": { "200": { "description": "A successful response.", @@ -269,7 +367,7 @@ "in": "path", "required": true, "type": "string", - "pattern": "publishers/[^/]+" + "pattern": "publishers/[^/]+/books/[^/]+/editions/[^/]+" } ], "tags": [ @@ -278,12 +376,12 @@ }, "put": { "summary": "An aep-compliant Apply method for publishers.", - "operationId": "Bookstore_Applypublisher", + "operationId": "Bookstore_ApplyPublisher", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1publisher" + "$ref": "#/definitions/v1Publisher" } }, "default": { @@ -308,7 +406,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1publisher", + "$ref": "#/definitions/v1Publisher", "required": [ "publisher" ] @@ -321,12 +419,12 @@ }, "patch": { "summary": "An aep-compliant Update method for publisher.", - "operationId": "Bookstore_Updatepublisher", + "operationId": "Bookstore_UpdatePublisher", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1publisher" + "$ref": "#/definitions/v1Publisher" } }, "default": { @@ -351,7 +449,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1publisher", + "$ref": "#/definitions/v1Publisher", "required": [ "publisher" ] @@ -363,15 +461,80 @@ ] } }, + "/{path_2}": { + "get": { + "summary": "An aep-compliant Get method for publisher.", + "operationId": "Bookstore_GetPublisher", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1Publisher" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "path_2", + "description": "The globally unique identifier for the resource", + "in": "path", + "required": true, + "type": "string", + "pattern": "publishers/[^/]+" + } + ], + "tags": [ + "Bookstore" + ] + }, + "delete": { + "summary": "An aep-compliant Delete method for publisher.", + "operationId": "Bookstore_DeletePublisher", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object", + "properties": {} + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "path_2", + "description": "The globally unique identifier for the resource", + "in": "path", + "required": true, + "type": "string", + "pattern": "publishers/[^/]+" + } + ], + "tags": [ + "Bookstore" + ] + } + }, "/{path}": { "get": { "summary": "An aep-compliant Get method for book.", - "operationId": "Bookstore_Getbook", + "operationId": "Bookstore_GetBook", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1book" + "$ref": "#/definitions/v1Book" } }, "default": { @@ -397,7 +560,7 @@ }, "delete": { "summary": "An aep-compliant Delete method for book.", - "operationId": "Bookstore_Deletebook", + "operationId": "Bookstore_DeleteBook", "responses": { "200": { "description": "A successful response.", @@ -429,12 +592,12 @@ }, "put": { "summary": "An aep-compliant Apply method for books.", - "operationId": "Bookstore_Applybook", + "operationId": "Bookstore_ApplyBook", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1book" + "$ref": "#/definitions/v1Book" } }, "default": { @@ -459,7 +622,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1book", + "$ref": "#/definitions/v1Book", "required": [ "book" ] @@ -472,12 +635,12 @@ }, "patch": { "summary": "An aep-compliant Update method for book.", - "operationId": "Bookstore_Updatebook", + "operationId": "Bookstore_UpdateBook", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1book" + "$ref": "#/definitions/v1Book" } }, "default": { @@ -502,7 +665,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1book", + "$ref": "#/definitions/v1Book", "required": [ "book" ] @@ -516,7 +679,7 @@ } }, "definitions": { - "bookAuthor": { + "BookAuthor": { "type": "object", "properties": { "firstName": { @@ -558,50 +721,14 @@ } } }, - "v1ListbookResponse": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/v1book" - }, - "title": "A list of books" - }, - "nextPageToken": { - "type": "string", - "description": "The page token indicating the ending point of this response." - } - }, - "title": "Response message for the Listbook method" - }, - "v1ListpublisherResponse": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/v1publisher" - }, - "title": "A list of publishers" - }, - "nextPageToken": { - "type": "string", - "description": "The page token indicating the ending point of this response." - } - }, - "title": "Response message for the Listpublisher method" - }, - "v1book": { + "v1Book": { "type": "object", "properties": { "author": { "type": "array", "items": { "type": "object", - "$ref": "#/definitions/bookAuthor" + "$ref": "#/definitions/BookAuthor" }, "description": "Field for author." }, @@ -635,14 +762,89 @@ "description": "Field for id." } }, - "description": "A book.", + "description": "A Book.", "required": [ "isbn", "price", "published" ] }, - "v1publisher": { + "v1BookEdition": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Field for name." + }, + "path": { + "type": "string", + "description": "Field for path." + }, + "id": { + "type": "string", + "description": "Field for id." + } + }, + "description": "A BookEdition.", + "required": [ + "name" + ] + }, + "v1ListBookEditionsResponse": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1BookEdition" + }, + "title": "A list of book-editions" + }, + "nextPageToken": { + "type": "string", + "description": "The page token indicating the ending point of this response." + } + }, + "title": "Response message for the Listbook-edition method" + }, + "v1ListBooksResponse": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1Book" + }, + "title": "A list of books" + }, + "nextPageToken": { + "type": "string", + "description": "The page token indicating the ending point of this response." + } + }, + "title": "Response message for the Listbook method" + }, + "v1ListPublishersResponse": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1Publisher" + }, + "title": "A list of publishers" + }, + "nextPageToken": { + "type": "string", + "description": "The page token indicating the ending point of this response." + } + }, + "title": "Response message for the Listpublisher method" + }, + "v1Publisher": { "type": "object", "properties": { "description": { @@ -658,7 +860,7 @@ "description": "Field for id." } }, - "description": "A publisher." + "description": "A Publisher." } } } diff --git a/example/bookstore/v1/bookstore.yaml b/example/bookstore/v1/bookstore.yaml index 442d67a..44b36c9 100644 --- a/example/bookstore/v1/bookstore.yaml +++ b/example/bookstore/v1/bookstore.yaml @@ -58,6 +58,24 @@ resources: delete: {} list: {} apply: {} # do not uncomment until there is an AEP on apply. - # 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 + # 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 + # example of a child resource, with a redudant type name. + # aepc will remove the redundant component in the path pattern + - kind: "book-edition" + plural: "book-editions" + # the parents should specify the parents of the resource. It takes in the + # kind. + parents: + - "book" + properties: + name: + type: STRING + number: 1 + required: true + methods: + create: {} + read: {} + list: {} + delete: {} diff --git a/example/bookstore/v1/bookstore_grpc.pb.go b/example/bookstore/v1/bookstore_grpc.pb.go index e18f585..04ca87b 100644 --- a/example/bookstore/v1/bookstore_grpc.pb.go +++ b/example/bookstore/v1/bookstore_grpc.pb.go @@ -20,18 +20,22 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - Bookstore_Createbook_FullMethodName = "/example.bookstore.v1.Bookstore/Createbook" - Bookstore_Getbook_FullMethodName = "/example.bookstore.v1.Bookstore/Getbook" - Bookstore_Updatebook_FullMethodName = "/example.bookstore.v1.Bookstore/Updatebook" - Bookstore_Deletebook_FullMethodName = "/example.bookstore.v1.Bookstore/Deletebook" - Bookstore_Listbook_FullMethodName = "/example.bookstore.v1.Bookstore/Listbook" - Bookstore_Applybook_FullMethodName = "/example.bookstore.v1.Bookstore/Applybook" - Bookstore_Createpublisher_FullMethodName = "/example.bookstore.v1.Bookstore/Createpublisher" - Bookstore_Getpublisher_FullMethodName = "/example.bookstore.v1.Bookstore/Getpublisher" - Bookstore_Updatepublisher_FullMethodName = "/example.bookstore.v1.Bookstore/Updatepublisher" - Bookstore_Deletepublisher_FullMethodName = "/example.bookstore.v1.Bookstore/Deletepublisher" - Bookstore_Listpublisher_FullMethodName = "/example.bookstore.v1.Bookstore/Listpublisher" - Bookstore_Applypublisher_FullMethodName = "/example.bookstore.v1.Bookstore/Applypublisher" + Bookstore_CreateBook_FullMethodName = "/example.bookstore.v1.Bookstore/CreateBook" + Bookstore_GetBook_FullMethodName = "/example.bookstore.v1.Bookstore/GetBook" + Bookstore_UpdateBook_FullMethodName = "/example.bookstore.v1.Bookstore/UpdateBook" + 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_CreateBookEdition_FullMethodName = "/example.bookstore.v1.Bookstore/CreateBookEdition" + Bookstore_GetBookEdition_FullMethodName = "/example.bookstore.v1.Bookstore/GetBookEdition" + Bookstore_DeleteBookEdition_FullMethodName = "/example.bookstore.v1.Bookstore/DeleteBookEdition" + Bookstore_ListBookEditions_FullMethodName = "/example.bookstore.v1.Bookstore/ListBookEditions" + Bookstore_CreatePublisher_FullMethodName = "/example.bookstore.v1.Bookstore/CreatePublisher" + Bookstore_GetPublisher_FullMethodName = "/example.bookstore.v1.Bookstore/GetPublisher" + Bookstore_UpdatePublisher_FullMethodName = "/example.bookstore.v1.Bookstore/UpdatePublisher" + Bookstore_DeletePublisher_FullMethodName = "/example.bookstore.v1.Bookstore/DeletePublisher" + Bookstore_ListPublishers_FullMethodName = "/example.bookstore.v1.Bookstore/ListPublishers" + Bookstore_ApplyPublisher_FullMethodName = "/example.bookstore.v1.Bookstore/ApplyPublisher" ) // BookstoreClient is the client API for Bookstore service. @@ -39,29 +43,37 @@ const ( // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type BookstoreClient interface { // An aep-compliant Create method for book. - Createbook(ctx context.Context, in *CreatebookRequest, opts ...grpc.CallOption) (*Book, error) + CreateBook(ctx context.Context, in *CreateBookRequest, opts ...grpc.CallOption) (*Book, error) // An aep-compliant Get method for book. - Getbook(ctx context.Context, in *GetbookRequest, opts ...grpc.CallOption) (*Book, error) + GetBook(ctx context.Context, in *GetBookRequest, opts ...grpc.CallOption) (*Book, error) // An aep-compliant Update method for book. - Updatebook(ctx context.Context, in *UpdatebookRequest, opts ...grpc.CallOption) (*Book, error) + UpdateBook(ctx context.Context, in *UpdateBookRequest, opts ...grpc.CallOption) (*Book, error) // An aep-compliant Delete method for book. - Deletebook(ctx context.Context, in *DeletebookRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + DeleteBook(ctx context.Context, in *DeleteBookRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // An aep-compliant List method for books. - Listbook(ctx context.Context, in *ListbookRequest, opts ...grpc.CallOption) (*ListbookResponse, error) + 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) + ApplyBook(ctx context.Context, in *ApplyBookRequest, opts ...grpc.CallOption) (*Book, 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. + GetBookEdition(ctx context.Context, in *GetBookEditionRequest, opts ...grpc.CallOption) (*BookEdition, error) + // An aep-compliant Delete method for book-edition. + DeleteBookEdition(ctx context.Context, in *DeleteBookEditionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // An aep-compliant List method for book-editions. + ListBookEditions(ctx context.Context, in *ListBookEditionsRequest, opts ...grpc.CallOption) (*ListBookEditionsResponse, error) // An aep-compliant Create method for publisher. - Createpublisher(ctx context.Context, in *CreatepublisherRequest, opts ...grpc.CallOption) (*Publisher, error) + CreatePublisher(ctx context.Context, in *CreatePublisherRequest, opts ...grpc.CallOption) (*Publisher, error) // An aep-compliant Get method for publisher. - Getpublisher(ctx context.Context, in *GetpublisherRequest, opts ...grpc.CallOption) (*Publisher, error) + GetPublisher(ctx context.Context, in *GetPublisherRequest, opts ...grpc.CallOption) (*Publisher, error) // An aep-compliant Update method for publisher. - Updatepublisher(ctx context.Context, in *UpdatepublisherRequest, opts ...grpc.CallOption) (*Publisher, error) + UpdatePublisher(ctx context.Context, in *UpdatePublisherRequest, opts ...grpc.CallOption) (*Publisher, error) // An aep-compliant Delete method for publisher. - Deletepublisher(ctx context.Context, in *DeletepublisherRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + DeletePublisher(ctx context.Context, in *DeletePublisherRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // An aep-compliant List method for publishers. - Listpublisher(ctx context.Context, in *ListpublisherRequest, opts ...grpc.CallOption) (*ListpublisherResponse, error) + ListPublishers(ctx context.Context, in *ListPublishersRequest, opts ...grpc.CallOption) (*ListPublishersResponse, error) // An aep-compliant Apply method for publishers. - Applypublisher(ctx context.Context, in *ApplypublisherRequest, opts ...grpc.CallOption) (*Publisher, error) + ApplyPublisher(ctx context.Context, in *ApplyPublisherRequest, opts ...grpc.CallOption) (*Publisher, error) } type bookstoreClient struct { @@ -72,108 +84,144 @@ func NewBookstoreClient(cc grpc.ClientConnInterface) BookstoreClient { return &bookstoreClient{cc} } -func (c *bookstoreClient) Createbook(ctx context.Context, in *CreatebookRequest, opts ...grpc.CallOption) (*Book, error) { +func (c *bookstoreClient) CreateBook(ctx context.Context, in *CreateBookRequest, opts ...grpc.CallOption) (*Book, error) { out := new(Book) - err := c.cc.Invoke(ctx, Bookstore_Createbook_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Bookstore_CreateBook_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *bookstoreClient) Getbook(ctx context.Context, in *GetbookRequest, opts ...grpc.CallOption) (*Book, error) { +func (c *bookstoreClient) GetBook(ctx context.Context, in *GetBookRequest, opts ...grpc.CallOption) (*Book, error) { out := new(Book) - err := c.cc.Invoke(ctx, Bookstore_Getbook_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Bookstore_GetBook_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *bookstoreClient) Updatebook(ctx context.Context, in *UpdatebookRequest, opts ...grpc.CallOption) (*Book, error) { +func (c *bookstoreClient) UpdateBook(ctx context.Context, in *UpdateBookRequest, opts ...grpc.CallOption) (*Book, error) { out := new(Book) - err := c.cc.Invoke(ctx, Bookstore_Updatebook_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Bookstore_UpdateBook_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *bookstoreClient) Deletebook(ctx context.Context, in *DeletebookRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { +func (c *bookstoreClient) DeleteBook(ctx context.Context, in *DeleteBookRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, Bookstore_Deletebook_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Bookstore_DeleteBook_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *bookstoreClient) Listbook(ctx context.Context, in *ListbookRequest, opts ...grpc.CallOption) (*ListbookResponse, error) { - out := new(ListbookResponse) - err := c.cc.Invoke(ctx, Bookstore_Listbook_FullMethodName, in, out, opts...) +func (c *bookstoreClient) ListBooks(ctx context.Context, in *ListBooksRequest, opts ...grpc.CallOption) (*ListBooksResponse, error) { + out := new(ListBooksResponse) + err := c.cc.Invoke(ctx, Bookstore_ListBooks_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *bookstoreClient) Applybook(ctx context.Context, in *ApplybookRequest, opts ...grpc.CallOption) (*Book, error) { +func (c *bookstoreClient) ApplyBook(ctx context.Context, in *ApplyBookRequest, opts ...grpc.CallOption) (*Book, error) { out := new(Book) - err := c.cc.Invoke(ctx, Bookstore_Applybook_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Bookstore_ApplyBook_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *bookstoreClient) Createpublisher(ctx context.Context, in *CreatepublisherRequest, opts ...grpc.CallOption) (*Publisher, error) { +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...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *bookstoreClient) GetBookEdition(ctx context.Context, in *GetBookEditionRequest, opts ...grpc.CallOption) (*BookEdition, error) { + out := new(BookEdition) + err := c.cc.Invoke(ctx, Bookstore_GetBookEdition_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *bookstoreClient) DeleteBookEdition(ctx context.Context, in *DeleteBookEditionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, Bookstore_DeleteBookEdition_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *bookstoreClient) ListBookEditions(ctx context.Context, in *ListBookEditionsRequest, opts ...grpc.CallOption) (*ListBookEditionsResponse, error) { + out := new(ListBookEditionsResponse) + err := c.cc.Invoke(ctx, Bookstore_ListBookEditions_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *bookstoreClient) CreatePublisher(ctx context.Context, in *CreatePublisherRequest, opts ...grpc.CallOption) (*Publisher, error) { out := new(Publisher) - err := c.cc.Invoke(ctx, Bookstore_Createpublisher_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Bookstore_CreatePublisher_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *bookstoreClient) Getpublisher(ctx context.Context, in *GetpublisherRequest, opts ...grpc.CallOption) (*Publisher, error) { +func (c *bookstoreClient) GetPublisher(ctx context.Context, in *GetPublisherRequest, opts ...grpc.CallOption) (*Publisher, error) { out := new(Publisher) - err := c.cc.Invoke(ctx, Bookstore_Getpublisher_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Bookstore_GetPublisher_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *bookstoreClient) Updatepublisher(ctx context.Context, in *UpdatepublisherRequest, opts ...grpc.CallOption) (*Publisher, error) { +func (c *bookstoreClient) UpdatePublisher(ctx context.Context, in *UpdatePublisherRequest, opts ...grpc.CallOption) (*Publisher, error) { out := new(Publisher) - err := c.cc.Invoke(ctx, Bookstore_Updatepublisher_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Bookstore_UpdatePublisher_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *bookstoreClient) Deletepublisher(ctx context.Context, in *DeletepublisherRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { +func (c *bookstoreClient) DeletePublisher(ctx context.Context, in *DeletePublisherRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, Bookstore_Deletepublisher_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Bookstore_DeletePublisher_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *bookstoreClient) Listpublisher(ctx context.Context, in *ListpublisherRequest, opts ...grpc.CallOption) (*ListpublisherResponse, error) { - out := new(ListpublisherResponse) - err := c.cc.Invoke(ctx, Bookstore_Listpublisher_FullMethodName, in, out, opts...) +func (c *bookstoreClient) ListPublishers(ctx context.Context, in *ListPublishersRequest, opts ...grpc.CallOption) (*ListPublishersResponse, error) { + out := new(ListPublishersResponse) + err := c.cc.Invoke(ctx, Bookstore_ListPublishers_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *bookstoreClient) Applypublisher(ctx context.Context, in *ApplypublisherRequest, opts ...grpc.CallOption) (*Publisher, error) { +func (c *bookstoreClient) ApplyPublisher(ctx context.Context, in *ApplyPublisherRequest, opts ...grpc.CallOption) (*Publisher, error) { out := new(Publisher) - err := c.cc.Invoke(ctx, Bookstore_Applypublisher_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Bookstore_ApplyPublisher_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -185,29 +233,37 @@ func (c *bookstoreClient) Applypublisher(ctx context.Context, in *Applypublisher // for forward compatibility type BookstoreServer interface { // An aep-compliant Create method for book. - Createbook(context.Context, *CreatebookRequest) (*Book, error) + CreateBook(context.Context, *CreateBookRequest) (*Book, error) // An aep-compliant Get method for book. - Getbook(context.Context, *GetbookRequest) (*Book, error) + GetBook(context.Context, *GetBookRequest) (*Book, error) // An aep-compliant Update method for book. - Updatebook(context.Context, *UpdatebookRequest) (*Book, error) + UpdateBook(context.Context, *UpdateBookRequest) (*Book, error) // An aep-compliant Delete method for book. - Deletebook(context.Context, *DeletebookRequest) (*emptypb.Empty, error) + DeleteBook(context.Context, *DeleteBookRequest) (*emptypb.Empty, error) // An aep-compliant List method for books. - Listbook(context.Context, *ListbookRequest) (*ListbookResponse, error) + ListBooks(context.Context, *ListBooksRequest) (*ListBooksResponse, error) // An aep-compliant Apply method for books. - Applybook(context.Context, *ApplybookRequest) (*Book, error) + ApplyBook(context.Context, *ApplyBookRequest) (*Book, error) + // An aep-compliant Create method for book-edition. + CreateBookEdition(context.Context, *CreateBookEditionRequest) (*BookEdition, error) + // An aep-compliant Get method for book-edition. + GetBookEdition(context.Context, *GetBookEditionRequest) (*BookEdition, error) + // An aep-compliant Delete method for book-edition. + DeleteBookEdition(context.Context, *DeleteBookEditionRequest) (*emptypb.Empty, error) + // An aep-compliant List method for book-editions. + ListBookEditions(context.Context, *ListBookEditionsRequest) (*ListBookEditionsResponse, error) // An aep-compliant Create method for publisher. - Createpublisher(context.Context, *CreatepublisherRequest) (*Publisher, error) + CreatePublisher(context.Context, *CreatePublisherRequest) (*Publisher, error) // An aep-compliant Get method for publisher. - Getpublisher(context.Context, *GetpublisherRequest) (*Publisher, error) + GetPublisher(context.Context, *GetPublisherRequest) (*Publisher, error) // An aep-compliant Update method for publisher. - Updatepublisher(context.Context, *UpdatepublisherRequest) (*Publisher, error) + UpdatePublisher(context.Context, *UpdatePublisherRequest) (*Publisher, error) // An aep-compliant Delete method for publisher. - Deletepublisher(context.Context, *DeletepublisherRequest) (*emptypb.Empty, error) + DeletePublisher(context.Context, *DeletePublisherRequest) (*emptypb.Empty, error) // An aep-compliant List method for publishers. - Listpublisher(context.Context, *ListpublisherRequest) (*ListpublisherResponse, error) + ListPublishers(context.Context, *ListPublishersRequest) (*ListPublishersResponse, error) // An aep-compliant Apply method for publishers. - Applypublisher(context.Context, *ApplypublisherRequest) (*Publisher, error) + ApplyPublisher(context.Context, *ApplyPublisherRequest) (*Publisher, error) mustEmbedUnimplementedBookstoreServer() } @@ -215,41 +271,53 @@ type BookstoreServer interface { type UnimplementedBookstoreServer struct { } -func (UnimplementedBookstoreServer) Createbook(context.Context, *CreatebookRequest) (*Book, error) { - return nil, status.Errorf(codes.Unimplemented, "method Createbook not implemented") +func (UnimplementedBookstoreServer) CreateBook(context.Context, *CreateBookRequest) (*Book, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateBook not implemented") +} +func (UnimplementedBookstoreServer) GetBook(context.Context, *GetBookRequest) (*Book, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBook not implemented") +} +func (UnimplementedBookstoreServer) UpdateBook(context.Context, *UpdateBookRequest) (*Book, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateBook not implemented") +} +func (UnimplementedBookstoreServer) DeleteBook(context.Context, *DeleteBookRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteBook not implemented") +} +func (UnimplementedBookstoreServer) ListBooks(context.Context, *ListBooksRequest) (*ListBooksResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListBooks not implemented") } -func (UnimplementedBookstoreServer) Getbook(context.Context, *GetbookRequest) (*Book, error) { - return nil, status.Errorf(codes.Unimplemented, "method Getbook not implemented") +func (UnimplementedBookstoreServer) ApplyBook(context.Context, *ApplyBookRequest) (*Book, error) { + return nil, status.Errorf(codes.Unimplemented, "method ApplyBook not implemented") } -func (UnimplementedBookstoreServer) Updatebook(context.Context, *UpdatebookRequest) (*Book, error) { - return nil, status.Errorf(codes.Unimplemented, "method Updatebook not implemented") +func (UnimplementedBookstoreServer) CreateBookEdition(context.Context, *CreateBookEditionRequest) (*BookEdition, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateBookEdition not implemented") } -func (UnimplementedBookstoreServer) Deletebook(context.Context, *DeletebookRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method Deletebook not implemented") +func (UnimplementedBookstoreServer) GetBookEdition(context.Context, *GetBookEditionRequest) (*BookEdition, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBookEdition not implemented") } -func (UnimplementedBookstoreServer) Listbook(context.Context, *ListbookRequest) (*ListbookResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Listbook not implemented") +func (UnimplementedBookstoreServer) DeleteBookEdition(context.Context, *DeleteBookEditionRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteBookEdition not implemented") } -func (UnimplementedBookstoreServer) Applybook(context.Context, *ApplybookRequest) (*Book, error) { - return nil, status.Errorf(codes.Unimplemented, "method Applybook not implemented") +func (UnimplementedBookstoreServer) ListBookEditions(context.Context, *ListBookEditionsRequest) (*ListBookEditionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListBookEditions not implemented") } -func (UnimplementedBookstoreServer) Createpublisher(context.Context, *CreatepublisherRequest) (*Publisher, error) { - return nil, status.Errorf(codes.Unimplemented, "method Createpublisher not implemented") +func (UnimplementedBookstoreServer) CreatePublisher(context.Context, *CreatePublisherRequest) (*Publisher, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreatePublisher not implemented") } -func (UnimplementedBookstoreServer) Getpublisher(context.Context, *GetpublisherRequest) (*Publisher, error) { - return nil, status.Errorf(codes.Unimplemented, "method Getpublisher not implemented") +func (UnimplementedBookstoreServer) GetPublisher(context.Context, *GetPublisherRequest) (*Publisher, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetPublisher not implemented") } -func (UnimplementedBookstoreServer) Updatepublisher(context.Context, *UpdatepublisherRequest) (*Publisher, error) { - return nil, status.Errorf(codes.Unimplemented, "method Updatepublisher not implemented") +func (UnimplementedBookstoreServer) UpdatePublisher(context.Context, *UpdatePublisherRequest) (*Publisher, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdatePublisher not implemented") } -func (UnimplementedBookstoreServer) Deletepublisher(context.Context, *DeletepublisherRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method Deletepublisher not implemented") +func (UnimplementedBookstoreServer) DeletePublisher(context.Context, *DeletePublisherRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeletePublisher not implemented") } -func (UnimplementedBookstoreServer) Listpublisher(context.Context, *ListpublisherRequest) (*ListpublisherResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Listpublisher not implemented") +func (UnimplementedBookstoreServer) ListPublishers(context.Context, *ListPublishersRequest) (*ListPublishersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListPublishers not implemented") } -func (UnimplementedBookstoreServer) Applypublisher(context.Context, *ApplypublisherRequest) (*Publisher, error) { - return nil, status.Errorf(codes.Unimplemented, "method Applypublisher not implemented") +func (UnimplementedBookstoreServer) ApplyPublisher(context.Context, *ApplyPublisherRequest) (*Publisher, error) { + return nil, status.Errorf(codes.Unimplemented, "method ApplyPublisher not implemented") } func (UnimplementedBookstoreServer) mustEmbedUnimplementedBookstoreServer() {} @@ -264,218 +332,290 @@ func RegisterBookstoreServer(s grpc.ServiceRegistrar, srv BookstoreServer) { s.RegisterService(&Bookstore_ServiceDesc, srv) } -func _Bookstore_Createbook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreatebookRequest) +func _Bookstore_CreateBook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateBookRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BookstoreServer).CreateBook(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Bookstore_CreateBook_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BookstoreServer).CreateBook(ctx, req.(*CreateBookRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Bookstore_GetBook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetBookRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(BookstoreServer).Createbook(ctx, in) + return srv.(BookstoreServer).GetBook(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Bookstore_Createbook_FullMethodName, + FullMethod: Bookstore_GetBook_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BookstoreServer).Createbook(ctx, req.(*CreatebookRequest)) + return srv.(BookstoreServer).GetBook(ctx, req.(*GetBookRequest)) } return interceptor(ctx, in, info, handler) } -func _Bookstore_Getbook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetbookRequest) +func _Bookstore_UpdateBook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateBookRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(BookstoreServer).Getbook(ctx, in) + return srv.(BookstoreServer).UpdateBook(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Bookstore_Getbook_FullMethodName, + FullMethod: Bookstore_UpdateBook_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BookstoreServer).Getbook(ctx, req.(*GetbookRequest)) + return srv.(BookstoreServer).UpdateBook(ctx, req.(*UpdateBookRequest)) } return interceptor(ctx, in, info, handler) } -func _Bookstore_Updatebook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdatebookRequest) +func _Bookstore_DeleteBook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteBookRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(BookstoreServer).Updatebook(ctx, in) + return srv.(BookstoreServer).DeleteBook(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Bookstore_Updatebook_FullMethodName, + FullMethod: Bookstore_DeleteBook_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BookstoreServer).Updatebook(ctx, req.(*UpdatebookRequest)) + return srv.(BookstoreServer).DeleteBook(ctx, req.(*DeleteBookRequest)) } return interceptor(ctx, in, info, handler) } -func _Bookstore_Deletebook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeletebookRequest) +func _Bookstore_ListBooks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListBooksRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(BookstoreServer).Deletebook(ctx, in) + return srv.(BookstoreServer).ListBooks(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Bookstore_Deletebook_FullMethodName, + FullMethod: Bookstore_ListBooks_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BookstoreServer).Deletebook(ctx, req.(*DeletebookRequest)) + return srv.(BookstoreServer).ListBooks(ctx, req.(*ListBooksRequest)) } return interceptor(ctx, in, info, handler) } -func _Bookstore_Listbook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListbookRequest) +func _Bookstore_ApplyBook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ApplyBookRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(BookstoreServer).Listbook(ctx, in) + return srv.(BookstoreServer).ApplyBook(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Bookstore_Listbook_FullMethodName, + FullMethod: Bookstore_ApplyBook_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BookstoreServer).Listbook(ctx, req.(*ListbookRequest)) + return srv.(BookstoreServer).ApplyBook(ctx, req.(*ApplyBookRequest)) } return interceptor(ctx, in, info, handler) } -func _Bookstore_Applybook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ApplybookRequest) +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 { return nil, err } if interceptor == nil { - return srv.(BookstoreServer).Applybook(ctx, in) + return srv.(BookstoreServer).CreateBookEdition(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Bookstore_Applybook_FullMethodName, + FullMethod: Bookstore_CreateBookEdition_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BookstoreServer).Applybook(ctx, req.(*ApplybookRequest)) + return srv.(BookstoreServer).CreateBookEdition(ctx, req.(*CreateBookEditionRequest)) } return interceptor(ctx, in, info, handler) } -func _Bookstore_Createpublisher_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreatepublisherRequest) +func _Bookstore_GetBookEdition_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetBookEditionRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(BookstoreServer).Createpublisher(ctx, in) + return srv.(BookstoreServer).GetBookEdition(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Bookstore_Createpublisher_FullMethodName, + FullMethod: Bookstore_GetBookEdition_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BookstoreServer).Createpublisher(ctx, req.(*CreatepublisherRequest)) + return srv.(BookstoreServer).GetBookEdition(ctx, req.(*GetBookEditionRequest)) } return interceptor(ctx, in, info, handler) } -func _Bookstore_Getpublisher_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetpublisherRequest) +func _Bookstore_DeleteBookEdition_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteBookEditionRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(BookstoreServer).Getpublisher(ctx, in) + return srv.(BookstoreServer).DeleteBookEdition(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Bookstore_Getpublisher_FullMethodName, + FullMethod: Bookstore_DeleteBookEdition_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BookstoreServer).Getpublisher(ctx, req.(*GetpublisherRequest)) + return srv.(BookstoreServer).DeleteBookEdition(ctx, req.(*DeleteBookEditionRequest)) } return interceptor(ctx, in, info, handler) } -func _Bookstore_Updatepublisher_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdatepublisherRequest) +func _Bookstore_ListBookEditions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListBookEditionsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(BookstoreServer).Updatepublisher(ctx, in) + return srv.(BookstoreServer).ListBookEditions(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Bookstore_Updatepublisher_FullMethodName, + FullMethod: Bookstore_ListBookEditions_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BookstoreServer).Updatepublisher(ctx, req.(*UpdatepublisherRequest)) + return srv.(BookstoreServer).ListBookEditions(ctx, req.(*ListBookEditionsRequest)) } return interceptor(ctx, in, info, handler) } -func _Bookstore_Deletepublisher_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeletepublisherRequest) +func _Bookstore_CreatePublisher_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreatePublisherRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(BookstoreServer).Deletepublisher(ctx, in) + return srv.(BookstoreServer).CreatePublisher(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Bookstore_Deletepublisher_FullMethodName, + FullMethod: Bookstore_CreatePublisher_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BookstoreServer).Deletepublisher(ctx, req.(*DeletepublisherRequest)) + return srv.(BookstoreServer).CreatePublisher(ctx, req.(*CreatePublisherRequest)) } return interceptor(ctx, in, info, handler) } -func _Bookstore_Listpublisher_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListpublisherRequest) +func _Bookstore_GetPublisher_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPublisherRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(BookstoreServer).Listpublisher(ctx, in) + return srv.(BookstoreServer).GetPublisher(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Bookstore_Listpublisher_FullMethodName, + FullMethod: Bookstore_GetPublisher_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BookstoreServer).Listpublisher(ctx, req.(*ListpublisherRequest)) + return srv.(BookstoreServer).GetPublisher(ctx, req.(*GetPublisherRequest)) } return interceptor(ctx, in, info, handler) } -func _Bookstore_Applypublisher_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ApplypublisherRequest) +func _Bookstore_UpdatePublisher_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdatePublisherRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(BookstoreServer).Applypublisher(ctx, in) + return srv.(BookstoreServer).UpdatePublisher(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Bookstore_Applypublisher_FullMethodName, + FullMethod: Bookstore_UpdatePublisher_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BookstoreServer).Applypublisher(ctx, req.(*ApplypublisherRequest)) + return srv.(BookstoreServer).UpdatePublisher(ctx, req.(*UpdatePublisherRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Bookstore_DeletePublisher_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeletePublisherRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BookstoreServer).DeletePublisher(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Bookstore_DeletePublisher_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BookstoreServer).DeletePublisher(ctx, req.(*DeletePublisherRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Bookstore_ListPublishers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListPublishersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BookstoreServer).ListPublishers(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Bookstore_ListPublishers_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BookstoreServer).ListPublishers(ctx, req.(*ListPublishersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Bookstore_ApplyPublisher_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ApplyPublisherRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BookstoreServer).ApplyPublisher(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Bookstore_ApplyPublisher_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BookstoreServer).ApplyPublisher(ctx, req.(*ApplyPublisherRequest)) } return interceptor(ctx, in, info, handler) } @@ -488,52 +628,68 @@ var Bookstore_ServiceDesc = grpc.ServiceDesc{ HandlerType: (*BookstoreServer)(nil), Methods: []grpc.MethodDesc{ { - MethodName: "Createbook", - Handler: _Bookstore_Createbook_Handler, + MethodName: "CreateBook", + Handler: _Bookstore_CreateBook_Handler, + }, + { + MethodName: "GetBook", + Handler: _Bookstore_GetBook_Handler, + }, + { + MethodName: "UpdateBook", + Handler: _Bookstore_UpdateBook_Handler, + }, + { + MethodName: "DeleteBook", + Handler: _Bookstore_DeleteBook_Handler, + }, + { + MethodName: "ListBooks", + Handler: _Bookstore_ListBooks_Handler, }, { - MethodName: "Getbook", - Handler: _Bookstore_Getbook_Handler, + MethodName: "ApplyBook", + Handler: _Bookstore_ApplyBook_Handler, }, { - MethodName: "Updatebook", - Handler: _Bookstore_Updatebook_Handler, + MethodName: "CreateBookEdition", + Handler: _Bookstore_CreateBookEdition_Handler, }, { - MethodName: "Deletebook", - Handler: _Bookstore_Deletebook_Handler, + MethodName: "GetBookEdition", + Handler: _Bookstore_GetBookEdition_Handler, }, { - MethodName: "Listbook", - Handler: _Bookstore_Listbook_Handler, + MethodName: "DeleteBookEdition", + Handler: _Bookstore_DeleteBookEdition_Handler, }, { - MethodName: "Applybook", - Handler: _Bookstore_Applybook_Handler, + MethodName: "ListBookEditions", + Handler: _Bookstore_ListBookEditions_Handler, }, { - MethodName: "Createpublisher", - Handler: _Bookstore_Createpublisher_Handler, + MethodName: "CreatePublisher", + Handler: _Bookstore_CreatePublisher_Handler, }, { - MethodName: "Getpublisher", - Handler: _Bookstore_Getpublisher_Handler, + MethodName: "GetPublisher", + Handler: _Bookstore_GetPublisher_Handler, }, { - MethodName: "Updatepublisher", - Handler: _Bookstore_Updatepublisher_Handler, + MethodName: "UpdatePublisher", + Handler: _Bookstore_UpdatePublisher_Handler, }, { - MethodName: "Deletepublisher", - Handler: _Bookstore_Deletepublisher_Handler, + MethodName: "DeletePublisher", + Handler: _Bookstore_DeletePublisher_Handler, }, { - MethodName: "Listpublisher", - Handler: _Bookstore_Listpublisher_Handler, + MethodName: "ListPublishers", + Handler: _Bookstore_ListPublishers_Handler, }, { - MethodName: "Applypublisher", - Handler: _Bookstore_Applypublisher_Handler, + MethodName: "ApplyPublisher", + Handler: _Bookstore_ApplyPublisher_Handler, }, }, Streams: []grpc.StreamDesc{}, diff --git a/example/bookstore/v1/bookstore_openapi.json b/example/bookstore/v1/bookstore_openapi.json index 3b2556f..585b8f7 100644 --- a/example/bookstore/v1/bookstore_openapi.json +++ b/example/bookstore/v1/bookstore_openapi.json @@ -320,6 +320,152 @@ } ] } + }, + "/publishers/{publisher_id}/books/{book_id}/editions": { + "get": { + "responses": { + "200": { + "schema": { + "items": { + "$ref": "#/components/schemas/book-edition" + } + } + } + }, + "parameters": [ + { + "in": "path", + "name": "publisher_id", + "schema": {}, + "required": true, + "type": "string" + }, + { + "in": "path", + "name": "book_id", + "schema": {}, + "required": true, + "type": "string" + }, + { + "in": "query", + "name": "max_page_size", + "schema": {}, + "required": true, + "type": "integer" + }, + { + "in": "query", + "name": "page_token", + "schema": {}, + "required": true, + "type": "string" + } + ] + }, + "post": { + "responses": { + "200": { + "schema": { + "$ref": "#/components/schemas/book-edition" + } + } + }, + "parameters": [ + { + "in": "path", + "name": "publisher_id", + "schema": {}, + "required": true, + "type": "string" + }, + { + "in": "path", + "name": "book_id", + "schema": {}, + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/components/schemas/book-edition" + } + }, + { + "in": "query", + "name": "id", + "schema": {}, + "required": true, + "type": "string" + } + ] + } + }, + "/publishers/{publisher_id}/books/{book_id}/editions/{book_edition_id}": { + "delete": { + "responses": { + "200": { + "schema": {} + } + }, + "parameters": [ + { + "in": "path", + "name": "publisher_id", + "schema": {}, + "required": true, + "type": "string" + }, + { + "in": "path", + "name": "book_id", + "schema": {}, + "required": true, + "type": "string" + }, + { + "in": "path", + "name": "book_edition_id", + "schema": {}, + "required": true, + "type": "string" + } + ] + }, + "get": { + "responses": { + "200": { + "schema": { + "$ref": "#/components/schemas/book-edition" + } + } + }, + "parameters": [ + { + "in": "path", + "name": "publisher_id", + "schema": {}, + "required": true, + "type": "string" + }, + { + "in": "path", + "name": "book_id", + "schema": {}, + "required": true, + "type": "string" + }, + { + "in": "path", + "name": "book_edition_id", + "schema": {}, + "required": true, + "type": "string" + } + ] + } } }, "components": { @@ -376,6 +522,36 @@ ] } }, + "book-edition": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "id": { + "type": "string", + "readOnly": true, + "x-terraform-id": true + }, + "name": { + "type": "string" + }, + "path": { + "type": "string", + "readOnly": true + } + }, + "x-aep-resource": { + "singular": "book-edition", + "plural": "book-editions", + "patterns": [ + "/publishers/{publisher_id}/books/{book_id}/editions/{book_edition_id}" + ], + "parents": [ + "book" + ] + } + }, "publisher": { "type": "object", "properties": { diff --git a/example/bookstore/v1/bookstore_openapi.yaml b/example/bookstore/v1/bookstore_openapi.yaml index 0fa1547..d8bc02e 100644 --- a/example/bookstore/v1/bookstore_openapi.yaml +++ b/example/bookstore/v1/bookstore_openapi.yaml @@ -37,6 +37,27 @@ components: - /publishers/{publisher_id}/books/{book_id} plural: books singular: book + book-edition: + properties: + id: + readOnly: true + type: string + x-terraform-id: true + name: + type: string + path: + readOnly: true + type: string + required: + - name + type: object + x-aep-resource: + parents: + - book + patterns: + - /publishers/{publisher_id}/books/{book_id}/editions/{book_edition_id} + plural: book-editions + singular: book-edition publisher: properties: description: @@ -248,6 +269,101 @@ paths: "200": schema: $ref: '#/components/schemas/book' + /publishers/{publisher_id}/books/{book_id}/editions: + get: + parameters: + - in: path + name: publisher_id + required: true + schema: {} + type: string + - in: path + name: book_id + required: true + schema: {} + type: string + - in: query + name: max_page_size + required: true + schema: {} + type: integer + - in: query + name: page_token + required: true + schema: {} + type: string + responses: + "200": + schema: + items: + $ref: '#/components/schemas/book-edition' + post: + parameters: + - in: path + name: publisher_id + required: true + schema: {} + type: string + - in: path + name: book_id + required: true + schema: {} + type: string + - in: body + name: body + schema: + $ref: '#/components/schemas/book-edition' + - in: query + name: id + required: true + schema: {} + type: string + responses: + "200": + schema: + $ref: '#/components/schemas/book-edition' + /publishers/{publisher_id}/books/{book_id}/editions/{book_edition_id}: + delete: + parameters: + - in: path + name: publisher_id + required: true + schema: {} + type: string + - in: path + name: book_id + required: true + schema: {} + type: string + - in: path + name: book_edition_id + required: true + schema: {} + type: string + responses: + "200": + schema: {} + get: + parameters: + - in: path + name: publisher_id + required: true + schema: {} + type: string + - in: path + name: book_id + required: true + schema: {} + type: string + - in: path + name: book_edition_id + required: true + schema: {} + type: string + responses: + "200": + schema: + $ref: '#/components/schemas/book-edition' schemes: - http servers: diff --git a/example/service/service.go b/example/service/service.go index d3c998b..13b2909 100644 --- a/example/service/service.go +++ b/example/service/service.go @@ -72,12 +72,12 @@ func (BookstoreServer) GetBook(_ context.Context, r *bpb.GetBookRequest) (*bpb.B return nil, status.Errorf(codes.NotFound, "book %q not found", r.Path) } -func (BookstoreServer) ListBook(_ context.Context, r *bpb.ListBookRequest) (*bpb.ListBookResponse, error) { +func (BookstoreServer) ListBooks(_ context.Context, r *bpb.ListBooksRequest) (*bpb.ListBooksResponse, error) { var books []*bpb.Book for _, book := range bookDatabase { books = append(books, book) } - return &bpb.ListBookResponse{ + return &bpb.ListBooksResponse{ Results: books, }, nil } @@ -128,12 +128,12 @@ func (BookstoreServer) GetPublisher(_ context.Context, r *bpb.GetPublisherReques return nil, status.Errorf(codes.NotFound, "publisher %q not found", r.Path) } -func (BookstoreServer) ListPublisher(_ context.Context, r *bpb.ListPublisherRequest) (*bpb.ListPublisherResponse, error) { +func (BookstoreServer) ListPublishers(_ context.Context, r *bpb.ListPublishersRequest) (*bpb.ListPublishersResponse, error) { var publishers []*bpb.Publisher for _, p := range publisherDatabase { publishers = append(publishers, p) } - return &bpb.ListPublisherResponse{ + return &bpb.ListPublishersResponse{ Results: publishers, }, nil } diff --git a/go.mod b/go.mod index a12c739..c4af91d 100644 --- a/go.mod +++ b/go.mod @@ -55,7 +55,7 @@ require ( github.com/hashicorp/terraform-registry-address v0.0.0-20210412075316-9b2996cce896 // indirect github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734 // indirect github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect - github.com/iancoleman/strcase v0.0.0-20180726023541-3605ed457bf7 // indirect + github.com/iancoleman/strcase v0.3.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329 // indirect github.com/mattn/go-colorable v0.1.4 // indirect diff --git a/go.sum b/go.sum index ebd2dd2..055ba94 100644 --- a/go.sum +++ b/go.sum @@ -296,6 +296,8 @@ github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpO github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/iancoleman/strcase v0.0.0-20180726023541-3605ed457bf7 h1:ux/56T2xqZO/3cP1I2F86qpeoYPCOzk+KF/UH/Ar+lk= github.com/iancoleman/strcase v0.0.0-20180726023541-3605ed457bf7/go.mod h1:SK73tn/9oHe+/Y0h39VT4UCxmurVJkR5NA7kMEAOgSE= +github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= +github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= diff --git a/internal/utils/cases.go b/internal/utils/cases.go new file mode 100644 index 0000000..9fd3063 --- /dev/null +++ b/internal/utils/cases.go @@ -0,0 +1,19 @@ +package utils + +import ( + "strings" +) + +func KebabToCamelCase(s string) string { + parts := strings.Split(s, "-") + for i := range parts { + if len(parts[i]) > 0 { + parts[i] = strings.ToUpper(string(parts[i][0])) + parts[i][1:] + } + } + return strings.Join(parts, "") +} + +func KebabToSnakeCase(s string) string { + return strings.ReplaceAll(s, "-", "_") +} diff --git a/writer/openapi/openapi.go b/writer/openapi/openapi.go index ce6ce7d..b9e17f1 100644 --- a/writer/openapi/openapi.go +++ b/writer/openapi/openapi.go @@ -3,10 +3,13 @@ package openapi import ( "encoding/json" "fmt" + "strings" "github.com/aep-dev/aepc/constants" + "github.com/aep-dev/aepc/internal/utils" "github.com/aep-dev/aepc/parser" "github.com/aep-dev/aepc/schema" + "github.com/aep-dev/aepc/writer/writer_utils" "golang.org/x/text/cases" "golang.org/x/text/language" ) @@ -55,6 +58,8 @@ func convertToOpenAPI(service *parser.ParsedService) (*OpenAPI, error) { } patterns := []string{} schemaRef := fmt.Sprintf("#/components/schemas/%v", r.Kind) + singular := utils.KebabToSnakeCase(r.Kind) + collection := writer_utils.CollectionName(r) // declare some commonly used objects, to be used later. bodyParam := ParameterInfo{ In: "body", @@ -65,7 +70,7 @@ func convertToOpenAPI(service *parser.ParsedService) (*OpenAPI, error) { } idParam := ParameterInfo{ In: "path", - Name: fmt.Sprintf("%s_id", lowerizer.String(r.Kind)), + Name: fmt.Sprintf("%s_id", singular), Required: true, Type: "string", } @@ -75,10 +80,10 @@ func convertToOpenAPI(service *parser.ParsedService) (*OpenAPI, error) { }, } for _, pwp := range *parentPWPS { - resourcePath := fmt.Sprintf("%s/%s/{%s_id}", pwp.Pattern, lowerizer.String(r.Plural), lowerizer.String(r.Kind)) + resourcePath := fmt.Sprintf("%s/%s/{%s_id}", pwp.Pattern, collection, singular) patterns = append(patterns, resourcePath) if r.Methods.List != nil { - listPath := fmt.Sprintf("%s/%s", pwp.Pattern, lowerizer.String(r.Plural)) + listPath := fmt.Sprintf("%s/%s", pwp.Pattern, collection) addMethodToPath(paths, listPath, "get", MethodInfo{ Parameters: append(pwp.Params, ParameterInfo{ @@ -106,7 +111,7 @@ func convertToOpenAPI(service *parser.ParsedService) (*OpenAPI, error) { }) } if r.Methods.Create != nil { - createPath := fmt.Sprintf("%s/%s", pwp.Pattern, lowerizer.String(r.Plural)) + createPath := fmt.Sprintf("%s/%s", pwp.Pattern, collection) params := append(pwp.Params, bodyParam, ParameterInfo{ In: "query", @@ -264,7 +269,7 @@ func generateParentPatternsWithParams(r *parser.ParsedResource) *[]PathWithParam } pwps := []PathWithParams{} for _, parent := range r.ParsedParents { - basePattern := fmt.Sprintf("/%s/{%s_id}", lowerizer.String(parent.Plural), lowerizer.String(parent.Kind)) + basePattern := fmt.Sprintf("/%s/{%s_id}", writer_utils.CollectionName(parent), lowerizer.String(parent.Kind)) baseParam := ParameterInfo{ In: "path", Name: fmt.Sprintf("%s_id", lowerizer.String(parent.Kind)), @@ -279,7 +284,7 @@ func generateParentPatternsWithParams(r *parser.ParsedResource) *[]PathWithParam } else { for _, parentPWP := range *generateParentPatternsWithParams(parent) { params := append(parentPWP.Params, baseParam) - pattern := fmt.Sprintf("{%s}{%s}", parentPWP.Pattern, basePattern) + pattern := fmt.Sprintf("%s%s", parentPWP.Pattern, basePattern) pwps = append(pwps, PathWithParams{Pattern: pattern, Params: params}) } } @@ -296,6 +301,22 @@ func addMethodToPath(paths Paths, path, method string, methodInfo MethodInfo) { methods[method] = methodInfo } +// return the collection name of the resource, but deduplicate +// the name of the previous parent +// e.g: +// - book-editions becomes editions under the parent resource book. +func collectionName(r *parser.ParsedResource) string { + collectionName := r.Plural + if len(r.ParsedParents) > 0 { + parent := r.ParsedParents[0].Kind + // if collectionName has a prefix of parent, remove it + if strings.HasPrefix(collectionName, parent) { + collectionName = strings.TrimPrefix(collectionName, parent+"-") + } + } + return collectionName +} + type OpenAPI struct { Swagger string `json:"swagger"` Servers []Server `json:"servers,omitempty"` diff --git a/writer/proto/proto.go b/writer/proto/proto.go index 34b0908..c5f9283 100644 --- a/writer/proto/proto.go +++ b/writer/proto/proto.go @@ -21,6 +21,7 @@ import ( "sort" "strings" + "github.com/aep-dev/aepc/internal/utils" "github.com/aep-dev/aepc/parser" "github.com/jhump/protoreflect/desc/builder" "github.com/jhump/protoreflect/desc/protoprint" @@ -125,7 +126,7 @@ func toProtoServiceName(serviceName string) string { } func toMessageName(resource string) string { - return capitalizer.String(resource) + return utils.KebabToCamelCase(resource) } func getSortedResources(prsByString map[string]*parser.ParsedResource) []*parser.ParsedResource { diff --git a/writer/proto/resource.go b/writer/proto/resource.go index 4dae03e..cf5cc2e 100644 --- a/writer/proto/resource.go +++ b/writer/proto/resource.go @@ -19,8 +19,10 @@ import ( "strings" "github.com/aep-dev/aepc/constants" + "github.com/aep-dev/aepc/internal/utils" "github.com/aep-dev/aepc/parser" "github.com/aep-dev/aepc/schema" + "github.com/aep-dev/aepc/writer/writer_utils" "github.com/jhump/protoreflect/desc" "github.com/jhump/protoreflect/desc/builder" "google.golang.org/genproto/googleapis/api/annotations" @@ -204,7 +206,7 @@ func GenerateMessage(properties []*parser.ParsedProperty, name string, s *parser // GenerateResourceMesssage adds the resource message. func GeneratedResourceMessage(r *parser.ParsedResource, s *parser.ParsedService, m *MessageStorage) (*builder.MessageBuilder, error) { - mb, err := GenerateMessage(r.GetPropertiesSortedByNumber(), r.Kind, s, m) + mb, err := GenerateMessage(r.GetPropertiesSortedByNumber(), toMessageName(r.Kind), s, m) if err != nil { return nil, err } @@ -215,7 +217,7 @@ func GeneratedResourceMessage(r *parser.ParsedResource, s *parser.ParsedService, func AddCreate(r *parser.ParsedResource, resourceMb *builder.MessageBuilder, fb *builder.FileBuilder, sb *builder.ServiceBuilder) error { // add the resource message // create request messages - mb := builder.NewMessage("Create" + r.Kind + "Request") + mb := builder.NewMessage("Create" + toMessageName(r.Kind) + "Request") mb.SetComments(builder.Comments{ LeadingComment: fmt.Sprintf("A Create request for a %v resource.", r.Kind), }) @@ -223,7 +225,7 @@ func AddCreate(r *parser.ParsedResource, resourceMb *builder.MessageBuilder, fb addIdField(r, mb) addResourceField(r, resourceMb, mb) fb.AddMessage(mb) - method := builder.NewMethod("Create"+r.Kind, + method := builder.NewMethod("Create"+toMessageName(r.Kind), builder.RpcTypeMessage(mb, false), builder.RpcTypeMessage(resourceMb, false), ) @@ -231,15 +233,15 @@ func AddCreate(r *parser.ParsedResource, resourceMb *builder.MessageBuilder, fb LeadingComment: fmt.Sprintf("An aep-compliant Create method for %v.", r.Kind), }) options := &descriptorpb.MethodOptions{} + bodyField := utils.KebabToSnakeCase(r.Kind) proto.SetExtension(options, annotations.E_Http, &annotations.HttpRule{ Pattern: &annotations.HttpRule_Post{ - // TODO(yft): switch this over to use "id" in the path. Post: generateParentHTTPPath(r), }, - Body: strings.ToLower(r.Kind), + Body: bodyField, }) proto.SetExtension(options, annotations.E_MethodSignature, []string{ - strings.Join([]string{constants.FIELD_PARENT_NAME, strings.ToLower(r.Kind)}, ","), + strings.Join([]string{constants.FIELD_PARENT_NAME, bodyField}, ","), }) method.SetOptions(options) sb.AddMethod(method) @@ -249,13 +251,13 @@ func AddCreate(r *parser.ParsedResource, resourceMb *builder.MessageBuilder, fb // AddGet adds a read method for the resource, along with // any required messages. func AddGet(r *parser.ParsedResource, resourceMb *builder.MessageBuilder, fb *builder.FileBuilder, sb *builder.ServiceBuilder) error { - mb := builder.NewMessage("Get" + r.Kind + "Request") + mb := builder.NewMessage("Get" + toMessageName(r.Kind) + "Request") mb.SetComments(builder.Comments{ LeadingComment: fmt.Sprintf("Request message for the Get%v method", r.Kind), }) addPathField(r, mb) fb.AddMessage(mb) - method := builder.NewMethod("Get"+r.Kind, + method := builder.NewMethod("Get"+toMessageName(r.Kind), builder.RpcTypeMessage(mb, false), builder.RpcTypeMessage(resourceMb, false), ) @@ -279,9 +281,9 @@ func AddGet(r *parser.ParsedResource, resourceMb *builder.MessageBuilder, fb *bu // AddRead adds a read method for the resource, along with // any required messages. func AddUpdate(r *parser.ParsedResource, resourceMb *builder.MessageBuilder, fb *builder.FileBuilder, sb *builder.ServiceBuilder) error { - mb := builder.NewMessage("Update" + r.Kind + "Request") + mb := builder.NewMessage("Update" + toMessageName(r.Kind) + "Request") mb.SetComments(builder.Comments{ - LeadingComment: fmt.Sprintf("Request message for the Update%v method", r.Kind), + LeadingComment: fmt.Sprintf("Request message for the Update%v method", toMessageName(r.Kind)), }) addPathField(r, mb) addResourceField(r, resourceMb, mb) @@ -295,7 +297,7 @@ func AddUpdate(r *parser.ParsedResource, resourceMb *builder.MessageBuilder, fb })) fb.AddMessage(mb) - method := builder.NewMethod("Update"+r.Kind, + method := builder.NewMethod("Update"+toMessageName(r.Kind), builder.RpcTypeMessage(mb, false), builder.RpcTypeMessage(resourceMb, false), ) @@ -303,14 +305,15 @@ func AddUpdate(r *parser.ParsedResource, resourceMb *builder.MessageBuilder, fb LeadingComment: fmt.Sprintf("An aep-compliant Update method for %v.", r.Kind), }) options := &descriptorpb.MethodOptions{} + body_field := utils.KebabToSnakeCase(r.Kind) proto.SetExtension(options, annotations.E_Http, &annotations.HttpRule{ Pattern: &annotations.HttpRule_Patch{ Patch: fmt.Sprintf("/{path=%v}", generateHTTPPath(r)), }, - Body: strings.ToLower(r.Kind), + Body: body_field, }) proto.SetExtension(options, annotations.E_MethodSignature, []string{ - strings.Join([]string{strings.ToLower(r.Kind), constants.FIELD_UPDATE_MASK_NAME}, ","), + strings.Join([]string{body_field, constants.FIELD_UPDATE_MASK_NAME}, ","), }) method.SetOptions(options) sb.AddMethod(method) @@ -320,9 +323,9 @@ func AddUpdate(r *parser.ParsedResource, resourceMb *builder.MessageBuilder, fb func AddDelete(r *parser.ParsedResource, resourceMb *builder.MessageBuilder, fb *builder.FileBuilder, sb *builder.ServiceBuilder) error { // add the resource message // create request messages - mb := builder.NewMessage("Delete" + r.Kind + "Request") + mb := builder.NewMessage("Delete" + toMessageName(r.Kind) + "Request") mb.SetComments(builder.Comments{ - LeadingComment: fmt.Sprintf("Request message for the Delete%v method", r.Kind), + LeadingComment: fmt.Sprintf("Request message for the Delete%v method", toMessageName(r.Kind)), }) addPathField(r, mb) fb.AddMessage(mb) @@ -330,7 +333,7 @@ func AddDelete(r *parser.ParsedResource, resourceMb *builder.MessageBuilder, fb if err != nil { return err } - method := builder.NewMethod("Delete"+r.Kind, + method := builder.NewMethod("Delete"+toMessageName(r.Kind), builder.RpcTypeMessage(mb, false), builder.RpcTypeImportedMessage(emptyMd, false), ) @@ -354,7 +357,7 @@ func AddDelete(r *parser.ParsedResource, resourceMb *builder.MessageBuilder, fb func AddList(r *parser.ParsedResource, resourceMb *builder.MessageBuilder, fb *builder.FileBuilder, sb *builder.ServiceBuilder) error { // add the resource message // create request messages - reqMb := builder.NewMessage("List" + r.Kind + "Request") + reqMb := builder.NewMessage("List" + toMessageName(r.Plural) + "Request") reqMb.SetComments(builder.Comments{ LeadingComment: fmt.Sprintf("Request message for the List%v method", r.Kind), }) @@ -366,14 +369,14 @@ func AddList(r *parser.ParsedResource, resourceMb *builder.MessageBuilder, fb *b LeadingComment: fmt.Sprintf("The maximum number of resources to return in a single page."), })) fb.AddMessage(reqMb) - respMb := builder.NewMessage("List" + r.Kind + "Response") + respMb := builder.NewMessage("List" + toMessageName(r.Plural) + "Response") respMb.SetComments(builder.Comments{ LeadingComment: fmt.Sprintf("Response message for the List%v method", r.Kind), }) addResourcesField(r, resourceMb, respMb) addNextPageToken(r, respMb) fb.AddMessage(respMb) - method := builder.NewMethod("List"+r.Kind, + method := builder.NewMethod("List"+toMessageName(r.Plural), builder.RpcTypeMessage(reqMb, false), builder.RpcTypeMessage(respMb, false), ) @@ -429,14 +432,14 @@ func AddGlobalList(r *parser.ParsedResource, resourceMb *builder.MessageBuilder, // AddApply adds a read method for the resource, along with // any required messages. func AddApply(r *parser.ParsedResource, resourceMb *builder.MessageBuilder, fb *builder.FileBuilder, sb *builder.ServiceBuilder) error { - mb := builder.NewMessage("Apply" + r.Kind + "Request") + mb := builder.NewMessage("Apply" + toMessageName(r.Kind) + "Request") mb.SetComments(builder.Comments{ LeadingComment: fmt.Sprintf("Request message for the Apply%v method", r.Kind), }) addPathField(r, mb) addResourceField(r, resourceMb, mb) fb.AddMessage(mb) - method := builder.NewMethod("Apply"+r.Kind, + method := builder.NewMethod("Apply"+toMessageName(r.Kind), builder.RpcTypeMessage(mb, false), builder.RpcTypeMessage(resourceMb, false), ) @@ -457,7 +460,7 @@ func AddApply(r *parser.ParsedResource, resourceMb *builder.MessageBuilder, fb * } func generateHTTPPath(r *parser.ParsedResource) string { - elements := []string{strings.ToLower(r.Plural)} + elements := []string{writer_utils.CollectionName(r)} if len(r.ParsedParents) > 0 { // TODO: handle multiple parents p := r.ParsedParents[0] @@ -466,6 +469,7 @@ func generateHTTPPath(r *parser.ParsedResource) string { if len(p.ParsedParents) == 0 { break } + p = p.ParsedParents[0] } } return fmt.Sprintf("%v/*", strings.Join(elements, "/*/")) @@ -479,7 +483,7 @@ func generateParentHTTPPath(r *parser.ParsedResource) string { if len(r.ParsedParents) > 0 { parentPath = fmt.Sprintf("%v", generateHTTPPath(r.ParsedParents[0])) } - return fmt.Sprintf("/{parent=%v}/%v", parentPath, strings.ToLower(r.Plural)) + return fmt.Sprintf("/{parent=%v}/%v", parentPath, writer_utils.CollectionName(r)) } func addParentField(r *parser.ParsedResource, mb *builder.MessageBuilder) { @@ -521,7 +525,7 @@ func addPathField(r *parser.ParsedResource, mb *builder.MessageBuilder) { func addResourceField(r *parser.ParsedResource, resourceMb, mb *builder.MessageBuilder) { o := &descriptorpb.FieldOptions{} proto.SetExtension(o, annotations.E_FieldBehavior, []annotations.FieldBehavior{annotations.FieldBehavior_REQUIRED}) - f := builder.NewField(strings.ToLower(r.Kind), builder.FieldTypeMessage(resourceMb)). + f := builder.NewField(utils.KebabToSnakeCase(r.Kind), builder.FieldTypeMessage(resourceMb)). SetNumber(constants.FIELD_RESOURCE_NUMBER). SetComments(builder.Comments{ LeadingComment: fmt.Sprintf("The resource to perform the operation on."), diff --git a/writer/writer_utils/utils.go b/writer/writer_utils/utils.go new file mode 100644 index 0000000..ce770f3 --- /dev/null +++ b/writer/writer_utils/utils.go @@ -0,0 +1,23 @@ +package writer_utils + +import ( + "strings" + + "github.com/aep-dev/aepc/parser" +) + +// return the collection name of the resource, but deduplicate +// the name of the previous parent +// e.g: +// - book-editions becomes editions under the parent resource book. +func CollectionName(r *parser.ParsedResource) string { + collectionName := r.Plural + if len(r.ParsedParents) > 0 { + parent := r.ParsedParents[0].Kind + // if collectionName has a prefix of parent, remove it + if strings.HasPrefix(collectionName, parent) { + collectionName = strings.TrimPrefix(collectionName, parent+"-") + } + } + return collectionName +}