|
| 1 | +// Protocol Buffers - Google's data interchange format |
| 2 | +// Copyright 2008 Google Inc. All rights reserved. |
| 3 | +// https://developers.google.com/protocol-buffers/ |
| 4 | +// |
| 5 | +// Redistribution and use in source and binary forms, with or without |
| 6 | +// modification, are permitted provided that the following conditions are |
| 7 | +// met: |
| 8 | +// |
| 9 | +// * Redistributions of source code must retain the above copyright |
| 10 | +// notice, this list of conditions and the following disclaimer. |
| 11 | +// * Redistributions in binary form must reproduce the above |
| 12 | +// copyright notice, this list of conditions and the following disclaimer |
| 13 | +// in the documentation and/or other materials provided with the |
| 14 | +// distribution. |
| 15 | +// * Neither the name of Google Inc. nor the names of its |
| 16 | +// contributors may be used to endorse or promote products derived from |
| 17 | +// this software without specific prior written permission. |
| 18 | +// |
| 19 | +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 20 | +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 21 | +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 22 | +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 23 | +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 24 | +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 25 | +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 26 | +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 27 | +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 28 | +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 29 | +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 30 | +syntax = "proto3"; |
| 31 | + |
| 32 | +package google.protobuf; |
| 33 | + |
| 34 | +import "google/protobuf/source_context.proto"; |
| 35 | +import "google/protobuf/type.proto"; |
| 36 | + |
| 37 | +option java_multiple_files = true; |
| 38 | +option java_outer_classname = "ApiProto"; |
| 39 | +option java_package = "com.google.protobuf"; |
| 40 | + |
| 41 | + |
| 42 | +// Api is a light-weight descriptor for a protocol buffer service. |
| 43 | +message Api { |
| 44 | + // The fully qualified name of this api, including package name |
| 45 | + // followed by the api's simple name. |
| 46 | + string name = 1; |
| 47 | + |
| 48 | + // The methods of this api, in unspecified order. |
| 49 | + repeated Method methods = 2; |
| 50 | + |
| 51 | + // Any metadata attached to the API. |
| 52 | + repeated Option options = 3; |
| 53 | + |
| 54 | + // A version string for this api. If specified, must have the form |
| 55 | + // `major-version.minor-version`, as in `1.10`. If the minor version |
| 56 | + // is omitted, it defaults to zero. If the entire version field is |
| 57 | + // empty, the major version is derived from the package name, as |
| 58 | + // outlined below. If the field is not empty, the version in the |
| 59 | + // package name will be verified to be consistent with what is |
| 60 | + // provided here. |
| 61 | + // |
| 62 | + // The versioning schema uses [semantic |
| 63 | + // versioning](http://semver.org) where the major version number |
| 64 | + // indicates a breaking change and the minor version an additive, |
| 65 | + // non-breaking change. Both version numbers are signals to users |
| 66 | + // what to expect from different versions, and should be carefully |
| 67 | + // chosen based on the product plan. |
| 68 | + // |
| 69 | + // The major version is also reflected in the package name of the |
| 70 | + // API, which must end in `v<major-version>`, as in |
| 71 | + // `google.feature.v1`. For major versions 0 and 1, the suffix can |
| 72 | + // be omitted. Zero major versions must only be used for |
| 73 | + // experimental, none-GA apis. |
| 74 | + // |
| 75 | + // See also: [design doc](http://go/api-versioning). |
| 76 | + // |
| 77 | + // |
| 78 | + string version = 4; |
| 79 | + |
| 80 | + // Source context for the protocol buffer service represented by this |
| 81 | + // message. |
| 82 | + SourceContext source_context = 5; |
| 83 | +} |
| 84 | + |
| 85 | +// Method represents a method of an api. |
| 86 | +message Method { |
| 87 | + // The simple name of this method. |
| 88 | + string name = 1; |
| 89 | + |
| 90 | + // A URL of the input message type. |
| 91 | + string request_type_url = 2; |
| 92 | + |
| 93 | + // If true, the request is streamed. |
| 94 | + bool request_streaming = 3; |
| 95 | + |
| 96 | + // The URL of the output message type. |
| 97 | + string response_type_url = 4; |
| 98 | + |
| 99 | + // If true, the response is streamed. |
| 100 | + bool response_streaming = 5; |
| 101 | + |
| 102 | + // Any metadata attached to the method. |
| 103 | + repeated Option options = 6; |
| 104 | +} |
0 commit comments