1// Copyright 2020 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15syntax = "proto3";
16
17package google.api;
18
19import "google/protobuf/descriptor.proto";
20
21option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations";
22option java_multiple_files = true;
23option java_outer_classname = "ClientProto";
24option java_package = "com.google.api";
25option objc_class_prefix = "GAPI";
26
27extend google.protobuf.MethodOptions {
28  // A definition of a client library method signature.
29  //
30  // In client libraries, each proto RPC corresponds to one or more methods
31  // which the end user is able to call, and calls the underlying RPC.
32  // Normally, this method receives a single argument (a struct or instance
33  // corresponding to the RPC request object). Defining this field will
34  // add one or more overloads providing flattened or simpler method signatures
35  // in some languages.
36  //
37  // The fields on the method signature are provided as a comma-separated
38  // string.
39  //
40  // For example, the proto RPC and annotation:
41  //
42  //   rpc CreateSubscription(CreateSubscriptionRequest)
43  //       returns (Subscription) {
44  //     option (google.api.method_signature) = "name,topic";
45  //   }
46  //
47  // Would add the following Java overload (in addition to the method accepting
48  // the request object):
49  //
50  //   public final Subscription createSubscription(String name, String topic)
51  //
52  // The following backwards-compatibility guidelines apply:
53  //
54  //   * Adding this annotation to an unannotated method is backwards
55  //     compatible.
56  //   * Adding this annotation to a method which already has existing
57  //     method signature annotations is backwards compatible if and only if
58  //     the new method signature annotation is last in the sequence.
59  //   * Modifying or removing an existing method signature annotation is
60  //     a breaking change.
61  //   * Re-ordering existing method signature annotations is a breaking
62  //     change.
63  repeated string method_signature = 1051;
64}
65
66extend google.protobuf.ServiceOptions {
67  // The hostname for this service.
68  // This should be specified with no prefix or protocol.
69  //
70  // Example:
71  //
72  //   service Foo {
73  //     option (google.api.default_host) = "foo.googleapi.com";
74  //     ...
75  //   }
76  string default_host = 1049;
77
78  // OAuth scopes needed for the client.
79  //
80  // Example:
81  //
82  //   service Foo {
83  //     option (google.api.oauth_scopes) = \
84  //       "https://www.googleapis.com/auth/cloud-platform";
85  //     ...
86  //   }
87  //
88  // If there is more than one scope, use a comma-separated string:
89  //
90  // Example:
91  //
92  //   service Foo {
93  //     option (google.api.oauth_scopes) = \
94  //       "https://www.googleapis.com/auth/cloud-platform,"
95  //       "https://www.googleapis.com/auth/monitoring";
96  //     ...
97  //   }
98  string oauth_scopes = 1050;
99}
100