Skip to content

Commit 528330d

Browse files
authored
Add longrunning (#12)
* adding google/longrunning/operations.proto but having trouble * disable CompareAll for operations.proto * added missing replacement * fixed bad import replacements
1 parent 01e0f9c commit 528330d

File tree

13 files changed

+4345
-199
lines changed

13 files changed

+4345
-199
lines changed

Makefile

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ regenerate:
1919
:. \
2020
-I=. \
2121
google/api/http.proto \
22-
google/api/annotations.proto
22+
google/api/annotations.proto \
23+
google/api/client.proto
2324

2425
protoc \
2526
--gogogoogleapis_out=\
@@ -33,6 +34,20 @@ regenerate:
3334
google/api/expr/v1alpha1/syntax.proto \
3435
google/api/expr/v1alpha1/value.proto
3536

37+
protoc \
38+
--gogogoogleapis_out=\
39+
Mgoogle/api/annotations.proto=github.com/gogo/googleapis/google/api,\
40+
Mgoogle/api/http.proto=github.com/gogo/googleapis/google/api,\
41+
Mgoogle/api/client.proto=github.com/gogo/googleapis/google/api,\
42+
Mgoogle/rpc/status.proto=github.com/gogo/googleapis/google/rpc,\
43+
Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,\
44+
Mgoogle/protobuf/empty.proto=github.com/gogo/protobuf/types,\
45+
Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types,\
46+
Mgoogle/protobuf/descriptor.proto=github.com/gogo/protobuf/protoc-gen-gogo/descriptor,\
47+
:. \
48+
-I=. \
49+
google/longrunning/operations.proto
50+
3651
protoc \
3752
--gogogoogleapis_out=\
3853
Mgoogle/protobuf/descriptor.proto=github.com/gogo/protobuf/protoc-gen-gogo/descriptor,\
@@ -98,6 +113,12 @@ update:
98113
'option go_package = "api";' \
99114
./google/api/annotations.proto
100115

116+
(cd ./google/api && rm client.proto; wget ${URL}/google/api/client.proto)
117+
gogoreplace \
118+
'option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations";' \
119+
'option go_package = "api";' \
120+
./google/api/client.proto
121+
101122
(cd ./google/api/expr/v1alpha1 && rm syntax.proto; wget ${URL}/google/api/expr/v1alpha1/syntax.proto)
102123
gogoreplace \
103124
'option go_package = "google.golang.org/genproto/googleapis/api/expr/v1alpha1;expr";' \
@@ -110,6 +131,12 @@ update:
110131
'option go_package = "expr";' \
111132
./google/api/expr/v1alpha1/value.proto
112133

134+
(cd ./google/longrunning && rm operations.proto; wget ${URL}/google/longrunning/operations.proto)
135+
gogoreplace \
136+
'option go_package = "google.golang.org/genproto/googleapis/longrunning;longrunning";' \
137+
'option go_package = "longrunning";' \
138+
./google/longrunning/operations.proto
139+
113140
(cd ./google/type && rm calendar_period.proto; wget ${URL}/google/type/calendar_period.proto)
114141
gogoreplace \
115142
'option go_package = "google.golang.org/genproto/googleapis/type/calendarperiod;calendarperiod";' \

google/api/client.pb.go

Lines changed: 79 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

google/api/client.proto

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
// Copyright 2019 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+
16+
syntax = "proto3";
17+
18+
package google.api;
19+
20+
import "google/protobuf/descriptor.proto";
21+
22+
option go_package = "api";
23+
option java_multiple_files = true;
24+
option java_outer_classname = "ClientProto";
25+
option java_package = "com.google.api";
26+
option objc_class_prefix = "GAPI";
27+
28+
extend google.protobuf.MethodOptions {
29+
// A definition of a client library method signature.
30+
//
31+
// In client libraries, each proto RPC corresponds to one or more methods
32+
// which the end user is able to call, and calls the underlying RPC.
33+
// Normally, this method receives a single argument (a struct or instance
34+
// corresponding to the RPC request object). Defining this field will
35+
// add one or more overloads providing flattened or simpler method signatures
36+
// in some languages.
37+
//
38+
// The fields on the method signature are provided as a comma-separated
39+
// string.
40+
//
41+
// For example, the proto RPC and annotation:
42+
//
43+
// rpc CreateSubscription(CreateSubscriptionRequest)
44+
// returns (Subscription) {
45+
// option (google.api.method_signature) = "name,topic";
46+
// }
47+
//
48+
// Would add the following Java overload (in addition to the method accepting
49+
// the request object):
50+
//
51+
// public final Subscription createSubscription(String name, String topic)
52+
//
53+
// The following backwards-compatibility guidelines apply:
54+
//
55+
// * Adding this annotation to an unannotated method is backwards
56+
// compatible.
57+
// * Adding this annotation to a method which already has existing
58+
// method signature annotations is backwards compatible if and only if
59+
// the new method signature annotation is last in the sequence.
60+
// * Modifying or removing an existing method signature annotation is
61+
// a breaking change.
62+
// * Re-ordering existing method signature annotations is a breaking
63+
// change.
64+
repeated string method_signature = 1051;
65+
}
66+
67+
extend google.protobuf.ServiceOptions {
68+
// The hostname for this service.
69+
// This should be specified with no prefix or protocol.
70+
//
71+
// Example:
72+
//
73+
// service Foo {
74+
// option (google.api.default_host) = "foo.googleapi.com";
75+
// ...
76+
// }
77+
string default_host = 1049;
78+
79+
// OAuth scopes needed for the client.
80+
//
81+
// Example:
82+
//
83+
// service Foo {
84+
// option (google.api.oauth_scopes) = \
85+
// "https://www.googleapis.com/auth/cloud-platform";
86+
// ...
87+
// }
88+
//
89+
// If there is more than one scope, use a comma-separated string:
90+
//
91+
// Example:
92+
//
93+
// service Foo {
94+
// option (google.api.oauth_scopes) = \
95+
// "https://www.googleapis.com/auth/cloud-platform,"
96+
// "https://www.googleapis.com/auth/monitoring";
97+
// ...
98+
// }
99+
string oauth_scopes = 1050;
100+
}

0 commit comments

Comments
 (0)