Skip to content

Commit ba94110

Browse files
committed
chore: check in common protos for gapic-generator-java
1 parent d5a8bc2 commit ba94110

9 files changed

Lines changed: 6423 additions & 139 deletions

File tree

sdk-platform-java/gapic-generator-java/pom.xml

Lines changed: 0 additions & 139 deletions
Original file line numberDiff line numberDiff line change
@@ -121,125 +121,6 @@
121121
</configuration>
122122
</plugin>
123123

124-
<plugin>
125-
<groupId>com.googlecode.maven-download-plugin</groupId>
126-
<artifactId>download-maven-plugin</artifactId>
127-
<version>1.6.8</version>
128-
<configuration>
129-
<skipCache>true</skipCache>
130-
</configuration>
131-
<executions>
132-
<execution>
133-
<id>download-metadata-proto</id>
134-
<phase>generate-sources</phase>
135-
<goals>
136-
<goal>wget</goal>
137-
</goals>
138-
<configuration>
139-
<url>
140-
https://raw.githubusercontent.com/googleapis/googleapis/${googleapis.commit}/gapic/metadata/gapic_metadata.proto
141-
</url>
142-
<outputDirectory>target/generated-sources/proto</outputDirectory>
143-
</configuration>
144-
</execution>
145-
<execution>
146-
<id>download-common-resources-proto</id>
147-
<phase>generate-test-sources</phase>
148-
<goals>
149-
<goal>wget</goal>
150-
</goals>
151-
<configuration>
152-
<url>
153-
https://raw.githubusercontent.com/googleapis/googleapis/${googleapis.commit}/google/cloud/common_resources.proto
154-
</url>
155-
<outputDirectory>target/generated-test-sources/proto</outputDirectory>
156-
</configuration>
157-
</execution>
158-
<execution>
159-
<id>download-pubsub-proto</id>
160-
<phase>generate-test-sources</phase>
161-
<goals>
162-
<goal>wget</goal>
163-
</goals>
164-
<configuration>
165-
<url>
166-
https://raw.githubusercontent.com/googleapis/googleapis/${googleapis.commit}/google/pubsub/v1/pubsub.proto
167-
</url>
168-
<outputDirectory>target/generated-test-sources/proto</outputDirectory>
169-
</configuration>
170-
</execution>
171-
<execution>
172-
<id>download-schema-proto</id>
173-
<phase>generate-test-sources</phase>
174-
<goals>
175-
<goal>wget</goal>
176-
</goals>
177-
<configuration>
178-
<url>
179-
https://raw.githubusercontent.com/googleapis/googleapis/${googleapis.commit}/google/pubsub/v1/schema.proto
180-
</url>
181-
<outputDirectory>target/generated-test-sources/proto/google/pubsub/v1
182-
</outputDirectory>
183-
</configuration>
184-
</execution>
185-
<execution>
186-
<id>download-logging-proto</id>
187-
<phase>generate-test-sources</phase>
188-
<goals>
189-
<goal>wget</goal>
190-
</goals>
191-
<configuration>
192-
<url>
193-
https://raw.githubusercontent.com/googleapis/googleapis/${googleapis.commit}/google/logging/v2/logging.proto
194-
</url>
195-
<outputDirectory>target/generated-test-sources/proto</outputDirectory>
196-
</configuration>
197-
</execution>
198-
<execution>
199-
<id>download-log-entry-proto</id>
200-
<phase>generate-test-sources</phase>
201-
<goals>
202-
<goal>wget</goal>
203-
</goals>
204-
<configuration>
205-
<url>
206-
https://raw.githubusercontent.com/googleapis/googleapis/${googleapis.commit}/google/logging/v2/log_entry.proto
207-
</url>
208-
<outputDirectory>target/generated-test-sources/proto/google/logging/v2
209-
</outputDirectory>
210-
</configuration>
211-
</execution>
212-
<execution>
213-
<id>download-logging-config-proto</id>
214-
<phase>generate-test-sources</phase>
215-
<goals>
216-
<goal>wget</goal>
217-
</goals>
218-
<configuration>
219-
<url>
220-
https://raw.githubusercontent.com/googleapis/googleapis/${googleapis.commit}/google/logging/v2/logging_config.proto
221-
</url>
222-
<outputDirectory>target/generated-test-sources/proto/google/logging/v2
223-
</outputDirectory>
224-
</configuration>
225-
</execution>
226-
<execution>
227-
<id>download-logging-metrics-proto</id>
228-
<phase>generate-test-sources</phase>
229-
<goals>
230-
<goal>wget</goal>
231-
</goals>
232-
<configuration>
233-
<url>
234-
https://raw.githubusercontent.com/googleapis/googleapis/${googleapis.commit}/google/logging/v2/logging_metrics.proto
235-
</url>
236-
<outputDirectory>target/generated-test-sources/proto/google/logging/v2
237-
</outputDirectory>
238-
</configuration>
239-
</execution>
240-
</executions>
241-
</plugin>
242-
243124
<plugin>
244125
<groupId>org.xolstice.maven.plugins</groupId>
245126
<artifactId>protobuf-maven-plugin</artifactId>
@@ -259,16 +140,6 @@
259140
<protoSourceRoot>src/main/proto</protoSourceRoot>
260141
</configuration>
261142
</execution>
262-
<execution>
263-
<id>compile-downloaded-protos</id>
264-
<goals>
265-
<goal>compile</goal>
266-
</goals>
267-
<configuration>
268-
<protoSourceRoot>target/generated-sources/proto</protoSourceRoot>
269-
<clearOutputDirectory>false</clearOutputDirectory>
270-
</configuration>
271-
</execution>
272143
<execution>
273144
<id>compile-test-protos</id>
274145
<goals>
@@ -282,16 +153,6 @@
282153
<descriptorSetFileName>test-proto.descriptorset</descriptorSetFileName>
283154
</configuration>
284155
</execution>
285-
<execution>
286-
<id>compile-downloaded-test-protos</id>
287-
<goals>
288-
<goal>test-compile</goal>
289-
</goals>
290-
<configuration>
291-
<protoTestSourceRoot>target/generated-test-sources/proto</protoTestSourceRoot>
292-
<clearOutputDirectory>false</clearOutputDirectory>
293-
</configuration>
294-
</execution>
295156
</executions>
296157
</plugin>
297158
<plugin>
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
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+
16+
syntax = "proto3";
17+
18+
package google.gapic.metadata;
19+
20+
option csharp_namespace = "Google.Gapic.Metadata";
21+
option go_package = "google.golang.org/genproto/googleapis/gapic/metadata;metadata";
22+
option java_multiple_files = true;
23+
option java_outer_classname = "GapicMetadataProto";
24+
option java_package = "com.google.gapic.metadata";
25+
option php_namespace = "Google\\Gapic\\Metadata";
26+
option ruby_package = "Google::Gapic::Metadata";
27+
28+
// Metadata about a GAPIC library service for a specific combination of API,
29+
// version, and computer language.
30+
message GapicMetadata {
31+
// Schema version of this proto. Current value: 1.0
32+
string schema = 1;
33+
34+
// Any human-readable comments to be included in this file.
35+
string comment = 2;
36+
37+
// Computer language of this generated language. This must be
38+
// spelled out as it spoken in English, with no capitalization or
39+
// separators (e.g. "csharp", "nodejs").
40+
string language = 3;
41+
42+
// The proto package containing the API definition for which this
43+
// GAPIC library was generated.
44+
string proto_package = 4;
45+
46+
// The language-specific library package for this GAPIC library.
47+
string library_package = 5;
48+
49+
// A map from each proto-defined service to ServiceForTransports,
50+
// which allows listing information about transport-specific
51+
// implementations of the service.
52+
//
53+
// The key is the name of the service as it appears in the .proto
54+
// file.
55+
map<string, ServiceForTransport> services = 6;
56+
57+
// A map from a transport name to ServiceAsClient, which allows
58+
// listing information about the client objects that implement the
59+
// parent RPC service for the specified transport.
60+
message ServiceForTransport {
61+
// Map of transport name to ServiceAsClient. The key name is the transport,
62+
// lower-cased with no separators (e.g. "grpc", "rest").
63+
map<string, ServiceAsClient> clients = 1;
64+
65+
// The API version for the interface definition found in the
66+
// `google.api.api_version` annotation of this proto-defined service during
67+
// code generation.
68+
// This is the value populated by the client in the API version request
69+
// parameter as per
70+
// [AIP-4236](https://google.aip.dev/client-libraries/4236).
71+
string api_version = 2;
72+
}
73+
74+
// Information about a specific client implementing a proto-defined service.
75+
message ServiceAsClient {
76+
// The name of the library client formatted as it appears in the source code
77+
string library_client = 1;
78+
79+
// A mapping from each proto-defined RPC name to the the list of
80+
// methods in library_client that implement it. There can be more
81+
// than one library_client method for each RPC. RPCs with no
82+
// library_client methods need not be included.
83+
//
84+
// The key name is the name of the RPC as defined and formatted in
85+
// the proto file.
86+
map<string, MethodList> rpcs = 2;
87+
}
88+
89+
// List of GAPIC client methods implementing the proto-defined RPC
90+
// for the transport and service specified in the containing
91+
// structures.
92+
message MethodList {
93+
// List of methods for a specific proto-service client in the
94+
// GAPIC. These names should be formatted as they appear in the
95+
// source code.
96+
repeated string methods = 1;
97+
}
98+
}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
// Copyright 2025 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+
// This file contains stub messages for common resources in GCP.
16+
// It is not intended to be directly generated, and is instead used by
17+
// other tooling to be able to match common resource patterns.
18+
syntax = "proto3";
19+
20+
package google.cloud;
21+
22+
import "google/api/resource.proto";
23+
24+
25+
option (google.api.resource_definition) = {
26+
type: "cloudresourcemanager.googleapis.com/Project"
27+
pattern: "projects/{project}"
28+
};
29+
30+
31+
option (google.api.resource_definition) = {
32+
type: "cloudresourcemanager.googleapis.com/Organization"
33+
pattern: "organizations/{organization}"
34+
};
35+
36+
37+
option (google.api.resource_definition) = {
38+
type: "cloudresourcemanager.googleapis.com/Folder"
39+
pattern: "folders/{folder}"
40+
};
41+
42+
43+
option (google.api.resource_definition) = {
44+
type: "cloudbilling.googleapis.com/BillingAccount"
45+
pattern: "billingAccounts/{billing_account}"
46+
};
47+
48+
option (google.api.resource_definition) = {
49+
type: "locations.googleapis.com/Location"
50+
pattern: "projects/{project}/locations/{location}"
51+
};
52+

0 commit comments

Comments
 (0)