apigateway_service.proto 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  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. syntax = "proto3";
  15. package google.cloud.apigateway.v1;
  16. import "google/api/annotations.proto";
  17. import "google/api/client.proto";
  18. import "google/cloud/apigateway/v1/apigateway.proto";
  19. import "google/longrunning/operations.proto";
  20. option csharp_namespace = "Google.Cloud.ApiGateway.V1";
  21. option go_package = "google.golang.org/genproto/googleapis/cloud/apigateway/v1;apigateway";
  22. option java_multiple_files = true;
  23. option java_package = "com.google.cloud.apigateway.v1";
  24. option php_namespace = "Google\\Cloud\\ApiGateway\\V1";
  25. option ruby_package = "Google::Cloud::ApiGateway::V1";
  26. // The API Gateway Service is the interface for managing API Gateways.
  27. service ApiGatewayService {
  28. option (google.api.default_host) = "apigateway.googleapis.com";
  29. option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
  30. // Lists Gateways in a given project and location.
  31. rpc ListGateways(ListGatewaysRequest) returns (ListGatewaysResponse) {
  32. option (google.api.http) = {
  33. get: "/v1/{parent=projects/*/locations/*}/gateways"
  34. };
  35. option (google.api.method_signature) = "parent";
  36. }
  37. // Gets details of a single Gateway.
  38. rpc GetGateway(GetGatewayRequest) returns (Gateway) {
  39. option (google.api.http) = {
  40. get: "/v1/{name=projects/*/locations/*/gateways/*}"
  41. };
  42. option (google.api.method_signature) = "name";
  43. }
  44. // Creates a new Gateway in a given project and location.
  45. rpc CreateGateway(CreateGatewayRequest) returns (google.longrunning.Operation) {
  46. option (google.api.http) = {
  47. post: "/v1/{parent=projects/*/locations/*}/gateways"
  48. body: "gateway"
  49. };
  50. option (google.api.method_signature) = "parent,gateway,gateway_id";
  51. option (google.longrunning.operation_info) = {
  52. response_type: "Gateway"
  53. metadata_type: "OperationMetadata"
  54. };
  55. }
  56. // Updates the parameters of a single Gateway.
  57. rpc UpdateGateway(UpdateGatewayRequest) returns (google.longrunning.Operation) {
  58. option (google.api.http) = {
  59. patch: "/v1/{gateway.name=projects/*/locations/*/gateways/*}"
  60. body: "gateway"
  61. };
  62. option (google.api.method_signature) = "gateway,update_mask";
  63. option (google.longrunning.operation_info) = {
  64. response_type: "Gateway"
  65. metadata_type: "OperationMetadata"
  66. };
  67. }
  68. // Deletes a single Gateway.
  69. rpc DeleteGateway(DeleteGatewayRequest) returns (google.longrunning.Operation) {
  70. option (google.api.http) = {
  71. delete: "/v1/{name=projects/*/locations/*/gateways/*}"
  72. };
  73. option (google.api.method_signature) = "name";
  74. option (google.longrunning.operation_info) = {
  75. response_type: "google.protobuf.Empty"
  76. metadata_type: "OperationMetadata"
  77. };
  78. }
  79. // Lists Apis in a given project and location.
  80. rpc ListApis(ListApisRequest) returns (ListApisResponse) {
  81. option (google.api.http) = {
  82. get: "/v1/{parent=projects/*/locations/*}/apis"
  83. };
  84. option (google.api.method_signature) = "parent";
  85. }
  86. // Gets details of a single Api.
  87. rpc GetApi(GetApiRequest) returns (Api) {
  88. option (google.api.http) = {
  89. get: "/v1/{name=projects/*/locations/*/apis/*}"
  90. };
  91. option (google.api.method_signature) = "name";
  92. }
  93. // Creates a new Api in a given project and location.
  94. rpc CreateApi(CreateApiRequest) returns (google.longrunning.Operation) {
  95. option (google.api.http) = {
  96. post: "/v1/{parent=projects/*/locations/*}/apis"
  97. body: "api"
  98. };
  99. option (google.api.method_signature) = "parent,api,api_id";
  100. option (google.longrunning.operation_info) = {
  101. response_type: "Api"
  102. metadata_type: "OperationMetadata"
  103. };
  104. }
  105. // Updates the parameters of a single Api.
  106. rpc UpdateApi(UpdateApiRequest) returns (google.longrunning.Operation) {
  107. option (google.api.http) = {
  108. patch: "/v1/{api.name=projects/*/locations/*/apis/*}"
  109. body: "api"
  110. };
  111. option (google.api.method_signature) = "api,update_mask";
  112. option (google.longrunning.operation_info) = {
  113. response_type: "Api"
  114. metadata_type: "OperationMetadata"
  115. };
  116. }
  117. // Deletes a single Api.
  118. rpc DeleteApi(DeleteApiRequest) returns (google.longrunning.Operation) {
  119. option (google.api.http) = {
  120. delete: "/v1/{name=projects/*/locations/*/apis/*}"
  121. };
  122. option (google.api.method_signature) = "name";
  123. option (google.longrunning.operation_info) = {
  124. response_type: "google.protobuf.Empty"
  125. metadata_type: "OperationMetadata"
  126. };
  127. }
  128. // Lists ApiConfigs in a given project and location.
  129. rpc ListApiConfigs(ListApiConfigsRequest) returns (ListApiConfigsResponse) {
  130. option (google.api.http) = {
  131. get: "/v1/{parent=projects/*/locations/*/apis/*}/configs"
  132. };
  133. option (google.api.method_signature) = "parent";
  134. }
  135. // Gets details of a single ApiConfig.
  136. rpc GetApiConfig(GetApiConfigRequest) returns (ApiConfig) {
  137. option (google.api.http) = {
  138. get: "/v1/{name=projects/*/locations/*/apis/*/configs/*}"
  139. };
  140. option (google.api.method_signature) = "name";
  141. }
  142. // Creates a new ApiConfig in a given project and location.
  143. rpc CreateApiConfig(CreateApiConfigRequest) returns (google.longrunning.Operation) {
  144. option (google.api.http) = {
  145. post: "/v1/{parent=projects/*/locations/*/apis/*}/configs"
  146. body: "api_config"
  147. };
  148. option (google.api.method_signature) = "parent,api_config,api_config_id";
  149. option (google.longrunning.operation_info) = {
  150. response_type: "ApiConfig"
  151. metadata_type: "OperationMetadata"
  152. };
  153. }
  154. // Updates the parameters of a single ApiConfig.
  155. rpc UpdateApiConfig(UpdateApiConfigRequest) returns (google.longrunning.Operation) {
  156. option (google.api.http) = {
  157. patch: "/v1/{api_config.name=projects/*/locations/*/apis/*/configs/*}"
  158. body: "api_config"
  159. };
  160. option (google.api.method_signature) = "api_config,update_mask";
  161. option (google.longrunning.operation_info) = {
  162. response_type: "ApiConfig"
  163. metadata_type: "OperationMetadata"
  164. };
  165. }
  166. // Deletes a single ApiConfig.
  167. rpc DeleteApiConfig(DeleteApiConfigRequest) returns (google.longrunning.Operation) {
  168. option (google.api.http) = {
  169. delete: "/v1/{name=projects/*/locations/*/apis/*/configs/*}"
  170. };
  171. option (google.api.method_signature) = "name";
  172. option (google.longrunning.operation_info) = {
  173. response_type: "google.protobuf.Empty"
  174. metadata_type: "OperationMetadata"
  175. };
  176. }
  177. }