diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/ParticipantsClient.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/ParticipantsClient.java index 692b98942..eaf75e328 100644 --- a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/ParticipantsClient.java +++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/ParticipantsClient.java @@ -801,6 +801,7 @@ public final AnalyzeContentResponse analyzeContent(String participant, TextInput * .setReplyAudioConfig(OutputAudioConfig.newBuilder().build()) * .setQueryParams(QueryParameters.newBuilder().build()) * .setAssistQueryParams(AssistQueryParameters.newBuilder().build()) + * .setCxParameters(Struct.newBuilder().build()) * .setRequestId("requestId693933066") * .build(); * AnalyzeContentResponse response = participantsClient.analyzeContent(request); @@ -837,6 +838,7 @@ public final AnalyzeContentResponse analyzeContent(AnalyzeContentRequest request * .setReplyAudioConfig(OutputAudioConfig.newBuilder().build()) * .setQueryParams(QueryParameters.newBuilder().build()) * .setAssistQueryParams(AssistQueryParameters.newBuilder().build()) + * .setCxParameters(Struct.newBuilder().build()) * .setRequestId("requestId693933066") * .build(); * ApiFuture future = diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/FulfillmentsClient.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/FulfillmentsClient.java index 36e8c5aef..8f11cdd6e 100644 --- a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/FulfillmentsClient.java +++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/FulfillmentsClient.java @@ -161,9 +161,9 @@ public FulfillmentsStub getStub() { * } * } * - * @param name Required. The name of the fulfillment. Supported formats: - `projects/<Project - * ID>/agent/fulfillment` - `projects/<Project ID>/locations/<Location - * ID>/agent/fulfillment` + * @param name Required. The name of the fulfillment. Supported formats: + *

- `projects/<Project ID>/agent/fulfillment` - `projects/<Project + * ID>/locations/<Location ID>/agent/fulfillment` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Fulfillment getFulfillment(FulfillmentName name) { @@ -187,9 +187,9 @@ public final Fulfillment getFulfillment(FulfillmentName name) { * } * } * - * @param name Required. The name of the fulfillment. Supported formats: - `projects/<Project - * ID>/agent/fulfillment` - `projects/<Project ID>/locations/<Location - * ID>/agent/fulfillment` + * @param name Required. The name of the fulfillment. Supported formats: + *

- `projects/<Project ID>/agent/fulfillment` - `projects/<Project + * ID>/locations/<Location ID>/agent/fulfillment` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Fulfillment getFulfillment(String name) { diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/ParticipantsClient.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/ParticipantsClient.java index de0fffac8..1671a952b 100644 --- a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/ParticipantsClient.java +++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/ParticipantsClient.java @@ -23,6 +23,7 @@ import com.google.api.gax.paging.AbstractFixedSizeCollection; import com.google.api.gax.paging.AbstractPage; import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.BidiStreamingCallable; import com.google.api.gax.rpc.PageContext; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.v2beta1.stub.ParticipantsStub; @@ -803,6 +804,7 @@ public final AnalyzeContentResponse analyzeContent(String participant, TextInput * .setReplyAudioConfig(OutputAudioConfig.newBuilder().build()) * .setQueryParams(QueryParameters.newBuilder().build()) * .setAssistQueryParams(AssistQueryParameters.newBuilder().build()) + * .setCxParameters(Struct.newBuilder().build()) * .setMessageSendTime(Timestamp.newBuilder().build()) * .setRequestId("requestId693933066") * .build(); @@ -840,6 +842,7 @@ public final AnalyzeContentResponse analyzeContent(AnalyzeContentRequest request * .setReplyAudioConfig(OutputAudioConfig.newBuilder().build()) * .setQueryParams(QueryParameters.newBuilder().build()) * .setAssistQueryParams(AssistQueryParameters.newBuilder().build()) + * .setCxParameters(Struct.newBuilder().build()) * .setMessageSendTime(Timestamp.newBuilder().build()) * .setRequestId("requestId693933066") * .build(); @@ -855,6 +858,53 @@ public final AnalyzeContentResponse analyzeContent(AnalyzeContentRequest request return stub.analyzeContentCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Adds a text (e.g., chat) or audio (e.g., phone recording) message from a participant into the + * conversation. Note: This method is only available through the gRPC API (not REST). + * + *

The top-level message sent to the client by the server is `StreamingAnalyzeContentResponse`. + * Multiple response messages can be returned in order. The first one or more messages contain the + * `recognition_result` field. Each result represents a more complete transcript of what the user + * said. The next message contains the `reply_text` field, and potentially the `reply_audio` + * and/or the `automated_agent_reply` fields. + * + *

Note: Always use agent versions for production traffic sent to virtual agents. See [Versions + * and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ParticipantsClient participantsClient = ParticipantsClient.create()) {
+   *   BidiStream bidiStream =
+   *       participantsClient.streamingAnalyzeContentCallable().call();
+   *   StreamingAnalyzeContentRequest request =
+   *       StreamingAnalyzeContentRequest.newBuilder()
+   *           .setParticipant(
+   *               ParticipantName.ofProjectConversationParticipantName(
+   *                       "[PROJECT]", "[CONVERSATION]", "[PARTICIPANT]")
+   *                   .toString())
+   *           .setReplyAudioConfig(OutputAudioConfig.newBuilder().build())
+   *           .setQueryParams(QueryParameters.newBuilder().build())
+   *           .setAssistQueryParams(AssistQueryParameters.newBuilder().build())
+   *           .setCxParameters(Struct.newBuilder().build())
+   *           .setEnablePartialAutomatedAgentReply(true)
+   *           .build();
+   *   bidiStream.send(request);
+   *   for (StreamingAnalyzeContentResponse response : bidiStream) {
+   *     // Do something when a response is received.
+   *   }
+   * }
+   * }
+ */ + public final BidiStreamingCallable< + StreamingAnalyzeContentRequest, StreamingAnalyzeContentResponse> + streamingAnalyzeContentCallable() { + return stub.streamingAnalyzeContentCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets suggested articles for a participant based on specific historical messages. diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/ParticipantsSettings.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/ParticipantsSettings.java index aab94b0f3..ecae1a3f9 100644 --- a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/ParticipantsSettings.java +++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/ParticipantsSettings.java @@ -28,6 +28,7 @@ import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.ClientSettings; import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.StreamingCallSettings; import com.google.api.gax.rpc.TransportChannelProvider; import com.google.api.gax.rpc.UnaryCallSettings; import com.google.cloud.dialogflow.v2beta1.stub.ParticipantsStubSettings; @@ -99,6 +100,12 @@ public UnaryCallSettings analyzeC return ((ParticipantsStubSettings) getStubSettings()).analyzeContentSettings(); } + /** Returns the object with the settings used for calls to streamingAnalyzeContent. */ + public StreamingCallSettings + streamingAnalyzeContentSettings() { + return ((ParticipantsStubSettings) getStubSettings()).streamingAnalyzeContentSettings(); + } + /** Returns the object with the settings used for calls to suggestArticles. */ public UnaryCallSettings suggestArticlesSettings() { @@ -267,6 +274,13 @@ public UnaryCallSettings.Builder getParticip return getStubSettingsBuilder().analyzeContentSettings(); } + /** Returns the builder for the settings used for calls to streamingAnalyzeContent. */ + public StreamingCallSettings.Builder< + StreamingAnalyzeContentRequest, StreamingAnalyzeContentResponse> + streamingAnalyzeContentSettings() { + return getStubSettingsBuilder().streamingAnalyzeContentSettings(); + } + /** Returns the builder for the settings used for calls to suggestArticles. */ public UnaryCallSettings.Builder suggestArticlesSettings() { diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/gapic_metadata.json b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/gapic_metadata.json index 8576432bb..c195a263e 100644 --- a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/gapic_metadata.json +++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/gapic_metadata.json @@ -331,6 +331,9 @@ "ListSuggestions": { "methods": ["listSuggestions", "listSuggestionsPagedCallable", "listSuggestionsCallable"] }, + "StreamingAnalyzeContent": { + "methods": ["streamingAnalyzeContentCallable"] + }, "SuggestArticles": { "methods": ["suggestArticles", "suggestArticles", "suggestArticles", "suggestArticlesCallable"] }, diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/GrpcParticipantsStub.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/GrpcParticipantsStub.java index e3ea43074..6df770594 100644 --- a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/GrpcParticipantsStub.java +++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/GrpcParticipantsStub.java @@ -24,6 +24,7 @@ import com.google.api.gax.core.BackgroundResourceAggregation; import com.google.api.gax.grpc.GrpcCallSettings; import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BidiStreamingCallable; import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.v2beta1.AnalyzeContentRequest; @@ -37,6 +38,8 @@ import com.google.cloud.dialogflow.v2beta1.ListSuggestionsRequest; import com.google.cloud.dialogflow.v2beta1.ListSuggestionsResponse; import com.google.cloud.dialogflow.v2beta1.Participant; +import com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest; +import com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse; import com.google.cloud.dialogflow.v2beta1.SuggestArticlesRequest; import com.google.cloud.dialogflow.v2beta1.SuggestArticlesResponse; import com.google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest; @@ -113,6 +116,20 @@ public class GrpcParticipantsStub extends ParticipantsStub { ProtoUtils.marshaller(AnalyzeContentResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor< + StreamingAnalyzeContentRequest, StreamingAnalyzeContentResponse> + streamingAnalyzeContentMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.BIDI_STREAMING) + .setFullMethodName( + "google.cloud.dialogflow.v2beta1.Participants/StreamingAnalyzeContent") + .setRequestMarshaller( + ProtoUtils.marshaller(StreamingAnalyzeContentRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(StreamingAnalyzeContentResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor suggestArticlesMethodDescriptor = MethodDescriptor.newBuilder() @@ -176,6 +193,9 @@ public class GrpcParticipantsStub extends ParticipantsStub { listParticipantsPagedCallable; private final UnaryCallable updateParticipantCallable; private final UnaryCallable analyzeContentCallable; + private final BidiStreamingCallable< + StreamingAnalyzeContentRequest, StreamingAnalyzeContentResponse> + streamingAnalyzeContentCallable; private final UnaryCallable suggestArticlesCallable; private final UnaryCallable @@ -284,6 +304,12 @@ protected GrpcParticipantsStub( return params.build(); }) .build(); + GrpcCallSettings + streamingAnalyzeContentTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(streamingAnalyzeContentMethodDescriptor) + .build(); GrpcCallSettings suggestArticlesTransportSettings = GrpcCallSettings.newBuilder() @@ -362,6 +388,11 @@ protected GrpcParticipantsStub( this.analyzeContentCallable = callableFactory.createUnaryCallable( analyzeContentTransportSettings, settings.analyzeContentSettings(), clientContext); + this.streamingAnalyzeContentCallable = + callableFactory.createBidiStreamingCallable( + streamingAnalyzeContentTransportSettings, + settings.streamingAnalyzeContentSettings(), + clientContext); this.suggestArticlesCallable = callableFactory.createUnaryCallable( suggestArticlesTransportSettings, settings.suggestArticlesSettings(), clientContext); @@ -427,6 +458,12 @@ public UnaryCallable analyzeConte return analyzeContentCallable; } + @Override + public BidiStreamingCallable + streamingAnalyzeContentCallable() { + return streamingAnalyzeContentCallable; + } + @Override public UnaryCallable suggestArticlesCallable() { return suggestArticlesCallable; diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/ParticipantsStub.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/ParticipantsStub.java index 060846efb..87ea2727c 100644 --- a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/ParticipantsStub.java +++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/ParticipantsStub.java @@ -21,6 +21,7 @@ import com.google.api.core.BetaApi; import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.BidiStreamingCallable; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.v2beta1.AnalyzeContentRequest; import com.google.cloud.dialogflow.v2beta1.AnalyzeContentResponse; @@ -33,6 +34,8 @@ import com.google.cloud.dialogflow.v2beta1.ListSuggestionsRequest; import com.google.cloud.dialogflow.v2beta1.ListSuggestionsResponse; import com.google.cloud.dialogflow.v2beta1.Participant; +import com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest; +import com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse; import com.google.cloud.dialogflow.v2beta1.SuggestArticlesRequest; import com.google.cloud.dialogflow.v2beta1.SuggestArticlesResponse; import com.google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest; @@ -78,6 +81,11 @@ public UnaryCallable analyzeConte throw new UnsupportedOperationException("Not implemented: analyzeContentCallable()"); } + public BidiStreamingCallable + streamingAnalyzeContentCallable() { + throw new UnsupportedOperationException("Not implemented: streamingAnalyzeContentCallable()"); + } + public UnaryCallable suggestArticlesCallable() { throw new UnsupportedOperationException("Not implemented: suggestArticlesCallable()"); } diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/ParticipantsStubSettings.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/ParticipantsStubSettings.java index 9584c09c0..5a0e7b1ae 100644 --- a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/ParticipantsStubSettings.java +++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/ParticipantsStubSettings.java @@ -37,6 +37,7 @@ import com.google.api.gax.rpc.PagedListDescriptor; import com.google.api.gax.rpc.PagedListResponseFactory; import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StreamingCallSettings; import com.google.api.gax.rpc.StubSettings; import com.google.api.gax.rpc.TransportChannelProvider; import com.google.api.gax.rpc.UnaryCallSettings; @@ -52,6 +53,8 @@ import com.google.cloud.dialogflow.v2beta1.ListSuggestionsRequest; import com.google.cloud.dialogflow.v2beta1.ListSuggestionsResponse; import com.google.cloud.dialogflow.v2beta1.Participant; +import com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest; +import com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse; import com.google.cloud.dialogflow.v2beta1.SuggestArticlesRequest; import com.google.cloud.dialogflow.v2beta1.SuggestArticlesResponse; import com.google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest; @@ -121,6 +124,9 @@ public class ParticipantsStubSettings extends StubSettings updateParticipantSettings; private final UnaryCallSettings analyzeContentSettings; + private final StreamingCallSettings< + StreamingAnalyzeContentRequest, StreamingAnalyzeContentResponse> + streamingAnalyzeContentSettings; private final UnaryCallSettings suggestArticlesSettings; private final UnaryCallSettings @@ -275,6 +281,12 @@ public UnaryCallSettings analyzeC return analyzeContentSettings; } + /** Returns the object with the settings used for calls to streamingAnalyzeContent. */ + public StreamingCallSettings + streamingAnalyzeContentSettings() { + return streamingAnalyzeContentSettings; + } + /** Returns the object with the settings used for calls to suggestArticles. */ public UnaryCallSettings suggestArticlesSettings() { @@ -397,6 +409,7 @@ protected ParticipantsStubSettings(Builder settingsBuilder) throws IOException { listParticipantsSettings = settingsBuilder.listParticipantsSettings().build(); updateParticipantSettings = settingsBuilder.updateParticipantSettings().build(); analyzeContentSettings = settingsBuilder.analyzeContentSettings().build(); + streamingAnalyzeContentSettings = settingsBuilder.streamingAnalyzeContentSettings().build(); suggestArticlesSettings = settingsBuilder.suggestArticlesSettings().build(); suggestFaqAnswersSettings = settingsBuilder.suggestFaqAnswersSettings().build(); suggestSmartRepliesSettings = settingsBuilder.suggestSmartRepliesSettings().build(); @@ -418,6 +431,9 @@ public static class Builder extends StubSettings.Builder analyzeContentSettings; + private final StreamingCallSettings.Builder< + StreamingAnalyzeContentRequest, StreamingAnalyzeContentResponse> + streamingAnalyzeContentSettings; private final UnaryCallSettings.Builder suggestArticlesSettings; private final UnaryCallSettings.Builder @@ -441,6 +457,8 @@ public static class Builder extends StubSettings.BuildernewArrayList(StatusCode.Code.UNAVAILABLE))); + definitions.put( + "no_retry_3_codes", ImmutableSet.copyOf(Lists.newArrayList())); RETRYABLE_CODE_DEFINITIONS = definitions.build(); } @@ -471,6 +489,14 @@ public static class Builder extends StubSettings.Builder getParticip return analyzeContentSettings; } + /** Returns the builder for the settings used for calls to streamingAnalyzeContent. */ + public StreamingCallSettings.Builder< + StreamingAnalyzeContentRequest, StreamingAnalyzeContentResponse> + streamingAnalyzeContentSettings() { + return streamingAnalyzeContentSettings; + } + /** Returns the builder for the settings used for calls to suggestArticles. */ public UnaryCallSettings.Builder suggestArticlesSettings() { diff --git a/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/MockParticipantsImpl.java b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/MockParticipantsImpl.java index ae9472156..05fd36b40 100644 --- a/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/MockParticipantsImpl.java +++ b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/MockParticipantsImpl.java @@ -163,6 +163,43 @@ public void analyzeContent( } } + @Override + public StreamObserver streamingAnalyzeContent( + final StreamObserver responseObserver) { + StreamObserver requestObserver = + new StreamObserver() { + @Override + public void onNext(StreamingAnalyzeContentRequest value) { + requests.add(value); + final Object response = responses.remove(); + if (response instanceof StreamingAnalyzeContentResponse) { + responseObserver.onNext(((StreamingAnalyzeContentResponse) response)); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method StreamingAnalyzeContent, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + StreamingAnalyzeContentResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void onError(Throwable t) { + responseObserver.onError(t); + } + + @Override + public void onCompleted() { + responseObserver.onCompleted(); + } + }; + return requestObserver; + } + @Override public void suggestArticles( SuggestArticlesRequest request, StreamObserver responseObserver) { diff --git a/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/ParticipantsClientTest.java b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/ParticipantsClientTest.java index 88560391d..45fdbba0c 100644 --- a/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/ParticipantsClientTest.java +++ b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/ParticipantsClientTest.java @@ -24,11 +24,16 @@ import com.google.api.gax.grpc.testing.LocalChannelProvider; import com.google.api.gax.grpc.testing.MockGrpcService; import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.grpc.testing.MockStreamObserver; import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiStreamObserver; +import com.google.api.gax.rpc.BidiStreamingCallable; import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; import com.google.common.collect.Lists; import com.google.protobuf.AbstractMessage; import com.google.protobuf.FieldMask; +import com.google.protobuf.Struct; import io.grpc.StatusRuntimeException; import java.io.IOException; import java.util.ArrayList; @@ -36,6 +41,7 @@ import java.util.HashMap; import java.util.List; import java.util.UUID; +import java.util.concurrent.ExecutionException; import javax.annotation.Generated; import org.junit.After; import org.junit.AfterClass; @@ -598,6 +604,86 @@ public void analyzeContentExceptionTest4() throws Exception { } } + @Test + public void streamingAnalyzeContentTest() throws Exception { + StreamingAnalyzeContentResponse expectedResponse = + StreamingAnalyzeContentResponse.newBuilder() + .setRecognitionResult(StreamingRecognitionResult.newBuilder().build()) + .setReplyText("replyText-433699017") + .setReplyAudio(OutputAudio.newBuilder().build()) + .setAutomatedAgentReply(AutomatedAgentReply.newBuilder().build()) + .setMessage(Message.newBuilder().build()) + .addAllHumanAgentSuggestionResults(new ArrayList()) + .addAllEndUserSuggestionResults(new ArrayList()) + .setDtmfParameters(DtmfParameters.newBuilder().build()) + .build(); + mockParticipants.addResponse(expectedResponse); + StreamingAnalyzeContentRequest request = + StreamingAnalyzeContentRequest.newBuilder() + .setParticipant( + ParticipantName.ofProjectConversationParticipantName( + "[PROJECT]", "[CONVERSATION]", "[PARTICIPANT]") + .toString()) + .setReplyAudioConfig(OutputAudioConfig.newBuilder().build()) + .setQueryParams(QueryParameters.newBuilder().build()) + .setAssistQueryParams(AssistQueryParameters.newBuilder().build()) + .setCxParameters(Struct.newBuilder().build()) + .setEnablePartialAutomatedAgentReply(true) + .build(); + + MockStreamObserver responseObserver = + new MockStreamObserver<>(); + + BidiStreamingCallable + callable = client.streamingAnalyzeContentCallable(); + ApiStreamObserver requestObserver = + callable.bidiStreamingCall(responseObserver); + + requestObserver.onNext(request); + requestObserver.onCompleted(); + + List actualResponses = responseObserver.future().get(); + Assert.assertEquals(1, actualResponses.size()); + Assert.assertEquals(expectedResponse, actualResponses.get(0)); + } + + @Test + public void streamingAnalyzeContentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockParticipants.addException(exception); + StreamingAnalyzeContentRequest request = + StreamingAnalyzeContentRequest.newBuilder() + .setParticipant( + ParticipantName.ofProjectConversationParticipantName( + "[PROJECT]", "[CONVERSATION]", "[PARTICIPANT]") + .toString()) + .setReplyAudioConfig(OutputAudioConfig.newBuilder().build()) + .setQueryParams(QueryParameters.newBuilder().build()) + .setAssistQueryParams(AssistQueryParameters.newBuilder().build()) + .setCxParameters(Struct.newBuilder().build()) + .setEnablePartialAutomatedAgentReply(true) + .build(); + + MockStreamObserver responseObserver = + new MockStreamObserver<>(); + + BidiStreamingCallable + callable = client.streamingAnalyzeContentCallable(); + ApiStreamObserver requestObserver = + callable.bidiStreamingCall(responseObserver); + + requestObserver.onNext(request); + + try { + List actualResponses = responseObserver.future().get(); + Assert.fail("No exception thrown"); + } catch (ExecutionException e) { + Assert.assertTrue(e.getCause() instanceof InvalidArgumentException); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + @Test public void suggestArticlesTest() throws Exception { SuggestArticlesResponse expectedResponse = diff --git a/grpc-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ParticipantsGrpc.java b/grpc-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ParticipantsGrpc.java index b85b3bb9a..66005f5dd 100644 --- a/grpc-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ParticipantsGrpc.java +++ b/grpc-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ParticipantsGrpc.java @@ -267,6 +267,56 @@ private ParticipantsGrpc() {} return getAnalyzeContentMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest, + com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse> + getStreamingAnalyzeContentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "StreamingAnalyzeContent", + requestType = com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.class, + responseType = com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest, + com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse> + getStreamingAnalyzeContentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest, + com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse> + getStreamingAnalyzeContentMethod; + if ((getStreamingAnalyzeContentMethod = ParticipantsGrpc.getStreamingAnalyzeContentMethod) + == null) { + synchronized (ParticipantsGrpc.class) { + if ((getStreamingAnalyzeContentMethod = ParticipantsGrpc.getStreamingAnalyzeContentMethod) + == null) { + ParticipantsGrpc.getStreamingAnalyzeContentMethod = + getStreamingAnalyzeContentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "StreamingAnalyzeContent")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new ParticipantsMethodDescriptorSupplier("StreamingAnalyzeContent")) + .build(); + } + } + } + return getStreamingAnalyzeContentMethod; + } + private static volatile io.grpc.MethodDescriptor< com.google.cloud.dialogflow.v2beta1.SuggestArticlesRequest, com.google.cloud.dialogflow.v2beta1.SuggestArticlesResponse> @@ -633,6 +683,35 @@ public void analyzeContent( getAnalyzeContentMethod(), responseObserver); } + /** + * + * + *
+     * Adds a text (e.g., chat) or audio (e.g., phone recording) message from a
+     * participant into the conversation.
+     * Note: This method is only available through the gRPC API (not REST).
+     * The top-level message sent to the client by the server is
+     * `StreamingAnalyzeContentResponse`. Multiple response messages can be
+     * returned in order. The first one or more messages contain the
+     * `recognition_result` field. Each result represents a more complete
+     * transcript of what the user said. The next message contains the
+     * `reply_text` field, and potentially the `reply_audio` and/or the
+     * `automated_agent_reply` fields.
+     * Note: Always use agent versions for production traffic
+     * sent to virtual agents. See [Versions and
+     * environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).
+     * 
+ */ + public io.grpc.stub.StreamObserver< + com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest> + streamingAnalyzeContent( + io.grpc.stub.StreamObserver< + com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse> + responseObserver) { + return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall( + getStreamingAnalyzeContentMethod(), responseObserver); + } + /** * * @@ -776,6 +855,13 @@ public final io.grpc.ServerServiceDefinition bindService() { com.google.cloud.dialogflow.v2beta1.AnalyzeContentRequest, com.google.cloud.dialogflow.v2beta1.AnalyzeContentResponse>( this, METHODID_ANALYZE_CONTENT))) + .addMethod( + getStreamingAnalyzeContentMethod(), + io.grpc.stub.ServerCalls.asyncBidiStreamingCall( + new MethodHandlers< + com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest, + com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse>( + this, METHODID_STREAMING_ANALYZE_CONTENT))) .addMethod( getSuggestArticlesMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -922,6 +1008,36 @@ public void analyzeContent( responseObserver); } + /** + * + * + *
+     * Adds a text (e.g., chat) or audio (e.g., phone recording) message from a
+     * participant into the conversation.
+     * Note: This method is only available through the gRPC API (not REST).
+     * The top-level message sent to the client by the server is
+     * `StreamingAnalyzeContentResponse`. Multiple response messages can be
+     * returned in order. The first one or more messages contain the
+     * `recognition_result` field. Each result represents a more complete
+     * transcript of what the user said. The next message contains the
+     * `reply_text` field, and potentially the `reply_audio` and/or the
+     * `automated_agent_reply` fields.
+     * Note: Always use agent versions for production traffic
+     * sent to virtual agents. See [Versions and
+     * environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).
+     * 
+ */ + public io.grpc.stub.StreamObserver< + com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest> + streamingAnalyzeContent( + io.grpc.stub.StreamObserver< + com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse> + responseObserver) { + return io.grpc.stub.ClientCalls.asyncBidiStreamingCall( + getChannel().newCall(getStreamingAnalyzeContentMethod(), getCallOptions()), + responseObserver); + } + /** * * @@ -1427,6 +1543,7 @@ protected ParticipantsFutureStub build( private static final int METHODID_SUGGEST_SMART_REPLIES = 7; private static final int METHODID_LIST_SUGGESTIONS = 8; private static final int METHODID_COMPILE_SUGGESTION = 9; + private static final int METHODID_STREAMING_ANALYZE_CONTENT = 10; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -1522,6 +1639,12 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv public io.grpc.stub.StreamObserver invoke( io.grpc.stub.StreamObserver responseObserver) { switch (methodId) { + case METHODID_STREAMING_ANALYZE_CONTENT: + return (io.grpc.stub.StreamObserver) + serviceImpl.streamingAnalyzeContent( + (io.grpc.stub.StreamObserver< + com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse>) + responseObserver); default: throw new AssertionError(); } @@ -1581,6 +1704,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getListParticipantsMethod()) .addMethod(getUpdateParticipantMethod()) .addMethod(getAnalyzeContentMethod()) + .addMethod(getStreamingAnalyzeContentMethod()) .addMethod(getSuggestArticlesMethod()) .addMethod(getSuggestFaqAnswersMethod()) .addMethod(getSuggestSmartRepliesMethod()) diff --git a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/AnalyzeContentRequest.java b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/AnalyzeContentRequest.java index 45a18db3c..8e0c8b7cb 100644 --- a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/AnalyzeContentRequest.java +++ b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/AnalyzeContentRequest.java @@ -164,6 +164,21 @@ private AnalyzeContentRequest( assistQueryParams_ = subBuilder.buildPartial(); } + break; + } + case 146: + { + com.google.protobuf.Struct.Builder subBuilder = null; + if (cxParameters_ != null) { + subBuilder = cxParameters_.toBuilder(); + } + cxParameters_ = + input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(cxParameters_); + cxParameters_ = subBuilder.buildPartial(); + } + break; } default: @@ -565,6 +580,64 @@ public com.google.cloud.dialogflow.v2.AssistQueryParameters getAssistQueryParams return getAssistQueryParams(); } + public static final int CX_PARAMETERS_FIELD_NUMBER = 18; + private com.google.protobuf.Struct cxParameters_; + /** + * + * + *
+   * Additional parameters to be put into Dialogflow CX session parameters. To
+   * remove a parameter from the session, clients should explicitly set the
+   * parameter value to null.
+   * Note: this field should only be used if you are connecting to a Dialogflow
+   * CX agent.
+   * 
+ * + * .google.protobuf.Struct cx_parameters = 18; + * + * @return Whether the cxParameters field is set. + */ + @java.lang.Override + public boolean hasCxParameters() { + return cxParameters_ != null; + } + /** + * + * + *
+   * Additional parameters to be put into Dialogflow CX session parameters. To
+   * remove a parameter from the session, clients should explicitly set the
+   * parameter value to null.
+   * Note: this field should only be used if you are connecting to a Dialogflow
+   * CX agent.
+   * 
+ * + * .google.protobuf.Struct cx_parameters = 18; + * + * @return The cxParameters. + */ + @java.lang.Override + public com.google.protobuf.Struct getCxParameters() { + return cxParameters_ == null ? com.google.protobuf.Struct.getDefaultInstance() : cxParameters_; + } + /** + * + * + *
+   * Additional parameters to be put into Dialogflow CX session parameters. To
+   * remove a parameter from the session, clients should explicitly set the
+   * parameter value to null.
+   * Note: this field should only be used if you are connecting to a Dialogflow
+   * CX agent.
+   * 
+ * + * .google.protobuf.Struct cx_parameters = 18; + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getCxParametersOrBuilder() { + return getCxParameters(); + } + public static final int REQUEST_ID_FIELD_NUMBER = 11; private volatile java.lang.Object requestId_; /** @@ -653,6 +726,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (assistQueryParams_ != null) { output.writeMessage(14, getAssistQueryParams()); } + if (cxParameters_ != null) { + output.writeMessage(18, getCxParameters()); + } unknownFields.writeTo(output); } @@ -687,6 +763,9 @@ public int getSerializedSize() { if (assistQueryParams_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getAssistQueryParams()); } + if (cxParameters_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(18, getCxParameters()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -716,6 +795,10 @@ public boolean equals(final java.lang.Object obj) { if (hasAssistQueryParams()) { if (!getAssistQueryParams().equals(other.getAssistQueryParams())) return false; } + if (hasCxParameters() != other.hasCxParameters()) return false; + if (hasCxParameters()) { + if (!getCxParameters().equals(other.getCxParameters())) return false; + } if (!getRequestId().equals(other.getRequestId())) return false; if (!getInputCase().equals(other.getInputCase())) return false; switch (inputCase_) { @@ -753,6 +836,10 @@ public int hashCode() { hash = (37 * hash) + ASSIST_QUERY_PARAMS_FIELD_NUMBER; hash = (53 * hash) + getAssistQueryParams().hashCode(); } + if (hasCxParameters()) { + hash = (37 * hash) + CX_PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getCxParameters().hashCode(); + } hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); switch (inputCase_) { @@ -932,6 +1019,12 @@ public Builder clear() { assistQueryParams_ = null; assistQueryParamsBuilder_ = null; } + if (cxParametersBuilder_ == null) { + cxParameters_ = null; + } else { + cxParameters_ = null; + cxParametersBuilder_ = null; + } requestId_ = ""; inputCase_ = 0; @@ -993,6 +1086,11 @@ public com.google.cloud.dialogflow.v2.AnalyzeContentRequest buildPartial() { } else { result.assistQueryParams_ = assistQueryParamsBuilder_.build(); } + if (cxParametersBuilder_ == null) { + result.cxParameters_ = cxParameters_; + } else { + result.cxParameters_ = cxParametersBuilder_.build(); + } result.requestId_ = requestId_; result.inputCase_ = inputCase_; onBuilt(); @@ -1058,6 +1156,9 @@ public Builder mergeFrom(com.google.cloud.dialogflow.v2.AnalyzeContentRequest ot if (other.hasAssistQueryParams()) { mergeAssistQueryParams(other.getAssistQueryParams()); } + if (other.hasCxParameters()) { + mergeCxParameters(other.getCxParameters()); + } if (!other.getRequestId().isEmpty()) { requestId_ = other.requestId_; onChanged(); @@ -2266,6 +2367,225 @@ public Builder clearAssistQueryParams() { return assistQueryParamsBuilder_; } + private com.google.protobuf.Struct cxParameters_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + cxParametersBuilder_; + /** + * + * + *
+     * Additional parameters to be put into Dialogflow CX session parameters. To
+     * remove a parameter from the session, clients should explicitly set the
+     * parameter value to null.
+     * Note: this field should only be used if you are connecting to a Dialogflow
+     * CX agent.
+     * 
+ * + * .google.protobuf.Struct cx_parameters = 18; + * + * @return Whether the cxParameters field is set. + */ + public boolean hasCxParameters() { + return cxParametersBuilder_ != null || cxParameters_ != null; + } + /** + * + * + *
+     * Additional parameters to be put into Dialogflow CX session parameters. To
+     * remove a parameter from the session, clients should explicitly set the
+     * parameter value to null.
+     * Note: this field should only be used if you are connecting to a Dialogflow
+     * CX agent.
+     * 
+ * + * .google.protobuf.Struct cx_parameters = 18; + * + * @return The cxParameters. + */ + public com.google.protobuf.Struct getCxParameters() { + if (cxParametersBuilder_ == null) { + return cxParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : cxParameters_; + } else { + return cxParametersBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Additional parameters to be put into Dialogflow CX session parameters. To
+     * remove a parameter from the session, clients should explicitly set the
+     * parameter value to null.
+     * Note: this field should only be used if you are connecting to a Dialogflow
+     * CX agent.
+     * 
+ * + * .google.protobuf.Struct cx_parameters = 18; + */ + public Builder setCxParameters(com.google.protobuf.Struct value) { + if (cxParametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cxParameters_ = value; + onChanged(); + } else { + cxParametersBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Additional parameters to be put into Dialogflow CX session parameters. To
+     * remove a parameter from the session, clients should explicitly set the
+     * parameter value to null.
+     * Note: this field should only be used if you are connecting to a Dialogflow
+     * CX agent.
+     * 
+ * + * .google.protobuf.Struct cx_parameters = 18; + */ + public Builder setCxParameters(com.google.protobuf.Struct.Builder builderForValue) { + if (cxParametersBuilder_ == null) { + cxParameters_ = builderForValue.build(); + onChanged(); + } else { + cxParametersBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Additional parameters to be put into Dialogflow CX session parameters. To
+     * remove a parameter from the session, clients should explicitly set the
+     * parameter value to null.
+     * Note: this field should only be used if you are connecting to a Dialogflow
+     * CX agent.
+     * 
+ * + * .google.protobuf.Struct cx_parameters = 18; + */ + public Builder mergeCxParameters(com.google.protobuf.Struct value) { + if (cxParametersBuilder_ == null) { + if (cxParameters_ != null) { + cxParameters_ = + com.google.protobuf.Struct.newBuilder(cxParameters_).mergeFrom(value).buildPartial(); + } else { + cxParameters_ = value; + } + onChanged(); + } else { + cxParametersBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Additional parameters to be put into Dialogflow CX session parameters. To
+     * remove a parameter from the session, clients should explicitly set the
+     * parameter value to null.
+     * Note: this field should only be used if you are connecting to a Dialogflow
+     * CX agent.
+     * 
+ * + * .google.protobuf.Struct cx_parameters = 18; + */ + public Builder clearCxParameters() { + if (cxParametersBuilder_ == null) { + cxParameters_ = null; + onChanged(); + } else { + cxParameters_ = null; + cxParametersBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Additional parameters to be put into Dialogflow CX session parameters. To
+     * remove a parameter from the session, clients should explicitly set the
+     * parameter value to null.
+     * Note: this field should only be used if you are connecting to a Dialogflow
+     * CX agent.
+     * 
+ * + * .google.protobuf.Struct cx_parameters = 18; + */ + public com.google.protobuf.Struct.Builder getCxParametersBuilder() { + + onChanged(); + return getCxParametersFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Additional parameters to be put into Dialogflow CX session parameters. To
+     * remove a parameter from the session, clients should explicitly set the
+     * parameter value to null.
+     * Note: this field should only be used if you are connecting to a Dialogflow
+     * CX agent.
+     * 
+ * + * .google.protobuf.Struct cx_parameters = 18; + */ + public com.google.protobuf.StructOrBuilder getCxParametersOrBuilder() { + if (cxParametersBuilder_ != null) { + return cxParametersBuilder_.getMessageOrBuilder(); + } else { + return cxParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : cxParameters_; + } + } + /** + * + * + *
+     * Additional parameters to be put into Dialogflow CX session parameters. To
+     * remove a parameter from the session, clients should explicitly set the
+     * parameter value to null.
+     * Note: this field should only be used if you are connecting to a Dialogflow
+     * CX agent.
+     * 
+ * + * .google.protobuf.Struct cx_parameters = 18; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + getCxParametersFieldBuilder() { + if (cxParametersBuilder_ == null) { + cxParametersBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + getCxParameters(), getParentForChildren(), isClean()); + cxParameters_ = null; + } + return cxParametersBuilder_; + } + private java.lang.Object requestId_ = ""; /** * diff --git a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/AnalyzeContentRequestOrBuilder.java b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/AnalyzeContentRequestOrBuilder.java index 4054b595e..c28fe0e3b 100644 --- a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/AnalyzeContentRequestOrBuilder.java +++ b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/AnalyzeContentRequestOrBuilder.java @@ -243,6 +243,53 @@ public interface AnalyzeContentRequestOrBuilder */ com.google.cloud.dialogflow.v2.AssistQueryParametersOrBuilder getAssistQueryParamsOrBuilder(); + /** + * + * + *
+   * Additional parameters to be put into Dialogflow CX session parameters. To
+   * remove a parameter from the session, clients should explicitly set the
+   * parameter value to null.
+   * Note: this field should only be used if you are connecting to a Dialogflow
+   * CX agent.
+   * 
+ * + * .google.protobuf.Struct cx_parameters = 18; + * + * @return Whether the cxParameters field is set. + */ + boolean hasCxParameters(); + /** + * + * + *
+   * Additional parameters to be put into Dialogflow CX session parameters. To
+   * remove a parameter from the session, clients should explicitly set the
+   * parameter value to null.
+   * Note: this field should only be used if you are connecting to a Dialogflow
+   * CX agent.
+   * 
+ * + * .google.protobuf.Struct cx_parameters = 18; + * + * @return The cxParameters. + */ + com.google.protobuf.Struct getCxParameters(); + /** + * + * + *
+   * Additional parameters to be put into Dialogflow CX session parameters. To
+   * remove a parameter from the session, clients should explicitly set the
+   * parameter value to null.
+   * Note: this field should only be used if you are connecting to a Dialogflow
+   * CX agent.
+   * 
+ * + * .google.protobuf.Struct cx_parameters = 18; + */ + com.google.protobuf.StructOrBuilder getCxParametersOrBuilder(); + /** * * diff --git a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/Fulfillment.java b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/Fulfillment.java index 8b0efc8f7..a08c41665 100644 --- a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/Fulfillment.java +++ b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/Fulfillment.java @@ -339,7 +339,7 @@ java.lang.String getRequestHeadersOrDefault( * * * @deprecated google.cloud.dialogflow.v2.Fulfillment.GenericWebService.is_cloud_function is - * deprecated. See google/cloud/dialogflow/v2/fulfillment.proto;l=106 + * deprecated. See google/cloud/dialogflow/v2/fulfillment.proto;l=108 * @return The isCloudFunction. */ @java.lang.Deprecated @@ -770,7 +770,7 @@ public java.lang.String getRequestHeadersOrThrow(java.lang.String key) { * * * @deprecated google.cloud.dialogflow.v2.Fulfillment.GenericWebService.is_cloud_function is - * deprecated. See google/cloud/dialogflow/v2/fulfillment.proto;l=106 + * deprecated. See google/cloud/dialogflow/v2/fulfillment.proto;l=108 * @return The isCloudFunction. */ @java.lang.Override @@ -1719,7 +1719,7 @@ public Builder putAllRequestHeaders( * * * @deprecated google.cloud.dialogflow.v2.Fulfillment.GenericWebService.is_cloud_function is - * deprecated. See google/cloud/dialogflow/v2/fulfillment.proto;l=106 + * deprecated. See google/cloud/dialogflow/v2/fulfillment.proto;l=108 * @return The isCloudFunction. */ @java.lang.Override @@ -1742,7 +1742,7 @@ public boolean getIsCloudFunction() { * * * @deprecated google.cloud.dialogflow.v2.Fulfillment.GenericWebService.is_cloud_function is - * deprecated. See google/cloud/dialogflow/v2/fulfillment.proto;l=106 + * deprecated. See google/cloud/dialogflow/v2/fulfillment.proto;l=108 * @param value The isCloudFunction to set. * @return This builder for chaining. */ @@ -1768,7 +1768,7 @@ public Builder setIsCloudFunction(boolean value) { * * * @deprecated google.cloud.dialogflow.v2.Fulfillment.GenericWebService.is_cloud_function is - * deprecated. See google/cloud/dialogflow/v2/fulfillment.proto;l=106 + * deprecated. See google/cloud/dialogflow/v2/fulfillment.proto;l=108 * @return This builder for chaining. */ @java.lang.Deprecated diff --git a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ParticipantProto.java b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ParticipantProto.java index 865c662f5..1159b14d8 100644 --- a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ParticipantProto.java +++ b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ParticipantProto.java @@ -210,7 +210,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "est\022A\n\013participant\030\001 \001(\0132\'.google.cloud." + "dialogflow.v2.ParticipantB\003\340A\002\0224\n\013update" + "_mask\030\002 \001(\0132\032.google.protobuf.FieldMaskB" - + "\003\340A\002\"\322\003\n\025AnalyzeContentRequest\022B\n\013partic" + + "\003\340A\002\"\202\004\n\025AnalyzeContentRequest\022B\n\013partic" + "ipant\030\001 \001(\tB-\340A\002\372A\'\n%dialogflow.googleap" + "is.com/Participant\022;\n\ntext_input\030\006 \001(\0132%" + ".google.cloud.dialogflow.v2.TextInputH\000\022" @@ -221,168 +221,169 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "+.google.cloud.dialogflow.v2.QueryParame" + "ters\022N\n\023assist_query_params\030\016 \001(\01321.goog" + "le.cloud.dialogflow.v2.AssistQueryParame" - + "ters\022\022\n\nrequest_id\030\013 \001(\tB\007\n\005input\",\n\016Dtm" - + "fParameters\022\032\n\022accepts_dtmf_input\030\001 \001(\010\"" - + "\336\003\n\026AnalyzeContentResponse\022\022\n\nreply_text" - + "\030\001 \001(\t\022<\n\013reply_audio\030\002 \001(\0132\'.google.clo" - + "ud.dialogflow.v2.OutputAudio\022N\n\025automate" - + "d_agent_reply\030\003 \001(\0132/.google.cloud.dialo" - + "gflow.v2.AutomatedAgentReply\0224\n\007message\030" - + "\005 \001(\0132#.google.cloud.dialogflow.v2.Messa" - + "ge\022T\n\036human_agent_suggestion_results\030\006 \003" - + "(\0132,.google.cloud.dialogflow.v2.Suggesti" - + "onResult\022Q\n\033end_user_suggestion_results\030" - + "\007 \003(\0132,.google.cloud.dialogflow.v2.Sugge" - + "stionResult\022C\n\017dtmf_parameters\030\t \001(\0132*.g" - + "oogle.cloud.dialogflow.v2.DtmfParameters" - + "\"\205\002\n\026SuggestArticlesRequest\022=\n\006parent\030\001 " - + "\001(\tB-\340A\002\372A\'\n%dialogflow.googleapis.com/P" - + "articipant\022A\n\016latest_message\030\002 \001(\tB)\340A\001\372" - + "A#\n!dialogflow.googleapis.com/Message\022\031\n" - + "\014context_size\030\003 \001(\005B\003\340A\001\022N\n\023assist_query" - + "_params\030\004 \001(\01321.google.cloud.dialogflow." - + "v2.AssistQueryParameters\"\213\001\n\027SuggestArti" - + "clesResponse\022B\n\017article_answers\030\001 \003(\0132)." - + "google.cloud.dialogflow.v2.ArticleAnswer" - + "\022\026\n\016latest_message\030\002 \001(\t\022\024\n\014context_size" - + "\030\003 \001(\005\"\207\002\n\030SuggestFaqAnswersRequest\022=\n\006p" + + "ters\022.\n\rcx_parameters\030\022 \001(\0132\027.google.pro" + + "tobuf.Struct\022\022\n\nrequest_id\030\013 \001(\tB\007\n\005inpu" + + "t\",\n\016DtmfParameters\022\032\n\022accepts_dtmf_inpu" + + "t\030\001 \001(\010\"\336\003\n\026AnalyzeContentResponse\022\022\n\nre" + + "ply_text\030\001 \001(\t\022<\n\013reply_audio\030\002 \001(\0132\'.go" + + "ogle.cloud.dialogflow.v2.OutputAudio\022N\n\025" + + "automated_agent_reply\030\003 \001(\0132/.google.clo" + + "ud.dialogflow.v2.AutomatedAgentReply\0224\n\007" + + "message\030\005 \001(\0132#.google.cloud.dialogflow." + + "v2.Message\022T\n\036human_agent_suggestion_res" + + "ults\030\006 \003(\0132,.google.cloud.dialogflow.v2." + + "SuggestionResult\022Q\n\033end_user_suggestion_" + + "results\030\007 \003(\0132,.google.cloud.dialogflow." + + "v2.SuggestionResult\022C\n\017dtmf_parameters\030\t" + + " \001(\0132*.google.cloud.dialogflow.v2.DtmfPa" + + "rameters\"\205\002\n\026SuggestArticlesRequest\022=\n\006p" + "arent\030\001 \001(\tB-\340A\002\372A\'\n%dialogflow.googleap" + "is.com/Participant\022A\n\016latest_message\030\002 \001" + "(\tB)\340A\001\372A#\n!dialogflow.googleapis.com/Me" + "ssage\022\031\n\014context_size\030\003 \001(\005B\003\340A\001\022N\n\023assi" + "st_query_params\030\004 \001(\01321.google.cloud.dia" - + "logflow.v2.AssistQueryParameters\"\205\001\n\031Sug" - + "gestFaqAnswersResponse\022:\n\013faq_answers\030\001 " - + "\003(\0132%.google.cloud.dialogflow.v2.FaqAnsw" - + "er\022\026\n\016latest_message\030\002 \001(\t\022\024\n\014context_si" - + "ze\030\003 \001(\005\"\364\001\n\032SuggestSmartRepliesRequest\022" - + "=\n\006parent\030\001 \001(\tB-\340A\002\372A\'\n%dialogflow.goog" - + "leapis.com/Participant\022A\n\022current_text_i" - + "nput\030\004 \001(\0132%.google.cloud.dialogflow.v2." - + "TextInput\022>\n\016latest_message\030\002 \001(\tB&\372A#\n!" - + "dialogflow.googleapis.com/Message\022\024\n\014con" - + "text_size\030\003 \001(\005\"\303\001\n\033SuggestSmartRepliesR" - + "esponse\022N\n\023smart_reply_answers\030\001 \003(\0132,.g" - + "oogle.cloud.dialogflow.v2.SmartReplyAnsw" - + "erB\003\340A\003\022>\n\016latest_message\030\002 \001(\tB&\372A#\n!di" - + "alogflow.googleapis.com/Message\022\024\n\014conte" - + "xt_size\030\003 \001(\005\"[\n\013OutputAudio\022=\n\006config\030\001" - + " \001(\0132-.google.cloud.dialogflow.v2.Output" - + "AudioConfig\022\r\n\005audio\030\002 \001(\014\"\317\002\n\023Automated" - + "AgentReply\022P\n\026detect_intent_response\030\001 \001" - + "(\01320.google.cloud.dialogflow.v2.DetectIn" - + "tentResponse\022k\n\032automated_agent_reply_ty" - + "pe\030\007 \001(\0162G.google.cloud.dialogflow.v2.Au" - + "tomatedAgentReply.AutomatedAgentReplyTyp" - + "e\022\032\n\022allow_cancellation\030\010 \001(\010\"]\n\027Automat" - + "edAgentReplyType\022*\n&AUTOMATED_AGENT_REPL" - + "Y_TYPE_UNSPECIFIED\020\000\022\013\n\007PARTIAL\020\001\022\t\n\005FIN" - + "AL\020\002\"\344\001\n\rArticleAnswer\022\r\n\005title\030\001 \001(\t\022\013\n" - + "\003uri\030\002 \001(\t\022\020\n\010snippets\030\003 \003(\t\022\022\n\nconfiden" - + "ce\030\004 \001(\002\022I\n\010metadata\030\005 \003(\01327.google.clou" - + "d.dialogflow.v2.ArticleAnswer.MetadataEn" - + "try\022\025\n\ranswer_record\030\006 \001(\t\032/\n\rMetadataEn" - + "try\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\340\001\n\t" - + "FaqAnswer\022\016\n\006answer\030\001 \001(\t\022\022\n\nconfidence\030" - + "\002 \001(\002\022\020\n\010question\030\003 \001(\t\022\016\n\006source\030\004 \001(\t\022" - + "E\n\010metadata\030\005 \003(\01323.google.cloud.dialogf" - + "low.v2.FaqAnswer.MetadataEntry\022\025\n\ranswer" - + "_record\030\006 \001(\t\032/\n\rMetadataEntry\022\013\n\003key\030\001 " - + "\001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"y\n\020SmartReplyAnsw" - + "er\022\r\n\005reply\030\001 \001(\t\022\022\n\nconfidence\030\002 \001(\002\022B\n" - + "\ranswer_record\030\003 \001(\tB+\372A(\n&dialogflow.go" - + "ogleapis.com/AnswerRecord\"\352\002\n\020Suggestion" - + "Result\022#\n\005error\030\001 \001(\0132\022.google.rpc.Statu" - + "sH\000\022X\n\031suggest_articles_response\030\002 \001(\01323" - + ".google.cloud.dialogflow.v2.SuggestArtic" - + "lesResponseH\000\022]\n\034suggest_faq_answers_res" - + "ponse\030\003 \001(\01325.google.cloud.dialogflow.v2" - + ".SuggestFaqAnswersResponseH\000\022a\n\036suggest_" - + "smart_replies_response\030\004 \001(\01327.google.cl" - + "oud.dialogflow.v2.SuggestSmartRepliesRes" - + "ponseH\000B\025\n\023suggestion_response\"j\n\024Annota" - + "tedMessagePart\022\014\n\004text\030\001 \001(\t\022\023\n\013entity_t" - + "ype\030\002 \001(\t\022/\n\017formatted_value\030\003 \001(\0132\026.goo" - + "gle.protobuf.Value\"n\n\021MessageAnnotation\022" - + "?\n\005parts\030\001 \003(\01320.google.cloud.dialogflow" - + ".v2.AnnotatedMessagePart\022\030\n\020contain_enti" - + "ties\030\002 \001(\010\"\315\001\n\025AssistQueryParameters\022s\n\032" - + "documents_metadata_filters\030\001 \003(\0132O.googl" - + "e.cloud.dialogflow.v2.AssistQueryParamet" - + "ers.DocumentsMetadataFiltersEntry\032?\n\035Doc" - + "umentsMetadataFiltersEntry\022\013\n\003key\030\001 \001(\t\022" - + "\r\n\005value\030\002 \001(\t:\0028\0012\337\024\n\014Participants\022\245\002\n\021" - + "CreateParticipant\0224.google.cloud.dialogf" - + "low.v2.CreateParticipantRequest\032\'.google" - + ".cloud.dialogflow.v2.Participant\"\260\001\202\323\344\223\002" - + "\224\001\"4/v2/{parent=projects/*/conversations" - + "/*}/participants:\013participantZO\"@/v2/{pa" - + "rent=projects/*/locations/*/conversation" - + "s/*}/participants:\013participant\332A\022parent," - + "participant\022\366\001\n\016GetParticipant\0221.google." - + "cloud.dialogflow.v2.GetParticipantReques" - + "t\032\'.google.cloud.dialogflow.v2.Participa" - + "nt\"\207\001\202\323\344\223\002z\0224/v2/{name=projects/*/conver" - + "sations/*/participants/*}ZB\022@/v2/{name=p" - + "rojects/*/locations/*/conversations/*/pa" - + "rticipants/*}\332A\004name\022\211\002\n\020ListParticipant" - + "s\0223.google.cloud.dialogflow.v2.ListParti" - + "cipantsRequest\0324.google.cloud.dialogflow" - + ".v2.ListParticipantsResponse\"\211\001\202\323\344\223\002z\0224/" - + "v2/{parent=projects/*/conversations/*}/p" - + "articipantsZB\022@/v2/{parent=projects/*/lo" - + "cations/*/conversations/*}/participants\332" - + "A\006parent\022\302\002\n\021UpdateParticipant\0224.google." - + "cloud.dialogflow.v2.UpdateParticipantReq" - + "uest\032\'.google.cloud.dialogflow.v2.Partic" - + "ipant\"\315\001\202\323\344\223\002\254\0012@/v2/{participant.name=p" - + "rojects/*/conversations/*/participants/*" - + "}:\013participantZ[2L/v2/{participant.name=" - + "projects/*/locations/*/conversations/*/p" - + "articipants/*}:\013participant\332A\027participan" - + "t,update_mask\022\340\002\n\016AnalyzeContent\0221.googl" - + "e.cloud.dialogflow.v2.AnalyzeContentRequ" - + "est\0322.google.cloud.dialogflow.v2.Analyze" - + "ContentResponse\"\346\001\202\323\344\223\002\254\001\"J/v2/{particip" - + "ant=projects/*/conversations/*/participa" - + "nts/*}:analyzeContent:\001*Z[\"V/v2/{partici" - + "pant=projects/*/locations/*/conversation" - + "s/*/participants/*}:analyzeContent:\001*\332A\026" - + "participant,text_input\332A\027participant,eve" - + "nt_input\022\311\002\n\017SuggestArticles\0222.google.cl" - + "oud.dialogflow.v2.SuggestArticlesRequest" - + "\0323.google.cloud.dialogflow.v2.SuggestArt" - + "iclesResponse\"\314\001\202\323\344\223\002\274\001\"R/v2/{parent=pro" - + "jects/*/conversations/*/participants/*}/" - + "suggestions:suggestArticles:\001*Zc\"^/v2/{p" - + "arent=projects/*/locations/*/conversatio" - + "ns/*/participants/*}/suggestions:suggest" - + "Articles:\001*\332A\006parent\022\323\002\n\021SuggestFaqAnswe" - + "rs\0224.google.cloud.dialogflow.v2.SuggestF" - + "aqAnswersRequest\0325.google.cloud.dialogfl" - + "ow.v2.SuggestFaqAnswersResponse\"\320\001\202\323\344\223\002\300" - + "\001\"T/v2/{parent=projects/*/conversations/" - + "*/participants/*}/suggestions:suggestFaq" - + "Answers:\001*Ze\"`/v2/{parent=projects/*/loc" - + "ations/*/conversations/*/participants/*}" - + "/suggestions:suggestFaqAnswers:\001*\332A\006pare" - + "nt\022\335\002\n\023SuggestSmartReplies\0226.google.clou" - + "d.dialogflow.v2.SuggestSmartRepliesReque" - + "st\0327.google.cloud.dialogflow.v2.SuggestS" - + "martRepliesResponse\"\324\001\202\323\344\223\002\304\001\"V/v2/{pare" - + "nt=projects/*/conversations/*/participan" - + "ts/*}/suggestions:suggestSmartReplies:\001*" - + "Zg\"b/v2/{parent=projects/*/locations/*/c" - + "onversations/*/participants/*}/suggestio" - + "ns:suggestSmartReplies:\001*\332A\006parent\032x\312A\031d" - + "ialogflow.googleapis.com\322AYhttps://www.g" - + "oogleapis.com/auth/cloud-platform,https:" - + "//www.googleapis.com/auth/dialogflowB\237\001\n" - + "\036com.google.cloud.dialogflow.v2B\020Partici" - + "pantProtoP\001ZDgoogle.golang.org/genproto/" - + "googleapis/cloud/dialogflow/v2;dialogflo" - + "w\370\001\001\242\002\002DF\252\002\032Google.Cloud.Dialogflow.V2b\006" - + "proto3" + + "logflow.v2.AssistQueryParameters\"\213\001\n\027Sug" + + "gestArticlesResponse\022B\n\017article_answers\030" + + "\001 \003(\0132).google.cloud.dialogflow.v2.Artic" + + "leAnswer\022\026\n\016latest_message\030\002 \001(\t\022\024\n\014cont" + + "ext_size\030\003 \001(\005\"\207\002\n\030SuggestFaqAnswersRequ" + + "est\022=\n\006parent\030\001 \001(\tB-\340A\002\372A\'\n%dialogflow." + + "googleapis.com/Participant\022A\n\016latest_mes" + + "sage\030\002 \001(\tB)\340A\001\372A#\n!dialogflow.googleapi" + + "s.com/Message\022\031\n\014context_size\030\003 \001(\005B\003\340A\001" + + "\022N\n\023assist_query_params\030\004 \001(\01321.google.c" + + "loud.dialogflow.v2.AssistQueryParameters" + + "\"\205\001\n\031SuggestFaqAnswersResponse\022:\n\013faq_an" + + "swers\030\001 \003(\0132%.google.cloud.dialogflow.v2" + + ".FaqAnswer\022\026\n\016latest_message\030\002 \001(\t\022\024\n\014co" + + "ntext_size\030\003 \001(\005\"\364\001\n\032SuggestSmartReplies" + + "Request\022=\n\006parent\030\001 \001(\tB-\340A\002\372A\'\n%dialogf" + + "low.googleapis.com/Participant\022A\n\022curren" + + "t_text_input\030\004 \001(\0132%.google.cloud.dialog" + + "flow.v2.TextInput\022>\n\016latest_message\030\002 \001(" + + "\tB&\372A#\n!dialogflow.googleapis.com/Messag" + + "e\022\024\n\014context_size\030\003 \001(\005\"\303\001\n\033SuggestSmart" + + "RepliesResponse\022N\n\023smart_reply_answers\030\001" + + " \003(\0132,.google.cloud.dialogflow.v2.SmartR" + + "eplyAnswerB\003\340A\003\022>\n\016latest_message\030\002 \001(\tB" + + "&\372A#\n!dialogflow.googleapis.com/Message\022" + + "\024\n\014context_size\030\003 \001(\005\"[\n\013OutputAudio\022=\n\006" + + "config\030\001 \001(\0132-.google.cloud.dialogflow.v" + + "2.OutputAudioConfig\022\r\n\005audio\030\002 \001(\014\"\317\002\n\023A" + + "utomatedAgentReply\022P\n\026detect_intent_resp" + + "onse\030\001 \001(\01320.google.cloud.dialogflow.v2." + + "DetectIntentResponse\022k\n\032automated_agent_" + + "reply_type\030\007 \001(\0162G.google.cloud.dialogfl" + + "ow.v2.AutomatedAgentReply.AutomatedAgent" + + "ReplyType\022\032\n\022allow_cancellation\030\010 \001(\010\"]\n" + + "\027AutomatedAgentReplyType\022*\n&AUTOMATED_AG" + + "ENT_REPLY_TYPE_UNSPECIFIED\020\000\022\013\n\007PARTIAL\020" + + "\001\022\t\n\005FINAL\020\002\"\344\001\n\rArticleAnswer\022\r\n\005title\030" + + "\001 \001(\t\022\013\n\003uri\030\002 \001(\t\022\020\n\010snippets\030\003 \003(\t\022\022\n\n" + + "confidence\030\004 \001(\002\022I\n\010metadata\030\005 \003(\01327.goo" + + "gle.cloud.dialogflow.v2.ArticleAnswer.Me" + + "tadataEntry\022\025\n\ranswer_record\030\006 \001(\t\032/\n\rMe" + + "tadataEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:" + + "\0028\001\"\340\001\n\tFaqAnswer\022\016\n\006answer\030\001 \001(\t\022\022\n\ncon" + + "fidence\030\002 \001(\002\022\020\n\010question\030\003 \001(\t\022\016\n\006sourc" + + "e\030\004 \001(\t\022E\n\010metadata\030\005 \003(\01323.google.cloud" + + ".dialogflow.v2.FaqAnswer.MetadataEntry\022\025" + + "\n\ranswer_record\030\006 \001(\t\032/\n\rMetadataEntry\022\013" + + "\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"y\n\020SmartR" + + "eplyAnswer\022\r\n\005reply\030\001 \001(\t\022\022\n\nconfidence\030" + + "\002 \001(\002\022B\n\ranswer_record\030\003 \001(\tB+\372A(\n&dialo" + + "gflow.googleapis.com/AnswerRecord\"\352\002\n\020Su" + + "ggestionResult\022#\n\005error\030\001 \001(\0132\022.google.r" + + "pc.StatusH\000\022X\n\031suggest_articles_response" + + "\030\002 \001(\01323.google.cloud.dialogflow.v2.Sugg" + + "estArticlesResponseH\000\022]\n\034suggest_faq_ans" + + "wers_response\030\003 \001(\01325.google.cloud.dialo" + + "gflow.v2.SuggestFaqAnswersResponseH\000\022a\n\036" + + "suggest_smart_replies_response\030\004 \001(\01327.g" + + "oogle.cloud.dialogflow.v2.SuggestSmartRe" + + "pliesResponseH\000B\025\n\023suggestion_response\"j" + + "\n\024AnnotatedMessagePart\022\014\n\004text\030\001 \001(\t\022\023\n\013" + + "entity_type\030\002 \001(\t\022/\n\017formatted_value\030\003 \001" + + "(\0132\026.google.protobuf.Value\"n\n\021MessageAnn" + + "otation\022?\n\005parts\030\001 \003(\01320.google.cloud.di" + + "alogflow.v2.AnnotatedMessagePart\022\030\n\020cont" + + "ain_entities\030\002 \001(\010\"\315\001\n\025AssistQueryParame" + + "ters\022s\n\032documents_metadata_filters\030\001 \003(\013" + + "2O.google.cloud.dialogflow.v2.AssistQuer" + + "yParameters.DocumentsMetadataFiltersEntr" + + "y\032?\n\035DocumentsMetadataFiltersEntry\022\013\n\003ke" + + "y\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\0012\337\024\n\014Participa" + + "nts\022\245\002\n\021CreateParticipant\0224.google.cloud" + + ".dialogflow.v2.CreateParticipantRequest\032" + + "\'.google.cloud.dialogflow.v2.Participant" + + "\"\260\001\202\323\344\223\002\224\001\"4/v2/{parent=projects/*/conve" + + "rsations/*}/participants:\013participantZO\"" + + "@/v2/{parent=projects/*/locations/*/conv" + + "ersations/*}/participants:\013participant\332A" + + "\022parent,participant\022\366\001\n\016GetParticipant\0221" + + ".google.cloud.dialogflow.v2.GetParticipa" + + "ntRequest\032\'.google.cloud.dialogflow.v2.P" + + "articipant\"\207\001\202\323\344\223\002z\0224/v2/{name=projects/" + + "*/conversations/*/participants/*}ZB\022@/v2" + + "/{name=projects/*/locations/*/conversati" + + "ons/*/participants/*}\332A\004name\022\211\002\n\020ListPar" + + "ticipants\0223.google.cloud.dialogflow.v2.L" + + "istParticipantsRequest\0324.google.cloud.di" + + "alogflow.v2.ListParticipantsResponse\"\211\001\202" + + "\323\344\223\002z\0224/v2/{parent=projects/*/conversati" + + "ons/*}/participantsZB\022@/v2/{parent=proje" + + "cts/*/locations/*/conversations/*}/parti" + + "cipants\332A\006parent\022\302\002\n\021UpdateParticipant\0224" + + ".google.cloud.dialogflow.v2.UpdatePartic" + + "ipantRequest\032\'.google.cloud.dialogflow.v" + + "2.Participant\"\315\001\202\323\344\223\002\254\0012@/v2/{participan" + + "t.name=projects/*/conversations/*/partic" + + "ipants/*}:\013participantZ[2L/v2/{participa" + + "nt.name=projects/*/locations/*/conversat" + + "ions/*/participants/*}:\013participant\332A\027pa" + + "rticipant,update_mask\022\340\002\n\016AnalyzeContent" + + "\0221.google.cloud.dialogflow.v2.AnalyzeCon" + + "tentRequest\0322.google.cloud.dialogflow.v2" + + ".AnalyzeContentResponse\"\346\001\202\323\344\223\002\254\001\"J/v2/{" + + "participant=projects/*/conversations/*/p" + + "articipants/*}:analyzeContent:\001*Z[\"V/v2/" + + "{participant=projects/*/locations/*/conv" + + "ersations/*/participants/*}:analyzeConte" + + "nt:\001*\332A\026participant,text_input\332A\027partici" + + "pant,event_input\022\311\002\n\017SuggestArticles\0222.g" + + "oogle.cloud.dialogflow.v2.SuggestArticle" + + "sRequest\0323.google.cloud.dialogflow.v2.Su" + + "ggestArticlesResponse\"\314\001\202\323\344\223\002\274\001\"R/v2/{pa" + + "rent=projects/*/conversations/*/particip" + + "ants/*}/suggestions:suggestArticles:\001*Zc" + + "\"^/v2/{parent=projects/*/locations/*/con" + + "versations/*/participants/*}/suggestions" + + ":suggestArticles:\001*\332A\006parent\022\323\002\n\021Suggest" + + "FaqAnswers\0224.google.cloud.dialogflow.v2." + + "SuggestFaqAnswersRequest\0325.google.cloud." + + "dialogflow.v2.SuggestFaqAnswersResponse\"" + + "\320\001\202\323\344\223\002\300\001\"T/v2/{parent=projects/*/conver" + + "sations/*/participants/*}/suggestions:su" + + "ggestFaqAnswers:\001*Ze\"`/v2/{parent=projec" + + "ts/*/locations/*/conversations/*/partici" + + "pants/*}/suggestions:suggestFaqAnswers:\001" + + "*\332A\006parent\022\335\002\n\023SuggestSmartReplies\0226.goo" + + "gle.cloud.dialogflow.v2.SuggestSmartRepl" + + "iesRequest\0327.google.cloud.dialogflow.v2." + + "SuggestSmartRepliesResponse\"\324\001\202\323\344\223\002\304\001\"V/" + + "v2/{parent=projects/*/conversations/*/pa" + + "rticipants/*}/suggestions:suggestSmartRe" + + "plies:\001*Zg\"b/v2/{parent=projects/*/locat" + + "ions/*/conversations/*/participants/*}/s" + + "uggestions:suggestSmartReplies:\001*\332A\006pare" + + "nt\032x\312A\031dialogflow.googleapis.com\322AYhttps" + + "://www.googleapis.com/auth/cloud-platfor" + + "m,https://www.googleapis.com/auth/dialog" + + "flowB\237\001\n\036com.google.cloud.dialogflow.v2B" + + "\020ParticipantProtoP\001ZDgoogle.golang.org/g" + + "enproto/googleapis/cloud/dialogflow/v2;d" + + "ialogflow\370\001\001\242\002\002DF\252\002\032Google.Cloud.Dialogf" + + "low.V2b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -483,6 +484,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ReplyAudioConfig", "QueryParams", "AssistQueryParams", + "CxParameters", "RequestId", "Input", }); diff --git a/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/fulfillment.proto b/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/fulfillment.proto index 5d07cec7f..b1103fe41 100644 --- a/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/fulfillment.proto +++ b/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/fulfillment.proto @@ -81,8 +81,10 @@ message Fulfillment { // Represents configuration for a generic web service. // Dialogflow supports two mechanisms for authentications: + // // - Basic authentication with username and password. // - Authentication with additional authentication headers. + // // More information could be found at: // https://cloud.google.com/dialogflow/docs/fulfillment-configure. message GenericWebService { @@ -127,6 +129,7 @@ message Fulfillment { // Required. The unique identifier of the fulfillment. // Supported formats: + // // - `projects//agent/fulfillment` // - `projects//locations//agent/fulfillment` // diff --git a/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/participant.proto b/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/participant.proto index 0f0226979..35b6106e3 100644 --- a/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/participant.proto +++ b/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/participant.proto @@ -352,6 +352,14 @@ message AnalyzeContentRequest { // Parameters for a human assist query. AssistQueryParameters assist_query_params = 14; + // Additional parameters to be put into Dialogflow CX session parameters. To + // remove a parameter from the session, clients should explicitly set the + // parameter value to null. + // + // Note: this field should only be used if you are connecting to a Dialogflow + // CX agent. + google.protobuf.Struct cx_parameters = 18; + // A unique identifier for this request. Restricted to 36 ASCII characters. // A random UUID is recommended. // This request is only idempotent if a `request_id` is provided. diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AnalyzeContentRequest.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AnalyzeContentRequest.java index 2a05c4675..fa86c21cb 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AnalyzeContentRequest.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AnalyzeContentRequest.java @@ -181,6 +181,21 @@ private AnalyzeContentRequest( assistQueryParams_ = subBuilder.buildPartial(); } + break; + } + case 146: + { + com.google.protobuf.Struct.Builder subBuilder = null; + if (cxParameters_ != null) { + subBuilder = cxParameters_.toBuilder(); + } + cxParameters_ = + input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(cxParameters_); + cxParameters_ = subBuilder.buildPartial(); + } + break; } default: @@ -583,6 +598,64 @@ public com.google.cloud.dialogflow.v2beta1.AssistQueryParameters getAssistQueryP return getAssistQueryParams(); } + public static final int CX_PARAMETERS_FIELD_NUMBER = 18; + private com.google.protobuf.Struct cxParameters_; + /** + * + * + *
+   * Additional parameters to be put into Dialogflow CX session parameters. To
+   * remove a parameter from the session, clients should explicitly set the
+   * parameter value to null.
+   * Note: this field should only be used if you are connecting to a Dialogflow
+   * CX agent.
+   * 
+ * + * .google.protobuf.Struct cx_parameters = 18; + * + * @return Whether the cxParameters field is set. + */ + @java.lang.Override + public boolean hasCxParameters() { + return cxParameters_ != null; + } + /** + * + * + *
+   * Additional parameters to be put into Dialogflow CX session parameters. To
+   * remove a parameter from the session, clients should explicitly set the
+   * parameter value to null.
+   * Note: this field should only be used if you are connecting to a Dialogflow
+   * CX agent.
+   * 
+ * + * .google.protobuf.Struct cx_parameters = 18; + * + * @return The cxParameters. + */ + @java.lang.Override + public com.google.protobuf.Struct getCxParameters() { + return cxParameters_ == null ? com.google.protobuf.Struct.getDefaultInstance() : cxParameters_; + } + /** + * + * + *
+   * Additional parameters to be put into Dialogflow CX session parameters. To
+   * remove a parameter from the session, clients should explicitly set the
+   * parameter value to null.
+   * Note: this field should only be used if you are connecting to a Dialogflow
+   * CX agent.
+   * 
+ * + * .google.protobuf.Struct cx_parameters = 18; + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getCxParametersOrBuilder() { + return getCxParameters(); + } + public static final int MESSAGE_SEND_TIME_FIELD_NUMBER = 10; private com.google.protobuf.Timestamp messageSendTime_; /** @@ -755,6 +828,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (assistQueryParams_ != null) { output.writeMessage(14, getAssistQueryParams()); } + if (cxParameters_ != null) { + output.writeMessage(18, getCxParameters()); + } unknownFields.writeTo(output); } @@ -792,6 +868,9 @@ public int getSerializedSize() { if (assistQueryParams_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getAssistQueryParams()); } + if (cxParameters_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(18, getCxParameters()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -821,6 +900,10 @@ public boolean equals(final java.lang.Object obj) { if (hasAssistQueryParams()) { if (!getAssistQueryParams().equals(other.getAssistQueryParams())) return false; } + if (hasCxParameters() != other.hasCxParameters()) return false; + if (hasCxParameters()) { + if (!getCxParameters().equals(other.getCxParameters())) return false; + } if (hasMessageSendTime() != other.hasMessageSendTime()) return false; if (hasMessageSendTime()) { if (!getMessageSendTime().equals(other.getMessageSendTime())) return false; @@ -862,6 +945,10 @@ public int hashCode() { hash = (37 * hash) + ASSIST_QUERY_PARAMS_FIELD_NUMBER; hash = (53 * hash) + getAssistQueryParams().hashCode(); } + if (hasCxParameters()) { + hash = (37 * hash) + CX_PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getCxParameters().hashCode(); + } if (hasMessageSendTime()) { hash = (37 * hash) + MESSAGE_SEND_TIME_FIELD_NUMBER; hash = (53 * hash) + getMessageSendTime().hashCode(); @@ -1046,6 +1133,12 @@ public Builder clear() { assistQueryParams_ = null; assistQueryParamsBuilder_ = null; } + if (cxParametersBuilder_ == null) { + cxParameters_ = null; + } else { + cxParameters_ = null; + cxParametersBuilder_ = null; + } if (messageSendTimeBuilder_ == null) { messageSendTime_ = null; } else { @@ -1113,6 +1206,11 @@ public com.google.cloud.dialogflow.v2beta1.AnalyzeContentRequest buildPartial() } else { result.assistQueryParams_ = assistQueryParamsBuilder_.build(); } + if (cxParametersBuilder_ == null) { + result.cxParameters_ = cxParameters_; + } else { + result.cxParameters_ = cxParametersBuilder_.build(); + } if (messageSendTimeBuilder_ == null) { result.messageSendTime_ = messageSendTime_; } else { @@ -1183,6 +1281,9 @@ public Builder mergeFrom(com.google.cloud.dialogflow.v2beta1.AnalyzeContentReque if (other.hasAssistQueryParams()) { mergeAssistQueryParams(other.getAssistQueryParams()); } + if (other.hasCxParameters()) { + mergeCxParameters(other.getCxParameters()); + } if (other.hasMessageSendTime()) { mergeMessageSendTime(other.getMessageSendTime()); } @@ -2399,6 +2500,225 @@ public Builder clearAssistQueryParams() { return assistQueryParamsBuilder_; } + private com.google.protobuf.Struct cxParameters_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + cxParametersBuilder_; + /** + * + * + *
+     * Additional parameters to be put into Dialogflow CX session parameters. To
+     * remove a parameter from the session, clients should explicitly set the
+     * parameter value to null.
+     * Note: this field should only be used if you are connecting to a Dialogflow
+     * CX agent.
+     * 
+ * + * .google.protobuf.Struct cx_parameters = 18; + * + * @return Whether the cxParameters field is set. + */ + public boolean hasCxParameters() { + return cxParametersBuilder_ != null || cxParameters_ != null; + } + /** + * + * + *
+     * Additional parameters to be put into Dialogflow CX session parameters. To
+     * remove a parameter from the session, clients should explicitly set the
+     * parameter value to null.
+     * Note: this field should only be used if you are connecting to a Dialogflow
+     * CX agent.
+     * 
+ * + * .google.protobuf.Struct cx_parameters = 18; + * + * @return The cxParameters. + */ + public com.google.protobuf.Struct getCxParameters() { + if (cxParametersBuilder_ == null) { + return cxParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : cxParameters_; + } else { + return cxParametersBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Additional parameters to be put into Dialogflow CX session parameters. To
+     * remove a parameter from the session, clients should explicitly set the
+     * parameter value to null.
+     * Note: this field should only be used if you are connecting to a Dialogflow
+     * CX agent.
+     * 
+ * + * .google.protobuf.Struct cx_parameters = 18; + */ + public Builder setCxParameters(com.google.protobuf.Struct value) { + if (cxParametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cxParameters_ = value; + onChanged(); + } else { + cxParametersBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Additional parameters to be put into Dialogflow CX session parameters. To
+     * remove a parameter from the session, clients should explicitly set the
+     * parameter value to null.
+     * Note: this field should only be used if you are connecting to a Dialogflow
+     * CX agent.
+     * 
+ * + * .google.protobuf.Struct cx_parameters = 18; + */ + public Builder setCxParameters(com.google.protobuf.Struct.Builder builderForValue) { + if (cxParametersBuilder_ == null) { + cxParameters_ = builderForValue.build(); + onChanged(); + } else { + cxParametersBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Additional parameters to be put into Dialogflow CX session parameters. To
+     * remove a parameter from the session, clients should explicitly set the
+     * parameter value to null.
+     * Note: this field should only be used if you are connecting to a Dialogflow
+     * CX agent.
+     * 
+ * + * .google.protobuf.Struct cx_parameters = 18; + */ + public Builder mergeCxParameters(com.google.protobuf.Struct value) { + if (cxParametersBuilder_ == null) { + if (cxParameters_ != null) { + cxParameters_ = + com.google.protobuf.Struct.newBuilder(cxParameters_).mergeFrom(value).buildPartial(); + } else { + cxParameters_ = value; + } + onChanged(); + } else { + cxParametersBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Additional parameters to be put into Dialogflow CX session parameters. To
+     * remove a parameter from the session, clients should explicitly set the
+     * parameter value to null.
+     * Note: this field should only be used if you are connecting to a Dialogflow
+     * CX agent.
+     * 
+ * + * .google.protobuf.Struct cx_parameters = 18; + */ + public Builder clearCxParameters() { + if (cxParametersBuilder_ == null) { + cxParameters_ = null; + onChanged(); + } else { + cxParameters_ = null; + cxParametersBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Additional parameters to be put into Dialogflow CX session parameters. To
+     * remove a parameter from the session, clients should explicitly set the
+     * parameter value to null.
+     * Note: this field should only be used if you are connecting to a Dialogflow
+     * CX agent.
+     * 
+ * + * .google.protobuf.Struct cx_parameters = 18; + */ + public com.google.protobuf.Struct.Builder getCxParametersBuilder() { + + onChanged(); + return getCxParametersFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Additional parameters to be put into Dialogflow CX session parameters. To
+     * remove a parameter from the session, clients should explicitly set the
+     * parameter value to null.
+     * Note: this field should only be used if you are connecting to a Dialogflow
+     * CX agent.
+     * 
+ * + * .google.protobuf.Struct cx_parameters = 18; + */ + public com.google.protobuf.StructOrBuilder getCxParametersOrBuilder() { + if (cxParametersBuilder_ != null) { + return cxParametersBuilder_.getMessageOrBuilder(); + } else { + return cxParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : cxParameters_; + } + } + /** + * + * + *
+     * Additional parameters to be put into Dialogflow CX session parameters. To
+     * remove a parameter from the session, clients should explicitly set the
+     * parameter value to null.
+     * Note: this field should only be used if you are connecting to a Dialogflow
+     * CX agent.
+     * 
+ * + * .google.protobuf.Struct cx_parameters = 18; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + getCxParametersFieldBuilder() { + if (cxParametersBuilder_ == null) { + cxParametersBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + getCxParameters(), getParentForChildren(), isClean()); + cxParameters_ = null; + } + return cxParametersBuilder_; + } + private com.google.protobuf.Timestamp messageSendTime_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AnalyzeContentRequestOrBuilder.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AnalyzeContentRequestOrBuilder.java index 08aa84b96..85b221fe6 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AnalyzeContentRequestOrBuilder.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AnalyzeContentRequestOrBuilder.java @@ -244,6 +244,53 @@ public interface AnalyzeContentRequestOrBuilder com.google.cloud.dialogflow.v2beta1.AssistQueryParametersOrBuilder getAssistQueryParamsOrBuilder(); + /** + * + * + *
+   * Additional parameters to be put into Dialogflow CX session parameters. To
+   * remove a parameter from the session, clients should explicitly set the
+   * parameter value to null.
+   * Note: this field should only be used if you are connecting to a Dialogflow
+   * CX agent.
+   * 
+ * + * .google.protobuf.Struct cx_parameters = 18; + * + * @return Whether the cxParameters field is set. + */ + boolean hasCxParameters(); + /** + * + * + *
+   * Additional parameters to be put into Dialogflow CX session parameters. To
+   * remove a parameter from the session, clients should explicitly set the
+   * parameter value to null.
+   * Note: this field should only be used if you are connecting to a Dialogflow
+   * CX agent.
+   * 
+ * + * .google.protobuf.Struct cx_parameters = 18; + * + * @return The cxParameters. + */ + com.google.protobuf.Struct getCxParameters(); + /** + * + * + *
+   * Additional parameters to be put into Dialogflow CX session parameters. To
+   * remove a parameter from the session, clients should explicitly set the
+   * parameter value to null.
+   * Note: this field should only be used if you are connecting to a Dialogflow
+   * CX agent.
+   * 
+ * + * .google.protobuf.Struct cx_parameters = 18; + */ + com.google.protobuf.StructOrBuilder getCxParametersOrBuilder(); + /** * * diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AudioConfigProto.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AudioConfigProto.java index 8641de3ab..f169adc85 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AudioConfigProto.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AudioConfigProto.java @@ -131,12 +131,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\005\022\014\n\010DTMF_SIX\020\006\022\016\n\nDTMF_SEVEN\020\007\022\016\n\nDTMF_" + "EIGHT\020\010\022\r\n\tDTMF_NINE\020\t\022\r\n\tDTMF_ZERO\020\n\022\n\n" + "\006DTMF_A\020\013\022\n\n\006DTMF_B\020\014\022\n\n\006DTMF_C\020\r\022\n\n\006DTM" - + "F_D\020\016\022\r\n\tDTMF_STAR\020\017\022\016\n\nDTMF_POUND\020\020B\256\001\n" + + "F_D\020\016\022\r\n\tDTMF_STAR\020\017\022\016\n\nDTMF_POUND\020\020B\206\002\n" + "#com.google.cloud.dialogflow.v2beta1B\020Au" + "dioConfigProtoP\001ZIgoogle.golang.org/genp" + "roto/googleapis/cloud/dialogflow/v2beta1" + ";dialogflow\370\001\001\242\002\002DF\252\002\037Google.Cloud.Dialo" - + "gflow.V2beta1b\006proto3" + + "gflow.V2beta1\352AU\n\033automl.googleapis.com/" + + "Model\0226projects/{project}/locations/{loc" + + "ation}/models/{model}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -222,6 +224,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resourceDefinition); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); com.google.api.FieldBehaviorProto.getDescriptor(); diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AutomatedAgentReply.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AutomatedAgentReply.java index 19fd56bad..41e308b66 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AutomatedAgentReply.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AutomatedAgentReply.java @@ -821,7 +821,7 @@ public com.google.protobuf.StructOrBuilder getParametersOrBuilder() { * .google.protobuf.Struct cx_session_parameters = 6 [deprecated = true]; * * @deprecated google.cloud.dialogflow.v2beta1.AutomatedAgentReply.cx_session_parameters is - * deprecated. See google/cloud/dialogflow/v2beta1/participant.proto;l=456 + * deprecated. See google/cloud/dialogflow/v2beta1/participant.proto;l=474 * @return Whether the cxSessionParameters field is set. */ @java.lang.Override @@ -841,7 +841,7 @@ public boolean hasCxSessionParameters() { * .google.protobuf.Struct cx_session_parameters = 6 [deprecated = true]; * * @deprecated google.cloud.dialogflow.v2beta1.AutomatedAgentReply.cx_session_parameters is - * deprecated. See google/cloud/dialogflow/v2beta1/participant.proto;l=456 + * deprecated. See google/cloud/dialogflow/v2beta1/participant.proto;l=474 * @return The cxSessionParameters. */ @java.lang.Override @@ -2682,7 +2682,7 @@ public com.google.protobuf.StructOrBuilder getParametersOrBuilder() { * .google.protobuf.Struct cx_session_parameters = 6 [deprecated = true]; * * @deprecated google.cloud.dialogflow.v2beta1.AutomatedAgentReply.cx_session_parameters is - * deprecated. See google/cloud/dialogflow/v2beta1/participant.proto;l=456 + * deprecated. See google/cloud/dialogflow/v2beta1/participant.proto;l=474 * @return Whether the cxSessionParameters field is set. */ @java.lang.Deprecated @@ -2701,7 +2701,7 @@ public boolean hasCxSessionParameters() { * .google.protobuf.Struct cx_session_parameters = 6 [deprecated = true]; * * @deprecated google.cloud.dialogflow.v2beta1.AutomatedAgentReply.cx_session_parameters is - * deprecated. See google/cloud/dialogflow/v2beta1/participant.proto;l=456 + * deprecated. See google/cloud/dialogflow/v2beta1/participant.proto;l=474 * @return The cxSessionParameters. */ @java.lang.Deprecated diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AutomatedAgentReplyOrBuilder.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AutomatedAgentReplyOrBuilder.java index 9fb661517..23256f704 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AutomatedAgentReplyOrBuilder.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AutomatedAgentReplyOrBuilder.java @@ -263,7 +263,7 @@ com.google.cloud.dialogflow.v2beta1.ResponseMessageOrBuilder getResponseMessages * .google.protobuf.Struct cx_session_parameters = 6 [deprecated = true]; * * @deprecated google.cloud.dialogflow.v2beta1.AutomatedAgentReply.cx_session_parameters is - * deprecated. See google/cloud/dialogflow/v2beta1/participant.proto;l=456 + * deprecated. See google/cloud/dialogflow/v2beta1/participant.proto;l=474 * @return Whether the cxSessionParameters field is set. */ @java.lang.Deprecated @@ -280,7 +280,7 @@ com.google.cloud.dialogflow.v2beta1.ResponseMessageOrBuilder getResponseMessages * .google.protobuf.Struct cx_session_parameters = 6 [deprecated = true]; * * @deprecated google.cloud.dialogflow.v2beta1.AutomatedAgentReply.cx_session_parameters is - * deprecated. See google/cloud/dialogflow/v2beta1/participant.proto;l=456 + * deprecated. See google/cloud/dialogflow/v2beta1/participant.proto;l=474 * @return The cxSessionParameters. */ @java.lang.Deprecated diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/Fulfillment.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/Fulfillment.java index 93976a384..65e510dea 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/Fulfillment.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/Fulfillment.java @@ -332,7 +332,7 @@ java.lang.String getRequestHeadersOrDefault( * * * @deprecated google.cloud.dialogflow.v2beta1.Fulfillment.GenericWebService.is_cloud_function - * is deprecated. See google/cloud/dialogflow/v2beta1/fulfillment.proto;l=106 + * is deprecated. See google/cloud/dialogflow/v2beta1/fulfillment.proto;l=108 * @return The isCloudFunction. */ @java.lang.Deprecated @@ -755,7 +755,7 @@ public java.lang.String getRequestHeadersOrThrow(java.lang.String key) { * * * @deprecated google.cloud.dialogflow.v2beta1.Fulfillment.GenericWebService.is_cloud_function - * is deprecated. See google/cloud/dialogflow/v2beta1/fulfillment.proto;l=106 + * is deprecated. See google/cloud/dialogflow/v2beta1/fulfillment.proto;l=108 * @return The isCloudFunction. */ @java.lang.Override @@ -1695,7 +1695,7 @@ public Builder putAllRequestHeaders( * * * @deprecated google.cloud.dialogflow.v2beta1.Fulfillment.GenericWebService.is_cloud_function - * is deprecated. See google/cloud/dialogflow/v2beta1/fulfillment.proto;l=106 + * is deprecated. See google/cloud/dialogflow/v2beta1/fulfillment.proto;l=108 * @return The isCloudFunction. */ @java.lang.Override @@ -1718,7 +1718,7 @@ public boolean getIsCloudFunction() { * * * @deprecated google.cloud.dialogflow.v2beta1.Fulfillment.GenericWebService.is_cloud_function - * is deprecated. See google/cloud/dialogflow/v2beta1/fulfillment.proto;l=106 + * is deprecated. See google/cloud/dialogflow/v2beta1/fulfillment.proto;l=108 * @param value The isCloudFunction to set. * @return This builder for chaining. */ @@ -1744,7 +1744,7 @@ public Builder setIsCloudFunction(boolean value) { * * * @deprecated google.cloud.dialogflow.v2beta1.Fulfillment.GenericWebService.is_cloud_function - * is deprecated. See google/cloud/dialogflow/v2beta1/fulfillment.proto;l=106 + * is deprecated. See google/cloud/dialogflow/v2beta1/fulfillment.proto;l=108 * @return This builder for chaining. */ @java.lang.Deprecated diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/InputAudioConfig.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/InputAudioConfig.java index 92bd865de..c513cf009 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/InputAudioConfig.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/InputAudioConfig.java @@ -344,7 +344,7 @@ public boolean getEnableWordInfo() { * repeated string phrase_hints = 4 [deprecated = true]; * * @deprecated google.cloud.dialogflow.v2beta1.InputAudioConfig.phrase_hints is deprecated. See - * google/cloud/dialogflow/v2beta1/audio_config.proto;l=212 + * google/cloud/dialogflow/v2beta1/audio_config.proto;l=216 * @return A list containing the phraseHints. */ @java.lang.Deprecated @@ -368,7 +368,7 @@ public com.google.protobuf.ProtocolStringList getPhraseHintsList() { * repeated string phrase_hints = 4 [deprecated = true]; * * @deprecated google.cloud.dialogflow.v2beta1.InputAudioConfig.phrase_hints is deprecated. See - * google/cloud/dialogflow/v2beta1/audio_config.proto;l=212 + * google/cloud/dialogflow/v2beta1/audio_config.proto;l=216 * @return The count of phraseHints. */ @java.lang.Deprecated @@ -392,7 +392,7 @@ public int getPhraseHintsCount() { * repeated string phrase_hints = 4 [deprecated = true]; * * @deprecated google.cloud.dialogflow.v2beta1.InputAudioConfig.phrase_hints is deprecated. See - * google/cloud/dialogflow/v2beta1/audio_config.proto;l=212 + * google/cloud/dialogflow/v2beta1/audio_config.proto;l=216 * @param index The index of the element to return. * @return The phraseHints at the given index. */ @@ -417,7 +417,7 @@ public java.lang.String getPhraseHints(int index) { * repeated string phrase_hints = 4 [deprecated = true]; * * @deprecated google.cloud.dialogflow.v2beta1.InputAudioConfig.phrase_hints is deprecated. See - * google/cloud/dialogflow/v2beta1/audio_config.proto;l=212 + * google/cloud/dialogflow/v2beta1/audio_config.proto;l=216 * @param index The index of the value to return. * @return The bytes of the phraseHints at the given index. */ @@ -1563,7 +1563,7 @@ private void ensurePhraseHintsIsMutable() { * repeated string phrase_hints = 4 [deprecated = true]; * * @deprecated google.cloud.dialogflow.v2beta1.InputAudioConfig.phrase_hints is deprecated. See - * google/cloud/dialogflow/v2beta1/audio_config.proto;l=212 + * google/cloud/dialogflow/v2beta1/audio_config.proto;l=216 * @return A list containing the phraseHints. */ @java.lang.Deprecated @@ -1587,7 +1587,7 @@ public com.google.protobuf.ProtocolStringList getPhraseHintsList() { * repeated string phrase_hints = 4 [deprecated = true]; * * @deprecated google.cloud.dialogflow.v2beta1.InputAudioConfig.phrase_hints is deprecated. See - * google/cloud/dialogflow/v2beta1/audio_config.proto;l=212 + * google/cloud/dialogflow/v2beta1/audio_config.proto;l=216 * @return The count of phraseHints. */ @java.lang.Deprecated @@ -1611,7 +1611,7 @@ public int getPhraseHintsCount() { * repeated string phrase_hints = 4 [deprecated = true]; * * @deprecated google.cloud.dialogflow.v2beta1.InputAudioConfig.phrase_hints is deprecated. See - * google/cloud/dialogflow/v2beta1/audio_config.proto;l=212 + * google/cloud/dialogflow/v2beta1/audio_config.proto;l=216 * @param index The index of the element to return. * @return The phraseHints at the given index. */ @@ -1636,7 +1636,7 @@ public java.lang.String getPhraseHints(int index) { * repeated string phrase_hints = 4 [deprecated = true]; * * @deprecated google.cloud.dialogflow.v2beta1.InputAudioConfig.phrase_hints is deprecated. See - * google/cloud/dialogflow/v2beta1/audio_config.proto;l=212 + * google/cloud/dialogflow/v2beta1/audio_config.proto;l=216 * @param index The index of the value to return. * @return The bytes of the phraseHints at the given index. */ @@ -1661,7 +1661,7 @@ public com.google.protobuf.ByteString getPhraseHintsBytes(int index) { * repeated string phrase_hints = 4 [deprecated = true]; * * @deprecated google.cloud.dialogflow.v2beta1.InputAudioConfig.phrase_hints is deprecated. See - * google/cloud/dialogflow/v2beta1/audio_config.proto;l=212 + * google/cloud/dialogflow/v2beta1/audio_config.proto;l=216 * @param index The index to set the value at. * @param value The phraseHints to set. * @return This builder for chaining. @@ -1693,7 +1693,7 @@ public Builder setPhraseHints(int index, java.lang.String value) { * repeated string phrase_hints = 4 [deprecated = true]; * * @deprecated google.cloud.dialogflow.v2beta1.InputAudioConfig.phrase_hints is deprecated. See - * google/cloud/dialogflow/v2beta1/audio_config.proto;l=212 + * google/cloud/dialogflow/v2beta1/audio_config.proto;l=216 * @param value The phraseHints to add. * @return This builder for chaining. */ @@ -1724,7 +1724,7 @@ public Builder addPhraseHints(java.lang.String value) { * repeated string phrase_hints = 4 [deprecated = true]; * * @deprecated google.cloud.dialogflow.v2beta1.InputAudioConfig.phrase_hints is deprecated. See - * google/cloud/dialogflow/v2beta1/audio_config.proto;l=212 + * google/cloud/dialogflow/v2beta1/audio_config.proto;l=216 * @param values The phraseHints to add. * @return This builder for chaining. */ @@ -1752,7 +1752,7 @@ public Builder addAllPhraseHints(java.lang.Iterable values) { * repeated string phrase_hints = 4 [deprecated = true]; * * @deprecated google.cloud.dialogflow.v2beta1.InputAudioConfig.phrase_hints is deprecated. See - * google/cloud/dialogflow/v2beta1/audio_config.proto;l=212 + * google/cloud/dialogflow/v2beta1/audio_config.proto;l=216 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1779,7 +1779,7 @@ public Builder clearPhraseHints() { * repeated string phrase_hints = 4 [deprecated = true]; * * @deprecated google.cloud.dialogflow.v2beta1.InputAudioConfig.phrase_hints is deprecated. See - * google/cloud/dialogflow/v2beta1/audio_config.proto;l=212 + * google/cloud/dialogflow/v2beta1/audio_config.proto;l=216 * @param value The bytes of the phraseHints to add. * @return This builder for chaining. */ diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/InputAudioConfigOrBuilder.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/InputAudioConfigOrBuilder.java index b8194b71b..84bdfd3ce 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/InputAudioConfigOrBuilder.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/InputAudioConfigOrBuilder.java @@ -131,7 +131,7 @@ public interface InputAudioConfigOrBuilder * repeated string phrase_hints = 4 [deprecated = true]; * * @deprecated google.cloud.dialogflow.v2beta1.InputAudioConfig.phrase_hints is deprecated. See - * google/cloud/dialogflow/v2beta1/audio_config.proto;l=212 + * google/cloud/dialogflow/v2beta1/audio_config.proto;l=216 * @return A list containing the phraseHints. */ @java.lang.Deprecated @@ -153,7 +153,7 @@ public interface InputAudioConfigOrBuilder * repeated string phrase_hints = 4 [deprecated = true]; * * @deprecated google.cloud.dialogflow.v2beta1.InputAudioConfig.phrase_hints is deprecated. See - * google/cloud/dialogflow/v2beta1/audio_config.proto;l=212 + * google/cloud/dialogflow/v2beta1/audio_config.proto;l=216 * @return The count of phraseHints. */ @java.lang.Deprecated @@ -175,7 +175,7 @@ public interface InputAudioConfigOrBuilder * repeated string phrase_hints = 4 [deprecated = true]; * * @deprecated google.cloud.dialogflow.v2beta1.InputAudioConfig.phrase_hints is deprecated. See - * google/cloud/dialogflow/v2beta1/audio_config.proto;l=212 + * google/cloud/dialogflow/v2beta1/audio_config.proto;l=216 * @param index The index of the element to return. * @return The phraseHints at the given index. */ @@ -198,7 +198,7 @@ public interface InputAudioConfigOrBuilder * repeated string phrase_hints = 4 [deprecated = true]; * * @deprecated google.cloud.dialogflow.v2beta1.InputAudioConfig.phrase_hints is deprecated. See - * google/cloud/dialogflow/v2beta1/audio_config.proto;l=212 + * google/cloud/dialogflow/v2beta1/audio_config.proto;l=216 * @param index The index of the value to return. * @return The bytes of the phraseHints at the given index. */ diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/InputTextConfig.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/InputTextConfig.java new file mode 100644 index 000000000..d67d4600f --- /dev/null +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/InputTextConfig.java @@ -0,0 +1,652 @@ +/* + * Copyright 2020 Google LLC + * + * 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/v2beta1/participant.proto + +package com.google.cloud.dialogflow.v2beta1; + +/** + * + * + *
+ * Defines the language used in the input text.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.v2beta1.InputTextConfig} + */ +public final class InputTextConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2beta1.InputTextConfig) + InputTextConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use InputTextConfig.newBuilder() to construct. + private InputTextConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private InputTextConfig() { + languageCode_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new InputTextConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private InputTextConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + languageCode_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2beta1.ParticipantProto + .internal_static_google_cloud_dialogflow_v2beta1_InputTextConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2beta1.ParticipantProto + .internal_static_google_cloud_dialogflow_v2beta1_InputTextConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2beta1.InputTextConfig.class, + com.google.cloud.dialogflow.v2beta1.InputTextConfig.Builder.class); + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 1; + private volatile java.lang.Object languageCode_; + /** + * + * + *
+   * Required. The language of this conversational query. See [Language
+   * Support](https://cloud.google.com/dialogflow/docs/reference/language)
+   * for a list of the currently supported language codes.
+   * 
+ * + * string language_code = 1; + * + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The language of this conversational query. See [Language
+   * Support](https://cloud.google.com/dialogflow/docs/reference/language)
+   * for a list of the currently supported language codes.
+   * 
+ * + * string language_code = 1; + * + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, languageCode_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, languageCode_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.v2beta1.InputTextConfig)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.v2beta1.InputTextConfig other = + (com.google.cloud.dialogflow.v2beta1.InputTextConfig) obj; + + if (!getLanguageCode().equals(other.getLanguageCode())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.v2beta1.InputTextConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2beta1.InputTextConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2beta1.InputTextConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2beta1.InputTextConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2beta1.InputTextConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2beta1.InputTextConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2beta1.InputTextConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2beta1.InputTextConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2beta1.InputTextConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2beta1.InputTextConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2beta1.InputTextConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2beta1.InputTextConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.dialogflow.v2beta1.InputTextConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Defines the language used in the input text.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.v2beta1.InputTextConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2beta1.InputTextConfig) + com.google.cloud.dialogflow.v2beta1.InputTextConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2beta1.ParticipantProto + .internal_static_google_cloud_dialogflow_v2beta1_InputTextConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2beta1.ParticipantProto + .internal_static_google_cloud_dialogflow_v2beta1_InputTextConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2beta1.InputTextConfig.class, + com.google.cloud.dialogflow.v2beta1.InputTextConfig.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.v2beta1.InputTextConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + languageCode_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.v2beta1.ParticipantProto + .internal_static_google_cloud_dialogflow_v2beta1_InputTextConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.InputTextConfig getDefaultInstanceForType() { + return com.google.cloud.dialogflow.v2beta1.InputTextConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.InputTextConfig build() { + com.google.cloud.dialogflow.v2beta1.InputTextConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.InputTextConfig buildPartial() { + com.google.cloud.dialogflow.v2beta1.InputTextConfig result = + new com.google.cloud.dialogflow.v2beta1.InputTextConfig(this); + result.languageCode_ = languageCode_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.v2beta1.InputTextConfig) { + return mergeFrom((com.google.cloud.dialogflow.v2beta1.InputTextConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.v2beta1.InputTextConfig other) { + if (other == com.google.cloud.dialogflow.v2beta1.InputTextConfig.getDefaultInstance()) + return this; + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.v2beta1.InputTextConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.v2beta1.InputTextConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object languageCode_ = ""; + /** + * + * + *
+     * Required. The language of this conversational query. See [Language
+     * Support](https://cloud.google.com/dialogflow/docs/reference/language)
+     * for a list of the currently supported language codes.
+     * 
+ * + * string language_code = 1; + * + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The language of this conversational query. See [Language
+     * Support](https://cloud.google.com/dialogflow/docs/reference/language)
+     * for a list of the currently supported language codes.
+     * 
+ * + * string language_code = 1; + * + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The language of this conversational query. See [Language
+     * Support](https://cloud.google.com/dialogflow/docs/reference/language)
+     * for a list of the currently supported language codes.
+     * 
+ * + * string language_code = 1; + * + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + languageCode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The language of this conversational query. See [Language
+     * Support](https://cloud.google.com/dialogflow/docs/reference/language)
+     * for a list of the currently supported language codes.
+     * 
+ * + * string language_code = 1; + * + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + + languageCode_ = getDefaultInstance().getLanguageCode(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The language of this conversational query. See [Language
+     * Support](https://cloud.google.com/dialogflow/docs/reference/language)
+     * for a list of the currently supported language codes.
+     * 
+ * + * string language_code = 1; + * + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + languageCode_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2beta1.InputTextConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.InputTextConfig) + private static final com.google.cloud.dialogflow.v2beta1.InputTextConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2beta1.InputTextConfig(); + } + + public static com.google.cloud.dialogflow.v2beta1.InputTextConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InputTextConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new InputTextConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.InputTextConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/InputTextConfigOrBuilder.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/InputTextConfigOrBuilder.java new file mode 100644 index 000000000..c43667d49 --- /dev/null +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/InputTextConfigOrBuilder.java @@ -0,0 +1,54 @@ +/* + * Copyright 2020 Google LLC + * + * 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/v2beta1/participant.proto + +package com.google.cloud.dialogflow.v2beta1; + +public interface InputTextConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2beta1.InputTextConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The language of this conversational query. See [Language
+   * Support](https://cloud.google.com/dialogflow/docs/reference/language)
+   * for a list of the currently supported language codes.
+   * 
+ * + * string language_code = 1; + * + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + * + * + *
+   * Required. The language of this conversational query. See [Language
+   * Support](https://cloud.google.com/dialogflow/docs/reference/language)
+   * for a list of the currently supported language codes.
+   * 
+ * + * string language_code = 1; + * + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString getLanguageCodeBytes(); +} diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ParticipantProto.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ParticipantProto.java index 0c3f93250..449db6c3c 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ParticipantProto.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ParticipantProto.java @@ -91,6 +91,18 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_v2beta1_AnalyzeContentResponse_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_v2beta1_AnalyzeContentResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_v2beta1_InputTextConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_v2beta1_InputTextConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_v2beta1_StreamingAnalyzeContentRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_v2beta1_StreamingAnalyzeContentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_v2beta1_StreamingAnalyzeContentResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_v2beta1_StreamingAnalyzeContentResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_dialogflow_v2beta1_AnnotatedMessagePart_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -199,6 +211,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_v2beta1_ResponseMessage_EndInteraction_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_v2beta1_ResponseMessage_EndInteraction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_v2beta1_ResponseMessage_MixedAudio_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_v2beta1_ResponseMessage_MixedAudio_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_v2beta1_ResponseMessage_MixedAudio_Segment_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_v2beta1_ResponseMessage_MixedAudio_Segment_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_dialogflow_v2beta1_ResponseMessage_TelephonyTransferCall_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -300,7 +320,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "2beta1.AssistQueryParameters.DocumentsMe" + "tadataFiltersEntry\032?\n\035DocumentsMetadataF" + "iltersEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:" - + "\0028\001\"\242\004\n\025AnalyzeContentRequest\022B\n\013partici" + + "\0028\001\"\322\004\n\025AnalyzeContentRequest\022B\n\013partici" + "pant\030\001 \001(\tB-\340A\002\372A\'\n%dialogflow.googleapi" + "s.com/Participant\022@\n\ntext_input\030\006 \001(\0132*." + "google.cloud.dialogflow.v2beta1.TextInpu" @@ -311,216 +331,263 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "_params\030\t \001(\01320.google.cloud.dialogflow." + "v2beta1.QueryParameters\022S\n\023assist_query_" + "params\030\016 \001(\01326.google.cloud.dialogflow.v" - + "2beta1.AssistQueryParameters\0225\n\021message_" - + "send_time\030\n \001(\0132\032.google.protobuf.Timest" - + "amp\022\022\n\nrequest_id\030\013 \001(\tB\007\n\005input\",\n\016Dtmf" - + "Parameters\022\032\n\022accepts_dtmf_input\030\001 \001(\010\"\374" - + "\003\n\026AnalyzeContentResponse\022\022\n\nreply_text\030" - + "\001 \001(\t\022A\n\013reply_audio\030\002 \001(\0132,.google.clou" - + "d.dialogflow.v2beta1.OutputAudio\022S\n\025auto" - + "mated_agent_reply\030\003 \001(\01324.google.cloud.d" - + "ialogflow.v2beta1.AutomatedAgentReply\0229\n" - + "\007message\030\005 \001(\0132(.google.cloud.dialogflow" - + ".v2beta1.Message\022Y\n\036human_agent_suggesti" - + "on_results\030\006 \003(\01321.google.cloud.dialogfl" - + "ow.v2beta1.SuggestionResult\022V\n\033end_user_" - + "suggestion_results\030\007 \003(\01321.google.cloud." - + "dialogflow.v2beta1.SuggestionResult\022H\n\017d" - + "tmf_parameters\030\t \001(\0132/.google.cloud.dial" - + "ogflow.v2beta1.DtmfParameters\"j\n\024Annotat" - + "edMessagePart\022\014\n\004text\030\001 \001(\t\022\023\n\013entity_ty" - + "pe\030\002 \001(\t\022/\n\017formatted_value\030\003 \001(\0132\026.goog" - + "le.protobuf.Value\"s\n\021MessageAnnotation\022D" - + "\n\005parts\030\001 \003(\01325.google.cloud.dialogflow." - + "v2beta1.AnnotatedMessagePart\022\030\n\020contain_" - + "entities\030\002 \001(\010\"\325\001\n\rArticleAnswer\022\r\n\005titl" - + "e\030\001 \001(\t\022\013\n\003uri\030\002 \001(\t\022\020\n\010snippets\030\003 \003(\t\022N" - + "\n\010metadata\030\005 \003(\0132<.google.cloud.dialogfl" - + "ow.v2beta1.ArticleAnswer.MetadataEntry\022\025" - + "\n\ranswer_record\030\006 \001(\t\032/\n\rMetadataEntry\022\013" - + "\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\345\001\n\tFaqAn" - + "swer\022\016\n\006answer\030\001 \001(\t\022\022\n\nconfidence\030\002 \001(\002" - + "\022\020\n\010question\030\003 \001(\t\022\016\n\006source\030\004 \001(\t\022J\n\010me" - + "tadata\030\005 \003(\01328.google.cloud.dialogflow.v" - + "2beta1.FaqAnswer.MetadataEntry\022\025\n\ranswer" - + "_record\030\006 \001(\t\032/\n\rMetadataEntry\022\013\n\003key\030\001 " - + "\001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"y\n\020SmartReplyAnsw" - + "er\022\r\n\005reply\030\001 \001(\t\022\022\n\nconfidence\030\002 \001(\002\022B\n" - + "\ranswer_record\030\003 \001(\tB+\372A(\n&dialogflow.go" - + "ogleapis.com/AnswerRecord\"\371\002\n\020Suggestion" - + "Result\022#\n\005error\030\001 \001(\0132\022.google.rpc.Statu" - + "sH\000\022]\n\031suggest_articles_response\030\002 \001(\01328" - + ".google.cloud.dialogflow.v2beta1.Suggest" - + "ArticlesResponseH\000\022b\n\034suggest_faq_answer" - + "s_response\030\003 \001(\0132:.google.cloud.dialogfl" - + "ow.v2beta1.SuggestFaqAnswersResponseH\000\022f" - + "\n\036suggest_smart_replies_response\030\004 \001(\0132<" - + ".google.cloud.dialogflow.v2beta1.Suggest" - + "SmartRepliesResponseH\000B\025\n\023suggestion_res" - + "ponse\"\217\002\n\026SuggestArticlesRequest\022=\n\006pare" - + "nt\030\001 \001(\tB-\340A\002\372A\'\n%dialogflow.googleapis." - + "com/Participant\022A\n\016latest_message\030\002 \001(\tB" - + ")\340A\001\372A#\n!dialogflow.googleapis.com/Messa" - + "ge\022\031\n\014context_size\030\003 \001(\005B\003\340A\001\022X\n\023assist_" - + "query_params\030\004 \001(\01326.google.cloud.dialog" - + "flow.v2beta1.AssistQueryParametersB\003\340A\001\"" - + "\220\001\n\027SuggestArticlesResponse\022G\n\017article_a" - + "nswers\030\001 \003(\0132..google.cloud.dialogflow.v" - + "2beta1.ArticleAnswer\022\026\n\016latest_message\030\002" - + " \001(\t\022\024\n\014context_size\030\003 \001(\005\"\221\002\n\030SuggestFa" - + "qAnswersRequest\022=\n\006parent\030\001 \001(\tB-\340A\002\372A\'\n" - + "%dialogflow.googleapis.com/Participant\022A" - + "\n\016latest_message\030\002 \001(\tB)\340A\001\372A#\n!dialogfl" - + "ow.googleapis.com/Message\022\031\n\014context_siz" - + "e\030\003 \001(\005B\003\340A\001\022X\n\023assist_query_params\030\004 \001(" - + "\01326.google.cloud.dialogflow.v2beta1.Assi" - + "stQueryParametersB\003\340A\001\"\212\001\n\031SuggestFaqAns" - + "wersResponse\022?\n\013faq_answers\030\001 \003(\0132*.goog" - + "le.cloud.dialogflow.v2beta1.FaqAnswer\022\026\n" + + "2beta1.AssistQueryParameters\022.\n\rcx_param" + + "eters\030\022 \001(\0132\027.google.protobuf.Struct\0225\n\021" + + "message_send_time\030\n \001(\0132\032.google.protobu" + + "f.Timestamp\022\022\n\nrequest_id\030\013 \001(\tB\007\n\005input" + + "\",\n\016DtmfParameters\022\032\n\022accepts_dtmf_input" + + "\030\001 \001(\010\"\374\003\n\026AnalyzeContentResponse\022\022\n\nrep" + + "ly_text\030\001 \001(\t\022A\n\013reply_audio\030\002 \001(\0132,.goo" + + "gle.cloud.dialogflow.v2beta1.OutputAudio" + + "\022S\n\025automated_agent_reply\030\003 \001(\01324.google" + + ".cloud.dialogflow.v2beta1.AutomatedAgent" + + "Reply\0229\n\007message\030\005 \001(\0132(.google.cloud.di" + + "alogflow.v2beta1.Message\022Y\n\036human_agent_" + + "suggestion_results\030\006 \003(\01321.google.cloud." + + "dialogflow.v2beta1.SuggestionResult\022V\n\033e" + + "nd_user_suggestion_results\030\007 \003(\01321.googl" + + "e.cloud.dialogflow.v2beta1.SuggestionRes" + + "ult\022H\n\017dtmf_parameters\030\t \001(\0132/.google.cl" + + "oud.dialogflow.v2beta1.DtmfParameters\"(\n" + + "\017InputTextConfig\022\025\n\rlanguage_code\030\001 \001(\t\"" + + "\317\005\n\036StreamingAnalyzeContentRequest\022B\n\013pa" + + "rticipant\030\001 \001(\tB-\340A\002\372A\'\n%dialogflow.goog" + + "leapis.com/Participant\022I\n\014audio_config\030\002" + + " \001(\01321.google.cloud.dialogflow.v2beta1.I" + + "nputAudioConfigH\000\022G\n\013text_config\030\003 \001(\01320" + + ".google.cloud.dialogflow.v2beta1.InputTe" + + "xtConfigH\000\022N\n\022reply_audio_config\030\004 \001(\01322" + + ".google.cloud.dialogflow.v2beta1.OutputA" + + "udioConfig\022\025\n\013input_audio\030\005 \001(\014H\001\022\024\n\ninp" + + "ut_text\030\006 \001(\tH\001\022J\n\ninput_dtmf\030\t \001(\01324.go" + + "ogle.cloud.dialogflow.v2beta1.TelephonyD" + + "tmfEventsH\001\022F\n\014query_params\030\007 \001(\01320.goog" + + "le.cloud.dialogflow.v2beta1.QueryParamet" + + "ers\022S\n\023assist_query_params\030\010 \001(\01326.googl" + + "e.cloud.dialogflow.v2beta1.AssistQueryPa" + + "rameters\022.\n\rcx_parameters\030\r \001(\0132\027.google" + + ".protobuf.Struct\022,\n$enable_partial_autom" + + "ated_agent_reply\030\014 \001(\010B\010\n\006configB\007\n\005inpu" + + "t\"\336\004\n\037StreamingAnalyzeContentResponse\022W\n" + + "\022recognition_result\030\001 \001(\0132;.google.cloud" + + ".dialogflow.v2beta1.StreamingRecognition" + + "Result\022\022\n\nreply_text\030\002 \001(\t\022A\n\013reply_audi" + + "o\030\003 \001(\0132,.google.cloud.dialogflow.v2beta" + + "1.OutputAudio\022S\n\025automated_agent_reply\030\004" + + " \001(\01324.google.cloud.dialogflow.v2beta1.A" + + "utomatedAgentReply\0229\n\007message\030\006 \001(\0132(.go" + + "ogle.cloud.dialogflow.v2beta1.Message\022Y\n" + + "\036human_agent_suggestion_results\030\007 \003(\01321." + + "google.cloud.dialogflow.v2beta1.Suggesti" + + "onResult\022V\n\033end_user_suggestion_results\030" + + "\010 \003(\01321.google.cloud.dialogflow.v2beta1." + + "SuggestionResult\022H\n\017dtmf_parameters\030\n \001(" + + "\0132/.google.cloud.dialogflow.v2beta1.Dtmf" + + "Parameters\"j\n\024AnnotatedMessagePart\022\014\n\004te" + + "xt\030\001 \001(\t\022\023\n\013entity_type\030\002 \001(\t\022/\n\017formatt" + + "ed_value\030\003 \001(\0132\026.google.protobuf.Value\"s" + + "\n\021MessageAnnotation\022D\n\005parts\030\001 \003(\01325.goo" + + "gle.cloud.dialogflow.v2beta1.AnnotatedMe" + + "ssagePart\022\030\n\020contain_entities\030\002 \001(\010\"\325\001\n\r" + + "ArticleAnswer\022\r\n\005title\030\001 \001(\t\022\013\n\003uri\030\002 \001(" + + "\t\022\020\n\010snippets\030\003 \003(\t\022N\n\010metadata\030\005 \003(\0132<." + + "google.cloud.dialogflow.v2beta1.ArticleA" + + "nswer.MetadataEntry\022\025\n\ranswer_record\030\006 \001" + + "(\t\032/\n\rMetadataEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005valu" + + "e\030\002 \001(\t:\0028\001\"\345\001\n\tFaqAnswer\022\016\n\006answer\030\001 \001(" + + "\t\022\022\n\nconfidence\030\002 \001(\002\022\020\n\010question\030\003 \001(\t\022" + + "\016\n\006source\030\004 \001(\t\022J\n\010metadata\030\005 \003(\01328.goog" + + "le.cloud.dialogflow.v2beta1.FaqAnswer.Me" + + "tadataEntry\022\025\n\ranswer_record\030\006 \001(\t\032/\n\rMe" + + "tadataEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:" + + "\0028\001\"y\n\020SmartReplyAnswer\022\r\n\005reply\030\001 \001(\t\022\022" + + "\n\nconfidence\030\002 \001(\002\022B\n\ranswer_record\030\003 \001(" + + "\tB+\372A(\n&dialogflow.googleapis.com/Answer" + + "Record\"\371\002\n\020SuggestionResult\022#\n\005error\030\001 \001" + + "(\0132\022.google.rpc.StatusH\000\022]\n\031suggest_arti" + + "cles_response\030\002 \001(\01328.google.cloud.dialo" + + "gflow.v2beta1.SuggestArticlesResponseH\000\022" + + "b\n\034suggest_faq_answers_response\030\003 \001(\0132:." + + "google.cloud.dialogflow.v2beta1.SuggestF" + + "aqAnswersResponseH\000\022f\n\036suggest_smart_rep" + + "lies_response\030\004 \001(\0132<.google.cloud.dialo" + + "gflow.v2beta1.SuggestSmartRepliesRespons" + + "eH\000B\025\n\023suggestion_response\"\217\002\n\026SuggestAr" + + "ticlesRequest\022=\n\006parent\030\001 \001(\tB-\340A\002\372A\'\n%d" + + "ialogflow.googleapis.com/Participant\022A\n\016" + + "latest_message\030\002 \001(\tB)\340A\001\372A#\n!dialogflow" + + ".googleapis.com/Message\022\031\n\014context_size\030" + + "\003 \001(\005B\003\340A\001\022X\n\023assist_query_params\030\004 \001(\0132" + + "6.google.cloud.dialogflow.v2beta1.Assist" + + "QueryParametersB\003\340A\001\"\220\001\n\027SuggestArticles" + + "Response\022G\n\017article_answers\030\001 \003(\0132..goog" + + "le.cloud.dialogflow.v2beta1.ArticleAnswe" + + "r\022\026\n\016latest_message\030\002 \001(\t\022\024\n\014context_siz" + + "e\030\003 \001(\005\"\221\002\n\030SuggestFaqAnswersRequest\022=\n\006" + + "parent\030\001 \001(\tB-\340A\002\372A\'\n%dialogflow.googlea" + + "pis.com/Participant\022A\n\016latest_message\030\002 " + + "\001(\tB)\340A\001\372A#\n!dialogflow.googleapis.com/M" + + "essage\022\031\n\014context_size\030\003 \001(\005B\003\340A\001\022X\n\023ass" + + "ist_query_params\030\004 \001(\01326.google.cloud.di" + + "alogflow.v2beta1.AssistQueryParametersB\003" + + "\340A\001\"\212\001\n\031SuggestFaqAnswersResponse\022?\n\013faq" + + "_answers\030\001 \003(\0132*.google.cloud.dialogflow" + + ".v2beta1.FaqAnswer\022\026\n\016latest_message\030\002 \001" + + "(\t\022\024\n\014context_size\030\003 \001(\005\"\371\001\n\032SuggestSmar" + + "tRepliesRequest\022=\n\006parent\030\001 \001(\tB-\340A\002\372A\'\n" + + "%dialogflow.googleapis.com/Participant\022F" + + "\n\022current_text_input\030\004 \001(\0132*.google.clou" + + "d.dialogflow.v2beta1.TextInput\022>\n\016latest" + + "_message\030\002 \001(\tB&\372A#\n!dialogflow.googleap" + + "is.com/Message\022\024\n\014context_size\030\003 \001(\005\"\303\001\n" + + "\033SuggestSmartRepliesResponse\022N\n\023smart_re" + + "ply_answers\030\001 \003(\01321.google.cloud.dialogf" + + "low.v2beta1.SmartReplyAnswer\022>\n\016latest_m" + + "essage\030\002 \001(\tB&\372A#\n!dialogflow.googleapis" + + ".com/Message\022\024\n\014context_size\030\003 \001(\005\"\304\005\n\nS" + + "uggestion\022\014\n\004name\030\001 \001(\t\022E\n\010articles\030\002 \003(" + + "\01323.google.cloud.dialogflow.v2beta1.Sugg" + + "estion.Article\022J\n\013faq_answers\030\004 \003(\01325.go" + + "ogle.cloud.dialogflow.v2beta1.Suggestion" + + ".FaqAnswer\022/\n\013create_time\030\005 \001(\0132\032.google" + + ".protobuf.Timestamp\022\026\n\016latest_message\030\007 " + + "\001(\t\032\324\001\n\007Article\022\r\n\005title\030\001 \001(\t\022\013\n\003uri\030\002 " + + "\001(\t\022\020\n\010snippets\030\003 \003(\t\022S\n\010metadata\030\005 \003(\0132" + + "A.google.cloud.dialogflow.v2beta1.Sugges" + + "tion.Article.MetadataEntry\022\025\n\ranswer_rec" + + "ord\030\006 \001(\t\032/\n\rMetadataEntry\022\013\n\003key\030\001 \001(\t\022" + + "\r\n\005value\030\002 \001(\t:\0028\001\032\360\001\n\tFaqAnswer\022\016\n\006answ" + + "er\030\001 \001(\t\022\022\n\nconfidence\030\002 \001(\002\022\020\n\010question" + + "\030\003 \001(\t\022\016\n\006source\030\004 \001(\t\022U\n\010metadata\030\005 \003(\013" + + "2C.google.cloud.dialogflow.v2beta1.Sugge" + + "stion.FaqAnswer.MetadataEntry\022\025\n\ranswer_" + + "record\030\006 \001(\t\032/\n\rMetadataEntry\022\013\n\003key\030\001 \001" + + "(\t\022\r\n\005value\030\002 \001(\t:\0028\001:\002\030\001\"c\n\026ListSuggest" + + "ionsRequest\022\016\n\006parent\030\001 \001(\t\022\021\n\tpage_size" + + "\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\016\n\006filter\030\004 \001" + + "(\t:\002\030\001\"x\n\027ListSuggestionsResponse\022@\n\013sug" + + "gestions\030\001 \003(\0132+.google.cloud.dialogflow" + + ".v2beta1.Suggestion\022\027\n\017next_page_token\030\002" + + " \001(\t:\002\030\001\"\\\n\030CompileSuggestionRequest\022\016\n\006" + + "parent\030\001 \001(\t\022\026\n\016latest_message\030\002 \001(\t\022\024\n\014" + + "context_size\030\003 \001(\005:\002\030\001\"\216\001\n\031CompileSugges" + + "tionResponse\022?\n\nsuggestion\030\001 \001(\0132+.googl" + + "e.cloud.dialogflow.v2beta1.Suggestion\022\026\n" + "\016latest_message\030\002 \001(\t\022\024\n\014context_size\030\003 " - + "\001(\005\"\371\001\n\032SuggestSmartRepliesRequest\022=\n\006pa" - + "rent\030\001 \001(\tB-\340A\002\372A\'\n%dialogflow.googleapi" - + "s.com/Participant\022F\n\022current_text_input\030" - + "\004 \001(\0132*.google.cloud.dialogflow.v2beta1." - + "TextInput\022>\n\016latest_message\030\002 \001(\tB&\372A#\n!" - + "dialogflow.googleapis.com/Message\022\024\n\014con" - + "text_size\030\003 \001(\005\"\303\001\n\033SuggestSmartRepliesR" - + "esponse\022N\n\023smart_reply_answers\030\001 \003(\01321.g" - + "oogle.cloud.dialogflow.v2beta1.SmartRepl" - + "yAnswer\022>\n\016latest_message\030\002 \001(\tB&\372A#\n!di" - + "alogflow.googleapis.com/Message\022\024\n\014conte" - + "xt_size\030\003 \001(\005\"\304\005\n\nSuggestion\022\014\n\004name\030\001 \001" - + "(\t\022E\n\010articles\030\002 \003(\01323.google.cloud.dial" - + "ogflow.v2beta1.Suggestion.Article\022J\n\013faq" - + "_answers\030\004 \003(\01325.google.cloud.dialogflow" - + ".v2beta1.Suggestion.FaqAnswer\022/\n\013create_" - + "time\030\005 \001(\0132\032.google.protobuf.Timestamp\022\026" - + "\n\016latest_message\030\007 \001(\t\032\324\001\n\007Article\022\r\n\005ti" - + "tle\030\001 \001(\t\022\013\n\003uri\030\002 \001(\t\022\020\n\010snippets\030\003 \003(\t" - + "\022S\n\010metadata\030\005 \003(\0132A.google.cloud.dialog" - + "flow.v2beta1.Suggestion.Article.Metadata" - + "Entry\022\025\n\ranswer_record\030\006 \001(\t\032/\n\rMetadata" - + "Entry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032\360\001" - + "\n\tFaqAnswer\022\016\n\006answer\030\001 \001(\t\022\022\n\nconfidenc" - + "e\030\002 \001(\002\022\020\n\010question\030\003 \001(\t\022\016\n\006source\030\004 \001(" - + "\t\022U\n\010metadata\030\005 \003(\0132C.google.cloud.dialo" - + "gflow.v2beta1.Suggestion.FaqAnswer.Metad" - + "ataEntry\022\025\n\ranswer_record\030\006 \001(\t\032/\n\rMetad" - + "ataEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001" - + ":\002\030\001\"c\n\026ListSuggestionsRequest\022\016\n\006parent" - + "\030\001 \001(\t\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030" - + "\003 \001(\t\022\016\n\006filter\030\004 \001(\t:\002\030\001\"x\n\027ListSuggest" - + "ionsResponse\022@\n\013suggestions\030\001 \003(\0132+.goog" - + "le.cloud.dialogflow.v2beta1.Suggestion\022\027" - + "\n\017next_page_token\030\002 \001(\t:\002\030\001\"\\\n\030CompileSu" - + "ggestionRequest\022\016\n\006parent\030\001 \001(\t\022\026\n\016lates" - + "t_message\030\002 \001(\t\022\024\n\014context_size\030\003 \001(\005:\002\030" - + "\001\"\216\001\n\031CompileSuggestionResponse\022?\n\nsugge" - + "stion\030\001 \001(\0132+.google.cloud.dialogflow.v2" - + "beta1.Suggestion\022\026\n\016latest_message\030\002 \001(\t" - + "\022\024\n\014context_size\030\003 \001(\005:\002\030\001\"\356\004\n\017ResponseM" - + "essage\022E\n\004text\030\001 \001(\01325.google.cloud.dial" - + "ogflow.v2beta1.ResponseMessage.TextH\000\022*\n" - + "\007payload\030\002 \001(\0132\027.google.protobuf.StructH" - + "\000\022_\n\022live_agent_handoff\030\003 \001(\0132A.google.c" - + "loud.dialogflow.v2beta1.ResponseMessage." - + "LiveAgentHandoffH\000\022Z\n\017end_interaction\030\004 " - + "\001(\0132?.google.cloud.dialogflow.v2beta1.Re" - + "sponseMessage.EndInteractionH\000\022i\n\027teleph" - + "ony_transfer_call\030\006 \001(\0132F.google.cloud.d" - + "ialogflow.v2beta1.ResponseMessage.Teleph" - + "onyTransferCallH\000\032\024\n\004Text\022\014\n\004text\030\001 \003(\t\032" - + "=\n\020LiveAgentHandoff\022)\n\010metadata\030\001 \001(\0132\027." - + "google.protobuf.Struct\032\020\n\016EndInteraction" - + "\032N\n\025TelephonyTransferCall\022\026\n\014phone_numbe" - + "r\030\001 \001(\tH\000\022\021\n\007sip_uri\030\002 \001(\tH\000B\n\n\010endpoint" - + "B\t\n\007message2\310\031\n\014Participants\022\271\002\n\021CreateP" - + "articipant\0229.google.cloud.dialogflow.v2b" - + "eta1.CreateParticipantRequest\032,.google.c" - + "loud.dialogflow.v2beta1.Participant\"\272\001\202\323" - + "\344\223\002\236\001\"9/v2beta1/{parent=projects/*/conve" - + "rsations/*}/participants:\013participantZT\"" - + "E/v2beta1/{parent=projects/*/locations/*" - + "/conversations/*}/participants:\013particip" - + "ant\332A\022parent,participant\022\213\002\n\016GetParticip" - + "ant\0226.google.cloud.dialogflow.v2beta1.Ge" - + "tParticipantRequest\032,.google.cloud.dialo" - + "gflow.v2beta1.Participant\"\222\001\202\323\344\223\002\204\001\0229/v2" - + "beta1/{name=projects/*/conversations/*/p" - + "articipants/*}ZG\022E/v2beta1/{name=project" - + "s/*/locations/*/conversations/*/particip" - + "ants/*}\332A\004name\022\236\002\n\020ListParticipants\0228.go" - + "ogle.cloud.dialogflow.v2beta1.ListPartic" - + "ipantsRequest\0329.google.cloud.dialogflow." - + "v2beta1.ListParticipantsResponse\"\224\001\202\323\344\223\002" - + "\204\001\0229/v2beta1/{parent=projects/*/conversa" - + "tions/*}/participantsZG\022E/v2beta1/{paren" - + "t=projects/*/locations/*/conversations/*" - + "}/participants\332A\006parent\022\326\002\n\021UpdatePartic" - + "ipant\0229.google.cloud.dialogflow.v2beta1." - + "UpdateParticipantRequest\032,.google.cloud." - + "dialogflow.v2beta1.Participant\"\327\001\202\323\344\223\002\266\001" - + "2E/v2beta1/{participant.name=projects/*/" - + "conversations/*/participants/*}:\013partici" - + "pantZ`2Q/v2beta1/{participant.name=proje" - + "cts/*/locations/*/conversations/*/partic" - + "ipants/*}:\013participant\332A\027participant,upd" - + "ate_mask\022\364\002\n\016AnalyzeContent\0226.google.clo" - + "ud.dialogflow.v2beta1.AnalyzeContentRequ" - + "est\0327.google.cloud.dialogflow.v2beta1.An" - + "alyzeContentResponse\"\360\001\202\323\344\223\002\266\001\"O/v2beta1" - + "/{participant=projects/*/conversations/*" - + "/participants/*}:analyzeContent:\001*Z`\"[/v" - + "2beta1/{participant=projects/*/locations" + + "\001(\005:\002\030\001\"\203\007\n\017ResponseMessage\022E\n\004text\030\001 \001(" + + "\01325.google.cloud.dialogflow.v2beta1.Resp" + + "onseMessage.TextH\000\022*\n\007payload\030\002 \001(\0132\027.go" + + "ogle.protobuf.StructH\000\022_\n\022live_agent_han" + + "doff\030\003 \001(\0132A.google.cloud.dialogflow.v2b" + + "eta1.ResponseMessage.LiveAgentHandoffH\000\022" + + "Z\n\017end_interaction\030\004 \001(\0132?.google.cloud." + + "dialogflow.v2beta1.ResponseMessage.EndIn" + + "teractionH\000\022R\n\013mixed_audio\030\005 \001(\0132;.googl" + + "e.cloud.dialogflow.v2beta1.ResponseMessa" + + "ge.MixedAudioH\000\022i\n\027telephony_transfer_ca" + + "ll\030\006 \001(\0132F.google.cloud.dialogflow.v2bet" + + "a1.ResponseMessage.TelephonyTransferCall" + + "H\000\032\024\n\004Text\022\014\n\004text\030\001 \003(\t\032=\n\020LiveAgentHan" + + "doff\022)\n\010metadata\030\001 \001(\0132\027.google.protobuf" + + ".Struct\032\020\n\016EndInteraction\032\276\001\n\nMixedAudio" + + "\022U\n\010segments\030\001 \003(\0132C.google.cloud.dialog" + + "flow.v2beta1.ResponseMessage.MixedAudio." + + "Segment\032Y\n\007Segment\022\017\n\005audio\030\001 \001(\014H\000\022\r\n\003u" + + "ri\030\002 \001(\tH\000\022#\n\033allow_playback_interruptio" + + "n\030\003 \001(\010B\t\n\007content\032N\n\025TelephonyTransferC" + + "all\022\026\n\014phone_number\030\001 \001(\tH\000\022\021\n\007sip_uri\030\002" + + " \001(\tH\000B\n\n\010endpointB\t\n\007message2\355\032\n\014Partic" + + "ipants\022\271\002\n\021CreateParticipant\0229.google.cl" + + "oud.dialogflow.v2beta1.CreateParticipant" + + "Request\032,.google.cloud.dialogflow.v2beta" + + "1.Participant\"\272\001\202\323\344\223\002\236\001\"9/v2beta1/{paren" + + "t=projects/*/conversations/*}/participan" + + "ts:\013participantZT\"E/v2beta1/{parent=proj" + + "ects/*/locations/*/conversations/*}/part" + + "icipants:\013participant\332A\022parent,participa" + + "nt\022\213\002\n\016GetParticipant\0226.google.cloud.dia" + + "logflow.v2beta1.GetParticipantRequest\032,." + + "google.cloud.dialogflow.v2beta1.Particip" + + "ant\"\222\001\202\323\344\223\002\204\001\0229/v2beta1/{name=projects/*" + + "/conversations/*/participants/*}ZG\022E/v2b" + + "eta1/{name=projects/*/locations/*/conver" + + "sations/*/participants/*}\332A\004name\022\236\002\n\020Lis" + + "tParticipants\0228.google.cloud.dialogflow." + + "v2beta1.ListParticipantsRequest\0329.google" + + ".cloud.dialogflow.v2beta1.ListParticipan" + + "tsResponse\"\224\001\202\323\344\223\002\204\001\0229/v2beta1/{parent=p" + + "rojects/*/conversations/*}/participantsZ" + + "G\022E/v2beta1/{parent=projects/*/locations" + + "/*/conversations/*}/participants\332A\006paren" + + "t\022\326\002\n\021UpdateParticipant\0229.google.cloud.d" + + "ialogflow.v2beta1.UpdateParticipantReque" + + "st\032,.google.cloud.dialogflow.v2beta1.Par" + + "ticipant\"\327\001\202\323\344\223\002\266\0012E/v2beta1/{participan" + + "t.name=projects/*/conversations/*/partic" + + "ipants/*}:\013participantZ`2Q/v2beta1/{part" + + "icipant.name=projects/*/locations/*/conv" + + "ersations/*/participants/*}:\013participant" + + "\332A\027participant,update_mask\022\364\002\n\016AnalyzeCo" + + "ntent\0226.google.cloud.dialogflow.v2beta1." + + "AnalyzeContentRequest\0327.google.cloud.dia" + + "logflow.v2beta1.AnalyzeContentResponse\"\360" + + "\001\202\323\344\223\002\266\001\"O/v2beta1/{participant=projects" + "/*/conversations/*/participants/*}:analy" - + "zeContent:\001*\332A\026participant,text_input\332A\027" - + "participant,event_input\022\335\002\n\017SuggestArtic" - + "les\0227.google.cloud.dialogflow.v2beta1.Su" - + "ggestArticlesRequest\0328.google.cloud.dial" - + "ogflow.v2beta1.SuggestArticlesResponse\"\326" - + "\001\202\323\344\223\002\306\001\"W/v2beta1/{parent=projects/*/co" - + "nversations/*/participants/*}/suggestion" - + "s:suggestArticles:\001*Zh\"c/v2beta1/{parent" - + "=projects/*/locations/*/conversations/*/" - + "participants/*}/suggestions:suggestArtic" - + "les:\001*\332A\006parent\022\347\002\n\021SuggestFaqAnswers\0229." - + "google.cloud.dialogflow.v2beta1.SuggestF" - + "aqAnswersRequest\032:.google.cloud.dialogfl" - + "ow.v2beta1.SuggestFaqAnswersResponse\"\332\001\202" - + "\323\344\223\002\312\001\"Y/v2beta1/{parent=projects/*/conv" - + "ersations/*/participants/*}/suggestions:" - + "suggestFaqAnswers:\001*Zj\"e/v2beta1/{parent" - + "=projects/*/locations/*/conversations/*/" - + "participants/*}/suggestions:suggestFaqAn" - + "swers:\001*\332A\006parent\022\361\002\n\023SuggestSmartReplie" - + "s\022;.google.cloud.dialogflow.v2beta1.Sugg" - + "estSmartRepliesRequest\032<.google.cloud.di" - + "alogflow.v2beta1.SuggestSmartRepliesResp" - + "onse\"\336\001\202\323\344\223\002\316\001\"[/v2beta1/{parent=project" - + "s/*/conversations/*/participants/*}/sugg" - + "estions:suggestSmartReplies:\001*Zl\"g/v2bet" - + "a1/{parent=projects/*/locations/*/conver" - + "sations/*/participants/*}/suggestions:su" - + "ggestSmartReplies:\001*\332A\006parent\022\330\001\n\017ListSu" - + "ggestions\0227.google.cloud.dialogflow.v2be" - + "ta1.ListSuggestionsRequest\0328.google.clou" - + "d.dialogflow.v2beta1.ListSuggestionsResp" - + "onse\"R\210\002\001\202\323\344\223\002I\022G/v2beta1/{parent=projec" - + "ts/*/conversations/*/participants/*}/sug" - + "gestions\022\351\001\n\021CompileSuggestion\0229.google." - + "cloud.dialogflow.v2beta1.CompileSuggesti" - + "onRequest\032:.google.cloud.dialogflow.v2be" - + "ta1.CompileSuggestionResponse\"]\210\002\001\202\323\344\223\002T" - + "\"O/v2beta1/{parent=projects/*/conversati" - + "ons/*/participants/*}/suggestions:compil" - + "e:\001*\032x\312A\031dialogflow.googleapis.com\322AYhtt" - + "ps://www.googleapis.com/auth/cloud-platf" - + "orm,https://www.googleapis.com/auth/dial" - + "ogflowB\256\001\n#com.google.cloud.dialogflow.v" - + "2beta1B\020ParticipantProtoP\001ZIgoogle.golan" - + "g.org/genproto/googleapis/cloud/dialogfl" - + "ow/v2beta1;dialogflow\370\001\001\242\002\002DF\252\002\037Google.C" - + "loud.Dialogflow.V2beta1b\006proto3" + + "zeContent:\001*Z`\"[/v2beta1/{participant=pr" + + "ojects/*/locations/*/conversations/*/par" + + "ticipants/*}:analyzeContent:\001*\332A\026partici" + + "pant,text_input\332A\027participant,event_inpu" + + "t\022\242\001\n\027StreamingAnalyzeContent\022?.google.c" + + "loud.dialogflow.v2beta1.StreamingAnalyze" + + "ContentRequest\032@.google.cloud.dialogflow" + + ".v2beta1.StreamingAnalyzeContentResponse" + + "\"\000(\0010\001\022\335\002\n\017SuggestArticles\0227.google.clou" + + "d.dialogflow.v2beta1.SuggestArticlesRequ" + + "est\0328.google.cloud.dialogflow.v2beta1.Su" + + "ggestArticlesResponse\"\326\001\202\323\344\223\002\306\001\"W/v2beta" + + "1/{parent=projects/*/conversations/*/par" + + "ticipants/*}/suggestions:suggestArticles" + + ":\001*Zh\"c/v2beta1/{parent=projects/*/locat" + + "ions/*/conversations/*/participants/*}/s" + + "uggestions:suggestArticles:\001*\332A\006parent\022\347" + + "\002\n\021SuggestFaqAnswers\0229.google.cloud.dial" + + "ogflow.v2beta1.SuggestFaqAnswersRequest\032" + + ":.google.cloud.dialogflow.v2beta1.Sugges" + + "tFaqAnswersResponse\"\332\001\202\323\344\223\002\312\001\"Y/v2beta1/" + + "{parent=projects/*/conversations/*/parti" + + "cipants/*}/suggestions:suggestFaqAnswers" + + ":\001*Zj\"e/v2beta1/{parent=projects/*/locat" + + "ions/*/conversations/*/participants/*}/s" + + "uggestions:suggestFaqAnswers:\001*\332A\006parent" + + "\022\361\002\n\023SuggestSmartReplies\022;.google.cloud." + + "dialogflow.v2beta1.SuggestSmartRepliesRe" + + "quest\032<.google.cloud.dialogflow.v2beta1." + + "SuggestSmartRepliesResponse\"\336\001\202\323\344\223\002\316\001\"[/" + + "v2beta1/{parent=projects/*/conversations" + + "/*/participants/*}/suggestions:suggestSm" + + "artReplies:\001*Zl\"g/v2beta1/{parent=projec" + + "ts/*/locations/*/conversations/*/partici" + + "pants/*}/suggestions:suggestSmartReplies" + + ":\001*\332A\006parent\022\330\001\n\017ListSuggestions\0227.googl" + + "e.cloud.dialogflow.v2beta1.ListSuggestio" + + "nsRequest\0328.google.cloud.dialogflow.v2be" + + "ta1.ListSuggestionsResponse\"R\210\002\001\202\323\344\223\002I\022G" + + "/v2beta1/{parent=projects/*/conversation" + + "s/*/participants/*}/suggestions\022\351\001\n\021Comp" + + "ileSuggestion\0229.google.cloud.dialogflow." + + "v2beta1.CompileSuggestionRequest\032:.googl" + + "e.cloud.dialogflow.v2beta1.CompileSugges" + + "tionResponse\"]\210\002\001\202\323\344\223\002T\"O/v2beta1/{paren" + + "t=projects/*/conversations/*/participant" + + "s/*}/suggestions:compile:\001*\032x\312A\031dialogfl" + + "ow.googleapis.com\322AYhttps://www.googleap" + + "is.com/auth/cloud-platform,https://www.g" + + "oogleapis.com/auth/dialogflowB\256\001\n#com.go" + + "ogle.cloud.dialogflow.v2beta1B\020Participa" + + "ntProtoP\001ZIgoogle.golang.org/genproto/go" + + "ogleapis/cloud/dialogflow/v2beta1;dialog" + + "flow\370\001\001\242\002\002DF\252\002\037Google.Cloud.Dialogflow.V" + + "2beta1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -675,6 +742,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ReplyAudioConfig", "QueryParams", "AssistQueryParams", + "CxParameters", "MessageSendTime", "RequestId", "Input", @@ -701,8 +769,51 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "EndUserSuggestionResults", "DtmfParameters", }); - internal_static_google_cloud_dialogflow_v2beta1_AnnotatedMessagePart_descriptor = + internal_static_google_cloud_dialogflow_v2beta1_InputTextConfig_descriptor = getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_dialogflow_v2beta1_InputTextConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_v2beta1_InputTextConfig_descriptor, + new java.lang.String[] { + "LanguageCode", + }); + internal_static_google_cloud_dialogflow_v2beta1_StreamingAnalyzeContentRequest_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_dialogflow_v2beta1_StreamingAnalyzeContentRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_v2beta1_StreamingAnalyzeContentRequest_descriptor, + new java.lang.String[] { + "Participant", + "AudioConfig", + "TextConfig", + "ReplyAudioConfig", + "InputAudio", + "InputText", + "InputDtmf", + "QueryParams", + "AssistQueryParams", + "CxParameters", + "EnablePartialAutomatedAgentReply", + "Config", + "Input", + }); + internal_static_google_cloud_dialogflow_v2beta1_StreamingAnalyzeContentResponse_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_dialogflow_v2beta1_StreamingAnalyzeContentResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_v2beta1_StreamingAnalyzeContentResponse_descriptor, + new java.lang.String[] { + "RecognitionResult", + "ReplyText", + "ReplyAudio", + "AutomatedAgentReply", + "Message", + "HumanAgentSuggestionResults", + "EndUserSuggestionResults", + "DtmfParameters", + }); + internal_static_google_cloud_dialogflow_v2beta1_AnnotatedMessagePart_descriptor = + getDescriptor().getMessageTypes().get(17); internal_static_google_cloud_dialogflow_v2beta1_AnnotatedMessagePart_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_v2beta1_AnnotatedMessagePart_descriptor, @@ -710,7 +821,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Text", "EntityType", "FormattedValue", }); internal_static_google_cloud_dialogflow_v2beta1_MessageAnnotation_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageTypes().get(18); internal_static_google_cloud_dialogflow_v2beta1_MessageAnnotation_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_v2beta1_MessageAnnotation_descriptor, @@ -718,7 +829,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parts", "ContainEntities", }); internal_static_google_cloud_dialogflow_v2beta1_ArticleAnswer_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageTypes().get(19); internal_static_google_cloud_dialogflow_v2beta1_ArticleAnswer_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_v2beta1_ArticleAnswer_descriptor, @@ -736,7 +847,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_cloud_dialogflow_v2beta1_FaqAnswer_descriptor = - getDescriptor().getMessageTypes().get(17); + getDescriptor().getMessageTypes().get(20); internal_static_google_cloud_dialogflow_v2beta1_FaqAnswer_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_v2beta1_FaqAnswer_descriptor, @@ -754,7 +865,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_cloud_dialogflow_v2beta1_SmartReplyAnswer_descriptor = - getDescriptor().getMessageTypes().get(18); + getDescriptor().getMessageTypes().get(21); internal_static_google_cloud_dialogflow_v2beta1_SmartReplyAnswer_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_v2beta1_SmartReplyAnswer_descriptor, @@ -762,7 +873,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Reply", "Confidence", "AnswerRecord", }); internal_static_google_cloud_dialogflow_v2beta1_SuggestionResult_descriptor = - getDescriptor().getMessageTypes().get(19); + getDescriptor().getMessageTypes().get(22); internal_static_google_cloud_dialogflow_v2beta1_SuggestionResult_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_v2beta1_SuggestionResult_descriptor, @@ -774,7 +885,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "SuggestionResponse", }); internal_static_google_cloud_dialogflow_v2beta1_SuggestArticlesRequest_descriptor = - getDescriptor().getMessageTypes().get(20); + getDescriptor().getMessageTypes().get(23); internal_static_google_cloud_dialogflow_v2beta1_SuggestArticlesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_v2beta1_SuggestArticlesRequest_descriptor, @@ -782,7 +893,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "LatestMessage", "ContextSize", "AssistQueryParams", }); internal_static_google_cloud_dialogflow_v2beta1_SuggestArticlesResponse_descriptor = - getDescriptor().getMessageTypes().get(21); + getDescriptor().getMessageTypes().get(24); internal_static_google_cloud_dialogflow_v2beta1_SuggestArticlesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_v2beta1_SuggestArticlesResponse_descriptor, @@ -790,7 +901,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ArticleAnswers", "LatestMessage", "ContextSize", }); internal_static_google_cloud_dialogflow_v2beta1_SuggestFaqAnswersRequest_descriptor = - getDescriptor().getMessageTypes().get(22); + getDescriptor().getMessageTypes().get(25); internal_static_google_cloud_dialogflow_v2beta1_SuggestFaqAnswersRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_v2beta1_SuggestFaqAnswersRequest_descriptor, @@ -798,7 +909,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "LatestMessage", "ContextSize", "AssistQueryParams", }); internal_static_google_cloud_dialogflow_v2beta1_SuggestFaqAnswersResponse_descriptor = - getDescriptor().getMessageTypes().get(23); + getDescriptor().getMessageTypes().get(26); internal_static_google_cloud_dialogflow_v2beta1_SuggestFaqAnswersResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_v2beta1_SuggestFaqAnswersResponse_descriptor, @@ -806,7 +917,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "FaqAnswers", "LatestMessage", "ContextSize", }); internal_static_google_cloud_dialogflow_v2beta1_SuggestSmartRepliesRequest_descriptor = - getDescriptor().getMessageTypes().get(24); + getDescriptor().getMessageTypes().get(27); internal_static_google_cloud_dialogflow_v2beta1_SuggestSmartRepliesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_v2beta1_SuggestSmartRepliesRequest_descriptor, @@ -814,7 +925,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "CurrentTextInput", "LatestMessage", "ContextSize", }); internal_static_google_cloud_dialogflow_v2beta1_SuggestSmartRepliesResponse_descriptor = - getDescriptor().getMessageTypes().get(25); + getDescriptor().getMessageTypes().get(28); internal_static_google_cloud_dialogflow_v2beta1_SuggestSmartRepliesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_v2beta1_SuggestSmartRepliesResponse_descriptor, @@ -822,7 +933,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "SmartReplyAnswers", "LatestMessage", "ContextSize", }); internal_static_google_cloud_dialogflow_v2beta1_Suggestion_descriptor = - getDescriptor().getMessageTypes().get(26); + getDescriptor().getMessageTypes().get(29); internal_static_google_cloud_dialogflow_v2beta1_Suggestion_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_v2beta1_Suggestion_descriptor, @@ -870,7 +981,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_cloud_dialogflow_v2beta1_ListSuggestionsRequest_descriptor = - getDescriptor().getMessageTypes().get(27); + getDescriptor().getMessageTypes().get(30); internal_static_google_cloud_dialogflow_v2beta1_ListSuggestionsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_v2beta1_ListSuggestionsRequest_descriptor, @@ -878,7 +989,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", "Filter", }); internal_static_google_cloud_dialogflow_v2beta1_ListSuggestionsResponse_descriptor = - getDescriptor().getMessageTypes().get(28); + getDescriptor().getMessageTypes().get(31); internal_static_google_cloud_dialogflow_v2beta1_ListSuggestionsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_v2beta1_ListSuggestionsResponse_descriptor, @@ -886,7 +997,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Suggestions", "NextPageToken", }); internal_static_google_cloud_dialogflow_v2beta1_CompileSuggestionRequest_descriptor = - getDescriptor().getMessageTypes().get(29); + getDescriptor().getMessageTypes().get(32); internal_static_google_cloud_dialogflow_v2beta1_CompileSuggestionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_v2beta1_CompileSuggestionRequest_descriptor, @@ -894,7 +1005,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "LatestMessage", "ContextSize", }); internal_static_google_cloud_dialogflow_v2beta1_CompileSuggestionResponse_descriptor = - getDescriptor().getMessageTypes().get(30); + getDescriptor().getMessageTypes().get(33); internal_static_google_cloud_dialogflow_v2beta1_CompileSuggestionResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_v2beta1_CompileSuggestionResponse_descriptor, @@ -902,7 +1013,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Suggestion", "LatestMessage", "ContextSize", }); internal_static_google_cloud_dialogflow_v2beta1_ResponseMessage_descriptor = - getDescriptor().getMessageTypes().get(31); + getDescriptor().getMessageTypes().get(34); internal_static_google_cloud_dialogflow_v2beta1_ResponseMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_v2beta1_ResponseMessage_descriptor, @@ -911,6 +1022,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Payload", "LiveAgentHandoff", "EndInteraction", + "MixedAudio", "TelephonyTransferCall", "Message", }); @@ -942,10 +1054,30 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_v2beta1_ResponseMessage_EndInteraction_descriptor, new java.lang.String[] {}); - internal_static_google_cloud_dialogflow_v2beta1_ResponseMessage_TelephonyTransferCall_descriptor = + internal_static_google_cloud_dialogflow_v2beta1_ResponseMessage_MixedAudio_descriptor = internal_static_google_cloud_dialogflow_v2beta1_ResponseMessage_descriptor .getNestedTypes() .get(3); + internal_static_google_cloud_dialogflow_v2beta1_ResponseMessage_MixedAudio_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_v2beta1_ResponseMessage_MixedAudio_descriptor, + new java.lang.String[] { + "Segments", + }); + internal_static_google_cloud_dialogflow_v2beta1_ResponseMessage_MixedAudio_Segment_descriptor = + internal_static_google_cloud_dialogflow_v2beta1_ResponseMessage_MixedAudio_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_dialogflow_v2beta1_ResponseMessage_MixedAudio_Segment_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_v2beta1_ResponseMessage_MixedAudio_Segment_descriptor, + new java.lang.String[] { + "Audio", "Uri", "AllowPlaybackInterruption", "Content", + }); + internal_static_google_cloud_dialogflow_v2beta1_ResponseMessage_TelephonyTransferCall_descriptor = + internal_static_google_cloud_dialogflow_v2beta1_ResponseMessage_descriptor + .getNestedTypes() + .get(4); internal_static_google_cloud_dialogflow_v2beta1_ResponseMessage_TelephonyTransferCall_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_v2beta1_ResponseMessage_TelephonyTransferCall_descriptor, diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ResponseMessage.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ResponseMessage.java index 109380cdf..37367a01f 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ResponseMessage.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ResponseMessage.java @@ -146,6 +146,27 @@ private ResponseMessage( messageCase_ = 4; break; } + case 42: + { + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Builder subBuilder = + null; + if (messageCase_ == 5) { + subBuilder = + ((com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio) message_) + .toBuilder(); + } + message_ = + input.readMessage( + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio) message_); + message_ = subBuilder.buildPartial(); + } + messageCase_ = 5; + break; + } case 50: { com.google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall.Builder @@ -2148,45 +2169,2275 @@ public Builder mergeFrom(com.google.protobuf.Message other) { return mergeFrom( (com.google.cloud.dialogflow.v2beta1.ResponseMessage.EndInteraction) other); } else { - super.mergeFrom(other); - return this; + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.v2beta1.ResponseMessage.EndInteraction other) { + if (other + == com.google.cloud.dialogflow.v2beta1.ResponseMessage.EndInteraction + .getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.v2beta1.ResponseMessage.EndInteraction parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.v2beta1.ResponseMessage.EndInteraction) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2beta1.ResponseMessage.EndInteraction) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.ResponseMessage.EndInteraction) + private static final com.google.cloud.dialogflow.v2beta1.ResponseMessage.EndInteraction + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2beta1.ResponseMessage.EndInteraction(); + } + + public static com.google.cloud.dialogflow.v2beta1.ResponseMessage.EndInteraction + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EndInteraction parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new EndInteraction(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.ResponseMessage.EndInteraction + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface MixedAudioOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Segments this audio response is composed of.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + java.util.List + getSegmentsList(); + /** + * + * + *
+     * Segments this audio response is composed of.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment getSegments(int index); + /** + * + * + *
+     * Segments this audio response is composed of.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + int getSegmentsCount(); + /** + * + * + *
+     * Segments this audio response is composed of.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + java.util.List< + ? extends + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.SegmentOrBuilder> + getSegmentsOrBuilderList(); + /** + * + * + *
+     * Segments this audio response is composed of.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.SegmentOrBuilder + getSegmentsOrBuilder(int index); + } + /** + * + * + *
+   * Represents an audio message that is composed of both segments
+   * synthesized from the Dialogflow agent prompts and ones hosted externally
+   * at the specified URIs.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio} + */ + public static final class MixedAudio extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio) + MixedAudioOrBuilder { + private static final long serialVersionUID = 0L; + // Use MixedAudio.newBuilder() to construct. + private MixedAudio(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MixedAudio() { + segments_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MixedAudio(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private MixedAudio( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + segments_ = + new java.util.ArrayList< + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment>(); + mutable_bitField0_ |= 0x00000001; + } + segments_.add( + input.readMessage( + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment + .parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + segments_ = java.util.Collections.unmodifiableList(segments_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2beta1.ParticipantProto + .internal_static_google_cloud_dialogflow_v2beta1_ResponseMessage_MixedAudio_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2beta1.ParticipantProto + .internal_static_google_cloud_dialogflow_v2beta1_ResponseMessage_MixedAudio_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.class, + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Builder.class); + } + + public interface SegmentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Raw audio synthesized from the Dialogflow agent's response using
+       * the output config specified in the request.
+       * 
+ * + * bytes audio = 1; + * + * @return Whether the audio field is set. + */ + boolean hasAudio(); + /** + * + * + *
+       * Raw audio synthesized from the Dialogflow agent's response using
+       * the output config specified in the request.
+       * 
+ * + * bytes audio = 1; + * + * @return The audio. + */ + com.google.protobuf.ByteString getAudio(); + + /** + * + * + *
+       * Client-specific URI that points to an audio clip accessible to the
+       * client.
+       * 
+ * + * string uri = 2; + * + * @return Whether the uri field is set. + */ + boolean hasUri(); + /** + * + * + *
+       * Client-specific URI that points to an audio clip accessible to the
+       * client.
+       * 
+ * + * string uri = 2; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+       * Client-specific URI that points to an audio clip accessible to the
+       * client.
+       * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+       * Whether the playback of this segment can be interrupted by the end
+       * user's speech and the client should then start the next Dialogflow
+       * request.
+       * 
+ * + * bool allow_playback_interruption = 3; + * + * @return The allowPlaybackInterruption. + */ + boolean getAllowPlaybackInterruption(); + + public com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment.ContentCase + getContentCase(); + } + /** + * + * + *
+     * Represents one segment of audio.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment} + */ + public static final class Segment extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment) + SegmentOrBuilder { + private static final long serialVersionUID = 0L; + // Use Segment.newBuilder() to construct. + private Segment(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Segment() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Segment(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Segment( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + content_ = input.readBytes(); + contentCase_ = 1; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + contentCase_ = 2; + content_ = s; + break; + } + case 24: + { + allowPlaybackInterruption_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2beta1.ParticipantProto + .internal_static_google_cloud_dialogflow_v2beta1_ResponseMessage_MixedAudio_Segment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2beta1.ParticipantProto + .internal_static_google_cloud_dialogflow_v2beta1_ResponseMessage_MixedAudio_Segment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment.class, + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment.Builder + .class); + } + + private int contentCase_ = 0; + private java.lang.Object content_; + + public enum ContentCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + AUDIO(1), + URI(2), + CONTENT_NOT_SET(0); + private final int value; + + private ContentCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ContentCase valueOf(int value) { + return forNumber(value); + } + + public static ContentCase forNumber(int value) { + switch (value) { + case 1: + return AUDIO; + case 2: + return URI; + case 0: + return CONTENT_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ContentCase getContentCase() { + return ContentCase.forNumber(contentCase_); + } + + public static final int AUDIO_FIELD_NUMBER = 1; + /** + * + * + *
+       * Raw audio synthesized from the Dialogflow agent's response using
+       * the output config specified in the request.
+       * 
+ * + * bytes audio = 1; + * + * @return Whether the audio field is set. + */ + @java.lang.Override + public boolean hasAudio() { + return contentCase_ == 1; + } + /** + * + * + *
+       * Raw audio synthesized from the Dialogflow agent's response using
+       * the output config specified in the request.
+       * 
+ * + * bytes audio = 1; + * + * @return The audio. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAudio() { + if (contentCase_ == 1) { + return (com.google.protobuf.ByteString) content_; + } + return com.google.protobuf.ByteString.EMPTY; + } + + public static final int URI_FIELD_NUMBER = 2; + /** + * + * + *
+       * Client-specific URI that points to an audio clip accessible to the
+       * client.
+       * 
+ * + * string uri = 2; + * + * @return Whether the uri field is set. + */ + public boolean hasUri() { + return contentCase_ == 2; + } + /** + * + * + *
+       * Client-specific URI that points to an audio clip accessible to the
+       * client.
+       * 
+ * + * string uri = 2; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = ""; + if (contentCase_ == 2) { + ref = content_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (contentCase_ == 2) { + content_ = s; + } + return s; + } + } + /** + * + * + *
+       * Client-specific URI that points to an audio clip accessible to the
+       * client.
+       * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = ""; + if (contentCase_ == 2) { + ref = content_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (contentCase_ == 2) { + content_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ALLOW_PLAYBACK_INTERRUPTION_FIELD_NUMBER = 3; + private boolean allowPlaybackInterruption_; + /** + * + * + *
+       * Whether the playback of this segment can be interrupted by the end
+       * user's speech and the client should then start the next Dialogflow
+       * request.
+       * 
+ * + * bool allow_playback_interruption = 3; + * + * @return The allowPlaybackInterruption. + */ + @java.lang.Override + public boolean getAllowPlaybackInterruption() { + return allowPlaybackInterruption_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (contentCase_ == 1) { + output.writeBytes(1, (com.google.protobuf.ByteString) content_); + } + if (contentCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, content_); + } + if (allowPlaybackInterruption_ != false) { + output.writeBool(3, allowPlaybackInterruption_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (contentCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeBytesSize( + 1, (com.google.protobuf.ByteString) content_); + } + if (contentCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, content_); + } + if (allowPlaybackInterruption_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(3, allowPlaybackInterruption_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment other = + (com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment) obj; + + if (getAllowPlaybackInterruption() != other.getAllowPlaybackInterruption()) return false; + if (!getContentCase().equals(other.getContentCase())) return false; + switch (contentCase_) { + case 1: + if (!getAudio().equals(other.getAudio())) return false; + break; + case 2: + if (!getUri().equals(other.getUri())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ALLOW_PLAYBACK_INTERRUPTION_FIELD_NUMBER; + hash = + (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowPlaybackInterruption()); + switch (contentCase_) { + case 1: + hash = (37 * hash) + AUDIO_FIELD_NUMBER; + hash = (53 * hash) + getAudio().hashCode(); + break; + case 2: + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * Represents one segment of audio.
+       * 
+ * + * Protobuf type {@code google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment) + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.SegmentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2beta1.ParticipantProto + .internal_static_google_cloud_dialogflow_v2beta1_ResponseMessage_MixedAudio_Segment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2beta1.ParticipantProto + .internal_static_google_cloud_dialogflow_v2beta1_ResponseMessage_MixedAudio_Segment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment.class, + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment.Builder + .class); + } + + // Construct using + // com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + allowPlaybackInterruption_ = false; + + contentCase_ = 0; + content_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.v2beta1.ParticipantProto + .internal_static_google_cloud_dialogflow_v2beta1_ResponseMessage_MixedAudio_Segment_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment build() { + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment + buildPartial() { + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment result = + new com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment(this); + if (contentCase_ == 1) { + result.content_ = content_; + } + if (contentCase_ == 2) { + result.content_ = content_; + } + result.allowPlaybackInterruption_ = allowPlaybackInterruption_; + result.contentCase_ = contentCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment) { + return mergeFrom( + (com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment other) { + if (other + == com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment + .getDefaultInstance()) return this; + if (other.getAllowPlaybackInterruption() != false) { + setAllowPlaybackInterruption(other.getAllowPlaybackInterruption()); + } + switch (other.getContentCase()) { + case AUDIO: + { + setAudio(other.getAudio()); + break; + } + case URI: + { + contentCase_ = 2; + content_ = other.content_; + onChanged(); + break; + } + case CONTENT_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int contentCase_ = 0; + private java.lang.Object content_; + + public ContentCase getContentCase() { + return ContentCase.forNumber(contentCase_); + } + + public Builder clearContent() { + contentCase_ = 0; + content_ = null; + onChanged(); + return this; + } + + /** + * + * + *
+         * Raw audio synthesized from the Dialogflow agent's response using
+         * the output config specified in the request.
+         * 
+ * + * bytes audio = 1; + * + * @return Whether the audio field is set. + */ + public boolean hasAudio() { + return contentCase_ == 1; + } + /** + * + * + *
+         * Raw audio synthesized from the Dialogflow agent's response using
+         * the output config specified in the request.
+         * 
+ * + * bytes audio = 1; + * + * @return The audio. + */ + public com.google.protobuf.ByteString getAudio() { + if (contentCase_ == 1) { + return (com.google.protobuf.ByteString) content_; + } + return com.google.protobuf.ByteString.EMPTY; + } + /** + * + * + *
+         * Raw audio synthesized from the Dialogflow agent's response using
+         * the output config specified in the request.
+         * 
+ * + * bytes audio = 1; + * + * @param value The audio to set. + * @return This builder for chaining. + */ + public Builder setAudio(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + contentCase_ = 1; + content_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Raw audio synthesized from the Dialogflow agent's response using
+         * the output config specified in the request.
+         * 
+ * + * bytes audio = 1; + * + * @return This builder for chaining. + */ + public Builder clearAudio() { + if (contentCase_ == 1) { + contentCase_ = 0; + content_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+         * Client-specific URI that points to an audio clip accessible to the
+         * client.
+         * 
+ * + * string uri = 2; + * + * @return Whether the uri field is set. + */ + @java.lang.Override + public boolean hasUri() { + return contentCase_ == 2; + } + /** + * + * + *
+         * Client-specific URI that points to an audio clip accessible to the
+         * client.
+         * 
+ * + * string uri = 2; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = ""; + if (contentCase_ == 2) { + ref = content_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (contentCase_ == 2) { + content_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Client-specific URI that points to an audio clip accessible to the
+         * client.
+         * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = ""; + if (contentCase_ == 2) { + ref = content_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (contentCase_ == 2) { + content_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Client-specific URI that points to an audio clip accessible to the
+         * client.
+         * 
+ * + * string uri = 2; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + contentCase_ = 2; + content_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Client-specific URI that points to an audio clip accessible to the
+         * client.
+         * 
+ * + * string uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + if (contentCase_ == 2) { + contentCase_ = 0; + content_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+         * Client-specific URI that points to an audio clip accessible to the
+         * client.
+         * 
+ * + * string uri = 2; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + contentCase_ = 2; + content_ = value; + onChanged(); + return this; + } + + private boolean allowPlaybackInterruption_; + /** + * + * + *
+         * Whether the playback of this segment can be interrupted by the end
+         * user's speech and the client should then start the next Dialogflow
+         * request.
+         * 
+ * + * bool allow_playback_interruption = 3; + * + * @return The allowPlaybackInterruption. + */ + @java.lang.Override + public boolean getAllowPlaybackInterruption() { + return allowPlaybackInterruption_; + } + /** + * + * + *
+         * Whether the playback of this segment can be interrupted by the end
+         * user's speech and the client should then start the next Dialogflow
+         * request.
+         * 
+ * + * bool allow_playback_interruption = 3; + * + * @param value The allowPlaybackInterruption to set. + * @return This builder for chaining. + */ + public Builder setAllowPlaybackInterruption(boolean value) { + + allowPlaybackInterruption_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Whether the playback of this segment can be interrupted by the end
+         * user's speech and the client should then start the next Dialogflow
+         * request.
+         * 
+ * + * bool allow_playback_interruption = 3; + * + * @return This builder for chaining. + */ + public Builder clearAllowPlaybackInterruption() { + + allowPlaybackInterruption_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment) + private static final com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment(); + } + + public static com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Segment parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Segment(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int SEGMENTS_FIELD_NUMBER = 1; + private java.util.List + segments_; + /** + * + * + *
+     * Segments this audio response is composed of.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + @java.lang.Override + public java.util.List + getSegmentsList() { + return segments_; + } + /** + * + * + *
+     * Segments this audio response is composed of.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.SegmentOrBuilder> + getSegmentsOrBuilderList() { + return segments_; + } + /** + * + * + *
+     * Segments this audio response is composed of.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + @java.lang.Override + public int getSegmentsCount() { + return segments_.size(); + } + /** + * + * + *
+     * Segments this audio response is composed of.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment getSegments( + int index) { + return segments_.get(index); + } + /** + * + * + *
+     * Segments this audio response is composed of.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.SegmentOrBuilder + getSegmentsOrBuilder(int index) { + return segments_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < segments_.size(); i++) { + output.writeMessage(1, segments_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < segments_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, segments_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio other = + (com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio) obj; + + if (!getSegmentsList().equals(other.getSegmentsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getSegmentsCount() > 0) { + hash = (37 * hash) + SEGMENTS_FIELD_NUMBER; + hash = (53 * hash) + getSegmentsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Represents an audio message that is composed of both segments
+     * synthesized from the Dialogflow agent prompts and ones hosted externally
+     * at the specified URIs.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio) + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudioOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2beta1.ParticipantProto + .internal_static_google_cloud_dialogflow_v2beta1_ResponseMessage_MixedAudio_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2beta1.ParticipantProto + .internal_static_google_cloud_dialogflow_v2beta1_ResponseMessage_MixedAudio_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.class, + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getSegmentsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (segmentsBuilder_ == null) { + segments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + segmentsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.v2beta1.ParticipantProto + .internal_static_google_cloud_dialogflow_v2beta1_ResponseMessage_MixedAudio_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio build() { + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio buildPartial() { + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio result = + new com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio(this); + int from_bitField0_ = bitField0_; + if (segmentsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + segments_ = java.util.Collections.unmodifiableList(segments_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.segments_ = segments_; + } else { + result.segments_ = segmentsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio) { + return mergeFrom((com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio other) { + if (other + == com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.getDefaultInstance()) + return this; + if (segmentsBuilder_ == null) { + if (!other.segments_.isEmpty()) { + if (segments_.isEmpty()) { + segments_ = other.segments_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSegmentsIsMutable(); + segments_.addAll(other.segments_); + } + onChanged(); + } + } else { + if (!other.segments_.isEmpty()) { + if (segmentsBuilder_.isEmpty()) { + segmentsBuilder_.dispose(); + segmentsBuilder_ = null; + segments_ = other.segments_; + bitField0_ = (bitField0_ & ~0x00000001); + segmentsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSegmentsFieldBuilder() + : null; + } else { + segmentsBuilder_.addAllMessages(other.segments_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List + segments_ = java.util.Collections.emptyList(); + + private void ensureSegmentsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + segments_ = + new java.util.ArrayList< + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment>( + segments_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment, + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment.Builder, + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.SegmentOrBuilder> + segmentsBuilder_; + + /** + * + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + public java.util.List + getSegmentsList() { + if (segmentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(segments_); + } else { + return segmentsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + public int getSegmentsCount() { + if (segmentsBuilder_ == null) { + return segments_.size(); + } else { + return segmentsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + public com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment getSegments( + int index) { + if (segmentsBuilder_ == null) { + return segments_.get(index); + } else { + return segmentsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + public Builder setSegments( + int index, com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment value) { + if (segmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSegmentsIsMutable(); + segments_.set(index, value); + onChanged(); + } else { + segmentsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + public Builder setSegments( + int index, + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment.Builder + builderForValue) { + if (segmentsBuilder_ == null) { + ensureSegmentsIsMutable(); + segments_.set(index, builderForValue.build()); + onChanged(); + } else { + segmentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + public Builder addSegments( + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment value) { + if (segmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSegmentsIsMutable(); + segments_.add(value); + onChanged(); + } else { + segmentsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + public Builder addSegments( + int index, com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment value) { + if (segmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSegmentsIsMutable(); + segments_.add(index, value); + onChanged(); + } else { + segmentsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + public Builder addSegments( + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment.Builder + builderForValue) { + if (segmentsBuilder_ == null) { + ensureSegmentsIsMutable(); + segments_.add(builderForValue.build()); + onChanged(); + } else { + segmentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + public Builder addSegments( + int index, + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment.Builder + builderForValue) { + if (segmentsBuilder_ == null) { + ensureSegmentsIsMutable(); + segments_.add(index, builderForValue.build()); + onChanged(); + } else { + segmentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + public Builder addAllSegments( + java.lang.Iterable< + ? extends com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment> + values) { + if (segmentsBuilder_ == null) { + ensureSegmentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, segments_); + onChanged(); + } else { + segmentsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + public Builder clearSegments() { + if (segmentsBuilder_ == null) { + segments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + segmentsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + public Builder removeSegments(int index) { + if (segmentsBuilder_ == null) { + ensureSegmentsIsMutable(); + segments_.remove(index); + onChanged(); + } else { + segmentsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + public com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment.Builder + getSegmentsBuilder(int index) { + return getSegmentsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + public com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.SegmentOrBuilder + getSegmentsOrBuilder(int index) { + if (segmentsBuilder_ == null) { + return segments_.get(index); + } else { + return segmentsBuilder_.getMessageOrBuilder(index); } } - - public Builder mergeFrom( - com.google.cloud.dialogflow.v2beta1.ResponseMessage.EndInteraction other) { - if (other - == com.google.cloud.dialogflow.v2beta1.ResponseMessage.EndInteraction - .getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; + /** + * + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + public java.util.List< + ? extends + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.SegmentOrBuilder> + getSegmentsOrBuilderList() { + if (segmentsBuilder_ != null) { + return segmentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(segments_); + } } - - @java.lang.Override - public final boolean isInitialized() { - return true; + /** + * + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + public com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment.Builder + addSegmentsBuilder() { + return getSegmentsFieldBuilder() + .addBuilder( + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment + .getDefaultInstance()); } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.dialogflow.v2beta1.ResponseMessage.EndInteraction parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dialogflow.v2beta1.ResponseMessage.EndInteraction) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + /** + * + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + public com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment.Builder + addSegmentsBuilder(int index) { + return getSegmentsFieldBuilder() + .addBuilder( + index, + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment + .getDefaultInstance()); + } + /** + * + * + *
+       * Segments this audio response is composed of.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment segments = 1; + * + */ + public java.util.List< + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment.Builder> + getSegmentsBuilderList() { + return getSegmentsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment, + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment.Builder, + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.SegmentOrBuilder> + getSegmentsFieldBuilder() { + if (segmentsBuilder_ == null) { + segmentsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment, + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Segment.Builder, + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.SegmentOrBuilder>( + segments_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + segments_ = null; } - return this; + return segmentsBuilder_; } @java.lang.Override @@ -2201,44 +4452,44 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2beta1.ResponseMessage.EndInteraction) + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio) } - // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.ResponseMessage.EndInteraction) - private static final com.google.cloud.dialogflow.v2beta1.ResponseMessage.EndInteraction + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio) + private static final com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2beta1.ResponseMessage.EndInteraction(); + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio(); } - public static com.google.cloud.dialogflow.v2beta1.ResponseMessage.EndInteraction + public static com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public EndInteraction parsePartialFrom( + public MixedAudio parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new EndInteraction(input, extensionRegistry); + return new MixedAudio(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.dialogflow.v2beta1.ResponseMessage.EndInteraction + public com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio getDefaultInstanceForType() { return DEFAULT_INSTANCE; } @@ -3367,6 +5618,7 @@ public enum MessageCase PAYLOAD(2), LIVE_AGENT_HANDOFF(3), END_INTERACTION(4), + MIXED_AUDIO(5), TELEPHONY_TRANSFER_CALL(6), MESSAGE_NOT_SET(0); private final int value; @@ -3394,6 +5646,8 @@ public static MessageCase forNumber(int value) { return LIVE_AGENT_HANDOFF; case 4: return END_INTERACTION; + case 5: + return MIXED_AUDIO; case 6: return TELEPHONY_TRANSFER_CALL; case 0: @@ -3630,6 +5884,61 @@ public com.google.cloud.dialogflow.v2beta1.ResponseMessage.EndInteraction getEnd return com.google.cloud.dialogflow.v2beta1.ResponseMessage.EndInteraction.getDefaultInstance(); } + public static final int MIXED_AUDIO_FIELD_NUMBER = 5; + /** + * + * + *
+   * An audio response message composed of both the synthesized Dialogflow
+   * agent responses and the audios hosted in places known to the client.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio mixed_audio = 5; + * + * @return Whether the mixedAudio field is set. + */ + @java.lang.Override + public boolean hasMixedAudio() { + return messageCase_ == 5; + } + /** + * + * + *
+   * An audio response message composed of both the synthesized Dialogflow
+   * agent responses and the audios hosted in places known to the client.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio mixed_audio = 5; + * + * @return The mixedAudio. + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio getMixedAudio() { + if (messageCase_ == 5) { + return (com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio) message_; + } + return com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.getDefaultInstance(); + } + /** + * + * + *
+   * An audio response message composed of both the synthesized Dialogflow
+   * agent responses and the audios hosted in places known to the client.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio mixed_audio = 5; + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudioOrBuilder + getMixedAudioOrBuilder() { + if (messageCase_ == 5) { + return (com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio) message_; + } + return com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.getDefaultInstance(); + } + public static final int TELEPHONY_TRANSFER_CALL_FIELD_NUMBER = 6; /** * @@ -3722,6 +6031,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeMessage( 4, (com.google.cloud.dialogflow.v2beta1.ResponseMessage.EndInteraction) message_); } + if (messageCase_ == 5) { + output.writeMessage( + 5, (com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio) message_); + } if (messageCase_ == 6) { output.writeMessage( 6, (com.google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall) message_); @@ -3755,6 +6068,11 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 4, (com.google.cloud.dialogflow.v2beta1.ResponseMessage.EndInteraction) message_); } + if (messageCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio) message_); + } if (messageCase_ == 6) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( @@ -3791,6 +6109,9 @@ public boolean equals(final java.lang.Object obj) { case 4: if (!getEndInteraction().equals(other.getEndInteraction())) return false; break; + case 5: + if (!getMixedAudio().equals(other.getMixedAudio())) return false; + break; case 6: if (!getTelephonyTransferCall().equals(other.getTelephonyTransferCall())) return false; break; @@ -3825,6 +6146,10 @@ public int hashCode() { hash = (37 * hash) + END_INTERACTION_FIELD_NUMBER; hash = (53 * hash) + getEndInteraction().hashCode(); break; + case 5: + hash = (37 * hash) + MIXED_AUDIO_FIELD_NUMBER; + hash = (53 * hash) + getMixedAudio().hashCode(); + break; case 6: hash = (37 * hash) + TELEPHONY_TRANSFER_CALL_FIELD_NUMBER; hash = (53 * hash) + getTelephonyTransferCall().hashCode(); @@ -4034,6 +6359,13 @@ public com.google.cloud.dialogflow.v2beta1.ResponseMessage buildPartial() { result.message_ = endInteractionBuilder_.build(); } } + if (messageCase_ == 5) { + if (mixedAudioBuilder_ == null) { + result.message_ = message_; + } else { + result.message_ = mixedAudioBuilder_.build(); + } + } if (messageCase_ == 6) { if (telephonyTransferCallBuilder_ == null) { result.message_ = message_; @@ -4113,6 +6445,11 @@ public Builder mergeFrom(com.google.cloud.dialogflow.v2beta1.ResponseMessage oth mergeEndInteraction(other.getEndInteraction()); break; } + case MIXED_AUDIO: + { + mergeMixedAudio(other.getMixedAudio()); + break; + } case TELEPHONY_TRANSFER_CALL: { mergeTelephonyTransferCall(other.getTelephonyTransferCall()); @@ -5065,6 +7402,232 @@ public Builder clearEndInteraction() { return endInteractionBuilder_; } + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio, + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Builder, + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudioOrBuilder> + mixedAudioBuilder_; + /** + * + * + *
+     * An audio response message composed of both the synthesized Dialogflow
+     * agent responses and the audios hosted in places known to the client.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio mixed_audio = 5; + * + * @return Whether the mixedAudio field is set. + */ + @java.lang.Override + public boolean hasMixedAudio() { + return messageCase_ == 5; + } + /** + * + * + *
+     * An audio response message composed of both the synthesized Dialogflow
+     * agent responses and the audios hosted in places known to the client.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio mixed_audio = 5; + * + * @return The mixedAudio. + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio getMixedAudio() { + if (mixedAudioBuilder_ == null) { + if (messageCase_ == 5) { + return (com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio) message_; + } + return com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.getDefaultInstance(); + } else { + if (messageCase_ == 5) { + return mixedAudioBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.getDefaultInstance(); + } + } + /** + * + * + *
+     * An audio response message composed of both the synthesized Dialogflow
+     * agent responses and the audios hosted in places known to the client.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio mixed_audio = 5; + */ + public Builder setMixedAudio( + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio value) { + if (mixedAudioBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + mixedAudioBuilder_.setMessage(value); + } + messageCase_ = 5; + return this; + } + /** + * + * + *
+     * An audio response message composed of both the synthesized Dialogflow
+     * agent responses and the audios hosted in places known to the client.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio mixed_audio = 5; + */ + public Builder setMixedAudio( + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Builder builderForValue) { + if (mixedAudioBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + mixedAudioBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 5; + return this; + } + /** + * + * + *
+     * An audio response message composed of both the synthesized Dialogflow
+     * agent responses and the audios hosted in places known to the client.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio mixed_audio = 5; + */ + public Builder mergeMixedAudio( + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio value) { + if (mixedAudioBuilder_ == null) { + if (messageCase_ == 5 + && message_ + != com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio + .getDefaultInstance()) { + message_ = + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.newBuilder( + (com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio) message_) + .mergeFrom(value) + .buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 5) { + mixedAudioBuilder_.mergeFrom(value); + } else { + mixedAudioBuilder_.setMessage(value); + } + } + messageCase_ = 5; + return this; + } + /** + * + * + *
+     * An audio response message composed of both the synthesized Dialogflow
+     * agent responses and the audios hosted in places known to the client.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio mixed_audio = 5; + */ + public Builder clearMixedAudio() { + if (mixedAudioBuilder_ == null) { + if (messageCase_ == 5) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 5) { + messageCase_ = 0; + message_ = null; + } + mixedAudioBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * An audio response message composed of both the synthesized Dialogflow
+     * agent responses and the audios hosted in places known to the client.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio mixed_audio = 5; + */ + public com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Builder + getMixedAudioBuilder() { + return getMixedAudioFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * An audio response message composed of both the synthesized Dialogflow
+     * agent responses and the audios hosted in places known to the client.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio mixed_audio = 5; + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudioOrBuilder + getMixedAudioOrBuilder() { + if ((messageCase_ == 5) && (mixedAudioBuilder_ != null)) { + return mixedAudioBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 5) { + return (com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio) message_; + } + return com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.getDefaultInstance(); + } + } + /** + * + * + *
+     * An audio response message composed of both the synthesized Dialogflow
+     * agent responses and the audios hosted in places known to the client.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio mixed_audio = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio, + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Builder, + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudioOrBuilder> + getMixedAudioFieldBuilder() { + if (mixedAudioBuilder_ == null) { + if (!(messageCase_ == 5)) { + message_ = + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.getDefaultInstance(); + } + mixedAudioBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio, + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio.Builder, + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudioOrBuilder>( + (com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 5; + onChanged(); + ; + return mixedAudioBuilder_; + } + private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall, com.google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall.Builder, diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ResponseMessageOrBuilder.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ResponseMessageOrBuilder.java index fda147698..d06ccd245 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ResponseMessageOrBuilder.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ResponseMessageOrBuilder.java @@ -174,6 +174,44 @@ public interface ResponseMessageOrBuilder com.google.cloud.dialogflow.v2beta1.ResponseMessage.EndInteractionOrBuilder getEndInteractionOrBuilder(); + /** + * + * + *
+   * An audio response message composed of both the synthesized Dialogflow
+   * agent responses and the audios hosted in places known to the client.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio mixed_audio = 5; + * + * @return Whether the mixedAudio field is set. + */ + boolean hasMixedAudio(); + /** + * + * + *
+   * An audio response message composed of both the synthesized Dialogflow
+   * agent responses and the audios hosted in places known to the client.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio mixed_audio = 5; + * + * @return The mixedAudio. + */ + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio getMixedAudio(); + /** + * + * + *
+   * An audio response message composed of both the synthesized Dialogflow
+   * agent responses and the audios hosted in places known to the client.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudio mixed_audio = 5; + */ + com.google.cloud.dialogflow.v2beta1.ResponseMessage.MixedAudioOrBuilder getMixedAudioOrBuilder(); + /** * * diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/StreamingAnalyzeContentRequest.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/StreamingAnalyzeContentRequest.java new file mode 100644 index 000000000..049bc4871 --- /dev/null +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/StreamingAnalyzeContentRequest.java @@ -0,0 +1,3565 @@ +/* + * Copyright 2020 Google LLC + * + * 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/v2beta1/participant.proto + +package com.google.cloud.dialogflow.v2beta1; + +/** + * + * + *
+ * The top-level message sent by the client to the
+ * [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.StreamingAnalyzeContent] method.
+ * Multiple request messages should be sent in order:
+ * 1.  The first message must contain
+ *     [participant][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.participant],
+ *     [config][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.config] and optionally
+ *     [query_params][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.query_params]. If you want
+ *     to receive an audio response, it should also contain
+ *     [reply_audio_config][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.reply_audio_config].
+ *     The message must not contain
+ *     [input][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.input].
+ * 2.  If [config][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.config] in the first message
+ *     was set to [audio_config][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.audio_config],
+ *     all subsequent messages must contain
+ *     [input_audio][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.input_audio] to continue
+ *     with Speech recognition.
+ *     If you decide to rather analyze text input after you already started
+ *     Speech recognition, please send a message with
+ *     [StreamingAnalyzeContentRequest.input_text][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.input_text].
+ *     However, note that:
+ *     * Dialogflow will bill you for the audio so far.
+ *     * Dialogflow discards all Speech recognition results in favor of the
+ *       text input.
+ *  3. If [StreamingAnalyzeContentRequest.config][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.config] in the first message was set
+ *    to [StreamingAnalyzeContentRequest.text_config][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.text_config], then the second message
+ *    must contain only [input_text][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.input_text].
+ *    Moreover, you must not send more than two messages.
+ *  After you sent all input, you must half-close or abort the request stream.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest} + */ +public final class StreamingAnalyzeContentRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest) + StreamingAnalyzeContentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use StreamingAnalyzeContentRequest.newBuilder() to construct. + private StreamingAnalyzeContentRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StreamingAnalyzeContentRequest() { + participant_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new StreamingAnalyzeContentRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private StreamingAnalyzeContentRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + participant_ = s; + break; + } + case 18: + { + com.google.cloud.dialogflow.v2beta1.InputAudioConfig.Builder subBuilder = null; + if (configCase_ == 2) { + subBuilder = + ((com.google.cloud.dialogflow.v2beta1.InputAudioConfig) config_).toBuilder(); + } + config_ = + input.readMessage( + com.google.cloud.dialogflow.v2beta1.InputAudioConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.dialogflow.v2beta1.InputAudioConfig) config_); + config_ = subBuilder.buildPartial(); + } + configCase_ = 2; + break; + } + case 26: + { + com.google.cloud.dialogflow.v2beta1.InputTextConfig.Builder subBuilder = null; + if (configCase_ == 3) { + subBuilder = + ((com.google.cloud.dialogflow.v2beta1.InputTextConfig) config_).toBuilder(); + } + config_ = + input.readMessage( + com.google.cloud.dialogflow.v2beta1.InputTextConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.dialogflow.v2beta1.InputTextConfig) config_); + config_ = subBuilder.buildPartial(); + } + configCase_ = 3; + break; + } + case 34: + { + com.google.cloud.dialogflow.v2beta1.OutputAudioConfig.Builder subBuilder = null; + if (replyAudioConfig_ != null) { + subBuilder = replyAudioConfig_.toBuilder(); + } + replyAudioConfig_ = + input.readMessage( + com.google.cloud.dialogflow.v2beta1.OutputAudioConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(replyAudioConfig_); + replyAudioConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + input_ = input.readBytes(); + inputCase_ = 5; + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + inputCase_ = 6; + input_ = s; + break; + } + case 58: + { + com.google.cloud.dialogflow.v2beta1.QueryParameters.Builder subBuilder = null; + if (queryParams_ != null) { + subBuilder = queryParams_.toBuilder(); + } + queryParams_ = + input.readMessage( + com.google.cloud.dialogflow.v2beta1.QueryParameters.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(queryParams_); + queryParams_ = subBuilder.buildPartial(); + } + + break; + } + case 66: + { + com.google.cloud.dialogflow.v2beta1.AssistQueryParameters.Builder subBuilder = null; + if (assistQueryParams_ != null) { + subBuilder = assistQueryParams_.toBuilder(); + } + assistQueryParams_ = + input.readMessage( + com.google.cloud.dialogflow.v2beta1.AssistQueryParameters.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(assistQueryParams_); + assistQueryParams_ = subBuilder.buildPartial(); + } + + break; + } + case 74: + { + com.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents.Builder subBuilder = null; + if (inputCase_ == 9) { + subBuilder = + ((com.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents) input_).toBuilder(); + } + input_ = + input.readMessage( + com.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents) input_); + input_ = subBuilder.buildPartial(); + } + inputCase_ = 9; + break; + } + case 96: + { + enablePartialAutomatedAgentReply_ = input.readBool(); + break; + } + case 106: + { + com.google.protobuf.Struct.Builder subBuilder = null; + if (cxParameters_ != null) { + subBuilder = cxParameters_.toBuilder(); + } + cxParameters_ = + input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(cxParameters_); + cxParameters_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2beta1.ParticipantProto + .internal_static_google_cloud_dialogflow_v2beta1_StreamingAnalyzeContentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2beta1.ParticipantProto + .internal_static_google_cloud_dialogflow_v2beta1_StreamingAnalyzeContentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.class, + com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.Builder.class); + } + + private int configCase_ = 0; + private java.lang.Object config_; + + public enum ConfigCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + AUDIO_CONFIG(2), + TEXT_CONFIG(3), + CONFIG_NOT_SET(0); + private final int value; + + private ConfigCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ConfigCase valueOf(int value) { + return forNumber(value); + } + + public static ConfigCase forNumber(int value) { + switch (value) { + case 2: + return AUDIO_CONFIG; + case 3: + return TEXT_CONFIG; + case 0: + return CONFIG_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ConfigCase getConfigCase() { + return ConfigCase.forNumber(configCase_); + } + + private int inputCase_ = 0; + private java.lang.Object input_; + + public enum InputCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + INPUT_AUDIO(5), + INPUT_TEXT(6), + INPUT_DTMF(9), + INPUT_NOT_SET(0); + private final int value; + + private InputCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static InputCase valueOf(int value) { + return forNumber(value); + } + + public static InputCase forNumber(int value) { + switch (value) { + case 5: + return INPUT_AUDIO; + case 6: + return INPUT_TEXT; + case 9: + return INPUT_DTMF; + case 0: + return INPUT_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public InputCase getInputCase() { + return InputCase.forNumber(inputCase_); + } + + public static final int PARTICIPANT_FIELD_NUMBER = 1; + private volatile java.lang.Object participant_; + /** + * + * + *
+   * Required. The name of the participant this text comes from.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/conversations/<Conversation ID>/participants/<Participant ID>`.
+   * 
+ * + * + * string participant = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The participant. + */ + @java.lang.Override + public java.lang.String getParticipant() { + java.lang.Object ref = participant_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + participant_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the participant this text comes from.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/conversations/<Conversation ID>/participants/<Participant ID>`.
+   * 
+ * + * + * string participant = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for participant. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParticipantBytes() { + java.lang.Object ref = participant_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + participant_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AUDIO_CONFIG_FIELD_NUMBER = 2; + /** + * + * + *
+   * Instructs the speech recognizer how to process the speech audio.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.InputAudioConfig audio_config = 2; + * + * @return Whether the audioConfig field is set. + */ + @java.lang.Override + public boolean hasAudioConfig() { + return configCase_ == 2; + } + /** + * + * + *
+   * Instructs the speech recognizer how to process the speech audio.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.InputAudioConfig audio_config = 2; + * + * @return The audioConfig. + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.InputAudioConfig getAudioConfig() { + if (configCase_ == 2) { + return (com.google.cloud.dialogflow.v2beta1.InputAudioConfig) config_; + } + return com.google.cloud.dialogflow.v2beta1.InputAudioConfig.getDefaultInstance(); + } + /** + * + * + *
+   * Instructs the speech recognizer how to process the speech audio.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.InputAudioConfig audio_config = 2; + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.InputAudioConfigOrBuilder getAudioConfigOrBuilder() { + if (configCase_ == 2) { + return (com.google.cloud.dialogflow.v2beta1.InputAudioConfig) config_; + } + return com.google.cloud.dialogflow.v2beta1.InputAudioConfig.getDefaultInstance(); + } + + public static final int TEXT_CONFIG_FIELD_NUMBER = 3; + /** + * + * + *
+   * The natural language text to be processed.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.InputTextConfig text_config = 3; + * + * @return Whether the textConfig field is set. + */ + @java.lang.Override + public boolean hasTextConfig() { + return configCase_ == 3; + } + /** + * + * + *
+   * The natural language text to be processed.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.InputTextConfig text_config = 3; + * + * @return The textConfig. + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.InputTextConfig getTextConfig() { + if (configCase_ == 3) { + return (com.google.cloud.dialogflow.v2beta1.InputTextConfig) config_; + } + return com.google.cloud.dialogflow.v2beta1.InputTextConfig.getDefaultInstance(); + } + /** + * + * + *
+   * The natural language text to be processed.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.InputTextConfig text_config = 3; + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.InputTextConfigOrBuilder getTextConfigOrBuilder() { + if (configCase_ == 3) { + return (com.google.cloud.dialogflow.v2beta1.InputTextConfig) config_; + } + return com.google.cloud.dialogflow.v2beta1.InputTextConfig.getDefaultInstance(); + } + + public static final int REPLY_AUDIO_CONFIG_FIELD_NUMBER = 4; + private com.google.cloud.dialogflow.v2beta1.OutputAudioConfig replyAudioConfig_; + /** + * + * + *
+   * Speech synthesis configuration.
+   * The speech synthesis settings for a virtual agent that may be configured
+   * for the associated conversation profile are not used when calling
+   * StreamingAnalyzeContent. If this configuration is not supplied, speech
+   * synthesis is disabled.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.OutputAudioConfig reply_audio_config = 4; + * + * @return Whether the replyAudioConfig field is set. + */ + @java.lang.Override + public boolean hasReplyAudioConfig() { + return replyAudioConfig_ != null; + } + /** + * + * + *
+   * Speech synthesis configuration.
+   * The speech synthesis settings for a virtual agent that may be configured
+   * for the associated conversation profile are not used when calling
+   * StreamingAnalyzeContent. If this configuration is not supplied, speech
+   * synthesis is disabled.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.OutputAudioConfig reply_audio_config = 4; + * + * @return The replyAudioConfig. + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.OutputAudioConfig getReplyAudioConfig() { + return replyAudioConfig_ == null + ? com.google.cloud.dialogflow.v2beta1.OutputAudioConfig.getDefaultInstance() + : replyAudioConfig_; + } + /** + * + * + *
+   * Speech synthesis configuration.
+   * The speech synthesis settings for a virtual agent that may be configured
+   * for the associated conversation profile are not used when calling
+   * StreamingAnalyzeContent. If this configuration is not supplied, speech
+   * synthesis is disabled.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.OutputAudioConfig reply_audio_config = 4; + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.OutputAudioConfigOrBuilder + getReplyAudioConfigOrBuilder() { + return getReplyAudioConfig(); + } + + public static final int INPUT_AUDIO_FIELD_NUMBER = 5; + /** + * + * + *
+   * The input audio content to be recognized. Must be sent if `audio_config`
+   * is set in the first message. The complete audio over all streaming
+   * messages must not exceed 1 minute.
+   * 
+ * + * bytes input_audio = 5; + * + * @return Whether the inputAudio field is set. + */ + @java.lang.Override + public boolean hasInputAudio() { + return inputCase_ == 5; + } + /** + * + * + *
+   * The input audio content to be recognized. Must be sent if `audio_config`
+   * is set in the first message. The complete audio over all streaming
+   * messages must not exceed 1 minute.
+   * 
+ * + * bytes input_audio = 5; + * + * @return The inputAudio. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInputAudio() { + if (inputCase_ == 5) { + return (com.google.protobuf.ByteString) input_; + } + return com.google.protobuf.ByteString.EMPTY; + } + + public static final int INPUT_TEXT_FIELD_NUMBER = 6; + /** + * + * + *
+   * The UTF-8 encoded natural language text to be processed. Must be sent if
+   * `text_config` is set in the first message. Text length must not exceed
+   * 256 bytes. The `input_text` field can be only sent once.
+   * 
+ * + * string input_text = 6; + * + * @return Whether the inputText field is set. + */ + public boolean hasInputText() { + return inputCase_ == 6; + } + /** + * + * + *
+   * The UTF-8 encoded natural language text to be processed. Must be sent if
+   * `text_config` is set in the first message. Text length must not exceed
+   * 256 bytes. The `input_text` field can be only sent once.
+   * 
+ * + * string input_text = 6; + * + * @return The inputText. + */ + public java.lang.String getInputText() { + java.lang.Object ref = ""; + if (inputCase_ == 6) { + ref = input_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (inputCase_ == 6) { + input_ = s; + } + return s; + } + } + /** + * + * + *
+   * The UTF-8 encoded natural language text to be processed. Must be sent if
+   * `text_config` is set in the first message. Text length must not exceed
+   * 256 bytes. The `input_text` field can be only sent once.
+   * 
+ * + * string input_text = 6; + * + * @return The bytes for inputText. + */ + public com.google.protobuf.ByteString getInputTextBytes() { + java.lang.Object ref = ""; + if (inputCase_ == 6) { + ref = input_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (inputCase_ == 6) { + input_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INPUT_DTMF_FIELD_NUMBER = 9; + /** + * + * + *
+   * The DTMF digits used to invoke intent and fill in parameter value.
+   * This input is ignored if the previous response indicated that DTMF input
+   * is not accepted.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents input_dtmf = 9; + * + * @return Whether the inputDtmf field is set. + */ + @java.lang.Override + public boolean hasInputDtmf() { + return inputCase_ == 9; + } + /** + * + * + *
+   * The DTMF digits used to invoke intent and fill in parameter value.
+   * This input is ignored if the previous response indicated that DTMF input
+   * is not accepted.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents input_dtmf = 9; + * + * @return The inputDtmf. + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents getInputDtmf() { + if (inputCase_ == 9) { + return (com.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents) input_; + } + return com.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents.getDefaultInstance(); + } + /** + * + * + *
+   * The DTMF digits used to invoke intent and fill in parameter value.
+   * This input is ignored if the previous response indicated that DTMF input
+   * is not accepted.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents input_dtmf = 9; + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.TelephonyDtmfEventsOrBuilder getInputDtmfOrBuilder() { + if (inputCase_ == 9) { + return (com.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents) input_; + } + return com.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents.getDefaultInstance(); + } + + public static final int QUERY_PARAMS_FIELD_NUMBER = 7; + private com.google.cloud.dialogflow.v2beta1.QueryParameters queryParams_; + /** + * + * + *
+   * Parameters for a Dialogflow virtual-agent query.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.QueryParameters query_params = 7; + * + * @return Whether the queryParams field is set. + */ + @java.lang.Override + public boolean hasQueryParams() { + return queryParams_ != null; + } + /** + * + * + *
+   * Parameters for a Dialogflow virtual-agent query.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.QueryParameters query_params = 7; + * + * @return The queryParams. + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.QueryParameters getQueryParams() { + return queryParams_ == null + ? com.google.cloud.dialogflow.v2beta1.QueryParameters.getDefaultInstance() + : queryParams_; + } + /** + * + * + *
+   * Parameters for a Dialogflow virtual-agent query.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.QueryParameters query_params = 7; + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.QueryParametersOrBuilder getQueryParamsOrBuilder() { + return getQueryParams(); + } + + public static final int ASSIST_QUERY_PARAMS_FIELD_NUMBER = 8; + private com.google.cloud.dialogflow.v2beta1.AssistQueryParameters assistQueryParams_; + /** + * + * + *
+   * Parameters for a human assist query.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.AssistQueryParameters assist_query_params = 8; + * + * @return Whether the assistQueryParams field is set. + */ + @java.lang.Override + public boolean hasAssistQueryParams() { + return assistQueryParams_ != null; + } + /** + * + * + *
+   * Parameters for a human assist query.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.AssistQueryParameters assist_query_params = 8; + * + * @return The assistQueryParams. + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.AssistQueryParameters getAssistQueryParams() { + return assistQueryParams_ == null + ? com.google.cloud.dialogflow.v2beta1.AssistQueryParameters.getDefaultInstance() + : assistQueryParams_; + } + /** + * + * + *
+   * Parameters for a human assist query.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.AssistQueryParameters assist_query_params = 8; + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.AssistQueryParametersOrBuilder + getAssistQueryParamsOrBuilder() { + return getAssistQueryParams(); + } + + public static final int CX_PARAMETERS_FIELD_NUMBER = 13; + private com.google.protobuf.Struct cxParameters_; + /** + * + * + *
+   * Additional parameters to be put into Dialogflow CX session parameters. To
+   * remove a parameter from the session, clients should explicitly set the
+   * parameter value to null.
+   * Note: this field should only be used if you are connecting to a Dialogflow
+   * CX agent.
+   * 
+ * + * .google.protobuf.Struct cx_parameters = 13; + * + * @return Whether the cxParameters field is set. + */ + @java.lang.Override + public boolean hasCxParameters() { + return cxParameters_ != null; + } + /** + * + * + *
+   * Additional parameters to be put into Dialogflow CX session parameters. To
+   * remove a parameter from the session, clients should explicitly set the
+   * parameter value to null.
+   * Note: this field should only be used if you are connecting to a Dialogflow
+   * CX agent.
+   * 
+ * + * .google.protobuf.Struct cx_parameters = 13; + * + * @return The cxParameters. + */ + @java.lang.Override + public com.google.protobuf.Struct getCxParameters() { + return cxParameters_ == null ? com.google.protobuf.Struct.getDefaultInstance() : cxParameters_; + } + /** + * + * + *
+   * Additional parameters to be put into Dialogflow CX session parameters. To
+   * remove a parameter from the session, clients should explicitly set the
+   * parameter value to null.
+   * Note: this field should only be used if you are connecting to a Dialogflow
+   * CX agent.
+   * 
+ * + * .google.protobuf.Struct cx_parameters = 13; + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getCxParametersOrBuilder() { + return getCxParameters(); + } + + public static final int ENABLE_PARTIAL_AUTOMATED_AGENT_REPLY_FIELD_NUMBER = 12; + private boolean enablePartialAutomatedAgentReply_; + /** + * + * + *
+   * Enable partial virtual agent responses. If this flag is not enabled,
+   * response stream still contains only one final response even if some
+   * `Fulfillment`s in Dialogflow virtual agent have been configured to return
+   * partial responses.
+   * 
+ * + * bool enable_partial_automated_agent_reply = 12; + * + * @return The enablePartialAutomatedAgentReply. + */ + @java.lang.Override + public boolean getEnablePartialAutomatedAgentReply() { + return enablePartialAutomatedAgentReply_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(participant_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, participant_); + } + if (configCase_ == 2) { + output.writeMessage(2, (com.google.cloud.dialogflow.v2beta1.InputAudioConfig) config_); + } + if (configCase_ == 3) { + output.writeMessage(3, (com.google.cloud.dialogflow.v2beta1.InputTextConfig) config_); + } + if (replyAudioConfig_ != null) { + output.writeMessage(4, getReplyAudioConfig()); + } + if (inputCase_ == 5) { + output.writeBytes(5, (com.google.protobuf.ByteString) input_); + } + if (inputCase_ == 6) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, input_); + } + if (queryParams_ != null) { + output.writeMessage(7, getQueryParams()); + } + if (assistQueryParams_ != null) { + output.writeMessage(8, getAssistQueryParams()); + } + if (inputCase_ == 9) { + output.writeMessage(9, (com.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents) input_); + } + if (enablePartialAutomatedAgentReply_ != false) { + output.writeBool(12, enablePartialAutomatedAgentReply_); + } + if (cxParameters_ != null) { + output.writeMessage(13, getCxParameters()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(participant_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, participant_); + } + if (configCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.dialogflow.v2beta1.InputAudioConfig) config_); + } + if (configCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.cloud.dialogflow.v2beta1.InputTextConfig) config_); + } + if (replyAudioConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getReplyAudioConfig()); + } + if (inputCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeBytesSize( + 5, (com.google.protobuf.ByteString) input_); + } + if (inputCase_ == 6) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, input_); + } + if (queryParams_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getQueryParams()); + } + if (assistQueryParams_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getAssistQueryParams()); + } + if (inputCase_ == 9) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 9, (com.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents) input_); + } + if (enablePartialAutomatedAgentReply_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 12, enablePartialAutomatedAgentReply_); + } + if (cxParameters_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getCxParameters()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest other = + (com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest) obj; + + if (!getParticipant().equals(other.getParticipant())) return false; + if (hasReplyAudioConfig() != other.hasReplyAudioConfig()) return false; + if (hasReplyAudioConfig()) { + if (!getReplyAudioConfig().equals(other.getReplyAudioConfig())) return false; + } + if (hasQueryParams() != other.hasQueryParams()) return false; + if (hasQueryParams()) { + if (!getQueryParams().equals(other.getQueryParams())) return false; + } + if (hasAssistQueryParams() != other.hasAssistQueryParams()) return false; + if (hasAssistQueryParams()) { + if (!getAssistQueryParams().equals(other.getAssistQueryParams())) return false; + } + if (hasCxParameters() != other.hasCxParameters()) return false; + if (hasCxParameters()) { + if (!getCxParameters().equals(other.getCxParameters())) return false; + } + if (getEnablePartialAutomatedAgentReply() != other.getEnablePartialAutomatedAgentReply()) + return false; + if (!getConfigCase().equals(other.getConfigCase())) return false; + switch (configCase_) { + case 2: + if (!getAudioConfig().equals(other.getAudioConfig())) return false; + break; + case 3: + if (!getTextConfig().equals(other.getTextConfig())) return false; + break; + case 0: + default: + } + if (!getInputCase().equals(other.getInputCase())) return false; + switch (inputCase_) { + case 5: + if (!getInputAudio().equals(other.getInputAudio())) return false; + break; + case 6: + if (!getInputText().equals(other.getInputText())) return false; + break; + case 9: + if (!getInputDtmf().equals(other.getInputDtmf())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARTICIPANT_FIELD_NUMBER; + hash = (53 * hash) + getParticipant().hashCode(); + if (hasReplyAudioConfig()) { + hash = (37 * hash) + REPLY_AUDIO_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getReplyAudioConfig().hashCode(); + } + if (hasQueryParams()) { + hash = (37 * hash) + QUERY_PARAMS_FIELD_NUMBER; + hash = (53 * hash) + getQueryParams().hashCode(); + } + if (hasAssistQueryParams()) { + hash = (37 * hash) + ASSIST_QUERY_PARAMS_FIELD_NUMBER; + hash = (53 * hash) + getAssistQueryParams().hashCode(); + } + if (hasCxParameters()) { + hash = (37 * hash) + CX_PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getCxParameters().hashCode(); + } + hash = (37 * hash) + ENABLE_PARTIAL_AUTOMATED_AGENT_REPLY_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashBoolean(getEnablePartialAutomatedAgentReply()); + switch (configCase_) { + case 2: + hash = (37 * hash) + AUDIO_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getAudioConfig().hashCode(); + break; + case 3: + hash = (37 * hash) + TEXT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getTextConfig().hashCode(); + break; + case 0: + default: + } + switch (inputCase_) { + case 5: + hash = (37 * hash) + INPUT_AUDIO_FIELD_NUMBER; + hash = (53 * hash) + getInputAudio().hashCode(); + break; + case 6: + hash = (37 * hash) + INPUT_TEXT_FIELD_NUMBER; + hash = (53 * hash) + getInputText().hashCode(); + break; + case 9: + hash = (37 * hash) + INPUT_DTMF_FIELD_NUMBER; + hash = (53 * hash) + getInputDtmf().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The top-level message sent by the client to the
+   * [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.StreamingAnalyzeContent] method.
+   * Multiple request messages should be sent in order:
+   * 1.  The first message must contain
+   *     [participant][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.participant],
+   *     [config][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.config] and optionally
+   *     [query_params][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.query_params]. If you want
+   *     to receive an audio response, it should also contain
+   *     [reply_audio_config][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.reply_audio_config].
+   *     The message must not contain
+   *     [input][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.input].
+   * 2.  If [config][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.config] in the first message
+   *     was set to [audio_config][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.audio_config],
+   *     all subsequent messages must contain
+   *     [input_audio][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.input_audio] to continue
+   *     with Speech recognition.
+   *     If you decide to rather analyze text input after you already started
+   *     Speech recognition, please send a message with
+   *     [StreamingAnalyzeContentRequest.input_text][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.input_text].
+   *     However, note that:
+   *     * Dialogflow will bill you for the audio so far.
+   *     * Dialogflow discards all Speech recognition results in favor of the
+   *       text input.
+   *  3. If [StreamingAnalyzeContentRequest.config][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.config] in the first message was set
+   *    to [StreamingAnalyzeContentRequest.text_config][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.text_config], then the second message
+   *    must contain only [input_text][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.input_text].
+   *    Moreover, you must not send more than two messages.
+   *  After you sent all input, you must half-close or abort the request stream.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest) + com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2beta1.ParticipantProto + .internal_static_google_cloud_dialogflow_v2beta1_StreamingAnalyzeContentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2beta1.ParticipantProto + .internal_static_google_cloud_dialogflow_v2beta1_StreamingAnalyzeContentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.class, + com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + participant_ = ""; + + if (replyAudioConfigBuilder_ == null) { + replyAudioConfig_ = null; + } else { + replyAudioConfig_ = null; + replyAudioConfigBuilder_ = null; + } + if (queryParamsBuilder_ == null) { + queryParams_ = null; + } else { + queryParams_ = null; + queryParamsBuilder_ = null; + } + if (assistQueryParamsBuilder_ == null) { + assistQueryParams_ = null; + } else { + assistQueryParams_ = null; + assistQueryParamsBuilder_ = null; + } + if (cxParametersBuilder_ == null) { + cxParameters_ = null; + } else { + cxParameters_ = null; + cxParametersBuilder_ = null; + } + enablePartialAutomatedAgentReply_ = false; + + configCase_ = 0; + config_ = null; + inputCase_ = 0; + input_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.v2beta1.ParticipantProto + .internal_static_google_cloud_dialogflow_v2beta1_StreamingAnalyzeContentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest build() { + com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest buildPartial() { + com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest result = + new com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest(this); + result.participant_ = participant_; + if (configCase_ == 2) { + if (audioConfigBuilder_ == null) { + result.config_ = config_; + } else { + result.config_ = audioConfigBuilder_.build(); + } + } + if (configCase_ == 3) { + if (textConfigBuilder_ == null) { + result.config_ = config_; + } else { + result.config_ = textConfigBuilder_.build(); + } + } + if (replyAudioConfigBuilder_ == null) { + result.replyAudioConfig_ = replyAudioConfig_; + } else { + result.replyAudioConfig_ = replyAudioConfigBuilder_.build(); + } + if (inputCase_ == 5) { + result.input_ = input_; + } + if (inputCase_ == 6) { + result.input_ = input_; + } + if (inputCase_ == 9) { + if (inputDtmfBuilder_ == null) { + result.input_ = input_; + } else { + result.input_ = inputDtmfBuilder_.build(); + } + } + if (queryParamsBuilder_ == null) { + result.queryParams_ = queryParams_; + } else { + result.queryParams_ = queryParamsBuilder_.build(); + } + if (assistQueryParamsBuilder_ == null) { + result.assistQueryParams_ = assistQueryParams_; + } else { + result.assistQueryParams_ = assistQueryParamsBuilder_.build(); + } + if (cxParametersBuilder_ == null) { + result.cxParameters_ = cxParameters_; + } else { + result.cxParameters_ = cxParametersBuilder_.build(); + } + result.enablePartialAutomatedAgentReply_ = enablePartialAutomatedAgentReply_; + result.configCase_ = configCase_; + result.inputCase_ = inputCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest) { + return mergeFrom( + (com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest other) { + if (other + == com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest + .getDefaultInstance()) return this; + if (!other.getParticipant().isEmpty()) { + participant_ = other.participant_; + onChanged(); + } + if (other.hasReplyAudioConfig()) { + mergeReplyAudioConfig(other.getReplyAudioConfig()); + } + if (other.hasQueryParams()) { + mergeQueryParams(other.getQueryParams()); + } + if (other.hasAssistQueryParams()) { + mergeAssistQueryParams(other.getAssistQueryParams()); + } + if (other.hasCxParameters()) { + mergeCxParameters(other.getCxParameters()); + } + if (other.getEnablePartialAutomatedAgentReply() != false) { + setEnablePartialAutomatedAgentReply(other.getEnablePartialAutomatedAgentReply()); + } + switch (other.getConfigCase()) { + case AUDIO_CONFIG: + { + mergeAudioConfig(other.getAudioConfig()); + break; + } + case TEXT_CONFIG: + { + mergeTextConfig(other.getTextConfig()); + break; + } + case CONFIG_NOT_SET: + { + break; + } + } + switch (other.getInputCase()) { + case INPUT_AUDIO: + { + setInputAudio(other.getInputAudio()); + break; + } + case INPUT_TEXT: + { + inputCase_ = 6; + input_ = other.input_; + onChanged(); + break; + } + case INPUT_DTMF: + { + mergeInputDtmf(other.getInputDtmf()); + break; + } + case INPUT_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int configCase_ = 0; + private java.lang.Object config_; + + public ConfigCase getConfigCase() { + return ConfigCase.forNumber(configCase_); + } + + public Builder clearConfig() { + configCase_ = 0; + config_ = null; + onChanged(); + return this; + } + + private int inputCase_ = 0; + private java.lang.Object input_; + + public InputCase getInputCase() { + return InputCase.forNumber(inputCase_); + } + + public Builder clearInput() { + inputCase_ = 0; + input_ = null; + onChanged(); + return this; + } + + private java.lang.Object participant_ = ""; + /** + * + * + *
+     * Required. The name of the participant this text comes from.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/conversations/<Conversation ID>/participants/<Participant ID>`.
+     * 
+ * + * + * string participant = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The participant. + */ + public java.lang.String getParticipant() { + java.lang.Object ref = participant_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + participant_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the participant this text comes from.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/conversations/<Conversation ID>/participants/<Participant ID>`.
+     * 
+ * + * + * string participant = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for participant. + */ + public com.google.protobuf.ByteString getParticipantBytes() { + java.lang.Object ref = participant_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + participant_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the participant this text comes from.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/conversations/<Conversation ID>/participants/<Participant ID>`.
+     * 
+ * + * + * string participant = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The participant to set. + * @return This builder for chaining. + */ + public Builder setParticipant(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + participant_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the participant this text comes from.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/conversations/<Conversation ID>/participants/<Participant ID>`.
+     * 
+ * + * + * string participant = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParticipant() { + + participant_ = getDefaultInstance().getParticipant(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the participant this text comes from.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/conversations/<Conversation ID>/participants/<Participant ID>`.
+     * 
+ * + * + * string participant = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for participant to set. + * @return This builder for chaining. + */ + public Builder setParticipantBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + participant_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.InputAudioConfig, + com.google.cloud.dialogflow.v2beta1.InputAudioConfig.Builder, + com.google.cloud.dialogflow.v2beta1.InputAudioConfigOrBuilder> + audioConfigBuilder_; + /** + * + * + *
+     * Instructs the speech recognizer how to process the speech audio.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.InputAudioConfig audio_config = 2; + * + * @return Whether the audioConfig field is set. + */ + @java.lang.Override + public boolean hasAudioConfig() { + return configCase_ == 2; + } + /** + * + * + *
+     * Instructs the speech recognizer how to process the speech audio.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.InputAudioConfig audio_config = 2; + * + * @return The audioConfig. + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.InputAudioConfig getAudioConfig() { + if (audioConfigBuilder_ == null) { + if (configCase_ == 2) { + return (com.google.cloud.dialogflow.v2beta1.InputAudioConfig) config_; + } + return com.google.cloud.dialogflow.v2beta1.InputAudioConfig.getDefaultInstance(); + } else { + if (configCase_ == 2) { + return audioConfigBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.v2beta1.InputAudioConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Instructs the speech recognizer how to process the speech audio.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.InputAudioConfig audio_config = 2; + */ + public Builder setAudioConfig(com.google.cloud.dialogflow.v2beta1.InputAudioConfig value) { + if (audioConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + config_ = value; + onChanged(); + } else { + audioConfigBuilder_.setMessage(value); + } + configCase_ = 2; + return this; + } + /** + * + * + *
+     * Instructs the speech recognizer how to process the speech audio.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.InputAudioConfig audio_config = 2; + */ + public Builder setAudioConfig( + com.google.cloud.dialogflow.v2beta1.InputAudioConfig.Builder builderForValue) { + if (audioConfigBuilder_ == null) { + config_ = builderForValue.build(); + onChanged(); + } else { + audioConfigBuilder_.setMessage(builderForValue.build()); + } + configCase_ = 2; + return this; + } + /** + * + * + *
+     * Instructs the speech recognizer how to process the speech audio.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.InputAudioConfig audio_config = 2; + */ + public Builder mergeAudioConfig(com.google.cloud.dialogflow.v2beta1.InputAudioConfig value) { + if (audioConfigBuilder_ == null) { + if (configCase_ == 2 + && config_ + != com.google.cloud.dialogflow.v2beta1.InputAudioConfig.getDefaultInstance()) { + config_ = + com.google.cloud.dialogflow.v2beta1.InputAudioConfig.newBuilder( + (com.google.cloud.dialogflow.v2beta1.InputAudioConfig) config_) + .mergeFrom(value) + .buildPartial(); + } else { + config_ = value; + } + onChanged(); + } else { + if (configCase_ == 2) { + audioConfigBuilder_.mergeFrom(value); + } else { + audioConfigBuilder_.setMessage(value); + } + } + configCase_ = 2; + return this; + } + /** + * + * + *
+     * Instructs the speech recognizer how to process the speech audio.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.InputAudioConfig audio_config = 2; + */ + public Builder clearAudioConfig() { + if (audioConfigBuilder_ == null) { + if (configCase_ == 2) { + configCase_ = 0; + config_ = null; + onChanged(); + } + } else { + if (configCase_ == 2) { + configCase_ = 0; + config_ = null; + } + audioConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Instructs the speech recognizer how to process the speech audio.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.InputAudioConfig audio_config = 2; + */ + public com.google.cloud.dialogflow.v2beta1.InputAudioConfig.Builder getAudioConfigBuilder() { + return getAudioConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Instructs the speech recognizer how to process the speech audio.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.InputAudioConfig audio_config = 2; + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.InputAudioConfigOrBuilder getAudioConfigOrBuilder() { + if ((configCase_ == 2) && (audioConfigBuilder_ != null)) { + return audioConfigBuilder_.getMessageOrBuilder(); + } else { + if (configCase_ == 2) { + return (com.google.cloud.dialogflow.v2beta1.InputAudioConfig) config_; + } + return com.google.cloud.dialogflow.v2beta1.InputAudioConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Instructs the speech recognizer how to process the speech audio.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.InputAudioConfig audio_config = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.InputAudioConfig, + com.google.cloud.dialogflow.v2beta1.InputAudioConfig.Builder, + com.google.cloud.dialogflow.v2beta1.InputAudioConfigOrBuilder> + getAudioConfigFieldBuilder() { + if (audioConfigBuilder_ == null) { + if (!(configCase_ == 2)) { + config_ = com.google.cloud.dialogflow.v2beta1.InputAudioConfig.getDefaultInstance(); + } + audioConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.InputAudioConfig, + com.google.cloud.dialogflow.v2beta1.InputAudioConfig.Builder, + com.google.cloud.dialogflow.v2beta1.InputAudioConfigOrBuilder>( + (com.google.cloud.dialogflow.v2beta1.InputAudioConfig) config_, + getParentForChildren(), + isClean()); + config_ = null; + } + configCase_ = 2; + onChanged(); + ; + return audioConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.InputTextConfig, + com.google.cloud.dialogflow.v2beta1.InputTextConfig.Builder, + com.google.cloud.dialogflow.v2beta1.InputTextConfigOrBuilder> + textConfigBuilder_; + /** + * + * + *
+     * The natural language text to be processed.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.InputTextConfig text_config = 3; + * + * @return Whether the textConfig field is set. + */ + @java.lang.Override + public boolean hasTextConfig() { + return configCase_ == 3; + } + /** + * + * + *
+     * The natural language text to be processed.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.InputTextConfig text_config = 3; + * + * @return The textConfig. + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.InputTextConfig getTextConfig() { + if (textConfigBuilder_ == null) { + if (configCase_ == 3) { + return (com.google.cloud.dialogflow.v2beta1.InputTextConfig) config_; + } + return com.google.cloud.dialogflow.v2beta1.InputTextConfig.getDefaultInstance(); + } else { + if (configCase_ == 3) { + return textConfigBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.v2beta1.InputTextConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * The natural language text to be processed.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.InputTextConfig text_config = 3; + */ + public Builder setTextConfig(com.google.cloud.dialogflow.v2beta1.InputTextConfig value) { + if (textConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + config_ = value; + onChanged(); + } else { + textConfigBuilder_.setMessage(value); + } + configCase_ = 3; + return this; + } + /** + * + * + *
+     * The natural language text to be processed.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.InputTextConfig text_config = 3; + */ + public Builder setTextConfig( + com.google.cloud.dialogflow.v2beta1.InputTextConfig.Builder builderForValue) { + if (textConfigBuilder_ == null) { + config_ = builderForValue.build(); + onChanged(); + } else { + textConfigBuilder_.setMessage(builderForValue.build()); + } + configCase_ = 3; + return this; + } + /** + * + * + *
+     * The natural language text to be processed.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.InputTextConfig text_config = 3; + */ + public Builder mergeTextConfig(com.google.cloud.dialogflow.v2beta1.InputTextConfig value) { + if (textConfigBuilder_ == null) { + if (configCase_ == 3 + && config_ + != com.google.cloud.dialogflow.v2beta1.InputTextConfig.getDefaultInstance()) { + config_ = + com.google.cloud.dialogflow.v2beta1.InputTextConfig.newBuilder( + (com.google.cloud.dialogflow.v2beta1.InputTextConfig) config_) + .mergeFrom(value) + .buildPartial(); + } else { + config_ = value; + } + onChanged(); + } else { + if (configCase_ == 3) { + textConfigBuilder_.mergeFrom(value); + } else { + textConfigBuilder_.setMessage(value); + } + } + configCase_ = 3; + return this; + } + /** + * + * + *
+     * The natural language text to be processed.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.InputTextConfig text_config = 3; + */ + public Builder clearTextConfig() { + if (textConfigBuilder_ == null) { + if (configCase_ == 3) { + configCase_ = 0; + config_ = null; + onChanged(); + } + } else { + if (configCase_ == 3) { + configCase_ = 0; + config_ = null; + } + textConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The natural language text to be processed.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.InputTextConfig text_config = 3; + */ + public com.google.cloud.dialogflow.v2beta1.InputTextConfig.Builder getTextConfigBuilder() { + return getTextConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The natural language text to be processed.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.InputTextConfig text_config = 3; + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.InputTextConfigOrBuilder getTextConfigOrBuilder() { + if ((configCase_ == 3) && (textConfigBuilder_ != null)) { + return textConfigBuilder_.getMessageOrBuilder(); + } else { + if (configCase_ == 3) { + return (com.google.cloud.dialogflow.v2beta1.InputTextConfig) config_; + } + return com.google.cloud.dialogflow.v2beta1.InputTextConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * The natural language text to be processed.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.InputTextConfig text_config = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.InputTextConfig, + com.google.cloud.dialogflow.v2beta1.InputTextConfig.Builder, + com.google.cloud.dialogflow.v2beta1.InputTextConfigOrBuilder> + getTextConfigFieldBuilder() { + if (textConfigBuilder_ == null) { + if (!(configCase_ == 3)) { + config_ = com.google.cloud.dialogflow.v2beta1.InputTextConfig.getDefaultInstance(); + } + textConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.InputTextConfig, + com.google.cloud.dialogflow.v2beta1.InputTextConfig.Builder, + com.google.cloud.dialogflow.v2beta1.InputTextConfigOrBuilder>( + (com.google.cloud.dialogflow.v2beta1.InputTextConfig) config_, + getParentForChildren(), + isClean()); + config_ = null; + } + configCase_ = 3; + onChanged(); + ; + return textConfigBuilder_; + } + + private com.google.cloud.dialogflow.v2beta1.OutputAudioConfig replyAudioConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.OutputAudioConfig, + com.google.cloud.dialogflow.v2beta1.OutputAudioConfig.Builder, + com.google.cloud.dialogflow.v2beta1.OutputAudioConfigOrBuilder> + replyAudioConfigBuilder_; + /** + * + * + *
+     * Speech synthesis configuration.
+     * The speech synthesis settings for a virtual agent that may be configured
+     * for the associated conversation profile are not used when calling
+     * StreamingAnalyzeContent. If this configuration is not supplied, speech
+     * synthesis is disabled.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.OutputAudioConfig reply_audio_config = 4; + * + * @return Whether the replyAudioConfig field is set. + */ + public boolean hasReplyAudioConfig() { + return replyAudioConfigBuilder_ != null || replyAudioConfig_ != null; + } + /** + * + * + *
+     * Speech synthesis configuration.
+     * The speech synthesis settings for a virtual agent that may be configured
+     * for the associated conversation profile are not used when calling
+     * StreamingAnalyzeContent. If this configuration is not supplied, speech
+     * synthesis is disabled.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.OutputAudioConfig reply_audio_config = 4; + * + * @return The replyAudioConfig. + */ + public com.google.cloud.dialogflow.v2beta1.OutputAudioConfig getReplyAudioConfig() { + if (replyAudioConfigBuilder_ == null) { + return replyAudioConfig_ == null + ? com.google.cloud.dialogflow.v2beta1.OutputAudioConfig.getDefaultInstance() + : replyAudioConfig_; + } else { + return replyAudioConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Speech synthesis configuration.
+     * The speech synthesis settings for a virtual agent that may be configured
+     * for the associated conversation profile are not used when calling
+     * StreamingAnalyzeContent. If this configuration is not supplied, speech
+     * synthesis is disabled.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.OutputAudioConfig reply_audio_config = 4; + */ + public Builder setReplyAudioConfig( + com.google.cloud.dialogflow.v2beta1.OutputAudioConfig value) { + if (replyAudioConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + replyAudioConfig_ = value; + onChanged(); + } else { + replyAudioConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Speech synthesis configuration.
+     * The speech synthesis settings for a virtual agent that may be configured
+     * for the associated conversation profile are not used when calling
+     * StreamingAnalyzeContent. If this configuration is not supplied, speech
+     * synthesis is disabled.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.OutputAudioConfig reply_audio_config = 4; + */ + public Builder setReplyAudioConfig( + com.google.cloud.dialogflow.v2beta1.OutputAudioConfig.Builder builderForValue) { + if (replyAudioConfigBuilder_ == null) { + replyAudioConfig_ = builderForValue.build(); + onChanged(); + } else { + replyAudioConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Speech synthesis configuration.
+     * The speech synthesis settings for a virtual agent that may be configured
+     * for the associated conversation profile are not used when calling
+     * StreamingAnalyzeContent. If this configuration is not supplied, speech
+     * synthesis is disabled.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.OutputAudioConfig reply_audio_config = 4; + */ + public Builder mergeReplyAudioConfig( + com.google.cloud.dialogflow.v2beta1.OutputAudioConfig value) { + if (replyAudioConfigBuilder_ == null) { + if (replyAudioConfig_ != null) { + replyAudioConfig_ = + com.google.cloud.dialogflow.v2beta1.OutputAudioConfig.newBuilder(replyAudioConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + replyAudioConfig_ = value; + } + onChanged(); + } else { + replyAudioConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Speech synthesis configuration.
+     * The speech synthesis settings for a virtual agent that may be configured
+     * for the associated conversation profile are not used when calling
+     * StreamingAnalyzeContent. If this configuration is not supplied, speech
+     * synthesis is disabled.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.OutputAudioConfig reply_audio_config = 4; + */ + public Builder clearReplyAudioConfig() { + if (replyAudioConfigBuilder_ == null) { + replyAudioConfig_ = null; + onChanged(); + } else { + replyAudioConfig_ = null; + replyAudioConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Speech synthesis configuration.
+     * The speech synthesis settings for a virtual agent that may be configured
+     * for the associated conversation profile are not used when calling
+     * StreamingAnalyzeContent. If this configuration is not supplied, speech
+     * synthesis is disabled.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.OutputAudioConfig reply_audio_config = 4; + */ + public com.google.cloud.dialogflow.v2beta1.OutputAudioConfig.Builder + getReplyAudioConfigBuilder() { + + onChanged(); + return getReplyAudioConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Speech synthesis configuration.
+     * The speech synthesis settings for a virtual agent that may be configured
+     * for the associated conversation profile are not used when calling
+     * StreamingAnalyzeContent. If this configuration is not supplied, speech
+     * synthesis is disabled.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.OutputAudioConfig reply_audio_config = 4; + */ + public com.google.cloud.dialogflow.v2beta1.OutputAudioConfigOrBuilder + getReplyAudioConfigOrBuilder() { + if (replyAudioConfigBuilder_ != null) { + return replyAudioConfigBuilder_.getMessageOrBuilder(); + } else { + return replyAudioConfig_ == null + ? com.google.cloud.dialogflow.v2beta1.OutputAudioConfig.getDefaultInstance() + : replyAudioConfig_; + } + } + /** + * + * + *
+     * Speech synthesis configuration.
+     * The speech synthesis settings for a virtual agent that may be configured
+     * for the associated conversation profile are not used when calling
+     * StreamingAnalyzeContent. If this configuration is not supplied, speech
+     * synthesis is disabled.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.OutputAudioConfig reply_audio_config = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.OutputAudioConfig, + com.google.cloud.dialogflow.v2beta1.OutputAudioConfig.Builder, + com.google.cloud.dialogflow.v2beta1.OutputAudioConfigOrBuilder> + getReplyAudioConfigFieldBuilder() { + if (replyAudioConfigBuilder_ == null) { + replyAudioConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.OutputAudioConfig, + com.google.cloud.dialogflow.v2beta1.OutputAudioConfig.Builder, + com.google.cloud.dialogflow.v2beta1.OutputAudioConfigOrBuilder>( + getReplyAudioConfig(), getParentForChildren(), isClean()); + replyAudioConfig_ = null; + } + return replyAudioConfigBuilder_; + } + + /** + * + * + *
+     * The input audio content to be recognized. Must be sent if `audio_config`
+     * is set in the first message. The complete audio over all streaming
+     * messages must not exceed 1 minute.
+     * 
+ * + * bytes input_audio = 5; + * + * @return Whether the inputAudio field is set. + */ + public boolean hasInputAudio() { + return inputCase_ == 5; + } + /** + * + * + *
+     * The input audio content to be recognized. Must be sent if `audio_config`
+     * is set in the first message. The complete audio over all streaming
+     * messages must not exceed 1 minute.
+     * 
+ * + * bytes input_audio = 5; + * + * @return The inputAudio. + */ + public com.google.protobuf.ByteString getInputAudio() { + if (inputCase_ == 5) { + return (com.google.protobuf.ByteString) input_; + } + return com.google.protobuf.ByteString.EMPTY; + } + /** + * + * + *
+     * The input audio content to be recognized. Must be sent if `audio_config`
+     * is set in the first message. The complete audio over all streaming
+     * messages must not exceed 1 minute.
+     * 
+ * + * bytes input_audio = 5; + * + * @param value The inputAudio to set. + * @return This builder for chaining. + */ + public Builder setInputAudio(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + inputCase_ = 5; + input_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The input audio content to be recognized. Must be sent if `audio_config`
+     * is set in the first message. The complete audio over all streaming
+     * messages must not exceed 1 minute.
+     * 
+ * + * bytes input_audio = 5; + * + * @return This builder for chaining. + */ + public Builder clearInputAudio() { + if (inputCase_ == 5) { + inputCase_ = 0; + input_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The UTF-8 encoded natural language text to be processed. Must be sent if
+     * `text_config` is set in the first message. Text length must not exceed
+     * 256 bytes. The `input_text` field can be only sent once.
+     * 
+ * + * string input_text = 6; + * + * @return Whether the inputText field is set. + */ + @java.lang.Override + public boolean hasInputText() { + return inputCase_ == 6; + } + /** + * + * + *
+     * The UTF-8 encoded natural language text to be processed. Must be sent if
+     * `text_config` is set in the first message. Text length must not exceed
+     * 256 bytes. The `input_text` field can be only sent once.
+     * 
+ * + * string input_text = 6; + * + * @return The inputText. + */ + @java.lang.Override + public java.lang.String getInputText() { + java.lang.Object ref = ""; + if (inputCase_ == 6) { + ref = input_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (inputCase_ == 6) { + input_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The UTF-8 encoded natural language text to be processed. Must be sent if
+     * `text_config` is set in the first message. Text length must not exceed
+     * 256 bytes. The `input_text` field can be only sent once.
+     * 
+ * + * string input_text = 6; + * + * @return The bytes for inputText. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInputTextBytes() { + java.lang.Object ref = ""; + if (inputCase_ == 6) { + ref = input_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (inputCase_ == 6) { + input_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The UTF-8 encoded natural language text to be processed. Must be sent if
+     * `text_config` is set in the first message. Text length must not exceed
+     * 256 bytes. The `input_text` field can be only sent once.
+     * 
+ * + * string input_text = 6; + * + * @param value The inputText to set. + * @return This builder for chaining. + */ + public Builder setInputText(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + inputCase_ = 6; + input_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The UTF-8 encoded natural language text to be processed. Must be sent if
+     * `text_config` is set in the first message. Text length must not exceed
+     * 256 bytes. The `input_text` field can be only sent once.
+     * 
+ * + * string input_text = 6; + * + * @return This builder for chaining. + */ + public Builder clearInputText() { + if (inputCase_ == 6) { + inputCase_ = 0; + input_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The UTF-8 encoded natural language text to be processed. Must be sent if
+     * `text_config` is set in the first message. Text length must not exceed
+     * 256 bytes. The `input_text` field can be only sent once.
+     * 
+ * + * string input_text = 6; + * + * @param value The bytes for inputText to set. + * @return This builder for chaining. + */ + public Builder setInputTextBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + inputCase_ = 6; + input_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents, + com.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents.Builder, + com.google.cloud.dialogflow.v2beta1.TelephonyDtmfEventsOrBuilder> + inputDtmfBuilder_; + /** + * + * + *
+     * The DTMF digits used to invoke intent and fill in parameter value.
+     * This input is ignored if the previous response indicated that DTMF input
+     * is not accepted.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents input_dtmf = 9; + * + * @return Whether the inputDtmf field is set. + */ + @java.lang.Override + public boolean hasInputDtmf() { + return inputCase_ == 9; + } + /** + * + * + *
+     * The DTMF digits used to invoke intent and fill in parameter value.
+     * This input is ignored if the previous response indicated that DTMF input
+     * is not accepted.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents input_dtmf = 9; + * + * @return The inputDtmf. + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents getInputDtmf() { + if (inputDtmfBuilder_ == null) { + if (inputCase_ == 9) { + return (com.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents) input_; + } + return com.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents.getDefaultInstance(); + } else { + if (inputCase_ == 9) { + return inputDtmfBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents.getDefaultInstance(); + } + } + /** + * + * + *
+     * The DTMF digits used to invoke intent and fill in parameter value.
+     * This input is ignored if the previous response indicated that DTMF input
+     * is not accepted.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents input_dtmf = 9; + */ + public Builder setInputDtmf(com.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents value) { + if (inputDtmfBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + input_ = value; + onChanged(); + } else { + inputDtmfBuilder_.setMessage(value); + } + inputCase_ = 9; + return this; + } + /** + * + * + *
+     * The DTMF digits used to invoke intent and fill in parameter value.
+     * This input is ignored if the previous response indicated that DTMF input
+     * is not accepted.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents input_dtmf = 9; + */ + public Builder setInputDtmf( + com.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents.Builder builderForValue) { + if (inputDtmfBuilder_ == null) { + input_ = builderForValue.build(); + onChanged(); + } else { + inputDtmfBuilder_.setMessage(builderForValue.build()); + } + inputCase_ = 9; + return this; + } + /** + * + * + *
+     * The DTMF digits used to invoke intent and fill in parameter value.
+     * This input is ignored if the previous response indicated that DTMF input
+     * is not accepted.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents input_dtmf = 9; + */ + public Builder mergeInputDtmf(com.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents value) { + if (inputDtmfBuilder_ == null) { + if (inputCase_ == 9 + && input_ + != com.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents.getDefaultInstance()) { + input_ = + com.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents.newBuilder( + (com.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents) input_) + .mergeFrom(value) + .buildPartial(); + } else { + input_ = value; + } + onChanged(); + } else { + if (inputCase_ == 9) { + inputDtmfBuilder_.mergeFrom(value); + } else { + inputDtmfBuilder_.setMessage(value); + } + } + inputCase_ = 9; + return this; + } + /** + * + * + *
+     * The DTMF digits used to invoke intent and fill in parameter value.
+     * This input is ignored if the previous response indicated that DTMF input
+     * is not accepted.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents input_dtmf = 9; + */ + public Builder clearInputDtmf() { + if (inputDtmfBuilder_ == null) { + if (inputCase_ == 9) { + inputCase_ = 0; + input_ = null; + onChanged(); + } + } else { + if (inputCase_ == 9) { + inputCase_ = 0; + input_ = null; + } + inputDtmfBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The DTMF digits used to invoke intent and fill in parameter value.
+     * This input is ignored if the previous response indicated that DTMF input
+     * is not accepted.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents input_dtmf = 9; + */ + public com.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents.Builder getInputDtmfBuilder() { + return getInputDtmfFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The DTMF digits used to invoke intent and fill in parameter value.
+     * This input is ignored if the previous response indicated that DTMF input
+     * is not accepted.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents input_dtmf = 9; + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.TelephonyDtmfEventsOrBuilder + getInputDtmfOrBuilder() { + if ((inputCase_ == 9) && (inputDtmfBuilder_ != null)) { + return inputDtmfBuilder_.getMessageOrBuilder(); + } else { + if (inputCase_ == 9) { + return (com.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents) input_; + } + return com.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents.getDefaultInstance(); + } + } + /** + * + * + *
+     * The DTMF digits used to invoke intent and fill in parameter value.
+     * This input is ignored if the previous response indicated that DTMF input
+     * is not accepted.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents input_dtmf = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents, + com.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents.Builder, + com.google.cloud.dialogflow.v2beta1.TelephonyDtmfEventsOrBuilder> + getInputDtmfFieldBuilder() { + if (inputDtmfBuilder_ == null) { + if (!(inputCase_ == 9)) { + input_ = com.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents.getDefaultInstance(); + } + inputDtmfBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents, + com.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents.Builder, + com.google.cloud.dialogflow.v2beta1.TelephonyDtmfEventsOrBuilder>( + (com.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents) input_, + getParentForChildren(), + isClean()); + input_ = null; + } + inputCase_ = 9; + onChanged(); + ; + return inputDtmfBuilder_; + } + + private com.google.cloud.dialogflow.v2beta1.QueryParameters queryParams_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.QueryParameters, + com.google.cloud.dialogflow.v2beta1.QueryParameters.Builder, + com.google.cloud.dialogflow.v2beta1.QueryParametersOrBuilder> + queryParamsBuilder_; + /** + * + * + *
+     * Parameters for a Dialogflow virtual-agent query.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.QueryParameters query_params = 7; + * + * @return Whether the queryParams field is set. + */ + public boolean hasQueryParams() { + return queryParamsBuilder_ != null || queryParams_ != null; + } + /** + * + * + *
+     * Parameters for a Dialogflow virtual-agent query.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.QueryParameters query_params = 7; + * + * @return The queryParams. + */ + public com.google.cloud.dialogflow.v2beta1.QueryParameters getQueryParams() { + if (queryParamsBuilder_ == null) { + return queryParams_ == null + ? com.google.cloud.dialogflow.v2beta1.QueryParameters.getDefaultInstance() + : queryParams_; + } else { + return queryParamsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Parameters for a Dialogflow virtual-agent query.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.QueryParameters query_params = 7; + */ + public Builder setQueryParams(com.google.cloud.dialogflow.v2beta1.QueryParameters value) { + if (queryParamsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + queryParams_ = value; + onChanged(); + } else { + queryParamsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Parameters for a Dialogflow virtual-agent query.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.QueryParameters query_params = 7; + */ + public Builder setQueryParams( + com.google.cloud.dialogflow.v2beta1.QueryParameters.Builder builderForValue) { + if (queryParamsBuilder_ == null) { + queryParams_ = builderForValue.build(); + onChanged(); + } else { + queryParamsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Parameters for a Dialogflow virtual-agent query.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.QueryParameters query_params = 7; + */ + public Builder mergeQueryParams(com.google.cloud.dialogflow.v2beta1.QueryParameters value) { + if (queryParamsBuilder_ == null) { + if (queryParams_ != null) { + queryParams_ = + com.google.cloud.dialogflow.v2beta1.QueryParameters.newBuilder(queryParams_) + .mergeFrom(value) + .buildPartial(); + } else { + queryParams_ = value; + } + onChanged(); + } else { + queryParamsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Parameters for a Dialogflow virtual-agent query.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.QueryParameters query_params = 7; + */ + public Builder clearQueryParams() { + if (queryParamsBuilder_ == null) { + queryParams_ = null; + onChanged(); + } else { + queryParams_ = null; + queryParamsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Parameters for a Dialogflow virtual-agent query.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.QueryParameters query_params = 7; + */ + public com.google.cloud.dialogflow.v2beta1.QueryParameters.Builder getQueryParamsBuilder() { + + onChanged(); + return getQueryParamsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Parameters for a Dialogflow virtual-agent query.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.QueryParameters query_params = 7; + */ + public com.google.cloud.dialogflow.v2beta1.QueryParametersOrBuilder getQueryParamsOrBuilder() { + if (queryParamsBuilder_ != null) { + return queryParamsBuilder_.getMessageOrBuilder(); + } else { + return queryParams_ == null + ? com.google.cloud.dialogflow.v2beta1.QueryParameters.getDefaultInstance() + : queryParams_; + } + } + /** + * + * + *
+     * Parameters for a Dialogflow virtual-agent query.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.QueryParameters query_params = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.QueryParameters, + com.google.cloud.dialogflow.v2beta1.QueryParameters.Builder, + com.google.cloud.dialogflow.v2beta1.QueryParametersOrBuilder> + getQueryParamsFieldBuilder() { + if (queryParamsBuilder_ == null) { + queryParamsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.QueryParameters, + com.google.cloud.dialogflow.v2beta1.QueryParameters.Builder, + com.google.cloud.dialogflow.v2beta1.QueryParametersOrBuilder>( + getQueryParams(), getParentForChildren(), isClean()); + queryParams_ = null; + } + return queryParamsBuilder_; + } + + private com.google.cloud.dialogflow.v2beta1.AssistQueryParameters assistQueryParams_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.AssistQueryParameters, + com.google.cloud.dialogflow.v2beta1.AssistQueryParameters.Builder, + com.google.cloud.dialogflow.v2beta1.AssistQueryParametersOrBuilder> + assistQueryParamsBuilder_; + /** + * + * + *
+     * Parameters for a human assist query.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.AssistQueryParameters assist_query_params = 8; + * + * @return Whether the assistQueryParams field is set. + */ + public boolean hasAssistQueryParams() { + return assistQueryParamsBuilder_ != null || assistQueryParams_ != null; + } + /** + * + * + *
+     * Parameters for a human assist query.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.AssistQueryParameters assist_query_params = 8; + * + * @return The assistQueryParams. + */ + public com.google.cloud.dialogflow.v2beta1.AssistQueryParameters getAssistQueryParams() { + if (assistQueryParamsBuilder_ == null) { + return assistQueryParams_ == null + ? com.google.cloud.dialogflow.v2beta1.AssistQueryParameters.getDefaultInstance() + : assistQueryParams_; + } else { + return assistQueryParamsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Parameters for a human assist query.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.AssistQueryParameters assist_query_params = 8; + */ + public Builder setAssistQueryParams( + com.google.cloud.dialogflow.v2beta1.AssistQueryParameters value) { + if (assistQueryParamsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + assistQueryParams_ = value; + onChanged(); + } else { + assistQueryParamsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Parameters for a human assist query.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.AssistQueryParameters assist_query_params = 8; + */ + public Builder setAssistQueryParams( + com.google.cloud.dialogflow.v2beta1.AssistQueryParameters.Builder builderForValue) { + if (assistQueryParamsBuilder_ == null) { + assistQueryParams_ = builderForValue.build(); + onChanged(); + } else { + assistQueryParamsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Parameters for a human assist query.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.AssistQueryParameters assist_query_params = 8; + */ + public Builder mergeAssistQueryParams( + com.google.cloud.dialogflow.v2beta1.AssistQueryParameters value) { + if (assistQueryParamsBuilder_ == null) { + if (assistQueryParams_ != null) { + assistQueryParams_ = + com.google.cloud.dialogflow.v2beta1.AssistQueryParameters.newBuilder( + assistQueryParams_) + .mergeFrom(value) + .buildPartial(); + } else { + assistQueryParams_ = value; + } + onChanged(); + } else { + assistQueryParamsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Parameters for a human assist query.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.AssistQueryParameters assist_query_params = 8; + */ + public Builder clearAssistQueryParams() { + if (assistQueryParamsBuilder_ == null) { + assistQueryParams_ = null; + onChanged(); + } else { + assistQueryParams_ = null; + assistQueryParamsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Parameters for a human assist query.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.AssistQueryParameters assist_query_params = 8; + */ + public com.google.cloud.dialogflow.v2beta1.AssistQueryParameters.Builder + getAssistQueryParamsBuilder() { + + onChanged(); + return getAssistQueryParamsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Parameters for a human assist query.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.AssistQueryParameters assist_query_params = 8; + */ + public com.google.cloud.dialogflow.v2beta1.AssistQueryParametersOrBuilder + getAssistQueryParamsOrBuilder() { + if (assistQueryParamsBuilder_ != null) { + return assistQueryParamsBuilder_.getMessageOrBuilder(); + } else { + return assistQueryParams_ == null + ? com.google.cloud.dialogflow.v2beta1.AssistQueryParameters.getDefaultInstance() + : assistQueryParams_; + } + } + /** + * + * + *
+     * Parameters for a human assist query.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.AssistQueryParameters assist_query_params = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.AssistQueryParameters, + com.google.cloud.dialogflow.v2beta1.AssistQueryParameters.Builder, + com.google.cloud.dialogflow.v2beta1.AssistQueryParametersOrBuilder> + getAssistQueryParamsFieldBuilder() { + if (assistQueryParamsBuilder_ == null) { + assistQueryParamsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.AssistQueryParameters, + com.google.cloud.dialogflow.v2beta1.AssistQueryParameters.Builder, + com.google.cloud.dialogflow.v2beta1.AssistQueryParametersOrBuilder>( + getAssistQueryParams(), getParentForChildren(), isClean()); + assistQueryParams_ = null; + } + return assistQueryParamsBuilder_; + } + + private com.google.protobuf.Struct cxParameters_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + cxParametersBuilder_; + /** + * + * + *
+     * Additional parameters to be put into Dialogflow CX session parameters. To
+     * remove a parameter from the session, clients should explicitly set the
+     * parameter value to null.
+     * Note: this field should only be used if you are connecting to a Dialogflow
+     * CX agent.
+     * 
+ * + * .google.protobuf.Struct cx_parameters = 13; + * + * @return Whether the cxParameters field is set. + */ + public boolean hasCxParameters() { + return cxParametersBuilder_ != null || cxParameters_ != null; + } + /** + * + * + *
+     * Additional parameters to be put into Dialogflow CX session parameters. To
+     * remove a parameter from the session, clients should explicitly set the
+     * parameter value to null.
+     * Note: this field should only be used if you are connecting to a Dialogflow
+     * CX agent.
+     * 
+ * + * .google.protobuf.Struct cx_parameters = 13; + * + * @return The cxParameters. + */ + public com.google.protobuf.Struct getCxParameters() { + if (cxParametersBuilder_ == null) { + return cxParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : cxParameters_; + } else { + return cxParametersBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Additional parameters to be put into Dialogflow CX session parameters. To
+     * remove a parameter from the session, clients should explicitly set the
+     * parameter value to null.
+     * Note: this field should only be used if you are connecting to a Dialogflow
+     * CX agent.
+     * 
+ * + * .google.protobuf.Struct cx_parameters = 13; + */ + public Builder setCxParameters(com.google.protobuf.Struct value) { + if (cxParametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cxParameters_ = value; + onChanged(); + } else { + cxParametersBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Additional parameters to be put into Dialogflow CX session parameters. To
+     * remove a parameter from the session, clients should explicitly set the
+     * parameter value to null.
+     * Note: this field should only be used if you are connecting to a Dialogflow
+     * CX agent.
+     * 
+ * + * .google.protobuf.Struct cx_parameters = 13; + */ + public Builder setCxParameters(com.google.protobuf.Struct.Builder builderForValue) { + if (cxParametersBuilder_ == null) { + cxParameters_ = builderForValue.build(); + onChanged(); + } else { + cxParametersBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Additional parameters to be put into Dialogflow CX session parameters. To
+     * remove a parameter from the session, clients should explicitly set the
+     * parameter value to null.
+     * Note: this field should only be used if you are connecting to a Dialogflow
+     * CX agent.
+     * 
+ * + * .google.protobuf.Struct cx_parameters = 13; + */ + public Builder mergeCxParameters(com.google.protobuf.Struct value) { + if (cxParametersBuilder_ == null) { + if (cxParameters_ != null) { + cxParameters_ = + com.google.protobuf.Struct.newBuilder(cxParameters_).mergeFrom(value).buildPartial(); + } else { + cxParameters_ = value; + } + onChanged(); + } else { + cxParametersBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Additional parameters to be put into Dialogflow CX session parameters. To
+     * remove a parameter from the session, clients should explicitly set the
+     * parameter value to null.
+     * Note: this field should only be used if you are connecting to a Dialogflow
+     * CX agent.
+     * 
+ * + * .google.protobuf.Struct cx_parameters = 13; + */ + public Builder clearCxParameters() { + if (cxParametersBuilder_ == null) { + cxParameters_ = null; + onChanged(); + } else { + cxParameters_ = null; + cxParametersBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Additional parameters to be put into Dialogflow CX session parameters. To
+     * remove a parameter from the session, clients should explicitly set the
+     * parameter value to null.
+     * Note: this field should only be used if you are connecting to a Dialogflow
+     * CX agent.
+     * 
+ * + * .google.protobuf.Struct cx_parameters = 13; + */ + public com.google.protobuf.Struct.Builder getCxParametersBuilder() { + + onChanged(); + return getCxParametersFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Additional parameters to be put into Dialogflow CX session parameters. To
+     * remove a parameter from the session, clients should explicitly set the
+     * parameter value to null.
+     * Note: this field should only be used if you are connecting to a Dialogflow
+     * CX agent.
+     * 
+ * + * .google.protobuf.Struct cx_parameters = 13; + */ + public com.google.protobuf.StructOrBuilder getCxParametersOrBuilder() { + if (cxParametersBuilder_ != null) { + return cxParametersBuilder_.getMessageOrBuilder(); + } else { + return cxParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : cxParameters_; + } + } + /** + * + * + *
+     * Additional parameters to be put into Dialogflow CX session parameters. To
+     * remove a parameter from the session, clients should explicitly set the
+     * parameter value to null.
+     * Note: this field should only be used if you are connecting to a Dialogflow
+     * CX agent.
+     * 
+ * + * .google.protobuf.Struct cx_parameters = 13; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + getCxParametersFieldBuilder() { + if (cxParametersBuilder_ == null) { + cxParametersBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + getCxParameters(), getParentForChildren(), isClean()); + cxParameters_ = null; + } + return cxParametersBuilder_; + } + + private boolean enablePartialAutomatedAgentReply_; + /** + * + * + *
+     * Enable partial virtual agent responses. If this flag is not enabled,
+     * response stream still contains only one final response even if some
+     * `Fulfillment`s in Dialogflow virtual agent have been configured to return
+     * partial responses.
+     * 
+ * + * bool enable_partial_automated_agent_reply = 12; + * + * @return The enablePartialAutomatedAgentReply. + */ + @java.lang.Override + public boolean getEnablePartialAutomatedAgentReply() { + return enablePartialAutomatedAgentReply_; + } + /** + * + * + *
+     * Enable partial virtual agent responses. If this flag is not enabled,
+     * response stream still contains only one final response even if some
+     * `Fulfillment`s in Dialogflow virtual agent have been configured to return
+     * partial responses.
+     * 
+ * + * bool enable_partial_automated_agent_reply = 12; + * + * @param value The enablePartialAutomatedAgentReply to set. + * @return This builder for chaining. + */ + public Builder setEnablePartialAutomatedAgentReply(boolean value) { + + enablePartialAutomatedAgentReply_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Enable partial virtual agent responses. If this flag is not enabled,
+     * response stream still contains only one final response even if some
+     * `Fulfillment`s in Dialogflow virtual agent have been configured to return
+     * partial responses.
+     * 
+ * + * bool enable_partial_automated_agent_reply = 12; + * + * @return This builder for chaining. + */ + public Builder clearEnablePartialAutomatedAgentReply() { + + enablePartialAutomatedAgentReply_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest) + private static final com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest(); + } + + public static com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StreamingAnalyzeContentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StreamingAnalyzeContentRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/StreamingAnalyzeContentRequestOrBuilder.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/StreamingAnalyzeContentRequestOrBuilder.java new file mode 100644 index 000000000..f8e5cb220 --- /dev/null +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/StreamingAnalyzeContentRequestOrBuilder.java @@ -0,0 +1,428 @@ +/* + * Copyright 2020 Google LLC + * + * 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/v2beta1/participant.proto + +package com.google.cloud.dialogflow.v2beta1; + +public interface StreamingAnalyzeContentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the participant this text comes from.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/conversations/<Conversation ID>/participants/<Participant ID>`.
+   * 
+ * + * + * string participant = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The participant. + */ + java.lang.String getParticipant(); + /** + * + * + *
+   * Required. The name of the participant this text comes from.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/conversations/<Conversation ID>/participants/<Participant ID>`.
+   * 
+ * + * + * string participant = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for participant. + */ + com.google.protobuf.ByteString getParticipantBytes(); + + /** + * + * + *
+   * Instructs the speech recognizer how to process the speech audio.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.InputAudioConfig audio_config = 2; + * + * @return Whether the audioConfig field is set. + */ + boolean hasAudioConfig(); + /** + * + * + *
+   * Instructs the speech recognizer how to process the speech audio.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.InputAudioConfig audio_config = 2; + * + * @return The audioConfig. + */ + com.google.cloud.dialogflow.v2beta1.InputAudioConfig getAudioConfig(); + /** + * + * + *
+   * Instructs the speech recognizer how to process the speech audio.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.InputAudioConfig audio_config = 2; + */ + com.google.cloud.dialogflow.v2beta1.InputAudioConfigOrBuilder getAudioConfigOrBuilder(); + + /** + * + * + *
+   * The natural language text to be processed.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.InputTextConfig text_config = 3; + * + * @return Whether the textConfig field is set. + */ + boolean hasTextConfig(); + /** + * + * + *
+   * The natural language text to be processed.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.InputTextConfig text_config = 3; + * + * @return The textConfig. + */ + com.google.cloud.dialogflow.v2beta1.InputTextConfig getTextConfig(); + /** + * + * + *
+   * The natural language text to be processed.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.InputTextConfig text_config = 3; + */ + com.google.cloud.dialogflow.v2beta1.InputTextConfigOrBuilder getTextConfigOrBuilder(); + + /** + * + * + *
+   * Speech synthesis configuration.
+   * The speech synthesis settings for a virtual agent that may be configured
+   * for the associated conversation profile are not used when calling
+   * StreamingAnalyzeContent. If this configuration is not supplied, speech
+   * synthesis is disabled.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.OutputAudioConfig reply_audio_config = 4; + * + * @return Whether the replyAudioConfig field is set. + */ + boolean hasReplyAudioConfig(); + /** + * + * + *
+   * Speech synthesis configuration.
+   * The speech synthesis settings for a virtual agent that may be configured
+   * for the associated conversation profile are not used when calling
+   * StreamingAnalyzeContent. If this configuration is not supplied, speech
+   * synthesis is disabled.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.OutputAudioConfig reply_audio_config = 4; + * + * @return The replyAudioConfig. + */ + com.google.cloud.dialogflow.v2beta1.OutputAudioConfig getReplyAudioConfig(); + /** + * + * + *
+   * Speech synthesis configuration.
+   * The speech synthesis settings for a virtual agent that may be configured
+   * for the associated conversation profile are not used when calling
+   * StreamingAnalyzeContent. If this configuration is not supplied, speech
+   * synthesis is disabled.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.OutputAudioConfig reply_audio_config = 4; + */ + com.google.cloud.dialogflow.v2beta1.OutputAudioConfigOrBuilder getReplyAudioConfigOrBuilder(); + + /** + * + * + *
+   * The input audio content to be recognized. Must be sent if `audio_config`
+   * is set in the first message. The complete audio over all streaming
+   * messages must not exceed 1 minute.
+   * 
+ * + * bytes input_audio = 5; + * + * @return Whether the inputAudio field is set. + */ + boolean hasInputAudio(); + /** + * + * + *
+   * The input audio content to be recognized. Must be sent if `audio_config`
+   * is set in the first message. The complete audio over all streaming
+   * messages must not exceed 1 minute.
+   * 
+ * + * bytes input_audio = 5; + * + * @return The inputAudio. + */ + com.google.protobuf.ByteString getInputAudio(); + + /** + * + * + *
+   * The UTF-8 encoded natural language text to be processed. Must be sent if
+   * `text_config` is set in the first message. Text length must not exceed
+   * 256 bytes. The `input_text` field can be only sent once.
+   * 
+ * + * string input_text = 6; + * + * @return Whether the inputText field is set. + */ + boolean hasInputText(); + /** + * + * + *
+   * The UTF-8 encoded natural language text to be processed. Must be sent if
+   * `text_config` is set in the first message. Text length must not exceed
+   * 256 bytes. The `input_text` field can be only sent once.
+   * 
+ * + * string input_text = 6; + * + * @return The inputText. + */ + java.lang.String getInputText(); + /** + * + * + *
+   * The UTF-8 encoded natural language text to be processed. Must be sent if
+   * `text_config` is set in the first message. Text length must not exceed
+   * 256 bytes. The `input_text` field can be only sent once.
+   * 
+ * + * string input_text = 6; + * + * @return The bytes for inputText. + */ + com.google.protobuf.ByteString getInputTextBytes(); + + /** + * + * + *
+   * The DTMF digits used to invoke intent and fill in parameter value.
+   * This input is ignored if the previous response indicated that DTMF input
+   * is not accepted.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents input_dtmf = 9; + * + * @return Whether the inputDtmf field is set. + */ + boolean hasInputDtmf(); + /** + * + * + *
+   * The DTMF digits used to invoke intent and fill in parameter value.
+   * This input is ignored if the previous response indicated that DTMF input
+   * is not accepted.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents input_dtmf = 9; + * + * @return The inputDtmf. + */ + com.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents getInputDtmf(); + /** + * + * + *
+   * The DTMF digits used to invoke intent and fill in parameter value.
+   * This input is ignored if the previous response indicated that DTMF input
+   * is not accepted.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents input_dtmf = 9; + */ + com.google.cloud.dialogflow.v2beta1.TelephonyDtmfEventsOrBuilder getInputDtmfOrBuilder(); + + /** + * + * + *
+   * Parameters for a Dialogflow virtual-agent query.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.QueryParameters query_params = 7; + * + * @return Whether the queryParams field is set. + */ + boolean hasQueryParams(); + /** + * + * + *
+   * Parameters for a Dialogflow virtual-agent query.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.QueryParameters query_params = 7; + * + * @return The queryParams. + */ + com.google.cloud.dialogflow.v2beta1.QueryParameters getQueryParams(); + /** + * + * + *
+   * Parameters for a Dialogflow virtual-agent query.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.QueryParameters query_params = 7; + */ + com.google.cloud.dialogflow.v2beta1.QueryParametersOrBuilder getQueryParamsOrBuilder(); + + /** + * + * + *
+   * Parameters for a human assist query.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.AssistQueryParameters assist_query_params = 8; + * + * @return Whether the assistQueryParams field is set. + */ + boolean hasAssistQueryParams(); + /** + * + * + *
+   * Parameters for a human assist query.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.AssistQueryParameters assist_query_params = 8; + * + * @return The assistQueryParams. + */ + com.google.cloud.dialogflow.v2beta1.AssistQueryParameters getAssistQueryParams(); + /** + * + * + *
+   * Parameters for a human assist query.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.AssistQueryParameters assist_query_params = 8; + */ + com.google.cloud.dialogflow.v2beta1.AssistQueryParametersOrBuilder + getAssistQueryParamsOrBuilder(); + + /** + * + * + *
+   * Additional parameters to be put into Dialogflow CX session parameters. To
+   * remove a parameter from the session, clients should explicitly set the
+   * parameter value to null.
+   * Note: this field should only be used if you are connecting to a Dialogflow
+   * CX agent.
+   * 
+ * + * .google.protobuf.Struct cx_parameters = 13; + * + * @return Whether the cxParameters field is set. + */ + boolean hasCxParameters(); + /** + * + * + *
+   * Additional parameters to be put into Dialogflow CX session parameters. To
+   * remove a parameter from the session, clients should explicitly set the
+   * parameter value to null.
+   * Note: this field should only be used if you are connecting to a Dialogflow
+   * CX agent.
+   * 
+ * + * .google.protobuf.Struct cx_parameters = 13; + * + * @return The cxParameters. + */ + com.google.protobuf.Struct getCxParameters(); + /** + * + * + *
+   * Additional parameters to be put into Dialogflow CX session parameters. To
+   * remove a parameter from the session, clients should explicitly set the
+   * parameter value to null.
+   * Note: this field should only be used if you are connecting to a Dialogflow
+   * CX agent.
+   * 
+ * + * .google.protobuf.Struct cx_parameters = 13; + */ + com.google.protobuf.StructOrBuilder getCxParametersOrBuilder(); + + /** + * + * + *
+   * Enable partial virtual agent responses. If this flag is not enabled,
+   * response stream still contains only one final response even if some
+   * `Fulfillment`s in Dialogflow virtual agent have been configured to return
+   * partial responses.
+   * 
+ * + * bool enable_partial_automated_agent_reply = 12; + * + * @return The enablePartialAutomatedAgentReply. + */ + boolean getEnablePartialAutomatedAgentReply(); + + public com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.ConfigCase + getConfigCase(); + + public com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.InputCase + getInputCase(); +} diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/StreamingAnalyzeContentResponse.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/StreamingAnalyzeContentResponse.java new file mode 100644 index 000000000..7aabd63ba --- /dev/null +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/StreamingAnalyzeContentResponse.java @@ -0,0 +1,3460 @@ +/* + * Copyright 2020 Google LLC + * + * 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/v2beta1/participant.proto + +package com.google.cloud.dialogflow.v2beta1; + +/** + * + * + *
+ * The top-level message returned from the `StreamingAnalyzeContent` method.
+ * Multiple response messages can be returned in order:
+ * 1.  If the input was set to streaming audio, the first one or more messages
+ *     contain `recognition_result`. Each `recognition_result` represents a more
+ *     complete transcript of what the user said. The last `recognition_result`
+ *     has `is_final` set to `true`.
+ * 2.  In virtual agent stage: if `enable_partial_automated_agent_reply` is
+ *     true, the following N (currently 1 <= N <= 4) messages
+ *     contain `automated_agent_reply` and optionally `reply_audio`
+ *     returned by the virtual agent. The first (N-1)
+ *     `automated_agent_reply`s will have `automated_agent_reply_type` set to
+ *     `PARTIAL`. The last `automated_agent_reply` has
+ *     `automated_agent_reply_type` set to `FINAL`.
+ *     If `enable_partial_automated_agent_reply` is not enabled, response stream
+ *     only contains the final reply.
+ *     In human assist stage: the following N (N >= 1) messages contain
+ *     `human_agent_suggestion_results`, `end_user_suggestion_results` or
+ *     `message`.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse} + */ +public final class StreamingAnalyzeContentResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse) + StreamingAnalyzeContentResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use StreamingAnalyzeContentResponse.newBuilder() to construct. + private StreamingAnalyzeContentResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StreamingAnalyzeContentResponse() { + replyText_ = ""; + humanAgentSuggestionResults_ = java.util.Collections.emptyList(); + endUserSuggestionResults_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new StreamingAnalyzeContentResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private StreamingAnalyzeContentResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.Builder subBuilder = + null; + if (recognitionResult_ != null) { + subBuilder = recognitionResult_.toBuilder(); + } + recognitionResult_ = + input.readMessage( + com.google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(recognitionResult_); + recognitionResult_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + replyText_ = s; + break; + } + case 26: + { + com.google.cloud.dialogflow.v2beta1.OutputAudio.Builder subBuilder = null; + if (replyAudio_ != null) { + subBuilder = replyAudio_.toBuilder(); + } + replyAudio_ = + input.readMessage( + com.google.cloud.dialogflow.v2beta1.OutputAudio.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(replyAudio_); + replyAudio_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + com.google.cloud.dialogflow.v2beta1.AutomatedAgentReply.Builder subBuilder = null; + if (automatedAgentReply_ != null) { + subBuilder = automatedAgentReply_.toBuilder(); + } + automatedAgentReply_ = + input.readMessage( + com.google.cloud.dialogflow.v2beta1.AutomatedAgentReply.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(automatedAgentReply_); + automatedAgentReply_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + com.google.cloud.dialogflow.v2beta1.Message.Builder subBuilder = null; + if (message_ != null) { + subBuilder = message_.toBuilder(); + } + message_ = + input.readMessage( + com.google.cloud.dialogflow.v2beta1.Message.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(message_); + message_ = subBuilder.buildPartial(); + } + + break; + } + case 58: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + humanAgentSuggestionResults_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + humanAgentSuggestionResults_.add( + input.readMessage( + com.google.cloud.dialogflow.v2beta1.SuggestionResult.parser(), + extensionRegistry)); + break; + } + case 66: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + endUserSuggestionResults_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + endUserSuggestionResults_.add( + input.readMessage( + com.google.cloud.dialogflow.v2beta1.SuggestionResult.parser(), + extensionRegistry)); + break; + } + case 82: + { + com.google.cloud.dialogflow.v2beta1.DtmfParameters.Builder subBuilder = null; + if (dtmfParameters_ != null) { + subBuilder = dtmfParameters_.toBuilder(); + } + dtmfParameters_ = + input.readMessage( + com.google.cloud.dialogflow.v2beta1.DtmfParameters.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(dtmfParameters_); + dtmfParameters_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + humanAgentSuggestionResults_ = + java.util.Collections.unmodifiableList(humanAgentSuggestionResults_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + endUserSuggestionResults_ = + java.util.Collections.unmodifiableList(endUserSuggestionResults_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2beta1.ParticipantProto + .internal_static_google_cloud_dialogflow_v2beta1_StreamingAnalyzeContentResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2beta1.ParticipantProto + .internal_static_google_cloud_dialogflow_v2beta1_StreamingAnalyzeContentResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse.class, + com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse.Builder.class); + } + + public static final int RECOGNITION_RESULT_FIELD_NUMBER = 1; + private com.google.cloud.dialogflow.v2beta1.StreamingRecognitionResult recognitionResult_; + /** + * + * + *
+   * The result of speech recognition.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.StreamingRecognitionResult recognition_result = 1; + * + * + * @return Whether the recognitionResult field is set. + */ + @java.lang.Override + public boolean hasRecognitionResult() { + return recognitionResult_ != null; + } + /** + * + * + *
+   * The result of speech recognition.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.StreamingRecognitionResult recognition_result = 1; + * + * + * @return The recognitionResult. + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.StreamingRecognitionResult getRecognitionResult() { + return recognitionResult_ == null + ? com.google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.getDefaultInstance() + : recognitionResult_; + } + /** + * + * + *
+   * The result of speech recognition.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.StreamingRecognitionResult recognition_result = 1; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.StreamingRecognitionResultOrBuilder + getRecognitionResultOrBuilder() { + return getRecognitionResult(); + } + + public static final int REPLY_TEXT_FIELD_NUMBER = 2; + private volatile java.lang.Object replyText_; + /** + * + * + *
+   * Optional. The output text content.
+   * This field is set if an automated agent responded with a text for the user.
+   * 
+ * + * string reply_text = 2; + * + * @return The replyText. + */ + @java.lang.Override + public java.lang.String getReplyText() { + java.lang.Object ref = replyText_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + replyText_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The output text content.
+   * This field is set if an automated agent responded with a text for the user.
+   * 
+ * + * string reply_text = 2; + * + * @return The bytes for replyText. + */ + @java.lang.Override + public com.google.protobuf.ByteString getReplyTextBytes() { + java.lang.Object ref = replyText_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + replyText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REPLY_AUDIO_FIELD_NUMBER = 3; + private com.google.cloud.dialogflow.v2beta1.OutputAudio replyAudio_; + /** + * + * + *
+   * Optional. The audio data bytes encoded as specified in the request.
+   * This field is set if:
+   *  - The `reply_audio_config` field is specified in the request.
+   *  - The automated agent, which this output comes from, responded with audio.
+   *    In such case, the `reply_audio.config` field contains settings used to
+   *    synthesize the speech.
+   * 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.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.OutputAudio reply_audio = 3; + * + * @return Whether the replyAudio field is set. + */ + @java.lang.Override + public boolean hasReplyAudio() { + return replyAudio_ != null; + } + /** + * + * + *
+   * Optional. The audio data bytes encoded as specified in the request.
+   * This field is set if:
+   *  - The `reply_audio_config` field is specified in the request.
+   *  - The automated agent, which this output comes from, responded with audio.
+   *    In such case, the `reply_audio.config` field contains settings used to
+   *    synthesize the speech.
+   * 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.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.OutputAudio reply_audio = 3; + * + * @return The replyAudio. + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.OutputAudio getReplyAudio() { + return replyAudio_ == null + ? com.google.cloud.dialogflow.v2beta1.OutputAudio.getDefaultInstance() + : replyAudio_; + } + /** + * + * + *
+   * Optional. The audio data bytes encoded as specified in the request.
+   * This field is set if:
+   *  - The `reply_audio_config` field is specified in the request.
+   *  - The automated agent, which this output comes from, responded with audio.
+   *    In such case, the `reply_audio.config` field contains settings used to
+   *    synthesize the speech.
+   * 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.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.OutputAudio reply_audio = 3; + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.OutputAudioOrBuilder getReplyAudioOrBuilder() { + return getReplyAudio(); + } + + public static final int AUTOMATED_AGENT_REPLY_FIELD_NUMBER = 4; + private com.google.cloud.dialogflow.v2beta1.AutomatedAgentReply automatedAgentReply_; + /** + * + * + *
+   * Optional. Only set if a Dialogflow automated agent has responded.
+   * Note that: [AutomatedAgentReply.detect_intent_response.output_audio][]
+   * and [AutomatedAgentReply.detect_intent_response.output_audio_config][]
+   * are always empty, use [reply_audio][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse.reply_audio] instead.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.AutomatedAgentReply automated_agent_reply = 4; + * + * @return Whether the automatedAgentReply field is set. + */ + @java.lang.Override + public boolean hasAutomatedAgentReply() { + return automatedAgentReply_ != null; + } + /** + * + * + *
+   * Optional. Only set if a Dialogflow automated agent has responded.
+   * Note that: [AutomatedAgentReply.detect_intent_response.output_audio][]
+   * and [AutomatedAgentReply.detect_intent_response.output_audio_config][]
+   * are always empty, use [reply_audio][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse.reply_audio] instead.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.AutomatedAgentReply automated_agent_reply = 4; + * + * @return The automatedAgentReply. + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.AutomatedAgentReply getAutomatedAgentReply() { + return automatedAgentReply_ == null + ? com.google.cloud.dialogflow.v2beta1.AutomatedAgentReply.getDefaultInstance() + : automatedAgentReply_; + } + /** + * + * + *
+   * Optional. Only set if a Dialogflow automated agent has responded.
+   * Note that: [AutomatedAgentReply.detect_intent_response.output_audio][]
+   * and [AutomatedAgentReply.detect_intent_response.output_audio_config][]
+   * are always empty, use [reply_audio][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse.reply_audio] instead.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.AutomatedAgentReply automated_agent_reply = 4; + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.AutomatedAgentReplyOrBuilder + getAutomatedAgentReplyOrBuilder() { + return getAutomatedAgentReply(); + } + + public static final int MESSAGE_FIELD_NUMBER = 6; + private com.google.cloud.dialogflow.v2beta1.Message message_; + /** + * + * + *
+   * Output only. Message analyzed by CCAI.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.Message message = 6; + * + * @return Whether the message field is set. + */ + @java.lang.Override + public boolean hasMessage() { + return message_ != null; + } + /** + * + * + *
+   * Output only. Message analyzed by CCAI.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.Message message = 6; + * + * @return The message. + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.Message getMessage() { + return message_ == null + ? com.google.cloud.dialogflow.v2beta1.Message.getDefaultInstance() + : message_; + } + /** + * + * + *
+   * Output only. Message analyzed by CCAI.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.Message message = 6; + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.MessageOrBuilder getMessageOrBuilder() { + return getMessage(); + } + + public static final int HUMAN_AGENT_SUGGESTION_RESULTS_FIELD_NUMBER = 7; + private java.util.List + humanAgentSuggestionResults_; + /** + * + * + *
+   * The suggestions for most recent human agent. The order is the same as
+   * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+   * [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.human_agent_suggestion_config].
+   * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult human_agent_suggestion_results = 7; + * + */ + @java.lang.Override + public java.util.List + getHumanAgentSuggestionResultsList() { + return humanAgentSuggestionResults_; + } + /** + * + * + *
+   * The suggestions for most recent human agent. The order is the same as
+   * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+   * [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.human_agent_suggestion_config].
+   * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult human_agent_suggestion_results = 7; + * + */ + @java.lang.Override + public java.util.List + getHumanAgentSuggestionResultsOrBuilderList() { + return humanAgentSuggestionResults_; + } + /** + * + * + *
+   * The suggestions for most recent human agent. The order is the same as
+   * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+   * [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.human_agent_suggestion_config].
+   * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult human_agent_suggestion_results = 7; + * + */ + @java.lang.Override + public int getHumanAgentSuggestionResultsCount() { + return humanAgentSuggestionResults_.size(); + } + /** + * + * + *
+   * The suggestions for most recent human agent. The order is the same as
+   * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+   * [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.human_agent_suggestion_config].
+   * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult human_agent_suggestion_results = 7; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.SuggestionResult getHumanAgentSuggestionResults( + int index) { + return humanAgentSuggestionResults_.get(index); + } + /** + * + * + *
+   * The suggestions for most recent human agent. The order is the same as
+   * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+   * [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.human_agent_suggestion_config].
+   * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult human_agent_suggestion_results = 7; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.SuggestionResultOrBuilder + getHumanAgentSuggestionResultsOrBuilder(int index) { + return humanAgentSuggestionResults_.get(index); + } + + public static final int END_USER_SUGGESTION_RESULTS_FIELD_NUMBER = 8; + private java.util.List + endUserSuggestionResults_; + /** + * + * + *
+   * The suggestions for end user. The order is the same as
+   * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+   * [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.end_user_suggestion_config].
+   * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult end_user_suggestion_results = 8; + * + */ + @java.lang.Override + public java.util.List + getEndUserSuggestionResultsList() { + return endUserSuggestionResults_; + } + /** + * + * + *
+   * The suggestions for end user. The order is the same as
+   * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+   * [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.end_user_suggestion_config].
+   * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult end_user_suggestion_results = 8; + * + */ + @java.lang.Override + public java.util.List + getEndUserSuggestionResultsOrBuilderList() { + return endUserSuggestionResults_; + } + /** + * + * + *
+   * The suggestions for end user. The order is the same as
+   * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+   * [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.end_user_suggestion_config].
+   * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult end_user_suggestion_results = 8; + * + */ + @java.lang.Override + public int getEndUserSuggestionResultsCount() { + return endUserSuggestionResults_.size(); + } + /** + * + * + *
+   * The suggestions for end user. The order is the same as
+   * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+   * [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.end_user_suggestion_config].
+   * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult end_user_suggestion_results = 8; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.SuggestionResult getEndUserSuggestionResults( + int index) { + return endUserSuggestionResults_.get(index); + } + /** + * + * + *
+   * The suggestions for end user. The order is the same as
+   * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+   * [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.end_user_suggestion_config].
+   * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult end_user_suggestion_results = 8; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.SuggestionResultOrBuilder + getEndUserSuggestionResultsOrBuilder(int index) { + return endUserSuggestionResults_.get(index); + } + + public static final int DTMF_PARAMETERS_FIELD_NUMBER = 10; + private com.google.cloud.dialogflow.v2beta1.DtmfParameters dtmfParameters_; + /** + * + * + *
+   * Indicates the parameters of DTMF.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.DtmfParameters dtmf_parameters = 10; + * + * @return Whether the dtmfParameters field is set. + */ + @java.lang.Override + public boolean hasDtmfParameters() { + return dtmfParameters_ != null; + } + /** + * + * + *
+   * Indicates the parameters of DTMF.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.DtmfParameters dtmf_parameters = 10; + * + * @return The dtmfParameters. + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.DtmfParameters getDtmfParameters() { + return dtmfParameters_ == null + ? com.google.cloud.dialogflow.v2beta1.DtmfParameters.getDefaultInstance() + : dtmfParameters_; + } + /** + * + * + *
+   * Indicates the parameters of DTMF.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.DtmfParameters dtmf_parameters = 10; + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.DtmfParametersOrBuilder getDtmfParametersOrBuilder() { + return getDtmfParameters(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (recognitionResult_ != null) { + output.writeMessage(1, getRecognitionResult()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(replyText_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, replyText_); + } + if (replyAudio_ != null) { + output.writeMessage(3, getReplyAudio()); + } + if (automatedAgentReply_ != null) { + output.writeMessage(4, getAutomatedAgentReply()); + } + if (message_ != null) { + output.writeMessage(6, getMessage()); + } + for (int i = 0; i < humanAgentSuggestionResults_.size(); i++) { + output.writeMessage(7, humanAgentSuggestionResults_.get(i)); + } + for (int i = 0; i < endUserSuggestionResults_.size(); i++) { + output.writeMessage(8, endUserSuggestionResults_.get(i)); + } + if (dtmfParameters_ != null) { + output.writeMessage(10, getDtmfParameters()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (recognitionResult_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getRecognitionResult()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(replyText_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, replyText_); + } + if (replyAudio_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getReplyAudio()); + } + if (automatedAgentReply_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getAutomatedAgentReply()); + } + if (message_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getMessage()); + } + for (int i = 0; i < humanAgentSuggestionResults_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, humanAgentSuggestionResults_.get(i)); + } + for (int i = 0; i < endUserSuggestionResults_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, endUserSuggestionResults_.get(i)); + } + if (dtmfParameters_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getDtmfParameters()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse other = + (com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse) obj; + + if (hasRecognitionResult() != other.hasRecognitionResult()) return false; + if (hasRecognitionResult()) { + if (!getRecognitionResult().equals(other.getRecognitionResult())) return false; + } + if (!getReplyText().equals(other.getReplyText())) return false; + if (hasReplyAudio() != other.hasReplyAudio()) return false; + if (hasReplyAudio()) { + if (!getReplyAudio().equals(other.getReplyAudio())) return false; + } + if (hasAutomatedAgentReply() != other.hasAutomatedAgentReply()) return false; + if (hasAutomatedAgentReply()) { + if (!getAutomatedAgentReply().equals(other.getAutomatedAgentReply())) return false; + } + if (hasMessage() != other.hasMessage()) return false; + if (hasMessage()) { + if (!getMessage().equals(other.getMessage())) return false; + } + if (!getHumanAgentSuggestionResultsList().equals(other.getHumanAgentSuggestionResultsList())) + return false; + if (!getEndUserSuggestionResultsList().equals(other.getEndUserSuggestionResultsList())) + return false; + if (hasDtmfParameters() != other.hasDtmfParameters()) return false; + if (hasDtmfParameters()) { + if (!getDtmfParameters().equals(other.getDtmfParameters())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasRecognitionResult()) { + hash = (37 * hash) + RECOGNITION_RESULT_FIELD_NUMBER; + hash = (53 * hash) + getRecognitionResult().hashCode(); + } + hash = (37 * hash) + REPLY_TEXT_FIELD_NUMBER; + hash = (53 * hash) + getReplyText().hashCode(); + if (hasReplyAudio()) { + hash = (37 * hash) + REPLY_AUDIO_FIELD_NUMBER; + hash = (53 * hash) + getReplyAudio().hashCode(); + } + if (hasAutomatedAgentReply()) { + hash = (37 * hash) + AUTOMATED_AGENT_REPLY_FIELD_NUMBER; + hash = (53 * hash) + getAutomatedAgentReply().hashCode(); + } + if (hasMessage()) { + hash = (37 * hash) + MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getMessage().hashCode(); + } + if (getHumanAgentSuggestionResultsCount() > 0) { + hash = (37 * hash) + HUMAN_AGENT_SUGGESTION_RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getHumanAgentSuggestionResultsList().hashCode(); + } + if (getEndUserSuggestionResultsCount() > 0) { + hash = (37 * hash) + END_USER_SUGGESTION_RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getEndUserSuggestionResultsList().hashCode(); + } + if (hasDtmfParameters()) { + hash = (37 * hash) + DTMF_PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getDtmfParameters().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The top-level message returned from the `StreamingAnalyzeContent` method.
+   * Multiple response messages can be returned in order:
+   * 1.  If the input was set to streaming audio, the first one or more messages
+   *     contain `recognition_result`. Each `recognition_result` represents a more
+   *     complete transcript of what the user said. The last `recognition_result`
+   *     has `is_final` set to `true`.
+   * 2.  In virtual agent stage: if `enable_partial_automated_agent_reply` is
+   *     true, the following N (currently 1 <= N <= 4) messages
+   *     contain `automated_agent_reply` and optionally `reply_audio`
+   *     returned by the virtual agent. The first (N-1)
+   *     `automated_agent_reply`s will have `automated_agent_reply_type` set to
+   *     `PARTIAL`. The last `automated_agent_reply` has
+   *     `automated_agent_reply_type` set to `FINAL`.
+   *     If `enable_partial_automated_agent_reply` is not enabled, response stream
+   *     only contains the final reply.
+   *     In human assist stage: the following N (N >= 1) messages contain
+   *     `human_agent_suggestion_results`, `end_user_suggestion_results` or
+   *     `message`.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse) + com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2beta1.ParticipantProto + .internal_static_google_cloud_dialogflow_v2beta1_StreamingAnalyzeContentResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2beta1.ParticipantProto + .internal_static_google_cloud_dialogflow_v2beta1_StreamingAnalyzeContentResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse.class, + com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse.Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getHumanAgentSuggestionResultsFieldBuilder(); + getEndUserSuggestionResultsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (recognitionResultBuilder_ == null) { + recognitionResult_ = null; + } else { + recognitionResult_ = null; + recognitionResultBuilder_ = null; + } + replyText_ = ""; + + if (replyAudioBuilder_ == null) { + replyAudio_ = null; + } else { + replyAudio_ = null; + replyAudioBuilder_ = null; + } + if (automatedAgentReplyBuilder_ == null) { + automatedAgentReply_ = null; + } else { + automatedAgentReply_ = null; + automatedAgentReplyBuilder_ = null; + } + if (messageBuilder_ == null) { + message_ = null; + } else { + message_ = null; + messageBuilder_ = null; + } + if (humanAgentSuggestionResultsBuilder_ == null) { + humanAgentSuggestionResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + humanAgentSuggestionResultsBuilder_.clear(); + } + if (endUserSuggestionResultsBuilder_ == null) { + endUserSuggestionResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + endUserSuggestionResultsBuilder_.clear(); + } + if (dtmfParametersBuilder_ == null) { + dtmfParameters_ = null; + } else { + dtmfParameters_ = null; + dtmfParametersBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.v2beta1.ParticipantProto + .internal_static_google_cloud_dialogflow_v2beta1_StreamingAnalyzeContentResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse build() { + com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse buildPartial() { + com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse result = + new com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse(this); + int from_bitField0_ = bitField0_; + if (recognitionResultBuilder_ == null) { + result.recognitionResult_ = recognitionResult_; + } else { + result.recognitionResult_ = recognitionResultBuilder_.build(); + } + result.replyText_ = replyText_; + if (replyAudioBuilder_ == null) { + result.replyAudio_ = replyAudio_; + } else { + result.replyAudio_ = replyAudioBuilder_.build(); + } + if (automatedAgentReplyBuilder_ == null) { + result.automatedAgentReply_ = automatedAgentReply_; + } else { + result.automatedAgentReply_ = automatedAgentReplyBuilder_.build(); + } + if (messageBuilder_ == null) { + result.message_ = message_; + } else { + result.message_ = messageBuilder_.build(); + } + if (humanAgentSuggestionResultsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + humanAgentSuggestionResults_ = + java.util.Collections.unmodifiableList(humanAgentSuggestionResults_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.humanAgentSuggestionResults_ = humanAgentSuggestionResults_; + } else { + result.humanAgentSuggestionResults_ = humanAgentSuggestionResultsBuilder_.build(); + } + if (endUserSuggestionResultsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + endUserSuggestionResults_ = + java.util.Collections.unmodifiableList(endUserSuggestionResults_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.endUserSuggestionResults_ = endUserSuggestionResults_; + } else { + result.endUserSuggestionResults_ = endUserSuggestionResultsBuilder_.build(); + } + if (dtmfParametersBuilder_ == null) { + result.dtmfParameters_ = dtmfParameters_; + } else { + result.dtmfParameters_ = dtmfParametersBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse) { + return mergeFrom( + (com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse other) { + if (other + == com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse + .getDefaultInstance()) return this; + if (other.hasRecognitionResult()) { + mergeRecognitionResult(other.getRecognitionResult()); + } + if (!other.getReplyText().isEmpty()) { + replyText_ = other.replyText_; + onChanged(); + } + if (other.hasReplyAudio()) { + mergeReplyAudio(other.getReplyAudio()); + } + if (other.hasAutomatedAgentReply()) { + mergeAutomatedAgentReply(other.getAutomatedAgentReply()); + } + if (other.hasMessage()) { + mergeMessage(other.getMessage()); + } + if (humanAgentSuggestionResultsBuilder_ == null) { + if (!other.humanAgentSuggestionResults_.isEmpty()) { + if (humanAgentSuggestionResults_.isEmpty()) { + humanAgentSuggestionResults_ = other.humanAgentSuggestionResults_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureHumanAgentSuggestionResultsIsMutable(); + humanAgentSuggestionResults_.addAll(other.humanAgentSuggestionResults_); + } + onChanged(); + } + } else { + if (!other.humanAgentSuggestionResults_.isEmpty()) { + if (humanAgentSuggestionResultsBuilder_.isEmpty()) { + humanAgentSuggestionResultsBuilder_.dispose(); + humanAgentSuggestionResultsBuilder_ = null; + humanAgentSuggestionResults_ = other.humanAgentSuggestionResults_; + bitField0_ = (bitField0_ & ~0x00000001); + humanAgentSuggestionResultsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getHumanAgentSuggestionResultsFieldBuilder() + : null; + } else { + humanAgentSuggestionResultsBuilder_.addAllMessages(other.humanAgentSuggestionResults_); + } + } + } + if (endUserSuggestionResultsBuilder_ == null) { + if (!other.endUserSuggestionResults_.isEmpty()) { + if (endUserSuggestionResults_.isEmpty()) { + endUserSuggestionResults_ = other.endUserSuggestionResults_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureEndUserSuggestionResultsIsMutable(); + endUserSuggestionResults_.addAll(other.endUserSuggestionResults_); + } + onChanged(); + } + } else { + if (!other.endUserSuggestionResults_.isEmpty()) { + if (endUserSuggestionResultsBuilder_.isEmpty()) { + endUserSuggestionResultsBuilder_.dispose(); + endUserSuggestionResultsBuilder_ = null; + endUserSuggestionResults_ = other.endUserSuggestionResults_; + bitField0_ = (bitField0_ & ~0x00000002); + endUserSuggestionResultsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getEndUserSuggestionResultsFieldBuilder() + : null; + } else { + endUserSuggestionResultsBuilder_.addAllMessages(other.endUserSuggestionResults_); + } + } + } + if (other.hasDtmfParameters()) { + mergeDtmfParameters(other.getDtmfParameters()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.cloud.dialogflow.v2beta1.StreamingRecognitionResult recognitionResult_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.StreamingRecognitionResult, + com.google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.Builder, + com.google.cloud.dialogflow.v2beta1.StreamingRecognitionResultOrBuilder> + recognitionResultBuilder_; + /** + * + * + *
+     * The result of speech recognition.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.StreamingRecognitionResult recognition_result = 1; + * + * + * @return Whether the recognitionResult field is set. + */ + public boolean hasRecognitionResult() { + return recognitionResultBuilder_ != null || recognitionResult_ != null; + } + /** + * + * + *
+     * The result of speech recognition.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.StreamingRecognitionResult recognition_result = 1; + * + * + * @return The recognitionResult. + */ + public com.google.cloud.dialogflow.v2beta1.StreamingRecognitionResult getRecognitionResult() { + if (recognitionResultBuilder_ == null) { + return recognitionResult_ == null + ? com.google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.getDefaultInstance() + : recognitionResult_; + } else { + return recognitionResultBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The result of speech recognition.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.StreamingRecognitionResult recognition_result = 1; + * + */ + public Builder setRecognitionResult( + com.google.cloud.dialogflow.v2beta1.StreamingRecognitionResult value) { + if (recognitionResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + recognitionResult_ = value; + onChanged(); + } else { + recognitionResultBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The result of speech recognition.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.StreamingRecognitionResult recognition_result = 1; + * + */ + public Builder setRecognitionResult( + com.google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.Builder builderForValue) { + if (recognitionResultBuilder_ == null) { + recognitionResult_ = builderForValue.build(); + onChanged(); + } else { + recognitionResultBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The result of speech recognition.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.StreamingRecognitionResult recognition_result = 1; + * + */ + public Builder mergeRecognitionResult( + com.google.cloud.dialogflow.v2beta1.StreamingRecognitionResult value) { + if (recognitionResultBuilder_ == null) { + if (recognitionResult_ != null) { + recognitionResult_ = + com.google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.newBuilder( + recognitionResult_) + .mergeFrom(value) + .buildPartial(); + } else { + recognitionResult_ = value; + } + onChanged(); + } else { + recognitionResultBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The result of speech recognition.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.StreamingRecognitionResult recognition_result = 1; + * + */ + public Builder clearRecognitionResult() { + if (recognitionResultBuilder_ == null) { + recognitionResult_ = null; + onChanged(); + } else { + recognitionResult_ = null; + recognitionResultBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The result of speech recognition.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.StreamingRecognitionResult recognition_result = 1; + * + */ + public com.google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.Builder + getRecognitionResultBuilder() { + + onChanged(); + return getRecognitionResultFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The result of speech recognition.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.StreamingRecognitionResult recognition_result = 1; + * + */ + public com.google.cloud.dialogflow.v2beta1.StreamingRecognitionResultOrBuilder + getRecognitionResultOrBuilder() { + if (recognitionResultBuilder_ != null) { + return recognitionResultBuilder_.getMessageOrBuilder(); + } else { + return recognitionResult_ == null + ? com.google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.getDefaultInstance() + : recognitionResult_; + } + } + /** + * + * + *
+     * The result of speech recognition.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.StreamingRecognitionResult recognition_result = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.StreamingRecognitionResult, + com.google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.Builder, + com.google.cloud.dialogflow.v2beta1.StreamingRecognitionResultOrBuilder> + getRecognitionResultFieldBuilder() { + if (recognitionResultBuilder_ == null) { + recognitionResultBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.StreamingRecognitionResult, + com.google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.Builder, + com.google.cloud.dialogflow.v2beta1.StreamingRecognitionResultOrBuilder>( + getRecognitionResult(), getParentForChildren(), isClean()); + recognitionResult_ = null; + } + return recognitionResultBuilder_; + } + + private java.lang.Object replyText_ = ""; + /** + * + * + *
+     * Optional. The output text content.
+     * This field is set if an automated agent responded with a text for the user.
+     * 
+ * + * string reply_text = 2; + * + * @return The replyText. + */ + public java.lang.String getReplyText() { + java.lang.Object ref = replyText_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + replyText_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The output text content.
+     * This field is set if an automated agent responded with a text for the user.
+     * 
+ * + * string reply_text = 2; + * + * @return The bytes for replyText. + */ + public com.google.protobuf.ByteString getReplyTextBytes() { + java.lang.Object ref = replyText_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + replyText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The output text content.
+     * This field is set if an automated agent responded with a text for the user.
+     * 
+ * + * string reply_text = 2; + * + * @param value The replyText to set. + * @return This builder for chaining. + */ + public Builder setReplyText(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + replyText_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The output text content.
+     * This field is set if an automated agent responded with a text for the user.
+     * 
+ * + * string reply_text = 2; + * + * @return This builder for chaining. + */ + public Builder clearReplyText() { + + replyText_ = getDefaultInstance().getReplyText(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The output text content.
+     * This field is set if an automated agent responded with a text for the user.
+     * 
+ * + * string reply_text = 2; + * + * @param value The bytes for replyText to set. + * @return This builder for chaining. + */ + public Builder setReplyTextBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + replyText_ = value; + onChanged(); + return this; + } + + private com.google.cloud.dialogflow.v2beta1.OutputAudio replyAudio_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.OutputAudio, + com.google.cloud.dialogflow.v2beta1.OutputAudio.Builder, + com.google.cloud.dialogflow.v2beta1.OutputAudioOrBuilder> + replyAudioBuilder_; + /** + * + * + *
+     * Optional. The audio data bytes encoded as specified in the request.
+     * This field is set if:
+     *  - The `reply_audio_config` field is specified in the request.
+     *  - The automated agent, which this output comes from, responded with audio.
+     *    In such case, the `reply_audio.config` field contains settings used to
+     *    synthesize the speech.
+     * 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.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.OutputAudio reply_audio = 3; + * + * @return Whether the replyAudio field is set. + */ + public boolean hasReplyAudio() { + return replyAudioBuilder_ != null || replyAudio_ != null; + } + /** + * + * + *
+     * Optional. The audio data bytes encoded as specified in the request.
+     * This field is set if:
+     *  - The `reply_audio_config` field is specified in the request.
+     *  - The automated agent, which this output comes from, responded with audio.
+     *    In such case, the `reply_audio.config` field contains settings used to
+     *    synthesize the speech.
+     * 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.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.OutputAudio reply_audio = 3; + * + * @return The replyAudio. + */ + public com.google.cloud.dialogflow.v2beta1.OutputAudio getReplyAudio() { + if (replyAudioBuilder_ == null) { + return replyAudio_ == null + ? com.google.cloud.dialogflow.v2beta1.OutputAudio.getDefaultInstance() + : replyAudio_; + } else { + return replyAudioBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The audio data bytes encoded as specified in the request.
+     * This field is set if:
+     *  - The `reply_audio_config` field is specified in the request.
+     *  - The automated agent, which this output comes from, responded with audio.
+     *    In such case, the `reply_audio.config` field contains settings used to
+     *    synthesize the speech.
+     * 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.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.OutputAudio reply_audio = 3; + */ + public Builder setReplyAudio(com.google.cloud.dialogflow.v2beta1.OutputAudio value) { + if (replyAudioBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + replyAudio_ = value; + onChanged(); + } else { + replyAudioBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The audio data bytes encoded as specified in the request.
+     * This field is set if:
+     *  - The `reply_audio_config` field is specified in the request.
+     *  - The automated agent, which this output comes from, responded with audio.
+     *    In such case, the `reply_audio.config` field contains settings used to
+     *    synthesize the speech.
+     * 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.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.OutputAudio reply_audio = 3; + */ + public Builder setReplyAudio( + com.google.cloud.dialogflow.v2beta1.OutputAudio.Builder builderForValue) { + if (replyAudioBuilder_ == null) { + replyAudio_ = builderForValue.build(); + onChanged(); + } else { + replyAudioBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. The audio data bytes encoded as specified in the request.
+     * This field is set if:
+     *  - The `reply_audio_config` field is specified in the request.
+     *  - The automated agent, which this output comes from, responded with audio.
+     *    In such case, the `reply_audio.config` field contains settings used to
+     *    synthesize the speech.
+     * 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.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.OutputAudio reply_audio = 3; + */ + public Builder mergeReplyAudio(com.google.cloud.dialogflow.v2beta1.OutputAudio value) { + if (replyAudioBuilder_ == null) { + if (replyAudio_ != null) { + replyAudio_ = + com.google.cloud.dialogflow.v2beta1.OutputAudio.newBuilder(replyAudio_) + .mergeFrom(value) + .buildPartial(); + } else { + replyAudio_ = value; + } + onChanged(); + } else { + replyAudioBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The audio data bytes encoded as specified in the request.
+     * This field is set if:
+     *  - The `reply_audio_config` field is specified in the request.
+     *  - The automated agent, which this output comes from, responded with audio.
+     *    In such case, the `reply_audio.config` field contains settings used to
+     *    synthesize the speech.
+     * 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.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.OutputAudio reply_audio = 3; + */ + public Builder clearReplyAudio() { + if (replyAudioBuilder_ == null) { + replyAudio_ = null; + onChanged(); + } else { + replyAudio_ = null; + replyAudioBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. The audio data bytes encoded as specified in the request.
+     * This field is set if:
+     *  - The `reply_audio_config` field is specified in the request.
+     *  - The automated agent, which this output comes from, responded with audio.
+     *    In such case, the `reply_audio.config` field contains settings used to
+     *    synthesize the speech.
+     * 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.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.OutputAudio reply_audio = 3; + */ + public com.google.cloud.dialogflow.v2beta1.OutputAudio.Builder getReplyAudioBuilder() { + + onChanged(); + return getReplyAudioFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The audio data bytes encoded as specified in the request.
+     * This field is set if:
+     *  - The `reply_audio_config` field is specified in the request.
+     *  - The automated agent, which this output comes from, responded with audio.
+     *    In such case, the `reply_audio.config` field contains settings used to
+     *    synthesize the speech.
+     * 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.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.OutputAudio reply_audio = 3; + */ + public com.google.cloud.dialogflow.v2beta1.OutputAudioOrBuilder getReplyAudioOrBuilder() { + if (replyAudioBuilder_ != null) { + return replyAudioBuilder_.getMessageOrBuilder(); + } else { + return replyAudio_ == null + ? com.google.cloud.dialogflow.v2beta1.OutputAudio.getDefaultInstance() + : replyAudio_; + } + } + /** + * + * + *
+     * Optional. The audio data bytes encoded as specified in the request.
+     * This field is set if:
+     *  - The `reply_audio_config` field is specified in the request.
+     *  - The automated agent, which this output comes from, responded with audio.
+     *    In such case, the `reply_audio.config` field contains settings used to
+     *    synthesize the speech.
+     * 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.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.OutputAudio reply_audio = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.OutputAudio, + com.google.cloud.dialogflow.v2beta1.OutputAudio.Builder, + com.google.cloud.dialogflow.v2beta1.OutputAudioOrBuilder> + getReplyAudioFieldBuilder() { + if (replyAudioBuilder_ == null) { + replyAudioBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.OutputAudio, + com.google.cloud.dialogflow.v2beta1.OutputAudio.Builder, + com.google.cloud.dialogflow.v2beta1.OutputAudioOrBuilder>( + getReplyAudio(), getParentForChildren(), isClean()); + replyAudio_ = null; + } + return replyAudioBuilder_; + } + + private com.google.cloud.dialogflow.v2beta1.AutomatedAgentReply automatedAgentReply_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.AutomatedAgentReply, + com.google.cloud.dialogflow.v2beta1.AutomatedAgentReply.Builder, + com.google.cloud.dialogflow.v2beta1.AutomatedAgentReplyOrBuilder> + automatedAgentReplyBuilder_; + /** + * + * + *
+     * Optional. Only set if a Dialogflow automated agent has responded.
+     * Note that: [AutomatedAgentReply.detect_intent_response.output_audio][]
+     * and [AutomatedAgentReply.detect_intent_response.output_audio_config][]
+     * are always empty, use [reply_audio][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse.reply_audio] instead.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.AutomatedAgentReply automated_agent_reply = 4; + * + * @return Whether the automatedAgentReply field is set. + */ + public boolean hasAutomatedAgentReply() { + return automatedAgentReplyBuilder_ != null || automatedAgentReply_ != null; + } + /** + * + * + *
+     * Optional. Only set if a Dialogflow automated agent has responded.
+     * Note that: [AutomatedAgentReply.detect_intent_response.output_audio][]
+     * and [AutomatedAgentReply.detect_intent_response.output_audio_config][]
+     * are always empty, use [reply_audio][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse.reply_audio] instead.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.AutomatedAgentReply automated_agent_reply = 4; + * + * @return The automatedAgentReply. + */ + public com.google.cloud.dialogflow.v2beta1.AutomatedAgentReply getAutomatedAgentReply() { + if (automatedAgentReplyBuilder_ == null) { + return automatedAgentReply_ == null + ? com.google.cloud.dialogflow.v2beta1.AutomatedAgentReply.getDefaultInstance() + : automatedAgentReply_; + } else { + return automatedAgentReplyBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Only set if a Dialogflow automated agent has responded.
+     * Note that: [AutomatedAgentReply.detect_intent_response.output_audio][]
+     * and [AutomatedAgentReply.detect_intent_response.output_audio_config][]
+     * are always empty, use [reply_audio][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse.reply_audio] instead.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.AutomatedAgentReply automated_agent_reply = 4; + */ + public Builder setAutomatedAgentReply( + com.google.cloud.dialogflow.v2beta1.AutomatedAgentReply value) { + if (automatedAgentReplyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + automatedAgentReply_ = value; + onChanged(); + } else { + automatedAgentReplyBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Only set if a Dialogflow automated agent has responded.
+     * Note that: [AutomatedAgentReply.detect_intent_response.output_audio][]
+     * and [AutomatedAgentReply.detect_intent_response.output_audio_config][]
+     * are always empty, use [reply_audio][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse.reply_audio] instead.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.AutomatedAgentReply automated_agent_reply = 4; + */ + public Builder setAutomatedAgentReply( + com.google.cloud.dialogflow.v2beta1.AutomatedAgentReply.Builder builderForValue) { + if (automatedAgentReplyBuilder_ == null) { + automatedAgentReply_ = builderForValue.build(); + onChanged(); + } else { + automatedAgentReplyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. Only set if a Dialogflow automated agent has responded.
+     * Note that: [AutomatedAgentReply.detect_intent_response.output_audio][]
+     * and [AutomatedAgentReply.detect_intent_response.output_audio_config][]
+     * are always empty, use [reply_audio][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse.reply_audio] instead.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.AutomatedAgentReply automated_agent_reply = 4; + */ + public Builder mergeAutomatedAgentReply( + com.google.cloud.dialogflow.v2beta1.AutomatedAgentReply value) { + if (automatedAgentReplyBuilder_ == null) { + if (automatedAgentReply_ != null) { + automatedAgentReply_ = + com.google.cloud.dialogflow.v2beta1.AutomatedAgentReply.newBuilder( + automatedAgentReply_) + .mergeFrom(value) + .buildPartial(); + } else { + automatedAgentReply_ = value; + } + onChanged(); + } else { + automatedAgentReplyBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Only set if a Dialogflow automated agent has responded.
+     * Note that: [AutomatedAgentReply.detect_intent_response.output_audio][]
+     * and [AutomatedAgentReply.detect_intent_response.output_audio_config][]
+     * are always empty, use [reply_audio][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse.reply_audio] instead.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.AutomatedAgentReply automated_agent_reply = 4; + */ + public Builder clearAutomatedAgentReply() { + if (automatedAgentReplyBuilder_ == null) { + automatedAgentReply_ = null; + onChanged(); + } else { + automatedAgentReply_ = null; + automatedAgentReplyBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. Only set if a Dialogflow automated agent has responded.
+     * Note that: [AutomatedAgentReply.detect_intent_response.output_audio][]
+     * and [AutomatedAgentReply.detect_intent_response.output_audio_config][]
+     * are always empty, use [reply_audio][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse.reply_audio] instead.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.AutomatedAgentReply automated_agent_reply = 4; + */ + public com.google.cloud.dialogflow.v2beta1.AutomatedAgentReply.Builder + getAutomatedAgentReplyBuilder() { + + onChanged(); + return getAutomatedAgentReplyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Only set if a Dialogflow automated agent has responded.
+     * Note that: [AutomatedAgentReply.detect_intent_response.output_audio][]
+     * and [AutomatedAgentReply.detect_intent_response.output_audio_config][]
+     * are always empty, use [reply_audio][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse.reply_audio] instead.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.AutomatedAgentReply automated_agent_reply = 4; + */ + public com.google.cloud.dialogflow.v2beta1.AutomatedAgentReplyOrBuilder + getAutomatedAgentReplyOrBuilder() { + if (automatedAgentReplyBuilder_ != null) { + return automatedAgentReplyBuilder_.getMessageOrBuilder(); + } else { + return automatedAgentReply_ == null + ? com.google.cloud.dialogflow.v2beta1.AutomatedAgentReply.getDefaultInstance() + : automatedAgentReply_; + } + } + /** + * + * + *
+     * Optional. Only set if a Dialogflow automated agent has responded.
+     * Note that: [AutomatedAgentReply.detect_intent_response.output_audio][]
+     * and [AutomatedAgentReply.detect_intent_response.output_audio_config][]
+     * are always empty, use [reply_audio][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse.reply_audio] instead.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.AutomatedAgentReply automated_agent_reply = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.AutomatedAgentReply, + com.google.cloud.dialogflow.v2beta1.AutomatedAgentReply.Builder, + com.google.cloud.dialogflow.v2beta1.AutomatedAgentReplyOrBuilder> + getAutomatedAgentReplyFieldBuilder() { + if (automatedAgentReplyBuilder_ == null) { + automatedAgentReplyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.AutomatedAgentReply, + com.google.cloud.dialogflow.v2beta1.AutomatedAgentReply.Builder, + com.google.cloud.dialogflow.v2beta1.AutomatedAgentReplyOrBuilder>( + getAutomatedAgentReply(), getParentForChildren(), isClean()); + automatedAgentReply_ = null; + } + return automatedAgentReplyBuilder_; + } + + private com.google.cloud.dialogflow.v2beta1.Message message_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.Message, + com.google.cloud.dialogflow.v2beta1.Message.Builder, + com.google.cloud.dialogflow.v2beta1.MessageOrBuilder> + messageBuilder_; + /** + * + * + *
+     * Output only. Message analyzed by CCAI.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.Message message = 6; + * + * @return Whether the message field is set. + */ + public boolean hasMessage() { + return messageBuilder_ != null || message_ != null; + } + /** + * + * + *
+     * Output only. Message analyzed by CCAI.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.Message message = 6; + * + * @return The message. + */ + public com.google.cloud.dialogflow.v2beta1.Message getMessage() { + if (messageBuilder_ == null) { + return message_ == null + ? com.google.cloud.dialogflow.v2beta1.Message.getDefaultInstance() + : message_; + } else { + return messageBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Message analyzed by CCAI.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.Message message = 6; + */ + public Builder setMessage(com.google.cloud.dialogflow.v2beta1.Message value) { + if (messageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + messageBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Message analyzed by CCAI.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.Message message = 6; + */ + public Builder setMessage(com.google.cloud.dialogflow.v2beta1.Message.Builder builderForValue) { + if (messageBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + messageBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Message analyzed by CCAI.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.Message message = 6; + */ + public Builder mergeMessage(com.google.cloud.dialogflow.v2beta1.Message value) { + if (messageBuilder_ == null) { + if (message_ != null) { + message_ = + com.google.cloud.dialogflow.v2beta1.Message.newBuilder(message_) + .mergeFrom(value) + .buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + messageBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Message analyzed by CCAI.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.Message message = 6; + */ + public Builder clearMessage() { + if (messageBuilder_ == null) { + message_ = null; + onChanged(); + } else { + message_ = null; + messageBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Message analyzed by CCAI.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.Message message = 6; + */ + public com.google.cloud.dialogflow.v2beta1.Message.Builder getMessageBuilder() { + + onChanged(); + return getMessageFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Message analyzed by CCAI.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.Message message = 6; + */ + public com.google.cloud.dialogflow.v2beta1.MessageOrBuilder getMessageOrBuilder() { + if (messageBuilder_ != null) { + return messageBuilder_.getMessageOrBuilder(); + } else { + return message_ == null + ? com.google.cloud.dialogflow.v2beta1.Message.getDefaultInstance() + : message_; + } + } + /** + * + * + *
+     * Output only. Message analyzed by CCAI.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.Message message = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.Message, + com.google.cloud.dialogflow.v2beta1.Message.Builder, + com.google.cloud.dialogflow.v2beta1.MessageOrBuilder> + getMessageFieldBuilder() { + if (messageBuilder_ == null) { + messageBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.Message, + com.google.cloud.dialogflow.v2beta1.Message.Builder, + com.google.cloud.dialogflow.v2beta1.MessageOrBuilder>( + getMessage(), getParentForChildren(), isClean()); + message_ = null; + } + return messageBuilder_; + } + + private java.util.List + humanAgentSuggestionResults_ = java.util.Collections.emptyList(); + + private void ensureHumanAgentSuggestionResultsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + humanAgentSuggestionResults_ = + new java.util.ArrayList( + humanAgentSuggestionResults_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.SuggestionResult, + com.google.cloud.dialogflow.v2beta1.SuggestionResult.Builder, + com.google.cloud.dialogflow.v2beta1.SuggestionResultOrBuilder> + humanAgentSuggestionResultsBuilder_; + + /** + * + * + *
+     * The suggestions for most recent human agent. The order is the same as
+     * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+     * [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.human_agent_suggestion_config].
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult human_agent_suggestion_results = 7; + * + */ + public java.util.List + getHumanAgentSuggestionResultsList() { + if (humanAgentSuggestionResultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(humanAgentSuggestionResults_); + } else { + return humanAgentSuggestionResultsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The suggestions for most recent human agent. The order is the same as
+     * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+     * [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.human_agent_suggestion_config].
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult human_agent_suggestion_results = 7; + * + */ + public int getHumanAgentSuggestionResultsCount() { + if (humanAgentSuggestionResultsBuilder_ == null) { + return humanAgentSuggestionResults_.size(); + } else { + return humanAgentSuggestionResultsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The suggestions for most recent human agent. The order is the same as
+     * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+     * [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.human_agent_suggestion_config].
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult human_agent_suggestion_results = 7; + * + */ + public com.google.cloud.dialogflow.v2beta1.SuggestionResult getHumanAgentSuggestionResults( + int index) { + if (humanAgentSuggestionResultsBuilder_ == null) { + return humanAgentSuggestionResults_.get(index); + } else { + return humanAgentSuggestionResultsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The suggestions for most recent human agent. The order is the same as
+     * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+     * [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.human_agent_suggestion_config].
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult human_agent_suggestion_results = 7; + * + */ + public Builder setHumanAgentSuggestionResults( + int index, com.google.cloud.dialogflow.v2beta1.SuggestionResult value) { + if (humanAgentSuggestionResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHumanAgentSuggestionResultsIsMutable(); + humanAgentSuggestionResults_.set(index, value); + onChanged(); + } else { + humanAgentSuggestionResultsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The suggestions for most recent human agent. The order is the same as
+     * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+     * [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.human_agent_suggestion_config].
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult human_agent_suggestion_results = 7; + * + */ + public Builder setHumanAgentSuggestionResults( + int index, com.google.cloud.dialogflow.v2beta1.SuggestionResult.Builder builderForValue) { + if (humanAgentSuggestionResultsBuilder_ == null) { + ensureHumanAgentSuggestionResultsIsMutable(); + humanAgentSuggestionResults_.set(index, builderForValue.build()); + onChanged(); + } else { + humanAgentSuggestionResultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The suggestions for most recent human agent. The order is the same as
+     * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+     * [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.human_agent_suggestion_config].
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult human_agent_suggestion_results = 7; + * + */ + public Builder addHumanAgentSuggestionResults( + com.google.cloud.dialogflow.v2beta1.SuggestionResult value) { + if (humanAgentSuggestionResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHumanAgentSuggestionResultsIsMutable(); + humanAgentSuggestionResults_.add(value); + onChanged(); + } else { + humanAgentSuggestionResultsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The suggestions for most recent human agent. The order is the same as
+     * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+     * [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.human_agent_suggestion_config].
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult human_agent_suggestion_results = 7; + * + */ + public Builder addHumanAgentSuggestionResults( + int index, com.google.cloud.dialogflow.v2beta1.SuggestionResult value) { + if (humanAgentSuggestionResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHumanAgentSuggestionResultsIsMutable(); + humanAgentSuggestionResults_.add(index, value); + onChanged(); + } else { + humanAgentSuggestionResultsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The suggestions for most recent human agent. The order is the same as
+     * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+     * [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.human_agent_suggestion_config].
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult human_agent_suggestion_results = 7; + * + */ + public Builder addHumanAgentSuggestionResults( + com.google.cloud.dialogflow.v2beta1.SuggestionResult.Builder builderForValue) { + if (humanAgentSuggestionResultsBuilder_ == null) { + ensureHumanAgentSuggestionResultsIsMutable(); + humanAgentSuggestionResults_.add(builderForValue.build()); + onChanged(); + } else { + humanAgentSuggestionResultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The suggestions for most recent human agent. The order is the same as
+     * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+     * [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.human_agent_suggestion_config].
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult human_agent_suggestion_results = 7; + * + */ + public Builder addHumanAgentSuggestionResults( + int index, com.google.cloud.dialogflow.v2beta1.SuggestionResult.Builder builderForValue) { + if (humanAgentSuggestionResultsBuilder_ == null) { + ensureHumanAgentSuggestionResultsIsMutable(); + humanAgentSuggestionResults_.add(index, builderForValue.build()); + onChanged(); + } else { + humanAgentSuggestionResultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The suggestions for most recent human agent. The order is the same as
+     * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+     * [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.human_agent_suggestion_config].
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult human_agent_suggestion_results = 7; + * + */ + public Builder addAllHumanAgentSuggestionResults( + java.lang.Iterable values) { + if (humanAgentSuggestionResultsBuilder_ == null) { + ensureHumanAgentSuggestionResultsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, humanAgentSuggestionResults_); + onChanged(); + } else { + humanAgentSuggestionResultsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The suggestions for most recent human agent. The order is the same as
+     * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+     * [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.human_agent_suggestion_config].
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult human_agent_suggestion_results = 7; + * + */ + public Builder clearHumanAgentSuggestionResults() { + if (humanAgentSuggestionResultsBuilder_ == null) { + humanAgentSuggestionResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + humanAgentSuggestionResultsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The suggestions for most recent human agent. The order is the same as
+     * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+     * [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.human_agent_suggestion_config].
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult human_agent_suggestion_results = 7; + * + */ + public Builder removeHumanAgentSuggestionResults(int index) { + if (humanAgentSuggestionResultsBuilder_ == null) { + ensureHumanAgentSuggestionResultsIsMutable(); + humanAgentSuggestionResults_.remove(index); + onChanged(); + } else { + humanAgentSuggestionResultsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The suggestions for most recent human agent. The order is the same as
+     * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+     * [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.human_agent_suggestion_config].
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult human_agent_suggestion_results = 7; + * + */ + public com.google.cloud.dialogflow.v2beta1.SuggestionResult.Builder + getHumanAgentSuggestionResultsBuilder(int index) { + return getHumanAgentSuggestionResultsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The suggestions for most recent human agent. The order is the same as
+     * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+     * [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.human_agent_suggestion_config].
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult human_agent_suggestion_results = 7; + * + */ + public com.google.cloud.dialogflow.v2beta1.SuggestionResultOrBuilder + getHumanAgentSuggestionResultsOrBuilder(int index) { + if (humanAgentSuggestionResultsBuilder_ == null) { + return humanAgentSuggestionResults_.get(index); + } else { + return humanAgentSuggestionResultsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The suggestions for most recent human agent. The order is the same as
+     * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+     * [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.human_agent_suggestion_config].
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult human_agent_suggestion_results = 7; + * + */ + public java.util.List + getHumanAgentSuggestionResultsOrBuilderList() { + if (humanAgentSuggestionResultsBuilder_ != null) { + return humanAgentSuggestionResultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(humanAgentSuggestionResults_); + } + } + /** + * + * + *
+     * The suggestions for most recent human agent. The order is the same as
+     * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+     * [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.human_agent_suggestion_config].
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult human_agent_suggestion_results = 7; + * + */ + public com.google.cloud.dialogflow.v2beta1.SuggestionResult.Builder + addHumanAgentSuggestionResultsBuilder() { + return getHumanAgentSuggestionResultsFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.v2beta1.SuggestionResult.getDefaultInstance()); + } + /** + * + * + *
+     * The suggestions for most recent human agent. The order is the same as
+     * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+     * [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.human_agent_suggestion_config].
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult human_agent_suggestion_results = 7; + * + */ + public com.google.cloud.dialogflow.v2beta1.SuggestionResult.Builder + addHumanAgentSuggestionResultsBuilder(int index) { + return getHumanAgentSuggestionResultsFieldBuilder() + .addBuilder( + index, com.google.cloud.dialogflow.v2beta1.SuggestionResult.getDefaultInstance()); + } + /** + * + * + *
+     * The suggestions for most recent human agent. The order is the same as
+     * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+     * [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.human_agent_suggestion_config].
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult human_agent_suggestion_results = 7; + * + */ + public java.util.List + getHumanAgentSuggestionResultsBuilderList() { + return getHumanAgentSuggestionResultsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.SuggestionResult, + com.google.cloud.dialogflow.v2beta1.SuggestionResult.Builder, + com.google.cloud.dialogflow.v2beta1.SuggestionResultOrBuilder> + getHumanAgentSuggestionResultsFieldBuilder() { + if (humanAgentSuggestionResultsBuilder_ == null) { + humanAgentSuggestionResultsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.SuggestionResult, + com.google.cloud.dialogflow.v2beta1.SuggestionResult.Builder, + com.google.cloud.dialogflow.v2beta1.SuggestionResultOrBuilder>( + humanAgentSuggestionResults_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + humanAgentSuggestionResults_ = null; + } + return humanAgentSuggestionResultsBuilder_; + } + + private java.util.List + endUserSuggestionResults_ = java.util.Collections.emptyList(); + + private void ensureEndUserSuggestionResultsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + endUserSuggestionResults_ = + new java.util.ArrayList( + endUserSuggestionResults_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.SuggestionResult, + com.google.cloud.dialogflow.v2beta1.SuggestionResult.Builder, + com.google.cloud.dialogflow.v2beta1.SuggestionResultOrBuilder> + endUserSuggestionResultsBuilder_; + + /** + * + * + *
+     * The suggestions for end user. The order is the same as
+     * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+     * [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.end_user_suggestion_config].
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult end_user_suggestion_results = 8; + * + */ + public java.util.List + getEndUserSuggestionResultsList() { + if (endUserSuggestionResultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(endUserSuggestionResults_); + } else { + return endUserSuggestionResultsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The suggestions for end user. The order is the same as
+     * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+     * [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.end_user_suggestion_config].
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult end_user_suggestion_results = 8; + * + */ + public int getEndUserSuggestionResultsCount() { + if (endUserSuggestionResultsBuilder_ == null) { + return endUserSuggestionResults_.size(); + } else { + return endUserSuggestionResultsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The suggestions for end user. The order is the same as
+     * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+     * [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.end_user_suggestion_config].
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult end_user_suggestion_results = 8; + * + */ + public com.google.cloud.dialogflow.v2beta1.SuggestionResult getEndUserSuggestionResults( + int index) { + if (endUserSuggestionResultsBuilder_ == null) { + return endUserSuggestionResults_.get(index); + } else { + return endUserSuggestionResultsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The suggestions for end user. The order is the same as
+     * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+     * [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.end_user_suggestion_config].
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult end_user_suggestion_results = 8; + * + */ + public Builder setEndUserSuggestionResults( + int index, com.google.cloud.dialogflow.v2beta1.SuggestionResult value) { + if (endUserSuggestionResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEndUserSuggestionResultsIsMutable(); + endUserSuggestionResults_.set(index, value); + onChanged(); + } else { + endUserSuggestionResultsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The suggestions for end user. The order is the same as
+     * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+     * [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.end_user_suggestion_config].
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult end_user_suggestion_results = 8; + * + */ + public Builder setEndUserSuggestionResults( + int index, com.google.cloud.dialogflow.v2beta1.SuggestionResult.Builder builderForValue) { + if (endUserSuggestionResultsBuilder_ == null) { + ensureEndUserSuggestionResultsIsMutable(); + endUserSuggestionResults_.set(index, builderForValue.build()); + onChanged(); + } else { + endUserSuggestionResultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The suggestions for end user. The order is the same as
+     * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+     * [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.end_user_suggestion_config].
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult end_user_suggestion_results = 8; + * + */ + public Builder addEndUserSuggestionResults( + com.google.cloud.dialogflow.v2beta1.SuggestionResult value) { + if (endUserSuggestionResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEndUserSuggestionResultsIsMutable(); + endUserSuggestionResults_.add(value); + onChanged(); + } else { + endUserSuggestionResultsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The suggestions for end user. The order is the same as
+     * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+     * [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.end_user_suggestion_config].
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult end_user_suggestion_results = 8; + * + */ + public Builder addEndUserSuggestionResults( + int index, com.google.cloud.dialogflow.v2beta1.SuggestionResult value) { + if (endUserSuggestionResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEndUserSuggestionResultsIsMutable(); + endUserSuggestionResults_.add(index, value); + onChanged(); + } else { + endUserSuggestionResultsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The suggestions for end user. The order is the same as
+     * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+     * [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.end_user_suggestion_config].
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult end_user_suggestion_results = 8; + * + */ + public Builder addEndUserSuggestionResults( + com.google.cloud.dialogflow.v2beta1.SuggestionResult.Builder builderForValue) { + if (endUserSuggestionResultsBuilder_ == null) { + ensureEndUserSuggestionResultsIsMutable(); + endUserSuggestionResults_.add(builderForValue.build()); + onChanged(); + } else { + endUserSuggestionResultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The suggestions for end user. The order is the same as
+     * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+     * [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.end_user_suggestion_config].
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult end_user_suggestion_results = 8; + * + */ + public Builder addEndUserSuggestionResults( + int index, com.google.cloud.dialogflow.v2beta1.SuggestionResult.Builder builderForValue) { + if (endUserSuggestionResultsBuilder_ == null) { + ensureEndUserSuggestionResultsIsMutable(); + endUserSuggestionResults_.add(index, builderForValue.build()); + onChanged(); + } else { + endUserSuggestionResultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The suggestions for end user. The order is the same as
+     * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+     * [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.end_user_suggestion_config].
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult end_user_suggestion_results = 8; + * + */ + public Builder addAllEndUserSuggestionResults( + java.lang.Iterable values) { + if (endUserSuggestionResultsBuilder_ == null) { + ensureEndUserSuggestionResultsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, endUserSuggestionResults_); + onChanged(); + } else { + endUserSuggestionResultsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The suggestions for end user. The order is the same as
+     * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+     * [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.end_user_suggestion_config].
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult end_user_suggestion_results = 8; + * + */ + public Builder clearEndUserSuggestionResults() { + if (endUserSuggestionResultsBuilder_ == null) { + endUserSuggestionResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + endUserSuggestionResultsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The suggestions for end user. The order is the same as
+     * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+     * [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.end_user_suggestion_config].
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult end_user_suggestion_results = 8; + * + */ + public Builder removeEndUserSuggestionResults(int index) { + if (endUserSuggestionResultsBuilder_ == null) { + ensureEndUserSuggestionResultsIsMutable(); + endUserSuggestionResults_.remove(index); + onChanged(); + } else { + endUserSuggestionResultsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The suggestions for end user. The order is the same as
+     * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+     * [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.end_user_suggestion_config].
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult end_user_suggestion_results = 8; + * + */ + public com.google.cloud.dialogflow.v2beta1.SuggestionResult.Builder + getEndUserSuggestionResultsBuilder(int index) { + return getEndUserSuggestionResultsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The suggestions for end user. The order is the same as
+     * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+     * [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.end_user_suggestion_config].
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult end_user_suggestion_results = 8; + * + */ + public com.google.cloud.dialogflow.v2beta1.SuggestionResultOrBuilder + getEndUserSuggestionResultsOrBuilder(int index) { + if (endUserSuggestionResultsBuilder_ == null) { + return endUserSuggestionResults_.get(index); + } else { + return endUserSuggestionResultsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The suggestions for end user. The order is the same as
+     * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+     * [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.end_user_suggestion_config].
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult end_user_suggestion_results = 8; + * + */ + public java.util.List + getEndUserSuggestionResultsOrBuilderList() { + if (endUserSuggestionResultsBuilder_ != null) { + return endUserSuggestionResultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(endUserSuggestionResults_); + } + } + /** + * + * + *
+     * The suggestions for end user. The order is the same as
+     * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+     * [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.end_user_suggestion_config].
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult end_user_suggestion_results = 8; + * + */ + public com.google.cloud.dialogflow.v2beta1.SuggestionResult.Builder + addEndUserSuggestionResultsBuilder() { + return getEndUserSuggestionResultsFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.v2beta1.SuggestionResult.getDefaultInstance()); + } + /** + * + * + *
+     * The suggestions for end user. The order is the same as
+     * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+     * [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.end_user_suggestion_config].
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult end_user_suggestion_results = 8; + * + */ + public com.google.cloud.dialogflow.v2beta1.SuggestionResult.Builder + addEndUserSuggestionResultsBuilder(int index) { + return getEndUserSuggestionResultsFieldBuilder() + .addBuilder( + index, com.google.cloud.dialogflow.v2beta1.SuggestionResult.getDefaultInstance()); + } + /** + * + * + *
+     * The suggestions for end user. The order is the same as
+     * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+     * [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.end_user_suggestion_config].
+     * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult end_user_suggestion_results = 8; + * + */ + public java.util.List + getEndUserSuggestionResultsBuilderList() { + return getEndUserSuggestionResultsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.SuggestionResult, + com.google.cloud.dialogflow.v2beta1.SuggestionResult.Builder, + com.google.cloud.dialogflow.v2beta1.SuggestionResultOrBuilder> + getEndUserSuggestionResultsFieldBuilder() { + if (endUserSuggestionResultsBuilder_ == null) { + endUserSuggestionResultsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.SuggestionResult, + com.google.cloud.dialogflow.v2beta1.SuggestionResult.Builder, + com.google.cloud.dialogflow.v2beta1.SuggestionResultOrBuilder>( + endUserSuggestionResults_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + endUserSuggestionResults_ = null; + } + return endUserSuggestionResultsBuilder_; + } + + private com.google.cloud.dialogflow.v2beta1.DtmfParameters dtmfParameters_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.DtmfParameters, + com.google.cloud.dialogflow.v2beta1.DtmfParameters.Builder, + com.google.cloud.dialogflow.v2beta1.DtmfParametersOrBuilder> + dtmfParametersBuilder_; + /** + * + * + *
+     * Indicates the parameters of DTMF.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.DtmfParameters dtmf_parameters = 10; + * + * @return Whether the dtmfParameters field is set. + */ + public boolean hasDtmfParameters() { + return dtmfParametersBuilder_ != null || dtmfParameters_ != null; + } + /** + * + * + *
+     * Indicates the parameters of DTMF.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.DtmfParameters dtmf_parameters = 10; + * + * @return The dtmfParameters. + */ + public com.google.cloud.dialogflow.v2beta1.DtmfParameters getDtmfParameters() { + if (dtmfParametersBuilder_ == null) { + return dtmfParameters_ == null + ? com.google.cloud.dialogflow.v2beta1.DtmfParameters.getDefaultInstance() + : dtmfParameters_; + } else { + return dtmfParametersBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Indicates the parameters of DTMF.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.DtmfParameters dtmf_parameters = 10; + */ + public Builder setDtmfParameters(com.google.cloud.dialogflow.v2beta1.DtmfParameters value) { + if (dtmfParametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dtmfParameters_ = value; + onChanged(); + } else { + dtmfParametersBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Indicates the parameters of DTMF.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.DtmfParameters dtmf_parameters = 10; + */ + public Builder setDtmfParameters( + com.google.cloud.dialogflow.v2beta1.DtmfParameters.Builder builderForValue) { + if (dtmfParametersBuilder_ == null) { + dtmfParameters_ = builderForValue.build(); + onChanged(); + } else { + dtmfParametersBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Indicates the parameters of DTMF.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.DtmfParameters dtmf_parameters = 10; + */ + public Builder mergeDtmfParameters(com.google.cloud.dialogflow.v2beta1.DtmfParameters value) { + if (dtmfParametersBuilder_ == null) { + if (dtmfParameters_ != null) { + dtmfParameters_ = + com.google.cloud.dialogflow.v2beta1.DtmfParameters.newBuilder(dtmfParameters_) + .mergeFrom(value) + .buildPartial(); + } else { + dtmfParameters_ = value; + } + onChanged(); + } else { + dtmfParametersBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Indicates the parameters of DTMF.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.DtmfParameters dtmf_parameters = 10; + */ + public Builder clearDtmfParameters() { + if (dtmfParametersBuilder_ == null) { + dtmfParameters_ = null; + onChanged(); + } else { + dtmfParameters_ = null; + dtmfParametersBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Indicates the parameters of DTMF.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.DtmfParameters dtmf_parameters = 10; + */ + public com.google.cloud.dialogflow.v2beta1.DtmfParameters.Builder getDtmfParametersBuilder() { + + onChanged(); + return getDtmfParametersFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Indicates the parameters of DTMF.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.DtmfParameters dtmf_parameters = 10; + */ + public com.google.cloud.dialogflow.v2beta1.DtmfParametersOrBuilder + getDtmfParametersOrBuilder() { + if (dtmfParametersBuilder_ != null) { + return dtmfParametersBuilder_.getMessageOrBuilder(); + } else { + return dtmfParameters_ == null + ? com.google.cloud.dialogflow.v2beta1.DtmfParameters.getDefaultInstance() + : dtmfParameters_; + } + } + /** + * + * + *
+     * Indicates the parameters of DTMF.
+     * 
+ * + * .google.cloud.dialogflow.v2beta1.DtmfParameters dtmf_parameters = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.DtmfParameters, + com.google.cloud.dialogflow.v2beta1.DtmfParameters.Builder, + com.google.cloud.dialogflow.v2beta1.DtmfParametersOrBuilder> + getDtmfParametersFieldBuilder() { + if (dtmfParametersBuilder_ == null) { + dtmfParametersBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.DtmfParameters, + com.google.cloud.dialogflow.v2beta1.DtmfParameters.Builder, + com.google.cloud.dialogflow.v2beta1.DtmfParametersOrBuilder>( + getDtmfParameters(), getParentForChildren(), isClean()); + dtmfParameters_ = null; + } + return dtmfParametersBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse) + private static final com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse(); + } + + public static com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StreamingAnalyzeContentResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StreamingAnalyzeContentResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/StreamingAnalyzeContentResponseOrBuilder.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/StreamingAnalyzeContentResponseOrBuilder.java new file mode 100644 index 000000000..9bf4eb51b --- /dev/null +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/StreamingAnalyzeContentResponseOrBuilder.java @@ -0,0 +1,413 @@ +/* + * Copyright 2020 Google LLC + * + * 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/v2beta1/participant.proto + +package com.google.cloud.dialogflow.v2beta1; + +public interface StreamingAnalyzeContentResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The result of speech recognition.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.StreamingRecognitionResult recognition_result = 1; + * + * + * @return Whether the recognitionResult field is set. + */ + boolean hasRecognitionResult(); + /** + * + * + *
+   * The result of speech recognition.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.StreamingRecognitionResult recognition_result = 1; + * + * + * @return The recognitionResult. + */ + com.google.cloud.dialogflow.v2beta1.StreamingRecognitionResult getRecognitionResult(); + /** + * + * + *
+   * The result of speech recognition.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.StreamingRecognitionResult recognition_result = 1; + * + */ + com.google.cloud.dialogflow.v2beta1.StreamingRecognitionResultOrBuilder + getRecognitionResultOrBuilder(); + + /** + * + * + *
+   * Optional. The output text content.
+   * This field is set if an automated agent responded with a text for the user.
+   * 
+ * + * string reply_text = 2; + * + * @return The replyText. + */ + java.lang.String getReplyText(); + /** + * + * + *
+   * Optional. The output text content.
+   * This field is set if an automated agent responded with a text for the user.
+   * 
+ * + * string reply_text = 2; + * + * @return The bytes for replyText. + */ + com.google.protobuf.ByteString getReplyTextBytes(); + + /** + * + * + *
+   * Optional. The audio data bytes encoded as specified in the request.
+   * This field is set if:
+   *  - The `reply_audio_config` field is specified in the request.
+   *  - The automated agent, which this output comes from, responded with audio.
+   *    In such case, the `reply_audio.config` field contains settings used to
+   *    synthesize the speech.
+   * 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.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.OutputAudio reply_audio = 3; + * + * @return Whether the replyAudio field is set. + */ + boolean hasReplyAudio(); + /** + * + * + *
+   * Optional. The audio data bytes encoded as specified in the request.
+   * This field is set if:
+   *  - The `reply_audio_config` field is specified in the request.
+   *  - The automated agent, which this output comes from, responded with audio.
+   *    In such case, the `reply_audio.config` field contains settings used to
+   *    synthesize the speech.
+   * 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.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.OutputAudio reply_audio = 3; + * + * @return The replyAudio. + */ + com.google.cloud.dialogflow.v2beta1.OutputAudio getReplyAudio(); + /** + * + * + *
+   * Optional. The audio data bytes encoded as specified in the request.
+   * This field is set if:
+   *  - The `reply_audio_config` field is specified in the request.
+   *  - The automated agent, which this output comes from, responded with audio.
+   *    In such case, the `reply_audio.config` field contains settings used to
+   *    synthesize the speech.
+   * 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.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.OutputAudio reply_audio = 3; + */ + com.google.cloud.dialogflow.v2beta1.OutputAudioOrBuilder getReplyAudioOrBuilder(); + + /** + * + * + *
+   * Optional. Only set if a Dialogflow automated agent has responded.
+   * Note that: [AutomatedAgentReply.detect_intent_response.output_audio][]
+   * and [AutomatedAgentReply.detect_intent_response.output_audio_config][]
+   * are always empty, use [reply_audio][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse.reply_audio] instead.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.AutomatedAgentReply automated_agent_reply = 4; + * + * @return Whether the automatedAgentReply field is set. + */ + boolean hasAutomatedAgentReply(); + /** + * + * + *
+   * Optional. Only set if a Dialogflow automated agent has responded.
+   * Note that: [AutomatedAgentReply.detect_intent_response.output_audio][]
+   * and [AutomatedAgentReply.detect_intent_response.output_audio_config][]
+   * are always empty, use [reply_audio][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse.reply_audio] instead.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.AutomatedAgentReply automated_agent_reply = 4; + * + * @return The automatedAgentReply. + */ + com.google.cloud.dialogflow.v2beta1.AutomatedAgentReply getAutomatedAgentReply(); + /** + * + * + *
+   * Optional. Only set if a Dialogflow automated agent has responded.
+   * Note that: [AutomatedAgentReply.detect_intent_response.output_audio][]
+   * and [AutomatedAgentReply.detect_intent_response.output_audio_config][]
+   * are always empty, use [reply_audio][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse.reply_audio] instead.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.AutomatedAgentReply automated_agent_reply = 4; + */ + com.google.cloud.dialogflow.v2beta1.AutomatedAgentReplyOrBuilder + getAutomatedAgentReplyOrBuilder(); + + /** + * + * + *
+   * Output only. Message analyzed by CCAI.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.Message message = 6; + * + * @return Whether the message field is set. + */ + boolean hasMessage(); + /** + * + * + *
+   * Output only. Message analyzed by CCAI.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.Message message = 6; + * + * @return The message. + */ + com.google.cloud.dialogflow.v2beta1.Message getMessage(); + /** + * + * + *
+   * Output only. Message analyzed by CCAI.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.Message message = 6; + */ + com.google.cloud.dialogflow.v2beta1.MessageOrBuilder getMessageOrBuilder(); + + /** + * + * + *
+   * The suggestions for most recent human agent. The order is the same as
+   * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+   * [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.human_agent_suggestion_config].
+   * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult human_agent_suggestion_results = 7; + * + */ + java.util.List + getHumanAgentSuggestionResultsList(); + /** + * + * + *
+   * The suggestions for most recent human agent. The order is the same as
+   * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+   * [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.human_agent_suggestion_config].
+   * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult human_agent_suggestion_results = 7; + * + */ + com.google.cloud.dialogflow.v2beta1.SuggestionResult getHumanAgentSuggestionResults(int index); + /** + * + * + *
+   * The suggestions for most recent human agent. The order is the same as
+   * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+   * [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.human_agent_suggestion_config].
+   * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult human_agent_suggestion_results = 7; + * + */ + int getHumanAgentSuggestionResultsCount(); + /** + * + * + *
+   * The suggestions for most recent human agent. The order is the same as
+   * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+   * [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.human_agent_suggestion_config].
+   * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult human_agent_suggestion_results = 7; + * + */ + java.util.List + getHumanAgentSuggestionResultsOrBuilderList(); + /** + * + * + *
+   * The suggestions for most recent human agent. The order is the same as
+   * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+   * [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.human_agent_suggestion_config].
+   * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult human_agent_suggestion_results = 7; + * + */ + com.google.cloud.dialogflow.v2beta1.SuggestionResultOrBuilder + getHumanAgentSuggestionResultsOrBuilder(int index); + + /** + * + * + *
+   * The suggestions for end user. The order is the same as
+   * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+   * [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.end_user_suggestion_config].
+   * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult end_user_suggestion_results = 8; + * + */ + java.util.List + getEndUserSuggestionResultsList(); + /** + * + * + *
+   * The suggestions for end user. The order is the same as
+   * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+   * [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.end_user_suggestion_config].
+   * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult end_user_suggestion_results = 8; + * + */ + com.google.cloud.dialogflow.v2beta1.SuggestionResult getEndUserSuggestionResults(int index); + /** + * + * + *
+   * The suggestions for end user. The order is the same as
+   * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+   * [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.end_user_suggestion_config].
+   * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult end_user_suggestion_results = 8; + * + */ + int getEndUserSuggestionResultsCount(); + /** + * + * + *
+   * The suggestions for end user. The order is the same as
+   * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+   * [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.end_user_suggestion_config].
+   * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult end_user_suggestion_results = 8; + * + */ + java.util.List + getEndUserSuggestionResultsOrBuilderList(); + /** + * + * + *
+   * The suggestions for end user. The order is the same as
+   * [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
+   * [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.end_user_suggestion_config].
+   * 
+ * + * + * repeated .google.cloud.dialogflow.v2beta1.SuggestionResult end_user_suggestion_results = 8; + * + */ + com.google.cloud.dialogflow.v2beta1.SuggestionResultOrBuilder + getEndUserSuggestionResultsOrBuilder(int index); + + /** + * + * + *
+   * Indicates the parameters of DTMF.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.DtmfParameters dtmf_parameters = 10; + * + * @return Whether the dtmfParameters field is set. + */ + boolean hasDtmfParameters(); + /** + * + * + *
+   * Indicates the parameters of DTMF.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.DtmfParameters dtmf_parameters = 10; + * + * @return The dtmfParameters. + */ + com.google.cloud.dialogflow.v2beta1.DtmfParameters getDtmfParameters(); + /** + * + * + *
+   * Indicates the parameters of DTMF.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.DtmfParameters dtmf_parameters = 10; + */ + com.google.cloud.dialogflow.v2beta1.DtmfParametersOrBuilder getDtmfParametersOrBuilder(); +} diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/audio_config.proto b/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/audio_config.proto index 62952f444..c72899df7 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/audio_config.proto +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/audio_config.proto @@ -27,6 +27,10 @@ option java_multiple_files = true; option java_outer_classname = "AudioConfigProto"; option java_package = "com.google.cloud.dialogflow.v2beta1"; option objc_class_prefix = "DF"; +option (google.api.resource_definition) = { + type: "automl.googleapis.com/Model" + pattern: "projects/{project}/locations/{location}/models/{model}" +}; // Audio encoding of the audio content sent in the conversational query request. // Refer to the diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/fulfillment.proto b/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/fulfillment.proto index ce72a54ec..8efe32af2 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/fulfillment.proto +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/fulfillment.proto @@ -81,8 +81,10 @@ message Fulfillment { // Represents configuration for a generic web service. // Dialogflow supports two mechanisms for authentications: + // // - Basic authentication with username and password. // - Authentication with additional authentication headers. + // // More information could be found at: // https://cloud.google.com/dialogflow/docs/fulfillment-configure. message GenericWebService { @@ -127,6 +129,7 @@ message Fulfillment { // Required. The unique identifier of the fulfillment. // Supported formats: + // // - `projects//agent/fulfillment` // - `projects//locations//agent/fulfillment` // @@ -155,6 +158,7 @@ message Fulfillment { message GetFulfillmentRequest { // Required. The name of the fulfillment. // Supported formats: + // // - `projects//agent/fulfillment` // - `projects//locations//agent/fulfillment` string name = 1 [ diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/participant.proto b/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/participant.proto index 2552fd1bd..6dc9eec19 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/participant.proto +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/participant.proto @@ -109,6 +109,24 @@ service Participants { option (google.api.method_signature) = "participant,event_input"; } + // Adds a text (e.g., chat) or audio (e.g., phone recording) message from a + // participant into the conversation. + // Note: This method is only available through the gRPC API (not REST). + // + // The top-level message sent to the client by the server is + // `StreamingAnalyzeContentResponse`. Multiple response messages can be + // returned in order. The first one or more messages contain the + // `recognition_result` field. Each result represents a more complete + // transcript of what the user said. The next message contains the + // `reply_text` field, and potentially the `reply_audio` and/or the + // `automated_agent_reply` fields. + // + // Note: Always use agent versions for production traffic + // sent to virtual agents. See [Versions and + // environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). + rpc StreamingAnalyzeContent(stream StreamingAnalyzeContentRequest) returns (stream StreamingAnalyzeContentResponse) { + } + // Gets suggested articles for a participant based on specific historical // messages. // @@ -543,6 +561,14 @@ message AnalyzeContentRequest { // Parameters for a human assist query. AssistQueryParameters assist_query_params = 14; + // Additional parameters to be put into Dialogflow CX session parameters. To + // remove a parameter from the session, clients should explicitly set the + // parameter value to null. + // + // Note: this field should only be used if you are connecting to a Dialogflow + // CX agent. + google.protobuf.Struct cx_parameters = 18; + // Optional. The send time of the message from end user or human agent's // perspective. It is used for identifying the same message under one // participant. @@ -624,6 +650,182 @@ message AnalyzeContentResponse { DtmfParameters dtmf_parameters = 9; } +// Defines the language used in the input text. +message InputTextConfig { + // Required. The language of this conversational query. See [Language + // Support](https://cloud.google.com/dialogflow/docs/reference/language) + // for a list of the currently supported language codes. + string language_code = 1; +} + +// The top-level message sent by the client to the +// [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.StreamingAnalyzeContent] method. +// +// Multiple request messages should be sent in order: +// +// 1. The first message must contain +// [participant][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.participant], +// [config][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.config] and optionally +// [query_params][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.query_params]. If you want +// to receive an audio response, it should also contain +// [reply_audio_config][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.reply_audio_config]. +// The message must not contain +// [input][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.input]. +// +// 2. If [config][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.config] in the first message +// was set to [audio_config][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.audio_config], +// all subsequent messages must contain +// [input_audio][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.input_audio] to continue +// with Speech recognition. +// If you decide to rather analyze text input after you already started +// Speech recognition, please send a message with +// [StreamingAnalyzeContentRequest.input_text][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.input_text]. +// +// However, note that: +// +// * Dialogflow will bill you for the audio so far. +// * Dialogflow discards all Speech recognition results in favor of the +// text input. +// +// 3. If [StreamingAnalyzeContentRequest.config][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.config] in the first message was set +// to [StreamingAnalyzeContentRequest.text_config][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.text_config], then the second message +// must contain only [input_text][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.input_text]. +// Moreover, you must not send more than two messages. +// +// After you sent all input, you must half-close or abort the request stream. +message StreamingAnalyzeContentRequest { + // Required. The name of the participant this text comes from. + // Format: `projects//locations//conversations//participants/`. + string participant = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Participant" + } + ]; + + // Required. The input config. + oneof config { + // Instructs the speech recognizer how to process the speech audio. + InputAudioConfig audio_config = 2; + + // The natural language text to be processed. + InputTextConfig text_config = 3; + } + + // Speech synthesis configuration. + // The speech synthesis settings for a virtual agent that may be configured + // for the associated conversation profile are not used when calling + // StreamingAnalyzeContent. If this configuration is not supplied, speech + // synthesis is disabled. + OutputAudioConfig reply_audio_config = 4; + + // Required. The input. + oneof input { + // The input audio content to be recognized. Must be sent if `audio_config` + // is set in the first message. The complete audio over all streaming + // messages must not exceed 1 minute. + bytes input_audio = 5; + + // The UTF-8 encoded natural language text to be processed. Must be sent if + // `text_config` is set in the first message. Text length must not exceed + // 256 bytes. The `input_text` field can be only sent once. + string input_text = 6; + + // The DTMF digits used to invoke intent and fill in parameter value. + // + // This input is ignored if the previous response indicated that DTMF input + // is not accepted. + TelephonyDtmfEvents input_dtmf = 9; + } + + // Parameters for a Dialogflow virtual-agent query. + QueryParameters query_params = 7; + + // Parameters for a human assist query. + AssistQueryParameters assist_query_params = 8; + + // Additional parameters to be put into Dialogflow CX session parameters. To + // remove a parameter from the session, clients should explicitly set the + // parameter value to null. + // + // Note: this field should only be used if you are connecting to a Dialogflow + // CX agent. + google.protobuf.Struct cx_parameters = 13; + + // Enable partial virtual agent responses. If this flag is not enabled, + // response stream still contains only one final response even if some + // `Fulfillment`s in Dialogflow virtual agent have been configured to return + // partial responses. + bool enable_partial_automated_agent_reply = 12; +} + +// The top-level message returned from the `StreamingAnalyzeContent` method. +// +// Multiple response messages can be returned in order: +// +// 1. If the input was set to streaming audio, the first one or more messages +// contain `recognition_result`. Each `recognition_result` represents a more +// complete transcript of what the user said. The last `recognition_result` +// has `is_final` set to `true`. +// +// 2. In virtual agent stage: if `enable_partial_automated_agent_reply` is +// true, the following N (currently 1 <= N <= 4) messages +// contain `automated_agent_reply` and optionally `reply_audio` +// returned by the virtual agent. The first (N-1) +// `automated_agent_reply`s will have `automated_agent_reply_type` set to +// `PARTIAL`. The last `automated_agent_reply` has +// `automated_agent_reply_type` set to `FINAL`. +// If `enable_partial_automated_agent_reply` is not enabled, response stream +// only contains the final reply. +// +// In human assist stage: the following N (N >= 1) messages contain +// `human_agent_suggestion_results`, `end_user_suggestion_results` or +// `message`. +message StreamingAnalyzeContentResponse { + // The result of speech recognition. + StreamingRecognitionResult recognition_result = 1; + + // Optional. The output text content. + // This field is set if an automated agent responded with a text for the user. + string reply_text = 2; + + // Optional. The audio data bytes encoded as specified in the request. + // This field is set if: + // + // - The `reply_audio_config` field is specified in the request. + // - The automated agent, which this output comes from, responded with audio. + // In such case, the `reply_audio.config` field contains settings used to + // synthesize the speech. + // + // 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. + OutputAudio reply_audio = 3; + + // Optional. Only set if a Dialogflow automated agent has responded. + // Note that: [AutomatedAgentReply.detect_intent_response.output_audio][] + // and [AutomatedAgentReply.detect_intent_response.output_audio_config][] + // are always empty, use [reply_audio][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse.reply_audio] instead. + AutomatedAgentReply automated_agent_reply = 4; + + // Output only. Message analyzed by CCAI. + Message message = 6; + + // The suggestions for most recent human agent. The order is the same as + // [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of + // [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.human_agent_suggestion_config]. + repeated SuggestionResult human_agent_suggestion_results = 7; + + // The suggestions for end user. The order is the same as + // [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of + // [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.end_user_suggestion_config]. + repeated SuggestionResult end_user_suggestion_results = 8; + + // Indicates the parameters of DTMF. + DtmfParameters dtmf_parameters = 10; +} + // Represents a part of a message possibly annotated with an entity. The part // can be an entity or purely a part of the message between two entities or // message start/end. @@ -1103,6 +1305,33 @@ message ResponseMessage { } + // Represents an audio message that is composed of both segments + // synthesized from the Dialogflow agent prompts and ones hosted externally + // at the specified URIs. + message MixedAudio { + // Represents one segment of audio. + message Segment { + // Content of the segment. + oneof content { + // Raw audio synthesized from the Dialogflow agent's response using + // the output config specified in the request. + bytes audio = 1; + + // Client-specific URI that points to an audio clip accessible to the + // client. + string uri = 2; + } + + // Whether the playback of this segment can be interrupted by the end + // user's speech and the client should then start the next Dialogflow + // request. + bool allow_playback_interruption = 3; + } + + // Segments this audio response is composed of. + repeated Segment segments = 1; + } + // Represents the signal that telles the client to transfer the phone call // connected to the agent to a third-party endpoint. message TelephonyTransferCall { @@ -1132,6 +1361,10 @@ message ResponseMessage { // ended. EndInteraction end_interaction = 4; + // An audio response message composed of both the synthesized Dialogflow + // agent responses and the audios hosted in places known to the client. + MixedAudio mixed_audio = 5; + // A signal that the client should transfer the phone call connected to // this agent to a third-party endpoint. TelephonyTransferCall telephony_transfer_call = 6;