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