Standard methods use request and response messages according to the following table (see Cloud APIs Naming conventions).
Method name
Request Body
Response Body
ListBooks
ListBooksRequest
List*Response
GetBook
GetBookRequest
Book
CreateBook
CreateBookRequest
Book
UpdateBook
UpdateBookRequest
Book
RenameBook
RenameBookRequest
RenameBookResponse
DeleteBook
DeleteBookRequest
google.brotobuf.Empty
Even if we transfer a single resource we create a corresponding XxxRequest message. XxxRequest allows adding new fields to the request (e.g. metadata) while not breaking the code.
Generate Go files
At root level, generate all necessary Go files with the command go generate ./... or execute the corresponding command(s) in proto.go manually.