選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 

1291 行
49 KiB

  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: google/example/library/v1/library.proto
  3. package library // import "google.golang.org/genproto/googleapis/example/library/v1"
  4. import proto "github.com/golang/protobuf/proto"
  5. import fmt "fmt"
  6. import math "math"
  7. import empty "github.com/golang/protobuf/ptypes/empty"
  8. import _ "google.golang.org/genproto/googleapis/api/annotations"
  9. import (
  10. context "golang.org/x/net/context"
  11. grpc "google.golang.org/grpc"
  12. )
  13. // Reference imports to suppress errors if they are not otherwise used.
  14. var _ = proto.Marshal
  15. var _ = fmt.Errorf
  16. var _ = math.Inf
  17. // This is a compile-time assertion to ensure that this generated file
  18. // is compatible with the proto package it is being compiled against.
  19. // A compilation error at this line likely means your copy of the
  20. // proto package needs to be updated.
  21. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  22. // A single book in the library.
  23. type Book struct {
  24. // The resource name of the book.
  25. // Book names have the form `shelves/{shelf_id}/books/{book_id}`.
  26. // The name is ignored when creating a book.
  27. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  28. // The name of the book author.
  29. Author string `protobuf:"bytes,2,opt,name=author,proto3" json:"author,omitempty"`
  30. // The title of the book.
  31. Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"`
  32. // Value indicating whether the book has been read.
  33. Read bool `protobuf:"varint,4,opt,name=read,proto3" json:"read,omitempty"`
  34. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  35. XXX_unrecognized []byte `json:"-"`
  36. XXX_sizecache int32 `json:"-"`
  37. }
  38. func (m *Book) Reset() { *m = Book{} }
  39. func (m *Book) String() string { return proto.CompactTextString(m) }
  40. func (*Book) ProtoMessage() {}
  41. func (*Book) Descriptor() ([]byte, []int) {
  42. return fileDescriptor_library_b70933aae91bc85e, []int{0}
  43. }
  44. func (m *Book) XXX_Unmarshal(b []byte) error {
  45. return xxx_messageInfo_Book.Unmarshal(m, b)
  46. }
  47. func (m *Book) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  48. return xxx_messageInfo_Book.Marshal(b, m, deterministic)
  49. }
  50. func (dst *Book) XXX_Merge(src proto.Message) {
  51. xxx_messageInfo_Book.Merge(dst, src)
  52. }
  53. func (m *Book) XXX_Size() int {
  54. return xxx_messageInfo_Book.Size(m)
  55. }
  56. func (m *Book) XXX_DiscardUnknown() {
  57. xxx_messageInfo_Book.DiscardUnknown(m)
  58. }
  59. var xxx_messageInfo_Book proto.InternalMessageInfo
  60. func (m *Book) GetName() string {
  61. if m != nil {
  62. return m.Name
  63. }
  64. return ""
  65. }
  66. func (m *Book) GetAuthor() string {
  67. if m != nil {
  68. return m.Author
  69. }
  70. return ""
  71. }
  72. func (m *Book) GetTitle() string {
  73. if m != nil {
  74. return m.Title
  75. }
  76. return ""
  77. }
  78. func (m *Book) GetRead() bool {
  79. if m != nil {
  80. return m.Read
  81. }
  82. return false
  83. }
  84. // A Shelf contains a collection of books with a theme.
  85. type Shelf struct {
  86. // The resource name of the shelf.
  87. // Shelf names have the form `shelves/{shelf_id}`.
  88. // The name is ignored when creating a shelf.
  89. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  90. // The theme of the shelf
  91. Theme string `protobuf:"bytes,2,opt,name=theme,proto3" json:"theme,omitempty"`
  92. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  93. XXX_unrecognized []byte `json:"-"`
  94. XXX_sizecache int32 `json:"-"`
  95. }
  96. func (m *Shelf) Reset() { *m = Shelf{} }
  97. func (m *Shelf) String() string { return proto.CompactTextString(m) }
  98. func (*Shelf) ProtoMessage() {}
  99. func (*Shelf) Descriptor() ([]byte, []int) {
  100. return fileDescriptor_library_b70933aae91bc85e, []int{1}
  101. }
  102. func (m *Shelf) XXX_Unmarshal(b []byte) error {
  103. return xxx_messageInfo_Shelf.Unmarshal(m, b)
  104. }
  105. func (m *Shelf) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  106. return xxx_messageInfo_Shelf.Marshal(b, m, deterministic)
  107. }
  108. func (dst *Shelf) XXX_Merge(src proto.Message) {
  109. xxx_messageInfo_Shelf.Merge(dst, src)
  110. }
  111. func (m *Shelf) XXX_Size() int {
  112. return xxx_messageInfo_Shelf.Size(m)
  113. }
  114. func (m *Shelf) XXX_DiscardUnknown() {
  115. xxx_messageInfo_Shelf.DiscardUnknown(m)
  116. }
  117. var xxx_messageInfo_Shelf proto.InternalMessageInfo
  118. func (m *Shelf) GetName() string {
  119. if m != nil {
  120. return m.Name
  121. }
  122. return ""
  123. }
  124. func (m *Shelf) GetTheme() string {
  125. if m != nil {
  126. return m.Theme
  127. }
  128. return ""
  129. }
  130. // Request message for LibraryService.CreateShelf.
  131. type CreateShelfRequest struct {
  132. // The shelf to create.
  133. Shelf *Shelf `protobuf:"bytes,1,opt,name=shelf,proto3" json:"shelf,omitempty"`
  134. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  135. XXX_unrecognized []byte `json:"-"`
  136. XXX_sizecache int32 `json:"-"`
  137. }
  138. func (m *CreateShelfRequest) Reset() { *m = CreateShelfRequest{} }
  139. func (m *CreateShelfRequest) String() string { return proto.CompactTextString(m) }
  140. func (*CreateShelfRequest) ProtoMessage() {}
  141. func (*CreateShelfRequest) Descriptor() ([]byte, []int) {
  142. return fileDescriptor_library_b70933aae91bc85e, []int{2}
  143. }
  144. func (m *CreateShelfRequest) XXX_Unmarshal(b []byte) error {
  145. return xxx_messageInfo_CreateShelfRequest.Unmarshal(m, b)
  146. }
  147. func (m *CreateShelfRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  148. return xxx_messageInfo_CreateShelfRequest.Marshal(b, m, deterministic)
  149. }
  150. func (dst *CreateShelfRequest) XXX_Merge(src proto.Message) {
  151. xxx_messageInfo_CreateShelfRequest.Merge(dst, src)
  152. }
  153. func (m *CreateShelfRequest) XXX_Size() int {
  154. return xxx_messageInfo_CreateShelfRequest.Size(m)
  155. }
  156. func (m *CreateShelfRequest) XXX_DiscardUnknown() {
  157. xxx_messageInfo_CreateShelfRequest.DiscardUnknown(m)
  158. }
  159. var xxx_messageInfo_CreateShelfRequest proto.InternalMessageInfo
  160. func (m *CreateShelfRequest) GetShelf() *Shelf {
  161. if m != nil {
  162. return m.Shelf
  163. }
  164. return nil
  165. }
  166. // Request message for LibraryService.GetShelf.
  167. type GetShelfRequest struct {
  168. // The name of the shelf to retrieve.
  169. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  170. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  171. XXX_unrecognized []byte `json:"-"`
  172. XXX_sizecache int32 `json:"-"`
  173. }
  174. func (m *GetShelfRequest) Reset() { *m = GetShelfRequest{} }
  175. func (m *GetShelfRequest) String() string { return proto.CompactTextString(m) }
  176. func (*GetShelfRequest) ProtoMessage() {}
  177. func (*GetShelfRequest) Descriptor() ([]byte, []int) {
  178. return fileDescriptor_library_b70933aae91bc85e, []int{3}
  179. }
  180. func (m *GetShelfRequest) XXX_Unmarshal(b []byte) error {
  181. return xxx_messageInfo_GetShelfRequest.Unmarshal(m, b)
  182. }
  183. func (m *GetShelfRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  184. return xxx_messageInfo_GetShelfRequest.Marshal(b, m, deterministic)
  185. }
  186. func (dst *GetShelfRequest) XXX_Merge(src proto.Message) {
  187. xxx_messageInfo_GetShelfRequest.Merge(dst, src)
  188. }
  189. func (m *GetShelfRequest) XXX_Size() int {
  190. return xxx_messageInfo_GetShelfRequest.Size(m)
  191. }
  192. func (m *GetShelfRequest) XXX_DiscardUnknown() {
  193. xxx_messageInfo_GetShelfRequest.DiscardUnknown(m)
  194. }
  195. var xxx_messageInfo_GetShelfRequest proto.InternalMessageInfo
  196. func (m *GetShelfRequest) GetName() string {
  197. if m != nil {
  198. return m.Name
  199. }
  200. return ""
  201. }
  202. // Request message for LibraryService.ListShelves.
  203. type ListShelvesRequest struct {
  204. // Requested page size. Server may return fewer shelves than requested.
  205. // If unspecified, server will pick an appropriate default.
  206. PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
  207. // A token identifying a page of results the server should return.
  208. // Typically, this is the value of
  209. // [ListShelvesResponse.next_page_token][google.example.library.v1.ListShelvesResponse.next_page_token]
  210. // returned from the previous call to `ListShelves` method.
  211. PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
  212. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  213. XXX_unrecognized []byte `json:"-"`
  214. XXX_sizecache int32 `json:"-"`
  215. }
  216. func (m *ListShelvesRequest) Reset() { *m = ListShelvesRequest{} }
  217. func (m *ListShelvesRequest) String() string { return proto.CompactTextString(m) }
  218. func (*ListShelvesRequest) ProtoMessage() {}
  219. func (*ListShelvesRequest) Descriptor() ([]byte, []int) {
  220. return fileDescriptor_library_b70933aae91bc85e, []int{4}
  221. }
  222. func (m *ListShelvesRequest) XXX_Unmarshal(b []byte) error {
  223. return xxx_messageInfo_ListShelvesRequest.Unmarshal(m, b)
  224. }
  225. func (m *ListShelvesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  226. return xxx_messageInfo_ListShelvesRequest.Marshal(b, m, deterministic)
  227. }
  228. func (dst *ListShelvesRequest) XXX_Merge(src proto.Message) {
  229. xxx_messageInfo_ListShelvesRequest.Merge(dst, src)
  230. }
  231. func (m *ListShelvesRequest) XXX_Size() int {
  232. return xxx_messageInfo_ListShelvesRequest.Size(m)
  233. }
  234. func (m *ListShelvesRequest) XXX_DiscardUnknown() {
  235. xxx_messageInfo_ListShelvesRequest.DiscardUnknown(m)
  236. }
  237. var xxx_messageInfo_ListShelvesRequest proto.InternalMessageInfo
  238. func (m *ListShelvesRequest) GetPageSize() int32 {
  239. if m != nil {
  240. return m.PageSize
  241. }
  242. return 0
  243. }
  244. func (m *ListShelvesRequest) GetPageToken() string {
  245. if m != nil {
  246. return m.PageToken
  247. }
  248. return ""
  249. }
  250. // Response message for LibraryService.ListShelves.
  251. type ListShelvesResponse struct {
  252. // The list of shelves.
  253. Shelves []*Shelf `protobuf:"bytes,1,rep,name=shelves,proto3" json:"shelves,omitempty"`
  254. // A token to retrieve next page of results.
  255. // Pass this value in the
  256. // [ListShelvesRequest.page_token][google.example.library.v1.ListShelvesRequest.page_token]
  257. // field in the subsequent call to `ListShelves` method to retrieve the next
  258. // page of results.
  259. NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
  260. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  261. XXX_unrecognized []byte `json:"-"`
  262. XXX_sizecache int32 `json:"-"`
  263. }
  264. func (m *ListShelvesResponse) Reset() { *m = ListShelvesResponse{} }
  265. func (m *ListShelvesResponse) String() string { return proto.CompactTextString(m) }
  266. func (*ListShelvesResponse) ProtoMessage() {}
  267. func (*ListShelvesResponse) Descriptor() ([]byte, []int) {
  268. return fileDescriptor_library_b70933aae91bc85e, []int{5}
  269. }
  270. func (m *ListShelvesResponse) XXX_Unmarshal(b []byte) error {
  271. return xxx_messageInfo_ListShelvesResponse.Unmarshal(m, b)
  272. }
  273. func (m *ListShelvesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  274. return xxx_messageInfo_ListShelvesResponse.Marshal(b, m, deterministic)
  275. }
  276. func (dst *ListShelvesResponse) XXX_Merge(src proto.Message) {
  277. xxx_messageInfo_ListShelvesResponse.Merge(dst, src)
  278. }
  279. func (m *ListShelvesResponse) XXX_Size() int {
  280. return xxx_messageInfo_ListShelvesResponse.Size(m)
  281. }
  282. func (m *ListShelvesResponse) XXX_DiscardUnknown() {
  283. xxx_messageInfo_ListShelvesResponse.DiscardUnknown(m)
  284. }
  285. var xxx_messageInfo_ListShelvesResponse proto.InternalMessageInfo
  286. func (m *ListShelvesResponse) GetShelves() []*Shelf {
  287. if m != nil {
  288. return m.Shelves
  289. }
  290. return nil
  291. }
  292. func (m *ListShelvesResponse) GetNextPageToken() string {
  293. if m != nil {
  294. return m.NextPageToken
  295. }
  296. return ""
  297. }
  298. // Request message for LibraryService.DeleteShelf.
  299. type DeleteShelfRequest struct {
  300. // The name of the shelf to delete.
  301. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  302. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  303. XXX_unrecognized []byte `json:"-"`
  304. XXX_sizecache int32 `json:"-"`
  305. }
  306. func (m *DeleteShelfRequest) Reset() { *m = DeleteShelfRequest{} }
  307. func (m *DeleteShelfRequest) String() string { return proto.CompactTextString(m) }
  308. func (*DeleteShelfRequest) ProtoMessage() {}
  309. func (*DeleteShelfRequest) Descriptor() ([]byte, []int) {
  310. return fileDescriptor_library_b70933aae91bc85e, []int{6}
  311. }
  312. func (m *DeleteShelfRequest) XXX_Unmarshal(b []byte) error {
  313. return xxx_messageInfo_DeleteShelfRequest.Unmarshal(m, b)
  314. }
  315. func (m *DeleteShelfRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  316. return xxx_messageInfo_DeleteShelfRequest.Marshal(b, m, deterministic)
  317. }
  318. func (dst *DeleteShelfRequest) XXX_Merge(src proto.Message) {
  319. xxx_messageInfo_DeleteShelfRequest.Merge(dst, src)
  320. }
  321. func (m *DeleteShelfRequest) XXX_Size() int {
  322. return xxx_messageInfo_DeleteShelfRequest.Size(m)
  323. }
  324. func (m *DeleteShelfRequest) XXX_DiscardUnknown() {
  325. xxx_messageInfo_DeleteShelfRequest.DiscardUnknown(m)
  326. }
  327. var xxx_messageInfo_DeleteShelfRequest proto.InternalMessageInfo
  328. func (m *DeleteShelfRequest) GetName() string {
  329. if m != nil {
  330. return m.Name
  331. }
  332. return ""
  333. }
  334. // Describes the shelf being removed (other_shelf_name) and updated
  335. // (name) in this merge.
  336. type MergeShelvesRequest struct {
  337. // The name of the shelf we're adding books to.
  338. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  339. // The name of the shelf we're removing books from and deleting.
  340. OtherShelfName string `protobuf:"bytes,2,opt,name=other_shelf_name,json=otherShelfName,proto3" json:"other_shelf_name,omitempty"`
  341. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  342. XXX_unrecognized []byte `json:"-"`
  343. XXX_sizecache int32 `json:"-"`
  344. }
  345. func (m *MergeShelvesRequest) Reset() { *m = MergeShelvesRequest{} }
  346. func (m *MergeShelvesRequest) String() string { return proto.CompactTextString(m) }
  347. func (*MergeShelvesRequest) ProtoMessage() {}
  348. func (*MergeShelvesRequest) Descriptor() ([]byte, []int) {
  349. return fileDescriptor_library_b70933aae91bc85e, []int{7}
  350. }
  351. func (m *MergeShelvesRequest) XXX_Unmarshal(b []byte) error {
  352. return xxx_messageInfo_MergeShelvesRequest.Unmarshal(m, b)
  353. }
  354. func (m *MergeShelvesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  355. return xxx_messageInfo_MergeShelvesRequest.Marshal(b, m, deterministic)
  356. }
  357. func (dst *MergeShelvesRequest) XXX_Merge(src proto.Message) {
  358. xxx_messageInfo_MergeShelvesRequest.Merge(dst, src)
  359. }
  360. func (m *MergeShelvesRequest) XXX_Size() int {
  361. return xxx_messageInfo_MergeShelvesRequest.Size(m)
  362. }
  363. func (m *MergeShelvesRequest) XXX_DiscardUnknown() {
  364. xxx_messageInfo_MergeShelvesRequest.DiscardUnknown(m)
  365. }
  366. var xxx_messageInfo_MergeShelvesRequest proto.InternalMessageInfo
  367. func (m *MergeShelvesRequest) GetName() string {
  368. if m != nil {
  369. return m.Name
  370. }
  371. return ""
  372. }
  373. func (m *MergeShelvesRequest) GetOtherShelfName() string {
  374. if m != nil {
  375. return m.OtherShelfName
  376. }
  377. return ""
  378. }
  379. // Request message for LibraryService.CreateBook.
  380. type CreateBookRequest struct {
  381. // The name of the shelf in which the book is created.
  382. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  383. // The book to create.
  384. Book *Book `protobuf:"bytes,2,opt,name=book,proto3" json:"book,omitempty"`
  385. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  386. XXX_unrecognized []byte `json:"-"`
  387. XXX_sizecache int32 `json:"-"`
  388. }
  389. func (m *CreateBookRequest) Reset() { *m = CreateBookRequest{} }
  390. func (m *CreateBookRequest) String() string { return proto.CompactTextString(m) }
  391. func (*CreateBookRequest) ProtoMessage() {}
  392. func (*CreateBookRequest) Descriptor() ([]byte, []int) {
  393. return fileDescriptor_library_b70933aae91bc85e, []int{8}
  394. }
  395. func (m *CreateBookRequest) XXX_Unmarshal(b []byte) error {
  396. return xxx_messageInfo_CreateBookRequest.Unmarshal(m, b)
  397. }
  398. func (m *CreateBookRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  399. return xxx_messageInfo_CreateBookRequest.Marshal(b, m, deterministic)
  400. }
  401. func (dst *CreateBookRequest) XXX_Merge(src proto.Message) {
  402. xxx_messageInfo_CreateBookRequest.Merge(dst, src)
  403. }
  404. func (m *CreateBookRequest) XXX_Size() int {
  405. return xxx_messageInfo_CreateBookRequest.Size(m)
  406. }
  407. func (m *CreateBookRequest) XXX_DiscardUnknown() {
  408. xxx_messageInfo_CreateBookRequest.DiscardUnknown(m)
  409. }
  410. var xxx_messageInfo_CreateBookRequest proto.InternalMessageInfo
  411. func (m *CreateBookRequest) GetName() string {
  412. if m != nil {
  413. return m.Name
  414. }
  415. return ""
  416. }
  417. func (m *CreateBookRequest) GetBook() *Book {
  418. if m != nil {
  419. return m.Book
  420. }
  421. return nil
  422. }
  423. // Request message for LibraryService.GetBook.
  424. type GetBookRequest struct {
  425. // The name of the book to retrieve.
  426. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  427. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  428. XXX_unrecognized []byte `json:"-"`
  429. XXX_sizecache int32 `json:"-"`
  430. }
  431. func (m *GetBookRequest) Reset() { *m = GetBookRequest{} }
  432. func (m *GetBookRequest) String() string { return proto.CompactTextString(m) }
  433. func (*GetBookRequest) ProtoMessage() {}
  434. func (*GetBookRequest) Descriptor() ([]byte, []int) {
  435. return fileDescriptor_library_b70933aae91bc85e, []int{9}
  436. }
  437. func (m *GetBookRequest) XXX_Unmarshal(b []byte) error {
  438. return xxx_messageInfo_GetBookRequest.Unmarshal(m, b)
  439. }
  440. func (m *GetBookRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  441. return xxx_messageInfo_GetBookRequest.Marshal(b, m, deterministic)
  442. }
  443. func (dst *GetBookRequest) XXX_Merge(src proto.Message) {
  444. xxx_messageInfo_GetBookRequest.Merge(dst, src)
  445. }
  446. func (m *GetBookRequest) XXX_Size() int {
  447. return xxx_messageInfo_GetBookRequest.Size(m)
  448. }
  449. func (m *GetBookRequest) XXX_DiscardUnknown() {
  450. xxx_messageInfo_GetBookRequest.DiscardUnknown(m)
  451. }
  452. var xxx_messageInfo_GetBookRequest proto.InternalMessageInfo
  453. func (m *GetBookRequest) GetName() string {
  454. if m != nil {
  455. return m.Name
  456. }
  457. return ""
  458. }
  459. // Request message for LibraryService.ListBooks.
  460. type ListBooksRequest struct {
  461. // The name of the shelf whose books we'd like to list.
  462. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  463. // Requested page size. Server may return fewer books than requested.
  464. // If unspecified, server will pick an appropriate default.
  465. PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
  466. // A token identifying a page of results the server should return.
  467. // Typically, this is the value of
  468. // [ListBooksResponse.next_page_token][google.example.library.v1.ListBooksResponse.next_page_token].
  469. // returned from the previous call to `ListBooks` method.
  470. PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
  471. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  472. XXX_unrecognized []byte `json:"-"`
  473. XXX_sizecache int32 `json:"-"`
  474. }
  475. func (m *ListBooksRequest) Reset() { *m = ListBooksRequest{} }
  476. func (m *ListBooksRequest) String() string { return proto.CompactTextString(m) }
  477. func (*ListBooksRequest) ProtoMessage() {}
  478. func (*ListBooksRequest) Descriptor() ([]byte, []int) {
  479. return fileDescriptor_library_b70933aae91bc85e, []int{10}
  480. }
  481. func (m *ListBooksRequest) XXX_Unmarshal(b []byte) error {
  482. return xxx_messageInfo_ListBooksRequest.Unmarshal(m, b)
  483. }
  484. func (m *ListBooksRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  485. return xxx_messageInfo_ListBooksRequest.Marshal(b, m, deterministic)
  486. }
  487. func (dst *ListBooksRequest) XXX_Merge(src proto.Message) {
  488. xxx_messageInfo_ListBooksRequest.Merge(dst, src)
  489. }
  490. func (m *ListBooksRequest) XXX_Size() int {
  491. return xxx_messageInfo_ListBooksRequest.Size(m)
  492. }
  493. func (m *ListBooksRequest) XXX_DiscardUnknown() {
  494. xxx_messageInfo_ListBooksRequest.DiscardUnknown(m)
  495. }
  496. var xxx_messageInfo_ListBooksRequest proto.InternalMessageInfo
  497. func (m *ListBooksRequest) GetName() string {
  498. if m != nil {
  499. return m.Name
  500. }
  501. return ""
  502. }
  503. func (m *ListBooksRequest) GetPageSize() int32 {
  504. if m != nil {
  505. return m.PageSize
  506. }
  507. return 0
  508. }
  509. func (m *ListBooksRequest) GetPageToken() string {
  510. if m != nil {
  511. return m.PageToken
  512. }
  513. return ""
  514. }
  515. // Response message for LibraryService.ListBooks.
  516. type ListBooksResponse struct {
  517. // The list of books.
  518. Books []*Book `protobuf:"bytes,1,rep,name=books,proto3" json:"books,omitempty"`
  519. // A token to retrieve next page of results.
  520. // Pass this value in the
  521. // [ListBooksRequest.page_token][google.example.library.v1.ListBooksRequest.page_token]
  522. // field in the subsequent call to `ListBooks` method to retrieve the next
  523. // page of results.
  524. NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
  525. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  526. XXX_unrecognized []byte `json:"-"`
  527. XXX_sizecache int32 `json:"-"`
  528. }
  529. func (m *ListBooksResponse) Reset() { *m = ListBooksResponse{} }
  530. func (m *ListBooksResponse) String() string { return proto.CompactTextString(m) }
  531. func (*ListBooksResponse) ProtoMessage() {}
  532. func (*ListBooksResponse) Descriptor() ([]byte, []int) {
  533. return fileDescriptor_library_b70933aae91bc85e, []int{11}
  534. }
  535. func (m *ListBooksResponse) XXX_Unmarshal(b []byte) error {
  536. return xxx_messageInfo_ListBooksResponse.Unmarshal(m, b)
  537. }
  538. func (m *ListBooksResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  539. return xxx_messageInfo_ListBooksResponse.Marshal(b, m, deterministic)
  540. }
  541. func (dst *ListBooksResponse) XXX_Merge(src proto.Message) {
  542. xxx_messageInfo_ListBooksResponse.Merge(dst, src)
  543. }
  544. func (m *ListBooksResponse) XXX_Size() int {
  545. return xxx_messageInfo_ListBooksResponse.Size(m)
  546. }
  547. func (m *ListBooksResponse) XXX_DiscardUnknown() {
  548. xxx_messageInfo_ListBooksResponse.DiscardUnknown(m)
  549. }
  550. var xxx_messageInfo_ListBooksResponse proto.InternalMessageInfo
  551. func (m *ListBooksResponse) GetBooks() []*Book {
  552. if m != nil {
  553. return m.Books
  554. }
  555. return nil
  556. }
  557. func (m *ListBooksResponse) GetNextPageToken() string {
  558. if m != nil {
  559. return m.NextPageToken
  560. }
  561. return ""
  562. }
  563. // Request message for LibraryService.UpdateBook.
  564. type UpdateBookRequest struct {
  565. // The name of the book to update.
  566. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  567. // The book to update with. The name must match or be empty.
  568. Book *Book `protobuf:"bytes,2,opt,name=book,proto3" json:"book,omitempty"`
  569. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  570. XXX_unrecognized []byte `json:"-"`
  571. XXX_sizecache int32 `json:"-"`
  572. }
  573. func (m *UpdateBookRequest) Reset() { *m = UpdateBookRequest{} }
  574. func (m *UpdateBookRequest) String() string { return proto.CompactTextString(m) }
  575. func (*UpdateBookRequest) ProtoMessage() {}
  576. func (*UpdateBookRequest) Descriptor() ([]byte, []int) {
  577. return fileDescriptor_library_b70933aae91bc85e, []int{12}
  578. }
  579. func (m *UpdateBookRequest) XXX_Unmarshal(b []byte) error {
  580. return xxx_messageInfo_UpdateBookRequest.Unmarshal(m, b)
  581. }
  582. func (m *UpdateBookRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  583. return xxx_messageInfo_UpdateBookRequest.Marshal(b, m, deterministic)
  584. }
  585. func (dst *UpdateBookRequest) XXX_Merge(src proto.Message) {
  586. xxx_messageInfo_UpdateBookRequest.Merge(dst, src)
  587. }
  588. func (m *UpdateBookRequest) XXX_Size() int {
  589. return xxx_messageInfo_UpdateBookRequest.Size(m)
  590. }
  591. func (m *UpdateBookRequest) XXX_DiscardUnknown() {
  592. xxx_messageInfo_UpdateBookRequest.DiscardUnknown(m)
  593. }
  594. var xxx_messageInfo_UpdateBookRequest proto.InternalMessageInfo
  595. func (m *UpdateBookRequest) GetName() string {
  596. if m != nil {
  597. return m.Name
  598. }
  599. return ""
  600. }
  601. func (m *UpdateBookRequest) GetBook() *Book {
  602. if m != nil {
  603. return m.Book
  604. }
  605. return nil
  606. }
  607. // Request message for LibraryService.DeleteBook.
  608. type DeleteBookRequest struct {
  609. // The name of the book to delete.
  610. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  611. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  612. XXX_unrecognized []byte `json:"-"`
  613. XXX_sizecache int32 `json:"-"`
  614. }
  615. func (m *DeleteBookRequest) Reset() { *m = DeleteBookRequest{} }
  616. func (m *DeleteBookRequest) String() string { return proto.CompactTextString(m) }
  617. func (*DeleteBookRequest) ProtoMessage() {}
  618. func (*DeleteBookRequest) Descriptor() ([]byte, []int) {
  619. return fileDescriptor_library_b70933aae91bc85e, []int{13}
  620. }
  621. func (m *DeleteBookRequest) XXX_Unmarshal(b []byte) error {
  622. return xxx_messageInfo_DeleteBookRequest.Unmarshal(m, b)
  623. }
  624. func (m *DeleteBookRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  625. return xxx_messageInfo_DeleteBookRequest.Marshal(b, m, deterministic)
  626. }
  627. func (dst *DeleteBookRequest) XXX_Merge(src proto.Message) {
  628. xxx_messageInfo_DeleteBookRequest.Merge(dst, src)
  629. }
  630. func (m *DeleteBookRequest) XXX_Size() int {
  631. return xxx_messageInfo_DeleteBookRequest.Size(m)
  632. }
  633. func (m *DeleteBookRequest) XXX_DiscardUnknown() {
  634. xxx_messageInfo_DeleteBookRequest.DiscardUnknown(m)
  635. }
  636. var xxx_messageInfo_DeleteBookRequest proto.InternalMessageInfo
  637. func (m *DeleteBookRequest) GetName() string {
  638. if m != nil {
  639. return m.Name
  640. }
  641. return ""
  642. }
  643. // Describes what book to move (name) and what shelf we're moving it
  644. // to (other_shelf_name).
  645. type MoveBookRequest struct {
  646. // The name of the book to move.
  647. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  648. // The name of the destination shelf.
  649. OtherShelfName string `protobuf:"bytes,2,opt,name=other_shelf_name,json=otherShelfName,proto3" json:"other_shelf_name,omitempty"`
  650. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  651. XXX_unrecognized []byte `json:"-"`
  652. XXX_sizecache int32 `json:"-"`
  653. }
  654. func (m *MoveBookRequest) Reset() { *m = MoveBookRequest{} }
  655. func (m *MoveBookRequest) String() string { return proto.CompactTextString(m) }
  656. func (*MoveBookRequest) ProtoMessage() {}
  657. func (*MoveBookRequest) Descriptor() ([]byte, []int) {
  658. return fileDescriptor_library_b70933aae91bc85e, []int{14}
  659. }
  660. func (m *MoveBookRequest) XXX_Unmarshal(b []byte) error {
  661. return xxx_messageInfo_MoveBookRequest.Unmarshal(m, b)
  662. }
  663. func (m *MoveBookRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  664. return xxx_messageInfo_MoveBookRequest.Marshal(b, m, deterministic)
  665. }
  666. func (dst *MoveBookRequest) XXX_Merge(src proto.Message) {
  667. xxx_messageInfo_MoveBookRequest.Merge(dst, src)
  668. }
  669. func (m *MoveBookRequest) XXX_Size() int {
  670. return xxx_messageInfo_MoveBookRequest.Size(m)
  671. }
  672. func (m *MoveBookRequest) XXX_DiscardUnknown() {
  673. xxx_messageInfo_MoveBookRequest.DiscardUnknown(m)
  674. }
  675. var xxx_messageInfo_MoveBookRequest proto.InternalMessageInfo
  676. func (m *MoveBookRequest) GetName() string {
  677. if m != nil {
  678. return m.Name
  679. }
  680. return ""
  681. }
  682. func (m *MoveBookRequest) GetOtherShelfName() string {
  683. if m != nil {
  684. return m.OtherShelfName
  685. }
  686. return ""
  687. }
  688. func init() {
  689. proto.RegisterType((*Book)(nil), "google.example.library.v1.Book")
  690. proto.RegisterType((*Shelf)(nil), "google.example.library.v1.Shelf")
  691. proto.RegisterType((*CreateShelfRequest)(nil), "google.example.library.v1.CreateShelfRequest")
  692. proto.RegisterType((*GetShelfRequest)(nil), "google.example.library.v1.GetShelfRequest")
  693. proto.RegisterType((*ListShelvesRequest)(nil), "google.example.library.v1.ListShelvesRequest")
  694. proto.RegisterType((*ListShelvesResponse)(nil), "google.example.library.v1.ListShelvesResponse")
  695. proto.RegisterType((*DeleteShelfRequest)(nil), "google.example.library.v1.DeleteShelfRequest")
  696. proto.RegisterType((*MergeShelvesRequest)(nil), "google.example.library.v1.MergeShelvesRequest")
  697. proto.RegisterType((*CreateBookRequest)(nil), "google.example.library.v1.CreateBookRequest")
  698. proto.RegisterType((*GetBookRequest)(nil), "google.example.library.v1.GetBookRequest")
  699. proto.RegisterType((*ListBooksRequest)(nil), "google.example.library.v1.ListBooksRequest")
  700. proto.RegisterType((*ListBooksResponse)(nil), "google.example.library.v1.ListBooksResponse")
  701. proto.RegisterType((*UpdateBookRequest)(nil), "google.example.library.v1.UpdateBookRequest")
  702. proto.RegisterType((*DeleteBookRequest)(nil), "google.example.library.v1.DeleteBookRequest")
  703. proto.RegisterType((*MoveBookRequest)(nil), "google.example.library.v1.MoveBookRequest")
  704. }
  705. // Reference imports to suppress errors if they are not otherwise used.
  706. var _ context.Context
  707. var _ grpc.ClientConn
  708. // This is a compile-time assertion to ensure that this generated file
  709. // is compatible with the grpc package it is being compiled against.
  710. const _ = grpc.SupportPackageIsVersion4
  711. // LibraryServiceClient is the client API for LibraryService service.
  712. //
  713. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  714. type LibraryServiceClient interface {
  715. // Creates a shelf, and returns the new Shelf.
  716. CreateShelf(ctx context.Context, in *CreateShelfRequest, opts ...grpc.CallOption) (*Shelf, error)
  717. // Gets a shelf. Returns NOT_FOUND if the shelf does not exist.
  718. GetShelf(ctx context.Context, in *GetShelfRequest, opts ...grpc.CallOption) (*Shelf, error)
  719. // Lists shelves. The order is unspecified but deterministic. Newly created
  720. // shelves will not necessarily be added to the end of this list.
  721. ListShelves(ctx context.Context, in *ListShelvesRequest, opts ...grpc.CallOption) (*ListShelvesResponse, error)
  722. // Deletes a shelf. Returns NOT_FOUND if the shelf does not exist.
  723. DeleteShelf(ctx context.Context, in *DeleteShelfRequest, opts ...grpc.CallOption) (*empty.Empty, error)
  724. // Merges two shelves by adding all books from the shelf named
  725. // `other_shelf_name` to shelf `name`, and deletes
  726. // `other_shelf_name`. Returns the updated shelf.
  727. // The book ids of the moved books may not be the same as the original books.
  728. //
  729. // Returns NOT_FOUND if either shelf does not exist.
  730. // This call is a no-op if the specified shelves are the same.
  731. MergeShelves(ctx context.Context, in *MergeShelvesRequest, opts ...grpc.CallOption) (*Shelf, error)
  732. // Creates a book, and returns the new Book.
  733. CreateBook(ctx context.Context, in *CreateBookRequest, opts ...grpc.CallOption) (*Book, error)
  734. // Gets a book. Returns NOT_FOUND if the book does not exist.
  735. GetBook(ctx context.Context, in *GetBookRequest, opts ...grpc.CallOption) (*Book, error)
  736. // Lists books in a shelf. The order is unspecified but deterministic. Newly
  737. // created books will not necessarily be added to the end of this list.
  738. // Returns NOT_FOUND if the shelf does not exist.
  739. ListBooks(ctx context.Context, in *ListBooksRequest, opts ...grpc.CallOption) (*ListBooksResponse, error)
  740. // Deletes a book. Returns NOT_FOUND if the book does not exist.
  741. DeleteBook(ctx context.Context, in *DeleteBookRequest, opts ...grpc.CallOption) (*empty.Empty, error)
  742. // Updates a book. Returns INVALID_ARGUMENT if the name of the book
  743. // is non-empty and does equal the previous name.
  744. UpdateBook(ctx context.Context, in *UpdateBookRequest, opts ...grpc.CallOption) (*Book, error)
  745. // Moves a book to another shelf, and returns the new book. The book
  746. // id of the new book may not be the same as the original book.
  747. MoveBook(ctx context.Context, in *MoveBookRequest, opts ...grpc.CallOption) (*Book, error)
  748. }
  749. type libraryServiceClient struct {
  750. cc *grpc.ClientConn
  751. }
  752. func NewLibraryServiceClient(cc *grpc.ClientConn) LibraryServiceClient {
  753. return &libraryServiceClient{cc}
  754. }
  755. func (c *libraryServiceClient) CreateShelf(ctx context.Context, in *CreateShelfRequest, opts ...grpc.CallOption) (*Shelf, error) {
  756. out := new(Shelf)
  757. err := c.cc.Invoke(ctx, "/google.example.library.v1.LibraryService/CreateShelf", in, out, opts...)
  758. if err != nil {
  759. return nil, err
  760. }
  761. return out, nil
  762. }
  763. func (c *libraryServiceClient) GetShelf(ctx context.Context, in *GetShelfRequest, opts ...grpc.CallOption) (*Shelf, error) {
  764. out := new(Shelf)
  765. err := c.cc.Invoke(ctx, "/google.example.library.v1.LibraryService/GetShelf", in, out, opts...)
  766. if err != nil {
  767. return nil, err
  768. }
  769. return out, nil
  770. }
  771. func (c *libraryServiceClient) ListShelves(ctx context.Context, in *ListShelvesRequest, opts ...grpc.CallOption) (*ListShelvesResponse, error) {
  772. out := new(ListShelvesResponse)
  773. err := c.cc.Invoke(ctx, "/google.example.library.v1.LibraryService/ListShelves", in, out, opts...)
  774. if err != nil {
  775. return nil, err
  776. }
  777. return out, nil
  778. }
  779. func (c *libraryServiceClient) DeleteShelf(ctx context.Context, in *DeleteShelfRequest, opts ...grpc.CallOption) (*empty.Empty, error) {
  780. out := new(empty.Empty)
  781. err := c.cc.Invoke(ctx, "/google.example.library.v1.LibraryService/DeleteShelf", in, out, opts...)
  782. if err != nil {
  783. return nil, err
  784. }
  785. return out, nil
  786. }
  787. func (c *libraryServiceClient) MergeShelves(ctx context.Context, in *MergeShelvesRequest, opts ...grpc.CallOption) (*Shelf, error) {
  788. out := new(Shelf)
  789. err := c.cc.Invoke(ctx, "/google.example.library.v1.LibraryService/MergeShelves", in, out, opts...)
  790. if err != nil {
  791. return nil, err
  792. }
  793. return out, nil
  794. }
  795. func (c *libraryServiceClient) CreateBook(ctx context.Context, in *CreateBookRequest, opts ...grpc.CallOption) (*Book, error) {
  796. out := new(Book)
  797. err := c.cc.Invoke(ctx, "/google.example.library.v1.LibraryService/CreateBook", in, out, opts...)
  798. if err != nil {
  799. return nil, err
  800. }
  801. return out, nil
  802. }
  803. func (c *libraryServiceClient) GetBook(ctx context.Context, in *GetBookRequest, opts ...grpc.CallOption) (*Book, error) {
  804. out := new(Book)
  805. err := c.cc.Invoke(ctx, "/google.example.library.v1.LibraryService/GetBook", in, out, opts...)
  806. if err != nil {
  807. return nil, err
  808. }
  809. return out, nil
  810. }
  811. func (c *libraryServiceClient) ListBooks(ctx context.Context, in *ListBooksRequest, opts ...grpc.CallOption) (*ListBooksResponse, error) {
  812. out := new(ListBooksResponse)
  813. err := c.cc.Invoke(ctx, "/google.example.library.v1.LibraryService/ListBooks", in, out, opts...)
  814. if err != nil {
  815. return nil, err
  816. }
  817. return out, nil
  818. }
  819. func (c *libraryServiceClient) DeleteBook(ctx context.Context, in *DeleteBookRequest, opts ...grpc.CallOption) (*empty.Empty, error) {
  820. out := new(empty.Empty)
  821. err := c.cc.Invoke(ctx, "/google.example.library.v1.LibraryService/DeleteBook", in, out, opts...)
  822. if err != nil {
  823. return nil, err
  824. }
  825. return out, nil
  826. }
  827. func (c *libraryServiceClient) UpdateBook(ctx context.Context, in *UpdateBookRequest, opts ...grpc.CallOption) (*Book, error) {
  828. out := new(Book)
  829. err := c.cc.Invoke(ctx, "/google.example.library.v1.LibraryService/UpdateBook", in, out, opts...)
  830. if err != nil {
  831. return nil, err
  832. }
  833. return out, nil
  834. }
  835. func (c *libraryServiceClient) MoveBook(ctx context.Context, in *MoveBookRequest, opts ...grpc.CallOption) (*Book, error) {
  836. out := new(Book)
  837. err := c.cc.Invoke(ctx, "/google.example.library.v1.LibraryService/MoveBook", in, out, opts...)
  838. if err != nil {
  839. return nil, err
  840. }
  841. return out, nil
  842. }
  843. // LibraryServiceServer is the server API for LibraryService service.
  844. type LibraryServiceServer interface {
  845. // Creates a shelf, and returns the new Shelf.
  846. CreateShelf(context.Context, *CreateShelfRequest) (*Shelf, error)
  847. // Gets a shelf. Returns NOT_FOUND if the shelf does not exist.
  848. GetShelf(context.Context, *GetShelfRequest) (*Shelf, error)
  849. // Lists shelves. The order is unspecified but deterministic. Newly created
  850. // shelves will not necessarily be added to the end of this list.
  851. ListShelves(context.Context, *ListShelvesRequest) (*ListShelvesResponse, error)
  852. // Deletes a shelf. Returns NOT_FOUND if the shelf does not exist.
  853. DeleteShelf(context.Context, *DeleteShelfRequest) (*empty.Empty, error)
  854. // Merges two shelves by adding all books from the shelf named
  855. // `other_shelf_name` to shelf `name`, and deletes
  856. // `other_shelf_name`. Returns the updated shelf.
  857. // The book ids of the moved books may not be the same as the original books.
  858. //
  859. // Returns NOT_FOUND if either shelf does not exist.
  860. // This call is a no-op if the specified shelves are the same.
  861. MergeShelves(context.Context, *MergeShelvesRequest) (*Shelf, error)
  862. // Creates a book, and returns the new Book.
  863. CreateBook(context.Context, *CreateBookRequest) (*Book, error)
  864. // Gets a book. Returns NOT_FOUND if the book does not exist.
  865. GetBook(context.Context, *GetBookRequest) (*Book, error)
  866. // Lists books in a shelf. The order is unspecified but deterministic. Newly
  867. // created books will not necessarily be added to the end of this list.
  868. // Returns NOT_FOUND if the shelf does not exist.
  869. ListBooks(context.Context, *ListBooksRequest) (*ListBooksResponse, error)
  870. // Deletes a book. Returns NOT_FOUND if the book does not exist.
  871. DeleteBook(context.Context, *DeleteBookRequest) (*empty.Empty, error)
  872. // Updates a book. Returns INVALID_ARGUMENT if the name of the book
  873. // is non-empty and does equal the previous name.
  874. UpdateBook(context.Context, *UpdateBookRequest) (*Book, error)
  875. // Moves a book to another shelf, and returns the new book. The book
  876. // id of the new book may not be the same as the original book.
  877. MoveBook(context.Context, *MoveBookRequest) (*Book, error)
  878. }
  879. func RegisterLibraryServiceServer(s *grpc.Server, srv LibraryServiceServer) {
  880. s.RegisterService(&_LibraryService_serviceDesc, srv)
  881. }
  882. func _LibraryService_CreateShelf_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  883. in := new(CreateShelfRequest)
  884. if err := dec(in); err != nil {
  885. return nil, err
  886. }
  887. if interceptor == nil {
  888. return srv.(LibraryServiceServer).CreateShelf(ctx, in)
  889. }
  890. info := &grpc.UnaryServerInfo{
  891. Server: srv,
  892. FullMethod: "/google.example.library.v1.LibraryService/CreateShelf",
  893. }
  894. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  895. return srv.(LibraryServiceServer).CreateShelf(ctx, req.(*CreateShelfRequest))
  896. }
  897. return interceptor(ctx, in, info, handler)
  898. }
  899. func _LibraryService_GetShelf_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  900. in := new(GetShelfRequest)
  901. if err := dec(in); err != nil {
  902. return nil, err
  903. }
  904. if interceptor == nil {
  905. return srv.(LibraryServiceServer).GetShelf(ctx, in)
  906. }
  907. info := &grpc.UnaryServerInfo{
  908. Server: srv,
  909. FullMethod: "/google.example.library.v1.LibraryService/GetShelf",
  910. }
  911. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  912. return srv.(LibraryServiceServer).GetShelf(ctx, req.(*GetShelfRequest))
  913. }
  914. return interceptor(ctx, in, info, handler)
  915. }
  916. func _LibraryService_ListShelves_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  917. in := new(ListShelvesRequest)
  918. if err := dec(in); err != nil {
  919. return nil, err
  920. }
  921. if interceptor == nil {
  922. return srv.(LibraryServiceServer).ListShelves(ctx, in)
  923. }
  924. info := &grpc.UnaryServerInfo{
  925. Server: srv,
  926. FullMethod: "/google.example.library.v1.LibraryService/ListShelves",
  927. }
  928. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  929. return srv.(LibraryServiceServer).ListShelves(ctx, req.(*ListShelvesRequest))
  930. }
  931. return interceptor(ctx, in, info, handler)
  932. }
  933. func _LibraryService_DeleteShelf_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  934. in := new(DeleteShelfRequest)
  935. if err := dec(in); err != nil {
  936. return nil, err
  937. }
  938. if interceptor == nil {
  939. return srv.(LibraryServiceServer).DeleteShelf(ctx, in)
  940. }
  941. info := &grpc.UnaryServerInfo{
  942. Server: srv,
  943. FullMethod: "/google.example.library.v1.LibraryService/DeleteShelf",
  944. }
  945. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  946. return srv.(LibraryServiceServer).DeleteShelf(ctx, req.(*DeleteShelfRequest))
  947. }
  948. return interceptor(ctx, in, info, handler)
  949. }
  950. func _LibraryService_MergeShelves_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  951. in := new(MergeShelvesRequest)
  952. if err := dec(in); err != nil {
  953. return nil, err
  954. }
  955. if interceptor == nil {
  956. return srv.(LibraryServiceServer).MergeShelves(ctx, in)
  957. }
  958. info := &grpc.UnaryServerInfo{
  959. Server: srv,
  960. FullMethod: "/google.example.library.v1.LibraryService/MergeShelves",
  961. }
  962. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  963. return srv.(LibraryServiceServer).MergeShelves(ctx, req.(*MergeShelvesRequest))
  964. }
  965. return interceptor(ctx, in, info, handler)
  966. }
  967. func _LibraryService_CreateBook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  968. in := new(CreateBookRequest)
  969. if err := dec(in); err != nil {
  970. return nil, err
  971. }
  972. if interceptor == nil {
  973. return srv.(LibraryServiceServer).CreateBook(ctx, in)
  974. }
  975. info := &grpc.UnaryServerInfo{
  976. Server: srv,
  977. FullMethod: "/google.example.library.v1.LibraryService/CreateBook",
  978. }
  979. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  980. return srv.(LibraryServiceServer).CreateBook(ctx, req.(*CreateBookRequest))
  981. }
  982. return interceptor(ctx, in, info, handler)
  983. }
  984. func _LibraryService_GetBook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  985. in := new(GetBookRequest)
  986. if err := dec(in); err != nil {
  987. return nil, err
  988. }
  989. if interceptor == nil {
  990. return srv.(LibraryServiceServer).GetBook(ctx, in)
  991. }
  992. info := &grpc.UnaryServerInfo{
  993. Server: srv,
  994. FullMethod: "/google.example.library.v1.LibraryService/GetBook",
  995. }
  996. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  997. return srv.(LibraryServiceServer).GetBook(ctx, req.(*GetBookRequest))
  998. }
  999. return interceptor(ctx, in, info, handler)
  1000. }
  1001. func _LibraryService_ListBooks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1002. in := new(ListBooksRequest)
  1003. if err := dec(in); err != nil {
  1004. return nil, err
  1005. }
  1006. if interceptor == nil {
  1007. return srv.(LibraryServiceServer).ListBooks(ctx, in)
  1008. }
  1009. info := &grpc.UnaryServerInfo{
  1010. Server: srv,
  1011. FullMethod: "/google.example.library.v1.LibraryService/ListBooks",
  1012. }
  1013. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1014. return srv.(LibraryServiceServer).ListBooks(ctx, req.(*ListBooksRequest))
  1015. }
  1016. return interceptor(ctx, in, info, handler)
  1017. }
  1018. func _LibraryService_DeleteBook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1019. in := new(DeleteBookRequest)
  1020. if err := dec(in); err != nil {
  1021. return nil, err
  1022. }
  1023. if interceptor == nil {
  1024. return srv.(LibraryServiceServer).DeleteBook(ctx, in)
  1025. }
  1026. info := &grpc.UnaryServerInfo{
  1027. Server: srv,
  1028. FullMethod: "/google.example.library.v1.LibraryService/DeleteBook",
  1029. }
  1030. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1031. return srv.(LibraryServiceServer).DeleteBook(ctx, req.(*DeleteBookRequest))
  1032. }
  1033. return interceptor(ctx, in, info, handler)
  1034. }
  1035. func _LibraryService_UpdateBook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1036. in := new(UpdateBookRequest)
  1037. if err := dec(in); err != nil {
  1038. return nil, err
  1039. }
  1040. if interceptor == nil {
  1041. return srv.(LibraryServiceServer).UpdateBook(ctx, in)
  1042. }
  1043. info := &grpc.UnaryServerInfo{
  1044. Server: srv,
  1045. FullMethod: "/google.example.library.v1.LibraryService/UpdateBook",
  1046. }
  1047. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1048. return srv.(LibraryServiceServer).UpdateBook(ctx, req.(*UpdateBookRequest))
  1049. }
  1050. return interceptor(ctx, in, info, handler)
  1051. }
  1052. func _LibraryService_MoveBook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1053. in := new(MoveBookRequest)
  1054. if err := dec(in); err != nil {
  1055. return nil, err
  1056. }
  1057. if interceptor == nil {
  1058. return srv.(LibraryServiceServer).MoveBook(ctx, in)
  1059. }
  1060. info := &grpc.UnaryServerInfo{
  1061. Server: srv,
  1062. FullMethod: "/google.example.library.v1.LibraryService/MoveBook",
  1063. }
  1064. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1065. return srv.(LibraryServiceServer).MoveBook(ctx, req.(*MoveBookRequest))
  1066. }
  1067. return interceptor(ctx, in, info, handler)
  1068. }
  1069. var _LibraryService_serviceDesc = grpc.ServiceDesc{
  1070. ServiceName: "google.example.library.v1.LibraryService",
  1071. HandlerType: (*LibraryServiceServer)(nil),
  1072. Methods: []grpc.MethodDesc{
  1073. {
  1074. MethodName: "CreateShelf",
  1075. Handler: _LibraryService_CreateShelf_Handler,
  1076. },
  1077. {
  1078. MethodName: "GetShelf",
  1079. Handler: _LibraryService_GetShelf_Handler,
  1080. },
  1081. {
  1082. MethodName: "ListShelves",
  1083. Handler: _LibraryService_ListShelves_Handler,
  1084. },
  1085. {
  1086. MethodName: "DeleteShelf",
  1087. Handler: _LibraryService_DeleteShelf_Handler,
  1088. },
  1089. {
  1090. MethodName: "MergeShelves",
  1091. Handler: _LibraryService_MergeShelves_Handler,
  1092. },
  1093. {
  1094. MethodName: "CreateBook",
  1095. Handler: _LibraryService_CreateBook_Handler,
  1096. },
  1097. {
  1098. MethodName: "GetBook",
  1099. Handler: _LibraryService_GetBook_Handler,
  1100. },
  1101. {
  1102. MethodName: "ListBooks",
  1103. Handler: _LibraryService_ListBooks_Handler,
  1104. },
  1105. {
  1106. MethodName: "DeleteBook",
  1107. Handler: _LibraryService_DeleteBook_Handler,
  1108. },
  1109. {
  1110. MethodName: "UpdateBook",
  1111. Handler: _LibraryService_UpdateBook_Handler,
  1112. },
  1113. {
  1114. MethodName: "MoveBook",
  1115. Handler: _LibraryService_MoveBook_Handler,
  1116. },
  1117. },
  1118. Streams: []grpc.StreamDesc{},
  1119. Metadata: "google/example/library/v1/library.proto",
  1120. }
  1121. func init() {
  1122. proto.RegisterFile("google/example/library/v1/library.proto", fileDescriptor_library_b70933aae91bc85e)
  1123. }
  1124. var fileDescriptor_library_b70933aae91bc85e = []byte{
  1125. // 838 bytes of a gzipped FileDescriptorProto
  1126. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xdb, 0x4e, 0xdb, 0x48,
  1127. 0x18, 0x96, 0x21, 0x81, 0xf0, 0x87, 0x53, 0x06, 0x84, 0xb2, 0x26, 0x2c, 0xd9, 0x11, 0x87, 0x6c,
  1128. 0x96, 0xb5, 0x05, 0x68, 0xf7, 0x22, 0x55, 0xa5, 0x8a, 0xb6, 0xe2, 0x06, 0xda, 0x28, 0x69, 0x6f,
  1129. 0x2a, 0xa4, 0xc8, 0x81, 0xc1, 0xb1, 0x48, 0x3c, 0xc6, 0x36, 0x11, 0x07, 0xf5, 0xa2, 0x95, 0x10,
  1130. 0x52, 0x6f, 0xfb, 0x0a, 0x7d, 0xa3, 0xbe, 0x42, 0x1f, 0xa4, 0x9a, 0x83, 0xc1, 0x24, 0x66, 0x9c,
  1131. 0x5e, 0xf4, 0xce, 0x33, 0xf3, 0xcd, 0xf7, 0x7f, 0xff, 0x61, 0xbe, 0x04, 0x36, 0x6d, 0x4a, 0xed,
  1132. 0x2e, 0x31, 0xc9, 0xa5, 0xd5, 0xf3, 0xba, 0xc4, 0xec, 0x3a, 0x6d, 0xdf, 0xf2, 0xaf, 0xcc, 0xfe,
  1133. 0x76, 0xf4, 0x69, 0x78, 0x3e, 0x0d, 0x29, 0xfa, 0x43, 0x00, 0x0d, 0x09, 0x34, 0xa2, 0xd3, 0xfe,
  1134. 0xb6, 0x5e, 0x92, 0x1c, 0x96, 0xe7, 0x98, 0x96, 0xeb, 0xd2, 0xd0, 0x0a, 0x1d, 0xea, 0x06, 0xe2,
  1135. 0xa2, 0xbe, 0x2c, 0x4f, 0xf9, 0xaa, 0x7d, 0x71, 0x6a, 0x92, 0x9e, 0x17, 0x4a, 0x56, 0x7c, 0x04,
  1136. 0x99, 0x3d, 0x4a, 0xcf, 0x10, 0x82, 0x8c, 0x6b, 0xf5, 0x48, 0x51, 0x2b, 0x6b, 0x95, 0xa9, 0x06,
  1137. 0xff, 0x46, 0x4b, 0x30, 0x61, 0x5d, 0x84, 0x1d, 0xea, 0x17, 0xc7, 0xf8, 0xae, 0x5c, 0xa1, 0x45,
  1138. 0xc8, 0x86, 0x4e, 0xd8, 0x25, 0xc5, 0x71, 0xbe, 0x2d, 0x16, 0x8c, 0xc1, 0x27, 0xd6, 0x49, 0x31,
  1139. 0x53, 0xd6, 0x2a, 0xb9, 0x06, 0xff, 0xc6, 0xdb, 0x90, 0x6d, 0x76, 0x48, 0xf7, 0x34, 0x91, 0x9e,
  1140. 0xd1, 0x74, 0x48, 0x8f, 0x48, 0x76, 0xb1, 0xc0, 0x07, 0x80, 0x5e, 0xfa, 0xc4, 0x0a, 0x09, 0xbf,
  1141. 0xd8, 0x20, 0xe7, 0x17, 0x24, 0x08, 0xd1, 0xff, 0x90, 0x0d, 0xd8, 0x9a, 0x13, 0xe4, 0x77, 0xca,
  1142. 0xc6, 0x93, 0xc5, 0x30, 0xc4, 0x3d, 0x01, 0xc7, 0xeb, 0x30, 0xb7, 0x4f, 0xc2, 0x47, 0x54, 0x09,
  1143. 0x52, 0x70, 0x1d, 0xd0, 0x81, 0x13, 0x70, 0x5c, 0x9f, 0x04, 0x11, 0x72, 0x19, 0xa6, 0x3c, 0xcb,
  1144. 0x26, 0xad, 0xc0, 0xb9, 0x16, 0xf0, 0x6c, 0x23, 0xc7, 0x36, 0x9a, 0xce, 0x35, 0x41, 0x2b, 0x00,
  1145. 0xfc, 0x30, 0xa4, 0x67, 0xc4, 0x95, 0x29, 0x70, 0xf8, 0x3b, 0xb6, 0x81, 0xaf, 0x60, 0xe1, 0x11,
  1146. 0x63, 0xe0, 0x51, 0x37, 0x20, 0xa8, 0x06, 0x93, 0x81, 0xd8, 0x2a, 0x6a, 0xe5, 0xf1, 0x91, 0x32,
  1147. 0x89, 0x2e, 0xa0, 0x0d, 0x98, 0x73, 0xc9, 0x65, 0xd8, 0x1a, 0x0a, 0x3b, 0xc3, 0xb6, 0xeb, 0xf7,
  1148. 0xa1, 0x2b, 0x80, 0x5e, 0x91, 0x2e, 0x19, 0xa8, 0x60, 0x52, 0xda, 0x4d, 0x58, 0x38, 0x24, 0xbe,
  1149. 0x4d, 0x06, 0xf2, 0x4e, 0x6a, 0x56, 0x05, 0xe6, 0x69, 0xd8, 0x21, 0x7e, 0x8b, 0xd7, 0xb5, 0xc5,
  1150. 0xcf, 0x45, 0xf4, 0x59, 0xbe, 0xcf, 0x63, 0xbd, 0x61, 0xa4, 0x47, 0x50, 0x10, 0x0d, 0x64, 0x73,
  1151. 0xa5, 0xa2, 0xdc, 0x85, 0x4c, 0x9b, 0xd2, 0x33, 0x4e, 0x93, 0xdf, 0x59, 0x55, 0x14, 0x82, 0x33,
  1152. 0x71, 0x30, 0x5e, 0x83, 0xd9, 0x7d, 0x12, 0xa6, 0x50, 0xe3, 0x36, 0xcc, 0xb3, 0xea, 0x33, 0x98,
  1153. 0x32, 0xab, 0x47, 0x1d, 0x1e, 0x53, 0x76, 0x78, 0x7c, 0xb0, 0xc3, 0x3e, 0x14, 0x62, 0x31, 0x64,
  1154. 0x7f, 0xff, 0x83, 0x2c, 0x93, 0x19, 0x75, 0x37, 0x35, 0x29, 0x81, 0x1e, 0xb9, 0xb5, 0x47, 0x50,
  1155. 0x78, 0xef, 0x9d, 0xfc, 0xae, 0xda, 0x6e, 0x42, 0x41, 0x0c, 0x4e, 0x5a, 0x79, 0xdf, 0xc2, 0xdc,
  1156. 0x21, 0xed, 0xa7, 0x8a, 0x18, 0x79, 0x66, 0x76, 0xbe, 0xe5, 0x61, 0xf6, 0x40, 0x68, 0x6a, 0x12,
  1157. 0xbf, 0xef, 0x1c, 0x13, 0x74, 0x0d, 0xf9, 0x98, 0x0f, 0xa0, 0x7f, 0x15, 0x29, 0x0c, 0xfb, 0x85,
  1158. 0x9e, 0xfa, 0xac, 0xb0, 0xfe, 0xf9, 0xfb, 0x8f, 0xaf, 0x63, 0x8b, 0x38, 0xcf, 0x9c, 0x56, 0x3e,
  1159. 0xb1, 0x9a, 0x70, 0x0d, 0xd4, 0x87, 0x5c, 0xe4, 0x1a, 0xa8, 0xaa, 0x60, 0x1a, 0xb0, 0x96, 0x11,
  1160. 0xa2, 0x96, 0x78, 0xd4, 0x25, 0xb4, 0xc8, 0xa2, 0xde, 0xb0, 0x8a, 0x3c, 0x97, 0xb1, 0xcd, 0xea,
  1161. 0x47, 0xf4, 0x49, 0x83, 0x7c, 0xcc, 0x35, 0x94, 0x49, 0x0f, 0xfb, 0x95, 0x6e, 0x8c, 0x0a, 0x17,
  1162. 0xc3, 0x8a, 0x17, 0xb8, 0x98, 0x19, 0x14, 0x2f, 0x01, 0xf2, 0x21, 0x1f, 0x73, 0x0f, 0xa5, 0x84,
  1163. 0x61, 0x97, 0xd1, 0x97, 0x22, 0x78, 0xf4, 0x63, 0x63, 0xbc, 0x66, 0x3f, 0x36, 0x51, 0xde, 0xd5,
  1164. 0xe4, 0xbc, 0xef, 0x34, 0x98, 0x8e, 0x1b, 0x11, 0x52, 0x65, 0x92, 0xe0, 0x58, 0x23, 0x14, 0x7e,
  1165. 0x9d, 0x0b, 0x58, 0xc5, 0x7a, 0x92, 0x80, 0x5a, 0x8f, 0x71, 0xd6, 0xb4, 0x2a, 0xba, 0xd5, 0x00,
  1166. 0x1e, 0xdc, 0x0b, 0x6d, 0xa5, 0x4e, 0x5d, 0xec, 0x0d, 0xe8, 0x69, 0xcf, 0x0c, 0x57, 0xb8, 0x08,
  1167. 0x9c, 0x2c, 0xc2, 0xe4, 0x56, 0x50, 0xe3, 0x4f, 0x11, 0xdd, 0xc0, 0xa4, 0xb4, 0x39, 0xf4, 0xb7,
  1168. 0x7a, 0x00, 0x7f, 0x49, 0xc0, 0x1a, 0x17, 0xf0, 0x27, 0x2a, 0x25, 0x08, 0x10, 0xf1, 0x59, 0x3b,
  1169. 0xbe, 0x68, 0x30, 0x75, 0x6f, 0x6d, 0xe8, 0x9f, 0x94, 0xa9, 0x8a, 0x9b, 0xac, 0xbe, 0x35, 0x1a,
  1170. 0x58, 0x0e, 0x20, 0xe6, 0x72, 0x4a, 0x48, 0x51, 0x0f, 0x74, 0x09, 0xf0, 0x60, 0x4a, 0xca, 0x86,
  1171. 0x0c, 0x79, 0xd7, 0x93, 0xd3, 0x28, 0xcb, 0x50, 0x55, 0x97, 0xe1, 0x4e, 0x03, 0x78, 0x70, 0x5b,
  1172. 0x65, 0xe8, 0x21, 0x53, 0x4e, 0x6f, 0x45, 0x95, 0x6b, 0x58, 0xd3, 0x95, 0x1a, 0xe4, 0x34, 0xdc,
  1173. 0x6a, 0x90, 0x8b, 0x0c, 0x57, 0x69, 0x48, 0x03, 0xae, 0x9c, 0xae, 0x62, 0x8b, 0xab, 0xd8, 0xc0,
  1174. 0x7f, 0x29, 0x55, 0xf4, 0x68, 0x9f, 0xbd, 0x8e, 0xbd, 0x73, 0x58, 0x39, 0xa6, 0xbd, 0xa7, 0x39,
  1175. 0xf7, 0xa6, 0xa5, 0x89, 0xd7, 0x59, 0xbd, 0xeb, 0xda, 0x87, 0x17, 0x12, 0x6a, 0xd3, 0xae, 0xe5,
  1176. 0xda, 0x06, 0xf5, 0x6d, 0xd3, 0x26, 0x2e, 0xef, 0x86, 0x29, 0x8e, 0x2c, 0xcf, 0x09, 0x12, 0xfe,
  1177. 0xfb, 0x3e, 0x93, 0x9f, 0xed, 0x09, 0x0e, 0xde, 0xfd, 0x19, 0x00, 0x00, 0xff, 0xff, 0x2b, 0x13,
  1178. 0xc5, 0x7e, 0x27, 0x0b, 0x00, 0x00,
  1179. }