Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regenerate dialogflow client #4845

Merged
merged 1 commit into from
Apr 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -686,6 +686,98 @@ public final UnaryCallable<DeleteDocumentRequest, Operation> deleteDocumentCalla
return stub.deleteDocumentCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Updates the specified document. Operation &lt;response:
* [Document][google.cloud.dialogflow.v2beta1.Document], metadata:
* [KnowledgeOperationMetadata][google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata]&gt;
*
* <p>Sample code:
*
* <pre><code>
* try (DocumentsClient documentsClient = DocumentsClient.create()) {
* UpdateDocumentRequest request = UpdateDocumentRequest.newBuilder().build();
* Operation response = documentsClient.updateDocument(request);
* }
* </code></pre>
*
* @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 Operation updateDocument(UpdateDocumentRequest request) {
return updateDocumentCallable().call(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Updates the specified document. Operation &lt;response:
* [Document][google.cloud.dialogflow.v2beta1.Document], metadata:
* [KnowledgeOperationMetadata][google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata]&gt;
*
* <p>Sample code:
*
* <pre><code>
* try (DocumentsClient documentsClient = DocumentsClient.create()) {
* UpdateDocumentRequest request = UpdateDocumentRequest.newBuilder().build();
* ApiFuture&lt;Operation&gt; future = documentsClient.updateDocumentCallable().futureCall(request);
* // Do something
* Operation response = future.get();
* }
* </code></pre>
*/
public final UnaryCallable<UpdateDocumentRequest, Operation> updateDocumentCallable() {
return stub.updateDocumentCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Reloads the specified document from its specified source, content_uri or content. The
* previously loaded content of the document will be deleted. Note: Even when the content of the
* document has not changed, there still may be side effects because of internal implementation
* changes. Operation &lt;response: [Document][google.cloud.dialogflow.v2beta1.Document],
* metadata:
* [KnowledgeOperationMetadata][google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata]&gt;
*
* <p>Sample code:
*
* <pre><code>
* try (DocumentsClient documentsClient = DocumentsClient.create()) {
* ReloadDocumentRequest request = ReloadDocumentRequest.newBuilder().build();
* Operation response = documentsClient.reloadDocument(request);
* }
* </code></pre>
*
* @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 Operation reloadDocument(ReloadDocumentRequest request) {
return reloadDocumentCallable().call(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Reloads the specified document from its specified source, content_uri or content. The
* previously loaded content of the document will be deleted. Note: Even when the content of the
* document has not changed, there still may be side effects because of internal implementation
* changes. Operation &lt;response: [Document][google.cloud.dialogflow.v2beta1.Document],
* metadata:
* [KnowledgeOperationMetadata][google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata]&gt;
*
* <p>Sample code:
*
* <pre><code>
* try (DocumentsClient documentsClient = DocumentsClient.create()) {
* ReloadDocumentRequest request = ReloadDocumentRequest.newBuilder().build();
* ApiFuture&lt;Operation&gt; future = documentsClient.reloadDocumentCallable().futureCall(request);
* // Do something
* Operation response = future.get();
* }
* </code></pre>
*/
public final UnaryCallable<ReloadDocumentRequest, Operation> reloadDocumentCallable() {
return stub.reloadDocumentCallable();
}

@Override
public final void close() {
stub.close();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,16 @@ public UnaryCallSettings<DeleteDocumentRequest, Operation> deleteDocumentSetting
return ((DocumentsStubSettings) getStubSettings()).deleteDocumentOperationSettings();
}

/** Returns the object with the settings used for calls to updateDocument. */
public UnaryCallSettings<UpdateDocumentRequest, Operation> updateDocumentSettings() {
return ((DocumentsStubSettings) getStubSettings()).updateDocumentSettings();
}

/** Returns the object with the settings used for calls to reloadDocument. */
public UnaryCallSettings<ReloadDocumentRequest, Operation> reloadDocumentSettings() {
return ((DocumentsStubSettings) getStubSettings()).reloadDocumentSettings();
}

public static final DocumentsSettings create(DocumentsStubSettings stub) throws IOException {
return new DocumentsSettings.Builder(stub.toBuilder()).build();
}
Expand Down Expand Up @@ -237,6 +247,16 @@ public UnaryCallSettings.Builder<DeleteDocumentRequest, Operation> deleteDocumen
return getStubSettingsBuilder().deleteDocumentOperationSettings();
}

/** Returns the builder for the settings used for calls to updateDocument. */
public UnaryCallSettings.Builder<UpdateDocumentRequest, Operation> updateDocumentSettings() {
return getStubSettingsBuilder().updateDocumentSettings();
}

/** Returns the builder for the settings used for calls to reloadDocument. */
public UnaryCallSettings.Builder<ReloadDocumentRequest, Operation> reloadDocumentSettings() {
return getStubSettingsBuilder().reloadDocumentSettings();
}

@Override
public DocumentsSettings build() throws IOException {
return new DocumentsSettings(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,46 @@ public final UnaryCallable<DeleteKnowledgeBaseRequest, Empty> deleteKnowledgeBas
return stub.deleteKnowledgeBaseCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Updates the specified knowledge base.
*
* <p>Sample code:
*
* <pre><code>
* try (KnowledgeBasesClient knowledgeBasesClient = KnowledgeBasesClient.create()) {
* UpdateKnowledgeBaseRequest request = UpdateKnowledgeBaseRequest.newBuilder().build();
* KnowledgeBase response = knowledgeBasesClient.updateKnowledgeBase(request);
* }
* </code></pre>
*
* @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 KnowledgeBase updateKnowledgeBase(UpdateKnowledgeBaseRequest request) {
return updateKnowledgeBaseCallable().call(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Updates the specified knowledge base.
*
* <p>Sample code:
*
* <pre><code>
* try (KnowledgeBasesClient knowledgeBasesClient = KnowledgeBasesClient.create()) {
* UpdateKnowledgeBaseRequest request = UpdateKnowledgeBaseRequest.newBuilder().build();
* ApiFuture&lt;KnowledgeBase&gt; future = knowledgeBasesClient.updateKnowledgeBaseCallable().futureCall(request);
* // Do something
* KnowledgeBase response = future.get();
* }
* </code></pre>
*/
public final UnaryCallable<UpdateKnowledgeBaseRequest, KnowledgeBase>
updateKnowledgeBaseCallable() {
return stub.updateKnowledgeBaseCallable();
}

@Override
public final void close() {
stub.close();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ public UnaryCallSettings<DeleteKnowledgeBaseRequest, Empty> deleteKnowledgeBaseS
return ((KnowledgeBasesStubSettings) getStubSettings()).deleteKnowledgeBaseSettings();
}

/** Returns the object with the settings used for calls to updateKnowledgeBase. */
public UnaryCallSettings<UpdateKnowledgeBaseRequest, KnowledgeBase>
updateKnowledgeBaseSettings() {
return ((KnowledgeBasesStubSettings) getStubSettings()).updateKnowledgeBaseSettings();
}

public static final KnowledgeBasesSettings create(KnowledgeBasesStubSettings stub)
throws IOException {
return new KnowledgeBasesSettings.Builder(stub.toBuilder()).build();
Expand Down Expand Up @@ -208,6 +214,12 @@ public Builder applyToAllUnaryMethods(
return getStubSettingsBuilder().deleteKnowledgeBaseSettings();
}

/** Returns the builder for the settings used for calls to updateKnowledgeBase. */
public UnaryCallSettings.Builder<UpdateKnowledgeBaseRequest, KnowledgeBase>
updateKnowledgeBaseSettings() {
return getStubSettingsBuilder().updateKnowledgeBaseSettings();
}

@Override
public KnowledgeBasesSettings build() throws IOException {
return new KnowledgeBasesSettings(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
import com.google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata;
import com.google.cloud.dialogflow.v2beta1.ListDocumentsRequest;
import com.google.cloud.dialogflow.v2beta1.ListDocumentsResponse;
import com.google.cloud.dialogflow.v2beta1.ReloadDocumentRequest;
import com.google.cloud.dialogflow.v2beta1.UpdateDocumentRequest;
import com.google.longrunning.Operation;
import com.google.longrunning.stub.OperationsStub;
import com.google.protobuf.Empty;
Expand Down Expand Up @@ -81,6 +83,14 @@ public UnaryCallable<DeleteDocumentRequest, Operation> deleteDocumentCallable()
throw new UnsupportedOperationException("Not implemented: deleteDocumentCallable()");
}

public UnaryCallable<UpdateDocumentRequest, Operation> updateDocumentCallable() {
throw new UnsupportedOperationException("Not implemented: updateDocumentCallable()");
}

public UnaryCallable<ReloadDocumentRequest, Operation> reloadDocumentCallable() {
throw new UnsupportedOperationException("Not implemented: reloadDocumentCallable()");
}

@Override
public abstract void close();
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@
import com.google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata;
import com.google.cloud.dialogflow.v2beta1.ListDocumentsRequest;
import com.google.cloud.dialogflow.v2beta1.ListDocumentsResponse;
import com.google.cloud.dialogflow.v2beta1.ReloadDocumentRequest;
import com.google.cloud.dialogflow.v2beta1.UpdateDocumentRequest;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
Expand Down Expand Up @@ -107,6 +109,8 @@ public class DocumentsStubSettings extends StubSettings<DocumentsStubSettings> {
private final UnaryCallSettings<DeleteDocumentRequest, Operation> deleteDocumentSettings;
private final OperationCallSettings<DeleteDocumentRequest, Empty, KnowledgeOperationMetadata>
deleteDocumentOperationSettings;
private final UnaryCallSettings<UpdateDocumentRequest, Operation> updateDocumentSettings;
private final UnaryCallSettings<ReloadDocumentRequest, Operation> reloadDocumentSettings;

/** Returns the object with the settings used for calls to listDocuments. */
public PagedCallSettings<ListDocumentsRequest, ListDocumentsResponse, ListDocumentsPagedResponse>
Expand Down Expand Up @@ -143,6 +147,16 @@ public UnaryCallSettings<DeleteDocumentRequest, Operation> deleteDocumentSetting
return deleteDocumentOperationSettings;
}

/** Returns the object with the settings used for calls to updateDocument. */
public UnaryCallSettings<UpdateDocumentRequest, Operation> updateDocumentSettings() {
return updateDocumentSettings;
}

/** Returns the object with the settings used for calls to reloadDocument. */
public UnaryCallSettings<ReloadDocumentRequest, Operation> reloadDocumentSettings() {
return reloadDocumentSettings;
}

@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public DocumentsStub createStub() throws IOException {
if (getTransportChannelProvider()
Expand Down Expand Up @@ -216,6 +230,8 @@ protected DocumentsStubSettings(Builder settingsBuilder) throws IOException {
createDocumentOperationSettings = settingsBuilder.createDocumentOperationSettings().build();
deleteDocumentSettings = settingsBuilder.deleteDocumentSettings().build();
deleteDocumentOperationSettings = settingsBuilder.deleteDocumentOperationSettings().build();
updateDocumentSettings = settingsBuilder.updateDocumentSettings().build();
reloadDocumentSettings = settingsBuilder.reloadDocumentSettings().build();
}

private static final PagedListDescriptor<ListDocumentsRequest, ListDocumentsResponse, Document>
Expand Down Expand Up @@ -289,6 +305,10 @@ public static class Builder extends StubSettings.Builder<DocumentsStubSettings,
private final OperationCallSettings.Builder<
DeleteDocumentRequest, Empty, KnowledgeOperationMetadata>
deleteDocumentOperationSettings;
private final UnaryCallSettings.Builder<UpdateDocumentRequest, Operation>
updateDocumentSettings;
private final UnaryCallSettings.Builder<ReloadDocumentRequest, Operation>
reloadDocumentSettings;

private static final ImmutableMap<String, ImmutableSet<StatusCode.Code>>
RETRYABLE_CODE_DEFINITIONS;
Expand Down Expand Up @@ -343,12 +363,18 @@ protected Builder(ClientContext clientContext) {

deleteDocumentOperationSettings = OperationCallSettings.newBuilder();

updateDocumentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();

reloadDocumentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();

unaryMethodSettingsBuilders =
ImmutableList.<UnaryCallSettings.Builder<?, ?>>of(
listDocumentsSettings,
getDocumentSettings,
createDocumentSettings,
deleteDocumentSettings);
deleteDocumentSettings,
updateDocumentSettings,
reloadDocumentSettings);

initDefaults(this);
}
Expand Down Expand Up @@ -383,6 +409,16 @@ private static Builder initDefaults(Builder builder) {
.deleteDocumentSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));

builder
.updateDocumentSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));

builder
.reloadDocumentSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
builder
.createDocumentOperationSettings()
.setInitialCallSettings(
Expand Down Expand Up @@ -444,13 +480,17 @@ protected Builder(DocumentsStubSettings settings) {
createDocumentOperationSettings = settings.createDocumentOperationSettings.toBuilder();
deleteDocumentSettings = settings.deleteDocumentSettings.toBuilder();
deleteDocumentOperationSettings = settings.deleteDocumentOperationSettings.toBuilder();
updateDocumentSettings = settings.updateDocumentSettings.toBuilder();
reloadDocumentSettings = settings.reloadDocumentSettings.toBuilder();

unaryMethodSettingsBuilders =
ImmutableList.<UnaryCallSettings.Builder<?, ?>>of(
listDocumentsSettings,
getDocumentSettings,
createDocumentSettings,
deleteDocumentSettings);
deleteDocumentSettings,
updateDocumentSettings,
reloadDocumentSettings);
}

// NEXT_MAJOR_VER: remove 'throws Exception'
Expand Down Expand Up @@ -508,6 +548,16 @@ public UnaryCallSettings.Builder<DeleteDocumentRequest, Operation> deleteDocumen
return deleteDocumentOperationSettings;
}

/** Returns the builder for the settings used for calls to updateDocument. */
public UnaryCallSettings.Builder<UpdateDocumentRequest, Operation> updateDocumentSettings() {
return updateDocumentSettings;
}

/** Returns the builder for the settings used for calls to reloadDocument. */
public UnaryCallSettings.Builder<ReloadDocumentRequest, Operation> reloadDocumentSettings() {
return reloadDocumentSettings;
}

@Override
public DocumentsStubSettings build() throws IOException {
return new DocumentsStubSettings(this);
Expand Down
Loading