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

Commit 7d8d343

Browse files
feat: added location-aware HTTP path binding for ListIntents (#574)
This PR was generated using Autosynth. 🌈 Synth log will be available here: https://source.cloud.google.com/results/invocations/963aecad-626e-4516-985d-a8612df44fa2/targets - [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.) PiperOrigin-RevId: 375741797 Source-Link: googleapis/googleapis@5e797ab PiperOrigin-RevId: 375489925 Source-Link: googleapis/googleapis@a185afb PiperOrigin-RevId: 374460003 Source-Link: googleapis/googleapis@1309578 feat: exposed match confidence and parameter in AnalyzeContentResponse feat: added DTMF and PARTIAL DTMF type in recognition result feat: added a field in the query result to indicate whether slot filling is cancelled
1 parent b7189c5 commit 7d8d343

File tree

20 files changed

+1361
-496
lines changed

20 files changed

+1361
-496
lines changed

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

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,12 @@ public final OperationsClient getOperationsClient() {
179179
* }</pre>
180180
*
181181
* @param parent Required. The agent to list all intents from. Format: `projects/&lt;Project
182-
* ID&gt;/agent`.
182+
* ID&gt;/agent` or `projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agent`.
183+
* <p>Alternatively, you can specify the environment to list intents for. Format:
184+
* `projects/&lt;Project ID&gt;/agent/environments/&lt;Environment ID&gt;` or
185+
* `projects/&lt;Project ID&gt;/locations/&lt;Location
186+
* ID&gt;/agent/environments/&lt;Environment ID&gt;`. Note: training phrases of the intents
187+
* will not be returned for non-draft environment.
183188
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
184189
*/
185190
public final ListIntentsPagedResponse listIntents(AgentName parent) {
@@ -206,7 +211,12 @@ public final ListIntentsPagedResponse listIntents(AgentName parent) {
206211
* }</pre>
207212
*
208213
* @param parent Required. The agent to list all intents from. Format: `projects/&lt;Project
209-
* ID&gt;/agent`.
214+
* ID&gt;/agent` or `projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agent`.
215+
* <p>Alternatively, you can specify the environment to list intents for. Format:
216+
* `projects/&lt;Project ID&gt;/agent/environments/&lt;Environment ID&gt;` or
217+
* `projects/&lt;Project ID&gt;/locations/&lt;Location
218+
* ID&gt;/agent/environments/&lt;Environment ID&gt;`. Note: training phrases of the intents
219+
* will not be returned for non-draft environment.
210220
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
211221
*/
212222
public final ListIntentsPagedResponse listIntents(String parent) {
@@ -231,7 +241,12 @@ public final ListIntentsPagedResponse listIntents(String parent) {
231241
* }</pre>
232242
*
233243
* @param parent Required. The agent to list all intents from. Format: `projects/&lt;Project
234-
* ID&gt;/agent`.
244+
* ID&gt;/agent` or `projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agent`.
245+
* <p>Alternatively, you can specify the environment to list intents for. Format:
246+
* `projects/&lt;Project ID&gt;/agent/environments/&lt;Environment ID&gt;` or
247+
* `projects/&lt;Project ID&gt;/locations/&lt;Location
248+
* ID&gt;/agent/environments/&lt;Environment ID&gt;`. Note: training phrases of the intents
249+
* will not be returned for non-draft environment.
235250
* @param languageCode Optional. The language used to access language-specific data. If not
236251
* specified, the agent's default language is used. For more information, see [Multilingual
237252
* intent and entity
@@ -264,7 +279,12 @@ public final ListIntentsPagedResponse listIntents(AgentName parent, String langu
264279
* }</pre>
265280
*
266281
* @param parent Required. The agent to list all intents from. Format: `projects/&lt;Project
267-
* ID&gt;/agent`.
282+
* ID&gt;/agent` or `projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agent`.
283+
* <p>Alternatively, you can specify the environment to list intents for. Format:
284+
* `projects/&lt;Project ID&gt;/agent/environments/&lt;Environment ID&gt;` or
285+
* `projects/&lt;Project ID&gt;/locations/&lt;Location
286+
* ID&gt;/agent/environments/&lt;Environment ID&gt;`. Note: training phrases of the intents
287+
* will not be returned for non-draft environment.
268288
* @param languageCode Optional. The language used to access language-specific data. If not
269289
* specified, the agent's default language is used. For more information, see [Multilingual
270290
* intent and entity

proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/QueryResult.java

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,11 @@ private QueryResult(
226226
sentimentAnalysisResult_ = subBuilder.buildPartial();
227227
}
228228

229+
break;
230+
}
231+
case 168:
232+
{
233+
cancelsSlotFilling_ = input.readBool();
229234
break;
230235
}
231236
default:
@@ -567,6 +572,25 @@ public boolean getAllRequiredParamsPresent() {
567572
return allRequiredParamsPresent_;
568573
}
569574

575+
public static final int CANCELS_SLOT_FILLING_FIELD_NUMBER = 21;
576+
private boolean cancelsSlotFilling_;
577+
/**
578+
*
579+
*
580+
* <pre>
581+
* Indicates whether the conversational query triggers a cancellation for slot
582+
* filling.
583+
* </pre>
584+
*
585+
* <code>bool cancels_slot_filling = 21;</code>
586+
*
587+
* @return The cancelsSlotFilling.
588+
*/
589+
@java.lang.Override
590+
public boolean getCancelsSlotFilling() {
591+
return cancelsSlotFilling_;
592+
}
593+
570594
public static final int FULFILLMENT_TEXT_FIELD_NUMBER = 6;
571595
private volatile java.lang.Object fulfillmentText_;
572596
/**
@@ -1129,6 +1153,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
11291153
if (sentimentAnalysisResult_ != null) {
11301154
output.writeMessage(17, getSentimentAnalysisResult());
11311155
}
1156+
if (cancelsSlotFilling_ != false) {
1157+
output.writeBool(21, cancelsSlotFilling_);
1158+
}
11321159
unknownFields.writeTo(output);
11331160
}
11341161

@@ -1188,6 +1215,9 @@ public int getSerializedSize() {
11881215
com.google.protobuf.CodedOutputStream.computeMessageSize(
11891216
17, getSentimentAnalysisResult());
11901217
}
1218+
if (cancelsSlotFilling_ != false) {
1219+
size += com.google.protobuf.CodedOutputStream.computeBoolSize(21, cancelsSlotFilling_);
1220+
}
11911221
size += unknownFields.getSerializedSize();
11921222
memoizedSize = size;
11931223
return size;
@@ -1214,6 +1244,7 @@ public boolean equals(final java.lang.Object obj) {
12141244
if (!getParameters().equals(other.getParameters())) return false;
12151245
}
12161246
if (getAllRequiredParamsPresent() != other.getAllRequiredParamsPresent()) return false;
1247+
if (getCancelsSlotFilling() != other.getCancelsSlotFilling()) return false;
12171248
if (!getFulfillmentText().equals(other.getFulfillmentText())) return false;
12181249
if (!getFulfillmentMessagesList().equals(other.getFulfillmentMessagesList())) return false;
12191250
if (!getWebhookSource().equals(other.getWebhookSource())) return false;
@@ -1261,6 +1292,8 @@ public int hashCode() {
12611292
}
12621293
hash = (37 * hash) + ALL_REQUIRED_PARAMS_PRESENT_FIELD_NUMBER;
12631294
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllRequiredParamsPresent());
1295+
hash = (37 * hash) + CANCELS_SLOT_FILLING_FIELD_NUMBER;
1296+
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getCancelsSlotFilling());
12641297
hash = (37 * hash) + FULFILLMENT_TEXT_FIELD_NUMBER;
12651298
hash = (53 * hash) + getFulfillmentText().hashCode();
12661299
if (getFulfillmentMessagesCount() > 0) {
@@ -1455,6 +1488,8 @@ public Builder clear() {
14551488
}
14561489
allRequiredParamsPresent_ = false;
14571490

1491+
cancelsSlotFilling_ = false;
1492+
14581493
fulfillmentText_ = "";
14591494

14601495
if (fulfillmentMessagesBuilder_ == null) {
@@ -1535,6 +1570,7 @@ public com.google.cloud.dialogflow.v2.QueryResult buildPartial() {
15351570
result.parameters_ = parametersBuilder_.build();
15361571
}
15371572
result.allRequiredParamsPresent_ = allRequiredParamsPresent_;
1573+
result.cancelsSlotFilling_ = cancelsSlotFilling_;
15381574
result.fulfillmentText_ = fulfillmentText_;
15391575
if (fulfillmentMessagesBuilder_ == null) {
15401576
if (((bitField0_ & 0x00000001) != 0)) {
@@ -1646,6 +1682,9 @@ public Builder mergeFrom(com.google.cloud.dialogflow.v2.QueryResult other) {
16461682
if (other.getAllRequiredParamsPresent() != false) {
16471683
setAllRequiredParamsPresent(other.getAllRequiredParamsPresent());
16481684
}
1685+
if (other.getCancelsSlotFilling() != false) {
1686+
setCancelsSlotFilling(other.getCancelsSlotFilling());
1687+
}
16491688
if (!other.getFulfillmentText().isEmpty()) {
16501689
fulfillmentText_ = other.fulfillmentText_;
16511690
onChanged();
@@ -2555,6 +2594,61 @@ public Builder clearAllRequiredParamsPresent() {
25552594
return this;
25562595
}
25572596

2597+
private boolean cancelsSlotFilling_;
2598+
/**
2599+
*
2600+
*
2601+
* <pre>
2602+
* Indicates whether the conversational query triggers a cancellation for slot
2603+
* filling.
2604+
* </pre>
2605+
*
2606+
* <code>bool cancels_slot_filling = 21;</code>
2607+
*
2608+
* @return The cancelsSlotFilling.
2609+
*/
2610+
@java.lang.Override
2611+
public boolean getCancelsSlotFilling() {
2612+
return cancelsSlotFilling_;
2613+
}
2614+
/**
2615+
*
2616+
*
2617+
* <pre>
2618+
* Indicates whether the conversational query triggers a cancellation for slot
2619+
* filling.
2620+
* </pre>
2621+
*
2622+
* <code>bool cancels_slot_filling = 21;</code>
2623+
*
2624+
* @param value The cancelsSlotFilling to set.
2625+
* @return This builder for chaining.
2626+
*/
2627+
public Builder setCancelsSlotFilling(boolean value) {
2628+
2629+
cancelsSlotFilling_ = value;
2630+
onChanged();
2631+
return this;
2632+
}
2633+
/**
2634+
*
2635+
*
2636+
* <pre>
2637+
* Indicates whether the conversational query triggers a cancellation for slot
2638+
* filling.
2639+
* </pre>
2640+
*
2641+
* <code>bool cancels_slot_filling = 21;</code>
2642+
*
2643+
* @return This builder for chaining.
2644+
*/
2645+
public Builder clearCancelsSlotFilling() {
2646+
2647+
cancelsSlotFilling_ = false;
2648+
onChanged();
2649+
return this;
2650+
}
2651+
25582652
private java.lang.Object fulfillmentText_ = "";
25592653
/**
25602654
*

proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/QueryResultOrBuilder.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,20 @@ public interface QueryResultOrBuilder
229229
*/
230230
boolean getAllRequiredParamsPresent();
231231

232+
/**
233+
*
234+
*
235+
* <pre>
236+
* Indicates whether the conversational query triggers a cancellation for slot
237+
* filling.
238+
* </pre>
239+
*
240+
* <code>bool cancels_slot_filling = 21;</code>
241+
*
242+
* @return The cancelsSlotFilling.
243+
*/
244+
boolean getCancelsSlotFilling();
245+
232246
/**
233247
*
234248
*

0 commit comments

Comments
 (0)