|
| 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 | + |
| 15 | +syntax = "proto3"; |
| 16 | + |
| 17 | +package google.duplicate_methods_test.v1; |
| 18 | + |
| 19 | +import "google/api/annotations.proto"; |
| 20 | +import "google/api/client.proto"; |
| 21 | +import "google/iam/v1/iam_policy.proto"; |
| 22 | +import "google/iam/v1/policy.proto"; |
| 23 | +import "google/cloud/location/locations.proto"; |
| 24 | + |
| 25 | +option csharp_namespace = "Google.DuplicateMethodsTest.V1"; |
| 26 | +option go_package = "google.golang.org/genproto/googleapis/duplicate_methods_test/v1;duplicate_methods_test"; |
| 27 | +option java_multiple_files = true; |
| 28 | +option java_outer_classname = "DuplicateMethodsTestProto"; |
| 29 | +option java_package = "com.google.duplicate_methods_test.v1"; |
| 30 | +option php_namespace = "Google\\DuplicateMethodsTest\\V1"; |
| 31 | +option ruby_package = "Google::DuplicateMethodsTest::V1"; |
| 32 | + |
| 33 | +service DuplicateMethodsTestService { |
| 34 | + option (google.api.default_host) = "duplicatemethodstest.googleapis.com"; |
| 35 | + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; |
| 36 | + |
| 37 | + // Native GetIamPolicy method that conflicts with the IAMPolicy mixin. |
| 38 | + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { |
| 39 | + option (google.api.http) = { |
| 40 | + get: "/v1/{resource=projects/*}:getIamPolicy" |
| 41 | + }; |
| 42 | + } |
| 43 | + |
| 44 | + // Native ListLocations method that conflicts with the Locations mixin. |
| 45 | + rpc ListLocations(google.cloud.location.ListLocationsRequest) returns (google.cloud.location.ListLocationsResponse) { |
| 46 | + option (google.api.http) = { |
| 47 | + get: "/v1/{name=projects/*}/locations" |
| 48 | + }; |
| 49 | + } |
| 50 | + |
| 51 | + // Another native method to ensure the service is valid and has other methods. |
| 52 | + rpc Echo(EchoRequest) returns (EchoResponse) { |
| 53 | + option (google.api.http) = { |
| 54 | + post: "/v1/echo" |
| 55 | + body: "*" |
| 56 | + }; |
| 57 | + } |
| 58 | +} |
| 59 | + |
| 60 | +message EchoRequest { |
| 61 | + string content = 1; |
| 62 | +} |
| 63 | + |
| 64 | +message EchoResponse { |
| 65 | + string content = 1; |
| 66 | +} |
0 commit comments