aboutsummaryrefslogtreecommitdiff
path: root/google/example/library
diff options
context:
space:
mode:
Diffstat (limited to 'google/example/library')
-rw-r--r--google/example/library/BUILD.bazel1
-rw-r--r--google/example/library/README.md4
-rw-r--r--google/example/library/artman_library_example_v1.yaml34
-rw-r--r--google/example/library/library_example_v1.yaml41
-rw-r--r--google/example/library/v1/BUILD.bazel135
-rw-r--r--google/example/library/v1/library.proto329
-rw-r--r--google/example/library/v1/library_example_gapic.yaml254
7 files changed, 798 insertions, 0 deletions
diff --git a/google/example/library/BUILD.bazel b/google/example/library/BUILD.bazel
new file mode 100644
index 000000000..a87c57fec
--- /dev/null
+++ b/google/example/library/BUILD.bazel
@@ -0,0 +1 @@
+exports_files(glob(["*.yaml"]))
diff --git a/google/example/library/README.md b/google/example/library/README.md
new file mode 100644
index 000000000..ee3aa684d
--- /dev/null
+++ b/google/example/library/README.md
@@ -0,0 +1,4 @@
+# Introduction
+This is a Google example service representing a simple digital library.
+It manages a collection of shelf resources, and each shelf owns a collection
+of book resources.
diff --git a/google/example/library/artman_library_example_v1.yaml b/google/example/library/artman_library_example_v1.yaml
new file mode 100644
index 000000000..3bc2fffb3
--- /dev/null
+++ b/google/example/library/artman_library_example_v1.yaml
@@ -0,0 +1,34 @@
+common:
+ api_name: library_example
+ api_version: v1
+ organization_name: google-cloud
+ proto_deps:
+ - name: google-common-protos
+ src_proto_paths:
+ - v1
+ service_yaml: library_example_v1.yaml
+ gapic_yaml: v1/library_example_gapic.yaml
+artifacts:
+- name: gapic_config
+ type: GAPIC_CONFIG
+- name: java_gapic
+ type: GAPIC
+ language: JAVA
+- name: python_gapic
+ type: GAPIC
+ language: PYTHON
+- name: nodejs_gapic
+ type: GAPIC
+ language: NODEJS
+- name: php_gapic
+ type: GAPIC
+ language: PHP
+- name: go_gapic
+ type: GAPIC
+ language: GO
+- name: ruby_gapic
+ type: GAPIC
+ language: RUBY
+- name: csharp_gapic
+ type: GAPIC
+ language: CSHARP
diff --git a/google/example/library/library_example_v1.yaml b/google/example/library/library_example_v1.yaml
new file mode 100644
index 000000000..a1297cfa2
--- /dev/null
+++ b/google/example/library/library_example_v1.yaml
@@ -0,0 +1,41 @@
+type: google.api.Service
+config_version: 3
+name: library-example.googleapis.com
+title: Example Library API
+
+apis:
+- name: google.example.library.v1.LibraryService
+
+documentation:
+ summary: A simple Google Example Library API.
+ overview: |-
+ # Introduction
+
+ This is a Google example service representing a simple digital library. It
+ manages a collection of shelf resources, and each shelf owns a collection of
+ book resources.
+
+backend:
+ rules:
+ - selector: google.example.library.v1.LibraryService.CreateShelf
+ deadline: 10.0
+ - selector: google.example.library.v1.LibraryService.GetShelf
+ deadline: 10.0
+ - selector: google.example.library.v1.LibraryService.ListShelves
+ deadline: 10.0
+ - selector: google.example.library.v1.LibraryService.DeleteShelf
+ deadline: 10.0
+ - selector: google.example.library.v1.LibraryService.MergeShelves
+ deadline: 10.0
+ - selector: google.example.library.v1.LibraryService.CreateBook
+ deadline: 10.0
+ - selector: google.example.library.v1.LibraryService.GetBook
+ deadline: 10.0
+ - selector: google.example.library.v1.LibraryService.ListBooks
+ deadline: 10.0
+ - selector: google.example.library.v1.LibraryService.DeleteBook
+ deadline: 10.0
+ - selector: google.example.library.v1.LibraryService.UpdateBook
+ deadline: 10.0
+ - selector: google.example.library.v1.LibraryService.MoveBook
+ deadline: 10.0
diff --git a/google/example/library/v1/BUILD.bazel b/google/example/library/v1/BUILD.bazel
new file mode 100644
index 000000000..0850a7fd7
--- /dev/null
+++ b/google/example/library/v1/BUILD.bazel
@@ -0,0 +1,135 @@
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+##############################################################################
+# Common
+##############################################################################
+load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")
+
+proto_library(
+ name = "library_proto",
+ srcs = ["library.proto"],
+ deps = [
+ "//google/api:annotations_proto",
+ "//google/api:client_proto",
+ "//google/api:field_behavior_proto",
+ "//google/api:resource_proto",
+ "@com_google_protobuf//:empty_proto",
+ ],
+)
+
+proto_library_with_info(
+ name = "library_proto_with_info",
+ deps = [":library_proto"],
+)
+
+##############################################################################
+# Java
+##############################################################################
+load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load(
+ "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl",
+ "java_gapic_library",
+ "java_resource_name_proto_library",
+)
+load("@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl", "java_gapic_assembly_gradle_pkg")
+
+_JAVA_GRPC_DEPS = [
+ "@com_google_api_grpc_proto_google_common_protos//jar",
+]
+
+java_proto_library(
+ name = "library_java_proto",
+ deps = [":library_proto"],
+)
+
+java_grpc_library(
+ name = "library_java_grpc",
+ srcs = [":library_proto"],
+ deps = [":library_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+java_resource_name_proto_library(
+ name = "library_resource_name_java_proto",
+ gapic_yaml = "library_example_gapic.yaml",
+ deps = [":library_proto"],
+)
+
+java_gapic_library(
+ name = "library_java_gapic",
+ src = ":library_proto_with_info",
+ gapic_yaml = "library_example_gapic.yaml",
+ service_yaml = "//google/example/library:library_example_v1.yaml",
+ test_deps = [":library_java_grpc"],
+ deps = [
+ ":library_java_proto",
+ ":library_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [":library_java_gapic_test"],
+) for test_name in [
+ "com.google.cloud.example.library.v1.LibraryServiceClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-library-v1-java",
+ client_deps = [":library_java_gapic"],
+ client_group = "com.google.cloud",
+ client_test_deps = [":library_java_gapic_test"],
+ grpc_deps = [":library_java_grpc"],
+ grpc_group = "com.google.api.grpc",
+ proto_deps = [
+ ":library_java_proto",
+ ":library_proto",
+ ":library_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+ version = "0.0.0-SNAPSHOT",
+)
+
+##############################################################################
+# Go
+##############################################################################
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic.bzl", "go_gapic_srcjar", "go_gapic_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl", "go_gapic_assembly_pkg")
+
+go_proto_library(
+ name = "library_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/example/library/v1",
+ protos = [":library_proto_with_info"],
+ deps = ["//google/api:annotations_go_proto"],
+)
+
+go_gapic_library(
+ name = "library_go_gapic",
+ src = ":library_proto_with_info",
+ gapic_yaml = "library_example_gapic.yaml",
+ importpath = "cloud.google.com/go/example/library/apiv1",
+ service_yaml = "//google/example/library:library_example_v1.yaml",
+ deps = [":library_go_proto"],
+)
+
+go_test(
+ name = "library_go_gapic_test",
+ srcs = [":library_go_gapic_srcjar_test"],
+ embed = [":library_go_gapic"],
+ importpath = "cloud.google.com/go/example/library/apiv1",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-library-v1-go",
+ deps = [
+ ":library_go_gapic",
+ ":library_go_gapic_srcjar-smoke-test.srcjar",
+ ":library_go_gapic_srcjar-test.srcjar",
+ ":library_go_proto",
+ ],
+)
diff --git a/google/example/library/v1/library.proto b/google/example/library/v1/library.proto
new file mode 100644
index 000000000..fd15ccd77
--- /dev/null
+++ b/google/example/library/v1/library.proto
@@ -0,0 +1,329 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.example.library.v1;
+
+import "google/api/annotations.proto";
+import "google/api/client.proto";
+import "google/api/field_behavior.proto";
+import "google/api/resource.proto";
+import "google/protobuf/empty.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/example/library/v1;library";
+option java_multiple_files = true;
+option java_outer_classname = "LibraryProto";
+option java_package = "com.google.example.library.v1";
+
+// This API represents a simple digital library. It lets you manage Shelf
+// resources and Book resources in the library. It defines the following
+// resource model:
+//
+// - The API has a collection of [Shelf][google.example.library.v1.Shelf]
+// resources, named `shelves/*`
+//
+// - Each Shelf has a collection of [Book][google.example.library.v1.Book]
+// resources, named `shelves/*/books/*`
+service LibraryService {
+ // Creates a shelf, and returns the new Shelf.
+ rpc CreateShelf(CreateShelfRequest) returns (Shelf) {
+ option (google.api.http) = {
+ post: "/v1/shelves"
+ body: "shelf"
+ };
+ option (google.api.method_signature) = "shelf";
+ }
+
+ // Gets a shelf. Returns NOT_FOUND if the shelf does not exist.
+ rpc GetShelf(GetShelfRequest) returns (Shelf) {
+ option (google.api.http) = {
+ get: "/v1/{name=shelves/*}"
+ };
+ option (google.api.method_signature) = "name";
+ }
+
+ // Lists shelves. The order is unspecified but deterministic. Newly created
+ // shelves will not necessarily be added to the end of this list.
+ rpc ListShelves(ListShelvesRequest) returns (ListShelvesResponse) {
+ option (google.api.http) = {
+ get: "/v1/shelves"
+ };
+ }
+
+ // Deletes a shelf. Returns NOT_FOUND if the shelf does not exist.
+ rpc DeleteShelf(DeleteShelfRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1/{name=shelves/*}"
+ };
+ option (google.api.method_signature) = "name";
+ }
+
+ // Merges two shelves by adding all books from the shelf named
+ // `other_shelf_name` to shelf `name`, and deletes
+ // `other_shelf_name`. Returns the updated shelf.
+ // The book ids of the moved books may not be the same as the original books.
+ //
+ // Returns NOT_FOUND if either shelf does not exist.
+ // This call is a no-op if the specified shelves are the same.
+ rpc MergeShelves(MergeShelvesRequest) returns (Shelf) {
+ option (google.api.http) = {
+ post: "/v1/{name=shelves/*}:merge"
+ body: "*"
+ };
+ option (google.api.method_signature) = "name,other_shelf_name";
+ }
+
+ // Creates a book, and returns the new Book.
+ rpc CreateBook(CreateBookRequest) returns (Book) {
+ option (google.api.http) = {
+ post: "/v1/{name=shelves/*}/books"
+ body: "book"
+ };
+ option (google.api.method_signature) = "name,book";
+ }
+
+ // Gets a book. Returns NOT_FOUND if the book does not exist.
+ rpc GetBook(GetBookRequest) returns (Book) {
+ option (google.api.http) = {
+ get: "/v1/{name=shelves/*/books/*}"
+ };
+ option (google.api.method_signature) = "name";
+ }
+
+ // Lists books in a shelf. The order is unspecified but deterministic. Newly
+ // created books will not necessarily be added to the end of this list.
+ // Returns NOT_FOUND if the shelf does not exist.
+ rpc ListBooks(ListBooksRequest) returns (ListBooksResponse) {
+ option (google.api.http) = {
+ get: "/v1/{name=shelves/*}/books"
+ };
+ option (google.api.method_signature) = "name";
+ }
+
+ // Deletes a book. Returns NOT_FOUND if the book does not exist.
+ rpc DeleteBook(DeleteBookRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1/{name=shelves/*/books/*}"
+ };
+ }
+
+ // Updates a book. Returns INVALID_ARGUMENT if the name of the book
+ // is non-empty and does not equal the existing name.
+ rpc UpdateBook(UpdateBookRequest) returns (Book) {
+ option (google.api.http) = {
+ put: "/v1/{book.name=shelves/*/books/*}"
+ body: "book"
+ };
+ option (google.api.method_signature) = "book";
+ }
+
+ // Moves a book to another shelf, and returns the new book. The book
+ // id of the new book may not be the same as the original book.
+ rpc MoveBook(MoveBookRequest) returns (Book) {
+ option (google.api.http) = {
+ post: "/v1/{name=shelves/*/books/*}:move"
+ body: "*"
+ };
+ option (google.api.method_signature) = "name,other_shelf_name";
+ }
+}
+
+// A single book in the library.
+message Book {
+ // 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.
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource) = { pattern: "shelves/{shelf_id}/books/{book_id}" }
+ ];
+
+ // The name of the book author.
+ string author = 2;
+
+ // The title of the book.
+ string title = 3;
+
+ // Value indicating whether the book has been read.
+ bool read = 4;
+}
+
+// A Shelf contains a collection of books with a theme.
+message Shelf {
+ // The resource name of the shelf.
+ // Shelf names have the form `shelves/{shelf_id}`.
+ // The name is ignored when creating a shelf.
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource) = { pattern: "shelves/{shelf_id}" }
+ ];
+
+ // The theme of the shelf
+ string theme = 2;
+}
+
+// Request message for LibraryService.CreateShelf.
+message CreateShelfRequest {
+ // The shelf to create.
+ Shelf shelf = 1 [(google.api.field_behavior) = REQUIRED];
+}
+
+// Request message for LibraryService.GetShelf.
+message GetShelfRequest {
+ // The name of the shelf to retrieve.
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = "Shelf"
+ ];
+}
+
+// Request message for LibraryService.ListShelves.
+message ListShelvesRequest {
+ // Requested page size. Server may return fewer shelves than requested.
+ // If unspecified, server will pick an appropriate default.
+ int32 page_size = 1;
+
+ // 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.
+ string page_token = 2;
+}
+
+// Response message for LibraryService.ListShelves.
+message ListShelvesResponse {
+ // The list of shelves.
+ repeated Shelf shelves = 1;
+
+ // 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.
+ string next_page_token = 2;
+}
+
+// Request message for LibraryService.DeleteShelf.
+message DeleteShelfRequest {
+ // The name of the shelf to delete.
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = "Shelf"
+ ];
+}
+
+// Describes the shelf being removed (other_shelf_name) and updated
+// (name) in this merge.
+message MergeShelvesRequest {
+ // The name of the shelf we're adding books to.
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = "Shelf"
+ ];
+
+ // The name of the shelf we're removing books from and deleting.
+ string other_shelf_name = 2 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = "Shelf"
+ ];
+}
+
+// Request message for LibraryService.CreateBook.
+message CreateBookRequest {
+ // The name of the shelf in which the book is created.
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = "Shelf"
+ ];
+
+ // The book to create.
+ Book book = 2 [(google.api.field_behavior) = REQUIRED];
+}
+
+// Request message for LibraryService.GetBook.
+message GetBookRequest {
+ // The name of the book to retrieve.
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = "Book"
+ ];
+}
+
+// Request message for LibraryService.ListBooks.
+message ListBooksRequest {
+ // The name of the shelf whose books we'd like to list.
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = "Shelf"
+ ];
+
+ // Requested page size. Server may return fewer books than requested.
+ // If unspecified, server will pick an appropriate default.
+ int32 page_size = 2;
+
+ // 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.
+ string page_token = 3;
+}
+
+// Response message for LibraryService.ListBooks.
+message ListBooksResponse {
+ // The list of books.
+ repeated Book books = 1;
+
+ // 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.
+ string next_page_token = 2;
+}
+
+// Request message for LibraryService.UpdateBook.
+message UpdateBookRequest {
+ // The name of the book to update.
+ string name = 1 [(google.api.field_behavior) = REQUIRED];
+
+ // The book to update with. The name must match or be empty.
+ Book book = 2 [(google.api.field_behavior) = REQUIRED];
+}
+
+// Request message for LibraryService.DeleteBook.
+message DeleteBookRequest {
+ // The name of the book to delete.
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = "Book"
+ ];
+}
+
+// Describes what book to move (name) and what shelf we're moving it
+// to (other_shelf_name).
+message MoveBookRequest {
+ // The name of the book to move.
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = "Book"
+ ];
+
+ // The name of the destination shelf.
+ string other_shelf_name = 2 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = "Shelf"
+ ];
+}
diff --git a/google/example/library/v1/library_example_gapic.yaml b/google/example/library/v1/library_example_gapic.yaml
new file mode 100644
index 000000000..1c7cab232
--- /dev/null
+++ b/google/example/library/v1/library_example_gapic.yaml
@@ -0,0 +1,254 @@
+type: com.google.api.codegen.ConfigProto
+config_schema_version: 1.0.0
+# The settings of generated code in a specific language.
+language_settings:
+ java:
+ package_name: com.google.cloud.example.library.v1
+ python:
+ package_name: google.cloud.example.library_v1.gapic
+ go:
+ package_name: cloud.google.com/go/example/library/apiv1
+ csharp:
+ package_name: Google.Example.Library.V1
+ ruby:
+ package_name: Google::Cloud::Example::Library::V1
+ php:
+ package_name: Google\Cloud\Example\Library\V1
+ nodejs:
+ package_name: library.v1
+# A list of API interface configurations.
+interfaces:
+# The fully qualified name of the API interface.
+- name: google.example.library.v1.LibraryService
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections:
+ - name_pattern: shelves/{shelf}
+ entity_name: shelf
+ - name_pattern: shelves/{shelf}/books/{book}
+ entity_name: book
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - DEADLINE_EXCEEDED
+ - UNAVAILABLE
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # resource_name_treatment - An enum that specifies how to treat the resource
+ # name formats defined in the field_name_patterns and
+ # response_field_name_patterns fields.
+ # UNSET: default value
+ # NONE: the collection configs will not be used by the generated code.
+ # VALIDATE: string fields will be validated by the client against the
+ # specified resource name formats.
+ # STATIC_TYPES: the client will use generated types for resource names.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: CreateShelf
+ flattening:
+ groups:
+ - parameters:
+ - shelf
+ required_fields:
+ - shelf
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ timeout_millis: 10000
+ - name: GetShelf
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: shelf
+ timeout_millis: 10000
+ - name: ListShelves
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: shelves
+ retry_codes_name: idempotent
+ retry_params_name: default
+ timeout_millis: 10000
+ - name: DeleteShelf
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: shelf
+ timeout_millis: 10000
+ - name: MergeShelves
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - other_shelf_name
+ required_fields:
+ - name
+ - other_shelf_name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: shelf
+ timeout_millis: 10000
+ - name: CreateBook
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - book
+ required_fields:
+ - name
+ - book
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: shelf
+ timeout_millis: 10000
+ - name: GetBook
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: book
+ timeout_millis: 10000
+ - name: ListBooks
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: books
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: shelf
+ timeout_millis: 10000
+ - name: DeleteBook
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: book
+ timeout_millis: 10000
+ - name: UpdateBook
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - book
+ required_fields:
+ - name
+ - book
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ book.name: book
+ timeout_millis: 10000
+ - name: MoveBook
+ flattening:
+ groups:
+ - parameters:
+ - name
+ - other_shelf_name
+ required_fields:
+ - name
+ - other_shelf_name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: book
+ timeout_millis: 10000