Skip to content

Commit

Permalink
feat: [contactcenterinsights] Launch BulkDelete API, and bulk audio i…
Browse files Browse the repository at this point in the history
…mport via the IngestConversations API (#10039)

* feat: Launch BulkDelete API, and bulk audio import via the IngestConversations API

PiperOrigin-RevId: 579178675

Source-Link: googleapis/googleapis@7e33fcb

Source-Link: https://github.com/googleapis/googleapis-gen/commit/cb25a3fccb79bb35f227b0b1939ff62f056dfbea
Copy-Tag: eyJwIjoiamF2YS1jb250YWN0LWNlbnRlci1pbnNpZ2h0cy8uT3dsQm90LnlhbWwiLCJoIjoiY2IyNWEzZmNjYjc5YmIzNWYyMjdiMGIxOTM5ZmY2MmYwNTZkZmJlYSJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Nov 3, 2023
1 parent 53488e4 commit dbdc8a1
Show file tree
Hide file tree
Showing 35 changed files with 7,302 additions and 474 deletions.
4 changes: 2 additions & 2 deletions java-contact-center-insights/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>libraries-bom</artifactId>
<version>26.23.0</version>
<version>26.26.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -195,7 +195,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html
[stability-image]: https://img.shields.io/badge/stability-stable-green
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-contact-center-insights.svg
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-contact-center-insights/2.24.0
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-contact-center-insights/2.29.0
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1727,6 +1727,180 @@ public final UnaryCallable<DeleteAnalysisRequest, Empty> deleteAnalysisCallable(
return stub.bulkAnalyzeConversationsCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes multiple conversations in a single request.
*
* <p>Sample code:
*
* <pre>{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (ContactCenterInsightsClient contactCenterInsightsClient =
* ContactCenterInsightsClient.create()) {
* LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
* String filter = "filter-1274492040";
* BulkDeleteConversationsResponse response =
* contactCenterInsightsClient.bulkDeleteConversationsAsync(parent, filter).get();
* }
* }</pre>
*
* @param parent Required. The parent resource to create analyses in. Format:
* projects/{project}/locations/{location}
* @param filter Filter used to select the subset of conversations to analyze.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture<BulkDeleteConversationsResponse, BulkDeleteConversationsMetadata>
bulkDeleteConversationsAsync(LocationName parent, String filter) {
BulkDeleteConversationsRequest request =
BulkDeleteConversationsRequest.newBuilder()
.setParent(parent == null ? null : parent.toString())
.setFilter(filter)
.build();
return bulkDeleteConversationsAsync(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes multiple conversations in a single request.
*
* <p>Sample code:
*
* <pre>{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (ContactCenterInsightsClient contactCenterInsightsClient =
* ContactCenterInsightsClient.create()) {
* String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
* String filter = "filter-1274492040";
* BulkDeleteConversationsResponse response =
* contactCenterInsightsClient.bulkDeleteConversationsAsync(parent, filter).get();
* }
* }</pre>
*
* @param parent Required. The parent resource to create analyses in. Format:
* projects/{project}/locations/{location}
* @param filter Filter used to select the subset of conversations to analyze.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture<BulkDeleteConversationsResponse, BulkDeleteConversationsMetadata>
bulkDeleteConversationsAsync(String parent, String filter) {
BulkDeleteConversationsRequest request =
BulkDeleteConversationsRequest.newBuilder().setParent(parent).setFilter(filter).build();
return bulkDeleteConversationsAsync(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes multiple conversations in a single request.
*
* <p>Sample code:
*
* <pre>{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (ContactCenterInsightsClient contactCenterInsightsClient =
* ContactCenterInsightsClient.create()) {
* BulkDeleteConversationsRequest request =
* BulkDeleteConversationsRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setFilter("filter-1274492040")
* .setMaxDeleteCount(1611707510)
* .setForce(true)
* .build();
* BulkDeleteConversationsResponse response =
* contactCenterInsightsClient.bulkDeleteConversationsAsync(request).get();
* }
* }</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 OperationFuture<BulkDeleteConversationsResponse, BulkDeleteConversationsMetadata>
bulkDeleteConversationsAsync(BulkDeleteConversationsRequest request) {
return bulkDeleteConversationsOperationCallable().futureCall(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes multiple conversations in a single request.
*
* <p>Sample code:
*
* <pre>{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (ContactCenterInsightsClient contactCenterInsightsClient =
* ContactCenterInsightsClient.create()) {
* BulkDeleteConversationsRequest request =
* BulkDeleteConversationsRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setFilter("filter-1274492040")
* .setMaxDeleteCount(1611707510)
* .setForce(true)
* .build();
* OperationFuture<BulkDeleteConversationsResponse, BulkDeleteConversationsMetadata> future =
* contactCenterInsightsClient
* .bulkDeleteConversationsOperationCallable()
* .futureCall(request);
* // Do something.
* BulkDeleteConversationsResponse response = future.get();
* }
* }</pre>
*/
public final OperationCallable<
BulkDeleteConversationsRequest,
BulkDeleteConversationsResponse,
BulkDeleteConversationsMetadata>
bulkDeleteConversationsOperationCallable() {
return stub.bulkDeleteConversationsOperationCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes multiple conversations in a single request.
*
* <p>Sample code:
*
* <pre>{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (ContactCenterInsightsClient contactCenterInsightsClient =
* ContactCenterInsightsClient.create()) {
* BulkDeleteConversationsRequest request =
* BulkDeleteConversationsRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setFilter("filter-1274492040")
* .setMaxDeleteCount(1611707510)
* .setForce(true)
* .build();
* ApiFuture<Operation> future =
* contactCenterInsightsClient.bulkDeleteConversationsCallable().futureCall(request);
* // Do something.
* Operation response = future.get();
* }
* }</pre>
*/
public final UnaryCallable<BulkDeleteConversationsRequest, Operation>
bulkDeleteConversationsCallable() {
return stub.bulkDeleteConversationsCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Imports conversations and processes them according to the user's configuration.
Expand Down Expand Up @@ -1808,6 +1982,8 @@ public final UnaryCallable<DeleteAnalysisRequest, Empty> deleteAnalysisCallable(
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setConversationConfig(
* IngestConversationsRequest.ConversationConfig.newBuilder().build())
* .setRedactionConfig(RedactionConfig.newBuilder().build())
* .setSpeechConfig(SpeechConfig.newBuilder().build())
* .build();
* IngestConversationsResponse response =
* contactCenterInsightsClient.ingestConversationsAsync(request).get();
Expand Down Expand Up @@ -1841,6 +2017,8 @@ public final UnaryCallable<DeleteAnalysisRequest, Empty> deleteAnalysisCallable(
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setConversationConfig(
* IngestConversationsRequest.ConversationConfig.newBuilder().build())
* .setRedactionConfig(RedactionConfig.newBuilder().build())
* .setSpeechConfig(SpeechConfig.newBuilder().build())
* .build();
* OperationFuture<IngestConversationsResponse, IngestConversationsMetadata> future =
* contactCenterInsightsClient.ingestConversationsOperationCallable().futureCall(request);
Expand Down Expand Up @@ -1874,6 +2052,8 @@ public final UnaryCallable<DeleteAnalysisRequest, Empty> deleteAnalysisCallable(
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setConversationConfig(
* IngestConversationsRequest.ConversationConfig.newBuilder().build())
* .setRedactionConfig(RedactionConfig.newBuilder().build())
* .setSpeechConfig(SpeechConfig.newBuilder().build())
* .build();
* ApiFuture<Operation> future =
* contactCenterInsightsClient.ingestConversationsCallable().futureCall(request);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,23 @@ public UnaryCallSettings<DeleteAnalysisRequest, Empty> deleteAnalysisSettings()
.bulkAnalyzeConversationsOperationSettings();
}

/** Returns the object with the settings used for calls to bulkDeleteConversations. */
public UnaryCallSettings<BulkDeleteConversationsRequest, Operation>
bulkDeleteConversationsSettings() {
return ((ContactCenterInsightsStubSettings) getStubSettings())
.bulkDeleteConversationsSettings();
}

/** Returns the object with the settings used for calls to bulkDeleteConversations. */
public OperationCallSettings<
BulkDeleteConversationsRequest,
BulkDeleteConversationsResponse,
BulkDeleteConversationsMetadata>
bulkDeleteConversationsOperationSettings() {
return ((ContactCenterInsightsStubSettings) getStubSettings())
.bulkDeleteConversationsOperationSettings();
}

/** Returns the object with the settings used for calls to ingestConversations. */
public UnaryCallSettings<IngestConversationsRequest, Operation> ingestConversationsSettings() {
return ((ContactCenterInsightsStubSettings) getStubSettings()).ingestConversationsSettings();
Expand Down Expand Up @@ -560,6 +577,21 @@ public UnaryCallSettings.Builder<DeleteAnalysisRequest, Empty> deleteAnalysisSet
return getStubSettingsBuilder().bulkAnalyzeConversationsOperationSettings();
}

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

/** Returns the builder for the settings used for calls to bulkDeleteConversations. */
public OperationCallSettings.Builder<
BulkDeleteConversationsRequest,
BulkDeleteConversationsResponse,
BulkDeleteConversationsMetadata>
bulkDeleteConversationsOperationSettings() {
return getStubSettingsBuilder().bulkDeleteConversationsOperationSettings();
}

/** Returns the builder for the settings used for calls to ingestConversations. */
public UnaryCallSettings.Builder<IngestConversationsRequest, Operation>
ingestConversationsSettings() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
"BulkAnalyzeConversations": {
"methods": ["bulkAnalyzeConversationsAsync", "bulkAnalyzeConversationsAsync", "bulkAnalyzeConversationsAsync", "bulkAnalyzeConversationsOperationCallable", "bulkAnalyzeConversationsCallable"]
},
"BulkDeleteConversations": {
"methods": ["bulkDeleteConversationsAsync", "bulkDeleteConversationsAsync", "bulkDeleteConversationsAsync", "bulkDeleteConversationsOperationCallable", "bulkDeleteConversationsCallable"]
},
"CalculateIssueModelStats": {
"methods": ["calculateIssueModelStats", "calculateIssueModelStats", "calculateIssueModelStats", "calculateIssueModelStatsCallable"]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
import com.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsMetadata;
import com.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest;
import com.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsResponse;
import com.google.cloud.contactcenterinsights.v1.BulkDeleteConversationsMetadata;
import com.google.cloud.contactcenterinsights.v1.BulkDeleteConversationsRequest;
import com.google.cloud.contactcenterinsights.v1.BulkDeleteConversationsResponse;
import com.google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest;
import com.google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse;
import com.google.cloud.contactcenterinsights.v1.CalculateStatsRequest;
Expand Down Expand Up @@ -188,6 +191,20 @@ public UnaryCallable<DeleteAnalysisRequest, Empty> deleteAnalysisCallable() {
throw new UnsupportedOperationException("Not implemented: bulkAnalyzeConversationsCallable()");
}

public OperationCallable<
BulkDeleteConversationsRequest,
BulkDeleteConversationsResponse,
BulkDeleteConversationsMetadata>
bulkDeleteConversationsOperationCallable() {
throw new UnsupportedOperationException(
"Not implemented: bulkDeleteConversationsOperationCallable()");
}

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

public OperationCallable<
IngestConversationsRequest, IngestConversationsResponse, IngestConversationsMetadata>
ingestConversationsOperationCallable() {
Expand Down
Loading

0 comments on commit dbdc8a1

Please sign in to comment.