Skip to content

Commit 0524ca8

Browse files
feat: add v1 to shopping-merchant-datasources (#11701)
Add proto path for v1 and let automation generate the library. PiperOrigin-RevId: 790723279 --------- Co-authored-by: cloud-java-bot <[email protected]>
1 parent d14c310 commit 0524ca8

File tree

122 files changed

+48779
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+48779
-0
lines changed

generation_config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2265,6 +2265,7 @@ libraries:
22652265
group_id: com.google.shopping
22662266
cloud_api: false
22672267
GAPICs:
2268+
- proto_path: google/shopping/merchant/datasources/v1
22682269
- proto_path: google/shopping/merchant/datasources/v1beta
22692270
library_name: shopping-merchant-datasources
22702271
requires_billing: true

java-shopping-merchant-datasources/google-shopping-merchant-datasources-bom/pom.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,21 @@
3333
<artifactId>grpc-google-shopping-merchant-datasources-v1beta</artifactId>
3434
<version>0.27.0-SNAPSHOT</version><!-- {x-version-update:grpc-google-shopping-merchant-datasources-v1beta:current} -->
3535
</dependency>
36+
<dependency>
37+
<groupId>com.google.shopping.api.grpc</groupId>
38+
<artifactId>grpc-google-shopping-merchant-datasources-v1</artifactId>
39+
<version>0.27.0-SNAPSHOT</version><!-- {x-version-update:grpc-google-shopping-merchant-datasources-v1:current} -->
40+
</dependency>
3641
<dependency>
3742
<groupId>com.google.shopping.api.grpc</groupId>
3843
<artifactId>proto-google-shopping-merchant-datasources-v1beta</artifactId>
3944
<version>0.27.0-SNAPSHOT</version><!-- {x-version-update:proto-google-shopping-merchant-datasources-v1beta:current} -->
4045
</dependency>
46+
<dependency>
47+
<groupId>com.google.shopping.api.grpc</groupId>
48+
<artifactId>proto-google-shopping-merchant-datasources-v1</artifactId>
49+
<version>0.27.0-SNAPSHOT</version><!-- {x-version-update:proto-google-shopping-merchant-datasources-v1:current} -->
50+
</dependency>
4151
</dependencies>
4252
</dependencyManagement>
4353
</project>

java-shopping-merchant-datasources/google-shopping-merchant-datasources/pom.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@
4141
<artifactId>proto-google-common-protos</artifactId>
4242
</dependency>
4343

44+
<dependency>
45+
<groupId>com.google.shopping.api.grpc</groupId>
46+
<artifactId>proto-google-shopping-merchant-datasources-v1</artifactId>
47+
</dependency>
4448
<dependency>
4549
<groupId>com.google.shopping.api.grpc</groupId>
4650
<artifactId>proto-google-shopping-merchant-datasources-v1beta</artifactId>
@@ -66,6 +70,11 @@
6670
<artifactId>grpc-google-common-protos</artifactId>
6771
<scope>test</scope>
6872
</dependency>
73+
<dependency>
74+
<groupId>com.google.shopping.api.grpc</groupId>
75+
<artifactId>grpc-google-shopping-merchant-datasources-v1</artifactId>
76+
<scope>test</scope>
77+
</dependency>
6978
<dependency>
7079
<groupId>com.google.api.grpc</groupId>
7180
<artifactId>proto-google-iam-v1</artifactId>

java-shopping-merchant-datasources/google-shopping-merchant-datasources/src/main/java/com/google/shopping/merchant/datasources/v1/DataSourcesServiceClient.java

Lines changed: 1063 additions & 0 deletions
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,276 @@
1+
/*
2+
* Copyright 2025 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.google.shopping.merchant.datasources.v1;
18+
19+
import static com.google.shopping.merchant.datasources.v1.DataSourcesServiceClient.ListDataSourcesPagedResponse;
20+
21+
import com.google.api.core.ApiFunction;
22+
import com.google.api.core.BetaApi;
23+
import com.google.api.gax.core.GoogleCredentialsProvider;
24+
import com.google.api.gax.core.InstantiatingExecutorProvider;
25+
import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
26+
import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider;
27+
import com.google.api.gax.rpc.ApiClientHeaderProvider;
28+
import com.google.api.gax.rpc.ClientContext;
29+
import com.google.api.gax.rpc.ClientSettings;
30+
import com.google.api.gax.rpc.PagedCallSettings;
31+
import com.google.api.gax.rpc.TransportChannelProvider;
32+
import com.google.api.gax.rpc.UnaryCallSettings;
33+
import com.google.protobuf.Empty;
34+
import com.google.shopping.merchant.datasources.v1.stub.DataSourcesServiceStubSettings;
35+
import java.io.IOException;
36+
import java.util.List;
37+
import javax.annotation.Generated;
38+
39+
// AUTO-GENERATED DOCUMENTATION AND CLASS.
40+
/**
41+
* Settings class to configure an instance of {@link DataSourcesServiceClient}.
42+
*
43+
* <p>The default instance has everything set to sensible defaults:
44+
*
45+
* <ul>
46+
* <li>The default service address (merchantapi.googleapis.com) and default port (443) are used.
47+
* <li>Credentials are acquired automatically through Application Default Credentials.
48+
* <li>Retries are configured for idempotent methods but not for non-idempotent methods.
49+
* </ul>
50+
*
51+
* <p>The builder of this class is recursive, so contained classes are themselves builders. When
52+
* build() is called, the tree of builders is called to create the complete settings object.
53+
*
54+
* <p>For example, to set the
55+
* [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings)
56+
* of getDataSource:
57+
*
58+
* <pre>{@code
59+
* // This snippet has been automatically generated and should be regarded as a code template only.
60+
* // It will require modifications to work:
61+
* // - It may require correct/in-range values for request initialization.
62+
* // - It may require specifying regional endpoints when creating the service client as shown in
63+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
64+
* DataSourcesServiceSettings.Builder dataSourcesServiceSettingsBuilder =
65+
* DataSourcesServiceSettings.newBuilder();
66+
* dataSourcesServiceSettingsBuilder
67+
* .getDataSourceSettings()
68+
* .setRetrySettings(
69+
* dataSourcesServiceSettingsBuilder
70+
* .getDataSourceSettings()
71+
* .getRetrySettings()
72+
* .toBuilder()
73+
* .setInitialRetryDelayDuration(Duration.ofSeconds(1))
74+
* .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
75+
* .setMaxAttempts(5)
76+
* .setMaxRetryDelayDuration(Duration.ofSeconds(30))
77+
* .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
78+
* .setRetryDelayMultiplier(1.3)
79+
* .setRpcTimeoutMultiplier(1.5)
80+
* .setTotalTimeoutDuration(Duration.ofSeconds(300))
81+
* .build());
82+
* DataSourcesServiceSettings dataSourcesServiceSettings =
83+
* dataSourcesServiceSettingsBuilder.build();
84+
* }</pre>
85+
*
86+
* Please refer to the [Client Side Retry
87+
* Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for
88+
* additional support in setting retries.
89+
*/
90+
@Generated("by gapic-generator-java")
91+
public class DataSourcesServiceSettings extends ClientSettings<DataSourcesServiceSettings> {
92+
93+
/** Returns the object with the settings used for calls to getDataSource. */
94+
public UnaryCallSettings<GetDataSourceRequest, DataSource> getDataSourceSettings() {
95+
return ((DataSourcesServiceStubSettings) getStubSettings()).getDataSourceSettings();
96+
}
97+
98+
/** Returns the object with the settings used for calls to listDataSources. */
99+
public PagedCallSettings<
100+
ListDataSourcesRequest, ListDataSourcesResponse, ListDataSourcesPagedResponse>
101+
listDataSourcesSettings() {
102+
return ((DataSourcesServiceStubSettings) getStubSettings()).listDataSourcesSettings();
103+
}
104+
105+
/** Returns the object with the settings used for calls to createDataSource. */
106+
public UnaryCallSettings<CreateDataSourceRequest, DataSource> createDataSourceSettings() {
107+
return ((DataSourcesServiceStubSettings) getStubSettings()).createDataSourceSettings();
108+
}
109+
110+
/** Returns the object with the settings used for calls to updateDataSource. */
111+
public UnaryCallSettings<UpdateDataSourceRequest, DataSource> updateDataSourceSettings() {
112+
return ((DataSourcesServiceStubSettings) getStubSettings()).updateDataSourceSettings();
113+
}
114+
115+
/** Returns the object with the settings used for calls to deleteDataSource. */
116+
public UnaryCallSettings<DeleteDataSourceRequest, Empty> deleteDataSourceSettings() {
117+
return ((DataSourcesServiceStubSettings) getStubSettings()).deleteDataSourceSettings();
118+
}
119+
120+
/** Returns the object with the settings used for calls to fetchDataSource. */
121+
public UnaryCallSettings<FetchDataSourceRequest, Empty> fetchDataSourceSettings() {
122+
return ((DataSourcesServiceStubSettings) getStubSettings()).fetchDataSourceSettings();
123+
}
124+
125+
public static final DataSourcesServiceSettings create(DataSourcesServiceStubSettings stub)
126+
throws IOException {
127+
return new DataSourcesServiceSettings.Builder(stub.toBuilder()).build();
128+
}
129+
130+
/** Returns a builder for the default ExecutorProvider for this service. */
131+
public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() {
132+
return DataSourcesServiceStubSettings.defaultExecutorProviderBuilder();
133+
}
134+
135+
/** Returns the default service endpoint. */
136+
public static String getDefaultEndpoint() {
137+
return DataSourcesServiceStubSettings.getDefaultEndpoint();
138+
}
139+
140+
/** Returns the default service scopes. */
141+
public static List<String> getDefaultServiceScopes() {
142+
return DataSourcesServiceStubSettings.getDefaultServiceScopes();
143+
}
144+
145+
/** Returns a builder for the default credentials for this service. */
146+
public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {
147+
return DataSourcesServiceStubSettings.defaultCredentialsProviderBuilder();
148+
}
149+
150+
/** Returns a builder for the default gRPC ChannelProvider for this service. */
151+
public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
152+
return DataSourcesServiceStubSettings.defaultGrpcTransportProviderBuilder();
153+
}
154+
155+
/** Returns a builder for the default REST ChannelProvider for this service. */
156+
@BetaApi
157+
public static InstantiatingHttpJsonChannelProvider.Builder
158+
defaultHttpJsonTransportProviderBuilder() {
159+
return DataSourcesServiceStubSettings.defaultHttpJsonTransportProviderBuilder();
160+
}
161+
162+
public static TransportChannelProvider defaultTransportChannelProvider() {
163+
return DataSourcesServiceStubSettings.defaultTransportChannelProvider();
164+
}
165+
166+
public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
167+
return DataSourcesServiceStubSettings.defaultApiClientHeaderProviderBuilder();
168+
}
169+
170+
/** Returns a new gRPC builder for this class. */
171+
public static Builder newBuilder() {
172+
return Builder.createDefault();
173+
}
174+
175+
/** Returns a new REST builder for this class. */
176+
public static Builder newHttpJsonBuilder() {
177+
return Builder.createHttpJsonDefault();
178+
}
179+
180+
/** Returns a new builder for this class. */
181+
public static Builder newBuilder(ClientContext clientContext) {
182+
return new Builder(clientContext);
183+
}
184+
185+
/** Returns a builder containing all the values of this settings class. */
186+
public Builder toBuilder() {
187+
return new Builder(this);
188+
}
189+
190+
protected DataSourcesServiceSettings(Builder settingsBuilder) throws IOException {
191+
super(settingsBuilder);
192+
}
193+
194+
/** Builder for DataSourcesServiceSettings. */
195+
public static class Builder extends ClientSettings.Builder<DataSourcesServiceSettings, Builder> {
196+
197+
protected Builder() throws IOException {
198+
this(((ClientContext) null));
199+
}
200+
201+
protected Builder(ClientContext clientContext) {
202+
super(DataSourcesServiceStubSettings.newBuilder(clientContext));
203+
}
204+
205+
protected Builder(DataSourcesServiceSettings settings) {
206+
super(settings.getStubSettings().toBuilder());
207+
}
208+
209+
protected Builder(DataSourcesServiceStubSettings.Builder stubSettings) {
210+
super(stubSettings);
211+
}
212+
213+
private static Builder createDefault() {
214+
return new Builder(DataSourcesServiceStubSettings.newBuilder());
215+
}
216+
217+
private static Builder createHttpJsonDefault() {
218+
return new Builder(DataSourcesServiceStubSettings.newHttpJsonBuilder());
219+
}
220+
221+
public DataSourcesServiceStubSettings.Builder getStubSettingsBuilder() {
222+
return ((DataSourcesServiceStubSettings.Builder) getStubSettings());
223+
}
224+
225+
/**
226+
* Applies the given settings updater function to all of the unary API methods in this service.
227+
*
228+
* <p>Note: This method does not support applying settings to streaming methods.
229+
*/
230+
public Builder applyToAllUnaryMethods(
231+
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
232+
super.applyToAllUnaryMethods(
233+
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
234+
return this;
235+
}
236+
237+
/** Returns the builder for the settings used for calls to getDataSource. */
238+
public UnaryCallSettings.Builder<GetDataSourceRequest, DataSource> getDataSourceSettings() {
239+
return getStubSettingsBuilder().getDataSourceSettings();
240+
}
241+
242+
/** Returns the builder for the settings used for calls to listDataSources. */
243+
public PagedCallSettings.Builder<
244+
ListDataSourcesRequest, ListDataSourcesResponse, ListDataSourcesPagedResponse>
245+
listDataSourcesSettings() {
246+
return getStubSettingsBuilder().listDataSourcesSettings();
247+
}
248+
249+
/** Returns the builder for the settings used for calls to createDataSource. */
250+
public UnaryCallSettings.Builder<CreateDataSourceRequest, DataSource>
251+
createDataSourceSettings() {
252+
return getStubSettingsBuilder().createDataSourceSettings();
253+
}
254+
255+
/** Returns the builder for the settings used for calls to updateDataSource. */
256+
public UnaryCallSettings.Builder<UpdateDataSourceRequest, DataSource>
257+
updateDataSourceSettings() {
258+
return getStubSettingsBuilder().updateDataSourceSettings();
259+
}
260+
261+
/** Returns the builder for the settings used for calls to deleteDataSource. */
262+
public UnaryCallSettings.Builder<DeleteDataSourceRequest, Empty> deleteDataSourceSettings() {
263+
return getStubSettingsBuilder().deleteDataSourceSettings();
264+
}
265+
266+
/** Returns the builder for the settings used for calls to fetchDataSource. */
267+
public UnaryCallSettings.Builder<FetchDataSourceRequest, Empty> fetchDataSourceSettings() {
268+
return getStubSettingsBuilder().fetchDataSourceSettings();
269+
}
270+
271+
@Override
272+
public DataSourcesServiceSettings build() throws IOException {
273+
return new DataSourcesServiceSettings(this);
274+
}
275+
}
276+
}

0 commit comments

Comments
 (0)