Visitar URL original
feat: release Model Services to v2beta version · googleapis/google-cloud-java@9e0cfa0 · GitHub
Skip to content

Commit 9e0cfa0

Browse files
feat: release Model Services to v2beta version
feat: release BatchRemoveCatalogAttributes API to v2beta version feat: release ExactSearchableOption for attribute config to v2beta version feat: release diversity_type for ServingConfig in v2beta version feat: add local inventories info to the Product resource feat: deprecate unused page_token field of PredictionRequest in v2beta version feat: deprecate unused facet_spec field of Control in v2beta version docs: improve documentation of SearchRequest for Search Personalization docs: improve documentation for Fullfillment and Inventory API in ProductService docs: minor documentation fixes and improvements PiperOrigin-RevId: 471846764 Source-Link: googleapis/googleapis@1513294 Source-Link: https://github.com/googleapis/googleapis-gen/commit/c371ea8df2e34940875d51200cd57e300a2bc0a8 Copy-Tag: eyJwIjoiamF2YS1yZXRhaWwvLk93bEJvdC55YW1sIiwiaCI6ImMzNzFlYThkZjJlMzQ5NDA4NzVkNTEyMDBjZDU3ZTMwMGEyYmMwYTgifQ==
1 parent f604cb6 commit 9e0cfa0

1,858 files changed

Lines changed: 813129 additions & 0 deletions

File tree

Some content is hidden

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

‎owl-bot-staging/java-retail/v2/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/CatalogServiceClient.java‎

Lines changed: 1451 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 326 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,326 @@
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.CatalogServiceClient.ListCatalogsPagedResponse;
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.StubSettings;
32+
import com.google.api.gax.rpc.TransportChannelProvider;
33+
import com.google.api.gax.rpc.UnaryCallSettings;
34+
import com.google.cloud.retail.v2.stub.CatalogServiceStubSettings;
35+
import com.google.protobuf.Empty;
36+
import java.io.IOException;
37+
import java.util.List;
38+
import javax.annotation.Generated;
39+
40+
// AUTO-GENERATED DOCUMENTATION AND CLASS.
41+
/**
42+
* Settings class to configure an instance of {@link CatalogServiceClient}.
43+
*
44+
* <p>The default instance has everything set to sensible defaults:
45+
*
46+
* <ul>
47+
* <li> The default service address (retail.googleapis.com) and default port (443) are used.
48+
* <li> Credentials are acquired automatically through Application Default Credentials.
49+
* <li> Retries are configured for idempotent methods but not for non-idempotent methods.
50+
* </ul>
51+
*
52+
* <p>The builder of this class is recursive, so contained classes are themselves builders. When
53+
* build() is called, the tree of builders is called to create the complete settings object.
54+
*
55+
* <p>For example, to set the total timeout of updateCatalog to 30 seconds:
56+
*
57+
* <pre>{@code
58+
* // This snippet has been automatically generated for illustrative purposes only.
59+
* // It may require modifications to work in your environment.
60+
* CatalogServiceSettings.Builder catalogServiceSettingsBuilder =
61+
* CatalogServiceSettings.newBuilder();
62+
* catalogServiceSettingsBuilder
63+
* .updateCatalogSettings()
64+
* .setRetrySettings(
65+
* catalogServiceSettingsBuilder
66+
* .updateCatalogSettings()
67+
* .getRetrySettings()
68+
* .toBuilder()
69+
* .setTotalTimeout(Duration.ofSeconds(30))
70+
* .build());
71+
* CatalogServiceSettings catalogServiceSettings = catalogServiceSettingsBuilder.build();
72+
* }</pre>
73+
*/
74+
@Generated("by gapic-generator-java")
75+
public class CatalogServiceSettings extends ClientSettings<CatalogServiceSettings> {
76+
77+
/** Returns the object with the settings used for calls to listCatalogs. */
78+
public PagedCallSettings<ListCatalogsRequest, ListCatalogsResponse, ListCatalogsPagedResponse>
79+
listCatalogsSettings() {
80+
return ((CatalogServiceStubSettings) getStubSettings()).listCatalogsSettings();
81+
}
82+
83+
/** Returns the object with the settings used for calls to updateCatalog. */
84+
public UnaryCallSettings<UpdateCatalogRequest, Catalog> updateCatalogSettings() {
85+
return ((CatalogServiceStubSettings) getStubSettings()).updateCatalogSettings();
86+
}
87+
88+
/** Returns the object with the settings used for calls to setDefaultBranch. */
89+
public UnaryCallSettings<SetDefaultBranchRequest, Empty> setDefaultBranchSettings() {
90+
return ((CatalogServiceStubSettings) getStubSettings()).setDefaultBranchSettings();
91+
}
92+
93+
/** Returns the object with the settings used for calls to getDefaultBranch. */
94+
public UnaryCallSettings<GetDefaultBranchRequest, GetDefaultBranchResponse>
95+
getDefaultBranchSettings() {
96+
return ((CatalogServiceStubSettings) getStubSettings()).getDefaultBranchSettings();
97+
}
98+
99+
/** Returns the object with the settings used for calls to getCompletionConfig. */
100+
public UnaryCallSettings<GetCompletionConfigRequest, CompletionConfig>
101+
getCompletionConfigSettings() {
102+
return ((CatalogServiceStubSettings) getStubSettings()).getCompletionConfigSettings();
103+
}
104+
105+
/** Returns the object with the settings used for calls to updateCompletionConfig. */
106+
public UnaryCallSettings<UpdateCompletionConfigRequest, CompletionConfig>
107+
updateCompletionConfigSettings() {
108+
return ((CatalogServiceStubSettings) getStubSettings()).updateCompletionConfigSettings();
109+
}
110+
111+
/** Returns the object with the settings used for calls to getAttributesConfig. */
112+
public UnaryCallSettings<GetAttributesConfigRequest, AttributesConfig>
113+
getAttributesConfigSettings() {
114+
return ((CatalogServiceStubSettings) getStubSettings()).getAttributesConfigSettings();
115+
}
116+
117+
/** Returns the object with the settings used for calls to updateAttributesConfig. */
118+
public UnaryCallSettings<UpdateAttributesConfigRequest, AttributesConfig>
119+
updateAttributesConfigSettings() {
120+
return ((CatalogServiceStubSettings) getStubSettings()).updateAttributesConfigSettings();
121+
}
122+
123+
/** Returns the object with the settings used for calls to addCatalogAttribute. */
124+
public UnaryCallSettings<AddCatalogAttributeRequest, AttributesConfig>
125+
addCatalogAttributeSettings() {
126+
return ((CatalogServiceStubSettings) getStubSettings()).addCatalogAttributeSettings();
127+
}
128+
129+
/** Returns the object with the settings used for calls to removeCatalogAttribute. */
130+
public UnaryCallSettings<RemoveCatalogAttributeRequest, AttributesConfig>
131+
removeCatalogAttributeSettings() {
132+
return ((CatalogServiceStubSettings) getStubSettings()).removeCatalogAttributeSettings();
133+
}
134+
135+
/** Returns the object with the settings used for calls to replaceCatalogAttribute. */
136+
public UnaryCallSettings<ReplaceCatalogAttributeRequest, AttributesConfig>
137+
replaceCatalogAttributeSettings() {
138+
return ((CatalogServiceStubSettings) getStubSettings()).replaceCatalogAttributeSettings();
139+
}
140+
141+
public static final CatalogServiceSettings create(CatalogServiceStubSettings stub)
142+
throws IOException {
143+
return new CatalogServiceSettings.Builder(stub.toBuilder()).build();
144+
}
145+
146+
/** Returns a builder for the default ExecutorProvider for this service. */
147+
public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() {
148+
return CatalogServiceStubSettings.defaultExecutorProviderBuilder();
149+
}
150+
151+
/** Returns the default service endpoint. */
152+
public static String getDefaultEndpoint() {
153+
return CatalogServiceStubSettings.getDefaultEndpoint();
154+
}
155+
156+
/** Returns the default service scopes. */
157+
public static List<String> getDefaultServiceScopes() {
158+
return CatalogServiceStubSettings.getDefaultServiceScopes();
159+
}
160+
161+
/** Returns a builder for the default credentials for this service. */
162+
public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {
163+
return CatalogServiceStubSettings.defaultCredentialsProviderBuilder();
164+
}
165+
166+
/** Returns a builder for the default gRPC ChannelProvider for this service. */
167+
public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
168+
return CatalogServiceStubSettings.defaultGrpcTransportProviderBuilder();
169+
}
170+
171+
/** Returns a builder for the default REST ChannelProvider for this service. */
172+
@BetaApi
173+
public static InstantiatingHttpJsonChannelProvider.Builder
174+
defaultHttpJsonTransportProviderBuilder() {
175+
return CatalogServiceStubSettings.defaultHttpJsonTransportProviderBuilder();
176+
}
177+
178+
public static TransportChannelProvider defaultTransportChannelProvider() {
179+
return CatalogServiceStubSettings.defaultTransportChannelProvider();
180+
}
181+
182+
@BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
183+
public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
184+
return CatalogServiceStubSettings.defaultApiClientHeaderProviderBuilder();
185+
}
186+
187+
/** Returns a new gRPC builder for this class. */
188+
public static Builder newBuilder() {
189+
return Builder.createDefault();
190+
}
191+
192+
/** Returns a new REST builder for this class. */
193+
@BetaApi
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 CatalogServiceSettings(Builder settingsBuilder) throws IOException {
209+
super(settingsBuilder);
210+
}
211+
212+
/** Builder for CatalogServiceSettings. */
213+
public static class Builder extends ClientSettings.Builder<CatalogServiceSettings, Builder> {
214+
215+
protected Builder() throws IOException {
216+
this(((ClientContext) null));
217+
}
218+
219+
protected Builder(ClientContext clientContext) {
220+
super(CatalogServiceStubSettings.newBuilder(clientContext));
221+
}
222+
223+
protected Builder(CatalogServiceSettings settings) {
224+
super(settings.getStubSettings().toBuilder());
225+
}
226+
227+
protected Builder(CatalogServiceStubSettings.Builder stubSettings) {
228+
super(stubSettings);
229+
}
230+
231+
private static Builder createDefault() {
232+
return new Builder(CatalogServiceStubSettings.newBuilder());
233+
}
234+
235+
@BetaApi
236+
private static Builder createHttpJsonDefault() {
237+
return new Builder(CatalogServiceStubSettings.newHttpJsonBuilder());
238+
}
239+
240+
public CatalogServiceStubSettings.Builder getStubSettingsBuilder() {
241+
return ((CatalogServiceStubSettings.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 listCatalogs. */
257+
public PagedCallSettings.Builder<
258+
ListCatalogsRequest, ListCatalogsResponse, ListCatalogsPagedResponse>
259+
listCatalogsSettings() {
260+
return getStubSettingsBuilder().listCatalogsSettings();
261+
}
262+
263+
/** Returns the builder for the settings used for calls to updateCatalog. */
264+
public UnaryCallSettings.Builder<UpdateCatalogRequest, Catalog> updateCatalogSettings() {
265+
return getStubSettingsBuilder().updateCatalogSettings();
266+
}
267+
268+
/** Returns the builder for the settings used for calls to setDefaultBranch. */
269+
public UnaryCallSettings.Builder<SetDefaultBranchRequest, Empty> setDefaultBranchSettings() {
270+
return getStubSettingsBuilder().setDefaultBranchSettings();
271+
}
272+
273+
/** Returns the builder for the settings used for calls to getDefaultBranch. */
274+
public UnaryCallSettings.Builder<GetDefaultBranchRequest, GetDefaultBranchResponse>
275+
getDefaultBranchSettings() {
276+
return getStubSettingsBuilder().getDefaultBranchSettings();
277+
}
278+
279+
/** Returns the builder for the settings used for calls to getCompletionConfig. */
280+
public UnaryCallSettings.Builder<GetCompletionConfigRequest, CompletionConfig>
281+
getCompletionConfigSettings() {
282+
return getStubSettingsBuilder().getCompletionConfigSettings();
283+
}
284+
285+
/** Returns the builder for the settings used for calls to updateCompletionConfig. */
286+
public UnaryCallSettings.Builder<UpdateCompletionConfigRequest, CompletionConfig>
287+
updateCompletionConfigSettings() {
288+
return getStubSettingsBuilder().updateCompletionConfigSettings();
289+
}
290+
291+
/** Returns the builder for the settings used for calls to getAttributesConfig. */
292+
public UnaryCallSettings.Builder<GetAttributesConfigRequest, AttributesConfig>
293+
getAttributesConfigSettings() {
294+
return getStubSettingsBuilder().getAttributesConfigSettings();
295+
}
296+
297+
/** Returns the builder for the settings used for calls to updateAttributesConfig. */
298+
public UnaryCallSettings.Builder<UpdateAttributesConfigRequest, AttributesConfig>
299+
updateAttributesConfigSettings() {
300+
return getStubSettingsBuilder().updateAttributesConfigSettings();
301+
}
302+
303+
/** Returns the builder for the settings used for calls to addCatalogAttribute. */
304+
public UnaryCallSettings.Builder<AddCatalogAttributeRequest, AttributesConfig>
305+
addCatalogAttributeSettings() {
306+
return getStubSettingsBuilder().addCatalogAttributeSettings();
307+
}
308+
309+
/** Returns the builder for the settings used for calls to removeCatalogAttribute. */
310+
public UnaryCallSettings.Builder<RemoveCatalogAttributeRequest, AttributesConfig>
311+
removeCatalogAttributeSettings() {
312+
return getStubSettingsBuilder().removeCatalogAttributeSettings();
313+
}
314+
315+
/** Returns the builder for the settings used for calls to replaceCatalogAttribute. */
316+
public UnaryCallSettings.Builder<ReplaceCatalogAttributeRequest, AttributesConfig>
317+
replaceCatalogAttributeSettings() {
318+
return getStubSettingsBuilder().replaceCatalogAttributeSettings();
319+
}
320+
321+
@Override
322+
public CatalogServiceSettings build() throws IOException {
323+
return new CatalogServiceSettings(this);
324+
}
325+
}
326+
}

0 commit comments

Comments
 (0)