1 // Code generated by protoc-gen-go. DO NOT EDIT.
2 // source: google/example/library/v1/library.proto
5 Package library is a generated protocol buffer package.
7 It is generated from these files:
8 google/example/library/v1/library.proto
10 It has these top-level messages:
29 import proto "github.com/golang/protobuf/proto"
32 import _ "google.golang.org/genproto/googleapis/api/annotations"
33 import google_protobuf1 "github.com/golang/protobuf/ptypes/empty"
36 context "golang.org/x/net/context"
37 grpc "google.golang.org/grpc"
40 // Reference imports to suppress errors if they are not otherwise used.
45 // This is a compile-time assertion to ensure that this generated file
46 // is compatible with the proto package it is being compiled against.
47 // A compilation error at this line likely means your copy of the
48 // proto package needs to be updated.
49 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
51 // A single book in the library.
53 // The resource name of the book.
54 // Book names have the form `shelves/{shelf_id}/books/{book_id}`.
55 // The name is ignored when creating a book.
56 Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
57 // The name of the book author.
58 Author string `protobuf:"bytes,2,opt,name=author" json:"author,omitempty"`
59 // The title of the book.
60 Title string `protobuf:"bytes,3,opt,name=title" json:"title,omitempty"`
61 // Value indicating whether the book has been read.
62 Read bool `protobuf:"varint,4,opt,name=read" json:"read,omitempty"`
65 func (m *Book) Reset() { *m = Book{} }
66 func (m *Book) String() string { return proto.CompactTextString(m) }
67 func (*Book) ProtoMessage() {}
68 func (*Book) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
70 func (m *Book) GetName() string {
77 func (m *Book) GetAuthor() string {
84 func (m *Book) GetTitle() string {
91 func (m *Book) GetRead() bool {
98 // A Shelf contains a collection of books with a theme.
100 // The resource name of the shelf.
101 // Shelf names have the form `shelves/{shelf_id}`.
102 // The name is ignored when creating a shelf.
103 Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
104 // The theme of the shelf
105 Theme string `protobuf:"bytes,2,opt,name=theme" json:"theme,omitempty"`
108 func (m *Shelf) Reset() { *m = Shelf{} }
109 func (m *Shelf) String() string { return proto.CompactTextString(m) }
110 func (*Shelf) ProtoMessage() {}
111 func (*Shelf) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
113 func (m *Shelf) GetName() string {
120 func (m *Shelf) GetTheme() string {
127 // Request message for LibraryService.CreateShelf.
128 type CreateShelfRequest struct {
129 // The shelf to create.
130 Shelf *Shelf `protobuf:"bytes,1,opt,name=shelf" json:"shelf,omitempty"`
133 func (m *CreateShelfRequest) Reset() { *m = CreateShelfRequest{} }
134 func (m *CreateShelfRequest) String() string { return proto.CompactTextString(m) }
135 func (*CreateShelfRequest) ProtoMessage() {}
136 func (*CreateShelfRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
138 func (m *CreateShelfRequest) GetShelf() *Shelf {
145 // Request message for LibraryService.GetShelf.
146 type GetShelfRequest struct {
147 // The name of the shelf to retrieve.
148 Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
151 func (m *GetShelfRequest) Reset() { *m = GetShelfRequest{} }
152 func (m *GetShelfRequest) String() string { return proto.CompactTextString(m) }
153 func (*GetShelfRequest) ProtoMessage() {}
154 func (*GetShelfRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
156 func (m *GetShelfRequest) GetName() string {
163 // Request message for LibraryService.ListShelves.
164 type ListShelvesRequest struct {
165 // Requested page size. Server may return fewer shelves than requested.
166 // If unspecified, server will pick an appropriate default.
167 PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize" json:"page_size,omitempty"`
168 // A token identifying a page of results the server should return.
169 // Typically, this is the value of
170 // [ListShelvesResponse.next_page_token][google.example.library.v1.ListShelvesResponse.next_page_token]
171 // returned from the previous call to `ListShelves` method.
172 PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken" json:"page_token,omitempty"`
175 func (m *ListShelvesRequest) Reset() { *m = ListShelvesRequest{} }
176 func (m *ListShelvesRequest) String() string { return proto.CompactTextString(m) }
177 func (*ListShelvesRequest) ProtoMessage() {}
178 func (*ListShelvesRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
180 func (m *ListShelvesRequest) GetPageSize() int32 {
187 func (m *ListShelvesRequest) GetPageToken() string {
194 // Response message for LibraryService.ListShelves.
195 type ListShelvesResponse struct {
196 // The list of shelves.
197 Shelves []*Shelf `protobuf:"bytes,1,rep,name=shelves" json:"shelves,omitempty"`
198 // A token to retrieve next page of results.
199 // Pass this value in the
200 // [ListShelvesRequest.page_token][google.example.library.v1.ListShelvesRequest.page_token]
201 // field in the subsequent call to `ListShelves` method to retrieve the next
203 NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken" json:"next_page_token,omitempty"`
206 func (m *ListShelvesResponse) Reset() { *m = ListShelvesResponse{} }
207 func (m *ListShelvesResponse) String() string { return proto.CompactTextString(m) }
208 func (*ListShelvesResponse) ProtoMessage() {}
209 func (*ListShelvesResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
211 func (m *ListShelvesResponse) GetShelves() []*Shelf {
218 func (m *ListShelvesResponse) GetNextPageToken() string {
220 return m.NextPageToken
225 // Request message for LibraryService.DeleteShelf.
226 type DeleteShelfRequest struct {
227 // The name of the shelf to delete.
228 Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
231 func (m *DeleteShelfRequest) Reset() { *m = DeleteShelfRequest{} }
232 func (m *DeleteShelfRequest) String() string { return proto.CompactTextString(m) }
233 func (*DeleteShelfRequest) ProtoMessage() {}
234 func (*DeleteShelfRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
236 func (m *DeleteShelfRequest) GetName() string {
243 // Describes the shelf being removed (other_shelf_name) and updated
244 // (name) in this merge.
245 type MergeShelvesRequest struct {
246 // The name of the shelf we're adding books to.
247 Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
248 // The name of the shelf we're removing books from and deleting.
249 OtherShelfName string `protobuf:"bytes,2,opt,name=other_shelf_name,json=otherShelfName" json:"other_shelf_name,omitempty"`
252 func (m *MergeShelvesRequest) Reset() { *m = MergeShelvesRequest{} }
253 func (m *MergeShelvesRequest) String() string { return proto.CompactTextString(m) }
254 func (*MergeShelvesRequest) ProtoMessage() {}
255 func (*MergeShelvesRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
257 func (m *MergeShelvesRequest) GetName() string {
264 func (m *MergeShelvesRequest) GetOtherShelfName() string {
266 return m.OtherShelfName
271 // Request message for LibraryService.CreateBook.
272 type CreateBookRequest struct {
273 // The name of the shelf in which the book is created.
274 Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
275 // The book to create.
276 Book *Book `protobuf:"bytes,2,opt,name=book" json:"book,omitempty"`
279 func (m *CreateBookRequest) Reset() { *m = CreateBookRequest{} }
280 func (m *CreateBookRequest) String() string { return proto.CompactTextString(m) }
281 func (*CreateBookRequest) ProtoMessage() {}
282 func (*CreateBookRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} }
284 func (m *CreateBookRequest) GetName() string {
291 func (m *CreateBookRequest) GetBook() *Book {
298 // Request message for LibraryService.GetBook.
299 type GetBookRequest struct {
300 // The name of the book to retrieve.
301 Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
304 func (m *GetBookRequest) Reset() { *m = GetBookRequest{} }
305 func (m *GetBookRequest) String() string { return proto.CompactTextString(m) }
306 func (*GetBookRequest) ProtoMessage() {}
307 func (*GetBookRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} }
309 func (m *GetBookRequest) GetName() string {
316 // Request message for LibraryService.ListBooks.
317 type ListBooksRequest struct {
318 // The name of the shelf whose books we'd like to list.
319 Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
320 // Requested page size. Server may return fewer books than requested.
321 // If unspecified, server will pick an appropriate default.
322 PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize" json:"page_size,omitempty"`
323 // A token identifying a page of results the server should return.
324 // Typically, this is the value of
325 // [ListBooksResponse.next_page_token][google.example.library.v1.ListBooksResponse.next_page_token].
326 // returned from the previous call to `ListBooks` method.
327 PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken" json:"page_token,omitempty"`
330 func (m *ListBooksRequest) Reset() { *m = ListBooksRequest{} }
331 func (m *ListBooksRequest) String() string { return proto.CompactTextString(m) }
332 func (*ListBooksRequest) ProtoMessage() {}
333 func (*ListBooksRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} }
335 func (m *ListBooksRequest) GetName() string {
342 func (m *ListBooksRequest) GetPageSize() int32 {
349 func (m *ListBooksRequest) GetPageToken() string {
356 // Response message for LibraryService.ListBooks.
357 type ListBooksResponse struct {
358 // The list of books.
359 Books []*Book `protobuf:"bytes,1,rep,name=books" json:"books,omitempty"`
360 // A token to retrieve next page of results.
361 // Pass this value in the
362 // [ListBooksRequest.page_token][google.example.library.v1.ListBooksRequest.page_token]
363 // field in the subsequent call to `ListBooks` method to retrieve the next
365 NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken" json:"next_page_token,omitempty"`
368 func (m *ListBooksResponse) Reset() { *m = ListBooksResponse{} }
369 func (m *ListBooksResponse) String() string { return proto.CompactTextString(m) }
370 func (*ListBooksResponse) ProtoMessage() {}
371 func (*ListBooksResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} }
373 func (m *ListBooksResponse) GetBooks() []*Book {
380 func (m *ListBooksResponse) GetNextPageToken() string {
382 return m.NextPageToken
387 // Request message for LibraryService.UpdateBook.
388 type UpdateBookRequest struct {
389 // The name of the book to update.
390 Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
391 // The book to update with. The name must match or be empty.
392 Book *Book `protobuf:"bytes,2,opt,name=book" json:"book,omitempty"`
395 func (m *UpdateBookRequest) Reset() { *m = UpdateBookRequest{} }
396 func (m *UpdateBookRequest) String() string { return proto.CompactTextString(m) }
397 func (*UpdateBookRequest) ProtoMessage() {}
398 func (*UpdateBookRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} }
400 func (m *UpdateBookRequest) GetName() string {
407 func (m *UpdateBookRequest) GetBook() *Book {
414 // Request message for LibraryService.DeleteBook.
415 type DeleteBookRequest struct {
416 // The name of the book to delete.
417 Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
420 func (m *DeleteBookRequest) Reset() { *m = DeleteBookRequest{} }
421 func (m *DeleteBookRequest) String() string { return proto.CompactTextString(m) }
422 func (*DeleteBookRequest) ProtoMessage() {}
423 func (*DeleteBookRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} }
425 func (m *DeleteBookRequest) GetName() string {
432 // Describes what book to move (name) and what shelf we're moving it
433 // to (other_shelf_name).
434 type MoveBookRequest struct {
435 // The name of the book to move.
436 Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
437 // The name of the destination shelf.
438 OtherShelfName string `protobuf:"bytes,2,opt,name=other_shelf_name,json=otherShelfName" json:"other_shelf_name,omitempty"`
441 func (m *MoveBookRequest) Reset() { *m = MoveBookRequest{} }
442 func (m *MoveBookRequest) String() string { return proto.CompactTextString(m) }
443 func (*MoveBookRequest) ProtoMessage() {}
444 func (*MoveBookRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} }
446 func (m *MoveBookRequest) GetName() string {
453 func (m *MoveBookRequest) GetOtherShelfName() string {
455 return m.OtherShelfName
461 proto.RegisterType((*Book)(nil), "google.example.library.v1.Book")
462 proto.RegisterType((*Shelf)(nil), "google.example.library.v1.Shelf")
463 proto.RegisterType((*CreateShelfRequest)(nil), "google.example.library.v1.CreateShelfRequest")
464 proto.RegisterType((*GetShelfRequest)(nil), "google.example.library.v1.GetShelfRequest")
465 proto.RegisterType((*ListShelvesRequest)(nil), "google.example.library.v1.ListShelvesRequest")
466 proto.RegisterType((*ListShelvesResponse)(nil), "google.example.library.v1.ListShelvesResponse")
467 proto.RegisterType((*DeleteShelfRequest)(nil), "google.example.library.v1.DeleteShelfRequest")
468 proto.RegisterType((*MergeShelvesRequest)(nil), "google.example.library.v1.MergeShelvesRequest")
469 proto.RegisterType((*CreateBookRequest)(nil), "google.example.library.v1.CreateBookRequest")
470 proto.RegisterType((*GetBookRequest)(nil), "google.example.library.v1.GetBookRequest")
471 proto.RegisterType((*ListBooksRequest)(nil), "google.example.library.v1.ListBooksRequest")
472 proto.RegisterType((*ListBooksResponse)(nil), "google.example.library.v1.ListBooksResponse")
473 proto.RegisterType((*UpdateBookRequest)(nil), "google.example.library.v1.UpdateBookRequest")
474 proto.RegisterType((*DeleteBookRequest)(nil), "google.example.library.v1.DeleteBookRequest")
475 proto.RegisterType((*MoveBookRequest)(nil), "google.example.library.v1.MoveBookRequest")
478 // Reference imports to suppress errors if they are not otherwise used.
479 var _ context.Context
480 var _ grpc.ClientConn
482 // This is a compile-time assertion to ensure that this generated file
483 // is compatible with the grpc package it is being compiled against.
484 const _ = grpc.SupportPackageIsVersion4
486 // Client API for LibraryService service
488 type LibraryServiceClient interface {
489 // Creates a shelf, and returns the new Shelf.
490 CreateShelf(ctx context.Context, in *CreateShelfRequest, opts ...grpc.CallOption) (*Shelf, error)
491 // Gets a shelf. Returns NOT_FOUND if the shelf does not exist.
492 GetShelf(ctx context.Context, in *GetShelfRequest, opts ...grpc.CallOption) (*Shelf, error)
493 // Lists shelves. The order is unspecified but deterministic. Newly created
494 // shelves will not necessarily be added to the end of this list.
495 ListShelves(ctx context.Context, in *ListShelvesRequest, opts ...grpc.CallOption) (*ListShelvesResponse, error)
496 // Deletes a shelf. Returns NOT_FOUND if the shelf does not exist.
497 DeleteShelf(ctx context.Context, in *DeleteShelfRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error)
498 // Merges two shelves by adding all books from the shelf named
499 // `other_shelf_name` to shelf `name`, and deletes
500 // `other_shelf_name`. Returns the updated shelf.
501 // The book ids of the moved books may not be the same as the original books.
503 // Returns NOT_FOUND if either shelf does not exist.
504 // This call is a no-op if the specified shelves are the same.
505 MergeShelves(ctx context.Context, in *MergeShelvesRequest, opts ...grpc.CallOption) (*Shelf, error)
506 // Creates a book, and returns the new Book.
507 CreateBook(ctx context.Context, in *CreateBookRequest, opts ...grpc.CallOption) (*Book, error)
508 // Gets a book. Returns NOT_FOUND if the book does not exist.
509 GetBook(ctx context.Context, in *GetBookRequest, opts ...grpc.CallOption) (*Book, error)
510 // Lists books in a shelf. The order is unspecified but deterministic. Newly
511 // created books will not necessarily be added to the end of this list.
512 // Returns NOT_FOUND if the shelf does not exist.
513 ListBooks(ctx context.Context, in *ListBooksRequest, opts ...grpc.CallOption) (*ListBooksResponse, error)
514 // Deletes a book. Returns NOT_FOUND if the book does not exist.
515 DeleteBook(ctx context.Context, in *DeleteBookRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error)
516 // Updates a book. Returns INVALID_ARGUMENT if the name of the book
517 // is non-empty and does equal the previous name.
518 UpdateBook(ctx context.Context, in *UpdateBookRequest, opts ...grpc.CallOption) (*Book, error)
519 // Moves a book to another shelf, and returns the new book. The book
520 // id of the new book may not be the same as the original book.
521 MoveBook(ctx context.Context, in *MoveBookRequest, opts ...grpc.CallOption) (*Book, error)
524 type libraryServiceClient struct {
528 func NewLibraryServiceClient(cc *grpc.ClientConn) LibraryServiceClient {
529 return &libraryServiceClient{cc}
532 func (c *libraryServiceClient) CreateShelf(ctx context.Context, in *CreateShelfRequest, opts ...grpc.CallOption) (*Shelf, error) {
534 err := grpc.Invoke(ctx, "/google.example.library.v1.LibraryService/CreateShelf", in, out, c.cc, opts...)
541 func (c *libraryServiceClient) GetShelf(ctx context.Context, in *GetShelfRequest, opts ...grpc.CallOption) (*Shelf, error) {
543 err := grpc.Invoke(ctx, "/google.example.library.v1.LibraryService/GetShelf", in, out, c.cc, opts...)
550 func (c *libraryServiceClient) ListShelves(ctx context.Context, in *ListShelvesRequest, opts ...grpc.CallOption) (*ListShelvesResponse, error) {
551 out := new(ListShelvesResponse)
552 err := grpc.Invoke(ctx, "/google.example.library.v1.LibraryService/ListShelves", in, out, c.cc, opts...)
559 func (c *libraryServiceClient) DeleteShelf(ctx context.Context, in *DeleteShelfRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) {
560 out := new(google_protobuf1.Empty)
561 err := grpc.Invoke(ctx, "/google.example.library.v1.LibraryService/DeleteShelf", in, out, c.cc, opts...)
568 func (c *libraryServiceClient) MergeShelves(ctx context.Context, in *MergeShelvesRequest, opts ...grpc.CallOption) (*Shelf, error) {
570 err := grpc.Invoke(ctx, "/google.example.library.v1.LibraryService/MergeShelves", in, out, c.cc, opts...)
577 func (c *libraryServiceClient) CreateBook(ctx context.Context, in *CreateBookRequest, opts ...grpc.CallOption) (*Book, error) {
579 err := grpc.Invoke(ctx, "/google.example.library.v1.LibraryService/CreateBook", in, out, c.cc, opts...)
586 func (c *libraryServiceClient) GetBook(ctx context.Context, in *GetBookRequest, opts ...grpc.CallOption) (*Book, error) {
588 err := grpc.Invoke(ctx, "/google.example.library.v1.LibraryService/GetBook", in, out, c.cc, opts...)
595 func (c *libraryServiceClient) ListBooks(ctx context.Context, in *ListBooksRequest, opts ...grpc.CallOption) (*ListBooksResponse, error) {
596 out := new(ListBooksResponse)
597 err := grpc.Invoke(ctx, "/google.example.library.v1.LibraryService/ListBooks", in, out, c.cc, opts...)
604 func (c *libraryServiceClient) DeleteBook(ctx context.Context, in *DeleteBookRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) {
605 out := new(google_protobuf1.Empty)
606 err := grpc.Invoke(ctx, "/google.example.library.v1.LibraryService/DeleteBook", in, out, c.cc, opts...)
613 func (c *libraryServiceClient) UpdateBook(ctx context.Context, in *UpdateBookRequest, opts ...grpc.CallOption) (*Book, error) {
615 err := grpc.Invoke(ctx, "/google.example.library.v1.LibraryService/UpdateBook", in, out, c.cc, opts...)
622 func (c *libraryServiceClient) MoveBook(ctx context.Context, in *MoveBookRequest, opts ...grpc.CallOption) (*Book, error) {
624 err := grpc.Invoke(ctx, "/google.example.library.v1.LibraryService/MoveBook", in, out, c.cc, opts...)
631 // Server API for LibraryService service
633 type LibraryServiceServer interface {
634 // Creates a shelf, and returns the new Shelf.
635 CreateShelf(context.Context, *CreateShelfRequest) (*Shelf, error)
636 // Gets a shelf. Returns NOT_FOUND if the shelf does not exist.
637 GetShelf(context.Context, *GetShelfRequest) (*Shelf, error)
638 // Lists shelves. The order is unspecified but deterministic. Newly created
639 // shelves will not necessarily be added to the end of this list.
640 ListShelves(context.Context, *ListShelvesRequest) (*ListShelvesResponse, error)
641 // Deletes a shelf. Returns NOT_FOUND if the shelf does not exist.
642 DeleteShelf(context.Context, *DeleteShelfRequest) (*google_protobuf1.Empty, error)
643 // Merges two shelves by adding all books from the shelf named
644 // `other_shelf_name` to shelf `name`, and deletes
645 // `other_shelf_name`. Returns the updated shelf.
646 // The book ids of the moved books may not be the same as the original books.
648 // Returns NOT_FOUND if either shelf does not exist.
649 // This call is a no-op if the specified shelves are the same.
650 MergeShelves(context.Context, *MergeShelvesRequest) (*Shelf, error)
651 // Creates a book, and returns the new Book.
652 CreateBook(context.Context, *CreateBookRequest) (*Book, error)
653 // Gets a book. Returns NOT_FOUND if the book does not exist.
654 GetBook(context.Context, *GetBookRequest) (*Book, error)
655 // Lists books in a shelf. The order is unspecified but deterministic. Newly
656 // created books will not necessarily be added to the end of this list.
657 // Returns NOT_FOUND if the shelf does not exist.
658 ListBooks(context.Context, *ListBooksRequest) (*ListBooksResponse, error)
659 // Deletes a book. Returns NOT_FOUND if the book does not exist.
660 DeleteBook(context.Context, *DeleteBookRequest) (*google_protobuf1.Empty, error)
661 // Updates a book. Returns INVALID_ARGUMENT if the name of the book
662 // is non-empty and does equal the previous name.
663 UpdateBook(context.Context, *UpdateBookRequest) (*Book, error)
664 // Moves a book to another shelf, and returns the new book. The book
665 // id of the new book may not be the same as the original book.
666 MoveBook(context.Context, *MoveBookRequest) (*Book, error)
669 func RegisterLibraryServiceServer(s *grpc.Server, srv LibraryServiceServer) {
670 s.RegisterService(&_LibraryService_serviceDesc, srv)
673 func _LibraryService_CreateShelf_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
674 in := new(CreateShelfRequest)
675 if err := dec(in); err != nil {
678 if interceptor == nil {
679 return srv.(LibraryServiceServer).CreateShelf(ctx, in)
681 info := &grpc.UnaryServerInfo{
683 FullMethod: "/google.example.library.v1.LibraryService/CreateShelf",
685 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
686 return srv.(LibraryServiceServer).CreateShelf(ctx, req.(*CreateShelfRequest))
688 return interceptor(ctx, in, info, handler)
691 func _LibraryService_GetShelf_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
692 in := new(GetShelfRequest)
693 if err := dec(in); err != nil {
696 if interceptor == nil {
697 return srv.(LibraryServiceServer).GetShelf(ctx, in)
699 info := &grpc.UnaryServerInfo{
701 FullMethod: "/google.example.library.v1.LibraryService/GetShelf",
703 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
704 return srv.(LibraryServiceServer).GetShelf(ctx, req.(*GetShelfRequest))
706 return interceptor(ctx, in, info, handler)
709 func _LibraryService_ListShelves_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
710 in := new(ListShelvesRequest)
711 if err := dec(in); err != nil {
714 if interceptor == nil {
715 return srv.(LibraryServiceServer).ListShelves(ctx, in)
717 info := &grpc.UnaryServerInfo{
719 FullMethod: "/google.example.library.v1.LibraryService/ListShelves",
721 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
722 return srv.(LibraryServiceServer).ListShelves(ctx, req.(*ListShelvesRequest))
724 return interceptor(ctx, in, info, handler)
727 func _LibraryService_DeleteShelf_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
728 in := new(DeleteShelfRequest)
729 if err := dec(in); err != nil {
732 if interceptor == nil {
733 return srv.(LibraryServiceServer).DeleteShelf(ctx, in)
735 info := &grpc.UnaryServerInfo{
737 FullMethod: "/google.example.library.v1.LibraryService/DeleteShelf",
739 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
740 return srv.(LibraryServiceServer).DeleteShelf(ctx, req.(*DeleteShelfRequest))
742 return interceptor(ctx, in, info, handler)
745 func _LibraryService_MergeShelves_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
746 in := new(MergeShelvesRequest)
747 if err := dec(in); err != nil {
750 if interceptor == nil {
751 return srv.(LibraryServiceServer).MergeShelves(ctx, in)
753 info := &grpc.UnaryServerInfo{
755 FullMethod: "/google.example.library.v1.LibraryService/MergeShelves",
757 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
758 return srv.(LibraryServiceServer).MergeShelves(ctx, req.(*MergeShelvesRequest))
760 return interceptor(ctx, in, info, handler)
763 func _LibraryService_CreateBook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
764 in := new(CreateBookRequest)
765 if err := dec(in); err != nil {
768 if interceptor == nil {
769 return srv.(LibraryServiceServer).CreateBook(ctx, in)
771 info := &grpc.UnaryServerInfo{
773 FullMethod: "/google.example.library.v1.LibraryService/CreateBook",
775 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
776 return srv.(LibraryServiceServer).CreateBook(ctx, req.(*CreateBookRequest))
778 return interceptor(ctx, in, info, handler)
781 func _LibraryService_GetBook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
782 in := new(GetBookRequest)
783 if err := dec(in); err != nil {
786 if interceptor == nil {
787 return srv.(LibraryServiceServer).GetBook(ctx, in)
789 info := &grpc.UnaryServerInfo{
791 FullMethod: "/google.example.library.v1.LibraryService/GetBook",
793 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
794 return srv.(LibraryServiceServer).GetBook(ctx, req.(*GetBookRequest))
796 return interceptor(ctx, in, info, handler)
799 func _LibraryService_ListBooks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
800 in := new(ListBooksRequest)
801 if err := dec(in); err != nil {
804 if interceptor == nil {
805 return srv.(LibraryServiceServer).ListBooks(ctx, in)
807 info := &grpc.UnaryServerInfo{
809 FullMethod: "/google.example.library.v1.LibraryService/ListBooks",
811 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
812 return srv.(LibraryServiceServer).ListBooks(ctx, req.(*ListBooksRequest))
814 return interceptor(ctx, in, info, handler)
817 func _LibraryService_DeleteBook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
818 in := new(DeleteBookRequest)
819 if err := dec(in); err != nil {
822 if interceptor == nil {
823 return srv.(LibraryServiceServer).DeleteBook(ctx, in)
825 info := &grpc.UnaryServerInfo{
827 FullMethod: "/google.example.library.v1.LibraryService/DeleteBook",
829 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
830 return srv.(LibraryServiceServer).DeleteBook(ctx, req.(*DeleteBookRequest))
832 return interceptor(ctx, in, info, handler)
835 func _LibraryService_UpdateBook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
836 in := new(UpdateBookRequest)
837 if err := dec(in); err != nil {
840 if interceptor == nil {
841 return srv.(LibraryServiceServer).UpdateBook(ctx, in)
843 info := &grpc.UnaryServerInfo{
845 FullMethod: "/google.example.library.v1.LibraryService/UpdateBook",
847 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
848 return srv.(LibraryServiceServer).UpdateBook(ctx, req.(*UpdateBookRequest))
850 return interceptor(ctx, in, info, handler)
853 func _LibraryService_MoveBook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
854 in := new(MoveBookRequest)
855 if err := dec(in); err != nil {
858 if interceptor == nil {
859 return srv.(LibraryServiceServer).MoveBook(ctx, in)
861 info := &grpc.UnaryServerInfo{
863 FullMethod: "/google.example.library.v1.LibraryService/MoveBook",
865 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
866 return srv.(LibraryServiceServer).MoveBook(ctx, req.(*MoveBookRequest))
868 return interceptor(ctx, in, info, handler)
871 var _LibraryService_serviceDesc = grpc.ServiceDesc{
872 ServiceName: "google.example.library.v1.LibraryService",
873 HandlerType: (*LibraryServiceServer)(nil),
874 Methods: []grpc.MethodDesc{
876 MethodName: "CreateShelf",
877 Handler: _LibraryService_CreateShelf_Handler,
880 MethodName: "GetShelf",
881 Handler: _LibraryService_GetShelf_Handler,
884 MethodName: "ListShelves",
885 Handler: _LibraryService_ListShelves_Handler,
888 MethodName: "DeleteShelf",
889 Handler: _LibraryService_DeleteShelf_Handler,
892 MethodName: "MergeShelves",
893 Handler: _LibraryService_MergeShelves_Handler,
896 MethodName: "CreateBook",
897 Handler: _LibraryService_CreateBook_Handler,
900 MethodName: "GetBook",
901 Handler: _LibraryService_GetBook_Handler,
904 MethodName: "ListBooks",
905 Handler: _LibraryService_ListBooks_Handler,
908 MethodName: "DeleteBook",
909 Handler: _LibraryService_DeleteBook_Handler,
912 MethodName: "UpdateBook",
913 Handler: _LibraryService_UpdateBook_Handler,
916 MethodName: "MoveBook",
917 Handler: _LibraryService_MoveBook_Handler,
920 Streams: []grpc.StreamDesc{},
921 Metadata: "google/example/library/v1/library.proto",
924 func init() { proto.RegisterFile("google/example/library/v1/library.proto", fileDescriptor0) }
926 var fileDescriptor0 = []byte{
927 // 838 bytes of a gzipped FileDescriptorProto
928 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xdb, 0x4e, 0xdb, 0x48,
929 0x18, 0x96, 0x21, 0x81, 0xf0, 0x87, 0x53, 0x06, 0x84, 0xb2, 0x26, 0x2c, 0xd9, 0x11, 0x87, 0x6c,
930 0x96, 0xb5, 0x05, 0x68, 0xf7, 0x22, 0x55, 0xa5, 0x8a, 0xb6, 0xe2, 0x06, 0xda, 0x28, 0x69, 0x6f,
931 0x2a, 0xa4, 0xc8, 0x81, 0xc1, 0xb1, 0x48, 0x3c, 0xc6, 0x36, 0x11, 0x07, 0xf5, 0xa2, 0x95, 0x10,
932 0x52, 0x6f, 0xfb, 0x0a, 0x7d, 0xa3, 0xbe, 0x42, 0x1f, 0xa4, 0x9a, 0x83, 0xc1, 0x24, 0x66, 0x9c,
933 0x5e, 0xf4, 0xce, 0x33, 0xf3, 0xcd, 0xf7, 0x7f, 0xff, 0x61, 0xbe, 0x04, 0x36, 0x6d, 0x4a, 0xed,
934 0x2e, 0x31, 0xc9, 0xa5, 0xd5, 0xf3, 0xba, 0xc4, 0xec, 0x3a, 0x6d, 0xdf, 0xf2, 0xaf, 0xcc, 0xfe,
935 0x76, 0xf4, 0x69, 0x78, 0x3e, 0x0d, 0x29, 0xfa, 0x43, 0x00, 0x0d, 0x09, 0x34, 0xa2, 0xd3, 0xfe,
936 0xb6, 0x5e, 0x92, 0x1c, 0x96, 0xe7, 0x98, 0x96, 0xeb, 0xd2, 0xd0, 0x0a, 0x1d, 0xea, 0x06, 0xe2,
937 0xa2, 0xbe, 0x2c, 0x4f, 0xf9, 0xaa, 0x7d, 0x71, 0x6a, 0x92, 0x9e, 0x17, 0x4a, 0x56, 0x7c, 0x04,
938 0x99, 0x3d, 0x4a, 0xcf, 0x10, 0x82, 0x8c, 0x6b, 0xf5, 0x48, 0x51, 0x2b, 0x6b, 0x95, 0xa9, 0x06,
939 0xff, 0x46, 0x4b, 0x30, 0x61, 0x5d, 0x84, 0x1d, 0xea, 0x17, 0xc7, 0xf8, 0xae, 0x5c, 0xa1, 0x45,
940 0xc8, 0x86, 0x4e, 0xd8, 0x25, 0xc5, 0x71, 0xbe, 0x2d, 0x16, 0x8c, 0xc1, 0x27, 0xd6, 0x49, 0x31,
941 0x53, 0xd6, 0x2a, 0xb9, 0x06, 0xff, 0xc6, 0xdb, 0x90, 0x6d, 0x76, 0x48, 0xf7, 0x34, 0x91, 0x9e,
942 0xd1, 0x74, 0x48, 0x8f, 0x48, 0x76, 0xb1, 0xc0, 0x07, 0x80, 0x5e, 0xfa, 0xc4, 0x0a, 0x09, 0xbf,
943 0xd8, 0x20, 0xe7, 0x17, 0x24, 0x08, 0xd1, 0xff, 0x90, 0x0d, 0xd8, 0x9a, 0x13, 0xe4, 0x77, 0xca,
944 0xc6, 0x93, 0xc5, 0x30, 0xc4, 0x3d, 0x01, 0xc7, 0xeb, 0x30, 0xb7, 0x4f, 0xc2, 0x47, 0x54, 0x09,
945 0x52, 0x70, 0x1d, 0xd0, 0x81, 0x13, 0x70, 0x5c, 0x9f, 0x04, 0x11, 0x72, 0x19, 0xa6, 0x3c, 0xcb,
946 0x26, 0xad, 0xc0, 0xb9, 0x16, 0xf0, 0x6c, 0x23, 0xc7, 0x36, 0x9a, 0xce, 0x35, 0x41, 0x2b, 0x00,
947 0xfc, 0x30, 0xa4, 0x67, 0xc4, 0x95, 0x29, 0x70, 0xf8, 0x3b, 0xb6, 0x81, 0xaf, 0x60, 0xe1, 0x11,
948 0x63, 0xe0, 0x51, 0x37, 0x20, 0xa8, 0x06, 0x93, 0x81, 0xd8, 0x2a, 0x6a, 0xe5, 0xf1, 0x91, 0x32,
949 0x89, 0x2e, 0xa0, 0x0d, 0x98, 0x73, 0xc9, 0x65, 0xd8, 0x1a, 0x0a, 0x3b, 0xc3, 0xb6, 0xeb, 0xf7,
950 0xa1, 0x2b, 0x80, 0x5e, 0x91, 0x2e, 0x19, 0xa8, 0x60, 0x52, 0xda, 0x4d, 0x58, 0x38, 0x24, 0xbe,
951 0x4d, 0x06, 0xf2, 0x4e, 0x6a, 0x56, 0x05, 0xe6, 0x69, 0xd8, 0x21, 0x7e, 0x8b, 0xd7, 0xb5, 0xc5,
952 0xcf, 0x45, 0xf4, 0x59, 0xbe, 0xcf, 0x63, 0xbd, 0x61, 0xa4, 0x47, 0x50, 0x10, 0x0d, 0x64, 0x73,
953 0xa5, 0xa2, 0xdc, 0x85, 0x4c, 0x9b, 0xd2, 0x33, 0x4e, 0x93, 0xdf, 0x59, 0x55, 0x14, 0x82, 0x33,
954 0x71, 0x30, 0x5e, 0x83, 0xd9, 0x7d, 0x12, 0xa6, 0x50, 0xe3, 0x36, 0xcc, 0xb3, 0xea, 0x33, 0x98,
955 0x32, 0xab, 0x47, 0x1d, 0x1e, 0x53, 0x76, 0x78, 0x7c, 0xb0, 0xc3, 0x3e, 0x14, 0x62, 0x31, 0x64,
956 0x7f, 0xff, 0x83, 0x2c, 0x93, 0x19, 0x75, 0x37, 0x35, 0x29, 0x81, 0x1e, 0xb9, 0xb5, 0x47, 0x50,
957 0x78, 0xef, 0x9d, 0xfc, 0xae, 0xda, 0x6e, 0x42, 0x41, 0x0c, 0x4e, 0x5a, 0x79, 0xdf, 0xc2, 0xdc,
958 0x21, 0xed, 0xa7, 0x8a, 0x18, 0x79, 0x66, 0x76, 0xbe, 0xe5, 0x61, 0xf6, 0x40, 0x68, 0x6a, 0x12,
959 0xbf, 0xef, 0x1c, 0x13, 0x74, 0x0d, 0xf9, 0x98, 0x0f, 0xa0, 0x7f, 0x15, 0x29, 0x0c, 0xfb, 0x85,
960 0x9e, 0xfa, 0xac, 0xb0, 0xfe, 0xf9, 0xfb, 0x8f, 0xaf, 0x63, 0x8b, 0x38, 0xcf, 0x9c, 0x56, 0x3e,
961 0xb1, 0x9a, 0x70, 0x0d, 0xd4, 0x87, 0x5c, 0xe4, 0x1a, 0xa8, 0xaa, 0x60, 0x1a, 0xb0, 0x96, 0x11,
962 0xa2, 0x96, 0x78, 0xd4, 0x25, 0xb4, 0xc8, 0xa2, 0xde, 0xb0, 0x8a, 0x3c, 0x97, 0xb1, 0xcd, 0xea,
963 0x47, 0xf4, 0x49, 0x83, 0x7c, 0xcc, 0x35, 0x94, 0x49, 0x0f, 0xfb, 0x95, 0x6e, 0x8c, 0x0a, 0x17,
964 0xc3, 0x8a, 0x17, 0xb8, 0x98, 0x19, 0x14, 0x2f, 0x01, 0xf2, 0x21, 0x1f, 0x73, 0x0f, 0xa5, 0x84,
965 0x61, 0x97, 0xd1, 0x97, 0x22, 0x78, 0xf4, 0x63, 0x63, 0xbc, 0x66, 0x3f, 0x36, 0x51, 0xde, 0xd5,
966 0xe4, 0xbc, 0xef, 0x34, 0x98, 0x8e, 0x1b, 0x11, 0x52, 0x65, 0x92, 0xe0, 0x58, 0x23, 0x14, 0x7e,
967 0x9d, 0x0b, 0x58, 0xc5, 0x7a, 0x92, 0x80, 0x5a, 0x8f, 0x71, 0xd6, 0xb4, 0x2a, 0xba, 0xd5, 0x00,
968 0x1e, 0xdc, 0x0b, 0x6d, 0xa5, 0x4e, 0x5d, 0xec, 0x0d, 0xe8, 0x69, 0xcf, 0x0c, 0x57, 0xb8, 0x08,
969 0x9c, 0x2c, 0xc2, 0xe4, 0x56, 0x50, 0xe3, 0x4f, 0x11, 0xdd, 0xc0, 0xa4, 0xb4, 0x39, 0xf4, 0xb7,
970 0x7a, 0x00, 0x7f, 0x49, 0xc0, 0x1a, 0x17, 0xf0, 0x27, 0x2a, 0x25, 0x08, 0x10, 0xf1, 0x59, 0x3b,
971 0xbe, 0x68, 0x30, 0x75, 0x6f, 0x6d, 0xe8, 0x9f, 0x94, 0xa9, 0x8a, 0x9b, 0xac, 0xbe, 0x35, 0x1a,
972 0x58, 0x0e, 0x20, 0xe6, 0x72, 0x4a, 0x48, 0x51, 0x0f, 0x74, 0x09, 0xf0, 0x60, 0x4a, 0xca, 0x86,
973 0x0c, 0x79, 0xd7, 0x93, 0xd3, 0x28, 0xcb, 0x50, 0x55, 0x97, 0xe1, 0x4e, 0x03, 0x78, 0x70, 0x5b,
974 0x65, 0xe8, 0x21, 0x53, 0x4e, 0x6f, 0x45, 0x95, 0x6b, 0x58, 0xd3, 0x95, 0x1a, 0xe4, 0x34, 0xdc,
975 0x6a, 0x90, 0x8b, 0x0c, 0x57, 0x69, 0x48, 0x03, 0xae, 0x9c, 0xae, 0x62, 0x8b, 0xab, 0xd8, 0xc0,
976 0x7f, 0x29, 0x55, 0xf4, 0x68, 0x9f, 0xbd, 0x8e, 0xbd, 0x73, 0x58, 0x39, 0xa6, 0xbd, 0xa7, 0x39,
977 0xf7, 0xa6, 0xa5, 0x89, 0xd7, 0x59, 0xbd, 0xeb, 0xda, 0x87, 0x17, 0x12, 0x6a, 0xd3, 0xae, 0xe5,
978 0xda, 0x06, 0xf5, 0x6d, 0xd3, 0x26, 0x2e, 0xef, 0x86, 0x29, 0x8e, 0x2c, 0xcf, 0x09, 0x12, 0xfe,
979 0xfb, 0x3e, 0x93, 0x9f, 0xed, 0x09, 0x0e, 0xde, 0xfd, 0x19, 0x00, 0x00, 0xff, 0xff, 0x2b, 0x13,
980 0xc5, 0x7e, 0x27, 0x0b, 0x00, 0x00,