client.proto 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. // Copyright 2019 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. //
  15. syntax = "proto3";
  16. package google.api;
  17. import "google/protobuf/descriptor.proto";
  18. option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations";
  19. option java_multiple_files = true;
  20. option java_outer_classname = "ClientProto";
  21. option java_package = "com.google.api";
  22. option objc_class_prefix = "GAPI";
  23. extend google.protobuf.MethodOptions {
  24. // A definition of a client library method signature.
  25. //
  26. // In client libraries, each proto RPC corresponds to one or more methods
  27. // which the end user is able to call, and calls the underlying RPC.
  28. // Normally, this method receives a single argument (a struct or instance
  29. // corresponding to the RPC request object). Defining this field will
  30. // add one or more overloads providing flattened or simpler method signatures
  31. // in some languages.
  32. //
  33. // The fields on the method signature are provided as a comma-separated
  34. // string.
  35. //
  36. // For example, the proto RPC and annotation:
  37. //
  38. // rpc CreateSubscription(CreateSubscriptionRequest)
  39. // returns (Subscription) {
  40. // option (google.api.method_signature) = "name,topic";
  41. // }
  42. //
  43. // Would add the following Java overload (in addition to the method accepting
  44. // the request object):
  45. //
  46. // public final Subscription createSubscription(String name, String topic)
  47. //
  48. // The following backwards-compatibility guidelines apply:
  49. //
  50. // * Adding this annotation to an unannotated method is backwards
  51. // compatible.
  52. // * Adding this annotation to a method which already has existing
  53. // method signature annotations is backwards compatible if and only if
  54. // the new method signature annotation is last in the sequence.
  55. // * Modifying or removing an existing method signature annotation is
  56. // a breaking change.
  57. // * Re-ordering existing method signature annotations is a breaking
  58. // change.
  59. repeated string method_signature = 1051;
  60. }
  61. extend google.protobuf.ServiceOptions {
  62. // The hostname for this service.
  63. // This should be specified with no prefix or protocol.
  64. //
  65. // Example:
  66. //
  67. // service Foo {
  68. // option (google.api.default_host) = "foo.googleapi.com";
  69. // ...
  70. // }
  71. string default_host = 1049;
  72. // OAuth scopes needed for the client.
  73. //
  74. // Example:
  75. //
  76. // service Foo {
  77. // option (google.api.oauth_scopes) = \
  78. // "https://www.googleapis.com/auth/cloud-platform";
  79. // ...
  80. // }
  81. //
  82. // If there is more than one scope, use a comma-separated string:
  83. //
  84. // Example:
  85. //
  86. // service Foo {
  87. // option (google.api.oauth_scopes) = \
  88. // "https://www.googleapis.com/auth/cloud-platform,"
  89. // "https://www.googleapis.com/auth/monitoring";
  90. // ...
  91. // }
  92. string oauth_scopes = 1050;
  93. }