• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2021 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.v1beta1;
18
19import "google/api/annotations.proto";
20import "google/api/client.proto";
21import "google/cloud/networkservices/v1beta1/endpoint_policy.proto";
22import "google/longrunning/operations.proto";
23
24option csharp_namespace = "Google.Cloud.NetworkServices.V1Beta1";
25option go_package = "cloud.google.com/go/networkservices/apiv1beta1/networkservicespb;networkservicespb";
26option java_multiple_files = true;
27option java_package = "com.google.cloud.networkservices.v1beta1";
28option php_namespace = "Google\\Cloud\\NetworkServices\\V1beta1";
29option ruby_package = "Google::Cloud::NetworkServices::V1beta1";
30
31service NetworkServices {
32  option (google.api.default_host) = "networkservices.googleapis.com";
33  option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
34
35  // Lists EndpointPolicies in a given project and location.
36  rpc ListEndpointPolicies(ListEndpointPoliciesRequest) returns (ListEndpointPoliciesResponse) {
37    option (google.api.http) = {
38      get: "/v1beta1/{parent=projects/*/locations/*}/endpointPolicies"
39    };
40    option (google.api.method_signature) = "parent";
41  }
42
43  // Gets details of a single EndpointPolicy.
44  rpc GetEndpointPolicy(GetEndpointPolicyRequest) returns (EndpointPolicy) {
45    option (google.api.http) = {
46      get: "/v1beta1/{name=projects/*/locations/*/endpointPolicies/*}"
47    };
48    option (google.api.method_signature) = "name";
49  }
50
51  // Creates a new EndpointPolicy in a given project and location.
52  rpc CreateEndpointPolicy(CreateEndpointPolicyRequest) returns (google.longrunning.Operation) {
53    option (google.api.http) = {
54      post: "/v1beta1/{parent=projects/*/locations/*}/endpointPolicies"
55      body: "endpoint_policy"
56    };
57    option (google.api.method_signature) = "parent,endpoint_policy,endpoint_policy_id";
58    option (google.longrunning.operation_info) = {
59      response_type: "EndpointPolicy"
60      metadata_type: "google.cloud.networkservices.v1beta1.OperationMetadata"
61    };
62  }
63
64  // Updates the parameters of a single EndpointPolicy.
65  rpc UpdateEndpointPolicy(UpdateEndpointPolicyRequest) returns (google.longrunning.Operation) {
66    option (google.api.http) = {
67      patch: "/v1beta1/{endpoint_policy.name=projects/*/locations/*/endpointPolicies/*}"
68      body: "endpoint_policy"
69    };
70    option (google.api.method_signature) = "endpoint_policy,update_mask";
71    option (google.longrunning.operation_info) = {
72      response_type: "EndpointPolicy"
73      metadata_type: "google.cloud.networkservices.v1beta1.OperationMetadata"
74    };
75  }
76
77  // Deletes a single EndpointPolicy.
78  rpc DeleteEndpointPolicy(DeleteEndpointPolicyRequest) returns (google.longrunning.Operation) {
79    option (google.api.http) = {
80      delete: "/v1beta1/{name=projects/*/locations/*/endpointPolicies/*}"
81    };
82    option (google.api.method_signature) = "name";
83    option (google.longrunning.operation_info) = {
84      response_type: "google.protobuf.Empty"
85      metadata_type: "google.cloud.networkservices.v1beta1.OperationMetadata"
86    };
87  }
88}
89