@@ -69,8 +69,10 @@ service Bookstore {
6969 };
7070 }
7171
72- // archive abook.
73- rpc archiveBook ( ArchiveBookRequest ) returns ( aep.api.Operation ) {
72+ // archive a book.
73+ rpc ArchiveBook ( ArchiveBookRequest ) returns ( aep.api.Operation ) {
74+ option (aep.api.operation_info ) = { response_type : "example.bookstore.v1.ArchiveBookResponse" };
75+
7476 option (google.api.http ) = {
7577 post : "/{path=publishers/*/books/*}:archive" ,
7678 body : "*"
@@ -179,7 +181,7 @@ service Bookstore {
179181message Book {
180182 option (google.api.resource ) = {
181183 type : "bookstore.example.com/book" ,
182- pattern : [ "publishers/{publisher}/books/{book} " ],
184+ pattern : [ "" ],
183185 plural : "books" ,
184186 singular : "book"
185187 };
@@ -193,20 +195,20 @@ message Book {
193195 string lastName = 2 ;
194196 }
195197
196- // Field for author.
197- repeated Author author = 5 ;
198-
199198 // Field for isbn.
200199 repeated string isbn = 1 [(google.api.field_behavior ) = REQUIRED ];
201200
202201 // Field for price.
203- float price = 2 [(google.api.field_behavior ) = REQUIRED ];
202+ int32 price = 2 [(google.api.field_behavior ) = REQUIRED ];
204203
205204 // Field for published.
206205 bool published = 3 [(google.api.field_behavior ) = REQUIRED ];
207206
208207 // Field for edition.
209- int32 edition = 4 ;
208+ int32 edition = 4 [(google.api.field_behavior ) = REQUIRED ];
209+
210+ // Field for author.
211+ repeated Author author = 5 [(google.api.field_behavior ) = REQUIRED ];
210212
211213 // Field for path.
212214 string path = 10018 ;
@@ -216,9 +218,7 @@ message Book {
216218message BookEdition {
217219 option (google.api.resource ) = {
218220 type : "bookstore.example.com/book-edition" ,
219- pattern : [
220- "publishers/{publisher}/books/{book}/editions/{book-edition}"
221- ],
221+ pattern : [ "" ],
222222 plural : "book-editions" ,
223223 singular : "book-edition"
224224 };
@@ -234,20 +234,17 @@ message BookEdition {
234234message Isbn {
235235 option (google.api.resource ) = {
236236 type : "bookstore.example.com/isbn" ,
237- pattern : [ "isbns/{isbn} " ],
237+ pattern : [ "" ],
238238 plural : "isbns" ,
239239 singular : "isbn"
240240 };
241-
242- // Field for path.
243- string path = 10018 ;
244241}
245242
246243// A Publisher.
247244message Publisher {
248245 option (google.api.resource ) = {
249246 type : "bookstore.example.com/publisher" ,
250- pattern : [ "publishers/{publisher} " ],
247+ pattern : [ "" ],
251248 plural : "publishers" ,
252249 singular : "publisher"
253250 };
@@ -305,9 +302,6 @@ message DeleteBookRequest {
305302 (google.api.field_behavior ) = REQUIRED ,
306303 (google.api.resource_reference ) = { type : "bookstore.example.com/book" }
307304 ];
308-
309- // If true, the resource will be deleted, even if children still exist.
310- bool force = 10020 [(google.api.field_behavior ) = OPTIONAL ];
311305}
312306
313307// Request message for the Listbook method
@@ -360,8 +354,6 @@ message ArchiveBookRequest {
360354
361355// Response message for the archive method
362356message ArchiveBookResponse {
363- // Field for success.
364- bool success = 1 ;
365357}
366358
367359// A Create request for a book-edition resource.
@@ -372,9 +364,6 @@ message CreateBookEditionRequest {
372364 (google.api.resource_reference ) = { }
373365 ];
374366
375- // An id that uniquely identifies the resource within the collection
376- string id = 10014 ;
377-
378367 // The resource to perform the operation on.
379368 BookEdition book_edition = 10015 [(google.api.field_behavior ) = REQUIRED ];
380369}
@@ -429,9 +418,6 @@ message CreateIsbnRequest {
429418 (google.api.resource_reference ) = { }
430419 ];
431420
432- // An id that uniquely identifies the resource within the collection
433- string id = 10014 ;
434-
435421 // The resource to perform the operation on.
436422 Isbn isbn = 10015 [(google.api.field_behavior ) = REQUIRED ];
437423}
@@ -515,9 +501,6 @@ message DeletePublisherRequest {
515501 (google.api.field_behavior ) = REQUIRED ,
516502 (google.api.resource_reference ) = { type : "bookstore.example.com/publisher" }
517503 ];
518-
519- // If true, the resource will be deleted, even if children still exist.
520- bool force = 10020 [(google.api.field_behavior ) = OPTIONAL ];
521504}
522505
523506// Request message for the Listpublisher method
0 commit comments