google_example_library_v1

package
v0.0.0-...-dbc791b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Book

type Book struct {
	// The resource name of the book.
	// Book names have the form `shelves/{shelf_id}/books/{book_id}`.
	// The name is ignored when creating a book.
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	// The name of the book author.
	Author string `protobuf:"bytes,2,opt,name=author" json:"author,omitempty"`
	// The title of the book.
	Title string `protobuf:"bytes,3,opt,name=title" json:"title,omitempty"`
	// Value indicating whether the book has been read.
	Read bool `protobuf:"varint,4,opt,name=read" json:"read,omitempty"`
}

A single book in the library.

func (*Book) Descriptor

func (*Book) Descriptor() ([]byte, []int)

func (*Book) GetAuthor

func (m *Book) GetAuthor() string

func (*Book) GetName

func (m *Book) GetName() string

func (*Book) GetRead

func (m *Book) GetRead() bool

func (*Book) GetTitle

func (m *Book) GetTitle() string

func (*Book) ProtoMessage

func (*Book) ProtoMessage()

func (*Book) Reset

func (m *Book) Reset()

func (*Book) String

func (m *Book) String() string

type CreateBookRequest

type CreateBookRequest struct {
	// The name of the shelf in which the book is created.
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	// The book to create.
	Book *Book `protobuf:"bytes,2,opt,name=book" json:"book,omitempty"`
}

Request message for LibraryService.CreateBook.

func (*CreateBookRequest) Descriptor

func (*CreateBookRequest) Descriptor() ([]byte, []int)

func (*CreateBookRequest) GetBook

func (m *CreateBookRequest) GetBook() *Book

func (*CreateBookRequest) GetName

func (m *CreateBookRequest) GetName() string

func (*CreateBookRequest) ProtoMessage

func (*CreateBookRequest) ProtoMessage()

func (*CreateBookRequest) Reset

func (m *CreateBookRequest) Reset()

func (*CreateBookRequest) String

func (m *CreateBookRequest) String() string

type CreateShelfRequest

type CreateShelfRequest struct {
	// The shelf to create.
	Shelf *Shelf `protobuf:"bytes,1,opt,name=shelf" json:"shelf,omitempty"`
}

Request message for LibraryService.CreateShelf.

func (*CreateShelfRequest) Descriptor

func (*CreateShelfRequest) Descriptor() ([]byte, []int)

func (*CreateShelfRequest) GetShelf

func (m *CreateShelfRequest) GetShelf() *Shelf

func (*CreateShelfRequest) ProtoMessage

func (*CreateShelfRequest) ProtoMessage()

func (*CreateShelfRequest) Reset

func (m *CreateShelfRequest) Reset()

func (*CreateShelfRequest) String

func (m *CreateShelfRequest) String() string

type DeleteBookRequest

type DeleteBookRequest struct {
	// The name of the book to delete.
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
}

Request message for LibraryService.DeleteBook.

func (*DeleteBookRequest) Descriptor

func (*DeleteBookRequest) Descriptor() ([]byte, []int)

func (*DeleteBookRequest) GetName

func (m *DeleteBookRequest) GetName() string

func (*DeleteBookRequest) ProtoMessage

func (*DeleteBookRequest) ProtoMessage()

func (*DeleteBookRequest) Reset

func (m *DeleteBookRequest) Reset()

func (*DeleteBookRequest) String

func (m *DeleteBookRequest) String() string

type DeleteShelfRequest

type DeleteShelfRequest struct {
	// The name of the shelf to delete.
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
}

Request message for LibraryService.DeleteShelf.

func (*DeleteShelfRequest) Descriptor

func (*DeleteShelfRequest) Descriptor() ([]byte, []int)

func (*DeleteShelfRequest) GetName

func (m *DeleteShelfRequest) GetName() string

func (*DeleteShelfRequest) ProtoMessage

func (*DeleteShelfRequest) ProtoMessage()

func (*DeleteShelfRequest) Reset

func (m *DeleteShelfRequest) Reset()

func (*DeleteShelfRequest) String

func (m *DeleteShelfRequest) String() string

type GetBookRequest

type GetBookRequest struct {
	// The name of the book to retrieve.
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
}

Request message for LibraryService.GetBook.

func (*GetBookRequest) Descriptor

func (*GetBookRequest) Descriptor() ([]byte, []int)

func (*GetBookRequest) GetName

func (m *GetBookRequest) GetName() string

func (*GetBookRequest) ProtoMessage

func (*GetBookRequest) ProtoMessage()

func (*GetBookRequest) Reset

func (m *GetBookRequest) Reset()

func (*GetBookRequest) String

func (m *GetBookRequest) String() string

type GetShelfRequest

type GetShelfRequest struct {
	// The name of the shelf to retrieve.
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
}

Request message for LibraryService.GetShelf.

func (*GetShelfRequest) Descriptor

func (*GetShelfRequest) Descriptor() ([]byte, []int)

func (*GetShelfRequest) GetName

func (m *GetShelfRequest) GetName() string

func (*GetShelfRequest) ProtoMessage

func (*GetShelfRequest) ProtoMessage()

func (*GetShelfRequest) Reset

func (m *GetShelfRequest) Reset()

func (*GetShelfRequest) String

func (m *GetShelfRequest) String() string

type ListBooksRequest

type ListBooksRequest struct {
	// The name of the shelf whose books we'd like to list.
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	// Requested page size. Server may return fewer books than requested.
	// If unspecified, server will pick an appropriate default.
	PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize" json:"page_size,omitempty"`
	// A token identifying a page of results the server should return.
	// Typically, this is the value of
	// [ListBooksResponse.next_page_token][google.example.library.v1.ListBooksResponse.next_page_token].
	// returned from the previous call to `ListBooks` method.
	PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken" json:"page_token,omitempty"`
}

Request message for LibraryService.ListBooks.

func (*ListBooksRequest) Descriptor

func (*ListBooksRequest) Descriptor() ([]byte, []int)

func (*ListBooksRequest) GetName

func (m *ListBooksRequest) GetName() string

func (*ListBooksRequest) GetPageSize

func (m *ListBooksRequest) GetPageSize() int32

func (*ListBooksRequest) GetPageToken

func (m *ListBooksRequest) GetPageToken() string

func (*ListBooksRequest) ProtoMessage

func (*ListBooksRequest) ProtoMessage()

func (*ListBooksRequest) Reset

func (m *ListBooksRequest) Reset()

func (*ListBooksRequest) String

func (m *ListBooksRequest) String() string

type ListBooksResponse

type ListBooksResponse struct {
	// The list of books.
	Books []*Book `protobuf:"bytes,1,rep,name=books" json:"books,omitempty"`
	// A token to retrieve next page of results.
	// Pass this value in the
	// [ListBooksRequest.page_token][google.example.library.v1.ListBooksRequest.page_token]
	// field in the subsequent call to `ListBooks` method to retrieve the next
	// page of results.
	NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken" json:"next_page_token,omitempty"`
}

Response message for LibraryService.ListBooks.

func (*ListBooksResponse) Descriptor

func (*ListBooksResponse) Descriptor() ([]byte, []int)

func (*ListBooksResponse) GetBooks

func (m *ListBooksResponse) GetBooks() []*Book

func (*ListBooksResponse) GetNextPageToken

func (m *ListBooksResponse) GetNextPageToken() string

func (*ListBooksResponse) ProtoMessage

func (*ListBooksResponse) ProtoMessage()

func (*ListBooksResponse) Reset

func (m *ListBooksResponse) Reset()

func (*ListBooksResponse) String

func (m *ListBooksResponse) String() string

type ListShelvesRequest

type ListShelvesRequest struct {
	// Requested page size. Server may return fewer shelves than requested.
	// If unspecified, server will pick an appropriate default.
	PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize" json:"page_size,omitempty"`
	// A token identifying a page of results the server should return.
	// Typically, this is the value of
	// [ListShelvesResponse.next_page_token][google.example.library.v1.ListShelvesResponse.next_page_token]
	// returned from the previous call to `ListShelves` method.
	PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken" json:"page_token,omitempty"`
}

Request message for LibraryService.ListShelves.

func (*ListShelvesRequest) Descriptor

func (*ListShelvesRequest) Descriptor() ([]byte, []int)

func (*ListShelvesRequest) GetPageSize

func (m *ListShelvesRequest) GetPageSize() int32

func (*ListShelvesRequest) GetPageToken

func (m *ListShelvesRequest) GetPageToken() string

func (*ListShelvesRequest) ProtoMessage

func (*ListShelvesRequest) ProtoMessage()

func (*ListShelvesRequest) Reset

func (m *ListShelvesRequest) Reset()

func (*ListShelvesRequest) String

func (m *ListShelvesRequest) String() string

type ListShelvesResponse

type ListShelvesResponse struct {
	// The list of shelves.
	Shelves []*Shelf `protobuf:"bytes,1,rep,name=shelves" json:"shelves,omitempty"`
	// A token to retrieve next page of results.
	// Pass this value in the
	// [ListShelvesRequest.page_token][google.example.library.v1.ListShelvesRequest.page_token]
	// field in the subsequent call to `ListShelves` method to retrieve the next
	// page of results.
	NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken" json:"next_page_token,omitempty"`
}

Response message for LibraryService.ListShelves.

func (*ListShelvesResponse) Descriptor

func (*ListShelvesResponse) Descriptor() ([]byte, []int)

func (*ListShelvesResponse) GetNextPageToken

func (m *ListShelvesResponse) GetNextPageToken() string

func (*ListShelvesResponse) GetShelves

func (m *ListShelvesResponse) GetShelves() []*Shelf

func (*ListShelvesResponse) ProtoMessage

func (*ListShelvesResponse) ProtoMessage()

func (*ListShelvesResponse) Reset

func (m *ListShelvesResponse) Reset()

func (*ListShelvesResponse) String

func (m *ListShelvesResponse) String() string

type MergeShelvesRequest

type MergeShelvesRequest struct {
	// The name of the shelf we're adding books to.
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	// The name of the shelf we're removing books from and deleting.
	OtherShelfName string `protobuf:"bytes,2,opt,name=other_shelf_name,json=otherShelfName" json:"other_shelf_name,omitempty"`
}

Describes the shelf being removed (other_shelf_name) and updated (name) in this merge.

func (*MergeShelvesRequest) Descriptor

func (*MergeShelvesRequest) Descriptor() ([]byte, []int)

func (*MergeShelvesRequest) GetName

func (m *MergeShelvesRequest) GetName() string

func (*MergeShelvesRequest) GetOtherShelfName

func (m *MergeShelvesRequest) GetOtherShelfName() string

func (*MergeShelvesRequest) ProtoMessage

func (*MergeShelvesRequest) ProtoMessage()

func (*MergeShelvesRequest) Reset

func (m *MergeShelvesRequest) Reset()

func (*MergeShelvesRequest) String

func (m *MergeShelvesRequest) String() string

type MoveBookRequest

type MoveBookRequest struct {
	// The name of the book to move.
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	// The name of the destination shelf.
	OtherShelfName string `protobuf:"bytes,2,opt,name=other_shelf_name,json=otherShelfName" json:"other_shelf_name,omitempty"`
}

Describes what book to move (name) and what shelf we're moving it to (other_shelf_name).

func (*MoveBookRequest) Descriptor

func (*MoveBookRequest) Descriptor() ([]byte, []int)

func (*MoveBookRequest) GetName

func (m *MoveBookRequest) GetName() string

func (*MoveBookRequest) GetOtherShelfName

func (m *MoveBookRequest) GetOtherShelfName() string

func (*MoveBookRequest) ProtoMessage

func (*MoveBookRequest) ProtoMessage()

func (*MoveBookRequest) Reset

func (m *MoveBookRequest) Reset()

func (*MoveBookRequest) String

func (m *MoveBookRequest) String() string

type Shelf

type Shelf struct {
	// The resource name of the shelf.
	// Shelf names have the form `shelves/{shelf_id}`.
	// The name is ignored when creating a shelf.
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	// The theme of the shelf
	Theme string `protobuf:"bytes,2,opt,name=theme" json:"theme,omitempty"`
}

A Shelf contains a collection of books with a theme.

func (*Shelf) Descriptor

func (*Shelf) Descriptor() ([]byte, []int)

func (*Shelf) GetName

func (m *Shelf) GetName() string

func (*Shelf) GetTheme

func (m *Shelf) GetTheme() string

func (*Shelf) ProtoMessage

func (*Shelf) ProtoMessage()

func (*Shelf) Reset

func (m *Shelf) Reset()

func (*Shelf) String

func (m *Shelf) String() string

type UpdateBookRequest

type UpdateBookRequest struct {
	// The name of the book to update.
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	// The book to update with. The name must match or be empty.
	Book *Book `protobuf:"bytes,2,opt,name=book" json:"book,omitempty"`
}

Request message for LibraryService.UpdateBook.

func (*UpdateBookRequest) Descriptor

func (*UpdateBookRequest) Descriptor() ([]byte, []int)

func (*UpdateBookRequest) GetBook

func (m *UpdateBookRequest) GetBook() *Book

func (*UpdateBookRequest) GetName

func (m *UpdateBookRequest) GetName() string

func (*UpdateBookRequest) ProtoMessage

func (*UpdateBookRequest) ProtoMessage()

func (*UpdateBookRequest) Reset

func (m *UpdateBookRequest) Reset()

func (*UpdateBookRequest) String

func (m *UpdateBookRequest) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL