Skip to content

Commit 30a8c33

Browse files
feat: [retail] add merchant center link service (#9328)
* feat: support per-entity search and autocomplete feat: add model get API feat: support new filter syntax for recommendation feat: expose A/B experiment info in search response docs: keep the API doc up-to-date with recent changes PiperOrigin-RevId: 522675546 Source-Link: googleapis/googleapis@81b0808 Source-Link: https://github.com/googleapis/googleapis-gen/commit/e950439cd0d486ab8d2b32672b54c0a6b6451420 Copy-Tag: eyJwIjoiamF2YS1yZXRhaWwvLk93bEJvdC55YW1sIiwiaCI6ImU5NTA0MzljZDBkNDg2YWI4ZDJiMzI2NzJiNTRjMGE2YjY0NTE0MjAifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: add model service feat: support per-entity search and autocomplete feat: support new filter syntax for recommendation feat: expose A/B experiment info in search response docs: keep the API doc up-to-date with recent changes PiperOrigin-RevId: 522675951 Source-Link: googleapis/googleapis@f149e91 Source-Link: https://github.com/googleapis/googleapis-gen/commit/c4538a888d2ec13ce719c1a1aa9dc7de5b17375a Copy-Tag: eyJwIjoiamF2YS1yZXRhaWwvLk93bEJvdC55YW1sIiwiaCI6ImM0NTM4YTg4OGQyZWMxM2NlNzE5YzFhMWFhOWRjN2RlNWIxNzM3NWEifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: add merchant center link service feat: support per-entity search and autocomplete feat: expose facets and product counts in autocomplete feat: add model get API feat: allow cascaded deletion on primary product feat: support new filter syntax for recommendation feat: expose A/B experiment info in search response docs: keep the API doc up-to-date with recent changes PiperOrigin-RevId: 523140513 Source-Link: googleapis/googleapis@4a9f933 Source-Link: https://github.com/googleapis/googleapis-gen/commit/ffb754a7d2cd79380fb5ccfd33a1c0908dbb62a5 Copy-Tag: eyJwIjoiamF2YS1yZXRhaWwvLk93bEJvdC55YW1sIiwiaCI6ImZmYjc1NGE3ZDJjZDc5MzgwZmI1Y2NmZDMzYTFjMDkwOGRiYjYyYTUifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent bf84264 commit 30a8c33

File tree

359 files changed

+58195
-2015
lines changed

Some content is hidden

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

359 files changed

+58195
-2015
lines changed

java-retail/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
2020
<dependency>
2121
<groupId>com.google.cloud</groupId>
2222
<artifactId>libraries-bom</artifactId>
23-
<version>26.11.0</version>
23+
<version>26.12.0</version>
2424
<type>pom</type>
2525
<scope>import</scope>
2626
</dependency>

java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/CompletionServiceClient.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
// AUTO-GENERATED DOCUMENTATION AND CLASS.
3333
/**
34-
* Service Description: Auto-completion service for retail.
34+
* Service Description: Autocomplete service for retail.
3535
*
3636
* <p>This feature is only available for users who have Retail Search enabled. Enable Retail Search
3737
* on Cloud Console before using this feature.
@@ -55,6 +55,7 @@
5555
* .setDeviceType("deviceType781190832")
5656
* .setDataset("dataset1443214456")
5757
* .setMaxSuggestions(618824852)
58+
* .setEntity("entity-1298275357")
5859
* .build();
5960
* CompleteQueryResponse response = completionServiceClient.completeQuery(request);
6061
* }
@@ -234,6 +235,7 @@ public final OperationsClient getHttpJsonOperationsClient() {
234235
* .setDeviceType("deviceType781190832")
235236
* .setDataset("dataset1443214456")
236237
* .setMaxSuggestions(618824852)
238+
* .setEntity("entity-1298275357")
237239
* .build();
238240
* CompleteQueryResponse response = completionServiceClient.completeQuery(request);
239241
* }
@@ -271,6 +273,7 @@ public final CompleteQueryResponse completeQuery(CompleteQueryRequest request) {
271273
* .setDeviceType("deviceType781190832")
272274
* .setDataset("dataset1443214456")
273275
* .setMaxSuggestions(618824852)
276+
* .setEntity("entity-1298275357")
274277
* .build();
275278
* ApiFuture<CompleteQueryResponse> future =
276279
* completionServiceClient.completeQueryCallable().futureCall(request);

java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ModelServiceClient.java

Lines changed: 1275 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 306 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,306 @@
1+
/*
2+
* Copyright 2022 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.cloud.retail.v2;
18+
19+
import static com.google.cloud.retail.v2.ModelServiceClient.ListModelsPagedResponse;
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.OperationCallSettings;
31+
import com.google.api.gax.rpc.PagedCallSettings;
32+
import com.google.api.gax.rpc.TransportChannelProvider;
33+
import com.google.api.gax.rpc.UnaryCallSettings;
34+
import com.google.cloud.retail.v2.stub.ModelServiceStubSettings;
35+
import com.google.longrunning.Operation;
36+
import com.google.protobuf.Empty;
37+
import java.io.IOException;
38+
import java.util.List;
39+
import javax.annotation.Generated;
40+
41+
// AUTO-GENERATED DOCUMENTATION AND CLASS.
42+
/**
43+
* Settings class to configure an instance of {@link ModelServiceClient}.
44+
*
45+
* <p>The default instance has everything set to sensible defaults:
46+
*
47+
* <ul>
48+
* <li>The default service address (retail.googleapis.com) and default port (443) are used.
49+
* <li>Credentials are acquired automatically through Application Default Credentials.
50+
* <li>Retries are configured for idempotent methods but not for non-idempotent methods.
51+
* </ul>
52+
*
53+
* <p>The builder of this class is recursive, so contained classes are themselves builders. When
54+
* build() is called, the tree of builders is called to create the complete settings object.
55+
*
56+
* <p>For example, to set the total timeout of getModel to 30 seconds:
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+
* ModelServiceSettings.Builder modelServiceSettingsBuilder = ModelServiceSettings.newBuilder();
65+
* modelServiceSettingsBuilder
66+
* .getModelSettings()
67+
* .setRetrySettings(
68+
* modelServiceSettingsBuilder
69+
* .getModelSettings()
70+
* .getRetrySettings()
71+
* .toBuilder()
72+
* .setTotalTimeout(Duration.ofSeconds(30))
73+
* .build());
74+
* ModelServiceSettings modelServiceSettings = modelServiceSettingsBuilder.build();
75+
* }</pre>
76+
*/
77+
@Generated("by gapic-generator-java")
78+
public class ModelServiceSettings extends ClientSettings<ModelServiceSettings> {
79+
80+
/** Returns the object with the settings used for calls to createModel. */
81+
public UnaryCallSettings<CreateModelRequest, Operation> createModelSettings() {
82+
return ((ModelServiceStubSettings) getStubSettings()).createModelSettings();
83+
}
84+
85+
/** Returns the object with the settings used for calls to createModel. */
86+
public OperationCallSettings<CreateModelRequest, Model, CreateModelMetadata>
87+
createModelOperationSettings() {
88+
return ((ModelServiceStubSettings) getStubSettings()).createModelOperationSettings();
89+
}
90+
91+
/** Returns the object with the settings used for calls to getModel. */
92+
public UnaryCallSettings<GetModelRequest, Model> getModelSettings() {
93+
return ((ModelServiceStubSettings) getStubSettings()).getModelSettings();
94+
}
95+
96+
/** Returns the object with the settings used for calls to pauseModel. */
97+
public UnaryCallSettings<PauseModelRequest, Model> pauseModelSettings() {
98+
return ((ModelServiceStubSettings) getStubSettings()).pauseModelSettings();
99+
}
100+
101+
/** Returns the object with the settings used for calls to resumeModel. */
102+
public UnaryCallSettings<ResumeModelRequest, Model> resumeModelSettings() {
103+
return ((ModelServiceStubSettings) getStubSettings()).resumeModelSettings();
104+
}
105+
106+
/** Returns the object with the settings used for calls to deleteModel. */
107+
public UnaryCallSettings<DeleteModelRequest, Empty> deleteModelSettings() {
108+
return ((ModelServiceStubSettings) getStubSettings()).deleteModelSettings();
109+
}
110+
111+
/** Returns the object with the settings used for calls to listModels. */
112+
public PagedCallSettings<ListModelsRequest, ListModelsResponse, ListModelsPagedResponse>
113+
listModelsSettings() {
114+
return ((ModelServiceStubSettings) getStubSettings()).listModelsSettings();
115+
}
116+
117+
/** Returns the object with the settings used for calls to updateModel. */
118+
public UnaryCallSettings<UpdateModelRequest, Model> updateModelSettings() {
119+
return ((ModelServiceStubSettings) getStubSettings()).updateModelSettings();
120+
}
121+
122+
/** Returns the object with the settings used for calls to tuneModel. */
123+
public UnaryCallSettings<TuneModelRequest, Operation> tuneModelSettings() {
124+
return ((ModelServiceStubSettings) getStubSettings()).tuneModelSettings();
125+
}
126+
127+
/** Returns the object with the settings used for calls to tuneModel. */
128+
public OperationCallSettings<TuneModelRequest, TuneModelResponse, TuneModelMetadata>
129+
tuneModelOperationSettings() {
130+
return ((ModelServiceStubSettings) getStubSettings()).tuneModelOperationSettings();
131+
}
132+
133+
public static final ModelServiceSettings create(ModelServiceStubSettings stub)
134+
throws IOException {
135+
return new ModelServiceSettings.Builder(stub.toBuilder()).build();
136+
}
137+
138+
/** Returns a builder for the default ExecutorProvider for this service. */
139+
public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() {
140+
return ModelServiceStubSettings.defaultExecutorProviderBuilder();
141+
}
142+
143+
/** Returns the default service endpoint. */
144+
public static String getDefaultEndpoint() {
145+
return ModelServiceStubSettings.getDefaultEndpoint();
146+
}
147+
148+
/** Returns the default service scopes. */
149+
public static List<String> getDefaultServiceScopes() {
150+
return ModelServiceStubSettings.getDefaultServiceScopes();
151+
}
152+
153+
/** Returns a builder for the default credentials for this service. */
154+
public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {
155+
return ModelServiceStubSettings.defaultCredentialsProviderBuilder();
156+
}
157+
158+
/** Returns a builder for the default gRPC ChannelProvider for this service. */
159+
public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
160+
return ModelServiceStubSettings.defaultGrpcTransportProviderBuilder();
161+
}
162+
163+
/** Returns a builder for the default REST ChannelProvider for this service. */
164+
@BetaApi
165+
public static InstantiatingHttpJsonChannelProvider.Builder
166+
defaultHttpJsonTransportProviderBuilder() {
167+
return ModelServiceStubSettings.defaultHttpJsonTransportProviderBuilder();
168+
}
169+
170+
public static TransportChannelProvider defaultTransportChannelProvider() {
171+
return ModelServiceStubSettings.defaultTransportChannelProvider();
172+
}
173+
174+
@BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
175+
public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
176+
return ModelServiceStubSettings.defaultApiClientHeaderProviderBuilder();
177+
}
178+
179+
/** Returns a new gRPC builder for this class. */
180+
public static Builder newBuilder() {
181+
return Builder.createDefault();
182+
}
183+
184+
/** Returns a new REST builder for this class. */
185+
@BetaApi
186+
public static Builder newHttpJsonBuilder() {
187+
return Builder.createHttpJsonDefault();
188+
}
189+
190+
/** Returns a new builder for this class. */
191+
public static Builder newBuilder(ClientContext clientContext) {
192+
return new Builder(clientContext);
193+
}
194+
195+
/** Returns a builder containing all the values of this settings class. */
196+
public Builder toBuilder() {
197+
return new Builder(this);
198+
}
199+
200+
protected ModelServiceSettings(Builder settingsBuilder) throws IOException {
201+
super(settingsBuilder);
202+
}
203+
204+
/** Builder for ModelServiceSettings. */
205+
public static class Builder extends ClientSettings.Builder<ModelServiceSettings, Builder> {
206+
207+
protected Builder() throws IOException {
208+
this(((ClientContext) null));
209+
}
210+
211+
protected Builder(ClientContext clientContext) {
212+
super(ModelServiceStubSettings.newBuilder(clientContext));
213+
}
214+
215+
protected Builder(ModelServiceSettings settings) {
216+
super(settings.getStubSettings().toBuilder());
217+
}
218+
219+
protected Builder(ModelServiceStubSettings.Builder stubSettings) {
220+
super(stubSettings);
221+
}
222+
223+
private static Builder createDefault() {
224+
return new Builder(ModelServiceStubSettings.newBuilder());
225+
}
226+
227+
@BetaApi
228+
private static Builder createHttpJsonDefault() {
229+
return new Builder(ModelServiceStubSettings.newHttpJsonBuilder());
230+
}
231+
232+
public ModelServiceStubSettings.Builder getStubSettingsBuilder() {
233+
return ((ModelServiceStubSettings.Builder) getStubSettings());
234+
}
235+
236+
/**
237+
* Applies the given settings updater function to all of the unary API methods in this service.
238+
*
239+
* <p>Note: This method does not support applying settings to streaming methods.
240+
*/
241+
public Builder applyToAllUnaryMethods(
242+
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
243+
super.applyToAllUnaryMethods(
244+
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
245+
return this;
246+
}
247+
248+
/** Returns the builder for the settings used for calls to createModel. */
249+
public UnaryCallSettings.Builder<CreateModelRequest, Operation> createModelSettings() {
250+
return getStubSettingsBuilder().createModelSettings();
251+
}
252+
253+
/** Returns the builder for the settings used for calls to createModel. */
254+
public OperationCallSettings.Builder<CreateModelRequest, Model, CreateModelMetadata>
255+
createModelOperationSettings() {
256+
return getStubSettingsBuilder().createModelOperationSettings();
257+
}
258+
259+
/** Returns the builder for the settings used for calls to getModel. */
260+
public UnaryCallSettings.Builder<GetModelRequest, Model> getModelSettings() {
261+
return getStubSettingsBuilder().getModelSettings();
262+
}
263+
264+
/** Returns the builder for the settings used for calls to pauseModel. */
265+
public UnaryCallSettings.Builder<PauseModelRequest, Model> pauseModelSettings() {
266+
return getStubSettingsBuilder().pauseModelSettings();
267+
}
268+
269+
/** Returns the builder for the settings used for calls to resumeModel. */
270+
public UnaryCallSettings.Builder<ResumeModelRequest, Model> resumeModelSettings() {
271+
return getStubSettingsBuilder().resumeModelSettings();
272+
}
273+
274+
/** Returns the builder for the settings used for calls to deleteModel. */
275+
public UnaryCallSettings.Builder<DeleteModelRequest, Empty> deleteModelSettings() {
276+
return getStubSettingsBuilder().deleteModelSettings();
277+
}
278+
279+
/** Returns the builder for the settings used for calls to listModels. */
280+
public PagedCallSettings.Builder<ListModelsRequest, ListModelsResponse, ListModelsPagedResponse>
281+
listModelsSettings() {
282+
return getStubSettingsBuilder().listModelsSettings();
283+
}
284+
285+
/** Returns the builder for the settings used for calls to updateModel. */
286+
public UnaryCallSettings.Builder<UpdateModelRequest, Model> updateModelSettings() {
287+
return getStubSettingsBuilder().updateModelSettings();
288+
}
289+
290+
/** Returns the builder for the settings used for calls to tuneModel. */
291+
public UnaryCallSettings.Builder<TuneModelRequest, Operation> tuneModelSettings() {
292+
return getStubSettingsBuilder().tuneModelSettings();
293+
}
294+
295+
/** Returns the builder for the settings used for calls to tuneModel. */
296+
public OperationCallSettings.Builder<TuneModelRequest, TuneModelResponse, TuneModelMetadata>
297+
tuneModelOperationSettings() {
298+
return getStubSettingsBuilder().tuneModelOperationSettings();
299+
}
300+
301+
@Override
302+
public ModelServiceSettings build() throws IOException {
303+
return new ModelServiceSettings(this);
304+
}
305+
}
306+
}

0 commit comments

Comments
 (0)