Skip to content

Commit eff4e54

Browse files
fix: add v1 to shopping-merchant-notifications (#11718)
Adding the proto path, let automation generate code. PiperOrigin-RevId: 790723245 --------- Co-authored-by: cloud-java-bot <[email protected]>
1 parent 4790372 commit eff4e54

File tree

76 files changed

+20717
-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.

76 files changed

+20717
-0
lines changed

generation_config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2311,6 +2311,7 @@ libraries:
23112311
group_id: com.google.shopping
23122312
cloud_api: false
23132313
GAPICs:
2314+
- proto_path: google/shopping/merchant/notifications/v1
23142315
- proto_path: google/shopping/merchant/notifications/v1beta
23152316
requires_billing: true
23162317
- api_shortname: shopping-merchant-lfp

java-shopping-merchant-notifications/google-shopping-merchant-notifications-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-notifications-v1beta</artifactId>
3434
<version>0.30.0-SNAPSHOT</version><!-- {x-version-update:grpc-google-shopping-merchant-notifications-v1beta:current} -->
3535
</dependency>
36+
<dependency>
37+
<groupId>com.google.shopping.api.grpc</groupId>
38+
<artifactId>grpc-google-shopping-merchant-notifications-v1</artifactId>
39+
<version>0.30.0-SNAPSHOT</version><!-- {x-version-update:grpc-google-shopping-merchant-notifications-v1:current} -->
40+
</dependency>
3641
<dependency>
3742
<groupId>com.google.shopping.api.grpc</groupId>
3843
<artifactId>proto-google-shopping-merchant-notifications-v1beta</artifactId>
3944
<version>0.30.0-SNAPSHOT</version><!-- {x-version-update:proto-google-shopping-merchant-notifications-v1beta:current} -->
4045
</dependency>
46+
<dependency>
47+
<groupId>com.google.shopping.api.grpc</groupId>
48+
<artifactId>proto-google-shopping-merchant-notifications-v1</artifactId>
49+
<version>0.30.0-SNAPSHOT</version><!-- {x-version-update:proto-google-shopping-merchant-notifications-v1:current} -->
50+
</dependency>
4151
</dependencies>
4252
</dependencyManagement>
4353
</project>

java-shopping-merchant-notifications/google-shopping-merchant-notifications/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-notifications-v1</artifactId>
47+
</dependency>
4448
<dependency>
4549
<groupId>com.google.shopping.api.grpc</groupId>
4650
<artifactId>proto-google-shopping-merchant-notifications-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-notifications-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-notifications/google-shopping-merchant-notifications/src/main/java/com/google/shopping/merchant/notifications/v1/NotificationsApiServiceClient.java

Lines changed: 1325 additions & 0 deletions
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,306 @@
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.notifications.v1;
18+
19+
import static com.google.shopping.merchant.notifications.v1.NotificationsApiServiceClient.ListNotificationSubscriptionsPagedResponse;
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.notifications.v1.stub.NotificationsApiServiceStubSettings;
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 NotificationsApiServiceClient}.
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 getNotificationSubscription:
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+
* NotificationsApiServiceSettings.Builder notificationsApiServiceSettingsBuilder =
65+
* NotificationsApiServiceSettings.newBuilder();
66+
* notificationsApiServiceSettingsBuilder
67+
* .getNotificationSubscriptionSettings()
68+
* .setRetrySettings(
69+
* notificationsApiServiceSettingsBuilder
70+
* .getNotificationSubscriptionSettings()
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+
* NotificationsApiServiceSettings notificationsApiServiceSettings =
83+
* notificationsApiServiceSettingsBuilder.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 NotificationsApiServiceSettings
92+
extends ClientSettings<NotificationsApiServiceSettings> {
93+
94+
/** Returns the object with the settings used for calls to getNotificationSubscription. */
95+
public UnaryCallSettings<GetNotificationSubscriptionRequest, NotificationSubscription>
96+
getNotificationSubscriptionSettings() {
97+
return ((NotificationsApiServiceStubSettings) getStubSettings())
98+
.getNotificationSubscriptionSettings();
99+
}
100+
101+
/** Returns the object with the settings used for calls to createNotificationSubscription. */
102+
public UnaryCallSettings<CreateNotificationSubscriptionRequest, NotificationSubscription>
103+
createNotificationSubscriptionSettings() {
104+
return ((NotificationsApiServiceStubSettings) getStubSettings())
105+
.createNotificationSubscriptionSettings();
106+
}
107+
108+
/** Returns the object with the settings used for calls to updateNotificationSubscription. */
109+
public UnaryCallSettings<UpdateNotificationSubscriptionRequest, NotificationSubscription>
110+
updateNotificationSubscriptionSettings() {
111+
return ((NotificationsApiServiceStubSettings) getStubSettings())
112+
.updateNotificationSubscriptionSettings();
113+
}
114+
115+
/** Returns the object with the settings used for calls to deleteNotificationSubscription. */
116+
public UnaryCallSettings<DeleteNotificationSubscriptionRequest, Empty>
117+
deleteNotificationSubscriptionSettings() {
118+
return ((NotificationsApiServiceStubSettings) getStubSettings())
119+
.deleteNotificationSubscriptionSettings();
120+
}
121+
122+
/** Returns the object with the settings used for calls to listNotificationSubscriptions. */
123+
public PagedCallSettings<
124+
ListNotificationSubscriptionsRequest,
125+
ListNotificationSubscriptionsResponse,
126+
ListNotificationSubscriptionsPagedResponse>
127+
listNotificationSubscriptionsSettings() {
128+
return ((NotificationsApiServiceStubSettings) getStubSettings())
129+
.listNotificationSubscriptionsSettings();
130+
}
131+
132+
/**
133+
* Returns the object with the settings used for calls to
134+
* getNotificationSubscriptionHealthMetrics.
135+
*/
136+
public UnaryCallSettings<
137+
GetNotificationSubscriptionHealthMetricsRequest, NotificationSubscriptionHealthMetrics>
138+
getNotificationSubscriptionHealthMetricsSettings() {
139+
return ((NotificationsApiServiceStubSettings) getStubSettings())
140+
.getNotificationSubscriptionHealthMetricsSettings();
141+
}
142+
143+
public static final NotificationsApiServiceSettings create(
144+
NotificationsApiServiceStubSettings stub) throws IOException {
145+
return new NotificationsApiServiceSettings.Builder(stub.toBuilder()).build();
146+
}
147+
148+
/** Returns a builder for the default ExecutorProvider for this service. */
149+
public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() {
150+
return NotificationsApiServiceStubSettings.defaultExecutorProviderBuilder();
151+
}
152+
153+
/** Returns the default service endpoint. */
154+
public static String getDefaultEndpoint() {
155+
return NotificationsApiServiceStubSettings.getDefaultEndpoint();
156+
}
157+
158+
/** Returns the default service scopes. */
159+
public static List<String> getDefaultServiceScopes() {
160+
return NotificationsApiServiceStubSettings.getDefaultServiceScopes();
161+
}
162+
163+
/** Returns a builder for the default credentials for this service. */
164+
public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {
165+
return NotificationsApiServiceStubSettings.defaultCredentialsProviderBuilder();
166+
}
167+
168+
/** Returns a builder for the default gRPC ChannelProvider for this service. */
169+
public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
170+
return NotificationsApiServiceStubSettings.defaultGrpcTransportProviderBuilder();
171+
}
172+
173+
/** Returns a builder for the default REST ChannelProvider for this service. */
174+
@BetaApi
175+
public static InstantiatingHttpJsonChannelProvider.Builder
176+
defaultHttpJsonTransportProviderBuilder() {
177+
return NotificationsApiServiceStubSettings.defaultHttpJsonTransportProviderBuilder();
178+
}
179+
180+
public static TransportChannelProvider defaultTransportChannelProvider() {
181+
return NotificationsApiServiceStubSettings.defaultTransportChannelProvider();
182+
}
183+
184+
public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
185+
return NotificationsApiServiceStubSettings.defaultApiClientHeaderProviderBuilder();
186+
}
187+
188+
/** Returns a new gRPC builder for this class. */
189+
public static Builder newBuilder() {
190+
return Builder.createDefault();
191+
}
192+
193+
/** Returns a new REST builder for this class. */
194+
public static Builder newHttpJsonBuilder() {
195+
return Builder.createHttpJsonDefault();
196+
}
197+
198+
/** Returns a new builder for this class. */
199+
public static Builder newBuilder(ClientContext clientContext) {
200+
return new Builder(clientContext);
201+
}
202+
203+
/** Returns a builder containing all the values of this settings class. */
204+
public Builder toBuilder() {
205+
return new Builder(this);
206+
}
207+
208+
protected NotificationsApiServiceSettings(Builder settingsBuilder) throws IOException {
209+
super(settingsBuilder);
210+
}
211+
212+
/** Builder for NotificationsApiServiceSettings. */
213+
public static class Builder
214+
extends ClientSettings.Builder<NotificationsApiServiceSettings, Builder> {
215+
216+
protected Builder() throws IOException {
217+
this(((ClientContext) null));
218+
}
219+
220+
protected Builder(ClientContext clientContext) {
221+
super(NotificationsApiServiceStubSettings.newBuilder(clientContext));
222+
}
223+
224+
protected Builder(NotificationsApiServiceSettings settings) {
225+
super(settings.getStubSettings().toBuilder());
226+
}
227+
228+
protected Builder(NotificationsApiServiceStubSettings.Builder stubSettings) {
229+
super(stubSettings);
230+
}
231+
232+
private static Builder createDefault() {
233+
return new Builder(NotificationsApiServiceStubSettings.newBuilder());
234+
}
235+
236+
private static Builder createHttpJsonDefault() {
237+
return new Builder(NotificationsApiServiceStubSettings.newHttpJsonBuilder());
238+
}
239+
240+
public NotificationsApiServiceStubSettings.Builder getStubSettingsBuilder() {
241+
return ((NotificationsApiServiceStubSettings.Builder) getStubSettings());
242+
}
243+
244+
/**
245+
* Applies the given settings updater function to all of the unary API methods in this service.
246+
*
247+
* <p>Note: This method does not support applying settings to streaming methods.
248+
*/
249+
public Builder applyToAllUnaryMethods(
250+
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
251+
super.applyToAllUnaryMethods(
252+
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
253+
return this;
254+
}
255+
256+
/** Returns the builder for the settings used for calls to getNotificationSubscription. */
257+
public UnaryCallSettings.Builder<GetNotificationSubscriptionRequest, NotificationSubscription>
258+
getNotificationSubscriptionSettings() {
259+
return getStubSettingsBuilder().getNotificationSubscriptionSettings();
260+
}
261+
262+
/** Returns the builder for the settings used for calls to createNotificationSubscription. */
263+
public UnaryCallSettings.Builder<
264+
CreateNotificationSubscriptionRequest, NotificationSubscription>
265+
createNotificationSubscriptionSettings() {
266+
return getStubSettingsBuilder().createNotificationSubscriptionSettings();
267+
}
268+
269+
/** Returns the builder for the settings used for calls to updateNotificationSubscription. */
270+
public UnaryCallSettings.Builder<
271+
UpdateNotificationSubscriptionRequest, NotificationSubscription>
272+
updateNotificationSubscriptionSettings() {
273+
return getStubSettingsBuilder().updateNotificationSubscriptionSettings();
274+
}
275+
276+
/** Returns the builder for the settings used for calls to deleteNotificationSubscription. */
277+
public UnaryCallSettings.Builder<DeleteNotificationSubscriptionRequest, Empty>
278+
deleteNotificationSubscriptionSettings() {
279+
return getStubSettingsBuilder().deleteNotificationSubscriptionSettings();
280+
}
281+
282+
/** Returns the builder for the settings used for calls to listNotificationSubscriptions. */
283+
public PagedCallSettings.Builder<
284+
ListNotificationSubscriptionsRequest,
285+
ListNotificationSubscriptionsResponse,
286+
ListNotificationSubscriptionsPagedResponse>
287+
listNotificationSubscriptionsSettings() {
288+
return getStubSettingsBuilder().listNotificationSubscriptionsSettings();
289+
}
290+
291+
/**
292+
* Returns the builder for the settings used for calls to
293+
* getNotificationSubscriptionHealthMetrics.
294+
*/
295+
public UnaryCallSettings.Builder<
296+
GetNotificationSubscriptionHealthMetricsRequest, NotificationSubscriptionHealthMetrics>
297+
getNotificationSubscriptionHealthMetricsSettings() {
298+
return getStubSettingsBuilder().getNotificationSubscriptionHealthMetricsSettings();
299+
}
300+
301+
@Override
302+
public NotificationsApiServiceSettings build() throws IOException {
303+
return new NotificationsApiServiceSettings(this);
304+
}
305+
}
306+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"schema": "1.0",
3+
"comment": "This file maps proto services/RPCs to the corresponding library clients/methods",
4+
"language": "java",
5+
"protoPackage": "google.shopping.merchant.notifications.v1",
6+
"libraryPackage": "com.google.shopping.merchant.notifications.v1",
7+
"services": {
8+
"NotificationsApiService": {
9+
"clients": {
10+
"grpc": {
11+
"libraryClient": "NotificationsApiServiceClient",
12+
"rpcs": {
13+
"CreateNotificationSubscription": {
14+
"methods": ["createNotificationSubscription", "createNotificationSubscription", "createNotificationSubscription", "createNotificationSubscriptionCallable"]
15+
},
16+
"DeleteNotificationSubscription": {
17+
"methods": ["deleteNotificationSubscription", "deleteNotificationSubscription", "deleteNotificationSubscription", "deleteNotificationSubscriptionCallable"]
18+
},
19+
"GetNotificationSubscription": {
20+
"methods": ["getNotificationSubscription", "getNotificationSubscription", "getNotificationSubscription", "getNotificationSubscriptionCallable"]
21+
},
22+
"GetNotificationSubscriptionHealthMetrics": {
23+
"methods": ["getNotificationSubscriptionHealthMetrics", "getNotificationSubscriptionHealthMetrics", "getNotificationSubscriptionHealthMetrics", "getNotificationSubscriptionHealthMetricsCallable"]
24+
},
25+
"ListNotificationSubscriptions": {
26+
"methods": ["listNotificationSubscriptions", "listNotificationSubscriptions", "listNotificationSubscriptions", "listNotificationSubscriptionsPagedCallable", "listNotificationSubscriptionsCallable"]
27+
},
28+
"UpdateNotificationSubscription": {
29+
"methods": ["updateNotificationSubscription", "updateNotificationSubscription", "updateNotificationSubscriptionCallable"]
30+
}
31+
}
32+
}
33+
}
34+
}
35+
}
36+
}

0 commit comments

Comments
 (0)