service.proto 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. // Copyright 2016 Google Inc.
  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. syntax = "proto3";
  15. package google.api;
  16. import "google/api/annotations.proto";
  17. import "google/api/auth.proto";
  18. import "google/api/backend.proto";
  19. import "google/api/context.proto";
  20. import "google/api/control.proto";
  21. import "google/api/documentation.proto";
  22. import "google/api/endpoint.proto";
  23. import "google/api/http.proto";
  24. import "google/api/label.proto";
  25. import "google/api/log.proto";
  26. import "google/api/logging.proto";
  27. import "google/api/metric.proto";
  28. import "google/api/monitored_resource.proto";
  29. import "google/api/monitoring.proto";
  30. import "google/api/system_parameter.proto";
  31. import "google/api/usage.proto";
  32. import "google/protobuf/any.proto";
  33. import "google/protobuf/api.proto";
  34. import "google/protobuf/type.proto";
  35. import "google/protobuf/wrappers.proto";
  36. option java_multiple_files = true;
  37. option java_outer_classname = "ServiceProto";
  38. option java_package = "com.google.api";
  39. option objc_class_prefix = "GAPI";
  40. // `Service` is the root object of the configuration schema. It
  41. // describes basic information like the name of the service and the
  42. // exposed API interfaces, and delegates other aspects to configuration
  43. // sub-sections.
  44. //
  45. // Example:
  46. //
  47. // type: google.api.Service
  48. // config_version: 1
  49. // name: calendar.googleapis.com
  50. // title: Google Calendar API
  51. // apis:
  52. // - name: google.calendar.Calendar
  53. // backend:
  54. // rules:
  55. // - selector: "*"
  56. // address: calendar.example.com
  57. message Service {
  58. // The version of the service configuration. The config version may
  59. // influence interpretation of the configuration, for example, to
  60. // determine defaults. This is documented together with applicable
  61. // options. The current default for the config version itself is `3`.
  62. google.protobuf.UInt32Value config_version = 20;
  63. // The DNS address at which this service is available,
  64. // e.g. `calendar.googleapis.com`.
  65. string name = 1;
  66. // A unique ID for a specific instance of this message, typically assigned
  67. // by the client for tracking purpose. If empty, the server may choose to
  68. // generate one instead.
  69. string id = 33;
  70. // The product title associated with this service.
  71. string title = 2;
  72. // The id of the Google developer project that owns the service.
  73. // Members of this project can manage the service configuration,
  74. // manage consumption of the service, etc.
  75. string producer_project_id = 22;
  76. // A list of API interfaces exported by this service. Only the `name` field
  77. // of the [google.protobuf.Api][google.protobuf.Api] needs to be provided by the configuration
  78. // author, as the remaining fields will be derived from the IDL during the
  79. // normalization process. It is an error to specify an API interface here
  80. // which cannot be resolved against the associated IDL files.
  81. repeated google.protobuf.Api apis = 3;
  82. // A list of all proto message types included in this API service.
  83. // Types referenced directly or indirectly by the `apis` are
  84. // automatically included. Messages which are not referenced but
  85. // shall be included, such as types used by the `google.protobuf.Any` type,
  86. // should be listed here by name. Example:
  87. //
  88. // types:
  89. // - name: google.protobuf.Int32
  90. repeated google.protobuf.Type types = 4;
  91. // A list of all enum types included in this API service. Enums
  92. // referenced directly or indirectly by the `apis` are automatically
  93. // included. Enums which are not referenced but shall be included
  94. // should be listed here by name. Example:
  95. //
  96. // enums:
  97. // - name: google.someapi.v1.SomeEnum
  98. repeated google.protobuf.Enum enums = 5;
  99. // Additional API documentation.
  100. Documentation documentation = 6;
  101. // API backend configuration.
  102. Backend backend = 8;
  103. // HTTP configuration.
  104. Http http = 9;
  105. // Auth configuration.
  106. Authentication authentication = 11;
  107. // Context configuration.
  108. Context context = 12;
  109. // Configuration controlling usage of this service.
  110. Usage usage = 15;
  111. // Configuration for network endpoints. If this is empty, then an endpoint
  112. // with the same name as the service is automatically generated to service all
  113. // defined APIs.
  114. repeated Endpoint endpoints = 18;
  115. // Configuration for the service control plane.
  116. Control control = 21;
  117. // Defines the logs used by this service.
  118. repeated LogDescriptor logs = 23;
  119. // Defines the metrics used by this service.
  120. repeated MetricDescriptor metrics = 24;
  121. // Defines the monitored resources used by this service. This is required
  122. // by the [Service.monitoring][google.api.Service.monitoring] and [Service.logging][google.api.Service.logging] configurations.
  123. repeated MonitoredResourceDescriptor monitored_resources = 25;
  124. // Logging configuration of the service.
  125. Logging logging = 27;
  126. // Monitoring configuration of the service.
  127. Monitoring monitoring = 28;
  128. // Configuration for system parameters.
  129. SystemParameters system_parameters = 29;
  130. }