Skip to content
This repository was archived by the owner on Sep 16, 2023. It is now read-only.

Commit 8f28f03

Browse files
1 parent b49898f commit 8f28f03

File tree

2,260 files changed

+782360
-689659
lines changed

Some content is hidden

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

2,260 files changed

+782360
-689659
lines changed

google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentsClient.java

Lines changed: 1151 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 294 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,294 @@
1+
/*
2+
* Copyright 2021 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.dialogflow.cx.v3;
18+
19+
import static com.google.cloud.dialogflow.cx.v3.AgentsClient.ListAgentsPagedResponse;
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.rpc.ApiClientHeaderProvider;
27+
import com.google.api.gax.rpc.ClientContext;
28+
import com.google.api.gax.rpc.ClientSettings;
29+
import com.google.api.gax.rpc.OperationCallSettings;
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.cloud.dialogflow.cx.v3.stub.AgentsStubSettings;
34+
import com.google.longrunning.Operation;
35+
import com.google.protobuf.Empty;
36+
import com.google.protobuf.Struct;
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 AgentsClient}.
44+
*
45+
* <p>The default instance has everything set to sensible defaults:
46+
*
47+
* <ul>
48+
* <li>The default service address (dialogflow.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 getAgent to 30 seconds:
57+
*
58+
* <pre>{@code
59+
* AgentsSettings.Builder agentsSettingsBuilder = AgentsSettings.newBuilder();
60+
* agentsSettingsBuilder
61+
* .getAgentSettings()
62+
* .setRetrySettings(
63+
* agentsSettingsBuilder
64+
* .getAgentSettings()
65+
* .getRetrySettings()
66+
* .toBuilder()
67+
* .setTotalTimeout(Duration.ofSeconds(30))
68+
* .build());
69+
* AgentsSettings agentsSettings = agentsSettingsBuilder.build();
70+
* }</pre>
71+
*/
72+
@Generated("by gapic-generator-java")
73+
public class AgentsSettings extends ClientSettings<AgentsSettings> {
74+
75+
/** Returns the object with the settings used for calls to listAgents. */
76+
public PagedCallSettings<ListAgentsRequest, ListAgentsResponse, ListAgentsPagedResponse>
77+
listAgentsSettings() {
78+
return ((AgentsStubSettings) getStubSettings()).listAgentsSettings();
79+
}
80+
81+
/** Returns the object with the settings used for calls to getAgent. */
82+
public UnaryCallSettings<GetAgentRequest, Agent> getAgentSettings() {
83+
return ((AgentsStubSettings) getStubSettings()).getAgentSettings();
84+
}
85+
86+
/** Returns the object with the settings used for calls to createAgent. */
87+
public UnaryCallSettings<CreateAgentRequest, Agent> createAgentSettings() {
88+
return ((AgentsStubSettings) getStubSettings()).createAgentSettings();
89+
}
90+
91+
/** Returns the object with the settings used for calls to updateAgent. */
92+
public UnaryCallSettings<UpdateAgentRequest, Agent> updateAgentSettings() {
93+
return ((AgentsStubSettings) getStubSettings()).updateAgentSettings();
94+
}
95+
96+
/** Returns the object with the settings used for calls to deleteAgent. */
97+
public UnaryCallSettings<DeleteAgentRequest, Empty> deleteAgentSettings() {
98+
return ((AgentsStubSettings) getStubSettings()).deleteAgentSettings();
99+
}
100+
101+
/** Returns the object with the settings used for calls to exportAgent. */
102+
public UnaryCallSettings<ExportAgentRequest, Operation> exportAgentSettings() {
103+
return ((AgentsStubSettings) getStubSettings()).exportAgentSettings();
104+
}
105+
106+
/** Returns the object with the settings used for calls to exportAgent. */
107+
public OperationCallSettings<ExportAgentRequest, ExportAgentResponse, Struct>
108+
exportAgentOperationSettings() {
109+
return ((AgentsStubSettings) getStubSettings()).exportAgentOperationSettings();
110+
}
111+
112+
/** Returns the object with the settings used for calls to restoreAgent. */
113+
public UnaryCallSettings<RestoreAgentRequest, Operation> restoreAgentSettings() {
114+
return ((AgentsStubSettings) getStubSettings()).restoreAgentSettings();
115+
}
116+
117+
/** Returns the object with the settings used for calls to restoreAgent. */
118+
public OperationCallSettings<RestoreAgentRequest, Empty, Struct> restoreAgentOperationSettings() {
119+
return ((AgentsStubSettings) getStubSettings()).restoreAgentOperationSettings();
120+
}
121+
122+
/** Returns the object with the settings used for calls to validateAgent. */
123+
public UnaryCallSettings<ValidateAgentRequest, AgentValidationResult> validateAgentSettings() {
124+
return ((AgentsStubSettings) getStubSettings()).validateAgentSettings();
125+
}
126+
127+
/** Returns the object with the settings used for calls to getAgentValidationResult. */
128+
public UnaryCallSettings<GetAgentValidationResultRequest, AgentValidationResult>
129+
getAgentValidationResultSettings() {
130+
return ((AgentsStubSettings) getStubSettings()).getAgentValidationResultSettings();
131+
}
132+
133+
public static final AgentsSettings create(AgentsStubSettings stub) throws IOException {
134+
return new AgentsSettings.Builder(stub.toBuilder()).build();
135+
}
136+
137+
/** Returns a builder for the default ExecutorProvider for this service. */
138+
public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() {
139+
return AgentsStubSettings.defaultExecutorProviderBuilder();
140+
}
141+
142+
/** Returns the default service endpoint. */
143+
public static String getDefaultEndpoint() {
144+
return AgentsStubSettings.getDefaultEndpoint();
145+
}
146+
147+
/** Returns the default service scopes. */
148+
public static List<String> getDefaultServiceScopes() {
149+
return AgentsStubSettings.getDefaultServiceScopes();
150+
}
151+
152+
/** Returns a builder for the default credentials for this service. */
153+
public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {
154+
return AgentsStubSettings.defaultCredentialsProviderBuilder();
155+
}
156+
157+
/** Returns a builder for the default ChannelProvider for this service. */
158+
public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
159+
return AgentsStubSettings.defaultGrpcTransportProviderBuilder();
160+
}
161+
162+
public static TransportChannelProvider defaultTransportChannelProvider() {
163+
return AgentsStubSettings.defaultTransportChannelProvider();
164+
}
165+
166+
@BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
167+
public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
168+
return AgentsStubSettings.defaultApiClientHeaderProviderBuilder();
169+
}
170+
171+
/** Returns a new builder for this class. */
172+
public static Builder newBuilder() {
173+
return Builder.createDefault();
174+
}
175+
176+
/** Returns a new builder for this class. */
177+
public static Builder newBuilder(ClientContext clientContext) {
178+
return new Builder(clientContext);
179+
}
180+
181+
/** Returns a builder containing all the values of this settings class. */
182+
public Builder toBuilder() {
183+
return new Builder(this);
184+
}
185+
186+
protected AgentsSettings(Builder settingsBuilder) throws IOException {
187+
super(settingsBuilder);
188+
}
189+
190+
/** Builder for AgentsSettings. */
191+
public static class Builder extends ClientSettings.Builder<AgentsSettings, Builder> {
192+
193+
protected Builder() throws IOException {
194+
this(((ClientContext) null));
195+
}
196+
197+
protected Builder(ClientContext clientContext) {
198+
super(AgentsStubSettings.newBuilder(clientContext));
199+
}
200+
201+
protected Builder(AgentsSettings settings) {
202+
super(settings.getStubSettings().toBuilder());
203+
}
204+
205+
protected Builder(AgentsStubSettings.Builder stubSettings) {
206+
super(stubSettings);
207+
}
208+
209+
private static Builder createDefault() {
210+
return new Builder(AgentsStubSettings.newBuilder());
211+
}
212+
213+
public AgentsStubSettings.Builder getStubSettingsBuilder() {
214+
return ((AgentsStubSettings.Builder) getStubSettings());
215+
}
216+
217+
/**
218+
* Applies the given settings updater function to all of the unary API methods in this service.
219+
*
220+
* <p>Note: This method does not support applying settings to streaming methods.
221+
*/
222+
public Builder applyToAllUnaryMethods(
223+
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
224+
super.applyToAllUnaryMethods(
225+
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
226+
return this;
227+
}
228+
229+
/** Returns the builder for the settings used for calls to listAgents. */
230+
public PagedCallSettings.Builder<ListAgentsRequest, ListAgentsResponse, ListAgentsPagedResponse>
231+
listAgentsSettings() {
232+
return getStubSettingsBuilder().listAgentsSettings();
233+
}
234+
235+
/** Returns the builder for the settings used for calls to getAgent. */
236+
public UnaryCallSettings.Builder<GetAgentRequest, Agent> getAgentSettings() {
237+
return getStubSettingsBuilder().getAgentSettings();
238+
}
239+
240+
/** Returns the builder for the settings used for calls to createAgent. */
241+
public UnaryCallSettings.Builder<CreateAgentRequest, Agent> createAgentSettings() {
242+
return getStubSettingsBuilder().createAgentSettings();
243+
}
244+
245+
/** Returns the builder for the settings used for calls to updateAgent. */
246+
public UnaryCallSettings.Builder<UpdateAgentRequest, Agent> updateAgentSettings() {
247+
return getStubSettingsBuilder().updateAgentSettings();
248+
}
249+
250+
/** Returns the builder for the settings used for calls to deleteAgent. */
251+
public UnaryCallSettings.Builder<DeleteAgentRequest, Empty> deleteAgentSettings() {
252+
return getStubSettingsBuilder().deleteAgentSettings();
253+
}
254+
255+
/** Returns the builder for the settings used for calls to exportAgent. */
256+
public UnaryCallSettings.Builder<ExportAgentRequest, Operation> exportAgentSettings() {
257+
return getStubSettingsBuilder().exportAgentSettings();
258+
}
259+
260+
/** Returns the builder for the settings used for calls to exportAgent. */
261+
public OperationCallSettings.Builder<ExportAgentRequest, ExportAgentResponse, Struct>
262+
exportAgentOperationSettings() {
263+
return getStubSettingsBuilder().exportAgentOperationSettings();
264+
}
265+
266+
/** Returns the builder for the settings used for calls to restoreAgent. */
267+
public UnaryCallSettings.Builder<RestoreAgentRequest, Operation> restoreAgentSettings() {
268+
return getStubSettingsBuilder().restoreAgentSettings();
269+
}
270+
271+
/** Returns the builder for the settings used for calls to restoreAgent. */
272+
public OperationCallSettings.Builder<RestoreAgentRequest, Empty, Struct>
273+
restoreAgentOperationSettings() {
274+
return getStubSettingsBuilder().restoreAgentOperationSettings();
275+
}
276+
277+
/** Returns the builder for the settings used for calls to validateAgent. */
278+
public UnaryCallSettings.Builder<ValidateAgentRequest, AgentValidationResult>
279+
validateAgentSettings() {
280+
return getStubSettingsBuilder().validateAgentSettings();
281+
}
282+
283+
/** Returns the builder for the settings used for calls to getAgentValidationResult. */
284+
public UnaryCallSettings.Builder<GetAgentValidationResultRequest, AgentValidationResult>
285+
getAgentValidationResultSettings() {
286+
return getStubSettingsBuilder().getAgentValidationResultSettings();
287+
}
288+
289+
@Override
290+
public AgentsSettings build() throws IOException {
291+
return new AgentsSettings(this);
292+
}
293+
}
294+
}

0 commit comments

Comments
 (0)