1// Copyright 2023 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.networkservices.v1; 18 19import "google/api/annotations.proto"; 20import "google/api/client.proto"; 21import "google/cloud/networkservices/v1/endpoint_policy.proto"; 22import "google/cloud/networkservices/v1/gateway.proto"; 23import "google/cloud/networkservices/v1/grpc_route.proto"; 24import "google/cloud/networkservices/v1/http_route.proto"; 25import "google/cloud/networkservices/v1/mesh.proto"; 26import "google/cloud/networkservices/v1/service_binding.proto"; 27import "google/cloud/networkservices/v1/tcp_route.proto"; 28import "google/cloud/networkservices/v1/tls_route.proto"; 29import "google/longrunning/operations.proto"; 30 31option csharp_namespace = "Google.Cloud.NetworkServices.V1"; 32option go_package = "cloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb"; 33option java_multiple_files = true; 34option java_package = "com.google.cloud.networkservices.v1"; 35option php_namespace = "Google\\Cloud\\NetworkServices\\V1"; 36option ruby_package = "Google::Cloud::NetworkServices::V1"; 37 38service NetworkServices { 39 option (google.api.default_host) = "networkservices.googleapis.com"; 40 option (google.api.oauth_scopes) = 41 "https://www.googleapis.com/auth/cloud-platform"; 42 43 // Lists EndpointPolicies in a given project and location. 44 rpc ListEndpointPolicies(ListEndpointPoliciesRequest) 45 returns (ListEndpointPoliciesResponse) { 46 option (google.api.http) = { 47 get: "/v1/{parent=projects/*/locations/*}/endpointPolicies" 48 }; 49 option (google.api.method_signature) = "parent"; 50 } 51 52 // Gets details of a single EndpointPolicy. 53 rpc GetEndpointPolicy(GetEndpointPolicyRequest) returns (EndpointPolicy) { 54 option (google.api.http) = { 55 get: "/v1/{name=projects/*/locations/*/endpointPolicies/*}" 56 }; 57 option (google.api.method_signature) = "name"; 58 } 59 60 // Creates a new EndpointPolicy in a given project and location. 61 rpc CreateEndpointPolicy(CreateEndpointPolicyRequest) 62 returns (google.longrunning.Operation) { 63 option (google.api.http) = { 64 post: "/v1/{parent=projects/*/locations/*}/endpointPolicies" 65 body: "endpoint_policy" 66 }; 67 option (google.api.method_signature) = 68 "parent,endpoint_policy,endpoint_policy_id"; 69 option (google.longrunning.operation_info) = { 70 response_type: "EndpointPolicy" 71 metadata_type: "google.cloud.networkservices.v1.OperationMetadata" 72 }; 73 } 74 75 // Updates the parameters of a single EndpointPolicy. 76 rpc UpdateEndpointPolicy(UpdateEndpointPolicyRequest) 77 returns (google.longrunning.Operation) { 78 option (google.api.http) = { 79 patch: "/v1/{endpoint_policy.name=projects/*/locations/*/endpointPolicies/*}" 80 body: "endpoint_policy" 81 }; 82 option (google.api.method_signature) = "endpoint_policy,update_mask"; 83 option (google.longrunning.operation_info) = { 84 response_type: "EndpointPolicy" 85 metadata_type: "google.cloud.networkservices.v1.OperationMetadata" 86 }; 87 } 88 89 // Deletes a single EndpointPolicy. 90 rpc DeleteEndpointPolicy(DeleteEndpointPolicyRequest) 91 returns (google.longrunning.Operation) { 92 option (google.api.http) = { 93 delete: "/v1/{name=projects/*/locations/*/endpointPolicies/*}" 94 }; 95 option (google.api.method_signature) = "name"; 96 option (google.longrunning.operation_info) = { 97 response_type: "google.protobuf.Empty" 98 metadata_type: "google.cloud.networkservices.v1.OperationMetadata" 99 }; 100 } 101 102 // Lists Gateways in a given project and location. 103 rpc ListGateways(ListGatewaysRequest) returns (ListGatewaysResponse) { 104 option (google.api.http) = { 105 get: "/v1/{parent=projects/*/locations/*}/gateways" 106 }; 107 option (google.api.method_signature) = "parent"; 108 } 109 110 // Gets details of a single Gateway. 111 rpc GetGateway(GetGatewayRequest) returns (Gateway) { 112 option (google.api.http) = { 113 get: "/v1/{name=projects/*/locations/*/gateways/*}" 114 }; 115 option (google.api.method_signature) = "name"; 116 } 117 118 // Creates a new Gateway in a given project and location. 119 rpc CreateGateway(CreateGatewayRequest) 120 returns (google.longrunning.Operation) { 121 option (google.api.http) = { 122 post: "/v1/{parent=projects/*/locations/*}/gateways" 123 body: "gateway" 124 }; 125 option (google.api.method_signature) = "parent,gateway,gateway_id"; 126 option (google.longrunning.operation_info) = { 127 response_type: "Gateway" 128 metadata_type: "google.cloud.networkservices.v1.OperationMetadata" 129 }; 130 } 131 132 // Updates the parameters of a single Gateway. 133 rpc UpdateGateway(UpdateGatewayRequest) 134 returns (google.longrunning.Operation) { 135 option (google.api.http) = { 136 patch: "/v1/{gateway.name=projects/*/locations/*/gateways/*}" 137 body: "gateway" 138 }; 139 option (google.api.method_signature) = "gateway,update_mask"; 140 option (google.longrunning.operation_info) = { 141 response_type: "Gateway" 142 metadata_type: "google.cloud.networkservices.v1.OperationMetadata" 143 }; 144 } 145 146 // Deletes a single Gateway. 147 rpc DeleteGateway(DeleteGatewayRequest) 148 returns (google.longrunning.Operation) { 149 option (google.api.http) = { 150 delete: "/v1/{name=projects/*/locations/*/gateways/*}" 151 }; 152 option (google.api.method_signature) = "name"; 153 option (google.longrunning.operation_info) = { 154 response_type: "google.protobuf.Empty" 155 metadata_type: "google.cloud.networkservices.v1.OperationMetadata" 156 }; 157 } 158 159 // Lists GrpcRoutes in a given project and location. 160 rpc ListGrpcRoutes(ListGrpcRoutesRequest) returns (ListGrpcRoutesResponse) { 161 option (google.api.http) = { 162 get: "/v1/{parent=projects/*/locations/*}/grpcRoutes" 163 }; 164 option (google.api.method_signature) = "parent"; 165 } 166 167 // Gets details of a single GrpcRoute. 168 rpc GetGrpcRoute(GetGrpcRouteRequest) returns (GrpcRoute) { 169 option (google.api.http) = { 170 get: "/v1/{name=projects/*/locations/*/grpcRoutes/*}" 171 }; 172 option (google.api.method_signature) = "name"; 173 } 174 175 // Creates a new GrpcRoute in a given project and location. 176 rpc CreateGrpcRoute(CreateGrpcRouteRequest) 177 returns (google.longrunning.Operation) { 178 option (google.api.http) = { 179 post: "/v1/{parent=projects/*/locations/*}/grpcRoutes" 180 body: "grpc_route" 181 }; 182 option (google.api.method_signature) = "parent,grpc_route,grpc_route_id"; 183 option (google.longrunning.operation_info) = { 184 response_type: "GrpcRoute" 185 metadata_type: "google.cloud.networkservices.v1.OperationMetadata" 186 }; 187 } 188 189 // Updates the parameters of a single GrpcRoute. 190 rpc UpdateGrpcRoute(UpdateGrpcRouteRequest) 191 returns (google.longrunning.Operation) { 192 option (google.api.http) = { 193 patch: "/v1/{grpc_route.name=projects/*/locations/*/grpcRoutes/*}" 194 body: "grpc_route" 195 }; 196 option (google.api.method_signature) = "grpc_route,update_mask"; 197 option (google.longrunning.operation_info) = { 198 response_type: "GrpcRoute" 199 metadata_type: "google.cloud.networkservices.v1.OperationMetadata" 200 }; 201 } 202 203 // Deletes a single GrpcRoute. 204 rpc DeleteGrpcRoute(DeleteGrpcRouteRequest) 205 returns (google.longrunning.Operation) { 206 option (google.api.http) = { 207 delete: "/v1/{name=projects/*/locations/*/grpcRoutes/*}" 208 }; 209 option (google.api.method_signature) = "name"; 210 option (google.longrunning.operation_info) = { 211 response_type: "google.protobuf.Empty" 212 metadata_type: "google.cloud.networkservices.v1.OperationMetadata" 213 }; 214 } 215 216 // Lists HttpRoute in a given project and location. 217 rpc ListHttpRoutes(ListHttpRoutesRequest) returns (ListHttpRoutesResponse) { 218 option (google.api.http) = { 219 get: "/v1/{parent=projects/*/locations/*}/httpRoutes" 220 }; 221 option (google.api.method_signature) = "parent"; 222 } 223 224 // Gets details of a single HttpRoute. 225 rpc GetHttpRoute(GetHttpRouteRequest) returns (HttpRoute) { 226 option (google.api.http) = { 227 get: "/v1/{name=projects/*/locations/*/httpRoutes/*}" 228 }; 229 option (google.api.method_signature) = "name"; 230 } 231 232 // Creates a new HttpRoute in a given project and location. 233 rpc CreateHttpRoute(CreateHttpRouteRequest) 234 returns (google.longrunning.Operation) { 235 option (google.api.http) = { 236 post: "/v1/{parent=projects/*/locations/*}/httpRoutes" 237 body: "http_route" 238 }; 239 option (google.api.method_signature) = "parent,http_route,http_route_id"; 240 option (google.longrunning.operation_info) = { 241 response_type: "HttpRoute" 242 metadata_type: "google.cloud.networkservices.v1.OperationMetadata" 243 }; 244 } 245 246 // Updates the parameters of a single HttpRoute. 247 rpc UpdateHttpRoute(UpdateHttpRouteRequest) 248 returns (google.longrunning.Operation) { 249 option (google.api.http) = { 250 patch: "/v1/{http_route.name=projects/*/locations/*/httpRoutes/*}" 251 body: "http_route" 252 }; 253 option (google.api.method_signature) = "http_route,update_mask"; 254 option (google.longrunning.operation_info) = { 255 response_type: "HttpRoute" 256 metadata_type: "google.cloud.networkservices.v1.OperationMetadata" 257 }; 258 } 259 260 // Deletes a single HttpRoute. 261 rpc DeleteHttpRoute(DeleteHttpRouteRequest) 262 returns (google.longrunning.Operation) { 263 option (google.api.http) = { 264 delete: "/v1/{name=projects/*/locations/*/httpRoutes/*}" 265 }; 266 option (google.api.method_signature) = "name"; 267 option (google.longrunning.operation_info) = { 268 response_type: "google.protobuf.Empty" 269 metadata_type: "google.cloud.networkservices.v1.OperationMetadata" 270 }; 271 } 272 273 // Lists TcpRoute in a given project and location. 274 rpc ListTcpRoutes(ListTcpRoutesRequest) returns (ListTcpRoutesResponse) { 275 option (google.api.http) = { 276 get: "/v1/{parent=projects/*/locations/*}/tcpRoutes" 277 }; 278 option (google.api.method_signature) = "parent"; 279 } 280 281 // Gets details of a single TcpRoute. 282 rpc GetTcpRoute(GetTcpRouteRequest) returns (TcpRoute) { 283 option (google.api.http) = { 284 get: "/v1/{name=projects/*/locations/*/tcpRoutes/*}" 285 }; 286 option (google.api.method_signature) = "name"; 287 } 288 289 // Creates a new TcpRoute in a given project and location. 290 rpc CreateTcpRoute(CreateTcpRouteRequest) 291 returns (google.longrunning.Operation) { 292 option (google.api.http) = { 293 post: "/v1/{parent=projects/*/locations/*}/tcpRoutes" 294 body: "tcp_route" 295 }; 296 option (google.api.method_signature) = "parent,tcp_route,tcp_route_id"; 297 option (google.longrunning.operation_info) = { 298 response_type: "TcpRoute" 299 metadata_type: "google.cloud.networkservices.v1.OperationMetadata" 300 }; 301 } 302 303 // Updates the parameters of a single TcpRoute. 304 rpc UpdateTcpRoute(UpdateTcpRouteRequest) 305 returns (google.longrunning.Operation) { 306 option (google.api.http) = { 307 patch: "/v1/{tcp_route.name=projects/*/locations/*/tcpRoutes/*}" 308 body: "tcp_route" 309 }; 310 option (google.api.method_signature) = "tcp_route,update_mask"; 311 option (google.longrunning.operation_info) = { 312 response_type: "TcpRoute" 313 metadata_type: "google.cloud.networkservices.v1.OperationMetadata" 314 }; 315 } 316 317 // Deletes a single TcpRoute. 318 rpc DeleteTcpRoute(DeleteTcpRouteRequest) 319 returns (google.longrunning.Operation) { 320 option (google.api.http) = { 321 delete: "/v1/{name=projects/*/locations/*/tcpRoutes/*}" 322 }; 323 option (google.api.method_signature) = "name"; 324 option (google.longrunning.operation_info) = { 325 response_type: "google.protobuf.Empty" 326 metadata_type: "google.cloud.networkservices.v1.OperationMetadata" 327 }; 328 } 329 330 // Lists TlsRoute in a given project and location. 331 rpc ListTlsRoutes(ListTlsRoutesRequest) returns (ListTlsRoutesResponse) { 332 option (google.api.http) = { 333 get: "/v1/{parent=projects/*/locations/*}/tlsRoutes" 334 }; 335 option (google.api.method_signature) = "parent"; 336 } 337 338 // Gets details of a single TlsRoute. 339 rpc GetTlsRoute(GetTlsRouteRequest) returns (TlsRoute) { 340 option (google.api.http) = { 341 get: "/v1/{name=projects/*/locations/*/tlsRoutes/*}" 342 }; 343 option (google.api.method_signature) = "name"; 344 } 345 346 // Creates a new TlsRoute in a given project and location. 347 rpc CreateTlsRoute(CreateTlsRouteRequest) 348 returns (google.longrunning.Operation) { 349 option (google.api.http) = { 350 post: "/v1/{parent=projects/*/locations/*}/tlsRoutes" 351 body: "tls_route" 352 }; 353 option (google.api.method_signature) = "parent,tls_route,tls_route_id"; 354 option (google.longrunning.operation_info) = { 355 response_type: "TlsRoute" 356 metadata_type: "google.cloud.networkservices.v1.OperationMetadata" 357 }; 358 } 359 360 // Updates the parameters of a single TlsRoute. 361 rpc UpdateTlsRoute(UpdateTlsRouteRequest) 362 returns (google.longrunning.Operation) { 363 option (google.api.http) = { 364 patch: "/v1/{tls_route.name=projects/*/locations/*/tlsRoutes/*}" 365 body: "tls_route" 366 }; 367 option (google.api.method_signature) = "tls_route,update_mask"; 368 option (google.longrunning.operation_info) = { 369 response_type: "TlsRoute" 370 metadata_type: "google.cloud.networkservices.v1.OperationMetadata" 371 }; 372 } 373 374 // Deletes a single TlsRoute. 375 rpc DeleteTlsRoute(DeleteTlsRouteRequest) 376 returns (google.longrunning.Operation) { 377 option (google.api.http) = { 378 delete: "/v1/{name=projects/*/locations/*/tlsRoutes/*}" 379 }; 380 option (google.api.method_signature) = "name"; 381 option (google.longrunning.operation_info) = { 382 response_type: "google.protobuf.Empty" 383 metadata_type: "google.cloud.networkservices.v1.OperationMetadata" 384 }; 385 } 386 387 // Lists ServiceBinding in a given project and location. 388 rpc ListServiceBindings(ListServiceBindingsRequest) 389 returns (ListServiceBindingsResponse) { 390 option (google.api.http) = { 391 get: "/v1/{parent=projects/*/locations/*}/serviceBindings" 392 }; 393 option (google.api.method_signature) = "parent"; 394 } 395 396 // Gets details of a single ServiceBinding. 397 rpc GetServiceBinding(GetServiceBindingRequest) returns (ServiceBinding) { 398 option (google.api.http) = { 399 get: "/v1/{name=projects/*/locations/*/serviceBindings/*}" 400 }; 401 option (google.api.method_signature) = "name"; 402 } 403 404 // Creates a new ServiceBinding in a given project and location. 405 rpc CreateServiceBinding(CreateServiceBindingRequest) 406 returns (google.longrunning.Operation) { 407 option (google.api.http) = { 408 post: "/v1/{parent=projects/*/locations/*}/serviceBindings" 409 body: "service_binding" 410 }; 411 option (google.api.method_signature) = 412 "parent,service_binding,service_binding_id"; 413 option (google.longrunning.operation_info) = { 414 response_type: "ServiceBinding" 415 metadata_type: "google.cloud.networkservices.v1.OperationMetadata" 416 }; 417 } 418 419 // Deletes a single ServiceBinding. 420 rpc DeleteServiceBinding(DeleteServiceBindingRequest) 421 returns (google.longrunning.Operation) { 422 option (google.api.http) = { 423 delete: "/v1/{name=projects/*/locations/*/serviceBindings/*}" 424 }; 425 option (google.api.method_signature) = "name"; 426 option (google.longrunning.operation_info) = { 427 response_type: "google.protobuf.Empty" 428 metadata_type: "google.cloud.networkservices.v1.OperationMetadata" 429 }; 430 } 431 432 // Lists Meshes in a given project and location. 433 rpc ListMeshes(ListMeshesRequest) returns (ListMeshesResponse) { 434 option (google.api.http) = { 435 get: "/v1/{parent=projects/*/locations/*}/meshes" 436 }; 437 option (google.api.method_signature) = "parent"; 438 } 439 440 // Gets details of a single Mesh. 441 rpc GetMesh(GetMeshRequest) returns (Mesh) { 442 option (google.api.http) = { 443 get: "/v1/{name=projects/*/locations/*/meshes/*}" 444 }; 445 option (google.api.method_signature) = "name"; 446 } 447 448 // Creates a new Mesh in a given project and location. 449 rpc CreateMesh(CreateMeshRequest) returns (google.longrunning.Operation) { 450 option (google.api.http) = { 451 post: "/v1/{parent=projects/*/locations/*}/meshes" 452 body: "mesh" 453 }; 454 option (google.api.method_signature) = "parent,mesh,mesh_id"; 455 option (google.longrunning.operation_info) = { 456 response_type: "Mesh" 457 metadata_type: "google.cloud.networkservices.v1.OperationMetadata" 458 }; 459 } 460 461 // Updates the parameters of a single Mesh. 462 rpc UpdateMesh(UpdateMeshRequest) returns (google.longrunning.Operation) { 463 option (google.api.http) = { 464 patch: "/v1/{mesh.name=projects/*/locations/*/meshes/*}" 465 body: "mesh" 466 }; 467 option (google.api.method_signature) = "mesh,update_mask"; 468 option (google.longrunning.operation_info) = { 469 response_type: "Mesh" 470 metadata_type: "google.cloud.networkservices.v1.OperationMetadata" 471 }; 472 } 473 474 // Deletes a single Mesh. 475 rpc DeleteMesh(DeleteMeshRequest) returns (google.longrunning.Operation) { 476 option (google.api.http) = { 477 delete: "/v1/{name=projects/*/locations/*/meshes/*}" 478 }; 479 option (google.api.method_signature) = "name"; 480 option (google.longrunning.operation_info) = { 481 response_type: "google.protobuf.Empty" 482 metadata_type: "google.cloud.networkservices.v1.OperationMetadata" 483 }; 484 } 485} 486