diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/DocumentsClient.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/DocumentsClient.java index 9e420e4e8..4ca4a49ad 100644 --- a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/DocumentsClient.java +++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/DocumentsClient.java @@ -234,6 +234,7 @@ public final ListDocumentsPagedResponse listDocuments(String parent) { * .toString()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") * .build(); * for (Document element : documentsClient.listDocuments(request).iterateAll()) { * // doThingsWith(element); @@ -263,6 +264,7 @@ public final ListDocumentsPagedResponse listDocuments(ListDocumentsRequest reque * .toString()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") * .build(); * ApiFuture future = documentsClient.listDocumentsPagedCallable().futureCall(request); * // Do something. @@ -292,6 +294,7 @@ public final ListDocumentsPagedResponse listDocuments(ListDocumentsRequest reque * .toString()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") * .build(); * while (true) { * ListDocumentsResponse response = documentsClient.listDocumentsCallable().call(request); @@ -1025,6 +1028,8 @@ public final OperationFuture reloadDocumen * DocumentName.ofProjectKnowledgeBaseDocumentName( * "[PROJECT]", "[KNOWLEDGE_BASE]", "[DOCUMENT]") * .toString()) + * .setImportGcsCustomMetadata(true) + * .setSmartMessagingPartialUpdate(true) * .build(); * Document response = documentsClient.reloadDocumentAsync(request).get(); * } @@ -1066,6 +1071,8 @@ public final OperationFuture reloadDocumen * DocumentName.ofProjectKnowledgeBaseDocumentName( * "[PROJECT]", "[KNOWLEDGE_BASE]", "[DOCUMENT]") * .toString()) + * .setImportGcsCustomMetadata(true) + * .setSmartMessagingPartialUpdate(true) * .build(); * OperationFuture future = * documentsClient.reloadDocumentOperationCallable().futureCall(request); @@ -1107,6 +1114,8 @@ public final OperationFuture reloadDocumen * DocumentName.ofProjectKnowledgeBaseDocumentName( * "[PROJECT]", "[KNOWLEDGE_BASE]", "[DOCUMENT]") * .toString()) + * .setImportGcsCustomMetadata(true) + * .setSmartMessagingPartialUpdate(true) * .build(); * ApiFuture future = documentsClient.reloadDocumentCallable().futureCall(request); * // Do something. @@ -1118,6 +1127,115 @@ public final UnaryCallable reloadDocumentCalla return stub.reloadDocumentCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Exports a smart messaging candidate document into the specified destination. + * + *

This method is a [long-running + * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). The + * returned `Operation` type has the following method-specific fields: + * + *

- `metadata`: + * [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata] - + * `response`: [Document][google.cloud.dialogflow.v2.Document] + * + *

Sample code: + * + *

{@code
+   * try (DocumentsClient documentsClient = DocumentsClient.create()) {
+   *   ExportDocumentRequest request =
+   *       ExportDocumentRequest.newBuilder()
+   *           .setName(
+   *               DocumentName.ofProjectKnowledgeBaseDocumentName(
+   *                       "[PROJECT]", "[KNOWLEDGE_BASE]", "[DOCUMENT]")
+   *                   .toString())
+   *           .setExportFullContent(true)
+   *           .setSmartMessagingPartialUpdate(true)
+   *           .build();
+   *   Document response = documentsClient.exportDocumentAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture exportDocumentAsync( + ExportDocumentRequest request) { + return exportDocumentOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Exports a smart messaging candidate document into the specified destination. + * + *

This method is a [long-running + * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). The + * returned `Operation` type has the following method-specific fields: + * + *

- `metadata`: + * [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata] - + * `response`: [Document][google.cloud.dialogflow.v2.Document] + * + *

Sample code: + * + *

{@code
+   * try (DocumentsClient documentsClient = DocumentsClient.create()) {
+   *   ExportDocumentRequest request =
+   *       ExportDocumentRequest.newBuilder()
+   *           .setName(
+   *               DocumentName.ofProjectKnowledgeBaseDocumentName(
+   *                       "[PROJECT]", "[KNOWLEDGE_BASE]", "[DOCUMENT]")
+   *                   .toString())
+   *           .setExportFullContent(true)
+   *           .setSmartMessagingPartialUpdate(true)
+   *           .build();
+   *   OperationFuture future =
+   *       documentsClient.exportDocumentOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Document response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + exportDocumentOperationCallable() { + return stub.exportDocumentOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Exports a smart messaging candidate document into the specified destination. + * + *

This method is a [long-running + * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). The + * returned `Operation` type has the following method-specific fields: + * + *

- `metadata`: + * [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata] - + * `response`: [Document][google.cloud.dialogflow.v2.Document] + * + *

Sample code: + * + *

{@code
+   * try (DocumentsClient documentsClient = DocumentsClient.create()) {
+   *   ExportDocumentRequest request =
+   *       ExportDocumentRequest.newBuilder()
+   *           .setName(
+   *               DocumentName.ofProjectKnowledgeBaseDocumentName(
+   *                       "[PROJECT]", "[KNOWLEDGE_BASE]", "[DOCUMENT]")
+   *                   .toString())
+   *           .setExportFullContent(true)
+   *           .setSmartMessagingPartialUpdate(true)
+   *           .build();
+   *   ApiFuture future = documentsClient.exportDocumentCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable exportDocumentCallable() { + return stub.exportDocumentCallable(); + } + @Override public final void close() { stub.close(); diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/DocumentsSettings.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/DocumentsSettings.java index 772ff3d59..88ba1e166 100644 --- a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/DocumentsSettings.java +++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/DocumentsSettings.java @@ -126,6 +126,17 @@ public UnaryCallSettings reloadDocumentSetting return ((DocumentsStubSettings) getStubSettings()).reloadDocumentOperationSettings(); } + /** Returns the object with the settings used for calls to exportDocument. */ + public UnaryCallSettings exportDocumentSettings() { + return ((DocumentsStubSettings) getStubSettings()).exportDocumentSettings(); + } + + /** Returns the object with the settings used for calls to exportDocument. */ + public OperationCallSettings + exportDocumentOperationSettings() { + return ((DocumentsStubSettings) getStubSettings()).exportDocumentOperationSettings(); + } + public static final DocumentsSettings create(DocumentsStubSettings stub) throws IOException { return new DocumentsSettings.Builder(stub.toBuilder()).build(); } @@ -281,6 +292,18 @@ public UnaryCallSettings.Builder reloadDocumen return getStubSettingsBuilder().reloadDocumentOperationSettings(); } + /** Returns the builder for the settings used for calls to exportDocument. */ + public UnaryCallSettings.Builder exportDocumentSettings() { + return getStubSettingsBuilder().exportDocumentSettings(); + } + + /** Returns the builder for the settings used for calls to exportDocument. */ + public OperationCallSettings.Builder< + ExportDocumentRequest, Document, KnowledgeOperationMetadata> + exportDocumentOperationSettings() { + return getStubSettingsBuilder().exportDocumentOperationSettings(); + } + @Override public DocumentsSettings build() throws IOException { return new DocumentsSettings(this); diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/KnowledgeBasesClient.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/KnowledgeBasesClient.java index f57164aa9..19890d86e 100644 --- a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/KnowledgeBasesClient.java +++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/KnowledgeBasesClient.java @@ -242,6 +242,7 @@ public final ListKnowledgeBasesPagedResponse listKnowledgeBases(String parent) { * .setParent(ProjectName.of("[PROJECT]").toString()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") * .build(); * for (KnowledgeBase element : knowledgeBasesClient.listKnowledgeBases(request).iterateAll()) { * // doThingsWith(element); @@ -270,6 +271,7 @@ public final ListKnowledgeBasesPagedResponse listKnowledgeBases( * .setParent(ProjectName.of("[PROJECT]").toString()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") * .build(); * ApiFuture future = * knowledgeBasesClient.listKnowledgeBasesPagedCallable().futureCall(request); @@ -298,6 +300,7 @@ public final ListKnowledgeBasesPagedResponse listKnowledgeBases( * .setParent(ProjectName.of("[PROJECT]").toString()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") * .build(); * while (true) { * ListKnowledgeBasesResponse response = diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/gapic_metadata.json b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/gapic_metadata.json index a131b7226..7b3a63e9e 100644 --- a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/gapic_metadata.json +++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/gapic_metadata.json @@ -142,6 +142,9 @@ "DeleteDocument": { "methods": ["deleteDocumentAsync", "deleteDocumentAsync", "deleteDocumentAsync", "deleteDocumentOperationCallable", "deleteDocumentCallable"] }, + "ExportDocument": { + "methods": ["exportDocumentAsync", "exportDocumentOperationCallable", "exportDocumentCallable"] + }, "GetDocument": { "methods": ["getDocument", "getDocument", "getDocument", "getDocumentCallable"] }, diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/DocumentsStub.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/DocumentsStub.java index 0f92f6813..7b89962d3 100644 --- a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/DocumentsStub.java +++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/DocumentsStub.java @@ -24,6 +24,7 @@ import com.google.cloud.dialogflow.v2.CreateDocumentRequest; import com.google.cloud.dialogflow.v2.DeleteDocumentRequest; import com.google.cloud.dialogflow.v2.Document; +import com.google.cloud.dialogflow.v2.ExportDocumentRequest; import com.google.cloud.dialogflow.v2.GetDocumentRequest; import com.google.cloud.dialogflow.v2.KnowledgeOperationMetadata; import com.google.cloud.dialogflow.v2.ListDocumentsRequest; @@ -97,6 +98,15 @@ public UnaryCallable reloadDocumentCallable() throw new UnsupportedOperationException("Not implemented: reloadDocumentCallable()"); } + public OperationCallable + exportDocumentOperationCallable() { + throw new UnsupportedOperationException("Not implemented: exportDocumentOperationCallable()"); + } + + public UnaryCallable exportDocumentCallable() { + throw new UnsupportedOperationException("Not implemented: exportDocumentCallable()"); + } + @Override public abstract void close(); } diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/DocumentsStubSettings.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/DocumentsStubSettings.java index 5720254ae..09afd2b42 100644 --- a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/DocumentsStubSettings.java +++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/DocumentsStubSettings.java @@ -47,6 +47,7 @@ import com.google.cloud.dialogflow.v2.CreateDocumentRequest; import com.google.cloud.dialogflow.v2.DeleteDocumentRequest; import com.google.cloud.dialogflow.v2.Document; +import com.google.cloud.dialogflow.v2.ExportDocumentRequest; import com.google.cloud.dialogflow.v2.GetDocumentRequest; import com.google.cloud.dialogflow.v2.KnowledgeOperationMetadata; import com.google.cloud.dialogflow.v2.ListDocumentsRequest; @@ -120,6 +121,9 @@ public class DocumentsStubSettings extends StubSettings { private final UnaryCallSettings reloadDocumentSettings; private final OperationCallSettings reloadDocumentOperationSettings; + private final UnaryCallSettings exportDocumentSettings; + private final OperationCallSettings + exportDocumentOperationSettings; private static final PagedListDescriptor LIST_DOCUMENTS_PAGE_STR_DESC = @@ -229,6 +233,17 @@ public UnaryCallSettings reloadDocumentSetting return reloadDocumentOperationSettings; } + /** Returns the object with the settings used for calls to exportDocument. */ + public UnaryCallSettings exportDocumentSettings() { + return exportDocumentSettings; + } + + /** Returns the object with the settings used for calls to exportDocument. */ + public OperationCallSettings + exportDocumentOperationSettings() { + return exportDocumentOperationSettings; + } + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public DocumentsStub createStub() throws IOException { if (getTransportChannelProvider() @@ -314,6 +329,8 @@ protected DocumentsStubSettings(Builder settingsBuilder) throws IOException { updateDocumentOperationSettings = settingsBuilder.updateDocumentOperationSettings().build(); reloadDocumentSettings = settingsBuilder.reloadDocumentSettings().build(); reloadDocumentOperationSettings = settingsBuilder.reloadDocumentOperationSettings().build(); + exportDocumentSettings = settingsBuilder.exportDocumentSettings().build(); + exportDocumentOperationSettings = settingsBuilder.exportDocumentOperationSettings().build(); } /** Builder for DocumentsStubSettings. */ @@ -343,6 +360,11 @@ public static class Builder extends StubSettings.Builder reloadDocumentOperationSettings; + private final UnaryCallSettings.Builder + exportDocumentSettings; + private final OperationCallSettings.Builder< + ExportDocumentRequest, Document, KnowledgeOperationMetadata> + exportDocumentOperationSettings; private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; @@ -391,6 +413,8 @@ protected Builder(ClientContext clientContext) { updateDocumentOperationSettings = OperationCallSettings.newBuilder(); reloadDocumentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); reloadDocumentOperationSettings = OperationCallSettings.newBuilder(); + exportDocumentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + exportDocumentOperationSettings = OperationCallSettings.newBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -399,7 +423,8 @@ protected Builder(ClientContext clientContext) { createDocumentSettings, deleteDocumentSettings, updateDocumentSettings, - reloadDocumentSettings); + reloadDocumentSettings, + exportDocumentSettings); initDefaults(this); } @@ -416,6 +441,8 @@ protected Builder(DocumentsStubSettings settings) { updateDocumentOperationSettings = settings.updateDocumentOperationSettings.toBuilder(); reloadDocumentSettings = settings.reloadDocumentSettings.toBuilder(); reloadDocumentOperationSettings = settings.reloadDocumentOperationSettings.toBuilder(); + exportDocumentSettings = settings.exportDocumentSettings.toBuilder(); + exportDocumentOperationSettings = settings.exportDocumentOperationSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -424,7 +451,8 @@ protected Builder(DocumentsStubSettings settings) { createDocumentSettings, deleteDocumentSettings, updateDocumentSettings, - reloadDocumentSettings); + reloadDocumentSettings, + exportDocumentSettings); } private static Builder createDefault() { @@ -471,6 +499,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder + .exportDocumentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder .createDocumentOperationSettings() .setInitialCallSettings( @@ -571,6 +604,31 @@ private static Builder initDefaults(Builder builder) { .setTotalTimeout(Duration.ofMillis(300000L)) .build())); + builder + .exportDocumentOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Document.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + KnowledgeOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + return builder; } @@ -656,6 +714,20 @@ public UnaryCallSettings.Builder reloadDocumen return reloadDocumentOperationSettings; } + /** Returns the builder for the settings used for calls to exportDocument. */ + public UnaryCallSettings.Builder exportDocumentSettings() { + return exportDocumentSettings; + } + + /** Returns the builder for the settings used for calls to exportDocument. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + ExportDocumentRequest, Document, KnowledgeOperationMetadata> + exportDocumentOperationSettings() { + return exportDocumentOperationSettings; + } + @Override public DocumentsStubSettings build() throws IOException { return new DocumentsStubSettings(this); diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcDocumentsStub.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcDocumentsStub.java index 241c1345a..ab60507a1 100644 --- a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcDocumentsStub.java +++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcDocumentsStub.java @@ -28,6 +28,7 @@ import com.google.cloud.dialogflow.v2.CreateDocumentRequest; import com.google.cloud.dialogflow.v2.DeleteDocumentRequest; import com.google.cloud.dialogflow.v2.Document; +import com.google.cloud.dialogflow.v2.ExportDocumentRequest; import com.google.cloud.dialogflow.v2.GetDocumentRequest; import com.google.cloud.dialogflow.v2.KnowledgeOperationMetadata; import com.google.cloud.dialogflow.v2.ListDocumentsRequest; @@ -111,6 +112,16 @@ public class GrpcDocumentsStub extends DocumentsStub { .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor + exportDocumentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.v2.Documents/ExportDocument") + .setRequestMarshaller( + ProtoUtils.marshaller(ExportDocumentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private final UnaryCallable listDocumentsCallable; private final UnaryCallable listDocumentsPagedCallable; @@ -127,6 +138,9 @@ public class GrpcDocumentsStub extends DocumentsStub { private final UnaryCallable reloadDocumentCallable; private final OperationCallable reloadDocumentOperationCallable; + private final UnaryCallable exportDocumentCallable; + private final OperationCallable + exportDocumentOperationCallable; private final BackgroundResource backgroundResources; private final GrpcOperationsStub operationsStub; @@ -229,6 +243,16 @@ protected GrpcDocumentsStub( return params.build(); }) .build(); + GrpcCallSettings exportDocumentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(exportDocumentMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); this.listDocumentsCallable = callableFactory.createUnaryCallable( @@ -275,6 +299,15 @@ protected GrpcDocumentsStub( settings.reloadDocumentOperationSettings(), clientContext, operationsStub); + this.exportDocumentCallable = + callableFactory.createUnaryCallable( + exportDocumentTransportSettings, settings.exportDocumentSettings(), clientContext); + this.exportDocumentOperationCallable = + callableFactory.createOperationCallable( + exportDocumentTransportSettings, + settings.exportDocumentOperationSettings(), + clientContext, + operationsStub); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -344,6 +377,17 @@ public UnaryCallable reloadDocumentCallable() return reloadDocumentOperationCallable; } + @Override + public UnaryCallable exportDocumentCallable() { + return exportDocumentCallable; + } + + @Override + public OperationCallable + exportDocumentOperationCallable() { + return exportDocumentOperationCallable; + } + @Override public final void close() { try { diff --git a/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/DocumentsClientTest.java b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/DocumentsClientTest.java index 4e66502eb..88446733d 100644 --- a/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/DocumentsClientTest.java +++ b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/DocumentsClientTest.java @@ -657,4 +657,79 @@ public void reloadDocumentExceptionTest2() throws Exception { Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } + + @Test + public void exportDocumentTest() throws Exception { + Document expectedResponse = + Document.newBuilder() + .setName( + DocumentName.ofProjectKnowledgeBaseDocumentName( + "[PROJECT]", "[KNOWLEDGE_BASE]", "[DOCUMENT]") + .toString()) + .setDisplayName("displayName1714148973") + .setMimeType("mimeType-1392120434") + .addAllKnowledgeTypes(new ArrayList()) + .setEnableAutoReload(true) + .setLatestReloadStatus(Document.ReloadStatus.newBuilder().build()) + .putAllMetadata(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("exportDocumentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDocuments.addResponse(resultOperation); + + ExportDocumentRequest request = + ExportDocumentRequest.newBuilder() + .setName( + DocumentName.ofProjectKnowledgeBaseDocumentName( + "[PROJECT]", "[KNOWLEDGE_BASE]", "[DOCUMENT]") + .toString()) + .setExportFullContent(true) + .setSmartMessagingPartialUpdate(true) + .build(); + + Document actualResponse = client.exportDocumentAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDocuments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ExportDocumentRequest actualRequest = ((ExportDocumentRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getGcsDestination(), actualRequest.getGcsDestination()); + Assert.assertEquals(request.getExportFullContent(), actualRequest.getExportFullContent()); + Assert.assertEquals( + request.getSmartMessagingPartialUpdate(), actualRequest.getSmartMessagingPartialUpdate()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void exportDocumentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDocuments.addException(exception); + + try { + ExportDocumentRequest request = + ExportDocumentRequest.newBuilder() + .setName( + DocumentName.ofProjectKnowledgeBaseDocumentName( + "[PROJECT]", "[KNOWLEDGE_BASE]", "[DOCUMENT]") + .toString()) + .setExportFullContent(true) + .setSmartMessagingPartialUpdate(true) + .build(); + client.exportDocumentAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } } diff --git a/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/MockDocumentsImpl.java b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/MockDocumentsImpl.java index 5a9f341f9..3e74f0a13 100644 --- a/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/MockDocumentsImpl.java +++ b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/MockDocumentsImpl.java @@ -183,4 +183,25 @@ public void reloadDocument( Exception.class.getName()))); } } + + @Override + public void exportDocument( + ExportDocumentRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ExportDocument, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } } diff --git a/grpc-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/DocumentsGrpc.java b/grpc-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/DocumentsGrpc.java index bda2159ad..3afd54b78 100644 --- a/grpc-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/DocumentsGrpc.java +++ b/grpc-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/DocumentsGrpc.java @@ -294,6 +294,48 @@ private DocumentsGrpc() {} return getReloadDocumentMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.v2.ExportDocumentRequest, com.google.longrunning.Operation> + getExportDocumentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ExportDocument", + requestType = com.google.cloud.dialogflow.v2.ExportDocumentRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.v2.ExportDocumentRequest, com.google.longrunning.Operation> + getExportDocumentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.v2.ExportDocumentRequest, com.google.longrunning.Operation> + getExportDocumentMethod; + if ((getExportDocumentMethod = DocumentsGrpc.getExportDocumentMethod) == null) { + synchronized (DocumentsGrpc.class) { + if ((getExportDocumentMethod = DocumentsGrpc.getExportDocumentMethod) == null) { + DocumentsGrpc.getExportDocumentMethod = + getExportDocumentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ExportDocument")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.v2.ExportDocumentRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new DocumentsMethodDescriptorSupplier("ExportDocument")) + .build(); + } + } + } + return getExportDocumentMethod; + } + /** Creates a new async stub that supports all call types for the service */ public static DocumentsStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -454,6 +496,26 @@ public void reloadDocument( getReloadDocumentMethod(), responseObserver); } + /** + * + * + *
+     * Exports a smart messaging candidate document into the specified
+     * destination.
+     * This method is a [long-running
+     * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
+     * The returned `Operation` type has the following method-specific fields:
+     * - `metadata`: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]
+     * - `response`: [Document][google.cloud.dialogflow.v2.Document]
+     * 
+ */ + public void exportDocument( + com.google.cloud.dialogflow.v2.ExportDocumentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getExportDocumentMethod(), responseObserver); + } + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) @@ -494,6 +556,12 @@ public final io.grpc.ServerServiceDefinition bindService() { new MethodHandlers< com.google.cloud.dialogflow.v2.ReloadDocumentRequest, com.google.longrunning.Operation>(this, METHODID_RELOAD_DOCUMENT))) + .addMethod( + getExportDocumentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.v2.ExportDocumentRequest, + com.google.longrunning.Operation>(this, METHODID_EXPORT_DOCUMENT))) .build(); } } @@ -637,6 +705,28 @@ public void reloadDocument( request, responseObserver); } + + /** + * + * + *
+     * Exports a smart messaging candidate document into the specified
+     * destination.
+     * This method is a [long-running
+     * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
+     * The returned `Operation` type has the following method-specific fields:
+     * - `metadata`: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]
+     * - `response`: [Document][google.cloud.dialogflow.v2.Document]
+     * 
+ */ + public void exportDocument( + com.google.cloud.dialogflow.v2.ExportDocumentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getExportDocumentMethod(), getCallOptions()), + request, + responseObserver); + } } /** @@ -761,6 +851,25 @@ public com.google.longrunning.Operation reloadDocument( return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getReloadDocumentMethod(), getCallOptions(), request); } + + /** + * + * + *
+     * Exports a smart messaging candidate document into the specified
+     * destination.
+     * This method is a [long-running
+     * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
+     * The returned `Operation` type has the following method-specific fields:
+     * - `metadata`: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]
+     * - `response`: [Document][google.cloud.dialogflow.v2.Document]
+     * 
+ */ + public com.google.longrunning.Operation exportDocument( + com.google.cloud.dialogflow.v2.ExportDocumentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getExportDocumentMethod(), getCallOptions(), request); + } } /** @@ -886,6 +995,25 @@ protected DocumentsFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getReloadDocumentMethod(), getCallOptions()), request); } + + /** + * + * + *
+     * Exports a smart messaging candidate document into the specified
+     * destination.
+     * This method is a [long-running
+     * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
+     * The returned `Operation` type has the following method-specific fields:
+     * - `metadata`: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]
+     * - `response`: [Document][google.cloud.dialogflow.v2.Document]
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + exportDocument(com.google.cloud.dialogflow.v2.ExportDocumentRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getExportDocumentMethod(), getCallOptions()), request); + } } private static final int METHODID_LIST_DOCUMENTS = 0; @@ -894,6 +1022,7 @@ protected DocumentsFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions private static final int METHODID_DELETE_DOCUMENT = 3; private static final int METHODID_UPDATE_DOCUMENT = 4; private static final int METHODID_RELOAD_DOCUMENT = 5; + private static final int METHODID_EXPORT_DOCUMENT = 6; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -944,6 +1073,11 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.cloud.dialogflow.v2.ReloadDocumentRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_EXPORT_DOCUMENT: + serviceImpl.exportDocument( + (com.google.cloud.dialogflow.v2.ExportDocumentRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; default: throw new AssertionError(); } @@ -1014,6 +1148,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getDeleteDocumentMethod()) .addMethod(getUpdateDocumentMethod()) .addMethod(getReloadDocumentMethod()) + .addMethod(getExportDocumentMethod()) .build(); } } diff --git a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/DocumentProto.java b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/DocumentProto.java index 8d0d183f1..a90b315d5 100644 --- a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/DocumentProto.java +++ b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/DocumentProto.java @@ -67,6 +67,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_v2_ReloadDocumentRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_v2_ReloadDocumentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_v2_ExportDocumentRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_v2_ExportDocumentRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_dialogflow_v2_KnowledgeOperationMetadata_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -84,117 +88,134 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "oto\022\032google.cloud.dialogflow.v2\032\034google/" + "api/annotations.proto\032\027google/api/client" + ".proto\032\037google/api/field_behavior.proto\032" - + "\031google/api/resource.proto\032#google/longr" - + "unning/operations.proto\032 google/protobuf" - + "/field_mask.proto\032\037google/protobuf/times" - + "tamp.proto\032\027google/rpc/status.proto\"\342\006\n\010" - + "Document\022\021\n\004name\030\001 \001(\tB\003\340A\001\022\031\n\014display_n" - + "ame\030\002 \001(\tB\003\340A\002\022\026\n\tmime_type\030\003 \001(\tB\003\340A\002\022P" - + "\n\017knowledge_types\030\004 \003(\01622.google.cloud.d" - + "ialogflow.v2.Document.KnowledgeTypeB\003\340A\002" - + "\022\025\n\013content_uri\030\005 \001(\tH\000\022\025\n\013raw_content\030\t" - + " \001(\014H\000\022\037\n\022enable_auto_reload\030\013 \001(\010B\003\340A\001\022" - + "T\n\024latest_reload_status\030\014 \001(\01321.google.c" - + "loud.dialogflow.v2.Document.ReloadStatus" - + "B\003\340A\003\022I\n\010metadata\030\007 \003(\01322.google.cloud.d" - + "ialogflow.v2.Document.MetadataEntryB\003\340A\001" - + "\032\\\n\014ReloadStatus\022(\n\004time\030\001 \001(\0132\032.google." - + "protobuf.Timestamp\022\"\n\006status\030\002 \001(\0132\022.goo" - + "gle.rpc.Status\032/\n\rMetadataEntry\022\013\n\003key\030\001" - + " \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"c\n\rKnowledgeType" - + "\022\036\n\032KNOWLEDGE_TYPE_UNSPECIFIED\020\000\022\007\n\003FAQ\020" - + "\001\022\021\n\rEXTRACTIVE_QA\020\002\022\026\n\022ARTICLE_SUGGESTI" - + "ON\020\003:\317\001\352A\313\001\n\"dialogflow.googleapis.com/D" - + "ocument\022Gprojects/{project}/knowledgeBas" - + "es/{knowledge_base}/documents/{document}" - + "\022\\projects/{project}/locations/{location" - + "}/knowledgeBases/{knowledge_base}/docume" - + "nts/{document}B\010\n\006source\"N\n\022GetDocumentR" - + "equest\0228\n\004name\030\001 \001(\tB*\340A\002\372A$\n\"dialogflow" - + ".googleapis.com/Document\"y\n\024ListDocument" - + "sRequest\022:\n\006parent\030\001 \001(\tB*\340A\002\372A$\022\"dialog" - + "flow.googleapis.com/Document\022\021\n\tpage_siz" - + "e\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"i\n\025ListDocum" - + "entsResponse\0227\n\tdocuments\030\001 \003(\0132$.google" - + ".cloud.dialogflow.v2.Document\022\027\n\017next_pa" - + "ge_token\030\002 \001(\t\"\220\001\n\025CreateDocumentRequest" - + "\022:\n\006parent\030\001 \001(\tB*\340A\002\372A$\022\"dialogflow.goo" - + "gleapis.com/Document\022;\n\010document\030\002 \001(\0132$" - + ".google.cloud.dialogflow.v2.DocumentB\003\340A" - + "\002\"Q\n\025DeleteDocumentRequest\0228\n\004name\030\001 \001(\t" + + "\031google/api/resource.proto\032$google/cloud" + + "/dialogflow/v2/gcs.proto\032#google/longrun" + + "ning/operations.proto\032 google/protobuf/f" + + "ield_mask.proto\032\037google/protobuf/timesta" + + "mp.proto\032\027google/rpc/status.proto\"\342\006\n\010Do" + + "cument\022\021\n\004name\030\001 \001(\tB\003\340A\001\022\031\n\014display_nam" + + "e\030\002 \001(\tB\003\340A\002\022\026\n\tmime_type\030\003 \001(\tB\003\340A\002\022P\n\017" + + "knowledge_types\030\004 \003(\01622.google.cloud.dia" + + "logflow.v2.Document.KnowledgeTypeB\003\340A\002\022\025" + + "\n\013content_uri\030\005 \001(\tH\000\022\025\n\013raw_content\030\t \001" + + "(\014H\000\022\037\n\022enable_auto_reload\030\013 \001(\010B\003\340A\001\022T\n" + + "\024latest_reload_status\030\014 \001(\01321.google.clo" + + "ud.dialogflow.v2.Document.ReloadStatusB\003" + + "\340A\003\022I\n\010metadata\030\007 \003(\01322.google.cloud.dia" + + "logflow.v2.Document.MetadataEntryB\003\340A\001\032\\" + + "\n\014ReloadStatus\022(\n\004time\030\001 \001(\0132\032.google.pr" + + "otobuf.Timestamp\022\"\n\006status\030\002 \001(\0132\022.googl" + + "e.rpc.Status\032/\n\rMetadataEntry\022\013\n\003key\030\001 \001" + + "(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"c\n\rKnowledgeType\022\036" + + "\n\032KNOWLEDGE_TYPE_UNSPECIFIED\020\000\022\007\n\003FAQ\020\001\022" + + "\021\n\rEXTRACTIVE_QA\020\002\022\026\n\022ARTICLE_SUGGESTION" + + "\020\003:\317\001\352A\313\001\n\"dialogflow.googleapis.com/Doc" + + "ument\022Gprojects/{project}/knowledgeBases" + + "/{knowledge_base}/documents/{document}\022\\" + + "projects/{project}/locations/{location}/" + + "knowledgeBases/{knowledge_base}/document" + + "s/{document}B\010\n\006source\"N\n\022GetDocumentReq" + + "uest\0228\n\004name\030\001 \001(\tB*\340A\002\372A$\n\"dialogflow.g" + + "oogleapis.com/Document\"\211\001\n\024ListDocuments" + + "Request\022:\n\006parent\030\001 \001(\tB*\340A\002\372A$\022\"dialogf" + + "low.googleapis.com/Document\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\"i\n\025ListDocumentsResponse\0227\n\tdocuments" + + "\030\001 \003(\0132$.google.cloud.dialogflow.v2.Docu" + + "ment\022\027\n\017next_page_token\030\002 \001(\t\"\220\001\n\025Create" + + "DocumentRequest\022:\n\006parent\030\001 \001(\tB*\340A\002\372A$\022" + + "\"dialogflow.googleapis.com/Document\022;\n\010d" + + "ocument\030\002 \001(\0132$.google.cloud.dialogflow." + + "v2.DocumentB\003\340A\002\"Q\n\025DeleteDocumentReques" + + "t\0228\n\004name\030\001 \001(\tB*\340A\002\372A$\n\"dialogflow.goog" + + "leapis.com/Document\"\212\001\n\025UpdateDocumentRe" + + "quest\022;\n\010document\030\001 \001(\0132$.google.cloud.d" + + "ialogflow.v2.DocumentB\003\340A\002\0224\n\013update_mas" + + "k\030\002 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\001" + + "\"\315\001\n\025ReloadDocumentRequest\0228\n\004name\030\001 \001(\t" + "B*\340A\002\372A$\n\"dialogflow.googleapis.com/Docu" - + "ment\"\212\001\n\025UpdateDocumentRequest\022;\n\010docume" - + "nt\030\001 \001(\0132$.google.cloud.dialogflow.v2.Do" - + "cumentB\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032.googl" - + "e.protobuf.FieldMaskB\003\340A\001\"w\n\025ReloadDocum" - + "entRequest\0228\n\004name\030\001 \001(\tB*\340A\002\372A$\n\"dialog" - + "flow.googleapis.com/Document\022\032\n\013content_" - + "uri\030\003 \001(\tB\003\340A\001H\000B\010\n\006source\"\262\001\n\032Knowledge" - + "OperationMetadata\022P\n\005state\030\001 \001(\0162<.googl" - + "e.cloud.dialogflow.v2.KnowledgeOperation" - + "Metadata.StateB\003\340A\003\"B\n\005State\022\025\n\021STATE_UN" - + "SPECIFIED\020\000\022\013\n\007PENDING\020\001\022\013\n\007RUNNING\020\002\022\010\n" - + "\004DONE\020\0032\327\021\n\tDocuments\022\271\002\n\rListDocuments\022" - + "0.google.cloud.dialogflow.v2.ListDocumen" - + "tsRequest\0321.google.cloud.dialogflow.v2.L" - + "istDocumentsResponse\"\302\001\202\323\344\223\002\262\001\0222/v2/{par" - + "ent=projects/*/knowledgeBases/*}/documen" - + "tsZ@\022>/v2/{parent=projects/*/locations/*" - + "/knowledgeBases/*}/documentsZ:\0228/v2/{par" - + "ent=projects/*/agent/knowledgeBases/*}/d" - + "ocuments\332A\006parent\022\246\002\n\013GetDocument\022..goog" - + "le.cloud.dialogflow.v2.GetDocumentReques" - + "t\032$.google.cloud.dialogflow.v2.Document\"" - + "\300\001\202\323\344\223\002\262\001\0222/v2/{name=projects/*/knowledg" - + "eBases/*/documents/*}Z@\022>/v2/{name=proje" - + "cts/*/locations/*/knowledgeBases/*/docum" - + "ents/*}Z:\0228/v2/{name=projects/*/agent/kn" - + "owledgeBases/*/documents/*}\332A\004name\022\367\002\n\016C" - + "reateDocument\0221.google.cloud.dialogflow." - + "v2.CreateDocumentRequest\032\035.google.longru" - + "nning.Operation\"\222\002\202\323\344\223\002\320\001\"2/v2/{parent=p" - + "rojects/*/knowledgeBases/*}/documents:\010d" - + "ocumentZJ\">/v2/{parent=projects/*/locati" - + "ons/*/knowledgeBases/*}/documents:\010docum" - + "entZD\"8/v2/{parent=projects/*/agent/know" - + "ledgeBases/*}/documents:\010document\332A\017pare" - + "nt,document\312A&\n\010Document\022\032KnowledgeOpera" - + "tionMetadata\022\333\002\n\016DeleteDocument\0221.google" - + ".cloud.dialogflow.v2.DeleteDocumentReque" - + "st\032\035.google.longrunning.Operation\"\366\001\202\323\344\223" - + "\002\262\001*2/v2/{name=projects/*/knowledgeBases" - + "/*/documents/*}Z@*>/v2/{name=projects/*/" - + "locations/*/knowledgeBases/*/documents/*" - + "}Z:*8/v2/{name=projects/*/agent/knowledg" - + "eBases/*/documents/*}\332A\004name\312A3\n\025google." - + "protobuf.Empty\022\032KnowledgeOperationMetada" - + "ta\022\227\003\n\016UpdateDocument\0221.google.cloud.dia" - + "logflow.v2.UpdateDocumentRequest\032\035.googl" - + "e.longrunning.Operation\"\262\002\202\323\344\223\002\353\0012;/v2/{" - + "document.name=projects/*/knowledgeBases/" - + "*/documents/*}:\010documentZS2G/v2/{documen" - + "t.name=projects/*/locations/*/knowledgeB" - + "ases/*/documents/*}:\010documentZM2A/v2/{do" - + "cument.name=projects/*/agent/knowledgeBa" - + "ses/*/documents/*}:\010document\332A\024document," - + "update_mask\312A&\n\010Document\022\032KnowledgeOpera" - + "tionMetadata\022\370\002\n\016ReloadDocument\0221.google" - + ".cloud.dialogflow.v2.ReloadDocumentReque" - + "st\032\035.google.longrunning.Operation\"\223\002\202\323\344\223" - + "\002\320\001\"9/v2/{name=projects/*/knowledgeBases" - + "/*/documents/*}:reload:\001*ZJ\"E/v2/{name=p" + + "ment\022\032\n\013content_uri\030\003 \001(\tB\003\340A\001H\000\022\'\n\032impo" + + "rt_gcs_custom_metadata\030\004 \001(\010B\003\340A\001\022+\n\036sma" + + "rt_messaging_partial_update\030\005 \001(\010B\003\340A\001B\010" + + "\n\006source\"\354\001\n\025ExportDocumentRequest\0228\n\004na" + + "me\030\001 \001(\tB*\340A\002\372A$\n\"dialogflow.googleapis." + + "com/Document\022E\n\017gcs_destination\030\002 \001(\0132*." + + "google.cloud.dialogflow.v2.GcsDestinatio" + + "nH\000\022\033\n\023export_full_content\030\003 \001(\010\022&\n\036smar" + + "t_messaging_partial_update\030\005 \001(\010B\r\n\013dest" + + "ination\"\262\001\n\032KnowledgeOperationMetadata\022P" + + "\n\005state\030\001 \001(\0162<.google.cloud.dialogflow." + + "v2.KnowledgeOperationMetadata.StateB\003\340A\003" + + "\"B\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\013\n\007PEND" + + "ING\020\001\022\013\n\007RUNNING\020\002\022\010\n\004DONE\020\0032\371\023\n\tDocumen" + + "ts\022\271\002\n\rListDocuments\0220.google.cloud.dial" + + "ogflow.v2.ListDocumentsRequest\0321.google." + + "cloud.dialogflow.v2.ListDocumentsRespons" + + "e\"\302\001\202\323\344\223\002\262\001\0222/v2/{parent=projects/*/know" + + "ledgeBases/*}/documentsZ@\022>/v2/{parent=p" + + "rojects/*/locations/*/knowledgeBases/*}/" + + "documentsZ:\0228/v2/{parent=projects/*/agen" + + "t/knowledgeBases/*}/documents\332A\006parent\022\246" + + "\002\n\013GetDocument\022..google.cloud.dialogflow" + + ".v2.GetDocumentRequest\032$.google.cloud.di" + + "alogflow.v2.Document\"\300\001\202\323\344\223\002\262\001\0222/v2/{nam" + + "e=projects/*/knowledgeBases/*/documents/" + + "*}Z@\022>/v2/{name=projects/*/locations/*/k" + + "nowledgeBases/*/documents/*}Z:\0228/v2/{nam" + + "e=projects/*/agent/knowledgeBases/*/docu" + + "ments/*}\332A\004name\022\367\002\n\016CreateDocument\0221.goo" + + "gle.cloud.dialogflow.v2.CreateDocumentRe" + + "quest\032\035.google.longrunning.Operation\"\222\002\202" + + "\323\344\223\002\320\001\"2/v2/{parent=projects/*/knowledge" + + "Bases/*}/documents:\010documentZJ\">/v2/{par" + + "ent=projects/*/locations/*/knowledgeBase" + + "s/*}/documents:\010documentZD\"8/v2/{parent=" + + "projects/*/agent/knowledgeBases/*}/docum" + + "ents:\010document\332A\017parent,document\312A&\n\010Doc" + + "ument\022\032KnowledgeOperationMetadata\022\333\002\n\016De" + + "leteDocument\0221.google.cloud.dialogflow.v" + + "2.DeleteDocumentRequest\032\035.google.longrun" + + "ning.Operation\"\366\001\202\323\344\223\002\262\001*2/v2/{name=proj" + + "ects/*/knowledgeBases/*/documents/*}Z@*>" + + "/v2/{name=projects/*/locations/*/knowled" + + "geBases/*/documents/*}Z:*8/v2/{name=proj" + + "ects/*/agent/knowledgeBases/*/documents/" + + "*}\332A\004name\312A3\n\025google.protobuf.Empty\022\032Kno" + + "wledgeOperationMetadata\022\227\003\n\016UpdateDocume" + + "nt\0221.google.cloud.dialogflow.v2.UpdateDo" + + "cumentRequest\032\035.google.longrunning.Opera" + + "tion\"\262\002\202\323\344\223\002\353\0012;/v2/{document.name=proje" + + "cts/*/knowledgeBases/*/documents/*}:\010doc" + + "umentZS2G/v2/{document.name=projects/*/l" + + "ocations/*/knowledgeBases/*/documents/*}" + + ":\010documentZM2A/v2/{document.name=project" + + "s/*/agent/knowledgeBases/*/documents/*}:" + + "\010document\332A\024document,update_mask\312A&\n\010Doc" + + "ument\022\032KnowledgeOperationMetadata\022\370\002\n\016Re" + + "loadDocument\0221.google.cloud.dialogflow.v" + + "2.ReloadDocumentRequest\032\035.google.longrun" + + "ning.Operation\"\223\002\202\323\344\223\002\320\001\"9/v2/{name=proj" + + "ects/*/knowledgeBases/*/documents/*}:rel" + + "oad:\001*ZJ\"E/v2/{name=projects/*/locations" + + "/*/knowledgeBases/*/documents/*}:reload:" + + "\001*ZD\"?/v2/{name=projects/*/agent/knowled" + + "geBases/*/documents/*}:reload:\001*\332A\020name," + + "content_uri\312A&\n\010Document\022\032KnowledgeOpera" + + "tionMetadata\022\237\002\n\016ExportDocument\0221.google" + + ".cloud.dialogflow.v2.ExportDocumentReque" + + "st\032\035.google.longrunning.Operation\"\272\001\202\323\344\223" + + "\002\212\001\"9/v2/{name=projects/*/knowledgeBases" + + "/*/documents/*}:export:\001*ZJ\"E/v2/{name=p" + "rojects/*/locations/*/knowledgeBases/*/d" - + "ocuments/*}:reload:\001*ZD\"?/v2/{name=proje" - + "cts/*/agent/knowledgeBases/*/documents/*" - + "}:reload:\001*\332A\020name,content_uri\312A&\n\010Docum" - + "ent\022\032KnowledgeOperationMetadata\032x\312A\031dial" - + "ogflow.googleapis.com\322AYhttps://www.goog" - + "leapis.com/auth/cloud-platform,https://w" - + "ww.googleapis.com/auth/dialogflowB\234\001\n\036co" - + "m.google.cloud.dialogflow.v2B\rDocumentPr" - + "otoP\001ZDgoogle.golang.org/genproto/google" - + "apis/cloud/dialogflow/v2;dialogflow\370\001\001\242\002" - + "\002DF\252\002\032Google.Cloud.Dialogflow.V2b\006proto3" + + "ocuments/*}:export:\001*\312A&\n\010Document\022\032Know" + + "ledgeOperationMetadata\032x\312A\031dialogflow.go" + + "ogleapis.com\322AYhttps://www.googleapis.co" + + "m/auth/cloud-platform,https://www.google" + + "apis.com/auth/dialogflowB\234\001\n\036com.google." + + "cloud.dialogflow.v2B\rDocumentProtoP\001ZDgo" + + "ogle.golang.org/genproto/googleapis/clou" + + "d/dialogflow/v2;dialogflow\370\001\001\242\002\002DF\252\002\032Goo" + + "gle.Cloud.Dialogflow.V2b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -204,6 +225,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ClientProto.getDescriptor(), com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.dialogflow.v2.GcsProto.getDescriptor(), com.google.longrunning.OperationsProto.getDescriptor(), com.google.protobuf.FieldMaskProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), @@ -256,7 +278,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_v2_ListDocumentsRequest_descriptor, new java.lang.String[] { - "Parent", "PageSize", "PageToken", + "Parent", "PageSize", "PageToken", "Filter", }); internal_static_google_cloud_dialogflow_v2_ListDocumentsResponse_descriptor = getDescriptor().getMessageTypes().get(3); @@ -296,10 +318,26 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_v2_ReloadDocumentRequest_descriptor, new java.lang.String[] { - "Name", "ContentUri", "Source", + "Name", + "ContentUri", + "ImportGcsCustomMetadata", + "SmartMessagingPartialUpdate", + "Source", }); - internal_static_google_cloud_dialogflow_v2_KnowledgeOperationMetadata_descriptor = + internal_static_google_cloud_dialogflow_v2_ExportDocumentRequest_descriptor = getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_dialogflow_v2_ExportDocumentRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_v2_ExportDocumentRequest_descriptor, + new java.lang.String[] { + "Name", + "GcsDestination", + "ExportFullContent", + "SmartMessagingPartialUpdate", + "Destination", + }); + internal_static_google_cloud_dialogflow_v2_KnowledgeOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(9); internal_static_google_cloud_dialogflow_v2_KnowledgeOperationMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_v2_KnowledgeOperationMetadata_descriptor, @@ -322,6 +360,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ClientProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.dialogflow.v2.GcsProto.getDescriptor(); com.google.longrunning.OperationsProto.getDescriptor(); com.google.protobuf.FieldMaskProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); diff --git a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ExportDocumentRequest.java b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ExportDocumentRequest.java new file mode 100644 index 000000000..a24bde842 --- /dev/null +++ b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ExportDocumentRequest.java @@ -0,0 +1,1233 @@ +/* + * 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/v2/document.proto + +package com.google.cloud.dialogflow.v2; + +/** + * + * + *
+ * Request message for [Documents.ExportDocument][google.cloud.dialogflow.v2.Documents.ExportDocument].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.v2.ExportDocumentRequest} + */ +public final class ExportDocumentRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.ExportDocumentRequest) + ExportDocumentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExportDocumentRequest.newBuilder() to construct. + private ExportDocumentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExportDocumentRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExportDocumentRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ExportDocumentRequest( + 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(); + + name_ = s; + break; + } + case 18: + { + com.google.cloud.dialogflow.v2.GcsDestination.Builder subBuilder = null; + if (destinationCase_ == 2) { + subBuilder = + ((com.google.cloud.dialogflow.v2.GcsDestination) destination_).toBuilder(); + } + destination_ = + input.readMessage( + com.google.cloud.dialogflow.v2.GcsDestination.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.dialogflow.v2.GcsDestination) destination_); + destination_ = subBuilder.buildPartial(); + } + destinationCase_ = 2; + break; + } + case 24: + { + exportFullContent_ = input.readBool(); + break; + } + case 40: + { + smartMessagingPartialUpdate_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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.v2.DocumentProto + .internal_static_google_cloud_dialogflow_v2_ExportDocumentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2.DocumentProto + .internal_static_google_cloud_dialogflow_v2_ExportDocumentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2.ExportDocumentRequest.class, + com.google.cloud.dialogflow.v2.ExportDocumentRequest.Builder.class); + } + + private int destinationCase_ = 0; + private java.lang.Object destination_; + + public enum DestinationCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GCS_DESTINATION(2), + DESTINATION_NOT_SET(0); + private final int value; + + private DestinationCase(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 DestinationCase valueOf(int value) { + return forNumber(value); + } + + public static DestinationCase forNumber(int value) { + switch (value) { + case 2: + return GCS_DESTINATION; + case 0: + return DESTINATION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public DestinationCase getDestinationCase() { + return DestinationCase.forNumber(destinationCase_); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the document to export.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the document to export.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GCS_DESTINATION_FIELD_NUMBER = 2; + /** + * + * + *
+   * Cloud Storage file path to export the document.
+   * 
+ * + * .google.cloud.dialogflow.v2.GcsDestination gcs_destination = 2; + * + * @return Whether the gcsDestination field is set. + */ + @java.lang.Override + public boolean hasGcsDestination() { + return destinationCase_ == 2; + } + /** + * + * + *
+   * Cloud Storage file path to export the document.
+   * 
+ * + * .google.cloud.dialogflow.v2.GcsDestination gcs_destination = 2; + * + * @return The gcsDestination. + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2.GcsDestination getGcsDestination() { + if (destinationCase_ == 2) { + return (com.google.cloud.dialogflow.v2.GcsDestination) destination_; + } + return com.google.cloud.dialogflow.v2.GcsDestination.getDefaultInstance(); + } + /** + * + * + *
+   * Cloud Storage file path to export the document.
+   * 
+ * + * .google.cloud.dialogflow.v2.GcsDestination gcs_destination = 2; + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { + if (destinationCase_ == 2) { + return (com.google.cloud.dialogflow.v2.GcsDestination) destination_; + } + return com.google.cloud.dialogflow.v2.GcsDestination.getDefaultInstance(); + } + + public static final int EXPORT_FULL_CONTENT_FIELD_NUMBER = 3; + private boolean exportFullContent_; + /** + * + * + *
+   * When enabled, export the full content of the document including empirical
+   * probability.
+   * 
+ * + * bool export_full_content = 3; + * + * @return The exportFullContent. + */ + @java.lang.Override + public boolean getExportFullContent() { + return exportFullContent_; + } + + public static final int SMART_MESSAGING_PARTIAL_UPDATE_FIELD_NUMBER = 5; + private boolean smartMessagingPartialUpdate_; + /** + * + * + *
+   * When enabled, export the smart messaging allowlist document for partial
+   * update.
+   * 
+ * + * bool smart_messaging_partial_update = 5; + * + * @return The smartMessagingPartialUpdate. + */ + @java.lang.Override + public boolean getSmartMessagingPartialUpdate() { + return smartMessagingPartialUpdate_; + } + + 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(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (destinationCase_ == 2) { + output.writeMessage(2, (com.google.cloud.dialogflow.v2.GcsDestination) destination_); + } + if (exportFullContent_ != false) { + output.writeBool(3, exportFullContent_); + } + if (smartMessagingPartialUpdate_ != false) { + output.writeBool(5, smartMessagingPartialUpdate_); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (destinationCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.dialogflow.v2.GcsDestination) destination_); + } + if (exportFullContent_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, exportFullContent_); + } + if (smartMessagingPartialUpdate_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(5, smartMessagingPartialUpdate_); + } + 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.v2.ExportDocumentRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.v2.ExportDocumentRequest other = + (com.google.cloud.dialogflow.v2.ExportDocumentRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (getExportFullContent() != other.getExportFullContent()) return false; + if (getSmartMessagingPartialUpdate() != other.getSmartMessagingPartialUpdate()) return false; + if (!getDestinationCase().equals(other.getDestinationCase())) return false; + switch (destinationCase_) { + case 2: + if (!getGcsDestination().equals(other.getGcsDestination())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + EXPORT_FULL_CONTENT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getExportFullContent()); + hash = (37 * hash) + SMART_MESSAGING_PARTIAL_UPDATE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSmartMessagingPartialUpdate()); + switch (destinationCase_) { + case 2: + hash = (37 * hash) + GCS_DESTINATION_FIELD_NUMBER; + hash = (53 * hash) + getGcsDestination().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.v2.ExportDocumentRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2.ExportDocumentRequest 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.v2.ExportDocumentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2.ExportDocumentRequest 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.v2.ExportDocumentRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2.ExportDocumentRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2.ExportDocumentRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2.ExportDocumentRequest 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.v2.ExportDocumentRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2.ExportDocumentRequest 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.v2.ExportDocumentRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2.ExportDocumentRequest 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.v2.ExportDocumentRequest 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; + } + /** + * + * + *
+   * Request message for [Documents.ExportDocument][google.cloud.dialogflow.v2.Documents.ExportDocument].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.v2.ExportDocumentRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.ExportDocumentRequest) + com.google.cloud.dialogflow.v2.ExportDocumentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2.DocumentProto + .internal_static_google_cloud_dialogflow_v2_ExportDocumentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2.DocumentProto + .internal_static_google_cloud_dialogflow_v2_ExportDocumentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2.ExportDocumentRequest.class, + com.google.cloud.dialogflow.v2.ExportDocumentRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.v2.ExportDocumentRequest.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(); + name_ = ""; + + exportFullContent_ = false; + + smartMessagingPartialUpdate_ = false; + + destinationCase_ = 0; + destination_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.v2.DocumentProto + .internal_static_google_cloud_dialogflow_v2_ExportDocumentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2.ExportDocumentRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.v2.ExportDocumentRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2.ExportDocumentRequest build() { + com.google.cloud.dialogflow.v2.ExportDocumentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2.ExportDocumentRequest buildPartial() { + com.google.cloud.dialogflow.v2.ExportDocumentRequest result = + new com.google.cloud.dialogflow.v2.ExportDocumentRequest(this); + result.name_ = name_; + if (destinationCase_ == 2) { + if (gcsDestinationBuilder_ == null) { + result.destination_ = destination_; + } else { + result.destination_ = gcsDestinationBuilder_.build(); + } + } + result.exportFullContent_ = exportFullContent_; + result.smartMessagingPartialUpdate_ = smartMessagingPartialUpdate_; + result.destinationCase_ = destinationCase_; + 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.v2.ExportDocumentRequest) { + return mergeFrom((com.google.cloud.dialogflow.v2.ExportDocumentRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.v2.ExportDocumentRequest other) { + if (other == com.google.cloud.dialogflow.v2.ExportDocumentRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.getExportFullContent() != false) { + setExportFullContent(other.getExportFullContent()); + } + if (other.getSmartMessagingPartialUpdate() != false) { + setSmartMessagingPartialUpdate(other.getSmartMessagingPartialUpdate()); + } + switch (other.getDestinationCase()) { + case GCS_DESTINATION: + { + mergeGcsDestination(other.getGcsDestination()); + break; + } + case DESTINATION_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.v2.ExportDocumentRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.v2.ExportDocumentRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int destinationCase_ = 0; + private java.lang.Object destination_; + + public DestinationCase getDestinationCase() { + return DestinationCase.forNumber(destinationCase_); + } + + public Builder clearDestination() { + destinationCase_ = 0; + destination_ = null; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the document to export.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the document to export.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the document to export.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the document to export.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the document to export.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2.GcsDestination, + com.google.cloud.dialogflow.v2.GcsDestination.Builder, + com.google.cloud.dialogflow.v2.GcsDestinationOrBuilder> + gcsDestinationBuilder_; + /** + * + * + *
+     * Cloud Storage file path to export the document.
+     * 
+ * + * .google.cloud.dialogflow.v2.GcsDestination gcs_destination = 2; + * + * @return Whether the gcsDestination field is set. + */ + @java.lang.Override + public boolean hasGcsDestination() { + return destinationCase_ == 2; + } + /** + * + * + *
+     * Cloud Storage file path to export the document.
+     * 
+ * + * .google.cloud.dialogflow.v2.GcsDestination gcs_destination = 2; + * + * @return The gcsDestination. + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2.GcsDestination getGcsDestination() { + if (gcsDestinationBuilder_ == null) { + if (destinationCase_ == 2) { + return (com.google.cloud.dialogflow.v2.GcsDestination) destination_; + } + return com.google.cloud.dialogflow.v2.GcsDestination.getDefaultInstance(); + } else { + if (destinationCase_ == 2) { + return gcsDestinationBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.v2.GcsDestination.getDefaultInstance(); + } + } + /** + * + * + *
+     * Cloud Storage file path to export the document.
+     * 
+ * + * .google.cloud.dialogflow.v2.GcsDestination gcs_destination = 2; + */ + public Builder setGcsDestination(com.google.cloud.dialogflow.v2.GcsDestination value) { + if (gcsDestinationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + destination_ = value; + onChanged(); + } else { + gcsDestinationBuilder_.setMessage(value); + } + destinationCase_ = 2; + return this; + } + /** + * + * + *
+     * Cloud Storage file path to export the document.
+     * 
+ * + * .google.cloud.dialogflow.v2.GcsDestination gcs_destination = 2; + */ + public Builder setGcsDestination( + com.google.cloud.dialogflow.v2.GcsDestination.Builder builderForValue) { + if (gcsDestinationBuilder_ == null) { + destination_ = builderForValue.build(); + onChanged(); + } else { + gcsDestinationBuilder_.setMessage(builderForValue.build()); + } + destinationCase_ = 2; + return this; + } + /** + * + * + *
+     * Cloud Storage file path to export the document.
+     * 
+ * + * .google.cloud.dialogflow.v2.GcsDestination gcs_destination = 2; + */ + public Builder mergeGcsDestination(com.google.cloud.dialogflow.v2.GcsDestination value) { + if (gcsDestinationBuilder_ == null) { + if (destinationCase_ == 2 + && destination_ != com.google.cloud.dialogflow.v2.GcsDestination.getDefaultInstance()) { + destination_ = + com.google.cloud.dialogflow.v2.GcsDestination.newBuilder( + (com.google.cloud.dialogflow.v2.GcsDestination) destination_) + .mergeFrom(value) + .buildPartial(); + } else { + destination_ = value; + } + onChanged(); + } else { + if (destinationCase_ == 2) { + gcsDestinationBuilder_.mergeFrom(value); + } + gcsDestinationBuilder_.setMessage(value); + } + destinationCase_ = 2; + return this; + } + /** + * + * + *
+     * Cloud Storage file path to export the document.
+     * 
+ * + * .google.cloud.dialogflow.v2.GcsDestination gcs_destination = 2; + */ + public Builder clearGcsDestination() { + if (gcsDestinationBuilder_ == null) { + if (destinationCase_ == 2) { + destinationCase_ = 0; + destination_ = null; + onChanged(); + } + } else { + if (destinationCase_ == 2) { + destinationCase_ = 0; + destination_ = null; + } + gcsDestinationBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Cloud Storage file path to export the document.
+     * 
+ * + * .google.cloud.dialogflow.v2.GcsDestination gcs_destination = 2; + */ + public com.google.cloud.dialogflow.v2.GcsDestination.Builder getGcsDestinationBuilder() { + return getGcsDestinationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Cloud Storage file path to export the document.
+     * 
+ * + * .google.cloud.dialogflow.v2.GcsDestination gcs_destination = 2; + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { + if ((destinationCase_ == 2) && (gcsDestinationBuilder_ != null)) { + return gcsDestinationBuilder_.getMessageOrBuilder(); + } else { + if (destinationCase_ == 2) { + return (com.google.cloud.dialogflow.v2.GcsDestination) destination_; + } + return com.google.cloud.dialogflow.v2.GcsDestination.getDefaultInstance(); + } + } + /** + * + * + *
+     * Cloud Storage file path to export the document.
+     * 
+ * + * .google.cloud.dialogflow.v2.GcsDestination gcs_destination = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2.GcsDestination, + com.google.cloud.dialogflow.v2.GcsDestination.Builder, + com.google.cloud.dialogflow.v2.GcsDestinationOrBuilder> + getGcsDestinationFieldBuilder() { + if (gcsDestinationBuilder_ == null) { + if (!(destinationCase_ == 2)) { + destination_ = com.google.cloud.dialogflow.v2.GcsDestination.getDefaultInstance(); + } + gcsDestinationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2.GcsDestination, + com.google.cloud.dialogflow.v2.GcsDestination.Builder, + com.google.cloud.dialogflow.v2.GcsDestinationOrBuilder>( + (com.google.cloud.dialogflow.v2.GcsDestination) destination_, + getParentForChildren(), + isClean()); + destination_ = null; + } + destinationCase_ = 2; + onChanged(); + ; + return gcsDestinationBuilder_; + } + + private boolean exportFullContent_; + /** + * + * + *
+     * When enabled, export the full content of the document including empirical
+     * probability.
+     * 
+ * + * bool export_full_content = 3; + * + * @return The exportFullContent. + */ + @java.lang.Override + public boolean getExportFullContent() { + return exportFullContent_; + } + /** + * + * + *
+     * When enabled, export the full content of the document including empirical
+     * probability.
+     * 
+ * + * bool export_full_content = 3; + * + * @param value The exportFullContent to set. + * @return This builder for chaining. + */ + public Builder setExportFullContent(boolean value) { + + exportFullContent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * When enabled, export the full content of the document including empirical
+     * probability.
+     * 
+ * + * bool export_full_content = 3; + * + * @return This builder for chaining. + */ + public Builder clearExportFullContent() { + + exportFullContent_ = false; + onChanged(); + return this; + } + + private boolean smartMessagingPartialUpdate_; + /** + * + * + *
+     * When enabled, export the smart messaging allowlist document for partial
+     * update.
+     * 
+ * + * bool smart_messaging_partial_update = 5; + * + * @return The smartMessagingPartialUpdate. + */ + @java.lang.Override + public boolean getSmartMessagingPartialUpdate() { + return smartMessagingPartialUpdate_; + } + /** + * + * + *
+     * When enabled, export the smart messaging allowlist document for partial
+     * update.
+     * 
+ * + * bool smart_messaging_partial_update = 5; + * + * @param value The smartMessagingPartialUpdate to set. + * @return This builder for chaining. + */ + public Builder setSmartMessagingPartialUpdate(boolean value) { + + smartMessagingPartialUpdate_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * When enabled, export the smart messaging allowlist document for partial
+     * update.
+     * 
+ * + * bool smart_messaging_partial_update = 5; + * + * @return This builder for chaining. + */ + public Builder clearSmartMessagingPartialUpdate() { + + smartMessagingPartialUpdate_ = 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.v2.ExportDocumentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.ExportDocumentRequest) + private static final com.google.cloud.dialogflow.v2.ExportDocumentRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.ExportDocumentRequest(); + } + + public static com.google.cloud.dialogflow.v2.ExportDocumentRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExportDocumentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExportDocumentRequest(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.v2.ExportDocumentRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ExportDocumentRequestOrBuilder.java b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ExportDocumentRequestOrBuilder.java new file mode 100644 index 000000000..fc8e25f0c --- /dev/null +++ b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ExportDocumentRequestOrBuilder.java @@ -0,0 +1,123 @@ +/* + * 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/v2/document.proto + +package com.google.cloud.dialogflow.v2; + +public interface ExportDocumentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.ExportDocumentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the document to export.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the document to export.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Cloud Storage file path to export the document.
+   * 
+ * + * .google.cloud.dialogflow.v2.GcsDestination gcs_destination = 2; + * + * @return Whether the gcsDestination field is set. + */ + boolean hasGcsDestination(); + /** + * + * + *
+   * Cloud Storage file path to export the document.
+   * 
+ * + * .google.cloud.dialogflow.v2.GcsDestination gcs_destination = 2; + * + * @return The gcsDestination. + */ + com.google.cloud.dialogflow.v2.GcsDestination getGcsDestination(); + /** + * + * + *
+   * Cloud Storage file path to export the document.
+   * 
+ * + * .google.cloud.dialogflow.v2.GcsDestination gcs_destination = 2; + */ + com.google.cloud.dialogflow.v2.GcsDestinationOrBuilder getGcsDestinationOrBuilder(); + + /** + * + * + *
+   * When enabled, export the full content of the document including empirical
+   * probability.
+   * 
+ * + * bool export_full_content = 3; + * + * @return The exportFullContent. + */ + boolean getExportFullContent(); + + /** + * + * + *
+   * When enabled, export the smart messaging allowlist document for partial
+   * update.
+   * 
+ * + * bool smart_messaging_partial_update = 5; + * + * @return The smartMessagingPartialUpdate. + */ + boolean getSmartMessagingPartialUpdate(); + + public com.google.cloud.dialogflow.v2.ExportDocumentRequest.DestinationCase getDestinationCase(); +} diff --git a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/GcsDestination.java b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/GcsDestination.java new file mode 100644 index 000000000..e716e2c2f --- /dev/null +++ b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/GcsDestination.java @@ -0,0 +1,662 @@ +/* + * 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/v2/gcs.proto + +package com.google.cloud.dialogflow.v2; + +/** + * + * + *
+ * Google Cloud Storage location for the output.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.v2.GcsDestination} + */ +public final class GcsDestination extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.GcsDestination) + GcsDestinationOrBuilder { + private static final long serialVersionUID = 0L; + // Use GcsDestination.newBuilder() to construct. + private GcsDestination(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GcsDestination() { + uri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GcsDestination(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GcsDestination( + 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(); + + uri_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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.v2.GcsProto + .internal_static_google_cloud_dialogflow_v2_GcsDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2.GcsProto + .internal_static_google_cloud_dialogflow_v2_GcsDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2.GcsDestination.class, + com.google.cloud.dialogflow.v2.GcsDestination.Builder.class); + } + + public static final int URI_FIELD_NUMBER = 1; + private volatile java.lang.Object uri_; + /** + * + * + *
+   * The Google Cloud Storage URIs for the output. A URI is of the
+   * form:
+   *   gs://bucket/object-prefix-or-name
+   * Whether a prefix or name is used depends on the use case. The requesting
+   * user must have "write-permission" to the bucket.
+   * 
+ * + * string uri = 1; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + 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(); + uri_ = s; + return s; + } + } + /** + * + * + *
+   * The Google Cloud Storage URIs for the output. A URI is of the
+   * form:
+   *   gs://bucket/object-prefix-or-name
+   * Whether a prefix or name is used depends on the use case. The requesting
+   * user must have "write-permission" to the bucket.
+   * 
+ * + * string uri = 1; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = 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(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); + } + 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(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); + } + 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.v2.GcsDestination)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.v2.GcsDestination other = + (com.google.cloud.dialogflow.v2.GcsDestination) obj; + + if (!getUri().equals(other.getUri())) 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) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.v2.GcsDestination parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2.GcsDestination 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.v2.GcsDestination parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2.GcsDestination 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.v2.GcsDestination parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2.GcsDestination parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2.GcsDestination parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2.GcsDestination 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.v2.GcsDestination parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2.GcsDestination 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.v2.GcsDestination parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2.GcsDestination 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.v2.GcsDestination 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; + } + /** + * + * + *
+   * Google Cloud Storage location for the output.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.v2.GcsDestination} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.GcsDestination) + com.google.cloud.dialogflow.v2.GcsDestinationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2.GcsProto + .internal_static_google_cloud_dialogflow_v2_GcsDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2.GcsProto + .internal_static_google_cloud_dialogflow_v2_GcsDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2.GcsDestination.class, + com.google.cloud.dialogflow.v2.GcsDestination.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.v2.GcsDestination.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(); + uri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.v2.GcsProto + .internal_static_google_cloud_dialogflow_v2_GcsDestination_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2.GcsDestination getDefaultInstanceForType() { + return com.google.cloud.dialogflow.v2.GcsDestination.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2.GcsDestination build() { + com.google.cloud.dialogflow.v2.GcsDestination result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2.GcsDestination buildPartial() { + com.google.cloud.dialogflow.v2.GcsDestination result = + new com.google.cloud.dialogflow.v2.GcsDestination(this); + result.uri_ = uri_; + 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.v2.GcsDestination) { + return mergeFrom((com.google.cloud.dialogflow.v2.GcsDestination) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.v2.GcsDestination other) { + if (other == com.google.cloud.dialogflow.v2.GcsDestination.getDefaultInstance()) return this; + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + 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.v2.GcsDestination parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.dialogflow.v2.GcsDestination) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object uri_ = ""; + /** + * + * + *
+     * The Google Cloud Storage URIs for the output. A URI is of the
+     * form:
+     *   gs://bucket/object-prefix-or-name
+     * Whether a prefix or name is used depends on the use case. The requesting
+     * user must have "write-permission" to the bucket.
+     * 
+ * + * string uri = 1; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The Google Cloud Storage URIs for the output. A URI is of the
+     * form:
+     *   gs://bucket/object-prefix-or-name
+     * Whether a prefix or name is used depends on the use case. The requesting
+     * user must have "write-permission" to the bucket.
+     * 
+ * + * string uri = 1; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The Google Cloud Storage URIs for the output. A URI is of the
+     * form:
+     *   gs://bucket/object-prefix-or-name
+     * Whether a prefix or name is used depends on the use case. The requesting
+     * user must have "write-permission" to the bucket.
+     * 
+ * + * string uri = 1; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The Google Cloud Storage URIs for the output. A URI is of the
+     * form:
+     *   gs://bucket/object-prefix-or-name
+     * Whether a prefix or name is used depends on the use case. The requesting
+     * user must have "write-permission" to the bucket.
+     * 
+ * + * string uri = 1; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + + uri_ = getDefaultInstance().getUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * The Google Cloud Storage URIs for the output. A URI is of the
+     * form:
+     *   gs://bucket/object-prefix-or-name
+     * Whether a prefix or name is used depends on the use case. The requesting
+     * user must have "write-permission" to the bucket.
+     * 
+ * + * string uri = 1; + * + * @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); + + uri_ = 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.v2.GcsDestination) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.GcsDestination) + private static final com.google.cloud.dialogflow.v2.GcsDestination DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.GcsDestination(); + } + + public static com.google.cloud.dialogflow.v2.GcsDestination getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GcsDestination parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GcsDestination(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.v2.GcsDestination getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/GcsDestinationOrBuilder.java b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/GcsDestinationOrBuilder.java new file mode 100644 index 000000000..5278758cd --- /dev/null +++ b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/GcsDestinationOrBuilder.java @@ -0,0 +1,58 @@ +/* + * 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/v2/gcs.proto + +package com.google.cloud.dialogflow.v2; + +public interface GcsDestinationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.GcsDestination) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The Google Cloud Storage URIs for the output. A URI is of the
+   * form:
+   *   gs://bucket/object-prefix-or-name
+   * Whether a prefix or name is used depends on the use case. The requesting
+   * user must have "write-permission" to the bucket.
+   * 
+ * + * string uri = 1; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+   * The Google Cloud Storage URIs for the output. A URI is of the
+   * form:
+   *   gs://bucket/object-prefix-or-name
+   * Whether a prefix or name is used depends on the use case. The requesting
+   * user must have "write-permission" to the bucket.
+   * 
+ * + * string uri = 1; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); +} diff --git a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/GcsProto.java b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/GcsProto.java index b2d9467e4..4cf11bf04 100644 --- a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/GcsProto.java +++ b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/GcsProto.java @@ -27,6 +27,11 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_v2_GcsDestination_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_v2_GcsDestination_fieldAccessorTable; + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; } @@ -38,11 +43,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "\n$google/cloud/dialogflow/v2/gcs.proto\022\032" + "google.cloud.dialogflow.v2\032\037google/api/f" + "ield_behavior.proto\032\034google/api/annotati" - + "ons.protoB\227\001\n\036com.google.cloud.dialogflo" - + "w.v2B\010GcsProtoP\001ZDgoogle.golang.org/genp" - + "roto/googleapis/cloud/dialogflow/v2;dial" - + "ogflow\370\001\001\242\002\002DF\252\002\032Google.Cloud.Dialogflow" - + ".V2b\006proto3" + + "ons.proto\"\035\n\016GcsDestination\022\013\n\003uri\030\001 \001(\t" + + "B\227\001\n\036com.google.cloud.dialogflow.v2B\010Gcs" + + "ProtoP\001ZDgoogle.golang.org/genproto/goog" + + "leapis/cloud/dialogflow/v2;dialogflow\370\001\001" + + "\242\002\002DF\252\002\032Google.Cloud.Dialogflow.V2b\006prot" + + "o3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -51,6 +57,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.AnnotationsProto.getDescriptor(), }); + internal_static_google_cloud_dialogflow_v2_GcsDestination_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_dialogflow_v2_GcsDestination_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_v2_GcsDestination_descriptor, + new java.lang.String[] { + "Uri", + }); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.AnnotationsProto.getDescriptor(); } diff --git a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/KnowledgeBaseProto.java b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/KnowledgeBaseProto.java index 45438ca5d..a41a62cea 100644 --- a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/KnowledgeBaseProto.java +++ b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/KnowledgeBaseProto.java @@ -76,74 +76,75 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "gleapis.com/KnowledgeBase\0222projects/{pro" + "ject}/knowledgeBases/{knowledge_base}\022Gp" + "rojects/{project}/locations/{location}/k" - + "nowledgeBases/{knowledge_base}\"\203\001\n\031ListK" + + "nowledgeBases/{knowledge_base}\"\223\001\n\031ListK" + "nowledgeBasesRequest\022?\n\006parent\030\001 \001(\tB/\340A" + "\002\372A)\022\'dialogflow.googleapis.com/Knowledg" + "eBase\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003" - + " \001(\t\"y\n\032ListKnowledgeBasesResponse\022B\n\017kn" - + "owledge_bases\030\001 \003(\0132).google.cloud.dialo" - + "gflow.v2.KnowledgeBase\022\027\n\017next_page_toke" - + "n\030\002 \001(\t\"X\n\027GetKnowledgeBaseRequest\022=\n\004na" - + "me\030\001 \001(\tB/\340A\002\372A)\n\'dialogflow.googleapis." - + "com/KnowledgeBase\"\245\001\n\032CreateKnowledgeBas" - + "eRequest\022?\n\006parent\030\001 \001(\tB/\340A\002\372A)\022\'dialog" - + "flow.googleapis.com/KnowledgeBase\022F\n\016kno" - + "wledge_base\030\002 \001(\0132).google.cloud.dialogf" - + "low.v2.KnowledgeBaseB\003\340A\002\"o\n\032DeleteKnowl" - + "edgeBaseRequest\022=\n\004name\030\001 \001(\tB/\340A\002\372A)\n\'d" - + "ialogflow.googleapis.com/KnowledgeBase\022\022" - + "\n\005force\030\002 \001(\010B\003\340A\001\"\232\001\n\032UpdateKnowledgeBa" - + "seRequest\022F\n\016knowledge_base\030\001 \001(\0132).goog" + + " \001(\t\022\016\n\006filter\030\004 \001(\t\"y\n\032ListKnowledgeBas" + + "esResponse\022B\n\017knowledge_bases\030\001 \003(\0132).go" + + "ogle.cloud.dialogflow.v2.KnowledgeBase\022\027" + + "\n\017next_page_token\030\002 \001(\t\"X\n\027GetKnowledgeB" + + "aseRequest\022=\n\004name\030\001 \001(\tB/\340A\002\372A)\n\'dialog" + + "flow.googleapis.com/KnowledgeBase\"\245\001\n\032Cr" + + "eateKnowledgeBaseRequest\022?\n\006parent\030\001 \001(\t" + + "B/\340A\002\372A)\022\'dialogflow.googleapis.com/Know" + + "ledgeBase\022F\n\016knowledge_base\030\002 \001(\0132).goog" + "le.cloud.dialogflow.v2.KnowledgeBaseB\003\340A" - + "\002\0224\n\013update_mask\030\002 \001(\0132\032.google.protobuf" - + ".FieldMaskB\003\340A\0012\264\r\n\016KnowledgeBases\022\244\002\n\022L" - + "istKnowledgeBases\0225.google.cloud.dialogf" - + "low.v2.ListKnowledgeBasesRequest\0326.googl" - + "e.cloud.dialogflow.v2.ListKnowledgeBases" - + "Response\"\236\001\202\323\344\223\002\216\001\022&/v2/{parent=projects" - + "/*}/knowledgeBasesZ4\0222/v2/{parent=projec" - + "ts/*/locations/*}/knowledgeBasesZ.\022,/v2/" - + "{parent=projects/*/agent}/knowledgeBases" - + "\332A\006parent\022\221\002\n\020GetKnowledgeBase\0223.google." - + "cloud.dialogflow.v2.GetKnowledgeBaseRequ" - + "est\032).google.cloud.dialogflow.v2.Knowled" - + "geBase\"\234\001\202\323\344\223\002\216\001\022&/v2/{name=projects/*/k" - + "nowledgeBases/*}Z4\0222/v2/{name=projects/*" - + "/locations/*/knowledgeBases/*}Z.\022,/v2/{n" - + "ame=projects/*/agent/knowledgeBases/*}\332A" - + "\004name\022\330\002\n\023CreateKnowledgeBase\0226.google.c" - + "loud.dialogflow.v2.CreateKnowledgeBaseRe" - + "quest\032).google.cloud.dialogflow.v2.Knowl" - + "edgeBase\"\335\001\202\323\344\223\002\276\001\"&/v2/{parent=projects" - + "/*}/knowledgeBases:\016knowledge_baseZD\"2/v" + + "\002\"o\n\032DeleteKnowledgeBaseRequest\022=\n\004name\030" + + "\001 \001(\tB/\340A\002\372A)\n\'dialogflow.googleapis.com" + + "/KnowledgeBase\022\022\n\005force\030\002 \001(\010B\003\340A\001\"\232\001\n\032U" + + "pdateKnowledgeBaseRequest\022F\n\016knowledge_b" + + "ase\030\001 \001(\0132).google.cloud.dialogflow.v2.K" + + "nowledgeBaseB\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032" + + ".google.protobuf.FieldMaskB\003\340A\0012\264\r\n\016Know" + + "ledgeBases\022\244\002\n\022ListKnowledgeBases\0225.goog" + + "le.cloud.dialogflow.v2.ListKnowledgeBase" + + "sRequest\0326.google.cloud.dialogflow.v2.Li" + + "stKnowledgeBasesResponse\"\236\001\202\323\344\223\002\216\001\022&/v2/" + + "{parent=projects/*}/knowledgeBasesZ4\0222/v" + "2/{parent=projects/*/locations/*}/knowle" - + "dgeBases:\016knowledge_baseZ>\",/v2/{parent=" - + "projects/*/agent}/knowledgeBases:\016knowle" - + "dge_base\332A\025parent,knowledge_base\022\204\002\n\023Del" - + "eteKnowledgeBase\0226.google.cloud.dialogfl" - + "ow.v2.DeleteKnowledgeBaseRequest\032\026.googl" - + "e.protobuf.Empty\"\234\001\202\323\344\223\002\216\001*&/v2/{name=pr" - + "ojects/*/knowledgeBases/*}Z4*2/v2/{name=" - + "projects/*/locations/*/knowledgeBases/*}" - + "Z.*,/v2/{name=projects/*/agent/knowledge" - + "Bases/*}\332A\004name\022\212\003\n\023UpdateKnowledgeBase\022" - + "6.google.cloud.dialogflow.v2.UpdateKnowl" - + "edgeBaseRequest\032).google.cloud.dialogflo" - + "w.v2.KnowledgeBase\"\217\002\202\323\344\223\002\353\00125/v2/{knowl" - + "edge_base.name=projects/*/knowledgeBases" - + "/*}:\016knowledge_baseZS2A/v2/{knowledge_ba" - + "se.name=projects/*/locations/*/knowledge" - + "Bases/*}:\016knowledge_baseZM2;/v2/{knowled" - + "ge_base.name=projects/*/agent/knowledgeB" - + "ases/*}:\016knowledge_base\332A\032knowledge_base" - + ",update_mask\032x\312A\031dialogflow.googleapis.c" - + "om\322AYhttps://www.googleapis.com/auth/clo" - + "ud-platform,https://www.googleapis.com/a" - + "uth/dialogflowB\241\001\n\036com.google.cloud.dial" - + "ogflow.v2B\022KnowledgeBaseProtoP\001ZDgoogle." - + "golang.org/genproto/googleapis/cloud/dia" - + "logflow/v2;dialogflow\370\001\001\242\002\002DF\252\002\032Google.C" - + "loud.Dialogflow.V2b\006proto3" + + "dgeBasesZ.\022,/v2/{parent=projects/*/agent" + + "}/knowledgeBases\332A\006parent\022\221\002\n\020GetKnowled" + + "geBase\0223.google.cloud.dialogflow.v2.GetK" + + "nowledgeBaseRequest\032).google.cloud.dialo" + + "gflow.v2.KnowledgeBase\"\234\001\202\323\344\223\002\216\001\022&/v2/{n" + + "ame=projects/*/knowledgeBases/*}Z4\0222/v2/" + + "{name=projects/*/locations/*/knowledgeBa" + + "ses/*}Z.\022,/v2/{name=projects/*/agent/kno" + + "wledgeBases/*}\332A\004name\022\330\002\n\023CreateKnowledg" + + "eBase\0226.google.cloud.dialogflow.v2.Creat" + + "eKnowledgeBaseRequest\032).google.cloud.dia" + + "logflow.v2.KnowledgeBase\"\335\001\202\323\344\223\002\276\001\"&/v2/" + + "{parent=projects/*}/knowledgeBases:\016know" + + "ledge_baseZD\"2/v2/{parent=projects/*/loc" + + "ations/*}/knowledgeBases:\016knowledge_base" + + "Z>\",/v2/{parent=projects/*/agent}/knowle" + + "dgeBases:\016knowledge_base\332A\025parent,knowle" + + "dge_base\022\204\002\n\023DeleteKnowledgeBase\0226.googl" + + "e.cloud.dialogflow.v2.DeleteKnowledgeBas" + + "eRequest\032\026.google.protobuf.Empty\"\234\001\202\323\344\223\002" + + "\216\001*&/v2/{name=projects/*/knowledgeBases/" + + "*}Z4*2/v2/{name=projects/*/locations/*/k" + + "nowledgeBases/*}Z.*,/v2/{name=projects/*" + + "/agent/knowledgeBases/*}\332A\004name\022\212\003\n\023Upda" + + "teKnowledgeBase\0226.google.cloud.dialogflo" + + "w.v2.UpdateKnowledgeBaseRequest\032).google" + + ".cloud.dialogflow.v2.KnowledgeBase\"\217\002\202\323\344" + + "\223\002\353\00125/v2/{knowledge_base.name=projects/" + + "*/knowledgeBases/*}:\016knowledge_baseZS2A/" + + "v2/{knowledge_base.name=projects/*/locat" + + "ions/*/knowledgeBases/*}:\016knowledge_base" + + "ZM2;/v2/{knowledge_base.name=projects/*/" + + "agent/knowledgeBases/*}:\016knowledge_base\332" + + "A\032knowledge_base,update_mask\032x\312A\031dialogf" + + "low.googleapis.com\322AYhttps://www.googlea" + + "pis.com/auth/cloud-platform,https://www." + + "googleapis.com/auth/dialogflowB\241\001\n\036com.g" + + "oogle.cloud.dialogflow.v2B\022KnowledgeBase" + + "ProtoP\001ZDgoogle.golang.org/genproto/goog" + + "leapis/cloud/dialogflow/v2;dialogflow\370\001\001" + + "\242\002\002DF\252\002\032Google.Cloud.Dialogflow.V2b\006prot" + + "o3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -170,7 +171,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_v2_ListKnowledgeBasesRequest_descriptor, new java.lang.String[] { - "Parent", "PageSize", "PageToken", + "Parent", "PageSize", "PageToken", "Filter", }); internal_static_google_cloud_dialogflow_v2_ListKnowledgeBasesResponse_descriptor = getDescriptor().getMessageTypes().get(2); diff --git a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ListDocumentsRequest.java b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ListDocumentsRequest.java index ced31e87c..608311e8c 100644 --- a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ListDocumentsRequest.java +++ b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ListDocumentsRequest.java @@ -40,6 +40,7 @@ private ListDocumentsRequest(com.google.protobuf.GeneratedMessageV3.Builder b private ListDocumentsRequest() { parent_ = ""; pageToken_ = ""; + filter_ = ""; } @java.lang.Override @@ -90,6 +91,13 @@ private ListDocumentsRequest( pageToken_ = s; break; } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -249,6 +257,83 @@ public com.google.protobuf.ByteString getPageTokenBytes() { } } + public static final int FILTER_FIELD_NUMBER = 4; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * The filter expression used to filter documents returned by the list method.
+   * The expression has the following syntax:
+   *   <field> <operator> <value> [AND <field> <operator> <value>] ...
+   * The following fields and operators are supported:
+   * * knowledge_types with has(:) operator
+   * * display_name with has(:) operator
+   * * state with equals(=) operator
+   * Examples:
+   * * "knowledge_types:FAQ" matches documents with FAQ knowledge type.
+   * * "display_name:customer" matches documents whose display name contains
+   *   "customer".
+   * * "state=ACTIVE" matches documents with ACTIVE state.
+   * * "knowledge_types:FAQ AND state=ACTIVE" matches all active FAQ documents.
+   * For more information about filtering, see
+   * [API Filtering](https://aip.dev/160).
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + 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(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * The filter expression used to filter documents returned by the list method.
+   * The expression has the following syntax:
+   *   <field> <operator> <value> [AND <field> <operator> <value>] ...
+   * The following fields and operators are supported:
+   * * knowledge_types with has(:) operator
+   * * display_name with has(:) operator
+   * * state with equals(=) operator
+   * Examples:
+   * * "knowledge_types:FAQ" matches documents with FAQ knowledge type.
+   * * "display_name:customer" matches documents whose display name contains
+   *   "customer".
+   * * "state=ACTIVE" matches documents with ACTIVE state.
+   * * "knowledge_types:FAQ AND state=ACTIVE" matches all active FAQ documents.
+   * For more information about filtering, see
+   * [API Filtering](https://aip.dev/160).
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -272,6 +357,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } unknownFields.writeTo(output); } @@ -290,6 +378,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -309,6 +400,7 @@ public boolean equals(final java.lang.Object obj) { if (!getParent().equals(other.getParent())) return false; if (getPageSize() != other.getPageSize()) return false; if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -326,6 +418,8 @@ public int hashCode() { hash = (53 * hash) + getPageSize(); hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -477,6 +571,8 @@ public Builder clear() { pageToken_ = ""; + filter_ = ""; + return this; } @@ -507,6 +603,7 @@ public com.google.cloud.dialogflow.v2.ListDocumentsRequest buildPartial() { result.parent_ = parent_; result.pageSize_ = pageSize_; result.pageToken_ = pageToken_; + result.filter_ = filter_; onBuilt(); return result; } @@ -568,6 +665,10 @@ public Builder mergeFrom(com.google.cloud.dialogflow.v2.ListDocumentsRequest oth pageToken_ = other.pageToken_; onChanged(); } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -885,6 +986,182 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * The filter expression used to filter documents returned by the list method.
+     * The expression has the following syntax:
+     *   <field> <operator> <value> [AND <field> <operator> <value>] ...
+     * The following fields and operators are supported:
+     * * knowledge_types with has(:) operator
+     * * display_name with has(:) operator
+     * * state with equals(=) operator
+     * Examples:
+     * * "knowledge_types:FAQ" matches documents with FAQ knowledge type.
+     * * "display_name:customer" matches documents whose display name contains
+     *   "customer".
+     * * "state=ACTIVE" matches documents with ACTIVE state.
+     * * "knowledge_types:FAQ AND state=ACTIVE" matches all active FAQ documents.
+     * For more information about filtering, see
+     * [API Filtering](https://aip.dev/160).
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The filter expression used to filter documents returned by the list method.
+     * The expression has the following syntax:
+     *   <field> <operator> <value> [AND <field> <operator> <value>] ...
+     * The following fields and operators are supported:
+     * * knowledge_types with has(:) operator
+     * * display_name with has(:) operator
+     * * state with equals(=) operator
+     * Examples:
+     * * "knowledge_types:FAQ" matches documents with FAQ knowledge type.
+     * * "display_name:customer" matches documents whose display name contains
+     *   "customer".
+     * * "state=ACTIVE" matches documents with ACTIVE state.
+     * * "knowledge_types:FAQ AND state=ACTIVE" matches all active FAQ documents.
+     * For more information about filtering, see
+     * [API Filtering](https://aip.dev/160).
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The filter expression used to filter documents returned by the list method.
+     * The expression has the following syntax:
+     *   <field> <operator> <value> [AND <field> <operator> <value>] ...
+     * The following fields and operators are supported:
+     * * knowledge_types with has(:) operator
+     * * display_name with has(:) operator
+     * * state with equals(=) operator
+     * Examples:
+     * * "knowledge_types:FAQ" matches documents with FAQ knowledge type.
+     * * "display_name:customer" matches documents whose display name contains
+     *   "customer".
+     * * "state=ACTIVE" matches documents with ACTIVE state.
+     * * "knowledge_types:FAQ AND state=ACTIVE" matches all active FAQ documents.
+     * For more information about filtering, see
+     * [API Filtering](https://aip.dev/160).
+     * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The filter expression used to filter documents returned by the list method.
+     * The expression has the following syntax:
+     *   <field> <operator> <value> [AND <field> <operator> <value>] ...
+     * The following fields and operators are supported:
+     * * knowledge_types with has(:) operator
+     * * display_name with has(:) operator
+     * * state with equals(=) operator
+     * Examples:
+     * * "knowledge_types:FAQ" matches documents with FAQ knowledge type.
+     * * "display_name:customer" matches documents whose display name contains
+     *   "customer".
+     * * "state=ACTIVE" matches documents with ACTIVE state.
+     * * "knowledge_types:FAQ AND state=ACTIVE" matches all active FAQ documents.
+     * For more information about filtering, see
+     * [API Filtering](https://aip.dev/160).
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * The filter expression used to filter documents returned by the list method.
+     * The expression has the following syntax:
+     *   <field> <operator> <value> [AND <field> <operator> <value>] ...
+     * The following fields and operators are supported:
+     * * knowledge_types with has(:) operator
+     * * display_name with has(:) operator
+     * * state with equals(=) operator
+     * Examples:
+     * * "knowledge_types:FAQ" matches documents with FAQ knowledge type.
+     * * "display_name:customer" matches documents whose display name contains
+     *   "customer".
+     * * "state=ACTIVE" matches documents with ACTIVE state.
+     * * "knowledge_types:FAQ AND state=ACTIVE" matches all active FAQ documents.
+     * For more information about filtering, see
+     * [API Filtering](https://aip.dev/160).
+     * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ListDocumentsRequestOrBuilder.java b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ListDocumentsRequestOrBuilder.java index 0a6d99c48..27ebbdb74 100644 --- a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ListDocumentsRequestOrBuilder.java +++ b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ListDocumentsRequestOrBuilder.java @@ -94,4 +94,57 @@ public interface ListDocumentsRequestOrBuilder * @return The bytes for pageToken. */ com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * The filter expression used to filter documents returned by the list method.
+   * The expression has the following syntax:
+   *   <field> <operator> <value> [AND <field> <operator> <value>] ...
+   * The following fields and operators are supported:
+   * * knowledge_types with has(:) operator
+   * * display_name with has(:) operator
+   * * state with equals(=) operator
+   * Examples:
+   * * "knowledge_types:FAQ" matches documents with FAQ knowledge type.
+   * * "display_name:customer" matches documents whose display name contains
+   *   "customer".
+   * * "state=ACTIVE" matches documents with ACTIVE state.
+   * * "knowledge_types:FAQ AND state=ACTIVE" matches all active FAQ documents.
+   * For more information about filtering, see
+   * [API Filtering](https://aip.dev/160).
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * The filter expression used to filter documents returned by the list method.
+   * The expression has the following syntax:
+   *   <field> <operator> <value> [AND <field> <operator> <value>] ...
+   * The following fields and operators are supported:
+   * * knowledge_types with has(:) operator
+   * * display_name with has(:) operator
+   * * state with equals(=) operator
+   * Examples:
+   * * "knowledge_types:FAQ" matches documents with FAQ knowledge type.
+   * * "display_name:customer" matches documents whose display name contains
+   *   "customer".
+   * * "state=ACTIVE" matches documents with ACTIVE state.
+   * * "knowledge_types:FAQ AND state=ACTIVE" matches all active FAQ documents.
+   * For more information about filtering, see
+   * [API Filtering](https://aip.dev/160).
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); } diff --git a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ListKnowledgeBasesRequest.java b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ListKnowledgeBasesRequest.java index 7fd929c31..ab41bf00d 100644 --- a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ListKnowledgeBasesRequest.java +++ b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ListKnowledgeBasesRequest.java @@ -40,6 +40,7 @@ private ListKnowledgeBasesRequest(com.google.protobuf.GeneratedMessageV3.Builder private ListKnowledgeBasesRequest() { parent_ = ""; pageToken_ = ""; + filter_ = ""; } @java.lang.Override @@ -90,6 +91,13 @@ private ListKnowledgeBasesRequest( pageToken_ = s; break; } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -247,6 +255,91 @@ public com.google.protobuf.ByteString getPageTokenBytes() { } } + public static final int FILTER_FIELD_NUMBER = 4; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * The filter expression used to filter knowledge bases returned by the list
+   * method. The expression has the following syntax:
+   *   <field> <operator> <value> [AND <field> <operator> <value>] ...
+   * The following fields and operators are supported:
+   * * display_name with has(:) operator
+   * * language_code with equals(=) operator
+   * Examples:
+   * * 'language_code=en-us' matches knowledge bases with en-us language code.
+   * * 'display_name:articles' matches knowledge bases whose display name
+   *   contains "articles".
+   * * 'display_name:"Best Articles"' matches knowledge bases whose display
+   *   name contains "Best Articles".
+   * * 'language_code=en-gb AND display_name=articles' matches all knowledge
+   *   bases whose display name contains "articles" and whose language code is
+   *   "en-gb".
+   * Note: An empty filter string (i.e. "") is a no-op and will result in no
+   * filtering.
+   * For more information about filtering, see
+   * [API Filtering](https://aip.dev/160).
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + 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(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * The filter expression used to filter knowledge bases returned by the list
+   * method. The expression has the following syntax:
+   *   <field> <operator> <value> [AND <field> <operator> <value>] ...
+   * The following fields and operators are supported:
+   * * display_name with has(:) operator
+   * * language_code with equals(=) operator
+   * Examples:
+   * * 'language_code=en-us' matches knowledge bases with en-us language code.
+   * * 'display_name:articles' matches knowledge bases whose display name
+   *   contains "articles".
+   * * 'display_name:"Best Articles"' matches knowledge bases whose display
+   *   name contains "Best Articles".
+   * * 'language_code=en-gb AND display_name=articles' matches all knowledge
+   *   bases whose display name contains "articles" and whose language code is
+   *   "en-gb".
+   * Note: An empty filter string (i.e. "") is a no-op and will result in no
+   * filtering.
+   * For more information about filtering, see
+   * [API Filtering](https://aip.dev/160).
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -270,6 +363,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } unknownFields.writeTo(output); } @@ -288,6 +384,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -307,6 +406,7 @@ public boolean equals(final java.lang.Object obj) { if (!getParent().equals(other.getParent())) return false; if (getPageSize() != other.getPageSize()) return false; if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -324,6 +424,8 @@ public int hashCode() { hash = (53 * hash) + getPageSize(); hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -476,6 +578,8 @@ public Builder clear() { pageToken_ = ""; + filter_ = ""; + return this; } @@ -506,6 +610,7 @@ public com.google.cloud.dialogflow.v2.ListKnowledgeBasesRequest buildPartial() { result.parent_ = parent_; result.pageSize_ = pageSize_; result.pageToken_ = pageToken_; + result.filter_ = filter_; onBuilt(); return result; } @@ -567,6 +672,10 @@ public Builder mergeFrom(com.google.cloud.dialogflow.v2.ListKnowledgeBasesReques pageToken_ = other.pageToken_; onChanged(); } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -879,6 +988,202 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * The filter expression used to filter knowledge bases returned by the list
+     * method. The expression has the following syntax:
+     *   <field> <operator> <value> [AND <field> <operator> <value>] ...
+     * The following fields and operators are supported:
+     * * display_name with has(:) operator
+     * * language_code with equals(=) operator
+     * Examples:
+     * * 'language_code=en-us' matches knowledge bases with en-us language code.
+     * * 'display_name:articles' matches knowledge bases whose display name
+     *   contains "articles".
+     * * 'display_name:"Best Articles"' matches knowledge bases whose display
+     *   name contains "Best Articles".
+     * * 'language_code=en-gb AND display_name=articles' matches all knowledge
+     *   bases whose display name contains "articles" and whose language code is
+     *   "en-gb".
+     * Note: An empty filter string (i.e. "") is a no-op and will result in no
+     * filtering.
+     * For more information about filtering, see
+     * [API Filtering](https://aip.dev/160).
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The filter expression used to filter knowledge bases returned by the list
+     * method. The expression has the following syntax:
+     *   <field> <operator> <value> [AND <field> <operator> <value>] ...
+     * The following fields and operators are supported:
+     * * display_name with has(:) operator
+     * * language_code with equals(=) operator
+     * Examples:
+     * * 'language_code=en-us' matches knowledge bases with en-us language code.
+     * * 'display_name:articles' matches knowledge bases whose display name
+     *   contains "articles".
+     * * 'display_name:"Best Articles"' matches knowledge bases whose display
+     *   name contains "Best Articles".
+     * * 'language_code=en-gb AND display_name=articles' matches all knowledge
+     *   bases whose display name contains "articles" and whose language code is
+     *   "en-gb".
+     * Note: An empty filter string (i.e. "") is a no-op and will result in no
+     * filtering.
+     * For more information about filtering, see
+     * [API Filtering](https://aip.dev/160).
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The filter expression used to filter knowledge bases returned by the list
+     * method. The expression has the following syntax:
+     *   <field> <operator> <value> [AND <field> <operator> <value>] ...
+     * The following fields and operators are supported:
+     * * display_name with has(:) operator
+     * * language_code with equals(=) operator
+     * Examples:
+     * * 'language_code=en-us' matches knowledge bases with en-us language code.
+     * * 'display_name:articles' matches knowledge bases whose display name
+     *   contains "articles".
+     * * 'display_name:"Best Articles"' matches knowledge bases whose display
+     *   name contains "Best Articles".
+     * * 'language_code=en-gb AND display_name=articles' matches all knowledge
+     *   bases whose display name contains "articles" and whose language code is
+     *   "en-gb".
+     * Note: An empty filter string (i.e. "") is a no-op and will result in no
+     * filtering.
+     * For more information about filtering, see
+     * [API Filtering](https://aip.dev/160).
+     * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The filter expression used to filter knowledge bases returned by the list
+     * method. The expression has the following syntax:
+     *   <field> <operator> <value> [AND <field> <operator> <value>] ...
+     * The following fields and operators are supported:
+     * * display_name with has(:) operator
+     * * language_code with equals(=) operator
+     * Examples:
+     * * 'language_code=en-us' matches knowledge bases with en-us language code.
+     * * 'display_name:articles' matches knowledge bases whose display name
+     *   contains "articles".
+     * * 'display_name:"Best Articles"' matches knowledge bases whose display
+     *   name contains "Best Articles".
+     * * 'language_code=en-gb AND display_name=articles' matches all knowledge
+     *   bases whose display name contains "articles" and whose language code is
+     *   "en-gb".
+     * Note: An empty filter string (i.e. "") is a no-op and will result in no
+     * filtering.
+     * For more information about filtering, see
+     * [API Filtering](https://aip.dev/160).
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * The filter expression used to filter knowledge bases returned by the list
+     * method. The expression has the following syntax:
+     *   <field> <operator> <value> [AND <field> <operator> <value>] ...
+     * The following fields and operators are supported:
+     * * display_name with has(:) operator
+     * * language_code with equals(=) operator
+     * Examples:
+     * * 'language_code=en-us' matches knowledge bases with en-us language code.
+     * * 'display_name:articles' matches knowledge bases whose display name
+     *   contains "articles".
+     * * 'display_name:"Best Articles"' matches knowledge bases whose display
+     *   name contains "Best Articles".
+     * * 'language_code=en-gb AND display_name=articles' matches all knowledge
+     *   bases whose display name contains "articles" and whose language code is
+     *   "en-gb".
+     * Note: An empty filter string (i.e. "") is a no-op and will result in no
+     * filtering.
+     * For more information about filtering, see
+     * [API Filtering](https://aip.dev/160).
+     * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ListKnowledgeBasesRequestOrBuilder.java b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ListKnowledgeBasesRequestOrBuilder.java index 4b523de19..2055704f8 100644 --- a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ListKnowledgeBasesRequestOrBuilder.java +++ b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ListKnowledgeBasesRequestOrBuilder.java @@ -92,4 +92,65 @@ public interface ListKnowledgeBasesRequestOrBuilder * @return The bytes for pageToken. */ com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * The filter expression used to filter knowledge bases returned by the list
+   * method. The expression has the following syntax:
+   *   <field> <operator> <value> [AND <field> <operator> <value>] ...
+   * The following fields and operators are supported:
+   * * display_name with has(:) operator
+   * * language_code with equals(=) operator
+   * Examples:
+   * * 'language_code=en-us' matches knowledge bases with en-us language code.
+   * * 'display_name:articles' matches knowledge bases whose display name
+   *   contains "articles".
+   * * 'display_name:"Best Articles"' matches knowledge bases whose display
+   *   name contains "Best Articles".
+   * * 'language_code=en-gb AND display_name=articles' matches all knowledge
+   *   bases whose display name contains "articles" and whose language code is
+   *   "en-gb".
+   * Note: An empty filter string (i.e. "") is a no-op and will result in no
+   * filtering.
+   * For more information about filtering, see
+   * [API Filtering](https://aip.dev/160).
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * The filter expression used to filter knowledge bases returned by the list
+   * method. The expression has the following syntax:
+   *   <field> <operator> <value> [AND <field> <operator> <value>] ...
+   * The following fields and operators are supported:
+   * * display_name with has(:) operator
+   * * language_code with equals(=) operator
+   * Examples:
+   * * 'language_code=en-us' matches knowledge bases with en-us language code.
+   * * 'display_name:articles' matches knowledge bases whose display name
+   *   contains "articles".
+   * * 'display_name:"Best Articles"' matches knowledge bases whose display
+   *   name contains "Best Articles".
+   * * 'language_code=en-gb AND display_name=articles' matches all knowledge
+   *   bases whose display name contains "articles" and whose language code is
+   *   "en-gb".
+   * Note: An empty filter string (i.e. "") is a no-op and will result in no
+   * filtering.
+   * For more information about filtering, see
+   * [API Filtering](https://aip.dev/160).
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); } 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 2d93352b6..7f57a633e 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 @@ -145,204 +145,205 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "le/api/annotations.proto\032\027google/api/cli" + "ent.proto\032\037google/api/field_behavior.pro" + "to\032\031google/api/resource.proto\032-google/cl" - + "oud/dialogflow/v2/audio_config.proto\032(go" - + "ogle/cloud/dialogflow/v2/session.proto\032\031" - + "google/protobuf/any.proto\032\036google/protob" - + "uf/duration.proto\032 google/protobuf/field" - + "_mask.proto\032\034google/protobuf/struct.prot" - + "o\032\037google/protobuf/timestamp.proto\032\027goog" - + "le/rpc/status.proto\"\347\004\n\013Participant\022\021\n\004n" - + "ame\030\001 \001(\tB\003\340A\001\022?\n\004role\030\002 \001(\0162,.google.cl" - + "oud.dialogflow.v2.Participant.RoleB\003\340A\005\022" - + "&\n\031sip_recording_media_label\030\006 \001(\tB\003\340A\001\022" - + "n\n\032documents_metadata_filters\030\010 \003(\0132E.go" - + "ogle.cloud.dialogflow.v2.Participant.Doc" - + "umentsMetadataFiltersEntryB\003\340A\001\032?\n\035Docum" - + "entsMetadataFiltersEntry\022\013\n\003key\030\001 \001(\t\022\r\n" - + "\005value\030\002 \001(\t:\0028\001\"P\n\004Role\022\024\n\020ROLE_UNSPECI" - + "FIED\020\000\022\017\n\013HUMAN_AGENT\020\001\022\023\n\017AUTOMATED_AGE" - + "NT\020\002\022\014\n\010END_USER\020\003:\330\001\352A\324\001\n%dialogflow.go" - + "ogleapis.com/Participant\022Jprojects/{proj" - + "ect}/conversations/{conversation}/partic" - + "ipants/{participant}\022_projects/{project}" - + "/locations/{location}/conversations/{con" - + "versation}/participants/{participant}\"\375\003" - + "\n\007Message\022\014\n\004name\030\001 \001(\t\022\024\n\007content\030\002 \001(\t" - + "B\003\340A\002\022\032\n\rlanguage_code\030\003 \001(\tB\003\340A\001\022\030\n\013par" - + "ticipant\030\004 \001(\tB\003\340A\003\022K\n\020participant_role\030" - + "\005 \001(\0162,.google.cloud.dialogflow.v2.Parti" - + "cipant.RoleB\003\340A\003\0224\n\013create_time\030\006 \001(\0132\032." - + "google.protobuf.TimestampB\003\340A\003\022N\n\022messag" - + "e_annotation\030\007 \001(\0132-.google.cloud.dialog" - + "flow.v2.MessageAnnotationB\003\340A\003:\304\001\352A\300\001\n!d" - + "ialogflow.googleapis.com/Message\022Bprojec" - + "ts/{project}/conversations/{conversation" - + "}/messages/{message}\022Wprojects/{project}" - + "/locations/{location}/conversations/{con" - + "versation}/messages/{message}\"\234\001\n\030Create" - + "ParticipantRequest\022=\n\006parent\030\001 \001(\tB-\340A\002\372" - + "A\'\022%dialogflow.googleapis.com/Participan" - + "t\022A\n\013participant\030\002 \001(\0132\'.google.cloud.di" - + "alogflow.v2.ParticipantB\003\340A\002\"T\n\025GetParti" - + "cipantRequest\022;\n\004name\030\001 \001(\tB-\340A\002\372A\'\n%dia" - + "logflow.googleapis.com/Participant\"\211\001\n\027L" - + "istParticipantsRequest\022=\n\006parent\030\001 \001(\tB-" - + "\340A\002\372A\'\022%dialogflow.googleapis.com/Partic" - + "ipant\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_to" - + "ken\030\003 \001(\tB\003\340A\001\"r\n\030ListParticipantsRespon" - + "se\022=\n\014participants\030\001 \003(\0132\'.google.cloud." - + "dialogflow.v2.Participant\022\027\n\017next_page_t" - + "oken\030\002 \001(\t\"\223\001\n\030UpdateParticipantRequest\022" - + "A\n\013participant\030\001 \001(\0132\'.google.cloud.dial" - + "ogflow.v2.ParticipantB\003\340A\002\0224\n\013update_mas" - + "k\030\002 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\002" - + "\"\322\003\n\025AnalyzeContentRequest\022B\n\013participan" - + "t\030\001 \001(\tB-\340A\002\372A\'\n%dialogflow.googleapis.c" - + "om/Participant\022;\n\ntext_input\030\006 \001(\0132%.goo" - + "gle.cloud.dialogflow.v2.TextInputH\000\022=\n\013e" - + "vent_input\030\010 \001(\0132&.google.cloud.dialogfl" - + "ow.v2.EventInputH\000\022I\n\022reply_audio_config" - + "\030\005 \001(\0132-.google.cloud.dialogflow.v2.Outp" - + "utAudioConfig\022A\n\014query_params\030\t \001(\0132+.go" - + "ogle.cloud.dialogflow.v2.QueryParameters" - + "\022N\n\023assist_query_params\030\016 \001(\01321.google.c" - + "loud.dialogflow.v2.AssistQueryParameters" - + "\022\022\n\nrequest_id\030\013 \001(\tB\007\n\005input\",\n\016DtmfPar" - + "ameters\022\032\n\022accepts_dtmf_input\030\001 \001(\010\"\336\003\n\026" - + "AnalyzeContentResponse\022\022\n\nreply_text\030\001 \001" - + "(\t\022<\n\013reply_audio\030\002 \001(\0132\'.google.cloud.d" - + "ialogflow.v2.OutputAudio\022N\n\025automated_ag" - + "ent_reply\030\003 \001(\0132/.google.cloud.dialogflo" - + "w.v2.AutomatedAgentReply\0224\n\007message\030\005 \001(" - + "\0132#.google.cloud.dialogflow.v2.Message\022T" - + "\n\036human_agent_suggestion_results\030\006 \003(\0132," - + ".google.cloud.dialogflow.v2.SuggestionRe" - + "sult\022Q\n\033end_user_suggestion_results\030\007 \003(" - + "\0132,.google.cloud.dialogflow.v2.Suggestio" - + "nResult\022C\n\017dtmf_parameters\030\t \001(\0132*.googl" - + "e.cloud.dialogflow.v2.DtmfParameters\"\375\001\n" - + "\026SuggestArticlesRequest\022=\n\006parent\030\001 \001(\tB" - + "-\340A\002\372A\'\n%dialogflow.googleapis.com/Parti" - + "cipant\022>\n\016latest_message\030\002 \001(\tB&\372A#\n!dia" - + "logflow.googleapis.com/Message\022\024\n\014contex" - + "t_size\030\003 \001(\005\022N\n\023assist_query_params\030\004 \001(" - + "\01321.google.cloud.dialogflow.v2.AssistQue" - + "ryParameters\"\213\001\n\027SuggestArticlesResponse" - + "\022B\n\017article_answers\030\001 \003(\0132).google.cloud" - + ".dialogflow.v2.ArticleAnswer\022\026\n\016latest_m" - + "essage\030\002 \001(\t\022\024\n\014context_size\030\003 \001(\005\"\377\001\n\030S" - + "uggestFaqAnswersRequest\022=\n\006parent\030\001 \001(\tB" - + "-\340A\002\372A\'\n%dialogflow.googleapis.com/Parti" - + "cipant\022>\n\016latest_message\030\002 \001(\tB&\372A#\n!dia" - + "logflow.googleapis.com/Message\022\024\n\014contex" - + "t_size\030\003 \001(\005\022N\n\023assist_query_params\030\004 \001(" - + "\01321.google.cloud.dialogflow.v2.AssistQue" - + "ryParameters\"\205\001\n\031SuggestFaqAnswersRespon" - + "se\022:\n\013faq_answers\030\001 \003(\0132%.google.cloud.d" - + "ialogflow.v2.FaqAnswer\022\026\n\016latest_message" - + "\030\002 \001(\t\022\024\n\014context_size\030\003 \001(\005\"[\n\013OutputAu" - + "dio\022=\n\006config\030\001 \001(\0132-.google.cloud.dialo" - + "gflow.v2.OutputAudioConfig\022\r\n\005audio\030\002 \001(" - + "\014\"\317\002\n\023AutomatedAgentReply\022P\n\026detect_inte" - + "nt_response\030\001 \001(\01320.google.cloud.dialogf" - + "low.v2.DetectIntentResponse\022k\n\032automated" - + "_agent_reply_type\030\007 \001(\0162G.google.cloud.d" - + "ialogflow.v2.AutomatedAgentReply.Automat" - + "edAgentReplyType\022\032\n\022allow_cancellation\030\010" - + " \001(\010\"]\n\027AutomatedAgentReplyType\022*\n&AUTOM" - + "ATED_AGENT_REPLY_TYPE_UNSPECIFIED\020\000\022\013\n\007P" - + "ARTIAL\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\nconfidence\030\004 \001(\002\022I\n\010metadata\030\005 \003(" - + "\01327.google.cloud.dialogflow.v2.ArticleAn" - + "swer.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\"\340\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\022E\n\010metadata\030\005 \003(\01323.googl" - + "e.cloud.dialogflow.v2.FaqAnswer.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\"\207\002" - + "\n\020SuggestionResult\022#\n\005error\030\001 \001(\0132\022.goog" - + "le.rpc.StatusH\000\022X\n\031suggest_articles_resp" - + "onse\030\002 \001(\01323.google.cloud.dialogflow.v2." - + "SuggestArticlesResponseH\000\022]\n\034suggest_faq" - + "_answers_response\030\003 \001(\01325.google.cloud.d" - + "ialogflow.v2.SuggestFaqAnswersResponseH\000" - + "B\025\n\023suggestion_response\"j\n\024AnnotatedMess" - + "agePart\022\014\n\004text\030\001 \001(\t\022\023\n\013entity_type\030\002 \001" - + "(\t\022/\n\017formatted_value\030\003 \001(\0132\026.google.pro" - + "tobuf.Value\"n\n\021MessageAnnotation\022?\n\005part" - + "s\030\001 \003(\01320.google.cloud.dialogflow.v2.Ann" - + "otatedMessagePart\022\030\n\020contain_entities\030\002 " - + "\001(\010\"\315\001\n\025AssistQueryParameters\022s\n\032documen" - + "ts_metadata_filters\030\001 \003(\0132O.google.cloud" - + ".dialogflow.v2.AssistQueryParameters.Doc" - + "umentsMetadataFiltersEntry\032?\n\035DocumentsM" - + "etadataFiltersEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005valu" - + "e\030\002 \001(\t:\0028\0012\377\021\n\014Participants\022\245\002\n\021CreateP" - + "articipant\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/*/conversations/*}/par" - + "ticipants:\013participantZO\"@/v2/{parent=pr" - + "ojects/*/locations/*/conversations/*}/pa" - + "rticipants:\013participant\332A\022parent,partici" - + "pant\022\366\001\n\016GetParticipant\0221.google.cloud.d" - + "ialogflow.v2.GetParticipantRequest\032\'.goo" - + "gle.cloud.dialogflow.v2.Participant\"\207\001\202\323" - + "\344\223\002z\0224/v2/{name=projects/*/conversations" - + "/*/participants/*}ZB\022@/v2/{name=projects" - + "/*/locations/*/conversations/*/participa" - + "nts/*}\332A\004name\022\211\002\n\020ListParticipants\0223.goo" - + "gle.cloud.dialogflow.v2.ListParticipants" - + "Request\0324.google.cloud.dialogflow.v2.Lis" - + "tParticipantsResponse\"\211\001\202\323\344\223\002z\0224/v2/{par" - + "ent=projects/*/conversations/*}/particip" - + "antsZB\022@/v2/{parent=projects/*/locations" - + "/*/conversations/*}/participants\332A\006paren" - + "t\022\302\002\n\021UpdateParticipant\0224.google.cloud.d" - + "ialogflow.v2.UpdateParticipantRequest\032\'." - + "google.cloud.dialogflow.v2.Participant\"\315" - + "\001\202\323\344\223\002\254\0012@/v2/{participant.name=projects" - + "/*/conversations/*/participants/*}:\013part" - + "icipantZ[2L/v2/{participant.name=project" - + "s/*/locations/*/conversations/*/particip" - + "ants/*}:\013participant\332A\027participant,updat" - + "e_mask\022\340\002\n\016AnalyzeContent\0221.google.cloud" - + ".dialogflow.v2.AnalyzeContentRequest\0322.g" - + "oogle.cloud.dialogflow.v2.AnalyzeContent" - + "Response\"\346\001\202\323\344\223\002\254\001\"J/v2/{participant=pro" - + "jects/*/conversations/*/participants/*}:" - + "analyzeContent:\001*Z[\"V/v2/{participant=pr" - + "ojects/*/locations/*/conversations/*/par" - + "ticipants/*}:analyzeContent:\001*\332A\026partici" - + "pant,text_input\332A\027participant,event_inpu" - + "t\022\311\002\n\017SuggestArticles\0222.google.cloud.dia" - + "logflow.v2.SuggestArticlesRequest\0323.goog" - + "le.cloud.dialogflow.v2.SuggestArticlesRe" - + "sponse\"\314\001\202\323\344\223\002\274\001\"R/v2/{parent=projects/*" - + "/conversations/*/participants/*}/suggest" - + "ions:suggestArticles:\001*Zc\"^/v2/{parent=p" - + "rojects/*/locations/*/conversations/*/pa" - + "rticipants/*}/suggestions:suggestArticle" - + "s:\001*\332A\006parent\022\323\002\n\021SuggestFaqAnswers\0224.go" - + "ogle.cloud.dialogflow.v2.SuggestFaqAnswe" - + "rsRequest\0325.google.cloud.dialogflow.v2.S" - + "uggestFaqAnswersResponse\"\320\001\202\323\344\223\002\300\001\"T/v2/" - + "{parent=projects/*/conversations/*/parti" - + "cipants/*}/suggestions:suggestFaqAnswers" - + ":\001*Ze\"`/v2/{parent=projects/*/locations/" - + "*/conversations/*/participants/*}/sugges" - + "tions:suggestFaqAnswers:\001*\332A\006parent\032x\312A\031" - + "dialogflow.googleapis.com\322AYhttps://www." - + "googleapis.com/auth/cloud-platform,https" - + "://www.googleapis.com/auth/dialogflowB\237\001" - + "\n\036com.google.cloud.dialogflow.v2B\020Partic" - + "ipantProtoP\001ZDgoogle.golang.org/genproto" - + "/googleapis/cloud/dialogflow/v2;dialogfl" - + "ow\370\001\001\242\002\002DF\252\002\032Google.Cloud.Dialogflow.V2b" - + "\006proto3" + + "oud/dialogflow/v2/audio_config.proto\032$go" + + "ogle/cloud/dialogflow/v2/gcs.proto\032(goog" + + "le/cloud/dialogflow/v2/session.proto\032\031go" + + "ogle/protobuf/any.proto\032\036google/protobuf" + + "/duration.proto\032 google/protobuf/field_m" + + "ask.proto\032\034google/protobuf/struct.proto\032" + + "\037google/protobuf/timestamp.proto\032\027google" + + "/rpc/status.proto\"\347\004\n\013Participant\022\021\n\004nam" + + "e\030\001 \001(\tB\003\340A\001\022?\n\004role\030\002 \001(\0162,.google.clou" + + "d.dialogflow.v2.Participant.RoleB\003\340A\005\022&\n" + + "\031sip_recording_media_label\030\006 \001(\tB\003\340A\001\022n\n" + + "\032documents_metadata_filters\030\010 \003(\0132E.goog" + + "le.cloud.dialogflow.v2.Participant.Docum" + + "entsMetadataFiltersEntryB\003\340A\001\032?\n\035Documen" + + "tsMetadataFiltersEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005v" + + "alue\030\002 \001(\t:\0028\001\"P\n\004Role\022\024\n\020ROLE_UNSPECIFI" + + "ED\020\000\022\017\n\013HUMAN_AGENT\020\001\022\023\n\017AUTOMATED_AGENT" + + "\020\002\022\014\n\010END_USER\020\003:\330\001\352A\324\001\n%dialogflow.goog" + + "leapis.com/Participant\022Jprojects/{projec" + + "t}/conversations/{conversation}/particip" + + "ants/{participant}\022_projects/{project}/l" + + "ocations/{location}/conversations/{conve" + + "rsation}/participants/{participant}\"\375\003\n\007" + + "Message\022\014\n\004name\030\001 \001(\t\022\024\n\007content\030\002 \001(\tB\003" + + "\340A\002\022\032\n\rlanguage_code\030\003 \001(\tB\003\340A\001\022\030\n\013parti" + + "cipant\030\004 \001(\tB\003\340A\003\022K\n\020participant_role\030\005 " + + "\001(\0162,.google.cloud.dialogflow.v2.Partici" + + "pant.RoleB\003\340A\003\0224\n\013create_time\030\006 \001(\0132\032.go" + + "ogle.protobuf.TimestampB\003\340A\003\022N\n\022message_" + + "annotation\030\007 \001(\0132-.google.cloud.dialogfl" + + "ow.v2.MessageAnnotationB\003\340A\003:\304\001\352A\300\001\n!dia" + + "logflow.googleapis.com/Message\022Bprojects" + + "/{project}/conversations/{conversation}/" + + "messages/{message}\022Wprojects/{project}/l" + + "ocations/{location}/conversations/{conve" + + "rsation}/messages/{message}\"\234\001\n\030CreatePa" + + "rticipantRequest\022=\n\006parent\030\001 \001(\tB-\340A\002\372A\'" + + "\022%dialogflow.googleapis.com/Participant\022" + + "A\n\013participant\030\002 \001(\0132\'.google.cloud.dial" + + "ogflow.v2.ParticipantB\003\340A\002\"T\n\025GetPartici" + + "pantRequest\022;\n\004name\030\001 \001(\tB-\340A\002\372A\'\n%dialo" + + "gflow.googleapis.com/Participant\"\211\001\n\027Lis" + + "tParticipantsRequest\022=\n\006parent\030\001 \001(\tB-\340A" + + "\002\372A\'\022%dialogflow.googleapis.com/Particip" + + "ant\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_toke" + + "n\030\003 \001(\tB\003\340A\001\"r\n\030ListParticipantsResponse" + + "\022=\n\014participants\030\001 \003(\0132\'.google.cloud.di" + + "alogflow.v2.Participant\022\027\n\017next_page_tok" + + "en\030\002 \001(\t\"\223\001\n\030UpdateParticipantRequest\022A\n" + + "\013participant\030\001 \001(\0132\'.google.cloud.dialog" + + "flow.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\013participant\030" + + "\001 \001(\tB-\340A\002\372A\'\n%dialogflow.googleapis.com" + + "/Participant\022;\n\ntext_input\030\006 \001(\0132%.googl" + + "e.cloud.dialogflow.v2.TextInputH\000\022=\n\013eve" + + "nt_input\030\010 \001(\0132&.google.cloud.dialogflow" + + ".v2.EventInputH\000\022I\n\022reply_audio_config\030\005" + + " \001(\0132-.google.cloud.dialogflow.v2.Output" + + "AudioConfig\022A\n\014query_params\030\t \001(\0132+.goog" + + "le.cloud.dialogflow.v2.QueryParameters\022N" + + "\n\023assist_query_params\030\016 \001(\01321.google.clo" + + "ud.dialogflow.v2.AssistQueryParameters\022\022" + + "\n\nrequest_id\030\013 \001(\tB\007\n\005input\",\n\016DtmfParam" + + "eters\022\032\n\022accepts_dtmf_input\030\001 \001(\010\"\336\003\n\026An" + + "alyzeContentResponse\022\022\n\nreply_text\030\001 \001(\t" + + "\022<\n\013reply_audio\030\002 \001(\0132\'.google.cloud.dia" + + "logflow.v2.OutputAudio\022N\n\025automated_agen" + + "t_reply\030\003 \001(\0132/.google.cloud.dialogflow." + + "v2.AutomatedAgentReply\0224\n\007message\030\005 \001(\0132" + + "#.google.cloud.dialogflow.v2.Message\022T\n\036" + + "human_agent_suggestion_results\030\006 \003(\0132,.g" + + "oogle.cloud.dialogflow.v2.SuggestionResu" + + "lt\022Q\n\033end_user_suggestion_results\030\007 \003(\0132" + + ",.google.cloud.dialogflow.v2.SuggestionR" + + "esult\022C\n\017dtmf_parameters\030\t \001(\0132*.google." + + "cloud.dialogflow.v2.DtmfParameters\"\375\001\n\026S" + + "uggestArticlesRequest\022=\n\006parent\030\001 \001(\tB-\340" + + "A\002\372A\'\n%dialogflow.googleapis.com/Partici" + + "pant\022>\n\016latest_message\030\002 \001(\tB&\372A#\n!dialo" + + "gflow.googleapis.com/Message\022\024\n\014context_" + + "size\030\003 \001(\005\022N\n\023assist_query_params\030\004 \001(\0132" + + "1.google.cloud.dialogflow.v2.AssistQuery" + + "Parameters\"\213\001\n\027SuggestArticlesResponse\022B" + + "\n\017article_answers\030\001 \003(\0132).google.cloud.d" + + "ialogflow.v2.ArticleAnswer\022\026\n\016latest_mes" + + "sage\030\002 \001(\t\022\024\n\014context_size\030\003 \001(\005\"\377\001\n\030Sug" + + "gestFaqAnswersRequest\022=\n\006parent\030\001 \001(\tB-\340" + + "A\002\372A\'\n%dialogflow.googleapis.com/Partici" + + "pant\022>\n\016latest_message\030\002 \001(\tB&\372A#\n!dialo" + + "gflow.googleapis.com/Message\022\024\n\014context_" + + "size\030\003 \001(\005\022N\n\023assist_query_params\030\004 \001(\0132" + + "1.google.cloud.dialogflow.v2.AssistQuery" + + "Parameters\"\205\001\n\031SuggestFaqAnswersResponse" + + "\022:\n\013faq_answers\030\001 \003(\0132%.google.cloud.dia" + + "logflow.v2.FaqAnswer\022\026\n\016latest_message\030\002" + + " \001(\t\022\024\n\014context_size\030\003 \001(\005\"[\n\013OutputAudi" + + "o\022=\n\006config\030\001 \001(\0132-.google.cloud.dialogf" + + "low.v2.OutputAudioConfig\022\r\n\005audio\030\002 \001(\014\"" + + "\317\002\n\023AutomatedAgentReply\022P\n\026detect_intent" + + "_response\030\001 \001(\01320.google.cloud.dialogflo" + + "w.v2.DetectIntentResponse\022k\n\032automated_a" + + "gent_reply_type\030\007 \001(\0162G.google.cloud.dia" + + "logflow.v2.AutomatedAgentReply.Automated" + + "AgentReplyType\022\032\n\022allow_cancellation\030\010 \001" + + "(\010\"]\n\027AutomatedAgentReplyType\022*\n&AUTOMAT" + + "ED_AGENT_REPLY_TYPE_UNSPECIFIED\020\000\022\013\n\007PAR" + + "TIAL\020\001\022\t\n\005FINAL\020\002\"\344\001\n\rArticleAnswer\022\r\n\005t" + + "itle\030\001 \001(\t\022\013\n\003uri\030\002 \001(\t\022\020\n\010snippets\030\003 \003(" + + "\t\022\022\n\nconfidence\030\004 \001(\002\022I\n\010metadata\030\005 \003(\0132" + + "7.google.cloud.dialogflow.v2.ArticleAnsw" + + "er.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\"\340\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\006" + + "source\030\004 \001(\t\022E\n\010metadata\030\005 \003(\01323.google." + + "cloud.dialogflow.v2.FaqAnswer.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\"\207\002\n\020" + + "SuggestionResult\022#\n\005error\030\001 \001(\0132\022.google" + + ".rpc.StatusH\000\022X\n\031suggest_articles_respon" + + "se\030\002 \001(\01323.google.cloud.dialogflow.v2.Su" + + "ggestArticlesResponseH\000\022]\n\034suggest_faq_a" + + "nswers_response\030\003 \001(\01325.google.cloud.dia" + + "logflow.v2.SuggestFaqAnswersResponseH\000B\025" + + "\n\023suggestion_response\"j\n\024AnnotatedMessag" + + "ePart\022\014\n\004text\030\001 \001(\t\022\023\n\013entity_type\030\002 \001(\t" + + "\022/\n\017formatted_value\030\003 \001(\0132\026.google.proto" + + "buf.Value\"n\n\021MessageAnnotation\022?\n\005parts\030" + + "\001 \003(\01320.google.cloud.dialogflow.v2.Annot" + + "atedMessagePart\022\030\n\020contain_entities\030\002 \001(" + + "\010\"\315\001\n\025AssistQueryParameters\022s\n\032documents" + + "_metadata_filters\030\001 \003(\0132O.google.cloud.d" + + "ialogflow.v2.AssistQueryParameters.Docum" + + "entsMetadataFiltersEntry\032?\n\035DocumentsMet" + + "adataFiltersEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030" + + "\002 \001(\t:\0028\0012\377\021\n\014Participants\022\245\002\n\021CreatePar" + + "ticipant\0224.google.cloud.dialogflow.v2.Cr" + + "eateParticipantRequest\032\'.google.cloud.di" + + "alogflow.v2.Participant\"\260\001\202\323\344\223\002\224\001\"4/v2/{" + + "parent=projects/*/conversations/*}/parti" + + "cipants:\013participantZO\"@/v2/{parent=proj" + + "ects/*/locations/*/conversations/*}/part" + + "icipants:\013participant\332A\022parent,participa" + + "nt\022\366\001\n\016GetParticipant\0221.google.cloud.dia" + + "logflow.v2.GetParticipantRequest\032\'.googl" + + "e.cloud.dialogflow.v2.Participant\"\207\001\202\323\344\223" + + "\002z\0224/v2/{name=projects/*/conversations/*" + + "/participants/*}ZB\022@/v2/{name=projects/*" + + "/locations/*/conversations/*/participant" + + "s/*}\332A\004name\022\211\002\n\020ListParticipants\0223.googl" + + "e.cloud.dialogflow.v2.ListParticipantsRe" + + "quest\0324.google.cloud.dialogflow.v2.ListP" + + "articipantsResponse\"\211\001\202\323\344\223\002z\0224/v2/{paren" + + "t=projects/*/conversations/*}/participan" + + "tsZB\022@/v2/{parent=projects/*/locations/*" + + "/conversations/*}/participants\332A\006parent\022" + + "\302\002\n\021UpdateParticipant\0224.google.cloud.dia" + + "logflow.v2.UpdateParticipantRequest\032\'.go" + + "ogle.cloud.dialogflow.v2.Participant\"\315\001\202" + + "\323\344\223\002\254\0012@/v2/{participant.name=projects/*" + + "/conversations/*/participants/*}:\013partic" + + "ipantZ[2L/v2/{participant.name=projects/" + + "*/locations/*/conversations/*/participan" + + "ts/*}:\013participant\332A\027participant,update_" + + "mask\022\340\002\n\016AnalyzeContent\0221.google.cloud.d" + + "ialogflow.v2.AnalyzeContentRequest\0322.goo" + + "gle.cloud.dialogflow.v2.AnalyzeContentRe" + + "sponse\"\346\001\202\323\344\223\002\254\001\"J/v2/{participant=proje" + + "cts/*/conversations/*/participants/*}:an" + + "alyzeContent:\001*Z[\"V/v2/{participant=proj" + + "ects/*/locations/*/conversations/*/parti" + + "cipants/*}:analyzeContent:\001*\332A\026participa" + + "nt,text_input\332A\027participant,event_input\022" + + "\311\002\n\017SuggestArticles\0222.google.cloud.dialo" + + "gflow.v2.SuggestArticlesRequest\0323.google" + + ".cloud.dialogflow.v2.SuggestArticlesResp" + + "onse\"\314\001\202\323\344\223\002\274\001\"R/v2/{parent=projects/*/c" + + "onversations/*/participants/*}/suggestio" + + "ns:suggestArticles:\001*Zc\"^/v2/{parent=pro" + + "jects/*/locations/*/conversations/*/part" + + "icipants/*}/suggestions:suggestArticles:" + + "\001*\332A\006parent\022\323\002\n\021SuggestFaqAnswers\0224.goog" + + "le.cloud.dialogflow.v2.SuggestFaqAnswers" + + "Request\0325.google.cloud.dialogflow.v2.Sug" + + "gestFaqAnswersResponse\"\320\001\202\323\344\223\002\300\001\"T/v2/{p" + + "arent=projects/*/conversations/*/partici" + + "pants/*}/suggestions:suggestFaqAnswers:\001" + + "*Ze\"`/v2/{parent=projects/*/locations/*/" + + "conversations/*/participants/*}/suggesti" + + "ons:suggestFaqAnswers:\001*\332A\006parent\032x\312A\031di" + + "alogflow.googleapis.com\322AYhttps://www.go" + + "ogleapis.com/auth/cloud-platform,https:/" + + "/www.googleapis.com/auth/dialogflowB\237\001\n\036" + + "com.google.cloud.dialogflow.v2B\020Particip" + + "antProtoP\001ZDgoogle.golang.org/genproto/g" + + "oogleapis/cloud/dialogflow/v2;dialogflow" + + "\370\001\001\242\002\002DF\252\002\032Google.Cloud.Dialogflow.V2b\006p" + + "roto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -353,6 +354,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), com.google.cloud.dialogflow.v2.AudioConfigProto.getDescriptor(), + com.google.cloud.dialogflow.v2.GcsProto.getDescriptor(), com.google.cloud.dialogflow.v2.SessionProto.getDescriptor(), com.google.protobuf.AnyProto.getDescriptor(), com.google.protobuf.DurationProto.getDescriptor(), @@ -606,6 +608,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); com.google.cloud.dialogflow.v2.AudioConfigProto.getDescriptor(); + com.google.cloud.dialogflow.v2.GcsProto.getDescriptor(); com.google.cloud.dialogflow.v2.SessionProto.getDescriptor(); com.google.protobuf.AnyProto.getDescriptor(); com.google.protobuf.DurationProto.getDescriptor(); diff --git a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ReloadDocumentRequest.java b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ReloadDocumentRequest.java index dd811c464..712be7ced 100644 --- a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ReloadDocumentRequest.java +++ b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ReloadDocumentRequest.java @@ -84,6 +84,16 @@ private ReloadDocumentRequest( source_ = s; break; } + case 32: + { + importGcsCustomMetadata_ = input.readBool(); + break; + } + case 40: + { + smartMessagingPartialUpdate_ = input.readBool(); + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -298,6 +308,44 @@ public com.google.protobuf.ByteString getContentUriBytes() { } } + public static final int IMPORT_GCS_CUSTOM_METADATA_FIELD_NUMBER = 4; + private boolean importGcsCustomMetadata_; + /** + * + * + *
+   * Optional. Whether to import custom metadata from Google Cloud Storage.
+   * Only valid when the document source is Google Cloud Storage URI.
+   * 
+ * + * bool import_gcs_custom_metadata = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The importGcsCustomMetadata. + */ + @java.lang.Override + public boolean getImportGcsCustomMetadata() { + return importGcsCustomMetadata_; + } + + public static final int SMART_MESSAGING_PARTIAL_UPDATE_FIELD_NUMBER = 5; + private boolean smartMessagingPartialUpdate_; + /** + * + * + *
+   * Optional. When enabled, the reload request is to apply partial update to the smart
+   * messaging allowlist.
+   * 
+ * + * bool smart_messaging_partial_update = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The smartMessagingPartialUpdate. + */ + @java.lang.Override + public boolean getSmartMessagingPartialUpdate() { + return smartMessagingPartialUpdate_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -318,6 +366,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (sourceCase_ == 3) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, source_); } + if (importGcsCustomMetadata_ != false) { + output.writeBool(4, importGcsCustomMetadata_); + } + if (smartMessagingPartialUpdate_ != false) { + output.writeBool(5, smartMessagingPartialUpdate_); + } unknownFields.writeTo(output); } @@ -333,6 +387,13 @@ public int getSerializedSize() { if (sourceCase_ == 3) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, source_); } + if (importGcsCustomMetadata_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, importGcsCustomMetadata_); + } + if (smartMessagingPartialUpdate_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(5, smartMessagingPartialUpdate_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -350,6 +411,8 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.dialogflow.v2.ReloadDocumentRequest) obj; if (!getName().equals(other.getName())) return false; + if (getImportGcsCustomMetadata() != other.getImportGcsCustomMetadata()) return false; + if (getSmartMessagingPartialUpdate() != other.getSmartMessagingPartialUpdate()) return false; if (!getSourceCase().equals(other.getSourceCase())) return false; switch (sourceCase_) { case 3: @@ -371,6 +434,10 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + IMPORT_GCS_CUSTOM_METADATA_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getImportGcsCustomMetadata()); + hash = (37 * hash) + SMART_MESSAGING_PARTIAL_UPDATE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSmartMessagingPartialUpdate()); switch (sourceCase_) { case 3: hash = (37 * hash) + CONTENT_URI_FIELD_NUMBER; @@ -526,6 +593,10 @@ public Builder clear() { super.clear(); name_ = ""; + importGcsCustomMetadata_ = false; + + smartMessagingPartialUpdate_ = false; + sourceCase_ = 0; source_ = null; return this; @@ -559,6 +630,8 @@ public com.google.cloud.dialogflow.v2.ReloadDocumentRequest buildPartial() { if (sourceCase_ == 3) { result.source_ = source_; } + result.importGcsCustomMetadata_ = importGcsCustomMetadata_; + result.smartMessagingPartialUpdate_ = smartMessagingPartialUpdate_; result.sourceCase_ = sourceCase_; onBuilt(); return result; @@ -614,6 +687,12 @@ public Builder mergeFrom(com.google.cloud.dialogflow.v2.ReloadDocumentRequest ot name_ = other.name_; onChanged(); } + if (other.getImportGcsCustomMetadata() != false) { + setImportGcsCustomMetadata(other.getImportGcsCustomMetadata()); + } + if (other.getSmartMessagingPartialUpdate() != false) { + setSmartMessagingPartialUpdate(other.getSmartMessagingPartialUpdate()); + } switch (other.getSourceCase()) { case CONTENT_URI: { @@ -949,6 +1028,119 @@ public Builder setContentUriBytes(com.google.protobuf.ByteString value) { return this; } + private boolean importGcsCustomMetadata_; + /** + * + * + *
+     * Optional. Whether to import custom metadata from Google Cloud Storage.
+     * Only valid when the document source is Google Cloud Storage URI.
+     * 
+ * + * bool import_gcs_custom_metadata = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The importGcsCustomMetadata. + */ + @java.lang.Override + public boolean getImportGcsCustomMetadata() { + return importGcsCustomMetadata_; + } + /** + * + * + *
+     * Optional. Whether to import custom metadata from Google Cloud Storage.
+     * Only valid when the document source is Google Cloud Storage URI.
+     * 
+ * + * bool import_gcs_custom_metadata = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The importGcsCustomMetadata to set. + * @return This builder for chaining. + */ + public Builder setImportGcsCustomMetadata(boolean value) { + + importGcsCustomMetadata_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Whether to import custom metadata from Google Cloud Storage.
+     * Only valid when the document source is Google Cloud Storage URI.
+     * 
+ * + * bool import_gcs_custom_metadata = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearImportGcsCustomMetadata() { + + importGcsCustomMetadata_ = false; + onChanged(); + return this; + } + + private boolean smartMessagingPartialUpdate_; + /** + * + * + *
+     * Optional. When enabled, the reload request is to apply partial update to the smart
+     * messaging allowlist.
+     * 
+ * + * bool smart_messaging_partial_update = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The smartMessagingPartialUpdate. + */ + @java.lang.Override + public boolean getSmartMessagingPartialUpdate() { + return smartMessagingPartialUpdate_; + } + /** + * + * + *
+     * Optional. When enabled, the reload request is to apply partial update to the smart
+     * messaging allowlist.
+     * 
+ * + * bool smart_messaging_partial_update = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The smartMessagingPartialUpdate to set. + * @return This builder for chaining. + */ + public Builder setSmartMessagingPartialUpdate(boolean value) { + + smartMessagingPartialUpdate_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. When enabled, the reload request is to apply partial update to the smart
+     * messaging allowlist.
+     * 
+ * + * bool smart_messaging_partial_update = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearSmartMessagingPartialUpdate() { + + smartMessagingPartialUpdate_ = false; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ReloadDocumentRequestOrBuilder.java b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ReloadDocumentRequestOrBuilder.java index 32bc23e8d..cc21cb8b8 100644 --- a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ReloadDocumentRequestOrBuilder.java +++ b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ReloadDocumentRequestOrBuilder.java @@ -102,5 +102,33 @@ public interface ReloadDocumentRequestOrBuilder */ com.google.protobuf.ByteString getContentUriBytes(); + /** + * + * + *
+   * Optional. Whether to import custom metadata from Google Cloud Storage.
+   * Only valid when the document source is Google Cloud Storage URI.
+   * 
+ * + * bool import_gcs_custom_metadata = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The importGcsCustomMetadata. + */ + boolean getImportGcsCustomMetadata(); + + /** + * + * + *
+   * Optional. When enabled, the reload request is to apply partial update to the smart
+   * messaging allowlist.
+   * 
+ * + * bool smart_messaging_partial_update = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The smartMessagingPartialUpdate. + */ + boolean getSmartMessagingPartialUpdate(); + public com.google.cloud.dialogflow.v2.ReloadDocumentRequest.SourceCase getSourceCase(); } diff --git a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SessionProto.java b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SessionProto.java index e75cf152c..596f75bb4 100644 --- a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SessionProto.java +++ b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SessionProto.java @@ -98,135 +98,136 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "proto\032\037google/api/field_behavior.proto\032\031" + "google/api/resource.proto\032-google/cloud/" + "dialogflow/v2/audio_config.proto\032(google" - + "/cloud/dialogflow/v2/context.proto\032\'goog" - + "le/cloud/dialogflow/v2/intent.proto\0324goo" - + "gle/cloud/dialogflow/v2/session_entity_t" - + "ype.proto\032\036google/protobuf/duration.prot" - + "o\032 google/protobuf/field_mask.proto\032\034goo" - + "gle/protobuf/struct.proto\032\027google/rpc/st" - + "atus.proto\032\030google/type/latlng.proto\"\365\002\n" - + "\023DetectIntentRequest\022:\n\007session\030\001 \001(\tB)\340" - + "A\002\372A#\n!dialogflow.googleapis.com/Session" - + "\022A\n\014query_params\030\002 \001(\0132+.google.cloud.di" - + "alogflow.v2.QueryParameters\022@\n\013query_inp" - + "ut\030\003 \001(\0132&.google.cloud.dialogflow.v2.Qu" - + "eryInputB\003\340A\002\022J\n\023output_audio_config\030\004 \001" - + "(\0132-.google.cloud.dialogflow.v2.OutputAu" - + "dioConfig\022<\n\030output_audio_config_mask\030\007 " - + "\001(\0132\032.google.protobuf.FieldMask\022\023\n\013input" - + "_audio\030\005 \001(\014\"\370\001\n\024DetectIntentResponse\022\023\n" - + "\013response_id\030\001 \001(\t\022=\n\014query_result\030\002 \001(\013" - + "2\'.google.cloud.dialogflow.v2.QueryResul" - + "t\022*\n\016webhook_status\030\003 \001(\0132\022.google.rpc.S" - + "tatus\022\024\n\014output_audio\030\004 \001(\014\022J\n\023output_au" - + "dio_config\030\006 \001(\0132-.google.cloud.dialogfl" - + "ow.v2.OutputAudioConfig\"\215\004\n\017QueryParamet" - + "ers\022\021\n\ttime_zone\030\001 \001(\t\022)\n\014geo_location\030\002" - + " \001(\0132\023.google.type.LatLng\0225\n\010contexts\030\003 " - + "\003(\0132#.google.cloud.dialogflow.v2.Context" - + "\022\026\n\016reset_contexts\030\004 \001(\010\022K\n\024session_enti" - + "ty_types\030\005 \003(\0132-.google.cloud.dialogflow" - + ".v2.SessionEntityType\022(\n\007payload\030\006 \001(\0132\027" - + ".google.protobuf.Struct\022e\n!sentiment_ana" - + "lysis_request_config\030\n \001(\0132:.google.clou" - + "d.dialogflow.v2.SentimentAnalysisRequest" - + "Config\022X\n\017webhook_headers\030\016 \003(\0132?.google" - + ".cloud.dialogflow.v2.QueryParameters.Web" - + "hookHeadersEntry\0325\n\023WebhookHeadersEntry\022" - + "\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\313\001\n\nQuer" - + "yInput\022D\n\014audio_config\030\001 \001(\0132,.google.cl" - + "oud.dialogflow.v2.InputAudioConfigH\000\0225\n\004" - + "text\030\002 \001(\0132%.google.cloud.dialogflow.v2." - + "TextInputH\000\0227\n\005event\030\003 \001(\0132&.google.clou" - + "d.dialogflow.v2.EventInputH\000B\007\n\005input\"\256\005" - + "\n\013QueryResult\022\022\n\nquery_text\030\001 \001(\t\022\025\n\rlan" - + "guage_code\030\017 \001(\t\022%\n\035speech_recognition_c" - + "onfidence\030\002 \001(\002\022\016\n\006action\030\003 \001(\t\022+\n\nparam" - + "eters\030\004 \001(\0132\027.google.protobuf.Struct\022#\n\033" - + "all_required_params_present\030\005 \001(\010\022\034\n\024can" - + "cels_slot_filling\030\025 \001(\010\022\030\n\020fulfillment_t" - + "ext\030\006 \001(\t\022H\n\024fulfillment_messages\030\007 \003(\0132" - + "*.google.cloud.dialogflow.v2.Intent.Mess" - + "age\022\026\n\016webhook_source\030\010 \001(\t\0220\n\017webhook_p" - + "ayload\030\t \001(\0132\027.google.protobuf.Struct\022<\n" - + "\017output_contexts\030\n \003(\0132#.google.cloud.di" - + "alogflow.v2.Context\0222\n\006intent\030\013 \001(\0132\".go" - + "ogle.cloud.dialogflow.v2.Intent\022#\n\033inten" - + "t_detection_confidence\030\014 \001(\002\0220\n\017diagnost" - + "ic_info\030\016 \001(\0132\027.google.protobuf.Struct\022V" - + "\n\031sentiment_analysis_result\030\021 \001(\01323.goog" - + "le.cloud.dialogflow.v2.SentimentAnalysis" - + "Result\"\234\003\n\034StreamingDetectIntentRequest\022" - + ":\n\007session\030\001 \001(\tB)\340A\002\372A#\n!dialogflow.goo" - + "gleapis.com/Session\022A\n\014query_params\030\002 \001(" - + "\0132+.google.cloud.dialogflow.v2.QueryPara" - + "meters\022@\n\013query_input\030\003 \001(\0132&.google.clo" - + "ud.dialogflow.v2.QueryInputB\003\340A\002\022\034\n\020sing" - + "le_utterance\030\004 \001(\010B\002\030\001\022J\n\023output_audio_c" - + "onfig\030\005 \001(\0132-.google.cloud.dialogflow.v2" - + ".OutputAudioConfig\022<\n\030output_audio_confi" - + "g_mask\030\007 \001(\0132\032.google.protobuf.FieldMask" - + "\022\023\n\013input_audio\030\006 \001(\014\"\325\002\n\035StreamingDetec" - + "tIntentResponse\022\023\n\013response_id\030\001 \001(\t\022R\n\022" - + "recognition_result\030\002 \001(\01326.google.cloud." - + "dialogflow.v2.StreamingRecognitionResult" - + "\022=\n\014query_result\030\003 \001(\0132\'.google.cloud.di" - + "alogflow.v2.QueryResult\022*\n\016webhook_statu" - + "s\030\004 \001(\0132\022.google.rpc.Status\022\024\n\014output_au" - + "dio\030\005 \001(\014\022J\n\023output_audio_config\030\006 \001(\0132-" - + ".google.cloud.dialogflow.v2.OutputAudioC" - + "onfig\"\235\003\n\032StreamingRecognitionResult\022X\n\014" - + "message_type\030\001 \001(\0162B.google.cloud.dialog" - + "flow.v2.StreamingRecognitionResult.Messa" - + "geType\022\022\n\ntranscript\030\002 \001(\t\022\020\n\010is_final\030\003" - + " \001(\010\022\022\n\nconfidence\030\004 \001(\002\022D\n\020speech_word_" - + "info\030\007 \003(\0132*.google.cloud.dialogflow.v2." - + "SpeechWordInfo\0224\n\021speech_end_offset\030\010 \001(" - + "\0132\031.google.protobuf.Duration\022\025\n\rlanguage" - + "_code\030\n \001(\t\"X\n\013MessageType\022\034\n\030MESSAGE_TY" - + "PE_UNSPECIFIED\020\000\022\016\n\nTRANSCRIPT\020\001\022\033\n\027END_" - + "OF_SINGLE_UTTERANCE\020\002\":\n\tTextInput\022\021\n\004te" - + "xt\030\001 \001(\tB\003\340A\002\022\032\n\rlanguage_code\030\002 \001(\tB\003\340A" - + "\002\"h\n\nEventInput\022\021\n\004name\030\001 \001(\tB\003\340A\002\022+\n\npa" - + "rameters\030\002 \001(\0132\027.google.protobuf.Struct\022" - + "\032\n\rlanguage_code\030\003 \001(\tB\003\340A\002\"F\n\036Sentiment" - + "AnalysisRequestConfig\022$\n\034analyze_query_t" - + "ext_sentiment\030\001 \001(\010\"^\n\027SentimentAnalysis" - + "Result\022C\n\024query_text_sentiment\030\001 \001(\0132%.g" - + "oogle.cloud.dialogflow.v2.Sentiment\"-\n\tS" - + "entiment\022\r\n\005score\030\001 \001(\002\022\021\n\tmagnitude\030\002 \001" - + "(\0022\345\005\n\010Sessions\022\311\003\n\014DetectIntent\022/.googl" - + "e.cloud.dialogflow.v2.DetectIntentReques" - + "t\0320.google.cloud.dialogflow.v2.DetectInt" - + "entResponse\"\325\002\202\323\344\223\002\270\002\"6/v2/{session=proj" - + "ects/*/agent/sessions/*}:detectIntent:\001*" - + "ZR\"M/v2/{session=projects/*/agent/enviro" - + "nments/*/users/*/sessions/*}:detectInten" - + "t:\001*ZG\"B/v2/{session=projects/*/location" - + "s/*/agent/sessions/*}:detectIntent:\001*Z^\"" - + "Y/v2/{session=projects/*/locations/*/age" - + "nt/environments/*/users/*/sessions/*}:de" - + "tectIntent:\001*\332A\023session,query_input\022\222\001\n\025" - + "StreamingDetectIntent\0228.google.cloud.dia" - + "logflow.v2.StreamingDetectIntentRequest\032" - + "9.google.cloud.dialogflow.v2.StreamingDe" - + "tectIntentResponse\"\000(\0010\001\032x\312A\031dialogflow." - + "googleapis.com\322AYhttps://www.googleapis." - + "com/auth/cloud-platform,https://www.goog" - + "leapis.com/auth/dialogflowB\360\003\n\036com.googl" - + "e.cloud.dialogflow.v2B\014SessionProtoP\001ZDg" - + "oogle.golang.org/genproto/googleapis/clo" - + "ud/dialogflow/v2;dialogflow\370\001\001\242\002\002DF\252\002\032Go" - + "ogle.Cloud.Dialogflow.V2\352A\321\002\n!dialogflow" - + ".googleapis.com/Session\022+projects/{proje" - + "ct}/agent/sessions/{session}\022Sprojects/{" - + "project}/agent/environments/{environment" - + "}/users/{user}/sessions/{session}\022@proje" - + "cts/{project}/locations/{location}/agent" - + "/sessions/{session}\022hprojects/{project}/" - + "locations/{location}/agent/environments/" - + "{environment}/users/{user}/sessions/{ses" - + "sion}b\006proto3" + + "/cloud/dialogflow/v2/context.proto\032$goog" + + "le/cloud/dialogflow/v2/gcs.proto\032\'google" + + "/cloud/dialogflow/v2/intent.proto\0324googl" + + "e/cloud/dialogflow/v2/session_entity_typ" + + "e.proto\032\036google/protobuf/duration.proto\032" + + " google/protobuf/field_mask.proto\032\034googl" + + "e/protobuf/struct.proto\032\027google/rpc/stat" + + "us.proto\032\030google/type/latlng.proto\"\365\002\n\023D" + + "etectIntentRequest\022:\n\007session\030\001 \001(\tB)\340A\002" + + "\372A#\n!dialogflow.googleapis.com/Session\022A" + + "\n\014query_params\030\002 \001(\0132+.google.cloud.dial" + + "ogflow.v2.QueryParameters\022@\n\013query_input" + + "\030\003 \001(\0132&.google.cloud.dialogflow.v2.Quer" + + "yInputB\003\340A\002\022J\n\023output_audio_config\030\004 \001(\013" + + "2-.google.cloud.dialogflow.v2.OutputAudi" + + "oConfig\022<\n\030output_audio_config_mask\030\007 \001(" + + "\0132\032.google.protobuf.FieldMask\022\023\n\013input_a" + + "udio\030\005 \001(\014\"\370\001\n\024DetectIntentResponse\022\023\n\013r" + + "esponse_id\030\001 \001(\t\022=\n\014query_result\030\002 \001(\0132\'" + + ".google.cloud.dialogflow.v2.QueryResult\022" + + "*\n\016webhook_status\030\003 \001(\0132\022.google.rpc.Sta" + + "tus\022\024\n\014output_audio\030\004 \001(\014\022J\n\023output_audi" + + "o_config\030\006 \001(\0132-.google.cloud.dialogflow" + + ".v2.OutputAudioConfig\"\215\004\n\017QueryParameter" + + "s\022\021\n\ttime_zone\030\001 \001(\t\022)\n\014geo_location\030\002 \001" + + "(\0132\023.google.type.LatLng\0225\n\010contexts\030\003 \003(" + + "\0132#.google.cloud.dialogflow.v2.Context\022\026" + + "\n\016reset_contexts\030\004 \001(\010\022K\n\024session_entity" + + "_types\030\005 \003(\0132-.google.cloud.dialogflow.v" + + "2.SessionEntityType\022(\n\007payload\030\006 \001(\0132\027.g" + + "oogle.protobuf.Struct\022e\n!sentiment_analy" + + "sis_request_config\030\n \001(\0132:.google.cloud." + + "dialogflow.v2.SentimentAnalysisRequestCo" + + "nfig\022X\n\017webhook_headers\030\016 \003(\0132?.google.c" + + "loud.dialogflow.v2.QueryParameters.Webho" + + "okHeadersEntry\0325\n\023WebhookHeadersEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\313\001\n\nQueryI" + + "nput\022D\n\014audio_config\030\001 \001(\0132,.google.clou" + + "d.dialogflow.v2.InputAudioConfigH\000\0225\n\004te" + + "xt\030\002 \001(\0132%.google.cloud.dialogflow.v2.Te" + + "xtInputH\000\0227\n\005event\030\003 \001(\0132&.google.cloud." + + "dialogflow.v2.EventInputH\000B\007\n\005input\"\256\005\n\013" + + "QueryResult\022\022\n\nquery_text\030\001 \001(\t\022\025\n\rlangu" + + "age_code\030\017 \001(\t\022%\n\035speech_recognition_con" + + "fidence\030\002 \001(\002\022\016\n\006action\030\003 \001(\t\022+\n\nparamet" + + "ers\030\004 \001(\0132\027.google.protobuf.Struct\022#\n\033al" + + "l_required_params_present\030\005 \001(\010\022\034\n\024cance" + + "ls_slot_filling\030\025 \001(\010\022\030\n\020fulfillment_tex" + + "t\030\006 \001(\t\022H\n\024fulfillment_messages\030\007 \003(\0132*." + + "google.cloud.dialogflow.v2.Intent.Messag" + + "e\022\026\n\016webhook_source\030\010 \001(\t\0220\n\017webhook_pay" + + "load\030\t \001(\0132\027.google.protobuf.Struct\022<\n\017o" + + "utput_contexts\030\n \003(\0132#.google.cloud.dial" + + "ogflow.v2.Context\0222\n\006intent\030\013 \001(\0132\".goog" + + "le.cloud.dialogflow.v2.Intent\022#\n\033intent_" + + "detection_confidence\030\014 \001(\002\0220\n\017diagnostic" + + "_info\030\016 \001(\0132\027.google.protobuf.Struct\022V\n\031" + + "sentiment_analysis_result\030\021 \001(\01323.google" + + ".cloud.dialogflow.v2.SentimentAnalysisRe" + + "sult\"\234\003\n\034StreamingDetectIntentRequest\022:\n" + + "\007session\030\001 \001(\tB)\340A\002\372A#\n!dialogflow.googl" + + "eapis.com/Session\022A\n\014query_params\030\002 \001(\0132" + + "+.google.cloud.dialogflow.v2.QueryParame" + + "ters\022@\n\013query_input\030\003 \001(\0132&.google.cloud" + + ".dialogflow.v2.QueryInputB\003\340A\002\022\034\n\020single" + + "_utterance\030\004 \001(\010B\002\030\001\022J\n\023output_audio_con" + + "fig\030\005 \001(\0132-.google.cloud.dialogflow.v2.O" + + "utputAudioConfig\022<\n\030output_audio_config_" + + "mask\030\007 \001(\0132\032.google.protobuf.FieldMask\022\023" + + "\n\013input_audio\030\006 \001(\014\"\325\002\n\035StreamingDetectI" + + "ntentResponse\022\023\n\013response_id\030\001 \001(\t\022R\n\022re" + + "cognition_result\030\002 \001(\01326.google.cloud.di" + + "alogflow.v2.StreamingRecognitionResult\022=" + + "\n\014query_result\030\003 \001(\0132\'.google.cloud.dial" + + "ogflow.v2.QueryResult\022*\n\016webhook_status\030" + + "\004 \001(\0132\022.google.rpc.Status\022\024\n\014output_audi" + + "o\030\005 \001(\014\022J\n\023output_audio_config\030\006 \001(\0132-.g" + + "oogle.cloud.dialogflow.v2.OutputAudioCon" + + "fig\"\235\003\n\032StreamingRecognitionResult\022X\n\014me" + + "ssage_type\030\001 \001(\0162B.google.cloud.dialogfl" + + "ow.v2.StreamingRecognitionResult.Message" + + "Type\022\022\n\ntranscript\030\002 \001(\t\022\020\n\010is_final\030\003 \001" + + "(\010\022\022\n\nconfidence\030\004 \001(\002\022D\n\020speech_word_in" + + "fo\030\007 \003(\0132*.google.cloud.dialogflow.v2.Sp" + + "eechWordInfo\0224\n\021speech_end_offset\030\010 \001(\0132" + + "\031.google.protobuf.Duration\022\025\n\rlanguage_c" + + "ode\030\n \001(\t\"X\n\013MessageType\022\034\n\030MESSAGE_TYPE" + + "_UNSPECIFIED\020\000\022\016\n\nTRANSCRIPT\020\001\022\033\n\027END_OF" + + "_SINGLE_UTTERANCE\020\002\":\n\tTextInput\022\021\n\004text" + + "\030\001 \001(\tB\003\340A\002\022\032\n\rlanguage_code\030\002 \001(\tB\003\340A\002\"" + + "h\n\nEventInput\022\021\n\004name\030\001 \001(\tB\003\340A\002\022+\n\npara" + + "meters\030\002 \001(\0132\027.google.protobuf.Struct\022\032\n" + + "\rlanguage_code\030\003 \001(\tB\003\340A\002\"F\n\036SentimentAn" + + "alysisRequestConfig\022$\n\034analyze_query_tex" + + "t_sentiment\030\001 \001(\010\"^\n\027SentimentAnalysisRe" + + "sult\022C\n\024query_text_sentiment\030\001 \001(\0132%.goo" + + "gle.cloud.dialogflow.v2.Sentiment\"-\n\tSen" + + "timent\022\r\n\005score\030\001 \001(\002\022\021\n\tmagnitude\030\002 \001(\002" + + "2\345\005\n\010Sessions\022\311\003\n\014DetectIntent\022/.google." + + "cloud.dialogflow.v2.DetectIntentRequest\032" + + "0.google.cloud.dialogflow.v2.DetectInten" + + "tResponse\"\325\002\202\323\344\223\002\270\002\"6/v2/{session=projec" + + "ts/*/agent/sessions/*}:detectIntent:\001*ZR" + + "\"M/v2/{session=projects/*/agent/environm" + + "ents/*/users/*/sessions/*}:detectIntent:" + + "\001*ZG\"B/v2/{session=projects/*/locations/" + + "*/agent/sessions/*}:detectIntent:\001*Z^\"Y/" + + "v2/{session=projects/*/locations/*/agent" + + "/environments/*/users/*/sessions/*}:dete" + + "ctIntent:\001*\332A\023session,query_input\022\222\001\n\025St" + + "reamingDetectIntent\0228.google.cloud.dialo" + + "gflow.v2.StreamingDetectIntentRequest\0329." + + "google.cloud.dialogflow.v2.StreamingDete" + + "ctIntentResponse\"\000(\0010\001\032x\312A\031dialogflow.go" + + "ogleapis.com\322AYhttps://www.googleapis.co" + + "m/auth/cloud-platform,https://www.google" + + "apis.com/auth/dialogflowB\360\003\n\036com.google." + + "cloud.dialogflow.v2B\014SessionProtoP\001ZDgoo" + + "gle.golang.org/genproto/googleapis/cloud" + + "/dialogflow/v2;dialogflow\370\001\001\242\002\002DF\252\002\032Goog" + + "le.Cloud.Dialogflow.V2\352A\321\002\n!dialogflow.g" + + "oogleapis.com/Session\022+projects/{project" + + "}/agent/sessions/{session}\022Sprojects/{pr" + + "oject}/agent/environments/{environment}/" + + "users/{user}/sessions/{session}\022@project" + + "s/{project}/locations/{location}/agent/s" + + "essions/{session}\022hprojects/{project}/lo" + + "cations/{location}/agent/environments/{e" + + "nvironment}/users/{user}/sessions/{sessi" + + "on}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -238,6 +239,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ResourceProto.getDescriptor(), com.google.cloud.dialogflow.v2.AudioConfigProto.getDescriptor(), com.google.cloud.dialogflow.v2.ContextProto.getDescriptor(), + com.google.cloud.dialogflow.v2.GcsProto.getDescriptor(), com.google.cloud.dialogflow.v2.IntentProto.getDescriptor(), com.google.cloud.dialogflow.v2.SessionEntityTypeProto.getDescriptor(), com.google.protobuf.DurationProto.getDescriptor(), @@ -421,6 +423,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ResourceProto.getDescriptor(); com.google.cloud.dialogflow.v2.AudioConfigProto.getDescriptor(); com.google.cloud.dialogflow.v2.ContextProto.getDescriptor(); + com.google.cloud.dialogflow.v2.GcsProto.getDescriptor(); com.google.cloud.dialogflow.v2.IntentProto.getDescriptor(); com.google.cloud.dialogflow.v2.SessionEntityTypeProto.getDescriptor(); com.google.protobuf.DurationProto.getDescriptor(); diff --git a/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/audio_config.proto b/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/audio_config.proto index 129314160..3fcae610e 100644 --- a/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/audio_config.proto +++ b/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/audio_config.proto @@ -30,36 +30,6 @@ option java_outer_classname = "AudioConfigProto"; option java_package = "com.google.cloud.dialogflow.v2"; option objc_class_prefix = "DF"; -// Hints for the speech recognizer to help with recognition in a specific -// conversation state. -message SpeechContext { - // Optional. A list of strings containing words and phrases that the speech - // recognizer should recognize with higher likelihood. - // - // This list can be used to: - // - // * improve accuracy for words and phrases you expect the user to say, - // e.g. typical commands for your Dialogflow agent - // * add additional words to the speech recognizer vocabulary - // * ... - // - // See the [Cloud Speech - // documentation](https://cloud.google.com/speech-to-text/quotas) for usage - // limits. - repeated string phrases = 1; - - // Optional. Boost for this context compared to other contexts: - // - // * If the boost is positive, Dialogflow will increase the probability that - // the phrases in this context are recognized over similar sounding phrases. - // * If the boost is unspecified or non-positive, Dialogflow will not apply - // any boost. - // - // Dialogflow recommends that you use boosts in the range (0, 20] and that you - // find a value that fits your use case with binary search. - float boost = 2; -} - // Audio encoding of the audio content sent in the conversational query request. // Refer to the // [Cloud Speech API @@ -109,6 +79,36 @@ enum AudioEncoding { AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7; } +// Hints for the speech recognizer to help with recognition in a specific +// conversation state. +message SpeechContext { + // Optional. A list of strings containing words and phrases that the speech + // recognizer should recognize with higher likelihood. + // + // This list can be used to: + // + // * improve accuracy for words and phrases you expect the user to say, + // e.g. typical commands for your Dialogflow agent + // * add additional words to the speech recognizer vocabulary + // * ... + // + // See the [Cloud Speech + // documentation](https://cloud.google.com/speech-to-text/quotas) for usage + // limits. + repeated string phrases = 1; + + // Optional. Boost for this context compared to other contexts: + // + // * If the boost is positive, Dialogflow will increase the probability that + // the phrases in this context are recognized over similar sounding phrases. + // * If the boost is unspecified or non-positive, Dialogflow will not apply + // any boost. + // + // Dialogflow recommends that you use boosts in the range (0, 20] and that you + // find a value that fits your use case with binary search. + float boost = 2; +} + // Information for a word recognized by the speech recognizer. message SpeechWordInfo { // The word this info is for. diff --git a/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/document.proto b/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/document.proto index 11b9268b2..25a58a438 100644 --- a/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/document.proto +++ b/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/document.proto @@ -20,6 +20,7 @@ import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/cloud/dialogflow/v2/gcs.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; @@ -183,6 +184,30 @@ service Documents { metadata_type: "KnowledgeOperationMetadata" }; } + + // Exports a smart messaging candidate document into the specified + // destination. + // + // This method is a [long-running + // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + // The returned `Operation` type has the following method-specific fields: + // + // - `metadata`: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata] + // - `response`: [Document][google.cloud.dialogflow.v2.Document] + rpc ExportDocument(ExportDocumentRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2/{name=projects/*/knowledgeBases/*/documents/*}:export" + body: "*" + additional_bindings { + post: "/v2/{name=projects/*/locations/*/knowledgeBases/*/documents/*}:export" + body: "*" + } + }; + option (google.longrunning.operation_info) = { + response_type: "Document" + metadata_type: "KnowledgeOperationMetadata" + }; + } } // A knowledge document to be used by a [KnowledgeBase][google.cloud.dialogflow.v2.KnowledgeBase]. @@ -328,6 +353,29 @@ message ListDocumentsRequest { // The next_page_token value returned from a previous list request. string page_token = 3; + + // The filter expression used to filter documents returned by the list method. + // The expression has the following syntax: + // + // [AND ] ... + // + // The following fields and operators are supported: + // + // * knowledge_types with has(:) operator + // * display_name with has(:) operator + // * state with equals(=) operator + // + // Examples: + // + // * "knowledge_types:FAQ" matches documents with FAQ knowledge type. + // * "display_name:customer" matches documents whose display name contains + // "customer". + // * "state=ACTIVE" matches documents with ACTIVE state. + // * "knowledge_types:FAQ AND state=ACTIVE" matches all active FAQ documents. + // + // For more information about filtering, see + // [API Filtering](https://aip.dev/160). + string filter = 4; } // Response message for [Documents.ListDocuments][google.cloud.dialogflow.v2.Documents.ListDocuments]. @@ -403,6 +451,41 @@ message ReloadDocumentRequest { // the form `gs:///`. string content_uri = 3 [(google.api.field_behavior) = OPTIONAL]; } + + // Optional. Whether to import custom metadata from Google Cloud Storage. + // Only valid when the document source is Google Cloud Storage URI. + bool import_gcs_custom_metadata = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. When enabled, the reload request is to apply partial update to the smart + // messaging allowlist. + bool smart_messaging_partial_update = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for [Documents.ExportDocument][google.cloud.dialogflow.v2.Documents.ExportDocument]. +message ExportDocumentRequest { + // Required. The name of the document to export. + // Format: `projects//locations//knowledgeBases//documents/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Document" + } + ]; + + // Required. The destination for the export. + oneof destination { + // Cloud Storage file path to export the document. + GcsDestination gcs_destination = 2; + } + + // When enabled, export the full content of the document including empirical + // probability. + bool export_full_content = 3; + + // When enabled, export the smart messaging allowlist document for partial + // update. + bool smart_messaging_partial_update = 5; } // Metadata in google::longrunning::Operation for Knowledge operations. diff --git a/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/gcs.proto b/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/gcs.proto index 1fb2dc99c..9d96103e6 100644 --- a/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/gcs.proto +++ b/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/gcs.proto @@ -26,3 +26,13 @@ option java_multiple_files = true; option java_outer_classname = "GcsProto"; option java_package = "com.google.cloud.dialogflow.v2"; option objc_class_prefix = "DF"; + +// Google Cloud Storage location for the output. +message GcsDestination { + // The Google Cloud Storage URIs for the output. A URI is of the + // form: + // gs://bucket/object-prefix-or-name + // Whether a prefix or name is used depends on the use case. The requesting + // user must have "write-permission" to the bucket. + string uri = 1; +} diff --git a/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/knowledge_base.proto b/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/knowledge_base.proto index 0b1aa8b3e..14647757e 100644 --- a/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/knowledge_base.proto +++ b/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/knowledge_base.proto @@ -165,6 +165,34 @@ message ListKnowledgeBasesRequest { // The next_page_token value returned from a previous list request. string page_token = 3; + + // The filter expression used to filter knowledge bases returned by the list + // method. The expression has the following syntax: + // + // [AND ] ... + // + // The following fields and operators are supported: + // + // * display_name with has(:) operator + // * language_code with equals(=) operator + // + // Examples: + // + // * 'language_code=en-us' matches knowledge bases with en-us language code. + // * 'display_name:articles' matches knowledge bases whose display name + // contains "articles". + // * 'display_name:"Best Articles"' matches knowledge bases whose display + // name contains "Best Articles". + // * 'language_code=en-gb AND display_name=articles' matches all knowledge + // bases whose display name contains "articles" and whose language code is + // "en-gb". + // + // Note: An empty filter string (i.e. "") is a no-op and will result in no + // filtering. + // + // For more information about filtering, see + // [API Filtering](https://aip.dev/160). + string filter = 4; } // Response message for [KnowledgeBases.ListKnowledgeBases][google.cloud.dialogflow.v2.KnowledgeBases.ListKnowledgeBases]. 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 cc67584f9..71bc3a967 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 @@ -21,6 +21,7 @@ import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/dialogflow/v2/audio_config.proto"; +import "google/cloud/dialogflow/v2/gcs.proto"; import "google/cloud/dialogflow/v2/session.proto"; import "google/protobuf/any.proto"; import "google/protobuf/duration.proto"; diff --git a/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/session.proto b/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/session.proto index 7f8332211..6c4bf790b 100644 --- a/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/session.proto +++ b/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/session.proto @@ -22,6 +22,7 @@ import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/dialogflow/v2/audio_config.proto"; import "google/cloud/dialogflow/v2/context.proto"; +import "google/cloud/dialogflow/v2/gcs.proto"; import "google/cloud/dialogflow/v2/intent.proto"; import "google/cloud/dialogflow/v2/session_entity_type.proto"; import "google/protobuf/duration.proto";