com.google.api.services.dialogflow.v3.model.GoogleCloudDialogflowCxV3DetectIntentResponse Maven / Gradle / Ivy
The newest version!
/*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
/*
* This code was generated by https://github.com/googleapis/google-api-java-client-services/
* Modify at your own risk.
*/
package com.google.api.services.dialogflow.v3.model;
/**
* The message returned from the DetectIntent method.
*
* This is the Java data model class that specifies how to parse/serialize into the JSON that is
* transmitted over HTTP when working with the Dialogflow API. For a detailed explanation see:
* https://developers.google.com/api-client-library/java/google-http-java-client/json
*
*
* @author Google, Inc.
*/
@SuppressWarnings("javadoc")
public final class GoogleCloudDialogflowCxV3DetectIntentResponse extends com.google.api.client.json.GenericJson {
/**
* Indicates whether the partial response can be cancelled when a later response arrives. e.g. if
* the agent specified some music as partial response, it can be cancelled.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.Boolean allowCancellation;
/**
* The audio data bytes encoded as specified in the request. Note: The output audio is generated
* based on the values of default platform text responses found in the
* `query_result.response_messages` field. If multiple default text responses exist, they will be
* concatenated when generating audio. If no default platform text responses exist, the generated
* audio content will be empty. In some scenarios, multiple output audio fields may be present in
* the response structure. In these cases, only the top-most-level audio output has content.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String outputAudio;
/**
* The config used by the speech synthesizer to generate the output audio.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private GoogleCloudDialogflowCxV3OutputAudioConfig outputAudioConfig;
/**
* The result of the conversational query.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private GoogleCloudDialogflowCxV3QueryResult queryResult;
/**
* Output only. The unique identifier of the response. It can be used to locate a response in the
* training example set or for reporting issues.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String responseId;
/**
* Response type.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String responseType;
/**
* Indicates whether the partial response can be cancelled when a later response arrives. e.g. if
* the agent specified some music as partial response, it can be cancelled.
* @return value or {@code null} for none
*/
public java.lang.Boolean getAllowCancellation() {
return allowCancellation;
}
/**
* Indicates whether the partial response can be cancelled when a later response arrives. e.g. if
* the agent specified some music as partial response, it can be cancelled.
* @param allowCancellation allowCancellation or {@code null} for none
*/
public GoogleCloudDialogflowCxV3DetectIntentResponse setAllowCancellation(java.lang.Boolean allowCancellation) {
this.allowCancellation = allowCancellation;
return this;
}
/**
* The audio data bytes encoded as specified in the request. Note: The output audio is generated
* based on the values of default platform text responses found in the
* `query_result.response_messages` field. If multiple default text responses exist, they will be
* concatenated when generating audio. If no default platform text responses exist, the generated
* audio content will be empty. In some scenarios, multiple output audio fields may be present in
* the response structure. In these cases, only the top-most-level audio output has content.
* @see #decodeOutputAudio()
* @return value or {@code null} for none
*/
public java.lang.String getOutputAudio() {
return outputAudio;
}
/**
* The audio data bytes encoded as specified in the request. Note: The output audio is generated
* based on the values of default platform text responses found in the
* `query_result.response_messages` field. If multiple default text responses exist, they will be
* concatenated when generating audio. If no default platform text responses exist, the generated
* audio content will be empty. In some scenarios, multiple output audio fields may be present in
* the response structure. In these cases, only the top-most-level audio output has content.
* @see #getOutputAudio()
* @return Base64 decoded value or {@code null} for none
*
* @since 1.14
*/
public byte[] decodeOutputAudio() {
return com.google.api.client.util.Base64.decodeBase64(outputAudio);
}
/**
* The audio data bytes encoded as specified in the request. Note: The output audio is generated
* based on the values of default platform text responses found in the
* `query_result.response_messages` field. If multiple default text responses exist, they will be
* concatenated when generating audio. If no default platform text responses exist, the generated
* audio content will be empty. In some scenarios, multiple output audio fields may be present in
* the response structure. In these cases, only the top-most-level audio output has content.
* @see #encodeOutputAudio()
* @param outputAudio outputAudio or {@code null} for none
*/
public GoogleCloudDialogflowCxV3DetectIntentResponse setOutputAudio(java.lang.String outputAudio) {
this.outputAudio = outputAudio;
return this;
}
/**
* The audio data bytes encoded as specified in the request. Note: The output audio is generated
* based on the values of default platform text responses found in the
* `query_result.response_messages` field. If multiple default text responses exist, they will be
* concatenated when generating audio. If no default platform text responses exist, the generated
* audio content will be empty. In some scenarios, multiple output audio fields may be present in
* the response structure. In these cases, only the top-most-level audio output has content.
* @see #setOutputAudio()
*
*
* The value is encoded Base64 or {@code null} for none.
*
*
* @since 1.14
*/
public GoogleCloudDialogflowCxV3DetectIntentResponse encodeOutputAudio(byte[] outputAudio) {
this.outputAudio = com.google.api.client.util.Base64.encodeBase64URLSafeString(outputAudio);
return this;
}
/**
* The config used by the speech synthesizer to generate the output audio.
* @return value or {@code null} for none
*/
public GoogleCloudDialogflowCxV3OutputAudioConfig getOutputAudioConfig() {
return outputAudioConfig;
}
/**
* The config used by the speech synthesizer to generate the output audio.
* @param outputAudioConfig outputAudioConfig or {@code null} for none
*/
public GoogleCloudDialogflowCxV3DetectIntentResponse setOutputAudioConfig(GoogleCloudDialogflowCxV3OutputAudioConfig outputAudioConfig) {
this.outputAudioConfig = outputAudioConfig;
return this;
}
/**
* The result of the conversational query.
* @return value or {@code null} for none
*/
public GoogleCloudDialogflowCxV3QueryResult getQueryResult() {
return queryResult;
}
/**
* The result of the conversational query.
* @param queryResult queryResult or {@code null} for none
*/
public GoogleCloudDialogflowCxV3DetectIntentResponse setQueryResult(GoogleCloudDialogflowCxV3QueryResult queryResult) {
this.queryResult = queryResult;
return this;
}
/**
* Output only. The unique identifier of the response. It can be used to locate a response in the
* training example set or for reporting issues.
* @return value or {@code null} for none
*/
public java.lang.String getResponseId() {
return responseId;
}
/**
* Output only. The unique identifier of the response. It can be used to locate a response in the
* training example set or for reporting issues.
* @param responseId responseId or {@code null} for none
*/
public GoogleCloudDialogflowCxV3DetectIntentResponse setResponseId(java.lang.String responseId) {
this.responseId = responseId;
return this;
}
/**
* Response type.
* @return value or {@code null} for none
*/
public java.lang.String getResponseType() {
return responseType;
}
/**
* Response type.
* @param responseType responseType or {@code null} for none
*/
public GoogleCloudDialogflowCxV3DetectIntentResponse setResponseType(java.lang.String responseType) {
this.responseType = responseType;
return this;
}
@Override
public GoogleCloudDialogflowCxV3DetectIntentResponse set(String fieldName, Object value) {
return (GoogleCloudDialogflowCxV3DetectIntentResponse) super.set(fieldName, value);
}
@Override
public GoogleCloudDialogflowCxV3DetectIntentResponse clone() {
return (GoogleCloudDialogflowCxV3DetectIntentResponse) super.clone();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy