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

Commit

Permalink
feat: added location-aware HTTP path binding for ListIntents (#574)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
yoshi-automation committed May 31, 2021
1 parent b7189c5 commit 7d8d343
Show file tree
Hide file tree
Showing 20 changed files with 1,361 additions and 496 deletions.
Expand Up @@ -179,7 +179,12 @@ public final OperationsClient getOperationsClient() {
* }</pre>
*
* @param parent Required. The agent to list all intents from. Format: `projects/&lt;Project
* ID&gt;/agent`.
* ID&gt;/agent` or `projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agent`.
* <p>Alternatively, you can specify the environment to list intents for. Format:
* `projects/&lt;Project ID&gt;/agent/environments/&lt;Environment ID&gt;` or
* `projects/&lt;Project ID&gt;/locations/&lt;Location
* ID&gt;/agent/environments/&lt;Environment ID&gt;`. Note: training phrases of the intents
* will not be returned for non-draft environment.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListIntentsPagedResponse listIntents(AgentName parent) {
Expand All @@ -206,7 +211,12 @@ public final ListIntentsPagedResponse listIntents(AgentName parent) {
* }</pre>
*
* @param parent Required. The agent to list all intents from. Format: `projects/&lt;Project
* ID&gt;/agent`.
* ID&gt;/agent` or `projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agent`.
* <p>Alternatively, you can specify the environment to list intents for. Format:
* `projects/&lt;Project ID&gt;/agent/environments/&lt;Environment ID&gt;` or
* `projects/&lt;Project ID&gt;/locations/&lt;Location
* ID&gt;/agent/environments/&lt;Environment ID&gt;`. Note: training phrases of the intents
* will not be returned for non-draft environment.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListIntentsPagedResponse listIntents(String parent) {
Expand All @@ -231,7 +241,12 @@ public final ListIntentsPagedResponse listIntents(String parent) {
* }</pre>
*
* @param parent Required. The agent to list all intents from. Format: `projects/&lt;Project
* ID&gt;/agent`.
* ID&gt;/agent` or `projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agent`.
* <p>Alternatively, you can specify the environment to list intents for. Format:
* `projects/&lt;Project ID&gt;/agent/environments/&lt;Environment ID&gt;` or
* `projects/&lt;Project ID&gt;/locations/&lt;Location
* ID&gt;/agent/environments/&lt;Environment ID&gt;`. Note: training phrases of the intents
* will not be returned for non-draft environment.
* @param languageCode Optional. The language used to access language-specific data. If not
* specified, the agent's default language is used. For more information, see [Multilingual
* intent and entity
Expand Down Expand Up @@ -264,7 +279,12 @@ public final ListIntentsPagedResponse listIntents(AgentName parent, String langu
* }</pre>
*
* @param parent Required. The agent to list all intents from. Format: `projects/&lt;Project
* ID&gt;/agent`.
* ID&gt;/agent` or `projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agent`.
* <p>Alternatively, you can specify the environment to list intents for. Format:
* `projects/&lt;Project ID&gt;/agent/environments/&lt;Environment ID&gt;` or
* `projects/&lt;Project ID&gt;/locations/&lt;Location
* ID&gt;/agent/environments/&lt;Environment ID&gt;`. Note: training phrases of the intents
* will not be returned for non-draft environment.
* @param languageCode Optional. The language used to access language-specific data. If not
* specified, the agent's default language is used. For more information, see [Multilingual
* intent and entity
Expand Down
Expand Up @@ -226,6 +226,11 @@ private QueryResult(
sentimentAnalysisResult_ = subBuilder.buildPartial();
}

break;
}
case 168:
{
cancelsSlotFilling_ = input.readBool();
break;
}
default:
Expand Down Expand Up @@ -567,6 +572,25 @@ public boolean getAllRequiredParamsPresent() {
return allRequiredParamsPresent_;
}

public static final int CANCELS_SLOT_FILLING_FIELD_NUMBER = 21;
private boolean cancelsSlotFilling_;
/**
*
*
* <pre>
* Indicates whether the conversational query triggers a cancellation for slot
* filling.
* </pre>
*
* <code>bool cancels_slot_filling = 21;</code>
*
* @return The cancelsSlotFilling.
*/
@java.lang.Override
public boolean getCancelsSlotFilling() {
return cancelsSlotFilling_;
}

public static final int FULFILLMENT_TEXT_FIELD_NUMBER = 6;
private volatile java.lang.Object fulfillmentText_;
/**
Expand Down Expand Up @@ -1129,6 +1153,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (sentimentAnalysisResult_ != null) {
output.writeMessage(17, getSentimentAnalysisResult());
}
if (cancelsSlotFilling_ != false) {
output.writeBool(21, cancelsSlotFilling_);
}
unknownFields.writeTo(output);
}

Expand Down Expand Up @@ -1188,6 +1215,9 @@ public int getSerializedSize() {
com.google.protobuf.CodedOutputStream.computeMessageSize(
17, getSentimentAnalysisResult());
}
if (cancelsSlotFilling_ != false) {
size += com.google.protobuf.CodedOutputStream.computeBoolSize(21, cancelsSlotFilling_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
Expand All @@ -1214,6 +1244,7 @@ public boolean equals(final java.lang.Object obj) {
if (!getParameters().equals(other.getParameters())) return false;
}
if (getAllRequiredParamsPresent() != other.getAllRequiredParamsPresent()) return false;
if (getCancelsSlotFilling() != other.getCancelsSlotFilling()) return false;
if (!getFulfillmentText().equals(other.getFulfillmentText())) return false;
if (!getFulfillmentMessagesList().equals(other.getFulfillmentMessagesList())) return false;
if (!getWebhookSource().equals(other.getWebhookSource())) return false;
Expand Down Expand Up @@ -1261,6 +1292,8 @@ public int hashCode() {
}
hash = (37 * hash) + ALL_REQUIRED_PARAMS_PRESENT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllRequiredParamsPresent());
hash = (37 * hash) + CANCELS_SLOT_FILLING_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getCancelsSlotFilling());
hash = (37 * hash) + FULFILLMENT_TEXT_FIELD_NUMBER;
hash = (53 * hash) + getFulfillmentText().hashCode();
if (getFulfillmentMessagesCount() > 0) {
Expand Down Expand Up @@ -1455,6 +1488,8 @@ public Builder clear() {
}
allRequiredParamsPresent_ = false;

cancelsSlotFilling_ = false;

fulfillmentText_ = "";

if (fulfillmentMessagesBuilder_ == null) {
Expand Down Expand Up @@ -1535,6 +1570,7 @@ public com.google.cloud.dialogflow.v2.QueryResult buildPartial() {
result.parameters_ = parametersBuilder_.build();
}
result.allRequiredParamsPresent_ = allRequiredParamsPresent_;
result.cancelsSlotFilling_ = cancelsSlotFilling_;
result.fulfillmentText_ = fulfillmentText_;
if (fulfillmentMessagesBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
Expand Down Expand Up @@ -1646,6 +1682,9 @@ public Builder mergeFrom(com.google.cloud.dialogflow.v2.QueryResult other) {
if (other.getAllRequiredParamsPresent() != false) {
setAllRequiredParamsPresent(other.getAllRequiredParamsPresent());
}
if (other.getCancelsSlotFilling() != false) {
setCancelsSlotFilling(other.getCancelsSlotFilling());
}
if (!other.getFulfillmentText().isEmpty()) {
fulfillmentText_ = other.fulfillmentText_;
onChanged();
Expand Down Expand Up @@ -2555,6 +2594,61 @@ public Builder clearAllRequiredParamsPresent() {
return this;
}

private boolean cancelsSlotFilling_;
/**
*
*
* <pre>
* Indicates whether the conversational query triggers a cancellation for slot
* filling.
* </pre>
*
* <code>bool cancels_slot_filling = 21;</code>
*
* @return The cancelsSlotFilling.
*/
@java.lang.Override
public boolean getCancelsSlotFilling() {
return cancelsSlotFilling_;
}
/**
*
*
* <pre>
* Indicates whether the conversational query triggers a cancellation for slot
* filling.
* </pre>
*
* <code>bool cancels_slot_filling = 21;</code>
*
* @param value The cancelsSlotFilling to set.
* @return This builder for chaining.
*/
public Builder setCancelsSlotFilling(boolean value) {

cancelsSlotFilling_ = value;
onChanged();
return this;
}
/**
*
*
* <pre>
* Indicates whether the conversational query triggers a cancellation for slot
* filling.
* </pre>
*
* <code>bool cancels_slot_filling = 21;</code>
*
* @return This builder for chaining.
*/
public Builder clearCancelsSlotFilling() {

cancelsSlotFilling_ = false;
onChanged();
return this;
}

private java.lang.Object fulfillmentText_ = "";
/**
*
Expand Down
Expand Up @@ -229,6 +229,20 @@ public interface QueryResultOrBuilder
*/
boolean getAllRequiredParamsPresent();

/**
*
*
* <pre>
* Indicates whether the conversational query triggers a cancellation for slot
* filling.
* </pre>
*
* <code>bool cancels_slot_filling = 21;</code>
*
* @return The cancelsSlotFilling.
*/
boolean getCancelsSlotFilling();

/**
*
*
Expand Down

0 comments on commit 7d8d343

Please sign in to comment.