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

Commit 0a471e5

Browse files
feat(v2beta1): add enableReload, reloadStatus to Document, add additional method binding for SearchAgent (#206)
This PR was generated using Autosynth. 🌈 Synth log will be available here: https://source.cloud.google.com/results/invocations/94ecf927-e915-4508-98b1-89471d78e772/targets - [ ] To automatically regenerate this PR, check this box. PiperOrigin-RevId: 314879617 Source-Link: googleapis/googleapis@cd804ba PiperOrigin-RevId: 313460921 Source-Link: googleapis/googleapis@c4e3701 PiperOrigin-RevId: 313408465 Source-Link: googleapis/googleapis@576234f PiperOrigin-RevId: 312345206 Source-Link: googleapis/googleapis@7a8875d
1 parent 56fd629 commit 0a471e5

File tree

266 files changed

+8757
-2676
lines changed

Some content is hidden

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

266 files changed

+8757
-2676
lines changed

google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/AgentsClient.java

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -41,30 +41,7 @@
4141

4242
// AUTO-GENERATED DOCUMENTATION AND SERVICE
4343
/**
44-
* Service Description: Agents are best described as Natural Language Understanding (NLU) modules
45-
* that transform user requests into actionable data. You can include agents in your app, product,
46-
* or service to determine user intent and respond to the user in a natural way.
47-
*
48-
* <p>After you create an agent, you can add [Intents][google.cloud.dialogflow.v2.Intents],
49-
* [Contexts][google.cloud.dialogflow.v2.Contexts], [Entity
50-
* Types][google.cloud.dialogflow.v2.EntityTypes],
51-
* [Webhooks][google.cloud.dialogflow.v2.WebhookRequest], and so on to manage the flow of a
52-
* conversation and match user input to predefined intents and actions.
53-
*
54-
* <p>You can create an agent using both Dialogflow Standard Edition and Dialogflow Enterprise
55-
* Edition. For details, see [Dialogflow
56-
* Editions](https://cloud.google.com/dialogflow/docs/editions).
57-
*
58-
* <p>You can save your agent for backup or versioning by exporting the agent by using the
59-
* [ExportAgent][google.cloud.dialogflow.v2.Agents.ExportAgent] method. You can import a saved agent
60-
* by using the [ImportAgent][google.cloud.dialogflow.v2.Agents.ImportAgent] method.
61-
*
62-
* <p>Dialogflow provides several [prebuilt
63-
* agents](https://cloud.google.com/dialogflow/docs/agents-prebuilt) for common conversation
64-
* scenarios such as determining a date and time, converting currency, and so on.
65-
*
66-
* <p>For more information about agents, see the [Dialogflow
67-
* documentation](https://cloud.google.com/dialogflow/docs/agents-overview).
44+
* Service Description: Service for managing [Agents][google.cloud.dialogflow.v2.Agent].
6845
*
6946
* <p>This class provides the ability to make remote calls to the backing service through method
7047
* calls that map to API methods. Sample code to get started:

google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/package-info.java

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -21,30 +21,7 @@
2121
*
2222
* <p>============ AgentsClient ============
2323
*
24-
* <p>Service Description: Agents are best described as Natural Language Understanding (NLU) modules
25-
* that transform user requests into actionable data. You can include agents in your app, product,
26-
* or service to determine user intent and respond to the user in a natural way.
27-
*
28-
* <p>After you create an agent, you can add [Intents][google.cloud.dialogflow.v2.Intents],
29-
* [Contexts][google.cloud.dialogflow.v2.Contexts], [Entity
30-
* Types][google.cloud.dialogflow.v2.EntityTypes],
31-
* [Webhooks][google.cloud.dialogflow.v2.WebhookRequest], and so on to manage the flow of a
32-
* conversation and match user input to predefined intents and actions.
33-
*
34-
* <p>You can create an agent using both Dialogflow Standard Edition and Dialogflow Enterprise
35-
* Edition. For details, see [Dialogflow
36-
* Editions](https://cloud.google.com/dialogflow/docs/editions).
37-
*
38-
* <p>You can save your agent for backup or versioning by exporting the agent by using the
39-
* [ExportAgent][google.cloud.dialogflow.v2.Agents.ExportAgent] method. You can import a saved agent
40-
* by using the [ImportAgent][google.cloud.dialogflow.v2.Agents.ImportAgent] method.
41-
*
42-
* <p>Dialogflow provides several [prebuilt
43-
* agents](https://cloud.google.com/dialogflow/docs/agents-prebuilt) for common conversation
44-
* scenarios such as determining a date and time, converting currency, and so on.
45-
*
46-
* <p>For more information about agents, see the [Dialogflow
47-
* documentation](https://cloud.google.com/dialogflow/docs/agents-overview).
24+
* <p>Service Description: Service for managing [Agents][google.cloud.dialogflow.v2.Agent].
4825
*
4926
* <p>Sample for AgentsClient:
5027
*

google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/AgentsClient.java

Lines changed: 15 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -443,11 +443,9 @@ public final UnaryCallable<GetAgentRequest, Agent> getAgentCallable() {
443443

444444
// AUTO-GENERATED DOCUMENTATION AND METHOD
445445
/**
446-
* Returns the list of agents.
447-
*
448-
* <p>Since there is at most one conversational agent per project, this method is useful primarily
449-
* for listing all agents across projects the caller has access to. One can achieve that with a
450-
* wildcard project collection id "-". Refer to [List
446+
* Returns the list of agents. Since there is at most one conversational agent per project, this
447+
* method is useful primarily for listing all agents across projects the caller has access to. One
448+
* can achieve that with a wildcard project collection id "-". Refer to [List
451449
* Sub-Collections](https://cloud.google.com/apis/design/design_patterns#list_sub-collections).
452450
*
453451
* <p>Sample code:
@@ -475,11 +473,9 @@ public final SearchAgentsPagedResponse searchAgents(ProjectName parent) {
475473

476474
// AUTO-GENERATED DOCUMENTATION AND METHOD
477475
/**
478-
* Returns the list of agents.
479-
*
480-
* <p>Since there is at most one conversational agent per project, this method is useful primarily
481-
* for listing all agents across projects the caller has access to. One can achieve that with a
482-
* wildcard project collection id "-". Refer to [List
476+
* Returns the list of agents. Since there is at most one conversational agent per project, this
477+
* method is useful primarily for listing all agents across projects the caller has access to. One
478+
* can achieve that with a wildcard project collection id "-". Refer to [List
483479
* Sub-Collections](https://cloud.google.com/apis/design/design_patterns#list_sub-collections).
484480
*
485481
* <p>Sample code:
@@ -504,11 +500,9 @@ public final SearchAgentsPagedResponse searchAgents(String parent) {
504500

505501
// AUTO-GENERATED DOCUMENTATION AND METHOD
506502
/**
507-
* Returns the list of agents.
508-
*
509-
* <p>Since there is at most one conversational agent per project, this method is useful primarily
510-
* for listing all agents across projects the caller has access to. One can achieve that with a
511-
* wildcard project collection id "-". Refer to [List
503+
* Returns the list of agents. Since there is at most one conversational agent per project, this
504+
* method is useful primarily for listing all agents across projects the caller has access to. One
505+
* can achieve that with a wildcard project collection id "-". Refer to [List
512506
* Sub-Collections](https://cloud.google.com/apis/design/design_patterns#list_sub-collections).
513507
*
514508
* <p>Sample code:
@@ -534,11 +528,9 @@ public final SearchAgentsPagedResponse searchAgents(SearchAgentsRequest request)
534528

535529
// AUTO-GENERATED DOCUMENTATION AND METHOD
536530
/**
537-
* Returns the list of agents.
538-
*
539-
* <p>Since there is at most one conversational agent per project, this method is useful primarily
540-
* for listing all agents across projects the caller has access to. One can achieve that with a
541-
* wildcard project collection id "-". Refer to [List
531+
* Returns the list of agents. Since there is at most one conversational agent per project, this
532+
* method is useful primarily for listing all agents across projects the caller has access to. One
533+
* can achieve that with a wildcard project collection id "-". Refer to [List
542534
* Sub-Collections](https://cloud.google.com/apis/design/design_patterns#list_sub-collections).
543535
*
544536
* <p>Sample code:
@@ -564,11 +556,9 @@ public final SearchAgentsPagedResponse searchAgents(SearchAgentsRequest request)
564556

565557
// AUTO-GENERATED DOCUMENTATION AND METHOD
566558
/**
567-
* Returns the list of agents.
568-
*
569-
* <p>Since there is at most one conversational agent per project, this method is useful primarily
570-
* for listing all agents across projects the caller has access to. One can achieve that with a
571-
* wildcard project collection id "-". Refer to [List
559+
* Returns the list of agents. Since there is at most one conversational agent per project, this
560+
* method is useful primarily for listing all agents across projects the caller has access to. One
561+
* can achieve that with a wildcard project collection id "-". Refer to [List
572562
* Sub-Collections](https://cloud.google.com/apis/design/design_patterns#list_sub-collections).
573563
*
574564
* <p>Sample code:

google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/DocumentsClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ public final UnaryCallable<CreateDocumentRequest, Operation> createDocumentCalla
586586
* }
587587
* </code></pre>
588588
*
589-
* @param name The name of the document to delete. Format: `projects/&lt;Project
589+
* @param name Required. The name of the document to delete. Format: `projects/&lt;Project
590590
* ID&gt;/knowledgeBases/&lt;Knowledge Base ID&gt;/documents/&lt;Document ID&gt;`.
591591
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
592592
*/
@@ -615,7 +615,7 @@ public final OperationFuture<Empty, KnowledgeOperationMetadata> deleteDocumentAs
615615
* }
616616
* </code></pre>
617617
*
618-
* @param name The name of the document to delete. Format: `projects/&lt;Project
618+
* @param name Required. The name of the document to delete. Format: `projects/&lt;Project
619619
* ID&gt;/knowledgeBases/&lt;Knowledge Base ID&gt;/documents/&lt;Document ID&gt;`.
620620
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
621621
*/

google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/EntityTypesClient.java

Lines changed: 13 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -902,9 +902,7 @@ public final UnaryCallable<DeleteEntityTypeRequest, Empty> deleteEntityTypeCalla
902902

903903
// AUTO-GENERATED DOCUMENTATION AND METHOD
904904
/**
905-
* Updates/Creates multiple entity types in the specified agent.
906-
*
907-
* <p>Operation &lt;response:
905+
* Updates/Creates multiple entity types in the specified agent. Operation &lt;response:
908906
* [BatchUpdateEntityTypesResponse][google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse]&gt;
909907
*
910908
* <p>Sample code:
@@ -931,9 +929,7 @@ public final OperationFuture<BatchUpdateEntityTypesResponse, Struct> batchUpdate
931929

932930
// AUTO-GENERATED DOCUMENTATION AND METHOD
933931
/**
934-
* Updates/Creates multiple entity types in the specified agent.
935-
*
936-
* <p>Operation &lt;response:
932+
* Updates/Creates multiple entity types in the specified agent. Operation &lt;response:
937933
* [BatchUpdateEntityTypesResponse][google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse]&gt;
938934
*
939935
* <p>Sample code:
@@ -959,9 +955,7 @@ public final OperationFuture<BatchUpdateEntityTypesResponse, Struct> batchUpdate
959955

960956
// AUTO-GENERATED DOCUMENTATION AND METHOD
961957
/**
962-
* Updates/Creates multiple entity types in the specified agent.
963-
*
964-
* <p>Operation &lt;response:
958+
* Updates/Creates multiple entity types in the specified agent. Operation &lt;response:
965959
* [BatchUpdateEntityTypesResponse][google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse]&gt;
966960
*
967961
* <p>Sample code:
@@ -985,9 +979,8 @@ public final OperationFuture<BatchUpdateEntityTypesResponse, Struct> batchUpdate
985979

986980
// AUTO-GENERATED DOCUMENTATION AND METHOD
987981
/**
988-
* Deletes entity types in the specified agent.
989-
*
990-
* <p>Operation &lt;response: [google.protobuf.Empty][google.protobuf.Empty]&gt;
982+
* Deletes entity types in the specified agent. Operation &lt;response:
983+
* [google.protobuf.Empty][google.protobuf.Empty]&gt;
991984
*
992985
* <p>Sample code:
993986
*
@@ -1019,9 +1012,8 @@ public final OperationFuture<Empty, Struct> batchDeleteEntityTypesAsync(
10191012

10201013
// AUTO-GENERATED DOCUMENTATION AND METHOD
10211014
/**
1022-
* Deletes entity types in the specified agent.
1023-
*
1024-
* <p>Operation &lt;response: [google.protobuf.Empty][google.protobuf.Empty]&gt;
1015+
* Deletes entity types in the specified agent. Operation &lt;response:
1016+
* [google.protobuf.Empty][google.protobuf.Empty]&gt;
10251017
*
10261018
* <p>Sample code:
10271019
*
@@ -1053,9 +1045,8 @@ public final OperationFuture<Empty, Struct> batchDeleteEntityTypesAsync(
10531045

10541046
// AUTO-GENERATED DOCUMENTATION AND METHOD
10551047
/**
1056-
* Deletes entity types in the specified agent.
1057-
*
1058-
* <p>Operation &lt;response: [google.protobuf.Empty][google.protobuf.Empty]&gt;
1048+
* Deletes entity types in the specified agent. Operation &lt;response:
1049+
* [google.protobuf.Empty][google.protobuf.Empty]&gt;
10591050
*
10601051
* <p>Sample code:
10611052
*
@@ -1083,9 +1074,8 @@ public final OperationFuture<Empty, Struct> batchDeleteEntityTypesAsync(
10831074

10841075
// AUTO-GENERATED DOCUMENTATION AND METHOD
10851076
/**
1086-
* Deletes entity types in the specified agent.
1087-
*
1088-
* <p>Operation &lt;response: [google.protobuf.Empty][google.protobuf.Empty]&gt;
1077+
* Deletes entity types in the specified agent. Operation &lt;response:
1078+
* [google.protobuf.Empty][google.protobuf.Empty]&gt;
10891079
*
10901080
* <p>Sample code:
10911081
*
@@ -1111,9 +1101,8 @@ public final OperationFuture<Empty, Struct> batchDeleteEntityTypesAsync(
11111101

11121102
// AUTO-GENERATED DOCUMENTATION AND METHOD
11131103
/**
1114-
* Deletes entity types in the specified agent.
1115-
*
1116-
* <p>Operation &lt;response: [google.protobuf.Empty][google.protobuf.Empty]&gt;
1104+
* Deletes entity types in the specified agent. Operation &lt;response:
1105+
* [google.protobuf.Empty][google.protobuf.Empty]&gt;
11171106
*
11181107
* <p>Sample code:
11191108
*

google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/DocumentsClientTest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,12 +163,14 @@ public void getDocumentTest() {
163163
String displayName = "displayName1615086568";
164164
String mimeType = "mimeType-196041627";
165165
String contentUri = "contentUri-388807514";
166+
boolean enableAutoReload = false;
166167
Document expectedResponse =
167168
Document.newBuilder()
168169
.setName(name2.toString())
169170
.setDisplayName(displayName)
170171
.setMimeType(mimeType)
171172
.setContentUri(contentUri)
173+
.setEnableAutoReload(enableAutoReload)
172174
.build();
173175
mockDocuments.addResponse(expectedResponse);
174176

@@ -211,12 +213,14 @@ public void createDocumentTest() throws Exception {
211213
String displayName = "displayName1615086568";
212214
String mimeType = "mimeType-196041627";
213215
String contentUri = "contentUri-388807514";
216+
boolean enableAutoReload = false;
214217
Document expectedResponse =
215218
Document.newBuilder()
216219
.setName(name.toString())
217220
.setDisplayName(displayName)
218221
.setMimeType(mimeType)
219222
.setContentUri(contentUri)
223+
.setEnableAutoReload(enableAutoReload)
220224
.build();
221225
Operation resultOperation =
222226
Operation.newBuilder()
@@ -316,12 +320,14 @@ public void updateDocumentTest() throws Exception {
316320
String displayName = "displayName1615086568";
317321
String mimeType = "mimeType-196041627";
318322
String contentUri = "contentUri-388807514";
323+
boolean enableAutoReload = false;
319324
Document expectedResponse =
320325
Document.newBuilder()
321326
.setName(name.toString())
322327
.setDisplayName(displayName)
323328
.setMimeType(mimeType)
324329
.setContentUri(contentUri)
330+
.setEnableAutoReload(enableAutoReload)
325331
.build();
326332
Operation resultOperation =
327333
Operation.newBuilder()

0 commit comments

Comments
 (0)